As a bit of a mini side project I patched/ported the TI-81 1.8K ROM to run on the CE in z80 mode.
Yes that's right, the OS from a 30 year old calc running on the most recent variety .
There isn't really much to it as the only differences to the ROM are port read/writes have been patched since they can't be used on the CE and even if they could be, the connected hardware isn't the same anyway. The whole ROM is only 32KB so no need to mess with paging etc, so the whole thing was reasonably straight-forward. One thing to note is that instead of patching a call to a routine (which would be 1 byte larger and thus require recalculating of all relevant ROM addresses, not to mention make the ROM larger) I patched with RST $00 and took over that address since it's used rarely. A boot condition is simply detected on power on, otherwise the port read/write is handled.
The LCD is scaled 3x which seems ok size wise and left room for a small 81 style border theme. The actual LCD rendering is kind of hacked in and requires interrupts to be running ... which should normally be the case. Also since this is not emulation, the speed is not consistent with the real thing. Not sure whether to try and restrict it, but I don't see the harm for now.
I hacked in RAM saving to an appvar on exit which seems to mostly work though I need to test it properly.
Note: You cannot install Unity on it the traditional way (since IM 2 interrupts aren't possible on the CE) ... but perhaps I should build similar ASM support into it. The best bit is that I'd store it outside of usable RAM so you'd get ~400+ bytes of precious RAM back. That being said with ASM you wouldn't be able to access ports since this is not emulation, it's a patch/port. No sending files though it would be entirely possible to modify the RAM/register state stored inside the appvar instead of typing it all in.
No other reason than just because, and perhaps a good way to preserve the 81 experience since they are becoming rarer now.
Anyway, some screenshots:
Now the question is, would it be acceptable to release this since it contains a ROM? I suppose I can just release the patch and such and people would have to dump/source their own 81 ROM? (Note that is ONLY works with 1.8K, which is the most suitable imo anyway).
Yes that's right, the OS from a 30 year old calc running on the most recent variety .
There isn't really much to it as the only differences to the ROM are port read/writes have been patched since they can't be used on the CE and even if they could be, the connected hardware isn't the same anyway. The whole ROM is only 32KB so no need to mess with paging etc, so the whole thing was reasonably straight-forward. One thing to note is that instead of patching a call to a routine (which would be 1 byte larger and thus require recalculating of all relevant ROM addresses, not to mention make the ROM larger) I patched with RST $00 and took over that address since it's used rarely. A boot condition is simply detected on power on, otherwise the port read/write is handled.
The LCD is scaled 3x which seems ok size wise and left room for a small 81 style border theme. The actual LCD rendering is kind of hacked in and requires interrupts to be running ... which should normally be the case. Also since this is not emulation, the speed is not consistent with the real thing. Not sure whether to try and restrict it, but I don't see the harm for now.
I hacked in RAM saving to an appvar on exit which seems to mostly work though I need to test it properly.
Note: You cannot install Unity on it the traditional way (since IM 2 interrupts aren't possible on the CE) ... but perhaps I should build similar ASM support into it. The best bit is that I'd store it outside of usable RAM so you'd get ~400+ bytes of precious RAM back. That being said with ASM you wouldn't be able to access ports since this is not emulation, it's a patch/port. No sending files though it would be entirely possible to modify the RAM/register state stored inside the appvar instead of typing it all in.
No other reason than just because, and perhaps a good way to preserve the 81 experience since they are becoming rarer now.
Anyway, some screenshots:
Now the question is, would it be acceptable to release this since it contains a ROM? I suppose I can just release the patch and such and people would have to dump/source their own 81 ROM? (Note that is ONLY works with 1.8K, which is the most suitable imo anyway).