git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/libc/targets/z80/msxdos/msx_set_1bpp_sprite_data.s

      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         DISABLE_VBLANK_COPY        ; switch OFF copy shadow SAT
     13 
     14         pop af
     15         pop hl
     16         pop iy
     17         pop de
     18         push af
     19 
     20         add hl, hl
     21         add hl, hl
     22         add hl, hl
     23 
     24         ld bc, #.VDP_SPRDATA0
     25         add hl, bc
     26 
     27 
     28         VDP_WRITE_CMD h, l
     29 
     30         ex de, hl
     31 
     32         ld d, iyh
     33         ld e, iyl
     34 
     35         ld c, #.VDP_DATA
     36         inc d
     37         inc e
     38         jr 2$
     39 1$:
     40         ld b, #8
     41 3$:        
     42         outi
     43         jr nz, 3$
     44 2$:
     45         dec e
     46         jr  nz, 1$
     47 
     48         dec d
     49         jr nz, 1$
     50 
     51         ENABLE_VBLANK_COPY         ; switch ON copy shadow SAT
     52 
     53         ret

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.