Boot from disk

صفحة 2/2
1 |

بواسطة jr

Champion (379)

صورة jr

13-01-2023, 19:43

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 Tongue

بواسطة aoineko

Paladin (899)

صورة aoineko

13-01-2023, 22:09

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:

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.

بواسطة Briqunullus

Hero (646)

صورة Briqunullus

13-01-2023, 22:51

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

بواسطة aoineko

Paladin (899)

صورة aoineko

14-01-2023, 12:21

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).

صفحة 2/2
1 |