Using Joystick I/O port for loading games

Pagina 1/2
| 2

Door rasool

Supporter (5)

afbeelding van rasool

27-03-2020, 00:09

Hi guys,
I'm a new member in this forum but an old MSX1/2 owner. A few days ago, I got back my old MSX machines and partially restored one of them. I loaded/tested some games using MSX2CAS app but I founded it is slow (of course as it is a cassette emulator) and roms do not work (at least on my machine).
Then, I decided to have some fun with Arduino and MSX joystick I/O port since the connection between them does not require additional components or soldering. I am not sure if a such project already exists (I couldn't find a similar project excepts RS-232 using joystick port)
The basic idea is to load a small loader program (~ 250 bytes) using MSX2CAS (or any other method). This loader communicates with an Arduino uno board (or any similar boards) through MSX joystick I/O port and load a specified rom/game file (16KB or 32KB roms) to the RAM at #4000 and executes it. The roms are stored in an SD card (SD card reader is connected to Arduino).
4-bits data per time is transferred through joystick I/O port pins 1-4. Pins 6 and 8 are used for communication control.
Using the method, the transfer rate of the current implementation is around 4.5KBytes/s (~7 seconds to load a 32KB game) but there is some room to increase the speed a little bit more.
Anyone interested in this project so I can improve it and publish the code?
Suggestions/comments are also welcomed.

Aangemeld of registreer om reacties te plaatsen


Enlighted (6011)

afbeelding van NYYRIKKI

27-03-2020, 11:28

Yes, I've experimented with this although it didn't become quite a finished project.
I can send you my ugly sources to look / use if you don't want to start from scratch... just send me a mail (email in profile)

To load the loader, I used a little BASIC program instead of cassette file:


The program then switched to a faster transfer protocol.

I think the problems that I had were mostly related to PC <-> Arduino communication protocol. Especially on Arduino Nano V3 that I used, I somehow managed to make the communication to crawl like a snail... On Arduino UNO the code worked much better and faster, but still not quite perfect. I think this speed problem was caused by the way the RS-232 communication is encapsulated to USB-messages. I tried to send less ACKs, but could not solve this speed problem completely.

In the end I also still had some communication errors that broke the file from here and there, but I moved to other projects before I managed to find energy to debug these issues... Quite typical end to my random projects, I would say. The problem in these type of communication projects is that you have to change program from both ends to try again, so the improvement iteration takes kind of double time compared to normal debug/improvement cycle... and here you have MSX <-> Arduino AND Arduino <-> PC communication to take care of.

Van Arjan

Paladin (782)

afbeelding van Arjan

27-03-2020, 11:41

I just saw Tiny Yarou released a tool that does almost this (usb to joystick port). You can see a demonstration here:

More info at

Too bad everything is in Japanese.

Van st1mpy

Paladin (899)

afbeelding van st1mpy

27-03-2020, 11:43

Tiny Yarou has exactly this and more have a look at his YouTube video. The code and tool is on his web site.

Van gdx

Enlighted (6005)

afbeelding van gdx

27-03-2020, 12:53

Few years ago MMC/SD card readers have start by an SD card connected on a joystick port from what I could understand.

Van rasool

Supporter (5)

afbeelding van rasool

27-03-2020, 13:38

Tiny Yarou work is impressive! His tool is much better than what I could expect Smile
My tool is much simpler with one goal (which is loading roms from SD card). It works without a PC (but Arduion instead Sad ), consumes only 250 bytes RAM and a little bit faster.
Although my tool (alpha version) is working well, I will stop developing it as there is a better option Sad At least I enjoyed working on this project.

Van Giangiacomo Zaffini 2

Champion (278)

afbeelding van Giangiacomo Zaffini 2

27-03-2020, 14:08

My goal of five six years ago was flashing a banked ROM from cassette i/f. With this joystick port serialTTL to USB by Tiny Yarou It seems doable and fast and BASIC.

Van Sepulep

Resident (36)

afbeelding van Sepulep

27-03-2020, 14:37

please do publish!! even if its just alpha its nice to have such things open, it will provide a flying start to anyone working in this direction...

Van st1mpy

Paladin (899)

afbeelding van st1mpy

27-03-2020, 23:05

Rasool you should keep on developing / publish it, it's worth it for your experience and would be useful to others too.

Van Danjovic

Champion (321)

afbeelding van Danjovic

28-03-2020, 01:08

Some (quite some!) time ago I did some experiments using bitbanged I2C on joystick port to load data from a Serial EEPROM (link).

I have built some picodrives prototypes like this 32kbytes unit on photo below.

More than one picodrive could be connected at the same time and I have even built a HUB with a controller port pass through a nd 4 extra connectors ("pods") for I2C devices.

Van RvS

Expert (92)

afbeelding van RvS

28-03-2020, 20:25

I have created something similar, but connected to a pc instead of an sd card.
Code is available here:
I have made some updates lately, I still need to update them on GitHub.

Pagina 1/2
| 2