Re: A86: Super fast GridPutSprite


[Prev][Next][Index][Thread]

Re: A86: Super fast GridPutSprite




Yes, I mean that one row of 8 pixels fits evenly into one byte, without
shifting.  Thus, there is a "grid" of 16x8 sprites that fit on the screen
without shifting or overlapping.

The code below loads a 4k (exactly, 4096 bytes) into Ram page 1, starting at
address $800b.

TempRam  = $800b    ; $800b to $bfea = 16352 bytes  (thanks Dux!)
Map   = TempRam   ; [4096]

loaddata:
 ld hl,mapvar-1    ; point to var name (first byte is irrelevant)
 rst 20h     ; load name into OP1
 rst 10h     ; call _FINDSYM
 ret c       ; if it doesn't exist, return
 ld a,b      ; copy high byte
 ex de,hl     ; swap low bytes
 inc hl      ; skip length word
 inc hl      ; it is a word, not a byte...
 call _SET_ABS_SRC_ADDR  ; set the source address as the var
 ld a,1      ; copy to ram page 1
 ld hl,Map-$8000   ; start at $8000 on page 1 (page 1 is at $10000 ABS)
 call _SET_ABS_DEST_ADDR ; set the destination as ram page 1
 xor a      ; clear high byte
 ld hl,4096     ; size of string var
 call _SET_MM_NUM_BYTES  ; set the number of bytes to copy
 call _mm_ldir    ; copy the map
 call _RAM_PAGE_1   ; make sure ram page 1 is still loaded
 jr dataloaded
mapvar:
 .db 8,"cnc86map"
dataloaded:


-----Original Message-----
From: InFuZeD <zoneti@home.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Tuesday, November 03, 1998 10:28 AM
Subject: Re: A86: Super fast GridPutSprite


>
>
>I needed to know how to address the data in RAM page 1 to load it.
>Second, By saying the sprite fits in 1 byte, do you mean that It is one
>row of a sprite? Just wondering.
>
>-InFuZeD
>



Follow-Ups: