
Tiny Emus: 8-Bit emulators - ingve
https://floooh.github.io/tiny8bit/
======
flohofwoe
Author here. The most recent change is that I started adding debugging UIs to
the emulators, using the excellent Dear ImGui
([https://github.com/ocornut/imgui](https://github.com/ocornut/imgui)).

The UI is in a separate version of the emulator, launched with the little "UI"
button in the top right corner of the image panels (e.g.
[https://floooh.github.io/tiny8bit/kc85-ui.html?type=kc85_4](https://floooh.github.io/tiny8bit/kc85-ui.html?type=kc85_4)).

The UI is updated once per 60Hz frame, so you only see a per-frame snapshot of
the microchip pins which on its own isn't that useful yet except for a nice
blinkenlight effect, but it will make a lot more sense once a step-debugging
window is added. This will let you inspect the pins after each CPU instruction
(still not as accurate as the emulation, which is running with machine-cycle
granularity on Z80, and clock-cycle granularity on 6502 machines.

The emulators are written in C(99), with some platform-specific bits written
in Objective-C and Javascript, and in C++ for the UI parts (since Dear ImGui
is implemented in C++). Apart from the WebAssembly version, Win32, Linux, OSX
and iOS is also supported, but you need to compile those yourself :)

~~~
titzer
This is super cool! And it's awesome that it uses WebAssembly.

------
z3phyr
Writing emulators is a lot of fun. Great stuff here :) Kudos!!!

A little off-topic: I end up doing a sub par job at writing some classic 8-bit
emulators myself. At first it looks pretty straightforward, but becomes
daunting as I progress, end up losing motivation for a couple of days before
starting yet another project. How do you correctly learn this magic?

~~~
flohofwoe
True, in the beginning it's tough because it takes so long until you can
actually run small emulated programs and even then there's no real emulated
computer yet, just a CPU. What kept me motivated was that I really wanted to
play the games I wrote as teenager again and there were only very few existing
emulators for this system, and none as easy to get running as just navigating
to a webpage. There was also a bit of (unfounded) fear that those games would
be lost since my own cassette tapes have rotted (unfounded because other
people took care during the 90's to digitize the tapes and put them on the
internet).

Once I had the first machine working (which required Z80 CPU, CTC and PIO
emulations), it was fairly easy to build emulators for the other East German
8-bitters, and after that for the ZX Spectrum, and with each new machine it
becomes easier and the chip emulations become better...

Another factor is that the emulators are only like a fallback project which I
return to when I don't feel like doing something else (usually I reserve my
Christmas vacation for this), and the emulators are also a nice testbed for my
other projects (the sokol cross-platform headers, and generally doing
WebAssembly stuff). These are small complete applications, yet built from very
little code, so they're quite easy to maintain and experiment with.

------
silverfrost
How do I load a game into the 48K Emulator - I notice there are some in the
github repo.

~~~
flohofwoe
If it's the right file format (.z80 snapshot file), you can drag'n'drop local
files into the browser window while the correct ZX version is running (48K vs
128).

------
robertsd247
I am wondering if there is any value of having old hardware around anymore.

~~~
sehugg
There's still no way to emulate 32-bit iOS apps.

~~~
Wowfunhappy
I am very worried that a lot of iOS games are going to be completely lost to
time, due to how locked down the platform is.

~~~
reaperducer
Aurora Feint is a good example.†

It was released the same year the App Store launched. My wife was addicted to
that game. The game and the author later disappeared. When my wife's phone was
stolen in Rome, she couldn't re-download the game because it wasn't available
on the App Store anymore.

Shame, too, because it was a really good game. I think it was the first app we
ever paid for.

†
[https://en.wikipedia.org/wiki/Aurora_Feint](https://en.wikipedia.org/wiki/Aurora_Feint)

~~~
Mononokay
If you have a backup of her phone from around that time you might be able to
get the .ipa off of it, assuming it's on an older version of iOS.

~~~
Wowfunhappy
But it's likely 32 bit only and won't work anyway on anything newer than iOS
10.

Actually, there's a decent chance it won't even work in iOS 10 or would have
major glitches, because legacy compatibility in iOS just isn't great in
general.

And it's literally impossible to downgrade to an older OS version after Apple
has closed the signing window.

