An example is adding the constant 4. You can't do this, you can add 10,8 and 6 but not 4. Simon's solution is
- a6aac
- dan
- dan
e.g. add 6 decrement twice. I might code
- a10aac
- a10aac
which adds 20, which mod 16 is adding 4.
However, I have reverse engineered a fair chunk of Simon so far, mostly utility routines. Most of the game variables are in page 3. Page 2 is used mainly to generate the sound effects. Page 0 contains the 32 x 2 bit sequence, packed 2 to a nibble.
The interesting thing about Simon is I think the code is mostly a finite state machine. This makes it harder to reverse engineer than code that just "does" it because there's no sequence in the code, it just goes round and round in loops doing different things.
I've put the latest decode in github Most of the code is at the backend of the file, there isn't much of the actual game sequencing yet.
Not helped by both the Patent and the guy who reverse engineered Pocket Simon having different circuits, this is a combination of the two.
I think the next step is to write an emulator for it which I have to do anyway to get it to work on an Arduino. It's quite difficult to trace, and its made harder by the habit in TMS1000 code of jumping around arbitrarily to fit bits of code in odd bits of the 64 bit page.
Note: For me this is Retrochallenge Week 1 pretty much. I am away 20-27 June and 21-28 July.

Is the assembler code a direct disassembling of the TMS1000 ROM content or does it contain some change (beyond your great comments, of course)?
ReplyDeleteThanks in advance!!