I wonder if this could be creatively incorporated to allow running 8080 CP/M programs (albeit likely very, very slowly). I would imagine API calls could be forwarded up to the bare metal CP/M OS.
I was wondering the same, but then I thought it would probably be easier to just translate the z80 CPM binaries to 6502... That should be relatively straightforward, and since CP/M relies heavily on the BIOS/BDOS ther shouldn't be that many issues... But I'll probably just watch his series on YouTube first, maybe that's something he's planning/thinking about too
but then I thought it would probably be easier to just translate the z80 CPM binaries to 6502
All the CP/M binaries are for the 8080, not the Z80. The only place you might find Z80 code in a CP/M system is the machine-dependent I/O code in the CP/M BIOS. That will necessarily be different for any 6502-based computer hardware, and need to be rewritten, anyway. Or in the third-party apps. Though even there, most of the third-party companies restricted their software to using only 8080 code so their user-base was as large as possible.
The important part of the CP/M architecture was the thousands of independent apps that used CP/M as their underlying OS.
Very probably, the best 6502-based approach would be to keep all the CP/M system software and apps as 8080/Z80 code and use a 6502-based Z80 emulator. The BIOS itself could be replaced with native 6502 code as it uses a jump-table for the entry points.
I dunno about cp/m binaries in particular, but static translation of machine code from that era can be really difficult because of mingled code and data, self modifying code, and unclear bounds on jump tables.
So it might not be very easy at all, depending on how clever the people who wrote it were.
A neat fact I recently learned: Bill Herd (designer of the C128) said in a presentation at VCF East earlier this year, that the Z80 in the C128 was done because the C64 Z80 cartridge had power and heat problems. It was easier to just put it in the C128 versus trying to make the C128 compatible with the C64 Z80 cartridge.
I wonder if this could be creatively incorporated to allow running 8080 CP/M programs (albeit likely very, very slowly). I would imagine API calls could be forwarded up to the bare metal CP/M OS.