Jump to content
IGNORED

xBIOS 4.3 English documentation


snicklin

Recommended Posts

One idea: why not putting the content to the AtariWiki instead of publishing various PDF versions?

 

I fully intend to start putting the information onto the AtariWiki in time.

 

The history of the document is that it started off as a document on my Google Docs account that I could update whenever and wherever I find any code that I could update the document with. It started off as a document for me to understand xBIOS and once I had enough examples I thought that I could distribute it, as long as people realise that I know it's not the finished document.

 

A couple of weeks ago I considered putting it onto the AtariWiki but it will need some reformatting and it already needs a load of reformatting.

 

Unless anyone wants to put it up there for me?? :)

 

p.s. I love AtariWiki.

Link to comment
Share on other sites

yeah... XXL, make a IRQ loader version (separate xbios version) which leave the CPU free for code while loading parallel.

 

Imho compared to C64 scene A8 scene lacks of "custom" loaders for games/demos. (yeah I know there are several devices like sio2sd and hispeed yes or no etc)...

 

but could be also interesting for games:

 

stream map data like in 7cities of Gold... play music/grafics like Rescue on Fractalus Intro. etc etc etc.

Edited by Heaven/TQA
Link to comment
Share on other sites

HI Snicklin!

 

thanks very much for your work. It helped me finally to understand XBios and the framework behind it!

One idea: why not putting the content to the AtariWiki instead of publishing various PDF versions?

 

https://atariwiki.org

 

greetings

twh

 

You'll all be pleased to know that I've got the document onto AtariWiki here:

https://atariwiki.org/wiki/Wiki.jsp?page=XBIOS

 

If anyone wants to edit the document, create an account and then follow the process to get edit permissions.

 

Please note that some of the Google translations haven't been cleaned up into real English yet and that it isn't a finished document, but documents are never finished when they're on wiki's!

 

The code needs some reformatting as it's come out strangely after several rounds of copying and pasting. If you understand the code and think that it could do with a bit of documentation to explain to others how it works, please add some text before/after/in the code.

 

Krzysztof, can you add a link to the page from your website? I'll now add an update mentioning the xBIOS.cfg file as you mentioned in a PM.

  • Like 3
Link to comment
Share on other sites

OK, I've added a mention of the .cfg file in. As I've not used it myself, perhaps someone could add a comment on how to use the file. Do you just link it in with your PC based tool into your project or is it a file in the .atr disk?

 

I now declare my PDF document obsolete.

Link to comment
Share on other sites

your loading example... how would you handle 2 frame fx?

and still waiting for the source code of that above example ;)

 

not because its partly not my code.
VBI can be programmed to perform extended parts of the code that does take a specified amount of time.

 

 

You'll all be pleased to know that I've got the document onto AtariWiki here:

https://atariwiki.org/wiki/Wiki.jsp?page=XBIOS

 

Krzysztof, can you add a link to the page from your website?

 

done and thanks :-)
Link to comment
Share on other sites

done and thanks :-)

 

 

Thank you!

 

Is there any way that xBIOS can detect how many disk drives exist? I can see that you can access more than 1 drive, but if drive 2 isn't connected, this won't be of much use.

 

Or do you need to try and write a byte to disk 2 to see if it exists?

Link to comment
Share on other sites

 

Do a $53 Status $302 DCOMND on $301 DUNIT. Does xBIOS support that?

 

you can use Status command without using AtariOS: use xBSIO isted of SIOINI:
xBSIO jmp (xIOV)
lets use Status command for drive:
jsr xBIOS_SET_DEFAULT_DEVICE ; default xB SIO
lda #$100-$04 ; set buffer size to 4
sta xBUFSIZE
ldx #$53 ; 'S' - status
jsr xBSIO
we want see what is the sector size:
lda $07fc ; buffer adress: xBUFFERH and xBUFSIZE
and #%00100000 ; 1=Double 0=Single
beq _jestS
asl @
asl @
_jestS eor #$80 ; $80 - S; $00 - D
and now lets configure xB FS to use 128/256 sectors in drive:
jsr xBIOS_SET_BUFFER_SIZE
  • Like 1
Link to comment
Share on other sites

Is there any way that xBIOS can detect how many disk drives exist? I can see that you can access more than 1 drive, but if drive 2 isn't connected, this won't be of much use.

 

lda #device_number

sta xDEVICE

jsr status

Link to comment
Share on other sites

Still error in the documentation which I pointed out earlier. The part "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’." is wrong. First, there is no $xxxx so the sentence is pointless and second, you can't simply change the value of 'xBIOS'. As I said several times, you have to change xBIOS.com binary header too or use xBIOS.CFG file with the same address in header as in your equ xBIOS.

Link to comment
Share on other sites

