Hacker News new | past | comments | ask | show | jobs | submit login
Ao486_MiSTer: i486 core for the MiSTer FPGA gaming system (github.com/mister-devel)
92 points by networked on March 5, 2023 | hide | past | favorite | 43 comments



I've written some small CPU cores in Verilog and used Logisim to design some small FPGA circuits but I can't fathom writing out an entire 486. Any info on what sort of project management or automation tools are being used to generate all this Verilog? Because this is literally tens thousand+ lines to define the functionality of a 486 and I can't imagine someone writing out register tables and kept track of naming and the pipelining all by hand. I'm guessing something like Vivado or some other IDE is used to help manage everything? I can't tell from the source in RTL. I find this use of FPGAs to replicate older CPUs/SOCs fascinating.


Many companies do just write entire modern SoCs in straight Verilog (maybe with some autogenerated Verilog hacked in there) with no other major organization tools aside from the typical project management stuff. The load-store unit of a modern CPU alone easily exceeds 10k lines of Verilog. It's a similar thing as people who work with kernels—after all, the page table management code in a modern operating system like Linux is absolutely monstrous but still people are able to understand it well enough to be able to make the changes they need and get out.

If you are interested in other languages which hope to make this sort of stuff easier, I'd recommend taking a look at design productivity languages like Chisel and it's associated Chipyard [1], SpinalHDL [2], and Bluespec [3]. Each of these are meant to make defining extremely complex hardware more manageable for humans and there's a lot of interesting work going on right now with each of them.

[1] https://github.com/ucb-bar/chipyard

[2] https://github.com/SpinalHDL/SpinalHDL

[3] https://github.com/B-Lang-org/bsc


I'm more curious if there is something that makes visualizing the Verilog easier... for instance, I've done some small projects where I used Digital [0] (which is so unfortunately named, but awesome) to put blocks of Verilog into the visual representation and then connect my blocks together (like ALU, block ram, registers etc) and run simulation. But the problem is taking all that out back to Verilog and then doing my synthesis with Yosys is a manual chore.

I am wondering if there is some sorta... IDE that is letting people inspect projects with lots in individual Verilog files quickly and show the structure visually (and manage test benches run Icarus and GTK wave etc). I haven't seen this outside of vendor-specific tools like Xylinx's Vivado and I'm wondering if I am just missing something or if that kinda of IDE doesn't exist in any open source tools just yet.

[0] https://github.com/hneemann/Digital

Edit- and yes I get that I'm probably just not used to the management of Verilog codebases and it's no different than software packages with lots of 'modules' and you just work on a module at a time and it isn't that crazy. But I find it odd that there aren't at least some more viz tools, considering functions of a CPU are so 'block' based... I'd love to be able to load up the RTL folder of one of the CPU projects and see how all these Verilog modules are connected to one another and to the top level. Size of the busses, number of instances, etc. As though it were a Logisim project.


I'd have also pointed you to Xilinx, more specifically their discontinued ISE product which we used for a university course. It did provide a schematic-style high level overview of how modules are wired together and also had a simulator which you could run from the IDE directly.


I reguarly use Vivado elaborated design view to browse RTL hierarchy. The schematic view, signal trace, etc is the best I've seen. You can also automate it with tcl, so I've used it to auto highlight clock domains in different colours, so you can see where crossings happen, etc.


Icestudio sounds similar to what you're looking for, but I'm not sure if it works with existing code.

https://github.com/FPGAwars/icestudio


Doesn't help with visualization, but there's a SystemVerilog/Verilog plugin for Jetbrains IDE (Clion etc) that is actually really helpful. Does renames, code completion, structural view, etc. like what you'd expect from a real IDE. I far preferred it to working in Vivado.

When I was using it, I used it with FuseSoC, and only dropped into Vivado when I needed to muss around with their "IP integrations, etc.


Based on the .q* files, I'm pretty sure it's https://en.wikipedia.org/wiki/Intel_Quartus_Prime


Many CPU/SoC systems could be made vastly simpler while maintaining binary compatibility if you're willing to sacrifice performance/area. Anything that's not visible from the ISA level can be implemented however one wants. You can cram more logic per pipeline stage, stall instead of having complicated bypass logic, etc. Much of the complexity of modern circuit design comes from the desire to eek out every last percent of performance from a process, which is completely unnecessary for a historical project like this.


There is a file generated by Quartus at https://github.com/alfikpl/ao486/blob/df6eba123654fdf3e3058c... I'm not sure, but it does seem mostly manual. I tend to agree that RTL is somehow particularly mind numbing. I would guess that in order to keep track of things you may have a large block diagram on paper beforehand.


For those who have not heard of the "MiSTer FPGA gaming system" before:

