Hacker News new | ask | show | jobs
by Lerc 20 days 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.

3 comments

> 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.

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.

that mangled word is 'typically' btw.

but while I'm here I should point out I wasn't thinking you need AI for this. I was thinking maybe you need this for AI. As a testable way to insulate yourself from AI overreach.

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)

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.
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.