by dark-star · 2y ago · 0 comments
It's emulation, plain and simple. Not bettero or worse than software emulators. It usually lags behind the pure software emulators because there are fewer devs and because emulating stuff in hardware is harder than emulating stuff in software.
Just because it's in hardware doesn't mean that it is "better" or "more accurate".
From newest to oldest:
- Cycle-stepped Z80 emulator: https://floooh.github.io/2021/12/17/cycle-stepped-z80.html
- Z80 instruction timing details: https://floooh.github.io/2021/12/06/z80-instruction-timing.h...
- Cycle-stepped 6502 CPU emulator: https://floooh.github.io/2019/12/13/cycle-stepped-6502.html
Or would a GPU be more fit for this purpose, and a more cost-effective and practical solution?
In later computer architectures, hardware components have become more and more decoupled from each other, running on separate clocks and busses, with caches and buffers inbetween and what not, all of which makes timing less predictable but also less important in emulation, giving the emulation much more slack when it comes to "synchronicity" (which ironically makes modern computer systems "easier" to emulate than older systems - at least when it comes to correct timing).
But 8-bit home computers (and also the early 16-bit systems like the Amiga and Atari) were essentially a single 'mega-chip' all running off the same clock and all chip timings being deterministic, which was and is exploitet by software.
EDIT: That's why I point out PS2. The PS2 was the first system that was fast enough while being dependent on timing enough that there were huge issues with its emulation
Just because emulators often run under an OS doesn't mean that software emulation is inferior to FPGA emulation.
FPGAs and the associated dev tools allow for timing analysis/timing constraints that cannot be done with software based emulators.
For example, FPGAs themselves can be emulated in software with precise timing accuracy, so anything you can run on an FPGA can be emulated in software without the FPGA. It's difficult and sometimes infeasible with current CPUs to get up to the same speed though. This depends a lot on the FPGA circuit being emulated.
Source: I used to work on an FPGA-targetting hardware compiler and accelerated FPGA circuit simulators.
As such, an FGPA emulator isn't necessarily any closer to the original hardware behaviour than a software emulator. I guess the main advantage of FGPA is better performance on lower cost hardware.
The price of the majority of FPGA chips are really expensive compared even against cheap (yet still way more powerful) SoCs (like really cheap ARM CPUs that are used in sub $100 handheld emulators). Also, technically a FPGA based emulator could be more efficient compared emulating everything in software, but AFAIK even Analog Pocket is not really that better in battery life compared to say a Miyoo Mini + (maybe because a ARM SoC have better energy management, but I don't know).
I think really the main hype of FPGA is lower input latency, that is really difficult to archive with software emulation. There are still some tricks you can do in software that reduces the input latency significantly, but they generally are expensive to compute [1], so it wouldn't be feasible to be done in a cheap handheld device (at least yet).
[1]: https://arstechnica.com/gaming/2018/04/better-than-reality-n...
But the FPGAs are based on C software emulators because that's where all the knowledge in the world of how to emulate the original system is kept. You can't translate original hardware to Verilog and skip the figuring out how it works process.
A FPGA emulation isn't inherently better than a CPU-based emulation of any given chip; it's not more authentic because it still lacks the particular quirks of any old CPU that are associated with the way the hardware was laid out, path lengths, imperfections etc.
I'm glad it's introducing FPGA programming to a wider audience because FPGAs are probably going to become more important going forward - and are probably going to be what keeps Intel alive - but it doesn't make the emulator inherently better.
Personally I think that company's going, the only question is how long is it going to take...