Thanks! Apart from Ctrl-C not yet working, it's otherwise stable. With 3583 bytes free it has the same free memory as the VIC-20. This is really a coincidence. The version we have running is an early one for the Commodore PET.
Although the system can interpret 6502 code, there still was work to do: code, buffers, zero page variables and stack needed relocation. But that wasn't the biggest hurdle as Michael Steil's excellent set of
reconstructed assembly sources made that relatively painless. The main problem was to create a sufficiently large continuous memory space. Although the Gigatron has 32K of RAM, 19KB of that is used for screen memory and the remainder is heavily fragmented. For example, by default the largest continuous block we have is just 512 bytes. BASIC itself needs 8KB, plus we need some K's for user program and variables. Ouch...
The first win is to disable the sound channels 2 through 4. That creates a continuous block from $200 to $800. For this trick you need ROM v4.
The next step is to compress the video memory. Our resolution is already nothing, but we can always lower it even more! Of the 120 visible pixel lines, every 8th is always empty. At least, as long as we only use capitals, and for a mid-1970s BASIC that's perfectly acceptable. The empty pixel lines can then be shared for all rows of text. That saves 14*256 = 3585 bytes already.
The last trick is to increase the spacing between text lines from 1 to 4. This reduces the text lines from 15 to 11, but yields 4 * 7 * 256 =7,168 bytes.
Of course we then went overboard and added a flashing cursor, we made sure that the WAIT 6502 Easter Egg works, and that there is a π-symbol. The Gigatron doesn't have that in its font, but it does have T and U.... And... the font is stored without horizontal spacing, so there's our glyph:
Code:
R S T pi U
v v v v v
x x x x . . x x x . x x # # # # . . . x
x . . . x x . . . . . . # . . # . . . x
x . . . x x . . . . . . # . . # . . . x
x x x x . . x x x . . . # . . # . . . x
x . x . . . . . . x . . # . . # . . . x
x . . x . . . . . x . . # . . # . . . x
x . . . x x x x x . . . # . . . # x x .
0 1 2 3 4 5 6 7 8 9 a b c d e f 1 1 1 1
^ 0 1 2 3
font82up
Good enough for me:
Attachment:
Screenshot 2019-10-16 at 21.28.41.png [ 33.44 KiB | Viewed 1504 times ]