Feature request: MSX Gamereader support in OpenMSX (psxdev GNU driver)

Page 1/2
| 2

By DrWh0

Paladin (767)

DrWh0's picture

01-10-2019, 21:38

Hi,

Recently psxdev developer released a GNU library for implementation of msxgamereader driver in order to work with msx emulators under ps4, is possible to implement it on regular openmsx?

The source code and docs are available here:

https://github.com/psxdev/msxGameReader

Kind Regards :)

Login or register to post comments

By Manuel

Ascended (15686)

Manuel's picture

01-10-2019, 23:54

How many people have such a device anyway?

Anyway, very cool someone started an open source library for it!

By DrWh0

Paladin (767)

DrWh0's picture

02-10-2019, 00:20

Hi Manuel

Apart from MSX Association (more than 3000 units approximately sold) Sunrise made an adapted version, they sold a good number of game readers (only Sunrise knows the exact quantity) but I am sure that a good number of people have it, but due to its lack of usability currently are almost useless and few people knows that you can use it on Bluemsx.

The schematics are freely available (even publicily published at MSX Magazine) but currently apart from BlueMSX (adding the original DLLs from MSX player) no emulator had support for it.

Here you have a webpage with info and schematics of this device:

http://ore-kb.net/hard/MSXRw/

I didn´t asked before because those drivers and libraries because are closed and privative code but with this new GNU library made by psxdev I see the chance to ask for integrate it (is functional in spite of some cartridges doesn´t work yet because it is currently being actively improved)

This is the only MSX feature that BlueMSX can do that OpenMSX not.

Not mentioning that in Linux is our only option ;)

And I would like to build my own one but if doesn´t work in OpenMSX for me is useless.

Thanks in advance :)

By gdx

Prophet (2978)

gdx's picture

02-10-2019, 01:47

I think if some cartridges doesn't work on PSX4 it's not because of the driver but the ROM mapper detection/emulation.

I have the MSX Gamereader. This device could be fine if it was much faster. The USB2 is very insufficient.

MSX player emulator uses only this Gamereader to run game cartridges.

By mth

Champion (484)

mth's picture

02-10-2019, 04:25

I got a prototype from Sunrise. When I got it, I reverse engineered the protocol and tried to use it via libusb, but I would always get a timeout after a transfer. The data came in fine, but having to wait for the timeout made it unfeasible to do anything other than large (~8K) transfers without slowing down immensely. I don't know if the timeouts were due to a flaw in my implementation of the protocol or a flaw in the firmware of the reader.

Even if this timeout problem is fixed, USB bulk transfers are not designed for handling lots of small reads and writes. I don't think reading one byte at a time will be possible realtime. You could use the reader to dump blocks and emulate individual reads, but at that point the reader becomes mostly a gimmick, so I lost interest.

At a first glance, the linked library seems to analyze the ROM type of the cart and then uses large block transfers to get the data. It does have dedicated code for handling SRAM, so it could be used to transfer save games between an emulated MSX and a real MSX. Other than that, it doesn't seem to offer much that you can't get by just using a ROM image instead.

Edit: If the timeout issue can be fixed, perhaps it would be fast enough to do 256-byte transfers, which is the cache line size in openMSX. That might allow realtime emulation actually using the cart rather than it being only an alternative way of loading a ROM image.

By rderooy

Hero (578)

rderooy's picture

02-10-2019, 08:31

My understanding is, that is how the official MSX-PLAYer emulator works. It just reads the whole cartridge content and then runs it from the copy. Not sure if it also reads/writes the SRAM.

One advantage of this is, that is may allow us to discover some unknown variations of games, if openMSX checks the game checksum against its database and gives a message if a unknown signature was detected.

It would be an easier way to dump cartridges, not needing a functioning MSX with disk drive.

Perhaps a first thing that could be done, is to include a separate dump tool with openMSX that also checks the database. Then as a second effort, it could be more tightly integrated with the emulator itself to directly run games from cartridge (dumping the cartridge automatically in the background if needed).

Even better if it could also handle the MSXPiHat. https://www.msx.org/news/hardware/en/make-a-raspberry-a-real...

By hamlet

Scribe (2469)

hamlet's picture

02-10-2019, 10:45

Quote:

Even better if it could also handle the MSXPiHat. https://www.msx.org/news/hardware/en/make-a-raspberry-a-real...

More easy to get/build then the GR, nowadays.

By psxdev

Rookie (29)

psxdev's picture

02-10-2019, 18:04

Hello,

I know that there are many people here with experience in msx hardware/software projects. It would be great a full open hardware/software cartridge reader solution with support for emulators, so if someone is interested feel free to contact with me here or in my Twitter account @psxdev

I got msx game reader(japanese version) last August and a after a few hours of reversing stuff I released source code for unix/libusb. No problem with timeout at all.

Msxplayer is based on fmsx and it is closed source and it has only support for win98/win2000 32bits so is not a very good option today. Bluemsx has support using propietary dll in windows but a full open solution is better and my only way to add support to unix/console platforms

My work is done for PlayStation plataforms mainly(fmsx port and bluemsx port full source released) and usb game reader is a very good option for me. All my work is open source so it can be easily ported to different unix flavours (pc,mac,pi). For windows 64 bit support can be done in near future but it is not a priority for me right now(can change with people involved).

About meesokim work with pi, I know it perfectly because I have been working with it since initial pcb revision.(plenty of test done at home) It has some compatibility issues and lack of some power signals ,source of more compatibility issues and it is only for pi so it is not a universal solution for pc/mac/consoles. it is not the best option for me.

I can help with an open support for game reader, so more source code will be released from me.

About the hardware I have look for hex code for chip involved without luck. I contacted with original author but he said me that it is a private project so by now a closed door. Perhaps someone from sunrise could have technical information and code used in hardware...

What do you think about collaboration for a full open hardware/software cartridge reader solution?

By NYYRIKKI

Enlighted (5364)

NYYRIKKI's picture

02-10-2019, 20:13

Hmm... Reading about Gamereader makes me think that if you just take Arduino and something like MCP23S17, I think you already have pretty much same functionality.

By DrWh0

Paladin (767)

DrWh0's picture

03-10-2019, 15:59

@rderooy

* SRAM functions are available in the reader
* Having the chance to use directly my own collection of cartridges on my laptop -pc or console is priceless.
* Also not supporting original booter disk games in OpenMSX is something I miss from original fmsx-dos and a lot of Windows emulators

By gdx

Prophet (2978)

gdx's picture

03-10-2019, 16:41

DrWh0 wrote:

* SRAM functions are available in the reader

Yes but it's very, very slow.

Page 1/2
| 2