MSX boot (General discussion MSX Fora)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 47 gasten en 3 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

General discussion - MSX boot

Ga naar pagina ( 1 | 2 | 3 Volgende pagina )
Schrijver

MSX boot

pp
msx novice
Berichten: 27
Geplaatst: 22 November 2005, 06:56   
Hi,

What I dont understand is how the booting of an MSX works.

If you have no disc or cartdridge installed, it just boots from basic rom.
But what if you put in a cartridge, does this go before a disc, or is the disc first ? Which mechanism controls this ?

Even so, the MSX title screen. Where does it come from ? The bios/basic rom ?

Does anyone know this ?

Regards,

PP
[D-Tail]

msx guru
Berichten: 3017
Geplaatst: 22 November 2005, 07:22   
Cartridge comes first. The logo is controlled by the BIOS ROM. It will initialise your MSX during that sequence. After checking for cartridges and none are found, the disk will be accessed for availability of MSXDOS (and start it when it was found) or AUTOEXEC.BAS (and start it when it was found). All other cases will cause your MSX to boot in BASIC. All this is controlled by the BIOS ROM.
pp
msx novice
Berichten: 27
Geplaatst: 22 November 2005, 07:30   
Thanks,

Do you also know whether a cartridge, for example a Konami one, uses the bios routines as well ? Or will the cartridge swap out the bios page ?

Regards,

pp
msd
msx professional
Berichten: 612
Geplaatst: 22 November 2005, 08:33   
A cartridge can use the bios and will probably do that on some point in the code.
HansO
msx addict
Berichten: 375
Geplaatst: 22 November 2005, 08:53   
Quote:

Hi,

What I dont understand is how the booting of an MSX works.

If you have no disc or cartdridge installed, it just boots from basic rom.
But what if you put in a cartridge, does this go before a disc, or is the disc first ? Which mechanism controls this ?

Even so, the MSX title screen. Where does it come from ? The bios/basic rom ?

Does anyone know this ?

Regards,

PP



How MSX starts up can be read from the MSX BIOS listing, see my website for the MSX 1 startup code. MSX 2 is not much different (long live standards!), just a bit more work like memory mapper inititializing.

After setting up the various MSX ICs like the VDP and the PPI and filling in BIOS workspace like the BIOS hooks and displaying the MSX logo, the slots are examined for presence of cartridges with ROMs. If a ROM is found and, depending on the signature in the first bytes of the ROM and init code present (e.g. basic extensions), the cartridge can take over and do whatever the programmer wants. E.g. a game can not give back control to the MSX BIOS, a floppy disk cartridge will give control back to the MSX BIOS ROM to let it start Basic.
The disk cartridge is just a standard catrdige, taking care of booting either from floppy etc. and filling in the various MSX Disk Basic hooks.


zeilemaker54
msx lover
Berichten: 97
Geplaatst: 22 November 2005, 09:39   
Actually the MSX boot is a bit more complicated with a disksystem (assuming DiskBasic 1.0 here):

- A MSX cartridge (eg ROM) can patch the H.STKE to take control of the disksystem. In this case, as soon as the initialization of the disksystem is ready, control is passed to the basic interpreter (so no basic roms, bootsectors to take control), and at a certain point H.STKE is called, and control is back to the cartridge. This is used by ROM games, which use the disksystem.
-If H.STKE was not patched, the disksystem search for a MSX cartridge (eg ROM) with a BASIC program. If this is found, this BASIC program is executed (with Diskbasic initialized).
- disksystem next tries to read sector 0 of drive 0 ( A: ) at &HC000. If this fails Diskbasic is started.
- 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.
- control is passed to &HC01E (the MSX bootloader) with the carry flag RESET. This can be used by a diskgame. Note that a own bootloader must be present in sector 0, because the default bootloader returns control to the disksystem at this point.
- a check for 64 KB of RAM (at all pages) is preformed. If not found, Diskbasic is started.
- disksystem next tries to read sector 0 of drive 0 ( A: ) at &HC000. If this fails Diskbasic is started.
- 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.
- perperation for MSX-DOS are performed (slot switching and interrupt routine) and control is passed to &HC01E (the MSX bootloader) with the carry flag SET. Normal MSX bootloader loads MSXDOS.SYS at 0100 and starts this. With own bootloader you could do something else......

DOS2 kernel boot are different, if anyone is interested, I can post this as well...
msd
msx professional
Berichten: 612
Geplaatst: 22 November 2005, 10:03   
yeah list the dos2 kernel boot as well
HansO
msx addict
Berichten: 375
Geplaatst: 22 November 2005, 10:04   
Quote:

Actually the MSX boot is a bit more complicated with a disksystem (assuming DiskBasic 1.0 here):


DOS2 kernel boot are different, if anyone is interested, I can post this as well...



