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_macros.s

      1 ;
      2 ; Define for mapper register
      3 ;
      4 .define MAPPER_WRITE_REG ".identity"
      5 
      6 ;
      7 ; Set PRG bank to A register
      8 ;
      9 ; Trashes Y register.
     10 ;
     11 .macro SWITCH_PRG0_A
     12     tay
     13     sta .identity,Y
     14 .endm
     15 
     16 ;
     17 ; Set PRG bank to Y register
     18 ;
     19 ; Trashes A register.
     20 ;
     21 .macro SWITCH_PRG0_Y
     22     tya
     23     sta .identity,Y
     24 .endm
     25 
     26 ;
     27 ; Modify PPU high address bits in A based on VRAM switch config
     28 ;
     29 ; 
     30 ;
     31 .macro SET_PPUHI_ADDRESS_A ?.skip
     32 .ifdef NES_WINDOW_LAYER
     33     bit *__current_vram_cfg_write
     34     bpl .skip
     35     ora #PPUHI_WIN
     36 .skip:
     37 .endif
     38 .endm

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