msx_set_1bpp_sprite_data.s (864B)
1 .include "global.s" 2 3 .title "VRAM utilities" 4 .module VRAMUtils 5 6 .ez80 7 8 .area _HOME 9 10; void set_sprite_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) __z88dk_callee; 11_set_sprite_1bpp_data:: 12 pop af 13 pop hl 14 pop iy 15 pop de 16 push af 17 18 add hl, hl 19 add hl, hl 20 add hl, hl 21 22 ld bc, #.VDP_SPRDATA0 23 add hl, bc 24 25 DISABLE_VBLANK_COPY ; switch OFF copy shadow SAT 26 27 VDP_WRITE_CMD h, l 28 29 ex de, hl 30 31 ld d, iyh 32 ld e, iyl 33 34 ld c, #.VDP_DATA 35 inc d 36 inc e 37 jr 2$ 381$: 39 ld b, #8 403$: 41 outi 42 jr nz, 3$ 432$: 44 dec e 45 jr nz, 1$ 46 47 dec d 48 jr nz, 1$ 49 50 ENABLE_VBLANK_COPY ; switch ON copy shadow SAT 51 52 ret