Contents |
Effect
Copies several times a monochrome bitmap to VRAM in a tiled fashion as rectangular shapes.
It can be used only in SCREEN 2 and SCREEN 4. However, don't forget that SCREEN 4 uses sprites type 2 that are not supported by Artisan BASIC.
Syntax
CALL TILEVRM(<RAM-StartAddress>,<StartColumns>,<StartRows>,<X>,<Y>,<HorizontalTiles>,<VerticalTiles>)
<RAM-StartAddress> can vary between &H0000 and &HFFFF.
<StartColumns> is the number of 8x8 pixel columns in a tile at <RAM-StartAddress>.
<StartRows> is the number of 8x8 pixel rows in a tile at <RAM-StartAddress>.
<X> is a number between 0 and 255 to specify the column in VRAM where to start applying tiles.
<Y> is a number between 0 and 191 to specify the row in VRAM where to start applying tiles.
<HorizontalTiles> is the number of tiles to apply in horiontal direction in VRAM.
<VerticalTiles> is the number of tiles to apply in vertical direction in VRAM.
Example
10 REM BLIT WITH PARAMETERS 20 COLOR 15,1,1:SCREEN 2,2 30 DEFINT A-Z 100 MB=0:_MEMCPY(&H4010,VARPTR(MB),2):SB=&H2000 120 I=0:X1=112:Y1=114:V1=1:V2=1:XL=0:XR=0:YU=0:YD=0:CX=0:CY=0:T=0:A$="":TM=0 230 FOR I=0 TO 7:READ T:POKE &HB000+I,T:NEXT 240 _TILERAM(&HB000,1,1,SB,32,24,0,0,32,24):_MEMCPY(SB,MB,6144) 250 _TILEVRM(&HB000,1,1,0,0,32,24) 260 _FILVRM(BASE(11),6144,&H4E,0) 270 BLOAD"MSXLOGOH.BIN",&HB008 1000 TIME=0 1010 CX=X1\8:CY=Y1\8 1020 _BLIT(X1,Y1,&HB008,&HB408,16,8,MB,32) 1030 X1=X1+V1:IF X1<1 OR X1>=128 THEN V1=-V1 1040 Y1=Y1+V2:IF Y1<1 OR Y1>=128 THEN V2=-V2 1050 XL=CX-1:IF XL<0 THEN XL=0 1060 YU=CY-1:IF YU<0 THEN YU=0 1070 XR=CX+18:IF XR>32 THEN XR=32 1080 YD=CY+10:IF YD>24 THEN YD=24 1090 T=YU*256+XL*8 1110 _BOXMEMVRM(MB+T,(XR-XL)*8,YD-YU,256,BASE(12)+T,256) 1130 _BOXMEMCPY(SB+T,(XR-XL)*8,YD-YU,256,MB+T,256) 1200 T=TIME:IF TM<T THEN TM=T 1210 A$=INKEY$:IF A$="" GOTO 1000 1220 SCREEN0:PRINT TM:END 3000 DATA &B10010010, &B01001001 3010 DATA &B00100100, &B10010010 3020 DATA &B01001001, &B00100100 3030 DATA &B10010010, &B01001001
Related to
CALL BLIT, CALL BOXMEMCPY, CALL BOXMEMVRM, CALL COLL, CALL FILRAM, CALL FILVRM, CALL MEMCPY, CALL MEMVRM, CALL TILERAM, CALL VRMMEM, PEEK, VPOKE
