This page (revision-16) was last changed on 03-Feb-2023 15:21 by Steve N 

This page was created on 23-Jan-2016 02:37 by Steve N

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
16 03-Feb-2023 15:21 25 KB Steve N to previous
15 26-Jan-2016 01:32 25 KB Steve N to previous | to last Added table of contents
14 24-Jan-2016 11:42 25 KB Steve N to previous | to last Amended relocation text
13 24-Jan-2016 09:38 25 KB Steve N to previous | to last Added alternate drive check information. Needs comments on status codes.
12 24-Jan-2016 05:58 24 KB Steve N to previous | to last Added credit information
11 23-Jan-2016 10:21 24 KB Steve N to previous | to last Cleaned up the English from Google English to UK English in the examples sectio.
10 23-Jan-2016 10:03 24 KB Steve N to previous | to last Previously missed out a couple of updates
9 23-Jan-2016 10:02 24 KB Steve N to previous | to last Cleaned up plenty of copied and pasted code.
8 23-Jan-2016 08:32 24 KB Steve N to previous | to last Wiki restricts consecutive spaces to 1, using code formatting to stop this.
7 23-Jan-2016 06:55 24 KB Steve N to previous | to last Added download location information and amended formatting...
6 23-Jan-2016 06:49 24 KB Steve N to previous | to last Formatting amendments... needs a lot more
5 23-Jan-2016 06:41 24 KB Steve N to previous | to last Formatting corrections...
4 23-Jan-2016 03:13 24 KB Steve N to previous | to last Added .cfg file details
3 23-Jan-2016 02:57 23 KB Steve N to previous | to last Cleaned up formatting a lot. Ready for public viewing and amendment.
2 23-Jan-2016 02:45 23 KB Steve N to previous | to last Some headers set up, still needs lots of reformatting... (work in progress)
1 23-Jan-2016 02:37 25 KB Steve N to last Initial raw dump from document released on AtariAge

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 changed one line
[{TableOfContents}]
xBIOS Documentation
BETA DOCUMENT: The accuracy of this document is not guaranteed. Use with care!
At line 3 changed one line
!!!xBIOS Overview
Document Version: 0.4.0
Published on: Monday 11th January 2016
Authors:
Krzysztof Dudek - “XXL” - Code examples, xBIOS author and lots of input.
Steve Nicklin - “snicklin” - Main document.
At line 10 added 80 lines
Known Issues with Document:
Incomplete, not enough examples.
Google translation of code examples needs refining. [ Incomplete ]
Initial version.
Only a handful of peer reviews conducted.
Some code examples use V3 code. May or may not work with v4.3
Likely Priorities for Next Major Version of Document:
Fill out with content.
Correct errors and English.
Mention more about the xBIOS menu.
Mention using other devices.
Mention how to switch off / not use Atari I/O.
Add a “directories” usage example.
Formatting needs improving for some code examples.
Document Scope:
This document is only intended to cover xBIOS versions 4.1 and above.
Code examples will use MADS syntax/formatting.
Disclaimer:
The author of this document is not an expert in xBIOS. This document is being used to collate information for personal knowledge gain. Errors may occur and not all supplied routines have been tested by the author. Technical queries should be addressed to Krzysztof and feedback given to Steve. This document is intended to represent the latest version of xBIOS, which is currently v4.3. It is however appreciated that a lot of information in the document may have been provided for older versions of xBIOS, but in all likeliness, they will still work with the latest xBIOS.
Software download location and original documentation: http://xxl.atari.pl
Document Amendments with Feedback Person Listed
v0.2.0 : Heaven/TQA@AA : Added xBOOT section.
v0.3.0 : Kyle22@AA : Extension of ‘Practical Usage’ section.
v0.3.1 : Kyle22@AA, Heaven/TQA@AA : Update code start advice.
v0.3.2 : MaPa@AA : Re-update code start advice with additional information.
v.0.4.0 : XXL@AA: Practical usage info and directory size information.
xBIOS Overview
At line 7 changed one line
!!General Notes
General Notes
At line 11 removed 2 lines
!Download Location
[http://xxl.atari.pl]
At line 14 changed one line
!Autorun
Autorun
At line 18 changed one line
!Filename Format
Filename Format
At line 20 changed one line
Filenames are padded out to 11 characters and are converted to uppercase.
FIlenames are padded out to 11 characters and are converted to uppercase.
At line 22 changed 5 lines
{{{
‘FILE TXT’ (4 letters, 4 spaces and a 3 character extension)
}}}
‘FILE TXT’
4 letters, 4 spaces and and a 3 character extension
At line 29 changed one line
!xBIOS Limitations
xBIOS Limitations
At line 31 changed one line
a) New files cannot be created.
New files cannot be created.
Existing files cannot be extended in length.
New directories cannot be created.
At line 33 changed one line
b) Existing files cannot be extended in length.
Default Memory Layout
At line 35 removed 4 lines
c) New directories cannot be created programatically.
!Default Memory Layout
{{{
At line 41 changed one line
$0700-$07FF xBIOS I/O buffer
$0700-$07FF xBIOS I/O buffer
At line 46 removed one line
}}}
At line 48 changed 2 lines
!Disk Images
Disk images (.atr files) need to be prepared in advance for xBIOS to work.
Disk Images
Disk images (.atr files) need to be prepared in advance for xBIOS to work.
A disk image is a file which simulates a disk. It will contain 1 or more files which can be used by your programs.
At line 51 changed one line
A disk image is a file which simulates a disk. It will contain 1 or more files which can be used by your programs.
In order to prepare them, an external tool needs to be used.
At line 53 changed 4 lines
In order to prepare them, an external tool needs to be used.
__‘dir2atr’__ : [http://www.horus.com/~hias/atari]
‘dir2atr’ :
http://www.horus.com/~hias/atari
At line 59 changed 3 lines
__‘franny’__ : [http://atariage.com/forums/topic/159325-program-to-add-to-and-extract-files-from-atr/]
‘franny’ : http://atariage.com/forums/topic/159325-program-to-add-to-and-extract-files-from-atr/
At line 64 changed one line
!!!Practical Usage
Practical Usage
At line 69 removed one line
At line 73 changed one line
{{{
At line 78 removed one line
}}}
At line 80 changed one line
xBIOS now also needs adding into the development project which is being created.
xBIOS now also needs adding into the development project which is being created. The following code needs to be pasted into a project:
At line 82 removed 5 lines
There are two ways of achieving this:
__Option 1:__
The following code needs to be pasted into a project:
At line 88 changed 8 lines
{{{
xBIOS equ $800
xBIOS_VERSION equ xBIOS+$02
xBIOS_RENAME_ENTRY equ xBIOS+$03
xBIOS_LOAD_FILE equ xBIOS+$06
xBIOS_OPEN_FILE equ xBIOS+$09
xBIOS_LOAD_DATA equ xBIOS+$0c
xBIOS_WRITE_DATA equ xBIOS+$0f
xBIOS equ $800
xBIOS_VERSION equ xBIOS+$02
xBIOS_RENAME_ENTRY equ xBIOS+$03
xBIOS_LOAD_FILE equ xBIOS+$06
xBIOS_OPEN_FILE equ xBIOS+$09
xBIOS_LOAD_DATA equ xBIOS+$0c
xBIOS_WRITE_DATA equ xBIOS+$0f
At line 97 changed 5 lines
xBIOS_GET_BYTE equ xBIOS+$15
xBIOS_PUT_BYTE equ xBIOS+$18
xBIOS_FLUSH_BUFFER equ xBIOS+$1b
xBIOS_SET_LENGTH equ xBIOS+$1e
xBIOS_SET_INIAD equ xBIOS+$21
xBIOS_GET_BYTE equ xBIOS+$15
xBIOS_PUT_BYTE equ xBIOS+$18
xBIOS_FLUSH_BUFFER equ xBIOS+$1b
xBIOS_SET_LENGTH equ xBIOS+$1e
xBIOS_SET_INIAD equ xBIOS+$21
At line 103 changed 3 lines
xBIOS_SET_RUNAD equ xBIOS+$27
xBIOS_SET_DEFAULT_DEVICE equ xBIOS+$2a
xBIOS_OPEN_DIR equ xBIOS+$2d
xBIOS_SET_RUNAD equ xBIOS+$27
xBIOS_SET_DEFAULT_DEVICE equ xBIOS+$2a
xBIOS_OPEN_DIR equ xBIOS+$2d
At line 108 changed one line
xBIOS_SET_DEVICE equ xBIOS+$36
xBIOS_SET_DEVICE equ xBIOS+$36
At line 110 changed one line
xBIOS_GET_ENTRY equ xBIOS+$3c
xBIOS_GET_ENTRY equ xBIOS+$3c
At line 112 changed 2 lines
xBIOS_READ_SECTOR equ xBIOS+$42
xBIOS_FIND_ENTRY equ xBIOS+$45
xBIOS_READ_SECTOR equ xBIOS+$42
xBIOS_FIND_ENTRY equ xBIOS+$45
At line 127 changed one line
xSEGMENT equ xBIOS+$3f3 ; Bytes to go in binary file segment (2 bytes)
xSEGMENT equ xBIOS+$3f3 ; Bytes to go in binary file segment (2 bytes)
At line 133 removed one line
}}}
At line 135 changed one line
Each entry in this jump table specifies where in memory that the code for each function resides. If you ever wish to start from a different address, change the value for ‘xBIOS’ above and change the value in the binary header of xBIOS.com.
Each entry in this jump table specifies where in memory that the code for each function resides. Replace the $xxxx at the start with a starting address. $0800 should a be safe address for all purposes. If you ever wish to start from a different address, simply change the value for ‘xBIOS’.
At line 137 removed 21 lines
__Option 2:__
From xBIOS v4.2 and above, you can use the xBIOS.cfg file which is as below.
{{{
opt h-
.byte $43 ; config for v4.3 version
.byte c'XAUTORUN ' ; autorun file fname
.byte >$0800 ; xB adress for relocator
.byte >$0700 ; xB buffer adress for relocator
.word $02e2 ; INITAD
.word $02e0 ; RUNAD
.word $0000 ; custom I/O module - $0000 means use internal xB SIO
.word $0000 ; relocator for custom I/O module
.byte $ff ; PORTB - you can't swith off BASIC this way
.byte $40 ; NMIEN - config at start
.byte $c0 ; IRQEN - config at start
}}}
Please note that xBIOS do not use page zero. You can change the start address from the third entry above.
At line 160 changed one line
!!!Examples
Examples
At line 162 changed one line
Here are some of the examples taken from http://xxl.atari.pl and other online sources, but with a few extra/modified comments in English.
Here are some of the examples taken from http://xxl.atari.pl and other online sources, but with a few extra / modified comments in English.
At line 165 changed 2 lines
!xBIOS_RENAME_ENTRY
xBIOS_RENAME_ENTRY
At line 170 removed one line
{{{
At line 177 removed one line
}}}
At line 179 removed one line
!xBIOS_LOAD_FILE
At line 181 changed one line
Load and run the file, INIT and RUN headers are supported. "Boot Loader" has an analogous function xBOOT_LOAD_FILE. In the case of the boot loader if the file does not have a defined block RUN will be launched from the beginning of the first block.
xBIOS_LOAD_FILE
Load and run the file, INIT and RUN headers are supported. Boot Loader has an analogous function xBOOT_LOAD_FILE. In the case of the boot loader if the file does not have a defined block RUN will be launched from the beginning of the first block.
At line 183 removed one line
{{{
At line 188 removed one line
}}}
At line 190 removed 2 lines
!xBIOS_OPEN_FILE
Open a file in order to carry out subsequent IO operations.
At line 193 changed one line
{{{
xBIOS_OPEN_FILE
Open a file in order to carry out subsequent I / O operations.
At line 198 removed one line
}}}
At line 200 removed one line
!xBIOS_LOAD_DATA
At line 239 added one line
xBIOS_LOAD_DATA
At line 203 removed 2 lines
{{{
At line 208 removed one line
}}}
At line 210 changed 5 lines
!xBIOS_WRITE_DATA
Save data from memory to a file, starting from the current position in the file. You can set the file pointer offset current (FILE_OFFSET) and the amount of data to be saved (SET_LENGTH). If you do not define these values, data from the current file position to the end of the file is written to the file.
{{{
xBIOS_WRITE_DATA
Data starting from the given address in the memory, save to a file, you can set the file pointer offset current (FILE_OFFSET) and the amount of data to be saved (SET_LENGTH). If you do not define these values ​​in the file are stored data from the current file position to the end of the file.
At line 218 removed one line
}}}
At line 220 changed one line
!xBIOS_OPEN_CURRENT_DIR
xBIOS_OPEN_CURRENT_DIR
At line 222 removed 2 lines
{{{
At line 225 removed one line
}}}
At line 227 changed one line
!xBIOS_GET_BYTE
xBIOS_GET_BYTE
At line 229 removed 2 lines
{{{
At line 232 removed one line
}}}
At line 234 changed 2 lines
!xBIOS_PUT_BYTE
xBIOS_PUT_BYTE
At line 237 removed 2 lines
{{{
At line 241 removed one line
}}}
At line 243 changed 2 lines
!xBIOS_FLUSH_BUFFER
xBIOS_FLUSH_BUFFER
At line 246 removed 2 lines
{{{
At line 249 removed one line
}}}
At line 251 changed 5 lines
!xBIOS_SET_LENGTH
Defines the amount of data to process while reading or writing. If your OPEN_FILE value is not defined this operation will be carried out until the end of the file.
{{{
xBIOS_SET_LENGTH
Defines the amount of data processed while reading or writing. If your OPEN_FILE value is not defined this operation will be carried out until the end of the file.
At line 259 removed one line
}}}
At line 261 changed one line
!xBIOS_SET_INIAD
xBIOS_SET_INIAD
Allows you to change the vector location INITAD ($ 2E2) loaded binary files.
At line 263 removed 3 lines
Allows you to change the init address vector INITAD ($2E2) for loaded binary files.
{{{
At line 269 removed one line
}}}
At line 271 changed 5 lines
!xBIOS_SET_FILE_OFFSET
Sets the current read/write position in the current file with a value stored in A, X, Y. This item is calculated relative to the beginning of the file. In DOS speak, the operation is called "POINT".
{{{
xBIOS_SET_FILE_OFFSET
Sets the current position of the read / write file on a value stored in the A, X, Y. This item is calculated relative to the beginning of the file. Number of byte that will be read or written. In DOS operation is called POINT.
At line 280 removed one line
}}}
At line 282 changed 5 lines
!xBIOS_SET_RUNAD
Allows you to change the run address vector RUNAD ($2E0) for loaded binary files.
{{{
xBIOS_SET_RUNAD
Allows you to change the vector location RUNAD ($ 2E0) loaded binary files.
At line 290 removed one line
}}}
At line 292 changed 4 lines
!xBIOS_SET_DEFAULT_DEVICE
Restores the standard IO device.
{{{
xBIOS_SET_DEFAULT_DEVICE
Restores the standard I / O controller external device.
At line 297 removed one line
}}}
At line 299 changed one line
!xBIOS_OPEN_DIR
xBIOS_OPEN_DIR
At line 301 removed 2 lines
{{{
At line 306 removed one line
}}}
At line 309 changed 6 lines
!xBIOS_LOAD_BINARY_FILE
Load and run the binary file from the current read/write position. INIT and RUN headers are supported.
{{{
xBIOS_LOAD_BINARY_FILE
Load and run the binary file from the current position of the read / write. INIT and RUN headers are supported.
At line 316 removed one line
}}}
At line 318 changed 2 lines
!xBIOS_OPEN_DEFAULT_DIR
xBIOS_OPEN_DEFAULT_DIR
At line 321 removed 2 lines
{{{
At line 324 removed one line
}}}
At line 326 changed 5 lines
!xBIOS_SET_DEVICE
Change the IO device.
{{{
xBIOS_SET_DEVICE
Change the I / O controller external device.
At line 334 removed one line
}}}
At line 336 changed 5 lines
!xBIOS_RELOCATE_BUFFER
Change address IO buffer. If before the call to set the marker C = 1, the relocation can be carried out even during IO. The data will not be lost. If the marker before calling C = 0, buffer contents will not be copied to a new location.
{{{
xBIOS_RELOCATE_BUFFER
Change address I / O buffer. If before the call to set the marker C = 1, the relocation can be carried out even during I / O. The data will not be lost. If the marker before calling C = 0, buffer contents will not be copied to a new location.
At line 343 removed one line
}}}
At line 345 changed 5 lines
!xBIOS_GET_ENTRY
Gets another entry in the directory. The X register returns the index to the filename or folder (byte of buffer address is stored in the variable xBUFFERH). The accumulator is set with the status. The carry flag is set when the end of the directory is found.
{{{
xBIOS_GET_ENTRY
Gets another entry in the directory. In the registry X returns the index to the filename or folder (byte of buffer address is stored in the variable xBUFFERH) A registry is transmitted status byte entry. C is set to mark the end of the directory.
At line 351 removed one line
}}}
At line 353 changed 5 lines
!xBIOS_OPEN_DEFAULT_FILE
Opens the default file. The function does not search the directory, the file handle is derived from the variable 'Xfile'.
{{{
xBIOS_OPEN_DEFAULT_FILE
To open the default file. The function does not search the directory file handle is taken from the variable Xfile.
At line 359 removed one line
}}}
At line 361 changed 2 lines
!xBIOS_READ_SECTOR
xBIOS_READ_SECTOR
At line 366 removed 2 lines
{{{
At line 369 removed one line
}}}
At line 371 changed 5 lines
!xBIOS_FIND_ENTRY
This function allows you to find the specified directory entry. The X register returns the index to the filename or folder (byte of buffer address is stored in the variable xBUFFERH). The accumulator is the status byte. If an entry is not found, the carry flag is set.
{{{
xBIOS_FIND_ENTRY
Function allows you to find the specified directory entry. In the registry X returns the index to the filename or folder (byte of buffer address is stored in the variable xBUFFERH). A registry is transmitted status byte entry. Set marker C is an entry not found.
At line 379 removed one line
}}}
At line 381 changed 3 lines
!xBIOS_SET_BUFFER_SIZE
This feature allows you to set the buffer size for IO operations. Buffer Size is also stored in the variable xBUFSIZE in bytes format.
xBIOS_SET_BUFFER_SIZE
Feature allows you to set the buffer size for I / O operations. Buffer Size - byte - is also stored in the variable xBUFSIZE.
At line 385 removed 2 lines
{{{
At line 388 removed one line
}}}
At line 390 changed one line
!Counters During I/O
Counters During I/O
[ Please note that this example originates from xBios v3 ] [ FORMATTING requires cleanup ]
xIRQEN equ xBIOS+$3ea ; User IRQ (1 byte)
xSEGMENT equ xBIOS+$3f4 ; Bytes to go in binary file segment (2 bytes)
xNOTE equ xBIOS+$3f6 ; File pointer (3 bytes)
At line 392 changed 4 lines
{{{
xIRQEN equ xBIOS+$3ea ; User IRQ (1 byte)
xSEGMENT equ xBIOS+$3f4 ; Bytes to go in binary file segment (2 bytes)
xNOTE equ xBIOS+$3f6 ; File pointer (3 bytes)
PUPBT1 equ $033D ;power-up validation byte 1
At line 397 changed one line
PUPBT1 equ $033D ; Power-up validation byte 1
icl 'atarihw.ah'
At line 399 changed one line
icl 'atarihw.ah'
opt h+o+l+
At line 401 removed 2 lines
opt h+o+l+
At line 420 changed one line
jsr xBIOS_SET_DEFAULT_DEVICE ; SIO drive
jsr xBIOS_SET_DEFAULT_DEVICE ; SIO drive
At line 423 changed one line
jmp xBIOS_SET_RUNAD ; new runad vector
jmp xBIOS_SET_RUNAD ; new runad vector
At line 427 changed one line
.word run_adr ; RUN
.word run_adr ; RUN
At line 430 changed one line
.byte d'xxl' ; Let the RESET key work as a RESET key
.byte d'xxl' ; let the RESET key works as RESET key
At line 432 changed one line
org $0000
org $0000
At line 434 changed one line
run_adr lda #$74
run_adr lda #$74
At line 436 changed one line
_stop jmp _stop ; Endless loop
_stop jmp _stop ; endless loop
At line 446 changed one line
start sei
start sei
At line 462 changed one line
lda #$22
lda #$22
At line 464 changed one line
lda #$40
lda #$40
At line 466 changed one line
rts
rts
At line 468 changed 2 lines
MyNMI sta nmiA
sty nmiY
MyNMI sta nmiA
sty nmiY
At line 475 changed one line
At line 491 changed one line
endnmi lda #0
endnmi lda #0
At line 493 changed one line
ldy #0
ldy #0
At line 495 changed one line
rti
rti
At line 515 changed one line
org $0c00
org $0c00
At line 517 changed 2 lines
:$c300 .byte $ff
}}}
:$c300 .byte $ff
At line 521 removed one line
!Playing Music During I/O
At line 523 changed 2 lines
{{{
opt h+o+l+
Playing Music During I/O
[ Please note this example originates from xBios v3 ] [ Formatting requires cleanup ]
opt h+o+l+
At line 527 changed one line
.byte d'xxl' ; Let the RESET key work as a RESET key
.byte d'xxl' ; let the RESET key works as RESET key
At line 529 changed one line
org $c00
org $c00
At line 544 changed one line
jmp xBIOS_SET_DEFAULT_DEVICE ; SIO drive
jmp xBIOS_SET_DEFAULT_DEVICE ; SIO drive
At line 546 changed 2 lines
MyNMI sta vbisaveA+1
stx vbisaveX+1
MyNMI sta vbisaveA+1
stx vbisaveX+1
At line 549 changed one line
speed lda #0
speed lda #0
At line 551 changed 9 lines
loadpat ldx #0
lda pat,x
bmi pass
asl @
asl @
asl @
asl @
sta wp+1
pass inx
loadpat ldx #0
lda pat,x
bmi pass
asl @
asl @
asl @
asl @
sta wp+1
pass inx
At line 562 changed 9 lines
wp ldx #0
lda ins,x
sta audc1
lda frq,x
sta audf1
inc wp+1
dec speed+1
bpl pass2
lda #5
wp ldx #0
lda ins,x
sta audc1
lda frq,x
sta audf1
inc wp+1
dec speed+1
bpl pass2
lda #5
At line 572 changed 8 lines
wp1 lda #$20
sta pass2+1
eor #$60
sta wp1+1
pass2 ldx #0
lda ins,x
sta audc2
inc pass2+1
wp1 lda #$20
sta pass2+1
eor #$60
sta wp1+1
pass2 ldx #0
lda ins,x
sta audc2
inc pass2+1
At line 581 changed 3 lines
vbisaveA lda #0
vbisaveX ldx #0
rti
vbisaveA lda #0
vbisaveX ldx #0
rti
At line 585 changed 10 lines
ins .byte $0F,$AF,$AC,$A7,$A2,$00,$04,$A3
.byte $22,$21,$A1,$00,$00,$00,$00,$00
.byte $AF,$AF,$09,$07,$05,$04,$04,$03
.byte $03,$03,$02,$02,$02,$01,$01,$00
.byte $87,$84,$83,$82,$81,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $84,$84,$84,$84,$84,$84,$83,$83
.byte $83,$83,$82,$82,$81,$81,$00,$00
.byte $83,$82,$81,$81,$81,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
ins .byte $0F,$AF,$AC,$A7,$A2,$00,$04,$A3
.byte $22,$21,$A1,$00,$00,$00,$00,$00
.byte $AF,$AF,$09,$07,$05,$04,$04,$03
.byte $03,$03,$02,$02,$02,$01,$01,$00
.byte $87,$84,$83,$82,$81,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $84,$84,$84,$84,$84,$84,$83,$83
.byte $83,$83,$82,$82,$81,$81,$00,$00
.byte $83,$82,$81,$81,$81,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
At line 596 changed 8 lines
frq .byte $04,$C0,$D0,$E0,$F0,$00,$04,$C0
.byte $D0,$E0,$F0,$00,$00,$00,$00,$00
.byte $98,$A8,$03,$03,$03,$03,$03,$03
.byte $03,$03,$03,$03,$03,$03,$03,$03
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
frq .byte $04,$C0,$D0,$E0,$F0,$00,$04,$C0
.byte $D0,$E0,$F0,$00,$00,$00,$00,$00
.byte $98,$A8,$03,$03,$03,$03,$03,$03
.byte $03,$03,$03,$03,$03,$03,$03,$03
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
.byte $00,$00,$00,$00,$00,$00,$00,$00
At line 605 changed 8 lines
pat .byte $00,$80,$00,$80,$01,$80,$00,$00
.byte $80,$00,$00,$80,$01,$80,$03,$80
.byte $00,$80,$00,$80,$01,$80,$02,$02
.byte $00,$80,$01,$01,$80,$00,$03,$80
.byte $00,$80,$00,$80,$01,$80,$00,$00
.byte $80,$00,$00,$80,$01,$80,$03,$80
.byte $00,$00,$00,$80,$01,$00,$00,$80
.byte $00,$80,$01,$01,$80,$00,$01,$00
pat .byte $00,$80,$00,$80,$01,$80,$00,$00
.byte $80,$00,$00,$80,$01,$80,$03,$80
.byte $00,$80,$00,$80,$01,$80,$02,$02
.byte $00,$80,$01,$01,$80,$00,$03,$80
.byte $00,$80,$00,$80,$01,$80,$00,$00
.byte $80,$00,$00,$80,$01,$80,$03,$80
.byte $00,$00,$00,$80,$01,$00,$00,$80
.byte $00,$80,$01,$01,$80,$00,$01,$00
At line 617 changed 3 lines
:$C000 .byte $ff
org $D800
:$2700 .byte $ff
:$C000 .byte $ff
org $D800
:$2700 .byte $ff
At line 621 changed one line
run_adr lda #$74
run_adr lda #$74
At line 626 removed one line
}}}
At line 629 removed one line
!Indexed Data within File - LZ4 Graphics Decompression
At line 631 changed 6 lines
{{{
xFILE equ xBIOS+$3ec ; File handle
xDAUX3 equ xBIOS+$3f3 ; Buffer offset if AtariDOS FS
xDAUX2 equ xBIOS+$3fd ; Sector hi if AtariDOS FS
xDAUX1 equ xBIOS+$3fe ; Sector lo if AtariDOS FS
PUPBT1 equ $033D ; Power-up validation byte 1
Indexed Data within File - LZ4 Graphics De/compression
[ Please note this example originates from xBios v3 ] [ Formatting requires cleanup ]
xFILE equ xBIOS+$3ec ; file handle
xDAUX3 equ xBIOS+$3f3 ; buffer offset if AtariDOS FS
xDAUX2 equ xBIOS+$3fd ; sektor hi if AtariDOS FS
xDAUX1 equ xBIOS+$3fe ; sektor lo if AtariDOS FS
PUPBT1 equ $033D ;power-up validation byte 1
At line 643 changed one line
.byte d'xxl' ; Let the RESET key work as a RESET key
.byte d'xxl' ; let the RESET key works as RESET key
At line 709 removed one line
}}}
At line 711 changed one line
!Use of High Speed Devices
Use of High Speed Devices
When you first load xBIOS, you can complete a check to see if your disk drive is ultraspeed (see next example). If so, save a value to xHSPEED.
When loading data, copy the value of xHSPEED to xSPEED and use the following code:
At line 713 removed 3 lines
When you first load xBIOS, you can complete a check to see if your disk drive is ultraspeed (see next example). If so, save a value to xHSPEED. When loading data, copy the value of xHSPEED to xSPEED and use the following code:
{{{
At line 719 removed one line
}}}
At line 723 changed 3 lines
!Detecting High Speed Devices
Detecting High Speed Devices [ Needs clean-up ]
At line 727 removed 2 lines
{{{
At line 730 changed 3 lines
xBUFSIZE equ xBIOS+$3f1 ; Buffer size lo byte $100-SIZE (1 byte)
xDEVICE equ xBIOS+$3fc ; Device ID
xIOV equ xBIOS+$3ee ; I/O module entry (2 bytes)
xBUFSIZE equ xBIOS+$3f1 ; Buffer size lo byte $100-SIZE (1 byte)
xDEVICE equ xBIOS+$3fc ; Device ID
xIOV equ xBIOS+$3ee ; I/O module entry (2 bytes)
At line 735 changed 11 lines
start jsr xBIOS_SET_DEFAULT_DEVICE ; I want to use xB SIO I/O
lda #$100-$01 ; set buffer size
sta xBUFSIZE
lda #'1' ; AtariOS device '1' = DOS device D1:
sta xDEVICE ; you can use '2', '3' and so for D2: D3: ...
ldx #$3F ; set command GET HI SPEED FROM DRIVE
jsr xBSIO
bcs DRIVE_HAS_NO_HIGH_SPEED_FUNCTIONS
lda $7ff ; get HiSpeedIndex byte from buffer
; (xBUFSIZE = lo byte,xBUFFERH = hi byte)
}}}
start jsr xBIOS_SET_DEFAULT_DEVICE ; I want to use xB SIO I/O
lda #$100-$01 ; set buffer size
sta xBUFSIZE
lda #'1' ; AtariOS device '1' = DOS device D1:
sta xDEVICE ; you can use '2', '3' and so for D2: D3: ...
ldx #$3F ; set command GET HI SPEED FROM DRIVE
jsr xBSIO
bcs DRIVE_HAS_NO_HIGH_SPEED_FUNCTIONS
lda $7ff ; get HiSpeedIndex byte from buffer
; (xBUFSIZE = lo byte,xBUFFERH = hi byte)
At line 748 changed 3 lines
!Using Alternative Disk Drives
Using Alternative Disk Drives
At line 752 removed 2 lines
{{{
At line 756 changed one line
lda #2 ; Use disk drive number 2
lda #2 ; Use disk drive number 2
At line 758 removed one line
}}}
At line 760 changed 12 lines
!Checking if Alternative Disk Drives Exist
Apply this code to check if a particular disk drive exists (1-8).
{{{
lda #device_number
sta xDEVICE
jsr status
}}}
!Varying Directory Sizes
Varying Directory Sizes [ - Needs checking and cleaning up - ]
At line 774 removed one line
At line 776 changed 5 lines
{{{
.byte status ; Byte 1
.word size ; - in standard directories always $08 ; Bytes 2 and 3
.word first_sector ; Bytes 4 and 5
.byte status ; Byte 1
.word size; - in standard directories always $08 ; Bytes 2 and 3
.word first_sector ; Bytes 4 and 5
At line 782 removed one line
}}}
At line 788 changed 3 lines
!!xBOOT
xBOOT
At line 792 changed one line
Simply download xBOOT from [http://xxl.atari.pl] and add it to your disk using an external tool such as ‘franny’. Name the first file to load ‘AUTORUN’. This will auto-load.
Simply download xBOOT from http://xxl.atari.pl and add it to your disk using an external tool such as ‘franny’. Name the first file to load ‘AUTORUN’. This will auto-load.
At line 794 removed 2 lines
{{{
At line 803 removed 11 lines
}}}
xBOOT uses 384 bytes at $480 and $f9-$ff in page zero.
------
{{{
Original document from Steve Nicklin (snicklin at AtariAge).
Imported into AtariWiki (23/01/2016) to allow peer feedback and improvement.
}}}