OCM - loading ROMs from a SD-card.

By caro

Champion (333)

caro's picture

15-11-2007, 15:35

The initial loader OCM (the module IPLROM.VHD) at start
of system first of all checks contents of a SD-card established
in the plug of the computer.

Is checked, that the card is formatted in the standard FAT.
For this purpose the BOOT-sector of a card is read and in it
the inscription "FAT" is searched.

If the inscription is found, under the information from this
sector the displacement first claster of the card, given
from a beginning, is calculated and its first sector is read.

If first two bytes of this sector are equal "AB",
it is considered, that it is initial claster of a file containing
ROMs MSX.

As volume ROMs OCM is equal 256 kilobytes, from a disk, since
this first sector in memory OCM, allocated for accommodation
of the ROMs, 512 sectors of the data are read.

In any other case ROMs of same volume is read out in memory
ОСМ with loading from EPCS4.

That is for what to load ROMs from a SD-card, instead of from
EPCS4, the first 256 kilobytes of the data on a card should
contain in a BIN-format all volume of the ROMs required for
work of the given configuration MSX.

And, if volume one claster does not exceed 16 kilobytes
(that is observed for used cards more often), it is no necessary
the data should be written down as one file.

Main, that they would be placed in the certain order:
1) MEGASCSI.ROM - 64 kilobytes;
2) MSX2. ROM - 32 kilobytes;
3) MSX2EXT.ROM - 16 kilobytes;
4) FMPAC.ROM - 16 kilobytes;
5) KANJI.ROM - 128 kilobytes.

First two bytes MEGASCSI.ROM also are attributes ROM MSX.
The files in this order are written on again formated SD-card,
or they can be stuck "together" command copy, having received
a resulting file ROM in volume 256 kilobytes and having written
down it on a card.

Now if to establish this card in OCM and to include a feed,
ROMs will be loaded from a card, instead of from EPCS4.

Have in view of, that from a card contents of the ROMs MSX
are loaded only, instead of the configuration file FPGA,
which on former is filled in from EPCS4.

First of files contains a disk subsystem OCM, which it is
better to not touch, and other files can be tried to change,
not forgetting that volume of each of them is strictly fixed.
Login or register to post comments

By MicroTech

Master (220)

MicroTech's picture

16-11-2007, 17:32

So if I understand correctly you are saying that OCM's ROM could be loaded "on the fly" when OCM boots from SD, is it correct?
I don't understand if this "on the fly" mechanism can be used to load also FPGA... Question

By caro

Champion (333)

caro's picture

17-11-2007, 08:11

So if I understand correctly you are saying that OCM's ROM could be loaded "on the fly" when OCM boots from SD, is it correct?
I don't understand if this "on the fly" mechanism can be used to load also FPGA... Question
For that this mechanism would earn, it is necessary, that FPGA would be already loaded,
as the reading SD is made by the processor Z80, which to execute the program of the initial loader
from the module IPLROM.VHD
My MSX profile