[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Carte Blanche MMC/SD "disk" update
- Subject: Carte Blanche MMC/SD "disk" update
- From: Alex Freed <alex_news@mirrow.com>
- Date: Sat, 30 May 2009 21:51:51 -0700
- Newsgroups: comp.sys.apple2
- Organization: Netfront http://www.netfront.net
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
- Xref: g2news2.google.com comp.sys.apple2:11258
I did some more work on the subj. A while ago Stephen A. Edwards of
Columbia University saw my first Apple on FPGA and wrote his own
version. One feature was a fully hardware implemented (read only)
"floppy" interface using an MMC card. A complex state machine
initialized an MMC card that contained a NIB image of a floppy and read
a track into a buffer. The rest was the same as in my FPGApple - the
hardware tracked the "head movement" and fed a sequence of nibbles to
the CPU. Very cute but not very practical IMHO - only a single NIB image
on a huge MMC/SD card.
This inspired one improvement I made to the CB disk interface. I have
added a state machine that initializes the memory card at reset and
reads a 512K block from MMC into the internal FPGA memory.
The interface works like this. Assuming the card in slot 4.
Write to $C0CC - reset MMC.
Write to $C0C4, C0C5 and C0C6 - low, med and high bytes of a block
address on the MMC card.
Write to $C0C0 starts a read block operation: 512 bytes read into the
internal memory that is mapped (after reading from C4xx) to $C800.
So the whole block is directly available in the 6502 memory space.
Probably makes it the fastest disk access in Apple 2 history :)
There are also addresses for lower level SPI access: set/clear the chip
select and write/read a byte via SPI which allows any SPI operation by
an Apple program. For example write multiple blocks.
I may add DMA - read directly into the Apple's main memory if I have
time but it's a lower priority task.
If anyone want to write a UI and needs more hardware features now is a
good time to suggest it so it can be included into the default
configuration.
-Alex.