Emulating MSX on the MiSTer (FPGA)

Page 2/2
1 |

By Vampier

Prophet (2350)

Vampier's picture

08-04-2020, 16:47

do you have the memory expansion?

By dmr

Resident (38)

dmr's picture

08-04-2020, 18:16

Vampier wrote:

do you have the memory expansion?

... is it THAT simple, aye ;-) ? Didn't know it is "required by most cores". No, I don't have this board... yet.

(Although it does not explain why C64 - and Sinclair QL - DO work).

Thnx!

By dmr

Resident (38)

dmr's picture

08-04-2020, 20:59

Hmmm, the MiSTer-memtest shows 64MB SDRAM (which is what the DE1-SoC has onboard for its FPGA-part). And this passes the frequency test at 150 MHz.

... maybe it is something else I'm doing wrong.

By dmr

Resident (38)

dmr's picture

08-04-2020, 22:32

It works !!!

Indeed it was de VHD-file. I found an example in the Atari forum on MiSTer: MSX core discussion (somewhere in this thread there is a link to a dropbox with the file).

MSX on my DE1-SoC !!!

By Vampier

Prophet (2350)

Vampier's picture

09-04-2020, 00:19

As it happens to be, I am in the process in creating a really nice VHD file for the MiSTer Wink

I believe the MSX core needs 32MB .. NeoGeo needs 128MB for all games to work optimal.

By dmr

Resident (38)

dmr's picture

11-04-2020, 13:31

I now have it working with my "own" VHD-file... it turned out that the disk2vhd tool in a virtual Win7 environment does not copy the hidden/system OCM-BIOS.DAT file.

My new approach works: ... I now use a Virtual Box with MS DOS 6.22 to create an empty VHD-image and copy the OCM-BIOS.DAT manually. After copy I set the hidden/system/archive attributes of OCM-BIOS.DAT using ATTRIB and then copy all other files. This seems to work fine (*).

... now I need to find out how to make the MSX core load the correct VHD automatically, as I have to do it manually each time I start it, but that's just a minor glitch ;-).

(*) it also stops my host macOS from writing all the garbage it usually does to each sd card it lays it's fingers on... someone really should talk to Apple and make them stop doing this!

By dmr

Resident (38)

dmr's picture

13-04-2020, 20:10

Question: according to the readme.md the MSX core (see GitHub) has mouse-support. How does this work? Has anyone tips/tricks, maybe a forum-site where I can ask questions?

By AxelStone

Prophet (2738)

AxelStone's picture

13-04-2020, 20:12

dmr wrote:

Question: according to the readme.md the MSX core (see GitHub) has mouse-support. How does this work? Has anyone tips/tricks, maybe a forum-site where I can ask questions?

Have you tried simply plug USB mouse? I've Mistica (Mist compatible) and I use a normal USB mouse with Atari ST and Amiga cores.

By dmr

Resident (38)

dmr's picture

13-04-2020, 22:13

Quote:

Have you tried simply plug USB mouse? I've Mistica (Mist compatible) and I use a normal USB mouse with Atari ST and Amiga cores.

Yes. In the Apple Plus Core it works fully (*). But with MSX Core I have mixed results. In SYMBOS mice don't not work at all. In VideoGraphics they work partly (either click but no move, or move but no click :-O ). In HomeOffice 2 it doesn't work also.

... seems a bit buggy to me.

(*) I tried two mice: one single button with ball and one 3-button, infrared (again: both work in the Apple Plus core).

By pgimeno

Master (137)

pgimeno's picture

26-05-2020, 14:26

For those who want to use Linux to create their own VHD file with any size up to 4 GB (I've tested 2 GB, YMMV):

The VHD file needs to be a disk image, having a valid partition table with one primary partition of type DOS, which contains a valid FAT16 filesystem. That filesystem needs to contain the file OCM-BIOS.DAT as the first file ever copied to the disk. Without that, the core won't boot.

So, how to get that? Here's a guide using the mtools package. Install it if you haven't already.

Also, download sdcreate.zip and extract the OCM-BIOS.DAT file from it:

$ wget https://github.com/MiSTer-devel/MSX_MiSTer/raw/master/Utils/sdcreate.zip
$ unzip -j sdcreate.zip sdbios/OCM-BIOS.DAT

Now, with the prerrequisites installed, the first thing to do is to create the file with the appropriate size (we will add the partition table and the filesystem later). I like to do this in my hard disk before copying the result to the SD card, using a sparse file because there's no need to use much space. Specify the size in bytes, e.g. 2147483648 for exactly 2 GiB (but remember that the partition table and the rounding take some space):

$ truncate --size=<size> msx.vhd

Now you need to create the partition table in this image. You can do that with sfdisk, which is a scriptable version of fdisk, which also allows to enter 1 as first sector instead of 2048 with the --force flag. But first, calculate how many sectors the partition will have, by dividing the size you specified above (2147483648 in this case) by 512 and subtracting 1 (for the partition sector) from the result. In this case, 2147483648/512 = 4194304, so the FAT filesystem area will have 4194303 sectors.

$ echo 1 <nsectors> 6 | /sbin/sfdisk --force msx.vhd

This will create the partition table at sector 1 of the disk.

Now we need to format the partition, but first we need to calculate how many cylinders we will have. For that, divide the number of sectors calculated above by 16065 (that's the number of sectors in a 255 sectors, 63 heads cylinder) and round down (throw away the decimals). In our case, 4194303/16065 = 261.

$ mformat -i msx.vhd@@512 -t <cylinders> -h 255 -n 63 -H 1 -m 248 ::

The :: means the drive with the disk image; it's used in place of a device like A: or C: in MSX-DOS.

And then copy OCM-BIOS.DAT to the filesystem:

$ mcopy -i msx.vhd@@512 OCM-BIOS.DAT ::

That's it, the image is now ready to use. Optionally you can hide the OCM-BIOS.DAT file, to make it less likely for it to get accidentally deleted or overwritten, but this step is not necessary:

$ mattrib -i msx.vhd@@512 +h ::OCM-BIOS.DAT

And if you want to copy more stuff into it, you can use mcopy. Always use -i msx.vhd@@512 as the first parameter, then the source and target, with backslashes replaced with forward slashes and :: instead of A: for the drive that represents the disk image. You will probably want to install more stuff; sdcreate.zip comes with MSX-DOS and some utilities like MM. But if you just want to see the MSX booting, only the OCM-BIOS.DAT file is necessary.

Now, copy the msx.vhd file to the SD card in directory /games/MSX/ (create it if it does not exist) and when the core boots, press F12 or the OSD button, turn on "Reset after mount", choose "Mount *.VHD" and select the image. The MSX should start now.

Just note that I have to select the VHD every time I boot, regardless of whether I save settings. Not sure if this will change in future versions.

If you want to add files to the image directly on the SD card, you can use the path to the image with mcopy. In my case, the SD card is mounted in /media/sdd1, so I write:

$ mcopy -i /media/sdd1/games/MSX/msx.vhd@@512 files_to_copy ::/path/
Page 2/2
1 |