News for hackers. Stuff that matters.
Re:MiSTer, an open-source FPGA gaming project by GekkePrutser on Sunday April 11, 2021 @02:47PM (#26772476)
This isn't really new, right? I've heard of this years ago.

But it is an amazing project. Instead of emulating, they actually rebuilt the old custom ICs (which 8-bit computers were full of) in an FPGA. Really impressive.

Re:MiSTer, an open-source FPGA gaming project by near on Sunday April 11, 2021 @03:13PM (#26772650)
It is indeed an amazing project, especially its open source nature. It provides some impressive power savings and latency reductions that are very hard to match with general purpose CPUs.

But in most cases, it is emulation, as the lead developer will attest.

https://github.com/MiSTer-devel/Main_MiSTer/wiki/Why-FPGA

"From my point of view, if the FPGA code is based on the circuitry of real hardware (along with the usual tweaks for FPGA compatibility), then it should be called replication. Anything else is emulation, since it uses different kinds of approximation to meet the same objectives. Currently, it's hard to find a core that can truly be called a replica – most cores are based on more-or-less functional recreations rather than true circuit recreation. The most widely used CPU cores – the Z80 (T80) and MC68000 (TG68K) – are pure functional emulations, not replications. So it's okay to call FPGA cores emulators, unless they are proven to be replicas."

But there's nothing wrong with emulation for preservation, until we get to a point where we can wide-scale clone these older chips down to the transistor level through analysis of delayered decap scans. And even then, emulation will be useful for artificial enhancements as well as for understanding how all those transistors actually worked at a higher level.

It's also not a total solution: by taking many more transistors to programmatically simulate just one, it limits the maximum scale and frequency of what it can support. N64/PS1/Saturn has not yet been fully supported and is still theoretical, but likely, to be possible. Going beyond that is not possible at this time.

Software emulation and FPGA devices should be seen as complementary approaches, rather than competitive. The developers of each often work together, and new knowledge is mutually beneficial.

Re:MiSTer, an open-source FPGA gaming project by GekkePrutser on Sunday April 11, 2021 @04:36PM (#26773183)
Ah ok I wasn't aware of this. I thought it was spot on.

And yeah I hope we can easily order small batches of ICs (at big pitch of course) in a few years, in a similar way to how creating PCBs has become so simple now.

I mean I remember how much of a PITA it was in the 80s. Drawing on overhead sheets. All the acids and other chemicals. Drilling. And now we get super-accurate 10x10cm boards dual-layer, drilled, soldermasked and silkscreened for a buck a pop with a minimum of 10. Wow. I really hope this trend continues down to the scale of ICs (or that FPGAs simply get better/easier).

By the way, emulating a CPU is pretty easy and very accurate anyway. The big problem with accurate emulation is with some of the peripheral ICs which used hard to emulate stuff like analog sound generators.

Re:MiSTer, an open-source FPGA gaming project by mschuster91 on Sunday April 11, 2021 @04:20PM (#26773056)
> It's also not a total solution: by taking many more transistors to programmatically simulate just one, it limits the maximum scale and frequency of what it can support. N64/PS1/Saturn has not yet been fully supported and is still theoretical, but likely, to be possible. Going beyond that is not possible at this time.

The limiting factor here is the amount of stuff you can throw into a single FPGA, correct?

So in theory, shouldn't it be possible to tie a bunch of FPGAs together, with two beefy ones being responsible for replicating CPU / GPU functionality, a couple smaller ones for sound and other "helper" processors, and some bog-standard ARM SoC to provide the bitstreams to the FPGAs and emulate storage (game cartridges, save cards) and input elements (mainly "modern" controllers)?

Re:MiSTer, an open-source FPGA gaming project by near on Sunday April 11, 2021 @04:26PM (#26773096)
There's both a cost and a speed barrier to it. FPGAs are often used to design, simulate, and test modern circuits at sub-realtime speeds. No amount of FPGAs will get you a PS2 emulator at playable speeds right now, let alone a PS3/Switch emulator. PCs can do that today by taking shortcuts such as dynamic recompilation and idle loop skipping.
Re:MiSTer, an open-source FPGA gaming project by vardump on Sunday April 11, 2021 @04:48PM (#26773284)
Hmm... looking at the frequencies and gate counts, I think PS2 is well within realm of possibility to run on a not-so-cheap FPGA (or several). But PS3 generation consoles definitely not.
Re:MiSTer, an open-source FPGA gaming project by duskwuff on Sunday April 11, 2021 @04:26PM (#26773098)
> The limiting factor here is the amount of stuff you can throw into a single FPGA, correct?

And the speed that you can get your design to run at. Something like the Game Cube (PPC750 @ 485 MHz) would be difficult to implement in an FPGA, for example.

Re:MiSTer, an open-source FPGA gaming project by floatboth on Sunday April 11, 2021 @03:27PM (#26772760)
Well, yeah, it's not replication if it's not an exact hardware replica, but the word "emulation" has very "software" connotations. I guess let's call it.. recreation? (That word is even in the quote above!)
Re:MiSTer, an open-source FPGA gaming project by someperson on Sunday April 11, 2021 @05:52PM (#26773791)
"FPGA re-implementation" may be a better term
Re:MiSTer, an open-source FPGA gaming project by jamespo on Sunday April 11, 2021 @03:29PM (#26772775)
So it's not perfect but it's better than emulators...
Re:MiSTer, an open-source FPGA gaming project by near on Sunday April 11, 2021 @03:46PM (#26772865)
In latency and power usage, yes. In compatibility and accuracy, no. Both are Turing complete, so there's nothing you can do with one that you can't do with the other.

If you take the SNES core, my software emulator has 100% compatibility and no known bugs, and synchronizes all components at the raw clock cycle level. It also mitigates most of the latency concern through a technique known as run-ahead. But it does require more power to do this.

Re:MiSTer, an open-source FPGA gaming project by stormbrew on Sunday April 11, 2021 @03:47PM (#26772868)
I'm really curious where you got "better" out of the quoted text. Because it's not there or implied, but people keep reading this into anything about fpga recreations of chips. There's nothing inherently better about doing emulation on an fpga or a cpu, other than basically the amount of electricity involved in doing it.

But people keep presuming an improved accuracy that there's no basis for.

Re:MiSTer, an open-source FPGA gaming project by cmrdporcupine on Sunday April 11, 2021 @04:37PM (#26773188)
Lower latency is definitely a thing. With FPGA it's possible to 'chase the beam' like the original hardware, and have much reduced input latency from devices, etc. With an emulator you're going to be fighting the OS and the frameworks you built on top of. Even if you go "bare metal" (like my friend's BMC64 project which runs a C64 emulator like a unikernel on the RPi with no OS) you are still dealing with hardware built for usage patterns very different from the classic systems. You're always going to be one or more frames behind.
Re:MiSTer, an open-source FPGA gaming project by near on Sunday April 11, 2021 @04:43PM (#26773231)
That is true. There are however techniques software emulators can use like run-ahead that can get you lower latency than even the original hardware on a PC: https://near.sh/articles/input/run-ahead

The caveat is that it doesn't always work, and it makes the power requirements even more unbalanced. Some might also see it as a form of cheating to go below the original game's latency. If you want to match the original game's latency precisely, FPGAs are the way to go right now for sure.

Re:MiSTer, an open-source FPGA gaming project by tediousdemise on Sunday April 11, 2021 @05:26PM (#26773598)
Run-ahead seems pretty cool, great technical write up. How would you compare this to the feature called frame-skipping that I often see implemented in software emulators?
Re:MiSTer, an open-source FPGA gaming project by near on Monday April 12, 2021 @06:15AM (#26777793)
Frame-skipping is just a speed hack of skipping rendering every other frame or so, and makes games very unenjoyable to play. It won't help with input lag at all.
Re:MiSTer, an open-source FPGA gaming project by idonotknowwhy on Monday April 12, 2021 @06:17AM (#26777806)
Agreed about chasing the beam. With a SNAC addon and a CRT TV, you can even hook up original light guns to the mister and they work prefect.
Re:MiSTer, an open-source FPGA gaming project by emodendroket on Sunday April 11, 2021 @04:15PM (#26773031)
Probably the marketing copy for Super NT and similar products... harder to get people to part with hundreds of dollars if your pitch is "lower power draw and reduced input delay"
Re:MiSTer, an open-source FPGA gaming project by tediousdemise on Sunday April 11, 2021 @02:57PM (#26772548)
Yeah, it really is an amazing application for FPGAs—preserving computing and gaming history. The list of cores available for MiSTer is simply staggering:

> Computers - Classic

• Acorn Archimedes • Acorn Atom • Alice MC10 • Altair 8800 • Amiga • Amstrad CPC 6128 • Amstrad PCW • ao486 (PC 486) • Apogee • Apple I • Apple II+ • Apple Macintosh Plus • Aquarius • Atari 800XL • Atari ST/STe • BBC Micro B,Master • BK0011M • Color Computer 2, Dragon 32 • Commodore 16, Plus/4 • Commodore 64, Ultimax • Commodore PET • Commodore VIC-20 • DEC PDP-1 • EDSAC • Galaksija • Jupiter Ace • Laser 310 • MSX • MultiComp • Orao • Oric 1 & Atmos • SAM Coupe • Sharp MZ Series • Sinclair QL • Specialist/MX • TI-99/4A • TRS-80 Model 1 • TSConf • Vector 06C • X68000 • ZX Spectrum • ZX Spectrum Next • ZX81

> Consoles - Classic

• Astrocade • Atari 2600 • Atari 5200 • Atari Lynx • AY-3-8500 • ColecoVision, SG-1000 • Gameboy, Gameboy Color • Gameboy Advance • Genesis/Megadrive • SMS, Game Gear • MegaCD • NeoGeo • NES • Odyssey2 • SNES • TurboGrafx 16 / PC Engine • Vectrex

> Other Systems

• Arduboy • Chess • CHIP-8 • Epoch Galaxy II • Flappy Bird • Game of Life • TomyTronic Scramble

Re:MiSTer, an open-source FPGA gaming project by pomian on Sunday April 11, 2021 @04:14PM (#26773028)
Interesting project would be to dig out some old cassettes from, let's say, commodore 64. Try to load them into a present day computer by patching wires/cables? - and see if they run in this system. I remember writing for example: a mining program, to calculate, overburden, volume and tonnage, at different slopes, different rock types, etc. The science behind the calculations is still valid, but we could likely increase load times, and calculating times.
Re:MiSTer, an open-source FPGA gaming project by timbit42 on Sunday April 11, 2021 @03:26PM (#26772747)
I'm still waiting for the KENBAK-1 core.
Re:MiSTer, an open-source FPGA gaming project by tediousdemise on Sunday April 11, 2021 @03:38PM (#26772829)
Is there good documentation or ICDs out there that adequately describe the architecture? Looks like there’s only 50 that were ever made, and only 14 believed to exist today.
Re:MiSTer, an open-source FPGA gaming project by zokier on Sunday April 11, 2021 @04:16PM (#26773035)
http://kenbakkit.com/manuals.html

Seems pretty well documented. Considering the simplicity of the computer, feels like it would be relatively easy project to get to MiST

Re:MiSTer, an open-source FPGA gaming project by jonny_eh on Sunday April 11, 2021 @02:53PM (#26772519)
Old projects get reshared many times. It's always new to someone.