MSX boot

Page 2/4
1 | | 3 | 4

By msd

Paragon (1472)

msd's picture

22-11-2005, 14:18

http://map.tni.nl/ would be a good place

By HansO

Paladin (672)

HansO's picture

22-11-2005, 19:08

I have spent quite a bit of time in disassembling the various MSX roms. I am looking for a method to publish the assembly source somewhere on the internet. So everone can look at the code, and may be create a custom version of the dos kernel. But I am not sure if publishing is legal (because of the copyrights).
At the moment I am busy modifing the kernel 2.31 to support FAT16 (so no need to patch the kernel with FAT16.COM), but other modification are possible with my source at hand.
Like to hear your reactions...

I already have a nice collection of sources of diskroms on my site. And store the files on funet. So if I can help let me know.

By AuroraMSX

Paragon (1902)

AuroraMSX's picture

22-11-2005, 20:21

Hm, I've got a few questions here:

Actually the MSX boot is a bit more complicated with a disksystem (assuming DiskBasic 1.0 here):
[...]
- The bootsector just read, is check for a MSDOS2.x header (e.g. &HE9 or &HEB at offset 0). If this is not found, Diskbasic is started.

In the first line you mention DiskBasic 1.0, but the rest of the description says "MSXDOS2.x". I can't imagine DiskBasic 1.0 checking for DOS2 :-)
[...]
- disksystem next tries to read sector 0 of drive 0 ( A: ) at &HC000. If this fails Diskbasic is started.

Weird. The disk system already did read sector 0 (see above); why should it fail here?
- The bootsector just read, is check for a MSDOS2.x header (e.g. &HE9 or &HEB at offset 0). If this is not found, Diskbasic is started.
[...]

And again?!

By AuroraMSX

Paragon (1902)

AuroraMSX's picture

22-11-2005, 20:23

Hm, I've got a few questions here:


- The bootsector just read, is check for a MSDOS2.x header (e.g. &HE9 or &HEB at offset 0). If this is not found, Diskbasic is started.

In the first line you mention DiskBasic 1.0, but the rest of the description says "MSXDOS2.x". I can't imagine DiskBasic 1.0 checking for DOS2 :-)
Ah, /me slaps self with aehm... nevah mind :-)

MS-DOS2, not MSX-DOS

By zeilemaker54

Champion (338)

zeilemaker54's picture

22-11-2005, 22:18

In the first line you mention DiskBasic 1.0, but the rest of the description says "MSXDOS2.x". I can't imagine DiskBasic 1.0 checking for DOS2 :-)

As you later mentioned, this is MS-DOS 2.x. In MS-DOS2.x the BPB (Bios Parameter Block) was introduced in the bootsector. This contains all kinds of diskparameters. It is located at offset &H3 and ends at offset &H1D (later versions of MS-DOS use a bigger version of the BPB). The presents of a BPB is indicated by either a &HE9 or &HEB at offset 0 (this is a Intel 8086 JMP instruction!). That is why the MSX bootloader start at offset &H1E, just behind the BPB!!!
Wierd thing about the diskkernel 1.00 and most diskdrivers is, that they do not use the BPB. They are using the mediadescriptorbyte which is read from sector 1 offset 0. But this methode is mentioned in the MSX technical data book, so all manufactures use it.
I have rewritten my Sony HB-F700P diskdriver to use the BPB if it is present and works fine too.

Weird. The disk system already did read sector 0 (see above); why should it fail here?

At first glance this is a complete waste, but the second read of the bootsector is part of a routine which tries to start MSX-DOS. This is not only called at boottime, but also when a CALL SYSTEM is invoked. Lazy programmer LOL!

By pp

Rookie (27)

pp's picture

23-11-2005, 07:41

What did you use to disassemble the ROM's ? DISASS ? Did you see any bios calls in the code ?

I need this for a little project.

pp

By pp

Rookie (27)

pp's picture

23-11-2005, 07:49

Question for the real MSX addicts:

What is the first Z80 instruction processed when you switch on your MSX ?

pp

By AuroraMSX

Paragon (1902)

AuroraMSX's picture

23-11-2005, 09:51

Weird. The disk system already did read sector 0 (see above); why should it fail here?

At first glance this is a complete waste, but the second read of the bootsector is part of a routine which tries to start MSX-DOS. This is not only called at boottime, but also when a CALL SYSTEM is invoked. Lazy programmer LOL!

Aah, does that imply that if I'm in DiskBASIC, insert a disk containing MSXDOS, and do

POKE &hF346,1:_SYSTEM

this is the exact point where the MSX-DOS initialization procedure begins?

By NYYRIKKI

Enlighted (5917)

NYYRIKKI's picture

23-11-2005, 12:16

Question for the real MSX addicts:
What is the first Z80 instruction processed when you switch on your MSX ?

It is instruction in address 0 in slot 0-0... DI, IIRC.

By zeilemaker54

Champion (338)

zeilemaker54's picture

23-11-2005, 14:27

What did you use to disassemble the ROM's ? DISASS ? Did you see any bios calls in the code ?

I need this for a little project.

pp

I use Z80DIS 2.2 by Kenneth Gielow. It is a CP/M program, so no MSX specific labels are used. I myself replace labels with the MSX-BIOS call labels. To modify the output from Z80DIS in useable source is taking the most time for sure.
You can specify area´s of code, text, bytes, word etc. It is really a nice program to use!

Page 2/4
1 | | 3 | 4