
This primer is for someone who has finished the Z80 assembly course on this site, which was written for the Einstein TC-01, and now wants to write games for the Einstein 256. It does not teach assembly language again, and it does not go back over anything that works the same on both machines. It shows you what is different, and above all how to use what the 256 has that the TC-01 does not.
If you haven't done the assembly course, start there. This primer takes for granted that you can write a program, call MOS, drive the VDP through ports 8 and 9, set up sprites and run a game loop.
The 256 is named after its memory. The Z80 has the same 64K of RAM as the TC-01, but the video chip has 192K of its own: 128K that you reach in 16K pages, and a further 64K beside it. The TC-01 had 16K.
That video chip is the other big change. It keeps the TC-01's ports and registers, works most of them the same way, and does a good deal more. Switch it on and you see the familiar start-up screen, with a new banner:
*** EINSTEIN 256 ***
and TATUNG/Xtal MOS 2.1 where the TC-01 says MOS 1.2.
Most of what you learned works unchanged. You print with RST 8 / DEFB 158. The keyboard calls, the control codes and the line-drawing call behave just as they did. The CTC and its IM 2 interrupts, and the AY sound chip, are the same. Ports 8 and 9 still reach the video chip by the same protocol, and at start-up MOS lays out the first 16K of video memory the same way as on the TC-01. So a TC-01 program that writes to the screen directly may need very little changed.
The things that don't carry over are few, and S3 covers them in one place, so you know what to check before you move a TC-01 program across.
Everything from S4 on is something the TC-01 cannot do at all:
The primer ends with a small game that puts many of these together.
The same way as the assembly course.
Appendix I sets the whole primer out as one table: each thing as the TC-01 does it, and what the 256 does instead.
All three are worth a message.
S2, Setting Up: the 256 in MAME, and your first program on it.