The 65816 emulator core works!!!!!
I even wrote a trivially simple "FooBox" emulator. You don't know what a FooBox is? Oh, it's simple -- it's the latest and greatest 65816-based computer in the world. I can wrap it up in the following:
Code:
$000000-$0FFFFF: RAM
$100000-$1FFFFF: Console Output Ports
$200000-$2FFFFF: Console Input Ports (blocking)
$300000-$3FFFFF: Console Input ports (non-blocking)
$400000-$FFFFFF: unused/unspecified
ROM file is stored in a file called ROM.PRG, and the file is standard Commodore PRG format. It's not a true ROM of course, since the first MB is all RAM. It should really be called IPL.PRG, I suppose, but I digress.
Why 1MB for keyboard input and console output? SImple -- MVN and MVP instructions can then double as simple INPUT or PRINT instructions. For example:
Code:
PrintError:
LDX #Msg12 & $FFFF
LDY #0
LDA #Msg12Length-1
MVP $00,$10 ; Print the message!
RTS
Of course, this is just an emulator convenience.
Real hardware might be a bit more difficult to deal with, but fortunately, rarely much more difficult.
Anyway, the code still isn't in a distributable state just yet -- much "packaging" work needs to be done before it's readily available for download. (e.g., I need to write a Makefile for it, write documentation,etc.)
It's based on the XGS 65816 processor core (in fact, I changed it only minimally). Over time, I'll add more features, but for now, my first goal is to get it into a "reusable" state so that others can use it in their own projects.
I'll post the sources of the FooBox and the ROM.PRG that I'm testing with in the next two messages.