Line - Yamaha V9938 Programmer's Manual

Msx-video
Table of Contents

Advertisement

4.4.9. LINE

LINE command is used to draw straight line in VRAM of expansion RAM. The line
drawn is the hypotenuse of the triangle defined by the "long" and "short" sides. The
distances are defined from the single starting point. Words "long" and "short" are used to
identify respective sets of registers to use to define triangle's sides: long side is defined in
registers R#40 and R#41 (by 10 bits MJ9...MJ0 with value in the range 0...1023) and short
side is defined in registers R#42 and R#43 (by 9 bits MI8...MI0 with value in the range
0...511). The units used are dots.
(DX, DY)
LINE execution order
Step 1: Set necessary coordinates in command registers
MSB
R#36
R#37
R#38
R#39
R#40
R#41
R#42
R#43
© 1985 ASCII CORP. / NIPPON GAKKI CO.
Video or expansion RAM
Maj
7
6
5
DX7
DX6
DX5
0
0
0
DY7
DY6
DY5
0
0
0
NX7
NX6
NX5
0
0
0
NY7
NY6
NY5
0
0
0
DIY
Min
DIX
4
3
2
DX4
DX3
DX2
0
0
0
DY4
DY3
DY2
0
0
0
NX4
NX3
NX2
0
0
0
NY4
NY3
NY2
0
0
0
Page 85 of 108
1
0
LSB
DX1
DX0
DX: Starting
point X
0
DX8
DY1
DY0
DY: Starting
point Y
DY9
DY8
NX1
NX0
Maj (NX): long
side dots num
0
NX8
NY1
NY0
Min (NY): short
side dots num
NY9
NY8
© 2010-2015 Eugeny Brychkov

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents