© 1985 ASCII CORP. / NIPPON GAKKI CO.
Page 63 of 108
© 2010-2015 Eugeny Brychkov
4. COMMANDS
4.1. Types of commands
Commands are used to perform specific complex operations on the video memory,
and thus on the image displayed on the screen. See the list of available commands in the
table below.
Command
name
Destination Source Unit
Mnemonic CM3 CM2 CM1 CM0
VRAM CPU
HMMC*
1 1 1 1
VRAM VRAM
YMMM*
1 1 1 0
VRAM VRAM
HMMM
1 1 0 1
High-speed
move
VRAM VDP
Byte
HMMV
1 1 0 0
VRAM CPU
LMMC
1 0 1 1
CPU VRAM
LMCM
1 0 1 0
VRAM VRAM
LMMM
1 0 0 1
Logical
move
VRAM VDP
LMMV
1 0 0 0
Line VRAM VDP
LINE
0 1 1 1
Search VRAM VDP
SRCH
0 1 1 0
Pset VRAM VDP
PSET
0 1 0 1
Point VDP VRAM
Dot
POINT
0 1 0 0
0 0 1 1
0 0 1 0
Invalid
0 0 0 1
Stop
STOP
0 0 0 0
*In G4 and G6 modes, the lower one bit, and in G5 mode, the lower two bits are lost in registers related to
X-coordinate (DX, NX)
The process of execution of VDP commands consists of several steps:
•
Ensure that current mode is G4 – G7. In other modes result is not guaranteed
•
Check the bit 0 (CE, command execution) flag in status register S#2 to be 0. If it’s
1, then previous command is in progress and program needs to wait for
completion or issue STOP command
•
Set necessary parameters for command execution in registers R#32 to R#45 as
necessary. It is easy to write whole the set of values to registers using indirect
register addressing mode with auto-increment turned on
•
Write command code to the R#46 (CMR, command register)
•
Wait till command execution is completed by checking bit 0 (CE) of S#2 to be 0
•
If current command needs to be aborted, execute STOP command