Please do!
mohai
msx lover
Berichten: 124
Geplaatst: 22 November 2005, 11:29   
Quote:

Hi,

What I dont understand is how the booting of an MSX works.

If you have no disc or cartdridge installed, it just boots from basic rom.
But what if you put in a cartridge, does this go before a disc, or is the disc first ? Which mechanism controls this ?

Even so, the MSX title screen. Where does it come from ? The bios/basic rom ?

Does anyone know this ?

Regards,

PP



Indeed, it is simple. First, Z80 executes conde starting from #0000 in the lowest slot (0). Then code in the ROM-BIOS initializes PPI, VDP, SOUND, etc. Perform a routine to find and activate (at least) 16k RAM. Shows start-up screen and search for connected rom-cartdriges, starting from lowest slot/subslot...

Cartdriges in lower slots, will be initialized first.
If no rom-cartdriges did not take over the control, then MSX-BASIC rom is started

regards,
IvI
zeilemaker54
msx lover
Berichten: 97
Geplaatst: 22 November 2005, 13:28   
Here is the MSX boot procedure with a disksystem kernel 2.x.

Note that kernel 2.31 (used in the Turbo-R) has some modifications, which extends the bootprocedure (because kernel 1.00 is in the same slot and page). Kernel 2.31 specifics are marked [2.31].

- [2.31] The key "1" is checked. If pressed, kernel 1.00 is started. look for bootprocedure for kernel 1.00 in my previous post.
- A MSX cartridge (eg ROM) can patch the H.STKE to take control of the disksystem. In this case, as soon as the initialization of the disksystem is ready, control is passed to the basic interpreter (so no basic roms, bootsectors to take control), and at a certain point H.STKE is called, and control is back to the cartridge. This is used by ROM games, which use the disksystem. [2.31] after the H.STKE check, the DEFUSR0 entry is checked. If this default, kernel 1.00 is started. Otherwise, the normal action is performed (so kernel 2.31 stays active and control is passed to ROM). This means that the (game) ROM must explicit change the DEFUSR0 entry for the kernel 2.31 to stay active!
-If H.STKE was not patched, the disksystem search for a MSX cartridge (eg ROM) with a BASIC program. If this is found, this BASIC program is executed (with Diskbasic initialized). [2.31] the DEFUSR0 entry is checked. If this default, kernel 1.00 is started. Otherwise, the normal action is performed (so kernel 2.31 stays active and the basic program in ROM is started). This means that the ROM must explicit change the DEFUSR0 entry for the kernel 2.31 to stay active!
- [2.31] if (&HF2FD)<>0, then MSXDOS2 is started from the driveid specified in (&HF2FD).
- disksystem next tries to read sector 0 of any drive (phantom drives are skipped) with a valid MSDOS2.x header (e.g. &HE9 or &HEB at offset 0) at &HC000. If this fails Diskbasic is started.
- [2.31] if the bootsector has no valid volumeid, kernel 1.00 is started.
- control is passed to &HC01E (the MSX bootloader) with the carry flag RESET. This can be used by a diskgame. Note that a own bootloader must be present in sector 0, because the default bootloader returns control to the disksystem at this point.
- If (BOTTOM)<>&H8000, Diskbasic is started.
- perperation for MSX-DOS are performed (slot switching and interrupt routine)
- the system tries to load MSXDOS2.SYS (from the default drive, the one with a valid bootsector) at &H0100
- If this is succesfull, MSXDOS2 is started
- disksystem next tries to read sector 0 any drive (phantom drives are skipped) with a valid MSDOS2.x header (e.g. &HE9 or &HEB at offset 0) at &HC000. If this fails Diskbasic is started.
- [2.31] if if the bootsector has no valid volumeid, Diskbasic is started.
- control is passed to &HC01E (the MSX bootloader) with the carry flag SET. Normal MSX bootloader loads MSXDOS.SYS at 0100 and starts this.
zeilemaker54
msx lover
Berichten: 97
Geplaatst: 22 November 2005, 13:40   
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...
msd
msx professional
Berichten: 612
Geplaatst: 22 November 2005, 14:18   
http://map.tni.nl/ would be a good place
HansO
msx addict
Berichten: 375
Geplaatst: 22 November 2005, 19:08   
Quote:

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

msx master
Berichten: 1248
Geplaatst: 22 November 2005, 20:21   
Hm, I've got a few questions here:

Quote:

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 :-)
Quote:

[...]
- 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?
Quote:

- 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?!


AuroraMSX

msx master
Berichten: 1248
Geplaatst: 22 November 2005, 20:23   
Quote:

Hm, I've got a few questions here:

Quote:


- 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
 
Ga naar pagina ( 1 | 2 | 3 Volgende pagina )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.