GPL-3
Information
I can't be sure this pseudo command syntax is indeed called GPL-3, however I do expect GPL was used for all language variants for the RCA Video Coin Arcade machine and FPL for the FRED2. Mainly based on the FPL-4 and GPL-4 which both are running the Coin and Computer bowling games on both the Arcade and FRED machine. As I found GPL-A, GPL-2 and GPL-4, this is most likely GPL-3.
GPL-3 is used in the game 'Scramble Split-Second' running on the RCA Video Coin Arcade machine.
V0-F are stored on memory locations 0800-080F.
Definitions
aaa | 12 bit address |
kk | 8 bit constant |
d | 4 bit constant |
n | 4 bit constant |
l | 4 bit constant |
x | Register number Vx (x = 0 to F) |
y | Register number Vy (y = 0 to F) |
z | Register number Vz (y = 0 to F) |
. | Not used, value doesn't matter |
1..9, A..F | Hexadecimal digits |
Syntax
Opcode | Mnemonic | Parameter | Definition |
---|---|---|---|
5xyz | ADD | Vz, Vx+Vy | Vz = Vx + Vy, V0 = carry |
5xyx | ADD | Vx, Vy | Vx = Vx + Vy, V0 = carry |
Cnkk | BEEP | F=kk, d kk, d |
Beep with a frequency kk and duration d, kk=0: turn tone off |
2aaa | CALL | aaa | Call subroutine at aaa. The subroutine must end in E0 (which is the 'GPL-3' equivalent of RETURN). Note only 1 level call is allowed as return address is stored in R9 |
A0yz | DRW | Vx, Vz | Draw 4*8 pattern in Vy on screen position Vz. Shapes of pattern fetched from shape table at 0432. |
A1yz | DRW | Vx/Vy, Vz | Draw 4*8 patterns from the pattern table starting at location VxVy (Vy=Vx+1), end of pattern table should be 0xff, drawing on screen position Vz. |
A2yz | DRW | B, Vy, Vz | Draw 4*8 BCD value of Vy to screen. If Vz contains 0xA draw on bottom left otherwise draw on right of the screen. Value is extended with two zeros, i.e. 5 digits. |
9xyz | DRW | Vx, Vy, Vz | Not sure, this draws something from the 4kk table where kk is based on Vx, using Vy in some way and drawing on screen position Vz. |
Bxkk | DRW | D, Vx, kk | Draw 5 dots on screen position kk+y, value y is added from table on 428, dots are drawn based on if bit 0 to 4 in Vx are 0 or 1. Note bit 4 should always be '1'. This is used to draw the flashing cursor keys. |
A3yz | DRW2 | Vx, Vy, Vz | Draw 4*8 pattern pattern (and a second pattern with pattern number+1) from 0840 table (Vy indicates with bit 0=1 to 0840, bit 1=1 to 0841, bit 2=1 to 0842 etc). Pattern shape is fetched from shape table at 0432. Screen position Vz. Vx which has to be V(y+1) will contain first drawn shape on return. |
D0 | INIT | Initiate pattern table at 840-849 | |
0aaa | JZ | V0, aaa | Jump to aaa if V0 = 0 |
1aaa | JNZ | V0, aaa | Jump to aaa if V0 != 0 |
3aaa | JP | aaa | Jump to aaa |
F1kk | JP | FIREA, kk 'EF1', kk |
If EF1 jump to address kk in current page (i.e JP on FIRE A) |
F2kk | JP | 'EF2', kk | If EF2 jump to address kk in current page |
F3kk | JP | FIREB, kk 'EF3', kk |
If EF3 jump to address kk in current page (i.e JP on FIRE B) |
F4kk | JP | COIN, kk 'EF4', kk |
If EF4 jump to address kk in current page (i.e JP on COIN). |
4xyz | KEY | Vx, Vy, Vz | If Vx != 0 check FIRE keys and return value in Vy (player A) / Vz (player B). If Vx = 0 check direction keys and return value in Vy (player A) / Vz (player B). If RF = 0, jump to to end the game (address 06E0) |
7xkk | LD | Vx, kk | Vx = kk |
5xyz | LD | Vz, Vx+Vy | Same as ADD: Vz = Vx + Vy, V0 = carry |
6xyz | LD | Vz, Vx-Vy | Same as SUB: Vz = Vx - Vy, V0 = carry |
E0 | RETURN | Return from CALL by restoring R9 to PC (R5) | |
9xnl | RND | Vx, n, l | Vx = 0R, where R ≤ n and r ≥ l |
6xyz | SUB | Vz, Vx-Vy | Vz = Vx - Vy, V0 = carry |
6xyx | SUB | Vx, Vy | Vx = Vx - Vy, V0 = carry |
8aaa | SYS | aaa | Call CDP1801 code at aaa. The subroutine must end in a RET (D4). |
C0kk | TONE | kk | Set tone latch to kk |
C000 | TONE | OFF | Tone off |