duplicated again :S
Um, first part seems OK, (maybe it also needs a $C9 at #0xFEDE) but at game_entry_point you need more code. This is how Perfect Fit (ROM cartridge) does it, to load and save levels from/to disk.
; game_entry_point
entry: di
ld b,5 ; delete hook
ld a,$C9
ld hl,HSTKE ; FEDA
delhook: ld (hl),a
inc hl
djnz delhook
; Check if disk found
ld a,($FFA7) ; checks if there is any diskrom (HPHYD)
cp $C9
jr z,return
; comprueba version de DOS y guarda
ld c,_DOSVER_
call _BDOS_ ; Send DOSVER command to dos
ld a,b
inc a
ld (DOSFOUND),a ; Save dos version
call InitDskError ; Initialices Disk Error routines (mail me if you need them)
jp Game
return: xor a
ld (DOSFOUND),a
jp Game
The code was made using the tutorial made by Ramones. He made all the hard work of studying the DiskRoms and so!
Hell, how do you align the stupid code?
Hi MsxKun,
Many thank!
Can you please give me the definition of following symbols:
- DOSVER_
- _BDOS_
- DOSFOUND
And yes, I'm interest by the InitDskError. Even if, in fact, I just want to know if disk is available or not to enable/disable the option for loading track from file.
Ah well, DOSVER and BDOS are the usual DOS adresses. I always have them _LABEL_ on my code, cause this way my editor paints them in green 
_BDOS_: equ $F37D ; BDOS Disk Basic - Input: C function num
_DOSVER_: equ $6F ; outputs DOS version
DOSFOUND is a variable in RAM, so you can save it and check whenever you want. Put it wherever you want 
As for Disk Error initializations, better mail me. This way i can send you the complete Ramones example. I think he put it on BeholderBBS ? Cause it seems I can't find it at Karoshi's forum..
I'm a little bit confuse with usage of the word "DOS".
For me DOS is an operating system, you know, the good old a:\> prompt.
What is the relation between DOS and the access to files from cartridge game?
DiskROM include code used by DOS and Basic, that's it?
Well , DOS is MSX-DOS. But yes.. what I meant is BIOS DOS (BDOS) routines, as both Msx Disk Basic and MSX-DOS use the same BIOS routines to access disk.
So yep, you're right
I can't found your e-mail...
I can't found your e-mail...
Well, its kinda easy if you type msx_forever followed by the very famous snail @ and then you add yahoo.es
Anyone know a good doc about DiskROM available on the net?
