CRASH Radio

Latest YouTube Video

My Projects

"ZX Spectrum NEXT Assembly - Sprites Setup"

HL = source, A = sprite pattern to write to, B = 0 (256 bytes to write due to wraparound to 255 from 0), x = MMU for 1st bank of 32 8-bit sprites, xx = MMU for 2nd bank of 32 8-bit sprites.


spritesetup
   ld bc,$303b:ld a,0:out (c),a
   nextreg $50,x:ld hl,0:ld a,0
sloop:ld c,$5b:ld b,0:otir:inc a:cp 32:jr nz,sloop
   nextreg $50,xx:ld hl,0
sloop2:ld c,$5b:ld b,0:otir:inc a:cp 64:jr nz,sloop2
   ret

My Social Links