![Supersonic Franky Скачать руководство пользователя страница 16](http://html1.mh-extra.com/html/supersonic/franky/franky_instruction-manual_1405869016.webp)
16
VDP Programming
Control port
The VDP is programmed by sending a two-byte sequence to the control port, which we
call a command word. The command word is used to define an offset into VRAM or CRAM
for subsequent data port I/O, and also to write to the internal VDP registers.
In order for the VDP to know if it is receiving the first or second byte of the command
word, it has a flag which is set after the first one is sent, and cleared when the second
byte is written. The flag is also cleared when the control port is read, and when the data
port is read or written. This is primarily used to initialize the flag to zero after it has been
modified unpredictably, such as after an interrupt routine has executed.
The VDP has two components that are used for accessing CRAM and VRAM, the address
register and the code register. The address register is 14 bits and defines the address
into VRAM for reads and writes, and the address into CRAM for writes. The code register
is 2 bits and selects four different operations: VRAM write, VRAM read, CRAM write, and
VDP register write.
The command word has the following format:
CDx : Code register
Axx : Address register
When the first byte is written, the lower 8 bits of the address register are updated. When
the second byte is written, the upper 6 bits of the address register and the code register
are updated, and the VDP may carry out additional processing based on the value of the
code register:
MSB LSB
CD1 CD0 A13 A12 A11 A10 A09 A08 Second byte written
A07 A06 A05 A04 A03 A02 A01 A00 First byte written
Содержание Franky
Страница 1: ...Instruction Manual ...