Jump to content
IGNORED

ROM emulator


sage

Recommended Posts

With the huge caveat of "I have no idea what I'm doing", I was able to take sage's original idea and build out a simple EPROM emulator using a Teensy 4.1.  I open sourced it here:  https://github.com/BrianPeek/EPROMEmu

 

Again, and I can't stress this enough, I have no idea what I'm doing.  I'm not a hardware guy.

 

But, this hardware, plugged into an old Lynx EPROM cart I had works 100%.  I've also used it with a Game Gear and Vectrex EPROM cart, so it's not completely the wrong approach. :)

 

Adding a wire from the cart's VCC to the power supply of the Teensy allows me to power the Lynx from the USB cable connected to the PC, which is nice.  I'll probably add a jumper or something to a future revision.  I also ended up adding a quick Reset button to the Lynx so I can quickly upload and reset the console to see the results.

 

Anyway.  YMMV, very much a "works for me" project, but thought I'd share since this is where the idea started for me.

 

Thanks!

image.thumb.png.0f04a62bfa9cd589f25c8b3fcf923161.png

Edited by peekb
  • Like 1
Link to comment
Share on other sites

3 hours ago, sage said:

looks nice. maybe i should have gone for pcb design and not solder some fly-wired shit.

Thanks! And again, thank you for the idea.  :)

 

I, too, started with breadboard/soldering nightmare, but I just couldn't keep everything straight and working.  The PCB worked the first time out and was far more stable.

Link to comment
Share on other sites

On 10/7/2022 at 2:49 AM, peekb said:

With the huge caveat of "I have no idea what I'm doing", I was able to take sage's original idea and build out a simple EPROM emulator using a Teensy 4.1.  I open sourced it here:  https://github.com/BrianPeek/EPROMEmu

 

Again, and I can't stress this enough, I have no idea what I'm doing.  I'm not a hardware guy.

 

But, this hardware, plugged into an old Lynx EPROM cart I had works 100%.  I've also used it with a Game Gear and Vectrex EPROM cart, so it's not completely the wrong approach. :)

 

Adding a wire from the cart's VCC to the power supply of the Teensy allows me to power the Lynx from the USB cable connected to the PC, which is nice.  I'll probably add a jumper or something to a future revision.  I also ended up adding a quick Reset button to the Lynx so I can quickly upload and reset the console to see the results.

 

Anyway.  YMMV, very much a "works for me" project, but thought I'd share since this is where the idea started for me.

 

Thanks!

image.thumb.png.0f04a62bfa9cd589f25c8b3fcf923161.png

Can you put the schematics also as PNG or PDF in the repo?

I wonder about voltage translation. I guess the Teensy is 3V3 but the Lynx is 5V.

Link to comment
Share on other sites

On 10/17/2022 at 12:05 PM, peekb said:

HC245 handles the voltage conversion to/from 5V/3.3V.  It also is a tri-state buffer, which allows me to Z-state the data pins on the "EPROM" when CE/OE isn't set.  I'll get a PNG/PDF schematic up this week, I was out of town all last week.

PDF Schematic posted here:

 

https://github.com/BrianPeek/EPROMEmu/blob/master/schematic/epromemu.pdf

  • Like 1
Link to comment
Share on other sites

I need to test myself, but I doubt the HC245 will convert the 5V to 3V3 or vice versa.

Quote from another forum:

"Irrespective of the direction, the output will be just about the Vcc level."

 

Edit: Ok, I get it 🙂

 

Data is i.MXRT => Lynx => 5v for the '245

Address is Lynx => i.MXRT => 3v3 for the '245

Edited by 42bs
  • Like 1
Link to comment
Share on other sites

13 hours ago, sage said:

I am more afraid of the short between USB 5V and Lynx 5V. USB is supposed to have +-5%, you may burn your pet.

I think my schematic is newer than what my list spin was.  I don't have them tied together in the original version, but added it later.  I'm not convinced it's the right thing, either.  That said, I can power my Lynx + this hardware from my USB port, which makes it pretty seamless.


Next version will probably have a jumper on the VCC<->USB power so one can easily enable/disable.  And a header to send data via serial with an RS232<->USB adapter, like an FTDI breakout board.  I've bodged that up on my current PCB but will make it more official in the next update.

 

 

Remember, as I said in the first post, I have no idea what I'm doing.  I'm just making something that works for me. :)

Link to comment
Share on other sites

3 hours ago, 42bs said:

Send data to the imxrt or to the Lynx? Wouldn't it be easier to have a CDC device on the imxrt and use direct USB? Or even Ethernet?

To the imxrt/Teensy.  I'm only ever sending ROM data to the device.  This isn't a Lynx-specific thing, I'm just wanting to "emulate" an EPROM.  You can use several of the GPIO pins as virtual serial ports.  You only need gnd and rx pins.  For my usage, easier than dealing with Ethernet.  Direct USB is what I'm using now, however this is where the power situation.  You'd have to decouple USB power from the data transmission via USB.  For me, the easiest way to do that was via serial.  <shrug>

Link to comment
Share on other sites

It is your project, but it sounds weird to use an FTDI connected via USB to the PC to have a serial connection when the Teensy has already a USB socket which can act as virtual COM.

But I understand, it eases decoupling the 5V lines.

 

Link to comment
Share on other sites

uneducated hint for improvement:

  • add zener between USB5V - teensy 5V - lynx 5V. that way teensy is always supplied with 5V, but neither will LYNX drive the USB of your PC, nor the PC usb power your lynx (for safety). But make sure GND is common for all and connected
  • use 244 instead of 245 for data pins, this saves you the direction.
  • for address pins, you can use even simpler chips, as you do not need the "enable" at all, simple i2c level shifters may do
  • if you add comlynx, you may want to use also simple chips (e.g. I2C level shifters). dont forget the diode between RX and TX, otherwise you cannot send from Lynx side. suggest not to connect comlynx 5V to the rest beside the comlynx level shifter.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...