CALL HMMM
This page was last modified 23:54, 17 May 2020 by Mars2000you. Based on work by Gdx.

Contents

Effect

This instruction allows to execute easily the command HMMM (High speed Move to memory from memory) of VDP in Basic. It makes a fast copy of an rectangular area to another area in the VRAM. 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 HMMM (<X0>,<Y0>)-STEP(<X1>,<Y1>) TO (<X2>,<Y2>)

Parameters

<X0> and <Y0> are coordinates of first corner of source area (X0=0~255/511, Y0=0~511/1023).

<X1> and <Y1> are coordinates of the opposite corner of source area ((X0=0~255/511, Y0=0~511/1023).

STEP parameter changes X1 and Y1 coordinates to relative coordinates (and therefore allows the use of negative values) when specified.

<X2> and <Y2> are coordinates of the upper-left corner of destination area (X0=0~255/511, Y0=0~511/1023).

Example

10 CLEAR300,&HA800:BLOAD"diskinst.bin",R:_SYSON
20 COLOR,0,0: SCREEN5: VDP(9)=VDP(9) OR 2 ' Disable sprites
30 CALL HMMM (0,0)-(255,44) TO (0,212) ' Erase the hidden area of screen
40 FORI=1 TO 10
50 CIRCLE(50,50),I*5,I,0,4.7: CIRCLE(100,50),I*5,10-I,3.14,4.7
60 CIRCLE(50,100),I*5,10-I,0,1.6: CIRCLE(100,100),I*5,I,3.14,1.6
70 NEXT
80 CALL HMMM (0,0)-(151,151) TO (152,100)
90 FORI=1 TO 10: NEXT: VDP(24)=(VDP(24)+1) AND 255
100 IF NOT STRIG(0) THEN 90
110 VDP(24)=0

Related to

CALL CELLO, CALL HMMV, CALL LMMM, CALL LMMV, CALL YMMM, CALL VCOPY

Compatibility

DM-System2 BASIC