Sunday 5 January 2014

It lives !

Drawing a line on the Microvision LCD
Okay, perhaps not the most exciting screen grab ever - a diagonal line - but it is done using TMS1100 code, programming the LCD driver, and it reverses the polarity.

There's a routine I'm quite pleased with at the heart of it (it starts at $3E0 on the picture) - it takes a value 0..15 (e.g. a coordinate) and pumps out a nibl sequence to the LCD Driver which is 4 x 4 nibbles, with a '1' bit at the appropriate position as specified by the coordinate (11,11) in this particular case (why there's a $B at $0F)

Expanded Emulator

The Emulator Screen has expanded a bit as I start to emulate the LCD - this is mostly done now, I just need to write some code to test it.

A,X,Y are TMS1100 Registers - XY is a composite of X and Y, and M is the contents of memory location XY (the only way you can access data memory), this is also highlighted on the Memory display in yellow.

ST is the Status Flag, CL the call link Flag (set when in a subroutine), and SL the Status Link flag (which is probably not going to be used).

CA, PA, and PC form the 11 bit program counter (1 bit + 4 bit + 6 bit), CB, CS, PB and SR are used for long branches, and subroutine call storage and return.

RL is the R-Latch - the output pins, the currently selected one (Y) is highlighted, O is the parallel output register.

The rest belong to the LCD Controller. CT is the Latch Address Counter (and points into the 8 Address Latches marked as AL), DB is the values on the Hughes0488 Data Bus, LP the level of latch pulse, DC the level on the inverse Data Clock line (why it's purple) and PO the polarity (switches between + and -).

BK is the breakpoint.

I have to admit to enjoying programming these things, it's a form of masochism really :) Mark Lesser, who wrote Auto Race (the handheld) which requires similarly arcane levels of coding, said that it was the thing he was most proud of. I think it's because there's a challenge involved, not only in coming up with algorithms, but tailoring them to the hardware and the processor.

It's much easier in some ways coding for an Xbox or Playstation :)