Mariano DM Posted March 21, 2021 Share Posted March 21, 2021 Hello. I'm starting to follow ben eater's project of a minimal 6502 computer. For the EEPROM part, I'm thinking on using SPI flash memory and figure out if there is an adapter to emulate those chips. Have you ever emulate eeprom with flash? is that even possible ? there is an eeprom emulator, but it uses a full arduino nano, maybe it is the next option. Cheers. M. Quote Link to comment Share on other sites More sharing options...
ChildOfCv Posted March 22, 2021 Share Posted March 22, 2021 It's certainly possible, but not easy. SPI flash memory is serial, first of all, while the 6502 is parallel. In addition, SPI flash memory uses memory access commands. You don't just send an address and then data. So a single, non-contiguous read consists of a read command (8 bits) followed by an address (some expected address length depending on chip size, possibly 20 bits at least). Then you have to give a certain number of clocks to process the command, and finally you can read the 8 bits. There are commands that allow for sending up to 4 bits at a time, and if you're new enough, you can even send them on both up and down transitions of the clock (DDR mode) to send/receive up to 8 bits per clock cycle. But that still means you need memory access glue logic that is many times faster than the 6502, and also a bit complex. Modern embedded processors have that memory access circuitry built in--just program the required commands, bit sizes, transfer sizes, bit sex, etc, and then memory access becomes completely transparent to the software. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 22, 2021 Share Posted March 22, 2021 6 hours ago, ChildOfCv said: Modern embedded processors have that memory access circuitry built in--just program the required commands, bit sizes, transfer sizes, bit sex, etc, and then memory access becomes completely transparent to the software. Say what now? Do you mean 'parity'? 3 Quote Link to comment Share on other sites More sharing options...
+DrVenkman Posted March 22, 2021 Share Posted March 22, 2021 16 hours ago, Mariano DM said: For the EEPROM part, I'm thinking on using SPI flash memory Here’s the fundamental question: why? Ordinary parallel EEPROMs are cheap, readily available, and easy to program. 1 Quote Link to comment Share on other sites More sharing options...
ojanhk Posted March 22, 2021 Share Posted March 22, 2021 (edited) Agreed, parallel eeproms are cheap and easy to use. If you want to use SPI flash, you’ll need to use SPI65 which is going to require some extra hardware and the code to manage this hardware. Simplest option would be to use SST39F010, it’s DIP package, flash so you can easily reflash each time you need to change something. I would also strongly recommend the excellent 6502 Primer by Garth WILSON:http://wilsonminesco.com/6502primer/ Edited March 22, 2021 by ojanhk 1 Quote Link to comment Share on other sites More sharing options...
ChildOfCv Posted March 22, 2021 Share Posted March 22, 2021 1 hour ago, danwinslow said: Say what now? Do you mean 'parity'? Nope, direction. Big endian vs little endian. In serial transmission, it matters both at the bit level and at byte boundaries. Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 22, 2021 Share Posted March 22, 2021 5 hours ago, ChildOfCv said: Nope, direction. Big endian vs little endian. In serial transmission, it matters both at the bit level and at byte boundaries. hah, ok. Never heard it called that. 1 Quote Link to comment Share on other sites More sharing options...
Mariano DM Posted March 28, 2021 Author Share Posted March 28, 2021 Thanks for the help, and the talk about the birds, the bees and the bits. Quote Link to comment Share on other sites More sharing options...
Mariano DM Posted March 28, 2021 Author Share Posted March 28, 2021 https://mygeekyhobby.com/2020/07/05/eprom-emulator/ indeed, although it looks like an interesting project. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.