← Back to Courses
module
33

Where You Go From Here

Introduction

S1 said you would end up with a complete game written entirely in Z80 assembly, running on a Tatung Einstein. You have.

This section has no program in it. It is here because thirty-two sections is a long way to come, and stopping without looking back at the ground would be a poor way to finish.

What you can actually do now

Not a list of section titles - a list of things you can sit down and do.

You can get a program onto the machine and find out why it did not work. The register line, the assembler's listing, the addresses your labels turned into. That is the whole debugging kit and it is enough, because the machine is small enough to hold in your head.

You can make the hardware draw. Not "call a routine that draws" - you write to the video chip yourself: patterns, colours, a name table, sprites, three banks, a backdrop. You know what a tile costs and what a sprite costs and why only four of them appear on a line.

You can make it move without flickering, because you know what a frame is, how to wait for one, and why work done in the wrong part of one shows.

You can read every key at once, off the matrix, rather than asking the ROM for one key at a time.

You can make a noise without stopping the game to do it.

You can build the thing a game is made of: a loop that runs at a fixed rate, state that lives in memory, collision as arithmetic on your own variables, a table of routines to dispatch on, and a program that starts, can be lost, and starts again.

And you can do all of it in 64 kilobytes with no operating system underneath, which is a way of working that almost nothing today will teach you.

The game is not finished, and that is the point

Rockfall runs, keeps score, has three lives and makes three noises. It is also plainly a first game, and the exercises at the end of S31 and S32 are a list of the next things it wants - a high score, waves that get harder, an attract mode, more than one sound at a time.

Take them or leave them. The more useful move is usually to start something of your own, because the second game is where you find out which parts you understood and which parts you copied. Everything in Rockfall - the frame loop, the publish step, the state table, the one-byte timers - is the same in any game you write next.

What this course left alone

Deliberately, and worth knowing so you can go and find it.

Loading from disc. Every program here has been handed to the machine by the emulator. A real game loads itself, and the machine's own routines will do that for you. Appendix VIII takes your finished .COM as far as a disc image a real Einstein boots; going further - a loader, several levels read off the disc as the game runs - is open ground.

More screen than fits on the screen. Scrolling, multiple rooms, a map bigger than 32 by 24. S17's map is already a data structure rather than a picture, which is most of what a second screen needs.

The other two sound channels, and music. S27 covered one channel and an envelope. Three channels and a tune that plays while the game runs is a different problem, and S28's clock is how you would time it.

Interrupt-driven everything. S28 built a clock of your own on the CTC. A game where the music, the animation and the input all run off interrupts while the main loop does the thinking is the next step up, and it is where the machine starts to feel roomy.

Sprite multiplexing. Four per line is a hardware limit and games have always cheated it by moving sprites between lines mid-frame. This needs S26's and S28's timing and a steady nerve.

The bits nobody has written down

Here is the part worth saying plainly.

The Einstein is not a well documented machine. It sold in small numbers, the books that exist disagree with each other in places, and a good deal of what it can do has never been written down anywhere you can find it. That is why this course is careful about what it claims, and why its appendices carry a memory map that marks which lines are certain.

Which means there is room to be first at something. Not in a grand way - there is no lost secret - but there are ordinary, useful questions about this machine that currently have no published answer. If you find one, write it down. The community around a machine this size is small enough that one person's afternoon genuinely adds to what everybody knows.

The appendices are the part you keep

The sections are a path and you walk them once. The appendices are a reference and you come back to them:

  • Appendix I - character codes, including the ones that are not what a standard chart would tell you.
  • Appendix II - what to change when a listing you found elsewhere will not assemble.
  • Appendix III - what is actually behind RST 8.
  • Appendix IV - the memory map, marked with how far each line can be trusted.
  • Appendix V - the keyboard matrix.
  • Appendix VI - drawing a line.
  • Appendix VII - the disc format.
  • Appendix VIII - getting a finished game onto a real machine.
  • Appendix IX - what has changed in this course, and when.
  • Appendix X and X (continued) - a worked answer to every exercise.

Tell us how it went

S1 asked for three things and they all still stand, more now than at the start.

If something here is wrong, say so - a wrong sentence nobody reports stays wrong for everyone who reads it next. If something was unclear, that is a fault in the writing; the person who already knows the answer is the worst judge of whether an explanation works. And if you think you could improve it - a clearer explanation, a missing section, notes on getting the tools running on Windows or Linux, an appendix on something this course does not cover - please do.

The contact form is at tatungbytes.co.uk/contact.

Summary

  • You can write a complete game for the Tatung Einstein in Z80 assembly, from an empty file to something that runs on the real machine.
  • The parts you built - frame loop, publish step, state table, timers, collision, tables of addresses - are not specific to Rockfall. They are what the next game is made of too.
  • What the course left out is listed above with somewhere to start on each.
  • The machine is under-documented. If you work something out, write it down.
  • Go and make the second game. That is the one that teaches you whether the first one stuck.

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.