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/mos6502/nes/mapper.s

      1 .include "global.s"
      2 .include "mapper_macros.s"
      3 
      4 __switch_prg0::
      5     sta *__current_bank
      6 .ifdef VRAM_MAPPER_CFG_TRANSFER
      7     ora *__current_vram_cfg_write
      8 .endif
      9     SWITCH_PRG0_A
     10     rts
     11 
     12 .ifdef VRAM_MAPPER_CFG_TRANSFER
     13 __switch_win_addr_temp::
     14     pha
     15     lda #0
     16     cpx #PPUHI_WIN
     17     bcc 0$
     18     ora #MAPPER_CFG_NT_MASK
     19 0$:
     20     ora *__current_vram_cfg_write
     21     ora *__current_bank
     22     sta MAPPER_WRITE_REG
     23     pla
     24     rts
     25 .endif
     26 
     27 __show_window::
     28 .ifdef NES_WINDOW_LAYER
     29     lda *__oam_valid_display_on
     30     ora #WINDOW_ON_MASK
     31     sta *__oam_valid_display_on
     32 .endif
     33     rts
     34 
     35 __hide_window::
     36 .ifdef NES_WINDOW_LAYER
     37     lda *__oam_valid_display_on
     38     and #~WINDOW_ON_MASK
     39     sta *__oam_valid_display_on
     40 .endif
     41     rts

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