Emulating MegaFlashROM SCC+ SD with openMSX
This page was last modified 14:59, 7 March 2018 by Mars2000you. Based on work by Ren and Wild Penguin and others.

Contents

Vade mecum – openMSX and MegaFlashROM SCC+ SD

A tutorial on how to setup and use MegaFlashROM SCC+ SD (MFRSCC+SD in short) with openMSX.

Note that nowadays you could save yourself some time, and use the MFRSCC+SD extension with the prepared ROM image. Read some more about this first in the openMSX User's Manual: MegaFlashROM SCC+ SD.

1) What we need

  • a) A recent openMSX build (release or a development build);
  • b) DiskExplorer 1.69 + Plugin for MSX from here to manage VirtualHDD MSX IMAGE larger than 16Mb in FAT16;
  • c) DiskManager from this website to prepare a 8Mb VirtualHDD with files needed for step2;
  • d) The MFRSCC+SD files from this website in the FLASH section and Nextor Kernel;
  • e) A / your favorite text / source code editor;
  • f) A .dsk image of your IDE MSX Hard Disk or a ready-to-use-empty .dsk image to populate with the files you want.

2) Preparing a VirtualHDD with files needed to program the MFRSCC+SD

Start DiskManager, FILE->NEW->disk capacity CUSTOM, MSX-DOS 2.2 boot sector->OK->OK and populate the 8Mb image with these files downloaded at the point 1.d

 COMMAND.COM
 COMMAND2.COM		
 DSKROM.ROM		
 KERNEL.DAT		
 MSXDOS.SYS		
 NEXTOR20.ROM	(rename in this way the file downloaded from konamiman website)
 OPFXSD.COM		
 RECOVERY.ROM		
 ROMDISK.DSK	

Add one more file. With notepad prepare a new file called PREPARA.TXT with this content:

 OPFXSD nextor20.rom /I
 OPFXSD dskrom.rom /I1
 OPFXSD romdisk.dsk /ID
 OPFXSD recovery.rom /I34

Save it (important: be sure to save the file with CRLF line endings (a.k.a. Windows line endings), rename it PREPARA.BAT and drag it into the DiskManager window. Now save the 8MB image as PIPPO.DSK into the openMSX folder. We’ll need it just one time.

3) Customize the SD to use with MFRSCCSD

Delete all .sdc files you find in

Documents\openMSX\persistent\MegaFlashROM_SCC+_SD\untitled1\ 

Now open the following file in your favorite editor:

yourOPENMSXfolder\share\extensions\ MegaFlashROM_SCC+_SD.xml

scroll its contents to find this key:

<sdcard1>
  <filename>SDcard1.sdc</filename>      
  <size>8</size>
</sdcard1>

and modify it with your preferred VirtualSD1 card size in Mbyte (in this case mine is 4096mb) You can do the same with the <sdcard2 /> section (or remove it if you just want to run a single SD card). Save it. BE CAREFUL: BIGGER VIRTUAL DISK = LOOOONGER TIME TO WAIT FOR BOOT !!

Now with notepad save a new file called SDIDE.TXT into the openMSX folder with this content:

 machine Boosted_MSXturboR_with_IDE
 set auto_enable_reverse off
 set maxframeskip 100
 set power off
 hda insert yourdrive:/yourpath/PIPPO.dsk
 ext MegaFlashROM_SCC+_SD
 set power on

Finally right-click on openmsx.exe to create a shortcut, right-click on the shortcut and in the destination add

 -script sdide.txt

at the end of the command line: this would be the shortcut we’ll use to launch openMSX with MFRSCC+SD and IDE.

4) First Boot and Partitioning SD

Boot our MSX using the just-created shortcut. If all is OK during the boot you must see info about Ide and Mfrscc hardware. At the prompt type PREPARA.BAT and let it works. Reboot MSX. Type A: then input BASIC and then CALL FDISK. Choose the MFRSCCSD and then each SD card to (A)DD a partiton and (W)RITE it on the VirtualSd. Our MSX with virtualSD on MEGAFLASHROMSCC+SD is ready.

5) Preparing OpenMSX for an IDE-to-SD copy

Ok, now the problem is that we cannot put files directly into virtualSd. So we must mount a VirtualHDD.dsk as IDE to let us copy all files from this to the virtualSd using our emulated MSX. You can copy all the files you usually use on the RealSD of MFRSCCSD on this VirtualHDD.dsk. For 8/16 MB FAT12 VirtualHDD.dsk you can look at the first part of the point 2. For bigger FAT16 VirtualHDD.dsk you can look around MSX.ORG forum to find how to create it. BlueMSX can help you, also OpenMsx with DiskManipulator utility. Just have a look around. When you created it you can easily populate it using DiskExplorer 1.69 with the MSX extension. MSX.ORG can always help you. Remember to open the image you created choosing VMWARE PLAIN IMAGE option. Whatever solution you choose, this is how to going on.

Look at the point n°3. Change the line #7 of the SDIDE.TXT in this way:

 hda insert yourdrive:/yourpath/yourVirtualHDD.dsk

and save it. Boot your MSX. Copy all files from yourVirtualHDD.dsk to the unit that correspond to your VirtualSD. You can throttle MSX with F9 Key to speed up the operation. You can also use an utility as MultiMente to manage files and disks in a better way. Thanks to the #2 and #3 lines of the SDIDE.TXT file it can only take 1 minute for 100Mbyte, depending on your HW.

5b) In Linux, copy by mounting the image

If you are using Linux, you can also mount the partition(s) in SDcardX.sdc. You need a tool called partx (or kpartx). Try first if you get sensible output:

 partx -l SDcard1.sdc

And if you do,

 partx -a SDcard1.sdc
 sudo mount -o uid=1000 /dev/loopXpN /your_desired_mountpoint

After this you can copy files to this partition (replace 1000 with the UID of the user you wish to do the copying as). Repeat for each partition N on possibly for both SD card images. Remember to unmount (and optionally deleting the partition nodes with partx -d, but they will be deleted ar reboot and keeping them should have no ill effect). See partx man page for more details.

6) Use and whishlist

All done. Now you can avoid to use IDE drive because all files are on VirtualSD. To do this delete line #5 of the SDIDE.TXT file (if you prefer you can also change the machine changing line #1: have a look to the OpenMSX manual). From now on you can launch your MSX with MEGAFLASHROMSCC+SD using the shortcut made at the end of point3 or easier with Catapult Launcher choosing your machine & MFRSCC+SD extension. If you want more info about MEGAFLASHROMSCC+SD have a look here

This wokflow is a little bit complex. What it would be useful is a manager for openMsx VirtualSD to easily populate and manage images without using an IDE device to copy from (It would permit to skip the whole point 5). We would also need an easy way to add scripts to the Catapult Launcher of OpenMSX (It would permit to skip halyf of the point 3), while a ready-to-use version of emulated MegaFlashRomSCC+SD would permit to skip the whole point 2. Finally it could be a good idea to have the option to choose the .sdc to use in Catapult when there is also an ide device, because now there is only a place where to chose large media. But I have to admit that DIY is more funny!

© Giuseve 2016 – Rel.20160318