Contents |
Effect
This instruction allows to execute easily the command HMMV (High speed Move to Memory from VDP) of VDP in Basic. It fills specified rectangular area in the VRAM with a value. The advantage over the basic instruction standard is that the coordinates are not clipped. Any VRAM area is usable regardless of the pages.
Note: This instruction is not available in SCREEN 0 to 4. It is available in SCREEN 9 but requires advanced knowledge of this mode to use.
Syntax
CALL HMMV (<X0>,<Y0>)-STEP(<X1>,<Y1>),<V>
Parameters
<X0> and <Y0> are coordinates of first corner of the area (X0=0~255/511, Y0=0~511/1023).
<X1> and <Y1> are coordinates of the opposite corner of the area ((X0=0~255/511, Y0=0~511/1023).
STEP parameter changes X2 and Y2 coordinates to relative coordinates (and therefore allows the use of negative values) when specified.
<X1> and <Y1> are coordinates of the upper-left corner of destination area (X0=0~255/511, Y0=0~511/1023).
<V> is a value between 0 and 255. Value for 2 pixels in SCREEN 5/7 and 4 pixels in SCREEN6. (See example)
Example
10 CLEAR300,&HA800:BLOAD"diskinst.bin",R:_SYSON 20 COLOR,0,0: SCREEN5 30 CALL HMMV (0,0)-(255,105),15 40 CALL HMMV (0,106)-(255,211),255 50 IF NOT STRIG(0) THEN 50 60 SCREEN6: COLOR=(3,7,7,7) 70 CALL HMMV (0,0)-(511,53),3 80 CALL HMMV (0,53)-(511,105),15 90 CALL HMMV (0,105)-(511,157),63 100 CALL HMMV (0,157)-(511,211),255 110 IF NOT STRIG(0) THEN 110 120 SCREEN8 130 CALL HMMV (0,0)-(255,105),15 140 CALL HMMV (0,106)-(255,211),255 150 IF NOT STRIG(0) THEN 150
Related to
CALL CELLO, CALL HMMM, CALL LMMM, CALL LMMV, CALL YMMM, CALL VCOPY