Why FDD does not allow load while cpu process interrupts?

Page 2/2
1 |

By Grauw

Enlighted (6538)

Grauw's picture

11-01-2018, 23:21

Those controller chips just have a large internal buffer (at least 512 bytes).

By maxis

Champion (473)

maxis's picture

12-01-2018, 00:17

It can be done, but it will look like the first Ethernet adapter with the external SRAM buffer. Otherwise, the controller logic with the sector buffer can be placed into the FPGA or a modern microcontroller.
The goal is automate the sector read-write operations.
When doing this, it will be cool to accomodate 1.44Mbytes format and also have a direct DSK on a floppy to memory exchange.

By Edevaldo

Resident (49)

Edevaldo's picture

12-01-2018, 06:00

Quote:

i suspect that hdd on msx works in others way right?

The hdd itself has large buffers (tens to hundreds of megabytes are common). From a floppy drive the controller is practically receiving the data from the read head. It is real time. I actually have one hooked up to a scope in my desk now, a 360k 5 1/4 one. I can see the bit-time is 4us. So every 32us it produces a byte, every 114 or so Z80 cycles. But due to tolerances you cannot really use all that time, you need margin. There are some drives that rotate at 360rpm and the bit time is 3.333us. 1.2M and 1.44M, if available for the MSX, would be 2.5us/bit...

Now about DMAs and offloading the CPU, for MSX I see two options, either the cartridge includes some RAM that the controller uses to make data available to the computer. Or a motherboard including the controller could use DMA.

By PingPong

Prophet (2977)

PingPong's picture

13-01-2018, 11:05

thx to all, i never imagined that the FDD had a so primitive data transfer protocol.

By maxis

Champion (473)

maxis's picture

13-01-2018, 22:31

Edevaldo wrote:

Now about DMAs and offloading the CPU, for MSX I see two options, either the cartridge includes some RAM that the controller uses to make data available to the computer. Or a motherboard including the controller could use DMA.

Local memory buffer with local DMA is the MSX compatible solution. The memory buffer can sit in a modern uC or FPGA. Even modern ARM uC is fast enough to read/write the disk track at once w/o FDC, just directly (like Paula+Blitter of Agnus of AMIGA OCS).

By TomH

Expert (99)

TomH's picture

14-01-2018, 04:59

PingPong wrote:

thx to all, i never imagined that the FDD had a so primitive data transfer protocol.

Well, once there's an FDC in between it's really as simple as instructing it go to a certain track and then to read a certain sector, after which it indicates each time that an additional byte is available and can provide the value of that byte, and will check CRCs for you.

Compare and contrast with the tape input: it's just a 1-bit DAC. All the processor can tell is whether the current input level is above the centre or not. It's on its own for tracking time, deciding what the incoming signals mean in terms of producing bytes, etc.

By PingPong

Prophet (2977)

PingPong's picture

14-01-2018, 13:49

@TomH.
I thing FDD electronics more sophisticated that a digital I/O entirely managed by CPU as Tape.
So for me it was perfectly logical that a interrupt driven music player could be done while doing FDD I/O.

Paradoxically, there are tape loaders that during cassette load are able to play music. Instead that is impossible with FDD....
https://www.youtube.com/watch?v=RbRB8p2Y0vY

By TomH

Expert (99)

TomH's picture

14-01-2018, 18:12

Being more low level, like the tape, is actually better for being able to do interesting things, because you can do whatever you want with the information stream. Music should in principle not be too hard: format the data you want to load into chunks of e.g. 1/10th of a second of data, each of which contains both the data and some new PSG state, and between each leave enough space on the tape for the amount of time you know it takes you to write the PSG state.

With a floppy there's a fixed-function intermediary so you're definitely blocked for the duration of each sector, and the time between reading sector n and sector n+1 is suddenly variable, no matter what you do, because they might be on different teacks. So you can't ensure anything about cadence.

Potential cool tape format: header, PSG state, header, PSG state, ad infinitum. It's just a digital audio tape for your MSX, that you can fast forward and rewind just like an analogue audio tape.

Page 2/2
1 |
My MSX profile