I am looking for something simpler than MAME, I want to emulate an 8-bit CPU with 32K RAM and 32K ROM connected to a VT100 type terminal - this would be a simple Linux executable that one runs from the terminal emulator, I will simulate using a built-in teletype by copy/pasting text files into the terminal or copy/pasting screen output to text files.
Either CPU would be good. I will be doing machine-code programming, at least until I build my own assembler. Then, who knows…
CollapseOS used to emulate the Z80 using… libz80, i think it was called? lib6502 is also a thing.