Using Joystick I/O port for loading games

Page 2/2
1 |

By kaizen4871

Supporter (5)

kaizen4871's picture

28-03-2020, 21:10

NYYRIKKI, I'd love to read your source code and have more info about your project. Is it possible for you to share your work with me as well.
Best regards

By rasool

Supporter (5)

rasool's picture

29-03-2020, 13:00

RvS wrote:

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

Very impressive work! I think your project is the best so far with regard to data transfer using joystick port. I like the idea of emulating a cassette using arduion as well. I don't think is hard to modify arduion code to use an sd card instead of a pc for storing disk images.

Thanks for sharing your project!

By gdx

Prophet (3427)

gdx's picture

29-03-2020, 13:38

I'm interested by the version with SD.

By Danjovic

Master (142)

Danjovic's picture

29-03-2020, 18:21

It is also possible to use SPI on the joystick port and get a transfer rate of about 1.7 kilobyte per second.

By snake

Rookie (32)

snake's picture

13-04-2020, 01:28

I wonder what is the maximum speed of data transfers through general purpose ports. I attempted to compile and run a simple C program that sends about 130000 "IN" instructions to port A2, and it did the job in 3-4 seconds (both in emulator than real hardware).
Some expert can confirm these figures or i did i do wrong calculations?

By ducasp

Champion (273)

ducasp's picture

13-04-2020, 04:47

snake wrote:

I wonder what is the maximum speed of data transfers through general purpose ports. I attempted to compile and run a simple C program that sends about 130000 "IN" instructions to port A2, and it did the job in 3-4 seconds (both in emulator than real hardware).
Some expert can confirm these figures or i did i do wrong calculations?

Probably a lot more, specially because C will save registers, push variables, restore, etc... If you are using sdcc try assigning the io to a variable like this:

__sfr __at 0x06 myPort6;

Then when you assign a value, it is an out, when you read, an in, no stack involved, so really fast, but you might get even better performance in direct ASM and doing fast loops:

http://map.grauw.nl/articles/fast_loops.php

By rasool

Supporter (5)

rasool's picture

18-04-2020, 01:20

snake wrote:

I wonder what is the maximum speed of data transfers through general purpose ports. I attempted to compile and run a simple C program that sends about 130000 "IN" instructions to port A2, and it did the job in 3-4 seconds (both in emulator than real hardware).
Some expert can confirm these figures or i did i do wrong calculations?

You can do it faster in ASM. However, transferring data needs memory write, counters, shifting , ..etc in addition to IN instruction. The fastest transferring speed I have achieved was 16Kbytes/second. In that speed, 32Kbyte ROM can be loaded in 2 seconds.

Page 2/2
1 |