Tschibo00 Posted June 4, 2014 Share Posted June 4, 2014 Long time no see! For some while I've been trying to recreate, what is standard on C64: Demos, which can load data while running and while playing music. Now I've found XBIOS, which could provide a solution (and I think, others are thinking in the same direction). So what I want to do is, a one file XEX which uses XBIOS internally to load and decompress stuff at runtime. My idea is as follows: - XBIOS is the first segment - My loader is the second segment - After loading those two, XBIOS is initialized (e.g. by calling $2600 in the standard library) - My loader then uses xBIOS_LOAD_DATA to load additional data from the same file Now some problems arose: - JSR to the XBIOS init failed (i.e. it's not coming back), not sure why - I'm not sure how to access the correct file from my loader. Is there any way to retrieve the currently loaded filename, so I can access other segments of it? The data segments would be appended at the end of the file with a proprietary catalog, which would be used by my loader to determine the position and length of data segments. Would this be possible? And if so, how would I do this? Thanks a lot, Hopper/SquoQuo Quote Link to comment Share on other sites More sharing options...
Creature XL Posted June 4, 2014 Share Posted June 4, 2014 I am myself new to XBIOS (as can be read in various posts), so I can not help you directly. But you can be sure that xxl will come soon Are you aware that you need to make a boot disk (ATR)? Just prepanding xbios before your XEX is not working as I was informed. What I do in my Makefile: atr: all cp tools/xbios/XBIOS.COM $(ATR_DIR)/ cp $(XEX) $(ATR_DIR)/xautorun $(DIR2ATR) -B tools/xbios/xboot128.obx $(ATR) $(ATR_DIR) xboot128.obx are the (3) boot sectors which load the XBIOS.COM which in turn loads your program if it is named "xautorun". Quote Link to comment Share on other sites More sharing options...
Tschibo00 Posted June 4, 2014 Author Share Posted June 4, 2014 Creating an ATR is no problem, what I'm specifically trying is to avoid ATR and go for a XEX. Theoretically I don't see that much of a problem in doing so, however XBIOS must load, return and I must have access to the correct file. Or maybe I'm missing something completely here? From what I understand, Heaven/TQA is already trying to accomplish something similar, right? Quote Link to comment Share on other sites More sharing options...
Creature XL Posted June 4, 2014 Share Posted June 4, 2014 (edited) No it is not possible to my knowledge. I wanted to do the same thing as you. But the master himself (xxl) told me it isn't possible. Because XBIOS needs to know a bit about the disk geometry (sector size maybe). And when you have an XEX you could (theoretically) put it on any formated disk or even on no disk at all (SD2SIO devices). However, IFF it is indeed possible and I just understood XXL wrong then I am happy as hell EDIT: typo Edited June 4, 2014 by Creature XL Quote Link to comment Share on other sites More sharing options...
Tschibo00 Posted June 4, 2014 Author Share Posted June 4, 2014 Hm, that would explain, why the XBIOS init crashes midway. So basically I'm back to modifying the Atari OS myself or using XBIOS and creating an ATR... Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 4, 2014 Share Posted June 4, 2014 (edited) later tonight I can post the Arsantica final xBios loader with sound/msx. the 3 parts of Arsantica are basicly XEX files on an ATR with xBIOS. Edited June 4, 2014 by Heaven/TQA Quote Link to comment Share on other sites More sharing options...
xxl Posted June 4, 2014 Share Posted June 4, 2014 (edited) firstly you need to use the xB v3 (on page is old xB). if you want to play music while I / O then I propose to accept that it can be loaded with the SIO connection - standard for atari (any external device with SIO, eg. SIO2SD etc. also with turbo) do not need a bootable disk - it can be regular dos disk, you can load the xB with DOS, but it is more convenient if the disk will automatically start xB... xB looks like this: 001: $2400 $241B: $001C 002: $241B $264A: $0230 003: $2000 $23FF: $0400 004: $02E0 $02E1: $0002 RUN $2473 005: $2648 $2832: $01EB 006: $03C0 $03E7: $0028 001: $2400 $241B: $001C org $2400 .byte c'XAUTORUN ' ; autorun filename .byte >$0800 ; xBIOS location .byte >$0700 ; buffer adr .word $2e2 ; INITAD .word $2e0 ; RUNAD .word AOSV ; I/O module .word AOSV_RELOC ; reloc var for I/O .byte $ff ; PORTB .byte $40 ; NMIEN .byte $c0 ; IRQEN .word xSIOV ; DEFAULT xB I/O module .byte { RTS } ; dummy RTS so, you can define: autorun filename, xB location - yes, wherever you want, even RAM under ROM - xB has binary relocator buffer address - the same - wherever init/run location I/O module - yes, you can use your own or AtariOS (AOSV) portb/nmi/irqen value at starting library xSIOV is default xB I/O module for SIO devices so... you can define it e.g as: .byte c'MYFILE ' .byte >$D800 ; xBIOS base $D800 .byte >$0000 ; buffer on page zero (xB do not uses page zero) .word $0100 ; INITAD on stack .word $FFFC ; RUNAD under reset vector .word xSIOV ; xSIOV SIO DRIVES .word dummy_rts .byte $fe ; ROM OFF .byte $00 ; NMI OFF .byte $00 ; IRQ OFF .word xSIOV ; dummy dummy_rts .byte { RTS } ; dummy and your program could be loaded with ROM off... 005: $2648 $2832: $01EB it is "menu". if autorun file present on disk you can cut it from xB 006: $03C0 $03E7: $0028 AtariOS I/O module... yes $28 bytes . if you use default xB SIO module then you can cut it from xB 002: $241B $264A: $0230 configurator/relocator so if you have an autorun file and proper header, your xB may look like this: 001: $2400 $241B: $001C 002: $241B $264A: $0230 003: $2000 $23FF: $0400 004: $02E0 $02E1: $0002 RUN $2473 if you will use own music player instead of the Delta Music Composer Player by Konop, do not forget writing value to AUDCTL and xAUDCTL read this: http://atariage.com/forums/topic/223388-game-design-thinktank-retrogaming/page-4?do=findComment&comment=3001368 and remember, BINARY_LOAD works in any point in file, so you can do xBIOS_LOAD_DATA an then back to xBIOS_LOAD_BINARY_FILE. if you want use music during I/O. the easiest way do not change the header, perform jsr xBIOS_SET_DEFAULT_DEVICE at first ini and go :-) --- if you want open file which been loaded by xB use xBIOS_OPEN_DEFAULT_FILE - no need filename. test.atr xboot128.obx xboot256.obx xbios.obx Edited June 4, 2014 by xxl 1 Quote Link to comment Share on other sites More sharing options...
Tschibo00 Posted June 5, 2014 Author Share Posted June 5, 2014 (edited) If I understand you correctly, you're proposing to create an ATR (or use the two files-method). As said, this would be no problem, but thanks for the support! Currently I'm trying a different approach: My demo framework already copies OS to RAM, therefore it's rather easy to locate and modify the parts of the OS responsible for corrupting audio channels 1+2. This is already working flawlessly. However the question of compatibility remains. How many modifications are out there, which override/replace the Atari OS with something else (therefore breaking my approach) - like SpartaDos X? Edited June 5, 2014 by Tschibo00 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted June 5, 2014 Share Posted June 5, 2014 (edited) >However the question of compatibility remains. There are dozens of different OS ROM versions like QMEG OS, HISIO etc., so I'd really not recomend that. The question is what you really accept as limitation: a) plain XEX that can run from any type of I/O device (SIDE/Cart, ....)This is the most compatible format.Here you cannot assume anything about the I/O, if any how many POKEY channels are used etc.The only contract is the DOS loading behaviour, LOMEM and RUNADR/INIADR. b) XEX that assumes to be running from a DISK (like) device using SIO.This is the 2nd best option.The best is to have a real own SIO routine. Otherwise you cannot control speed/timing etc.But that is essential because with high speed SIO divisor you wont have time for anything but I/O. The only contract are the SIO protocol and the device ID. c) Boot ATR Compatible with less devices. Basically like b), but also gives you control over sector size, which might be required etc. I actually would nowadays rather stick to loading the stuff with high speed from any device into the RAM first and play it from there than investing in limited things you can do while loading, making the loading process even longer. But of course I also understand that every limit needs someone to fight it - that's what demos are about :-) Note: For b) and c) XBIOS is probably the best from what I saw in it's code, but I haven't used it so far. Edited June 5, 2014 by JAC! Quote Link to comment Share on other sites More sharing options...
xxl Posted June 5, 2014 Share Posted June 5, 2014 how I/O music works with xB: xBIOS equ $0800 xIRQEN equ xBIOS+$3e8 xBIOS_SET_DEFAULT_DEVICE equ xBIOS+$2A xBIOS_LOAD_BINARY_FILE equ xBIOS+$30 DLP_PLAYER_ZPG_VARS equ $e0 DLP_PLAYER_ADDRESS equ $78d4 ; do 7c80 DLP_ADDRESS equ $7000 ;AUDCTL_SUPPORT equ 1 ;XBIOS_AUDCTL_SUPPORT equ 1 DLP_INIT equ DLP_PLAYER_ADDRESS+$80 DLP_PLAY equ DLP_PLAYER_ADDRESS+$83 icl 'atarihw.ah' opt h- ; xB can load binary file without "FFFF" ID org [a(start,start+(stop-start)-1)],$0c00 start sei lda #0 sta nmien sta irqen sta dmactl sta xIRQEN lda #$fe sta portb ; continue load with ROM off jmp xBIOS_SET_DEFAULT_DEVICE stop opt h+ ini start org $7000 ins 'dciomusic.dat' org $0000 ; direct load to ZP IONMI sta zpa stx zpx sty zpy jsr DLP_PLAY lda #0 zpa equ *-1 ldx #0 zpx equ *-1 ldy #0 zpy equ *-1 rti playmusic lda <IONMI sta $fffa lda >IONMI sta $fffb jsr DLP_INIT lda #$40 sta nmien rts ini playmusic org $c000 ; direct load under OS :$1000 .byte $ff org $d800 ; direct load under OS :$2700 .byte $ff koniec lda random sta colbak jmp koniec run koniec test.atr 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 6, 2014 Share Posted June 6, 2014 Jac... go RETRO... loading from ATR is the best solution. bought 5,25 Quote Link to comment Share on other sites More sharing options...
xxl Posted June 6, 2014 Share Posted June 6, 2014 real Retro means .CAS format, noFS DISK and .CAR ;D Quote Link to comment Share on other sites More sharing options...
+JAC! Posted June 7, 2014 Share Posted June 7, 2014 (edited) >Jac... go RETRO... loading from ATR is the best solutio Just got a box full of C64 Orgininal (! they exist !) disks, so maybe I can format them :-) Edited June 7, 2014 by JAC! Quote Link to comment Share on other sites More sharing options...
+skr Posted June 26, 2014 Share Posted June 26, 2014 Punchcards! Quote Link to comment Share on other sites More sharing options...
xxl Posted June 27, 2014 Share Posted June 27, 2014 full version of xBIOS v3 is out: http://xxl.atari.pl/?p=1076 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 28, 2014 Share Posted June 28, 2014 Thanks Quote Link to comment Share on other sites More sharing options...
twh/f2 Posted July 14, 2014 Share Posted July 14, 2014 Have a look on this: Bad Apple 64 http://www.pouet.net/prod.php?which=63649 I wonder where the limits are with XBios. Except for the sound (if I'm right Pokey is limited to just 2 voices while Disk I/O) it could look quite similiar? greets, twh 2 Quote Link to comment Share on other sites More sharing options...
Xuel Posted July 14, 2014 Share Posted July 14, 2014 Have a look on this: Bad Apple 64 http://www.pouet.net/prod.php?which=63649 I wonder where the limits are with XBios. Except for the sound (if I'm right Pokey is limited to just 2 voices while Disk I/O) it could look quite similiar? greets, twh I would love to see a port of this to A8. 1 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted July 14, 2014 Share Posted July 14, 2014 (edited) [delted] Edited July 14, 2014 by JAC! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.