Emulate an EPROM - How Hard Could it Be?

preview_player
Показать описание


Visit the element14 Community for more great activities and free hardware:

#EPROM #AppleII #Arduino #ArduinoMega #Teensy #RaspberryPi #PiPico #Digilent #DigilentDiscovery
Рекомендации по теме
Комментарии
Автор

Designing state machines is mostly a lost art. I've designed dozens of them but that's because I'm older than dirt. I never got around to learning C because it was too slow and It didn't give me the control of the processor that I needed. That said, I really enjoyed vicariously experiencing your path of discovery. I remember the excitement I had when my TRS80 made my ASR33 print from the keyboard. Good job man!

waynesmith
Автор

Interrupt latency is the bane of my existence. Great video!

andywest
Автор

Really liked every single moment in this video.
Thank you for taking us on your journey of discovery. Super relevant to people's experiences, and (as you already know) way better than just jumping to the final solution.

garrettnievin
Автор

I've played with the Pico PIOs and they're amazing. You can calculate the exact number of clock cycles for your code and get perfect timing. I'd love to see a PIO on the RPI5

JoshHeidenreich
Автор

I have seen a few projects where a similar thing was done as part of a larger project but with no details of how they did it. Thanks for all the info. I am just getting started in micro-controller communications and it really helps to see actual implementations. Wow do I have a lot to learn, just the jargon and acronyms make my head spin some times. Great video.

porticojunction
Автор

I thought this was going to end up being sort of the inverse of using an EPROM as a programmable logic device, but then I realized you were wanting to type via the microcontroller rather than operate strictly as the character ROM. EPROMs as PLDs is a fun thing to experiment with because you have many inputs (address pins) and either 8 or 16 outputs (data).

ZiggyTheHamster
Автор

A Cortex M7 with its MSP (main stack pointer) pointing to DTCM, and the interrupt vector table and code in ITCM should be able to enter the interrupt handler within 12 cycles, but the M7 based MCUs are often lack single cycle GPIO access because of the bridges between AXI, AHB and APB matrices e.g. on the dual core STM32H7xx parts the slower M4 cores directly connected to the AHB matrices have lower GPIO access latency and can respond to interrupts in 12 cycles as well.

Still the RP2040 is a great fit for your project and the PIO can should be able to perform address decoding for you like this. Wait for a valid address, shift it into the FIFO, have a DMA channel read from the FIFO into an other DMA channel configuration register and trigger that channel. This way the M0+ cores remain available and the Python overhead won't hurt your timing. To further improve latency you can make use of the two priority levels supported by the RP2040 bus matrix. That should be enough to emulate a ROM without jitter (as long as the ROM fits into SRAM). The PIO FIFO could also be polled from one of the ARM cores or raise a interrupt line on either ARM core to procedurally generate ROM content.

crestdazoltral
Автор

What if you used native C of even Assembly in the Teensy? I found that’s the arduino abstraction is hellishly inefficient. Pi Pico is a graceful solution.

CallousCoder
Автор

The RP2040 on the Pi Pico runs at 3.3V and has an absolute maximum I/O pin rating of VDD + 0.5V (so 3.8V here), but you seem to connect directly to the Apple bus running on 5V. Does the Pico pull down the bus high voltage, or have the ESD diodes in the RP2040 pins failed open?

steampower
Автор

Thank you for figuring this out! I recently attempted to use my old commercial versions (Flexrom and EE08) and found they needed parallel ports and not PCI based ones, old school PIO based ones. So aside from digging out a 486 and setting up DOS I figured there was some product out there that now did this....and I was disappointed. The best I could find was a MCU based project that overcame your problem by loading some latches up (74374 or something) to hold the address (hi/lo) and data.

I was kind of figuring that that access time (back in those days measured in hundreds of Nano seconds you be too fast for a modern high level language based MCU device? You saved me a pile of work!
subbed and thumbs up!

carlospulpo
Автор

7:07
These small captures of time. Seeing your reaction made me emulate it.
Gold. Literal Gold.

This maybe the first video I’ve seen of yours. It’s these little moments, combined with your teaching capabilities that make me hit the like button. 👍

Key timing too.
You just told me about your Jesus.
🙏

jjqformerlyjailbreak
Автор

The Pico PIOs look very, very interesting and promising to me since I've been trying to accomplish something very similar to what's being attempted in this video.
I too ran into problems while trying to emulate EPROM for my Z80 project with an Arduino nano and then later with a RPi Pico. At first it seemed to me obvious to use interrupts to control the logic of my program (toggle the WAIT control signal, sample the address bus, check the control signals to determine whether an input or output operation was being executed, read or write data to the data bus and then continue). I managed to get some meaningful output results from the arduino and so decided to use something way faster like a RPi Pico. At the beginning I thought that a 125 MHz MCU could easily outpace a Z80 that was running at a ridiculously low speed of ~370 KHz. I was wrong. I ended up using external digital circuitry to make the Z80 wait in order to allow the Pico determine what to do.

joecolchic
Автор

Nice Discovery 2 board! I had to buy the original Discovery 1 for classes and I still use mine (for scoping, supplying, and analyzing). While it isn't as good as something like a Keysight scope, I was still able to find an issue with an nRF dev board communicating with an ESP board by probing the serial lines.

danielbaek
Автор

Just before you started attempts I thought "this sounds like a perfect fit for the Pi Pico!"

DiThi
Автор

You got another subscriber just by being very happy and almost red when laughing, I like when people celebrate little conquests and move on. ;D

neofloripa
Автор

I don't understand the level conversion in your project the pico is 3.3 volts and the apple is 5 volts. Why does the pico not blowup with the input signals from the apple ?

justlostintime
Автор

How does the power consumption compare to the Apple 2 circuit?

rhowe
Автор

That is a great "evil genius" laugh.

SubTroppo
Автор

How hard could it be to do this with 555 timers instead?

Davedarko
Автор

Why aren't you just using a 74HC541 buffer or something comparable? It has three-state outputs, so you could just wire whatever slow signal you want to set on the bus into its inputs, and let its output-enable pin react incredibly fast on the "bus enable" request.

flodreiundneunzig