I've got the wiring done now. This is the mapping between pixels in RAM Memory (actually using the test bed) and the LCD display. I can turn bits off and on and the display mirrors it - as in the game "Blastaway" (Breakout in practice) shown here.
This is not totally consistent because the LCD design is set up for manufacturing not developing. Coders work round oddities to keep the manufacturing costs down.
Next thing to do is to wire this up to the actual emulated CPU and get some real code running.
The CPU core has run real code, mainly to test that it's functioning at the right speed - I set up 16 nibbles as a decimal counter and set it going. Multiplying the number of instruction cycles per loop by the counter gives you a rough total of the cycles done, and it can be timed with a watch (approximately).
This is what the code looks like (the first bit zeros data memory, not guaranteed on reset).
lbl 0,0 ; clear row 0
clear:
lax 0
exci 0
t clear
nocarry: ; come back here to increment counter
lbl 0 ; point to first digit
increment:
lda 0 ; add 1 to digit
adx 1
exc 0
lda 0 ; retrieve , add 6 for decimal overflow
adx 6
t nocarry
exci 0 ; dec overflow, write the zero back and bump BL.
t increment ; loop back don't set B to zero as inc next digit.
The keyboard and sound has to be done too but these are much simpler.
No comments:
Post a Comment