"MiSTer is an open project that aims to recreate various classic computers, game consoles and arcade machines, using modern hardware. It allows software and game images to run as they would on original hardware, using peripherals such as mice, keyboards, joysticks and other game controllers.

MiSTer utilizes an FPGA board called the 'DE10-Nano', which connects to your TV or monitor via HDMI video out. It can additionally be expanded with various add-ons (such as a USB hub, SDRAM, audio and VGA out)."

(from: https://github.com/MiSTer-devel/Wiki_MiSTer/wiki)


My understanding is that these are unobtanium now, and that the only reason it took off was the first boards were heavily subsidized by Intel.


Terasic still sells them. The price is much worse than when MiSTer was taking off, but my gut feeling is the project's picked up enough inertia that it doesn't matter. See: https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=...

Kit-sellers like Misteraddons also get them back in stock regularly. Reviews on their site suggest they shipped out a batch last month.


The prices on eBay seem to be about 2x what I paid in 2021. Wild.


I've played with it and it's almost perfect from a game preservation perspective except for one glaring feature missing, many old cd games used to read the audio tracks of cds but the ao486_mister doesn't support this. So a lot of games from the exodos collection that would be perfect for this will crash when they attempt to read the audio track.


Use a BIN/CUE format for these games.


Even with bin/cue format, last I tried, it didn't support audio tracks. See this forum thread that talks about it. https://misterfpga.org/viewtopic.php?t=2189

It might have changed but I haven't seen anything about that in the change log and the repo still says "Currently only data portion of CD is supported. "


Ah, sorry then. At least it parses the CUE files fine. Playing audio CD is shouldn't be a "big" task at all, basically you sent bits from the faked CD drive to the sound card.

https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr...

Implementing the whole fake unit reading the media would be the most difficult task by far.


I haven't looked into it but what might be complicated is implementing the support for audio cd in the vhdl of the sound card component...


Wouldn't it be a 486 SX-33 if there is no FPU?


That's what the project they pulled this from (ao486) says:

"The ao486 is an x86 compatible Verilog core implementing all features of a 486 SX"

https://github.com/alfikpl/ao486


Could you run old demos like Future Crew / Second Reality on this?

I’m always thinking about ways to capture old demoscene stuff in high quality video.


I don't see why not its basically a 386/33 performance wise. Why not just use PCem + OBS? If you go the mister route, the $50 capture box from EVGA works a dream. I'm able to get simultaneous component and HDMI using the analog add-on board. I run the HDMI out to a splitter then one output to HDMI>VGA for CRT monitor. The remaining HDMI cable to a capture box and pass through to my desk monitor. Lastly component in to a CRT TV. It all just works, at the same time.


PCEM it's far less compatible than an FPGA and maybe even DOSBOX-X in lots of cases.

Also, it requires a huge machine.


I can run 2n Reality in pcem on a jetson xavier nx with gravis sound. May be less compatible, but for things of 1993 era, it doesn't take that much machine.


Be sure to check out the old Mind Candy DVDs, they did a phenomenal job capturing demos to DVD and a blu-ray: http://www.mindcandydvd.com/


With two of these in parallel in a board, could it be possible to simulate a Pentium MMX?

The step would be huge. Enough to play MP3s/OGGs and even some OPUS files, MPEG video support, i686 compatible GNU/Linux (and non-GNU) distros too...


Pentium was 586, so would 686 Linux still work on that?


Pentium was 586, but Pentium MMX was 686.


No, P6 started with Pentium Pro, which originally didn’t have MMX.


Oh, my bad, you're absolutely right. I had those flipped in my head.


Is DE-10 Nano back in stock?


My understanding is you order it from the manufacturer. They for the past couple years have claimed a lead time of 4-6 weeks but consistently shipped in 10 days or so. No idea the current situation.


Looks like it's improved slightly then? They're estimating shipment by the end of the month at the moment.

https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=...


Ordering from Terasic will get you a board much quicker than waiting for one to show up at a distributor like Digikey given the current supply situation. Shipping times from Terasic also tend to be much quicker than they quote on their site. However, their shipping charges are quite steep, and you might get hit with duties as well.


The MiSTer is so cool, I wish I could just buy one though, with the whole kit. It seems impossible or extremely expensive. I hope this will improve as the component shortage subsides.


can it run crysis?


Only Dino Crisis (psx core)


No but it could run a Game Boy Color emulator with great 2D/2.5D action games such as Daikatana, Metal Gear:Ghost Babel, Indiana Jones... and a Z-macine (text adventures) interpreter with Spider and Web, Anchorhead... among a DOS build of Slashem.


Of course, you could just simulate a Game Boy Color directly on the MiSTer.


(Maybe you were joking.)


no, but it can certainly run Windows NT.


No but it certainly can run Doom




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: