[SD2MZCMT] GitHub link

Post Reply
hlide
Posts: 71
Joined: Thu Jan 25, 2018 9:31 pm

[SD2MZCMT] GitHub link

Post by hlide » Tue May 01, 2018 10:27 pm

Adding my new GitHub project SD2MZCMT: https://github.com/hlide/SD2MZCMT. Not finished but any contributions are welcome. Still, a lot of works to do. Turbo X4 is not stable with all MZF files but turbo X3 seems to work fine. I also want to add a very fast serial transfer between Arduino and MZ to load/save MZF files using the tape signals.

Jo Even
Site Admin
Posts: 33
Joined: Wed Jan 17, 2018 9:28 pm

Re: [SD2MZCMT] GitHub link

Post by Jo Even » Wed May 02, 2018 6:22 pm

hlide wrote:
Tue May 01, 2018 10:27 pm
I also want to add a very fast serial transfer between Arduino and MZ to load/save MZF files using the tape signals.
Not quite sure what you mean by this. If you want to add an alternative, faster interface, wouldn't the easiest and fastest be to connect it directly to the databus and access the Arduino through a port? Theoretically you should be able to fill the entire RAM in less than a second that way.

Also, not sure if this is possible but if you can suspend CPU access to the databus it could be possible to write directly to RAM from the Arduino. So when the MZ wants to load a file from tape, you can read the load address from the tape header and write the entire file directly to RAM without any extra or modified loading routines on the MZ.

hlide
Posts: 71
Joined: Thu Jan 25, 2018 9:31 pm

Re: [SD2MZCMT] GitHub link

Post by hlide » Wed May 02, 2018 8:48 pm

Theorically you're right. But connecting data bus means 50 wires to connect (well a little less in fact) and probably some components to solder on a circuit and to connect between the Arduino and the databus. If I can create a turboloader which uses /sense signal as a serial clock to transfer between Arduino and MZ, it is only three wires and no intermediate circuit or component to solder so anyone could make one.

This project is the simplest I wanted to do.

Of course, I'm thinking about making another project using the data bus but that's another project.

hlide
Posts: 71
Joined: Thu Jan 25, 2018 9:31 pm

Re: [SD2MZCMT] GitHub link

Post by hlide » Thu May 03, 2018 11:20 am

To be exact, I want something like that:

Code: Select all

  __         _____         _____         _____         _____
SC  \   0   /  1  \   0   /  1  \   0   /  1  \   0   /  1  \  ...
     \_____/       \_____/       \_____/       \_____/       \
     
     |-|++++|-|++++|-|++++|-|++++|-|++++|-|++++|-|++++|-|++++| ...
  __         _____  _____                _____         _____
SD  \   0   /  1  \/  1  \   0      0   /  1  \   0   /  1  \  ...
     \_____/              \_____/\_____/       \_____/       \
     |           6h              |           5h              |
SC is Serial Clock and it is /SENSE on both Arduino (output pin) and MZ (input pin).
SD is Serial Data and it is READ on both Arduino (output pin) and MZ (input pin).

On MZ, SC is 8255 PC4 (MOTOR <=> not /SENSE*) and SD is 8255 PC5 (READ). So if the Arduino first sets serial data bit then toggles the serial clock, the MZ can read both PC4 and PC5 in a byte and exploits the PC5 bit to shift it in a byte if the PC4 bit changes its value.

* If the MZ never uses M-ON to toggle the MOTOR state during the serial transfer, then reading MOTOR on the MZ should be roughly the same as reading the inverted value of /SENSE.

|-| should be the shortest time that still allows for MZ to detect a rising/falling edge of the serial clock and get the serial data bit.
|+| time not critical as Arduino is the clock master: this time may vary because it includes reading SD, updating GUI and should be long enough for the MZ to get a data bit and shift it to a byte in memory and so on.

Just for reading, two wires are only needed. A byte is read just after toggling 8 serial clocks instead of reading 18 levels at fixed periods. There is no long GAP (around 5s!), No TAPEMARK, just a byte sequence. So it should really be faster and stable enough as long as Arduino is the one to orchestrate the transfer.

Post Reply