My Romless Neo requires that the code be transferred from a host computer after every start. Minor issues include not having indicators or a way of resetting without reloading (solvable in hardware) and the slow load, about 1k/second, constrained by the serial parts. That said, I'm really happy with it.
But I'm wondering about a more complex system, which uses am STM not only as the initial boot loader and comms but also, e.g. a keyboard controller (possibly USB) and definitely a translator for a DOS-formatted (FAT32) microSD card. The STM communicates by reading/writing a small defined area of shared memory, and effectively operates as a DMA controller.
A quarter SVGA display, mono, individual pixels in the 6502's memory space: 400x300 pixels gives a handy 48x25 characters (strictly 50 across but it's convenient to use 48) using a 7x10 font in an 8 by 12 cell. That would require 14,400 (0x3840) bytes for the screen memory and 1280 (0x500) bytes for a 128-deep font table. This would need a 20MHz dot clock; a simple approach would just divide by 8 for a 2.5MHz system clock though a faster system could arrange things at twice that speed or even, with care, a 20MHz system though I'm not chasing speed here... I need to draw some timing diagrams.
But that display could fit along with a space for the reset vector and around 256 bytes of I/O space and a further 256 bytes of DMA space in the top quarter of the 6502 memory space:
Code: Select all
0xfffa-0xffff - vectors
0xff00-0xfff9 - I/O, probably one to three 65c22
0xfe00-0xfeff - DMA transient area
0xfd40-0xfdff - control data buffer
0xf840-0xfd40 - font table
0xc000-0xf83f - video ram, first row at 0xc000, next 0xc030 etc
0x0000-0xbfff - program ram - video ram is on same chip(s)
I think the only tricky bit is to ensure that the video clock - which will of course be reading video ram on the off-phase - carries on as normal during all the shenanigans. And I don't think it's too tricky...
Doing things this way means that I can make something working vaguely along the lines of CP/M; loading programs as and when required from an external microSD without having to fill several k with the handling code.
I feel it has possibilities...
Neil