peekb Posted October 7, 2022 Share Posted October 7, 2022 (edited) 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! Edited October 7, 2022 by peekb 1 Quote Link to comment Share on other sites More sharing options...
sage Posted October 8, 2022 Author Share Posted October 8, 2022 looks nice. maybe i should have gone for pcb design and not solder some fly-wired shit. 1 Quote Link to comment Share on other sites More sharing options...
peekb Posted October 8, 2022 Share Posted October 8, 2022 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. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 11, 2022 Share Posted October 11, 2022 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! 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. Quote Link to comment Share on other sites More sharing options...
sage Posted October 16, 2022 Author Share Posted October 16, 2022 On 10/11/2022 at 2:13 PM, 42bs said: I wonder about voltage translation. I guess the Teensy is 3V3 but the Lynx is 5V. correct. that makes it a bit more complex. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 16, 2022 Share Posted October 16, 2022 15 minutes ago, sage said: correct. that makes it a bit more complex. But does the HC245 handle this? Quote Link to comment Share on other sites More sharing options...
sage Posted October 16, 2022 Author Share Posted October 16, 2022 in my understanding yes. but i used a different schematics for my tests. Quote Link to comment Share on other sites More sharing options...
peekb Posted October 17, 2022 Share Posted October 17, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted October 17, 2022 Share Posted October 17, 2022 I shall reactivate my GTX card extension idea. I think the I.MXRT is quick enough to generate sprites or pictures on the fly. Quote Link to comment Share on other sites More sharing options...
peekb Posted October 20, 2022 Share Posted October 20, 2022 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 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted October 20, 2022 Share Posted October 20, 2022 Hmm, I have doubts, but since it works ... I did not check the i.MXRT manual, but are the GPIOs 5v tolerant? Quote Link to comment Share on other sites More sharing options...
peekb Posted October 20, 2022 Share Posted October 20, 2022 14 minutes ago, 42bs said: Hmm, I have doubts, but since it works ... I did not check the i.MXRT manual, but are the GPIOs 5v tolerant? Doubts about what? As for 5V, according to https://www.pjrc.com/store/teensy41.html and the datasheet, no, hence the HC245s. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 20, 2022 Share Posted October 20, 2022 (edited) 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 October 20, 2022 by 42bs 1 Quote Link to comment Share on other sites More sharing options...
peekb Posted October 20, 2022 Share Posted October 20, 2022 54 minutes ago, 42bs said: Edit: Ok, I get it 🙂 Data is i.MXRT => Lynx => 5v for the '245 Address is Lynx => i.MXRT => 3v3 for the '245 Yes, exactly that. 😀 Quote Link to comment Share on other sites More sharing options...
42bs Posted October 20, 2022 Share Posted October 20, 2022 I wonder, if I want to write from Lynx to i.MXRT, would a second '245 with Vcc = 3V3 (and direction set correctly) be sufficient? Quote Link to comment Share on other sites More sharing options...
sage Posted October 20, 2022 Author Share Posted October 20, 2022 4 hours ago, peekb said: Doubts about what? As for 5V, according to https://www.pjrc.com/store/teensy41.html and the datasheet, no, hence the HC245s. I am more afraid of the short between USB 5V and Lynx 5V. USB is supposed to have +-5%, you may burn your pet. Quote Link to comment Share on other sites More sharing options...
peekb Posted October 21, 2022 Share Posted October 21, 2022 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. Quote Link to comment Share on other sites More sharing options...
42bs Posted October 21, 2022 Share Posted October 21, 2022 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? Quote Link to comment Share on other sites More sharing options...
peekb Posted October 21, 2022 Share Posted October 21, 2022 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> Quote Link to comment Share on other sites More sharing options...
42bs Posted October 22, 2022 Share Posted October 22, 2022 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. Quote Link to comment Share on other sites More sharing options...
sage Posted October 23, 2022 Author Share Posted October 23, 2022 On 10/20/2022 at 9:56 AM, 42bs said: I wonder, if I want to write from Lynx to i.MXRT, would a second '245 with Vcc = 3V3 (and direction set correctly) be sufficient? the 244 would do it, too (5V tolerant) Quote Link to comment Share on other sites More sharing options...
sage Posted October 25, 2022 Author Share Posted October 25, 2022 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. 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.