A set of routines for driving the Noritake Itron Gu20x8 vacuum fluorescent display.
See Gu20x8 6522 VIA Schematic.pdf
for how to connect this to the 6522 VIA. This schematic shows how to use a pair of 74HC164 shift registers to send the display data in serial from the processor.
The binary is assembled to be run from location $300
but this can be changed to any desired location. No page zero memory is used by the program.
The testcard
directory contains a sample program that tests the routines, and corresponding image of what the display should be showing.
A sample paint program is also provided. This is written for the Apple 1. Move the "brush" with WASD keys, space to "paint" the current pixel, and digits 0 through 3 to set the paint colour. N clears the screen and Q returns from the program.
20 byte RAM buffer of blue pixel data.
20 byte RAM buffer of RED pixel data.
Stores the current drawing colour used by the routines:
$00
Black$01
Blue$02
Red$03
White
Location for passing parameters in the Accumulator, useful for CALLing from BASIC programs. The result of GCOLOR
is stored there on return.
Location for passing parameters in the X register, useful for CALLing from BASIC programs.
Location for passing parameters in the Y register, useful for CALLing from BASIC programs.
Initialises port B on the 6522 VIA, before setting the plot colour to blue ($01
) and clearing the buffer to black.
From assembly: $300
From BASIC: 768
Clears the RAM buffer to black, but does not clear the display. Do this by then calling GPAINT
.
From assembly: $315
From BASIC: 789
This routine "paints" the contents of the RAM buffer to the display.
From assembly: $323
From BASIC: 803
Plot a single pixel to the display using the current colour set in the COLOR memory location.
Use X and Y registers to define the coordinates of the pixel to plot.
From assembly: $37D
From BASIC: 965
Get the colour of a pixel at location defined by registers X and Y.
Returns the colour in the Accumulator.
From assembly: $3CE
From BASIC: 974
Fill the display with the current plot colour.
From assembly: $401
From BASIC: 1025
Draw a vertical line in the current plot colour.
Starting coordinates passed the X and Y registers, length of the line in the accumulator.
Line is drawn downwards only.
From assembly: $433
From BASIC: 1099
Draw a horizontal line in the current plot colour.
Starting coordinated passed in the X and Y registers, length of the line in the accumulator.
Line is drawn from left to right only.
From assembly: $457
From BASIC: 1141
Change the brightness of the screen.
Pass the value in the X register from $00 (dimmest) to $03 (brightest).
From assembly: $481
From BASIC: 1191