Add rX as symbol aliases to IO_X

This commit is contained in:
Lior Halphon 2022-07-01 17:40:47 +03:00
parent f2429e1c25
commit 1065a40d8f
2 changed files with 70 additions and 0 deletions

View File

@ -44,6 +44,9 @@ const GB_bank_symbol_t *GB_map_find_symbol(GB_symbol_map_t *map, uint16_t addr)
index--; index--;
} }
if (index < map->n_symbols) { if (index < map->n_symbols) {
while (index && map->symbols[index].addr == map->symbols[index - 1].addr) {
index--;
}
return &map->symbols[index]; return &map->symbols[index];
} }
return NULL; return NULL;

View File

@ -1,67 +1,134 @@
00:FF00 IO_JOYP 00:FF00 IO_JOYP
00:FF00 rJOYP
00:FF01 IO_SB 00:FF01 IO_SB
00:FF01 rSB
00:FF02 IO_SC 00:FF02 IO_SC
00:FF02 rSC
00:FF04 IO_DIV 00:FF04 IO_DIV
00:FF04 rDIV
00:FF05 IO_TIMA 00:FF05 IO_TIMA
00:FF05 rTIMA
00:FF06 IO_TMA 00:FF06 IO_TMA
00:FF06 rTMA
00:FF07 IO_TAC 00:FF07 IO_TAC
00:FF07 rTAC
00:FF0F IO_IF 00:FF0F IO_IF
00:FF0F rIF
00:FF10 IO_NR10 00:FF10 IO_NR10
00:FF10 rNR10
00:FF11 IO_NR11 00:FF11 IO_NR11
00:FF11 rNR11
00:FF12 IO_NR12 00:FF12 IO_NR12
00:FF12 rNR12
00:FF13 IO_NR13 00:FF13 IO_NR13
00:FF13 rNR13
00:FF14 IO_NR14 00:FF14 IO_NR14
00:FF14 rNR14
00:FF16 IO_NR21 00:FF16 IO_NR21
00:FF16 rNR21
00:FF17 IO_NR22 00:FF17 IO_NR22
00:FF17 rNR22
00:FF18 IO_NR23 00:FF18 IO_NR23
00:FF18 rNR23
00:FF19 IO_NR24 00:FF19 IO_NR24
00:FF19 rNR24
00:FF1A IO_NR30 00:FF1A IO_NR30
00:FF1A rNR30
00:FF1B IO_NR31 00:FF1B IO_NR31
00:FF1B rNR31
00:FF1C IO_NR32 00:FF1C IO_NR32
00:FF1C rNR32
00:FF1D IO_NR33 00:FF1D IO_NR33
00:FF1D rNR33
00:FF1E IO_NR34 00:FF1E IO_NR34
00:FF1E rNR34
00:FF20 IO_NR41 00:FF20 IO_NR41
00:FF20 rNR41
00:FF21 IO_NR42 00:FF21 IO_NR42
00:FF21 rNR42
00:FF22 IO_NR43 00:FF22 IO_NR43
00:FF22 rNR43
00:FF23 IO_NR44 00:FF23 IO_NR44
00:FF23 rNR44
00:FF24 IO_NR50 00:FF24 IO_NR50
00:FF24 rNR50
00:FF25 IO_NR51 00:FF25 IO_NR51
00:FF25 rNR51
00:FF26 IO_NR52 00:FF26 IO_NR52
00:FF26 rNR52
00:FF30 IO_WAV_START 00:FF30 IO_WAV_START
00:FF30 rWAV_START
00:FF3F IO_WAV_END 00:FF3F IO_WAV_END
00:FF3F rWAV_END
00:FF40 IO_LCDC 00:FF40 IO_LCDC
00:FF40 rLCDC
00:FF41 IO_STAT 00:FF41 IO_STAT
00:FF41 rSTAT
00:FF42 IO_SCY 00:FF42 IO_SCY
00:FF42 rSCY
00:FF43 IO_SCX 00:FF43 IO_SCX
00:FF43 rSCX
00:FF44 IO_LY 00:FF44 IO_LY
00:FF44 rLY
00:FF45 IO_LYC 00:FF45 IO_LYC
00:FF45 rLYC
00:FF46 IO_DMA 00:FF46 IO_DMA
00:FF46 rDMA
00:FF47 IO_BGP 00:FF47 IO_BGP
00:FF47 rBGP
00:FF48 IO_OBP0 00:FF48 IO_OBP0
00:FF48 rOBP0
00:FF49 IO_OBP1 00:FF49 IO_OBP1
00:FF49 rOBP1
00:FF4A IO_WY 00:FF4A IO_WY
00:FF4A rWY
00:FF4B IO_WX 00:FF4B IO_WX
00:FF4B rWX
00:FF4C IO_KEY0 00:FF4C IO_KEY0
00:FF4C rKEY0
00:FF4D IO_KEY1 00:FF4D IO_KEY1
00:FF4D rKEY1
00:FF4F IO_VBK 00:FF4F IO_VBK
00:FF4F rVBK
00:FF50 IO_BANK 00:FF50 IO_BANK
00:FF50 rBANK
00:FF51 IO_HDMA1 00:FF51 IO_HDMA1
00:FF51 rHDMA1
00:FF52 IO_HDMA2 00:FF52 IO_HDMA2
00:FF52 rHDMA2
00:FF53 IO_HDMA3 00:FF53 IO_HDMA3
00:FF53 rHDMA3
00:FF54 IO_HDMA4 00:FF54 IO_HDMA4
00:FF54 rHDMA4
00:FF55 IO_HDMA5 00:FF55 IO_HDMA5
00:FF55 rHDMA5
00:FF56 IO_RP 00:FF56 IO_RP
00:FF56 rRP
00:FF68 IO_BGPI 00:FF68 IO_BGPI
00:FF68 rBGPI
00:FF69 IO_BGPD 00:FF69 IO_BGPD
00:FF69 rBGPD
00:FF6A IO_OBPI 00:FF6A IO_OBPI
00:FF6A rOBPI
00:FF6B IO_OBPD 00:FF6B IO_OBPD
00:FF6B rOBPD
00:FF6C IO_OPRI 00:FF6C IO_OPRI
00:FF6C rOPRI
00:FF70 IO_SVBK 00:FF70 IO_SVBK
00:FF70 rSVBK
00:FF71 IO_PSM 00:FF71 IO_PSM
00:FF71 rPSM
00:FF72 IO_PSWX 00:FF72 IO_PSWX
00:FF72 rPSWX
00:FF73 IO_PSWY 00:FF73 IO_PSWY
00:FF73 rPSWY
00:FF74 IO_PSW 00:FF74 IO_PSW
00:FF74 rPSW
00:FF75 IO_UNKNOWN5 00:FF75 IO_UNKNOWN5
00:FF75 rUNKNOWN5
00:FF76 IO_PCM12 00:FF76 IO_PCM12
00:FF76 rPCM12
00:FF77 IO_PCM34 00:FF77 IO_PCM34
00:FF77 rPCM34
00:FFFF IO_IE 00:FFFF IO_IE
00:FFFF rIE