

#Sweet16 emulator drivers
The cc65 development environment already supports RAM expansion drivers for the Apple II and the Commodore 64. Or, we develop a virtual memory abstraction that can arbitrarily bank in and out pages of the 16 MB into the lower 64KB of memory on each host. We use 65816 microprocessor (SuperCPU) instructions to access 16 MB of memory in a 6502 machine. There is also a period-appropriate chip, the 74LS610, which was intended specifically for increasing the addressable memory on the 6502 series. This has been done already for each of the 6502 hosts. Sixteen megabytes of memory will need to be added to the 6502 machines, with appropriate bank switching logic. The ARM instruction set has a lineage dating back to the original MOS chips, and many of the state flags for ARM are exactly the same as they were in the 6502 days. Each of the addressing modes will need to be handled, but no individual addressing mode will be that complicated. Most of the work will be in emulating ARM interrupts and user/supervisor modes in 6502 assembly, and for a first bringup it wouldn’t even be necessary to emulate the Versatile/PB interrupt controller. While the ARM seems to have a ton of instructions, at the bit level, each instruction breaks neatly into its command and operand components. This sounds a lot harder than it actually will be, and large parts of it probably won’t even have to be written at all. We will need to write parts of an ARM926EJ-S emulator in 6502/65816 assembly.

I think that with the make tinyconfig command with cross-compilation, we can get the size of a Linux kernel sufficiently small to have it in expanded memory on the 6502 host. The ARM Versatile/PB is still a first-class target for Linux. The secret sauce involves writing a new, 6502-based emulation of an ARM Versatile/PB development board. The basic strategy involves beefing up the 6502-based machines as much as possible and dumbing down Linux as much as possible.
#Sweet16 emulator software
It is possible to run modern software on classic 6502-based computers such as the Commodore 64 and the Apple II.
