For the past couple of months I’ve been working on a small, low-cost successor to the PETvet, which was a 6502 RAM/ROM replacement board with debug capabilities over a serial port. At the same time, I wanted to learn a bit about FPGA development, so the ROMulator was born.
The ROMulator uses a Lattice UltraPlus FPGA to implement both a full 64k memory map plus memory decode logic to enable/disable different sections of memory. It also allows halting a running 6502 CPU and sending out the memory contents over SPI to a connected Raspberry Pi. You can also update the memory contents and resume CPU execution.
The ROMulator has two separate small boards – a 6502 socket board which takes, surprise, a 6502 CPU, and a few 74LVC245 level-shifting buffers to convert 5v logic from the CPU to 3.3v which the FPGA can handle. Connected to this board is a DIP breakout with the FPGA, which also has regulators for the appropriate voltages to power the FPGA and an SPI flash. The flash stores both the FPGA bitstream which defines its hardware implementation and up to 16 full 64k memory maps, which are selectable by a DIP switch on the ROMulator. This allows you to pick any of these for your boot ROM image.
24 thoughts on “ROMulator 6502 is ready!”
I’m so glad you’ve been able to complete this 🙂 I’ve been trying to get my hands on a PETVet for over a year now in order to diagnose an issue I’m having with a PET I bought on eBay. Just ordered a ROMulator (love the name) and look forward to using it in my PET.
I plan on buying a Commodore SuperPet (8xxx series w apl, Fortran, Pascal and Basic 4.0 ROMs).
Will this work with this one?
Yes, the ROMulator should work fine with the SuperPet. I don’t have one to test on so I haven’t checked directly but should work fine in most any 6502 machine. We would need the contents of the ROMs used in the SuperPet so this can be added as one of the switch settings on the ROMulator, but that should not be difficult.
For SuperPet usage, you will have to look closely at a signal called /NoROM which is just a pull up in the 8032, but is asserted low in the SuperPet to float the ROMs in the main board so the 6809 uP (on another board) can take over the bus and use the I/O, video RAM and main RAM. This signal will have to partially disable the ROMulator and float key 6502 signals but allow usage of the main RAM I believe. It may be tricky. And there may be a mechanical clearance issues with your board fitting on the additional SuperPet board. At least the 6502 itself has to be on that board. There is a ribbon cable that connects to the 6502 socket on the mainboard to the SuperPet board. The Zimmer page has all the details on the SuperPet. Your Romulator does work perfectly on my 8032.
Hi, wow – the ROMulator sounds like an amazing project! does it work with the original PET 2001 ? would i use setting 0 and 1? if so, what does “NON-CRTC” and “Business Kbd” mean? I don’t have a Pi – does it offer any other debug out options, uart maybe ?
Thanks! Yes, it does work with the original 2001. The 2001 lacks the CRT control chip (CRTC) found in the later models, hence the NON-CRTC.
These settings just correspond to specific sets of ROMs in the machine, if you let me know the ids of the ROMs in your PET I can confirm which setting it would be.
Using a uart as a debug console is definitely possible, but requires a firmware update. Since the fpga on board can essentially become whatever hardware you want it to be (within reason) it can be updated to use the debug pins as a serial port rather than an SPI interface. I’ll send you an email with more information, thanks.
Saw the ROMulator on Adrian’s Digital Basement YouTube channel. What a cool idea and product!
I have some questions about how this might work on an Apple //e. Can the ROMulator be configured to “intercept” only certain banks of memory and otherwise pass access through to the original RAM? The reason I ask is because certain banks of memory on the Apple are used for things like I/O soft switches and video memory, and I wouldn’t want the ROMulator intercepting those addresses.
Yes, definitely. The ROMulator can be configured to pass through sections of memory space, which will just cause reads and writes from the CPU to go to the motherboard rather than the ROMulator’s onboard memory. This is needed for I/O space, as you mentioned.
I’ve ordered this to use on an Apple IIe as well. Watching Adrian’s channel and looking through the github site, I see how you can map memory as needed. Is there any way you could also implement the ability for the apple IIe/IIc to access 128k through bank switching in/out a second set of 64k of ram through soft switches?
For reference on the soft switches and memory mapping on the 128k IIe/IIc:
Banking through soft switches should be possible by adding a new Verilog module. The FPGA used in the ROMulator (ice40up5k-sg48i) has 128k of ram total onboard, so it may not be possible with this FPGA to get up to a full 128k memory in addition to replacing ROM, maybe just 96k, but will have to see how that goes.
Just ordered a ROMulator. I’m so excited and can’t wait to try it on my Apple II.
This is a brilliant piece of kit! I’ve built a few of Nicholas Welte’s RAM/ROM replacement boards for the PET but can see many more uses for the ROMulator. Have put my name on the backlog list for 2 units. 🙂
Have you considered a Z80 version? Will be epic for the vintages computers using the Z80.
Yes, a Z80 version is in development! You will be able to use the same FPGA board with the Z80 version, possibly without reprogramming, and just replace the interface board with the socket. Nice because the FPGA board is where most of the cost lies, so will be fairly cheap to have the capability of running on both 6502 and Z80. Other 8-bit CPUs should be possible as well, with a similar interface board replacement.
Does it work with a 6510? IE C64 or C128?
The current version of the ROMulator does not work with a 6510, due to the different pinout than a 6502. But with a small redesign of the interface board on the ROMulator which changes the socket pinout, it could. You could still use the same FPGA board, which is the more expensive part, so a replacement interface for different CPUs would be quite cheap. A Z80 version, for example, is under development now.
This thing is super cool. If a 6510 version was ever perused any thoughts on how difficult it might be to add support for features similar to BWACK’s Kernal Switcher? LED status and RESTORE key switching between a predefined set of kernel roms. The Romulator is far more versatile than a simple Kernel switcher, but would be an ideal solution with a few quality of life features. Hell then we just need to add a Commodore Bus interface for it on the Pi and it could be the end all solution! 😛
In all seriousness I’d like your thoughts on the Kernal switching; not your thoughts on if YOU would do it; I get you have other priorities. Rather it’s something I’m mulling over and was just curious if you might share any insight regarding such an endeavor.
Could a special interface board sized for the 6502, with some additional pins and passives be enough to add such functionality, or would you really need to add additional points of integration on the FPGA board?
It’s a pretty awesome project regardless, hope to hear from ya.
Any idea when ROMulator-6502 will be ready again? Chip shortage?
ROMulator 6502 is available again. Sorry for the wait!
Alright slightly embarrassing question. Could you come up with a NOOBs guide to using this please.
I have been over the git-hub page and unless I am really just missing the info in front of me I am confused. Everything seems to kinda be showing 4 dip switches not 8. And the linked videos are four switches. If you have or could come up with just a quick visual guide to the 8 dip switches for ROM selection, ROM on/off, RAM on/off. If it is there and I missed it I apologize.
Thanks and have a great day.
I’m working on a video tutorial for getting started with the ROMulator, which should be ready this week. Will let you know when I have that up. As for the switches – on early revisions of the ROMulator board, I used 4 switches instead of 8. This means that on those boards, you can only access settings 0-15 using switches 1-4. Until recently the upper 4 switches were unused, so there was no difference, but recently made a change to use switch 5 to allow up to 32 different configs on the 8 switch model.
Just ordered one of these to bring up my Commodore LCD machine. Looking for the settings documentation in the mean time.
Bil Herd (old Commodore Engineer)
If you have the romulator software installed on a raspberry pi and you want to update the software is “sudo apt update” followed by “sudo apt upgrade -y” enough or is there another way you need to update the software.
On the pi to update to the latest software in the repository, run “git pull” from the bf-romulator directory.