Tiny Emulators

(floooh.github.io)

255 points | by naves 13 hours ago

11 comments

  • flohofwoe 2 hours ago
    FYI this is a heavily outdated URL (the one with '-preview' in it, last updated in 2021) which I had created at some point to test some things.

    The proper and uptodate URL is:

    https://floooh.github.io/tiny8bit/

    Apart from the 'pin-emulation' the other interesting feature is that the CPUs are 'cycle stepped', e.g. the CPU no longer has a special 'controller role' in the system but is just 'ticked along' with all the other chips. This blog post describes how that works for the Z80 emulation (the instruction decoder is still a big switch-case, but with one case-prong per instruction cycle instead one prong per whole instruction: https://floooh.github.io/2021/12/17/cycle-stepped-z80.html)

    I didn't really get around to work on the project since 2023 though (and before that I worked on it mainly as a 'vacation project' over the Christmas breaks), I mostly just updated the sokol and Dear ImGui dependencies since then, and sometimes added new scene demos appearing on https://www.pouet.net/ and https://csdb.dk/.

  • Folcon 2 hours ago
    I don't know about anyone else, but this really reminds me of 0x10c [0]

    I'm still fascinated by the idea of a setting with virtual mini computers, I've designed a couple as thought exercises based on it/space travel as well as cyberpunk mixing in a little Zach like flavour for some of the chip design, even figured out a fantasy variant

    Not sure why, but I've not been able to convince myself that it's anything other than ultra niche, so if you're interested in this and want to talk about it, chime in here or drop me an email (in profile)

    -[0]: https://en.wikipedia.org/wiki/0x10c

    • 20k 2 hours ago
      I wrote a basic zachtronics style puzzler based around 0x10c, its one of my favourite concepts that's always stuck with me. I also strongly feel like it'd have a player base (at least initially, while everyone's coding) of maybe a few hundred people worldwide, which makes it a terrible decision financially

      I feel like you're stuck between a rock and a hard place with that game. Do people really want to build their whole own OS just to interact with the hardware of their spaceship? Should it be a game where you have an ingame software market, for people to buy/sell software to use in your spaceship controls? Is a player REALLY going to build windows 3.1 for the DCPU for free?

      I'd love to make it work, there was an open source game that was going for a while, but it went all the way down to the BIOS level which is just.. way too technical for most people. Who wants to get involved with an API/ABI for just making their spaceship move?

      • Folcon 1 hour ago
        Would you mind sending me an email, I'd genuinely be interested in collaborating in this if you're interested, even if it's only brainstorming / discussing

        I've been looking at a new fun thing to focus on for a bit and this could be a great contender

        No worries if you don't feel like it, this is still a positive indicator :)

  • Lerc 12 hours ago
    I love the pin level emulation model of this. The self contained modular behaviour of components has real flexibility.

    For a long time I have wondered if extremely thin but explicitly defined interfaces are an under-explored domain for interoperability.

    Beyond simple chip emulation, any set of values that are sampled on each side of the interface at defined times, and a small set of signals to provided temporal access. Be it pins, a small set of registers, or a memory mapped region, it seems like an excellent target for conformance testing.

    Perhaps in a world of AI generated code, modular components with explicit conformance requirements would allow people to not care what happens inside the black box, provided it cannot be made to violate it's behaviour requirements.

    • flohofwoe 2 hours ago
      > modular components with explicit conformance requirements would allow people to not care what happens inside the black box

      That's the whole idea of software libraries, no AI needed for that ;)

      It just takes some disciplines and not listening to the DRY crowd too much to create actually self-contained libraries.

      • Lerc 1 hour ago
        Libraries rypicly have an interface of function calls.

        That is different from an interface of set of polled values with a few signals.

        Any library that can write to memory through provided pointers, or can return non primitive data has a potentially unlimited interface.

    • ikari_pl 4 hours ago
      I was able to get my Amstrad CPC emulator to pin-level for all chips... but then in this mode it does run at full speed... if you have a M2 or faster CPU :') so I also added a "soldered" mode that speeds things up a little by being less modular (no taking the CRTC out!), and a fast mode after all. Pin-level, however, gave me an excellent oracle to verify correctness at all times, which is a benefit on it's own. Now I'm tempted to make a USB-connected extension port so you could use all real hardware with it :)

      (did not release the pin-level code yet, wait a week)

    • jagged-chisel 8 hours ago
      Things (hardware, software) have been designed since the epoch to be treated as black boxes. Not all things, mind you, but most things do strive for modularity. I find it amusing that this idea is being realized by more people in an effort to satisfy the AIs.
      • Lerc 8 hours ago
        I have been aware of this for some time, I come from an age before frameworks.

        This isn't something realised, so much as seeing a further supporting argument.

  • keyle 8 hours ago
    Extremely cool. Loading up these games in a split seconds used to take eons as a kid with the tapes.

    Bruce Lee on ZX spectrum was my jam!

  • MomsAVoxell 9 hours ago
    Needs more Oric:

    https://oric.games/

  • infinite_spin 12 hours ago
    just want to mention that some of these have the volume turned up a bit higher than I expected, which you don't notice until you click on the game
  • kerm1t72 1 hour ago
    nice!
  • ChrisArchitect 7 hours ago
    Please update the url to https://floooh.github.io/tiny8bit/ (as is linked officially and in previous submissions, noted last year by the dev even https://news.ycombinator.com/item?id=43821756)

    where'd you get this preview one from OP? linked somewhere?

  • jdw64 3 hours ago
    It would be nice if there were a UI feature on the site to adjust the volume. Some of the game sounds are way too loud.
  • Papirola 5 hours ago
    C=64 !!!
  • gabrielsroka 12 hours ago
    • naikrovek 8 hours ago
      Oh no.
      • djmips 8 hours ago
        Hacker NEWS

        Maybe at least include the date