5 ms·
MetalNES: Transistor Level NES Simulation
- theogravity 5y agoWould be really cool to see a video of this in action.
- hedgewitch 5y agoThat it would. I don't have access to a Mac or time to get it building elsewhere, so a video would be great.
- danaris 5y agoI don't really pretend to understand much of what I'm seeing, but I've recorded a short video of it running and uploaded it to my server [0]. From what I can tell, this 3-minute video shows the process of generating 2 and a bit frames. [0] http://topazgryphon.org/metalNES.mp4 http://topazgryphon.org/metalNES.mp4
- loeg 5y ago~9000 cycles/sec (displayed in the video), wow! For comparison, the NES ran at 1.8 MHz, or about 200x faster. From the number of frames drawn and time, I'm guessing this simulator is actually averaging much lower than 9 kHz.
- Scuds 5y agogo lil' electron beam, go! 9000 cycles/s / 1.79 MHz = 0.5% of realtime. The only time you ever see rendering a line at a time is single stepping through an emulator. I wonder if this is how FPGA developers working in VHDL/Verilog see the world? https://www.patreon.com/posts/37038491 https://www.patreon.com/posts/37038491 here's a short clip of the VRAM of a PSX rendering about half of a completed frame of Final Fantasy 7's battle screen.
- 71a54xd 5y agoSuper curious about your personal server setup, mostly how you're serving content directly to the open web?
- TaylorAlexander 5y agoI mean you can always use a server on digital ocean or something. That’s how I serve web sites. It’s still just a Linux machine and you can throw whatever content you want on it.
- pubby 5y agoMetalNES is by the author of NESticle. Like Visual2C02 and Visual2A03, presumably it runs at such a slow speed that games are unplayable. Like, it may have taken hours to reach the SMB menu screen, but I would love to be corrected :)
- dr_dshiv 5y agoAbsolutely sick. Chip community is so rad.
- ReactiveJelly 5y ago0.5% of realtime: https://news.ycombinator.com/item?id=30482633 https://news.ycombinator.com/item?id=30482633
- DarylZero 5y agois this allowed for speedruns
- danaris 5y agoAllowed? Maybe, maybe not. Helpful? Extremely not. I just ran this on my high-end M1 Max, and it rendered 2 frames in roughly 3 minutes. Hardware-accurate emulation is, generally speaking, not fast emulation.
- rl3 5y agoHardware-accurate emulation in software is typically not fast. FPGAs however can achieve low-level emulation with a high degree of hardware accuracy: https://github.com/MiSTer-devel/Main_MiSTer/wiki https://github.com/MiSTer-devel/Main_MiSTer/wiki
- monocasa 5y agoThe 6502 unfortunately relies on some effects that can't be described in FPGA synthesizable logic. You might get a lot of speed up over the extremely simplified spice style simulation you have to do that still might get you to real time, but it's not the slam dunk you might think.
- russdill 5y agoSounds interesting. Any citations where I can read more about those effects?
- monocasa 5y agoYou can sort of divine them from how the undocumented instructions work. https://www.pagetable.com/?p=39 https://www.pagetable.com/?p=39 It more or less falls under true classic highz buses with multiple drivers. You have three options I can see 1) treat it as a spice simulation that aggressively optmizes to synthesizable logic most places other than the problem parts. 2) hand replace the problem parts with synthesizable logic sorta like how Nvidia replaces graphics shaders with had written replacements in their drivers 3) just throw the whole thing into a spice simulation
- aliswe 5y agoiirc this is what they said would never be possible with any computer, whatever the specs (at real life speed).
- kamray23 5y agoIt won't run at real-time speeds. Way, wayy slower. You could put this on a FPGA though, if you port it to one. Then it would run in real-time. I doubt it will run exactly as it is, with the limitations an FPGA provides. The logic should be fine though.
- gary_0 5y agoReminds me of GateBoy, which was posted a while back: https://news.ycombinator.com/item?id=28396927 https://news.ycombinator.com/item?id=28396927, https://github.com/aappleby/MetroBoy https://github.com/aappleby/MetroBoy GateBoy runs surprisingly fast for a gate-level simulation.
- deleted 5y ago[deleted]
- SLWW 5y agoI love this mans work; even if getting it to run at 100% might see me an old man, if not me, then my children.
- cubefox 5y agoNot to be picky here, but silicon is not a metal, but a metalloid. MetalloidNES sounds great in my opinion.
- Quindecillion 5y agoI would get a little kick out of playing Metroid on that.
- quanto 5y agoWhat does it mean to be a transistor-level simulation in this context? I used to work with circuit simulators to design circuits (discrete and integrated) and there are many transistor models (mathematical models) depending on the use case. In spirit, not too unlike DFT for Schrodinger equations in quantum mechanics.
- BHSPitMonkey 5y agoMost game emulators are looking at the instructions from a ROM file and then implementing those CPU instructions in code. Usually with those approaches there are inconsistencies due to the original game console's quirks (or bugs/flaws) that show up during gameplay, making the emulation not completely true to the original hardware. In this context it means emulating "perfectly" by actually simulating the hardware in full instead of taking the aforementioned approach.
- quanto 5y agoSo, in this context, transistor-level simulation does not mean actually simulating transistors (voltages, currents, doping, etc)?
- Volker_W 5y agoI would guess "transistor-level simulation" means you simulate a NAND transistor by doing something like. bool c = !(a && b)
- JoeAltmaier 5y agoMaybe saying 'gate-level' would be more accurate
- aappleby 5y agoNiiiice. -Austin, GateBoy guy.
- beprogrammed 5y agoA beautiful small codebase from which to run little experiments.