Latok -- It’s been a while…
aoineko, that’s weird — I just tested in openMSX with a hand made boot sector code that searches for MSXDOS.??? with SFIRST instead of trying to open MSXDOS.SYS directly with FOPEN and it worked just fine and returned an FCB with MSXDOS.SYS. Would be nice if openMSX-debugger had an assembler in addition to the disassembler btw XD Already had to spend an hour or two compiling it (and Qt5) for my Mac since there is no prebuilt binary and then editing a disk boot sector with hex editor to write code feels a bit hardcore
Ok, maybe I have a problem that I can't see when I'm running my program with MSX-DOS.
I'm going to recheck all this.
By the way, I have disassembled the code of the MSX-DOS 1 boot sector.
The assembly code can be found here: https://github.com/aoineko-fr/MSXgl/blob/main/engine/doc/boo...
There is not much special except the value of the registers A, HL and DE which have a significant value (which I don't understand) at the time the boot sector code is executed as 0xC0E1 with CF set to 1.
There are also things happening after MSXDOS.SYS runs but I lack the context to understand what they are.
I thought about modifying msxtar to generate DSKs with my own startup code for MSXgl.
From msxsyssrc, file disk100\disk.mac:
A5ADB: LD HL,YF323 ; address diskerror handler pointer LD DE,XF368 ; ENAKRN routine LD A,(YF340) ; coldboot flag JP YC000+01EH ; start bootloader
Thanks for the information.
I'm going to ignore these parameters since I just want to boot on an application and I don't plan to allow to come back to MSX-DOS afterwards (if the user return from the main()
function, I'll make a call to 0x0000 to reboot the MSX).