Still error in the documentation which I pointed out earlier. The part "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’." is wrong. First, there is no $xxxx so the sentence is pointless and second, you can't simply change the value of 'xBIOS'. As I said several times, you have to change xBIOS.com binary header too or use xBIOS.CFG file with the same address in header as in your equ xBIOS.

 

I've updated the $xxxx text as you are right, this didn't make snse.

 

As for the other stuff, I've updated this in the document too. I thought that XXL was contradicting what you were saying, sometimes it's a bit hard to tell what is being said. As I've not played around with the config file, it's not an area that I am yet comfortable in.

 

Anyway, doesn't matter, if there's any more errors, feel free to update the document, it's not my baby anymore.

Link to comment
Share on other sites

  • 1 month later...

@xxl

 

if I call xboot_load_file $5f1.... what ZPs need to be set? $FA...??? as out of a demo when setting back everything to OS I am loading xboot again to $0480-$5ff and try to load a file but somehow it fails as the directory content is loaded to $0580.... so it breaks the loader?

 

 

demo_exit
lda $d40b
bne demo_exit
load_next_part
lda #0
sta $d20f
:8 sta $d200+#
lda #3
sta $d20f 
;exit into OS
lda #0
sta $d40e
sta $d400
sta 559
lda #$ff ;roms on
sta $d301
lda #$40
sta $d40e
;C598: A9 01     LC598   LDA #$01
;C59A: 8D 01 03          STA DUNIT    [$0301]
;C59D: A9 53             LDA #$53
;C59F: 8D 02 03          STA DCOMND   [$0302]
;C5A2: 20 53 E4          JSR DSKINV   [$E453] = $4C
lda #1
sta $0301
lda #$53
sta $0302
jsr $e453
bmi diskerror
;load 3 sectors to $0480,$500,$580
        lda #$52
        sta $0302
        LDA #$00
        STA $030B
        LDA #$01
        STA $030A
        LDA #$80
        STA $0304
        LDA #$04
        STA $0305
        jsr $e453
        bmi diskerror
        inc $030a
        LDA #$00
        STA $0304
        LDA #$05
        STA $0305
        jsr $e453
        bmi diskerror
        inc $030a
        LDA #$80
        STA $0304
        LDA #$05
        STA $0305
        jsr $e453
        bmi diskerror
        LDA #$00
        STA $0304
        LDA #$07
        STA $0305
  
;xboot loaded 
ldy #<fname
ldx #>fname
jmp xBOOT_LOAD_FILE
fname  .byte c'DESIRE1 DAT'
diskerror
lda 53770
sta $d01a
jmp diskerror 
Edited by Heaven/TQA
Link to comment
Share on other sites

 

@xxl

 

if I call xboot_load_file $5f1.... what ZPs need to be set? $FA...??? as out of a demo when setting back everything to OS I am loading xboot again to $0480-$5ff and try to load a file but somehow it fails as the directory content is loaded to $0580.... so it breaks the loader?

demo_exit
lda $d40b
bne demo_exit
load_next_part
lda #0
sta $d20f
:8 sta $d200+#
lda #3
sta $d20f 
;exit into OS
lda #0
sta $d40e
sta $d400
sta 559
lda #$ff ;roms on
sta $d301
lda #$40
sta $d40e
;C598: A9 01     LC598   LDA #$01
;C59A: 8D 01 03          STA DUNIT    [$0301]
;C59D: A9 53             LDA #$53
;C59F: 8D 02 03          STA DCOMND   [$0302]
;C5A2: 20 53 E4          JSR DSKINV   [$E453] = $4C
lda #1
sta $0301
lda #$53
sta $0302
jsr $e453
bmi diskerror
;load 3 sectors to $0480,$500,$580
        lda #$52
        sta $0302
        LDA #$00
        STA $030B
        LDA #$01
        STA $030A
        LDA #$80
        STA $0304
        LDA #$04
        STA $0305
        jsr $e453
        bmi diskerror
        inc $030a
        LDA #$00
        STA $0304
        LDA #$05
        STA $0305
        jsr $e453
        bmi diskerror
        inc $030a
        LDA #$80
        STA $0304
        LDA #$05
        STA $0305
        jsr $e453
        bmi diskerror
        LDA #$00
        STA $0304
        LDA #$07
        STA $0305
  
;xboot loaded 
ldy #<fname
ldx #>fname
jmp xBOOT_LOAD_FILE
fname  .byte c'DESIRE1 DAT'
diskerror
lda 53770
sta $d01a
jmp diskerror 

ok....

 

solved it with this patch:

 

 

;xboot loaded, patch 
ldx #10
@
lda fname,x
sta $05db,x
dex
bpl @-
jmp $0486
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...