Remove unreferenced content in bank 0 (#1)

This commit is contained in:
xCrystal 2023-07-25 11:54:34 +02:00
parent fc7f2d4e0e
commit 60cacea4b0
22 changed files with 13 additions and 722 deletions

View File

@ -1,24 +1,3 @@
HDMATransferAttrmapAndTilemapToWRAMBank3::
ld hl, .Function
jp CallInSafeGFXMode
.Function:
decoord 0, 0, wAttrmap
ld hl, wScratchAttrmap
call PadAttrmapForHDMATransfer
decoord 0, 0
ld hl, wScratchTilemap
call PadTilemapForHDMATransfer
ld a, $0
ldh [rVBK], a
ld hl, wScratchTilemap
call HDMATransferToWRAMBank3
ld a, $1
ldh [rVBK], a
ld hl, wScratchAttrmap
call HDMATransferToWRAMBank3
ret
HDMATransferTilemapToWRAMBank3:: HDMATransferTilemapToWRAMBank3::
ld hl, .Function ld hl, .Function
jp CallInSafeGFXMode jp CallInSafeGFXMode

View File

@ -517,3 +517,12 @@ ScrollingMenu_GetListItemCoordAndFunctionArgs:
pop hl pop hl
pop de pop de
ret ret
xor_a:
xor a
ret
xor_a_dec_a:
xor a
dec a
ret

View File

@ -286,11 +286,6 @@ MinVolume::
ld [wVolume], a ld [wVolume], a
ret ret
FadeOutToMusic:: ; unreferenced
ld a, 4
ld [wMusicFade], a
ret
FadeInToMusic:: FadeInToMusic::
ld a, 4 | (1 << MUSIC_FADE_IN_F) ld a, 4 | (1 << MUSIC_FADE_IN_F)
ld [wMusicFade], a ld [wMusicFade], a
@ -436,11 +431,6 @@ SpecialMapMusic::
and a and a
ret ret
.bike ; unreferenced
ld de, MUSIC_BICYCLE
scf
ret
.surf .surf
ld de, MUSIC_SURF ld de, MUSIC_SURF
scf scf
@ -467,34 +457,6 @@ GetMapMusic_MaybeSpecial::
call GetMapMusic call GetMapMusic
ret ret
PlaceBCDNumberSprite:: ; unreferenced
; Places a BCD number at the upper center of the screen.
ld a, 4 * TILE_WIDTH
ld [wShadowOAMSprite38YCoord], a
ld [wShadowOAMSprite39YCoord], a
ld a, 10 * TILE_WIDTH
ld [wShadowOAMSprite38XCoord], a
ld a, 11 * TILE_WIDTH
ld [wShadowOAMSprite39XCoord], a
xor a
ld [wShadowOAMSprite38Attributes], a
ld [wShadowOAMSprite39Attributes], a
ld a, [wUnusedBCDNumber]
cp 100
jr nc, .max
add 1
daa
ld b, a
swap a
and $f
add "0"
ld [wShadowOAMSprite38TileID], a
ld a, b
and $f
add "0"
ld [wShadowOAMSprite39TileID], a
ret
.max .max
ld a, "9" ld a, "9"
ld [wShadowOAMSprite38TileID], a ld [wShadowOAMSprite38TileID], a

View File

@ -15,24 +15,6 @@ GetPartyLocation::
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
jp AddNTimes jp AddNTimes
GetDexNumber:: ; unreferenced
; Probably used in gen 1 to convert index number to dex number
; Not required in gen 2 because index number == dex number
push hl
ld a, b
dec a
ld b, 0
add hl, bc
ld hl, BaseData + BASE_DEX_NO
ld bc, BASE_DATA_SIZE
call AddNTimes
ld a, BANK(BaseData)
call GetFarWord
ld b, l
ld c, h
pop hl
ret
UserPartyAttr:: UserPartyAttr::
push af push af
ldh a, [hBattleTurn] ldh a, [hBattleTurn]

View File

@ -116,16 +116,3 @@ GetFarWRAMByte::
ldh [rSVBK], a ldh [rSVBK], a
ldh a, [hFarByte] ldh a, [hFarByte]
ret ret
GetFarWRAMWord:: ; unreferenced
ldh [hTempBank], a
ldh a, [rSVBK]
push af
ldh a, [hTempBank]
ldh [rSVBK], a
ld a, [hli]
ld h, [hl]
ld l, a
pop af
ldh [rSVBK], a
ret

View File

@ -1,24 +1,5 @@
; Functions to fade the screen in and out. ; Functions to fade the screen in and out.
TimeOfDayFade:: ; unreferenced
ld a, [wTimeOfDayPal]
ld b, a
ld hl, IncGradGBPalTable_11
ld a, l
sub b
ld l, a
jr nc, .okay
dec h
.okay
ld a, [hli]
ldh [rBGP], a
ld a, [hli]
ldh [rOBP0], a
ld a, [hli]
ldh [rOBP1], a
ret
RotateFourPalettesRight:: RotateFourPalettesRight::
ldh a, [hCGB] ldh a, [hCGB]
and a and a

View File

@ -101,30 +101,3 @@ CheckReceivedDex::
ld a, c ld a, c
and a and a
ret ret
CheckBPressedDebug:: ; unreferenced
; Used in debug ROMs to walk through walls and avoid encounters.
ld a, [wDebugFlags]
bit DEBUG_FIELD_F, a
ret z
ldh a, [hJoyDown]
bit B_BUTTON_F, a
ret
xor_a::
xor a
ret
xor_a_dec_a::
xor a
dec a
ret
CheckFieldDebug:: ; unreferenced
push hl
ld hl, wDebugFlags
bit DEBUG_FIELD_F, [hl]
pop hl
ret

View File

@ -32,68 +32,6 @@ FarCopyBytesDouble_DoubleBankSwitch::
rst Bankswitch rst Bankswitch
ret ret
SafeHDMATransfer: ; unreferenced
dec c
ldh a, [hBGMapMode]
push af
xor a
ldh [hBGMapMode], a
ldh a, [hROMBank]
push af
ld a, b
rst Bankswitch
.loop
; load the source and target MSB and LSB
ld a, d
ldh [rHDMA1], a ; source MSB
ld a, e
and $f0
ldh [rHDMA2], a ; source LSB
ld a, h
and $1f
ldh [rHDMA3], a ; target MSB
ld a, l
and $f0
ldh [rHDMA4], a ; target LSB
; stop when c < TILES_PER_CYCLE
ld a, c
cp TILES_PER_CYCLE
jr c, .done
; decrease c by TILES_PER_CYCLE
sub TILES_PER_CYCLE
ld c, a
; DMA transfer state
ld a, $f
ldh [hDMATransfer], a
call DelayFrame
; add $100 to hl and de
ld a, l
add LOW($100)
ld l, a
ld a, h
adc HIGH($100)
ld h, a
ld a, e
add LOW($100)
ld e, a
ld a, d
adc HIGH($100)
ld d, a
jr .loop
.done
ld a, c
and $7f ; pretty silly, considering at most bits 0-2 would be set
ldh [hDMATransfer], a
call DelayFrame
pop af
rst Bankswitch
pop af
ldh [hBGMapMode], a
ret
UpdatePlayerSprite:: UpdatePlayerSprite::
farcall _UpdatePlayerSprite farcall _UpdatePlayerSprite
ret ret
@ -111,10 +49,6 @@ LoadFontsExtra::
farcall _LoadFontsExtra2 farcall _LoadFontsExtra2
ret ret
LoadFontsExtra2: ; unreferenced
farcall _LoadFontsExtra2
ret
DecompressRequest2bpp:: DecompressRequest2bpp::
push de push de
ld a, BANK(sScratch) ld a, BANK(sScratch)

View File

@ -261,34 +261,6 @@ StopAutoInput::
ld [wInputType], a ld [wInputType], a
ret ret
JoyTitleScreenInput:: ; unreferenced
.loop
call DelayFrame
push bc
call JoyTextDelay
pop bc
; Save data can be deleted by pressing Up + B + Select.
ldh a, [hJoyDown]
cp D_UP | SELECT | B_BUTTON
jr z, .keycombo
; Press Start or A to start the game.
ldh a, [hJoyLast]
and START | A_BUTTON
jr nz, .keycombo
dec c
jr nz, .loop
and a
ret
.keycombo
scf
ret
JoyWaitAorB:: JoyWaitAorB::
.loop .loop
call DelayFrame call DelayFrame

View File

@ -1,14 +1,5 @@
; LCD handling ; LCD handling
Function547:: ; unreferenced
ldh a, [hLCDCPointer]
cp LOW(rSCX)
ret nz
ld c, a
ld a, [wLYOverrides]
ldh [c], a
ret
LCD:: LCD::
push af push af
ldh a, [hLCDCPointer] ldh a, [hLCDCPointer]

View File

@ -366,14 +366,6 @@ CheckIndoorMap::
cp GATE cp GATE
ret ret
CheckUnknownMap:: ; unreferenced
cp INDOOR
ret z
cp GATE
ret z
cp ENVIRONMENT_5
ret
LoadMapAttributes:: LoadMapAttributes::
call CopyMapPartialAndAttributes call CopyMapPartialAndAttributes
call SwitchToMapScriptsBank call SwitchToMapScriptsBank
@ -1105,16 +1097,10 @@ ObjectEventText::
text_far _ObjectEventText text_far _ObjectEventText
text_end text_end
BGEvent:: ; unreferenced
jumptext BGEventText
BGEventText:: BGEventText::
text_far _BGEventText text_far _BGEventText
text_end text_end
CoordinatesEvent:: ; unreferenced
jumptext CoordinatesEventText
CoordinatesEventText:: CoordinatesEventText::
text_far _CoordinatesEventText text_far _CoordinatesEventText
text_end text_end
@ -1330,13 +1316,6 @@ UpdateBGMapColumn::
ldh [hBGMapTileCount], a ldh [hBGMapTileCount], a
ret ret
ClearBGMapBuffer:: ; unreferenced
ld hl, wBGMapBuffer
ld bc, wBGMapBufferEnd - wBGMapBuffer
xor a
call ByteFill
ret
LoadTilesetGFX:: LoadTilesetGFX::
ld hl, wTilesetAddress ld hl, wTilesetAddress
ld a, [hli] ld a, [hli]
@ -2065,11 +2044,6 @@ SwitchToAnyMapAttributesBank::
rst Bankswitch rst Bankswitch
ret ret
GetMapAttributesBank:: ; unreferenced
ld a, [wMapGroup]
ld b, a
ld a, [wMapNumber]
ld c, a
GetAnyMapAttributesBank:: GetAnyMapAttributesBank::
push hl push hl
push de push de
@ -2159,9 +2133,6 @@ GetMapEnvironment::
pop hl pop hl
ret ret
Map_DummyFunction:: ; unreferenced
ret
GetAnyMapEnvironment:: GetAnyMapEnvironment::
push hl push hl
push de push de

View File

@ -300,12 +300,6 @@ CheckObjectTime::
scf scf
ret ret
CopyMapObjectStruct:: ; unreferenced
ldh [hMapObjectIndex], a
call GetMapObject
call CopyObjectStruct
ret
UnmaskCopyMapObjectStruct:: UnmaskCopyMapObjectStruct::
ldh [hMapObjectIndex], a ldh [hMapObjectIndex], a
call UnmaskObject call UnmaskObject
@ -362,35 +356,6 @@ CopyPlayerObjectTemplate::
call CopyBytes call CopyBytes
ret ret
DeleteFollowerMapObject: ; unreferenced
call GetMapObject
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc
ld a, [hl]
push af
ld [hl], -1
inc hl
ld bc, MAPOBJECT_LENGTH - 1
xor a
call ByteFill
pop af
cp -1
ret z
cp NUM_OBJECT_STRUCTS
ret nc
ld b, a
ld a, [wObjectFollow_Leader]
cp b
jr nz, .ok
ld a, -1
ld [wObjectFollow_Leader], a
.ok
ld a, b
call GetObjectStruct
farcall DeleteMapObject
ret
LoadMovementDataPointer:: LoadMovementDataPointer::
; Load the movement data pointer for object a. ; Load the movement data pointer for object a.
ld [wMovementObject], a ld [wMovementObject], a
@ -574,16 +539,6 @@ _GetMovementIndex::
ld a, h ld a, h
ret ret
SetVramState_Bit0:: ; unreferenced
ld hl, wVramState
set 0, [hl]
ret
ResetVramState_Bit0:: ; unreferenced
ld hl, wVramState
res 0, [hl]
ret
UpdateSprites:: UpdateSprites::
ld a, [wVramState] ld a, [wVramState]
bit 0, a bit 0, a

View File

@ -47,12 +47,3 @@ Divide::
pop de pop de
pop hl pop hl
ret ret
SubtractAbsolute:: ; unreferenced
; Return |a - b|, sign in carry.
sub b
ret nc
cpl
add 1
scf
ret

View File

@ -287,7 +287,7 @@ MenuBoxCoord2Attr::
ld b, a ld b, a
; fallthrough ; fallthrough
Coord2Attr:: ; unreferenced Coord2Attr::
; Return the address of wAttrmap(c, b) in hl. ; Return the address of wAttrmap(c, b) in hl.
xor a xor a
ld h, a ld h, a
@ -331,9 +331,6 @@ MenuTextbox::
pop hl pop hl
jp PrintText jp PrintText
Menu_DummyFunction:: ; unreferenced
ret
LoadMenuTextbox:: LoadMenuTextbox::
ld hl, .MenuHeader ld hl, .MenuHeader
call LoadMenuHeader call LoadMenuHeader
@ -419,13 +416,6 @@ YesNoBox::
lb bc, SCREEN_WIDTH - 6, 7 lb bc, SCREEN_WIDTH - 6, 7
PlaceYesNoBox:: PlaceYesNoBox::
jr _YesNoBox
PlaceGenericTwoOptionBox:: ; unreferenced
call LoadMenuHeader
jr InterpretTwoOptionMenu
_YesNoBox::
; Return nc (yes) or c (no). ; Return nc (yes) or c (no).
push bc push bc
ld hl, YesNoMenuHeader ld hl, YesNoMenuHeader
@ -723,15 +713,6 @@ PlaceNthMenuStrings::
call PlaceString call PlaceString
ret ret
GetNthMenuStrings:: ; unreferenced
call GetMenuDataPointerTableEntry
inc hl
inc hl
ld a, [hli]
ld d, [hl]
ld e, a
ret
MenuJumptable:: MenuJumptable::
ld a, [wMenuSelection] ld a, [wMenuSelection]
call GetMenuDataPointerTableEntry call GetMenuDataPointerTableEntry

View File

@ -1,298 +0,0 @@
MobileAPI::
; Mobile
cp $2
ld [wMobileAPIIndex], a
ld a, l
ld [wc986], a
ld a, h
ld [wc987], a
jr nz, .okay
ld [wc982], a
ld a, l
ld [wc981], a
ld hl, wc983
ld a, c
ld [hli], a
ld a, b
ld [hl], a
.okay
ld hl, wc822
set 6, [hl]
ldh a, [hROMBank]
push af
ld a, BANK(_MobileAPI)
ld [wc981], a
rst Bankswitch
jp _MobileAPI
ReturnMobileAPI::
; Return from _MobileAPI
ld [wc986], a
ld a, l
ld [wc987], a
ld a, h
ld [wMobileAPIIndex], a
pop bc
ld a, b
ld [wc981], a
rst Bankswitch
ld hl, wc822
res 6, [hl]
ld hl, wc987
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [wc986]
ret
MobileReceive::
ldh a, [hROMBank]
push af
ld a, BANK(_MobileReceive)
ld [wc981], a
rst Bankswitch
call _MobileReceive
pop bc
ld a, b
ld [wc981], a
rst Bankswitch
ret
MobileTimer::
push af
push bc
push de
push hl
ldh a, [hMobile]
and a
jr z, .pop_ret
xor a
ldh [rTAC], a
; Turn off timer interrupt
ldh a, [rIF]
and 1 << VBLANK | 1 << LCD_STAT | 1 << SERIAL | 1 << JOYPAD
ldh [rIF], a
ld a, [wc86a]
or a
jr z, .pop_ret
ld a, [wc822]
bit 1, a
jr nz, .skip_timer
ldh a, [rSC]
and 1 << rSC_ON
jr nz, .skip_timer
ldh a, [hROMBank]
push af
ld a, BANK(_Timer)
ld [wc981], a
rst Bankswitch
call _Timer
pop bc
ld a, b
ld [wc981], a
rst Bankswitch
.skip_timer
ldh a, [rTMA]
ldh [rTIMA], a
ld a, 1 << rTAC_ON | rTAC_65536_HZ
ldh [rTAC], a
.pop_ret
pop hl
pop de
pop bc
pop af
reti
Function3ed7:: ; unreferenced
ld [$dc02], a
ldh a, [hROMBank]
push af
ld a, BANK(Function114243)
rst Bankswitch
call Function114243
pop bc
ld a, b
rst Bankswitch
ld a, [$dc02]
ret
Function3eea::
push hl
push bc
ld de, wAttrmap - wTilemap
add hl, de
inc b
inc b
inc c
inc c
call Function3f35
pop bc
pop hl
call MobileHome_PlaceBox
ret
Function3efd:: ; unreferenced
push hl
hlcoord 0, 12
ld b, 4
ld c, 18
call .fill_attr
pop hl
call PrintTextboxText
ret
.fill_attr
push hl
push bc
ld de, wAttrmap - wTilemap
add hl, de
inc b
inc b
inc c
inc c
call Function3f35
pop bc
pop hl
call TextboxBorder
ret
Function3f20::
hlcoord 0, 0, wAttrmap
ld b, 6
ld c, 20
call Function3f35
hlcoord 0, 0
ld b, 4
ld c, 18
call MobileHome_PlaceBox
ret
Function3f35::
ld a, 6
ld de, SCREEN_WIDTH
.row
push bc
push hl
.col
ld [hli], a
dec c
jr nz, .col
pop hl
add hl, de
pop bc
dec b
jr nz, .row
ret
MobileHome_PlaceBox:
push bc
call .FillTop
pop bc
.RowLoop:
push bc
call .FillMiddle
pop bc
dec b
jr nz, .RowLoop
call .FillBottom
ret
.FillTop:
ld a, $63
ld d, $62
ld e, $64
jr .FillRow
.FillBottom:
ld a, $68
ld d, $67
ld e, $69
jr .FillRow
.FillMiddle:
ld a, $7f
ld d, $65
ld e, $66
.FillRow:
push hl
ld [hl], d
inc hl
.FillLoop:
ld [hli], a
dec c
jr nz, .FillLoop
ld [hl], e
pop hl
ld de, SCREEN_WIDTH
add hl, de
ret
Function3f7c::
call MenuBoxCoord2Tile
call GetMenuBoxDims
dec b
dec c
call Function3eea
ret
Function3f88::
ld hl, wDecompressScratch
ld b, 0
.row
push bc
ld c, 1 tiles / 2
.col
ld a, [de]
inc de
cpl
ld [hl], 0
inc hl
ld [hli], a
dec c
jr nz, .col
pop bc
dec c
jr nz, .row
ret
Function3f9f::
ld hl, wDecompressScratch
.row
push bc
ld c, 1 tiles / 2
.col
ld a, [de]
inc de
inc de
cpl
ld [hl], $0
inc hl
ld [hli], a
dec c
jr nz, .col
pop bc
dec c
jr nz, .row
ret

View File

@ -234,14 +234,6 @@ Print8BitNumLeftAlign::
ld b, PRINTNUM_LEFTALIGN | 1 ld b, PRINTNUM_LEFTALIGN | 1
jp PrintNum jp PrintNum
GetNthMove:: ; unreferenced
ld hl, wListMoves_MoveIndicesBuffer
ld c, a
ld b, 0
add hl, bc
ld a, [hl]
ret
GetBaseData:: GetBaseData::
push bc push bc
push de push de

View File

@ -276,11 +276,6 @@ Serial_PrintWaitingTextAndSyncAndExchangeNybble::
call WaitLinkTransfer call WaitLinkTransfer
jp SafeLoadTempTilemapToTilemap jp SafeLoadTempTilemapToTilemap
Serial_SyncAndExchangeNybble:: ; unreferenced
call LoadTilemapToTempTilemap
callfar PlaceWaitingText
jp WaitLinkTransfer ; pointless
WaitLinkTransfer:: WaitLinkTransfer::
vc_hook Wireless_WaitLinkTransfer vc_hook Wireless_WaitLinkTransfer
ld a, $ff ld a, $ff
@ -397,18 +392,3 @@ LinkDataReceived::
ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) ld a, (1 << rSC_ON) | (1 << rSC_CLOCK)
ldh [rSC], a ldh [rSC], a
ret ret
SetBitsForTimeCapsuleRequestIfNotLinked:: ; unreferenced
; Similar to SetBitsForTimeCapsuleRequest (see engine/link/link.asm).
ld a, [wLinkMode]
and a
ret nz
ld a, USING_INTERNAL_CLOCK
ldh [rSB], a
xor a
ldh [hSerialReceive], a
ld a, (0 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ld a, (1 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ret

View File

@ -128,10 +128,6 @@ SpeechTextbox::
ld c, TEXTBOX_INNERW ld c, TEXTBOX_INNERW
jp Textbox jp Textbox
GameFreakText:: ; unreferenced
text "ゲームフりーク!" ; "GAMEFREAK!"
done
RadioTerminator:: RadioTerminator::
ld hl, .stop ld hl, .stop
ret ret
@ -177,10 +173,6 @@ PlaceNextChar::
pop hl pop hl
ret ret
DummyChar:: ; unreferenced
pop de
; fallthrough
NextChar:: NextChar::
inc de inc de
jp PlaceNextChar jp PlaceNextChar
@ -241,11 +233,11 @@ ENDM
dict "<USER>", PlaceMoveUsersName dict "<USER>", PlaceMoveUsersName
dict "<ENEMY>", PlaceEnemysName dict "<ENEMY>", PlaceEnemysName
dict "<PLAY_G>", PlaceGenderedPlayerName dict "<PLAY_G>", PlaceGenderedPlayerName
dict "゚", .place ; should be .diacritic dict "゚", .diacritic
dict "゙", .place ; should be .diacritic dict "゙", .diacritic
jr .not_diacritic jr .not_diacritic
.diacritic ; unreferenced .diacritic
ld b, a ld b, a
call Diacritic call Diacritic
jp NextChar jp NextChar

View File

@ -60,10 +60,6 @@ CGBOnly_CopyTilemapAtOnce::
CopyTilemapAtOnce:: CopyTilemapAtOnce::
jr _CopyTilemapAtOnce jr _CopyTilemapAtOnce
CopyAttrmapAndTilemapToWRAMBank3: ; unreferenced
farcall HDMATransferAttrmapAndTilemapToWRAMBank3
ret
_CopyTilemapAtOnce: _CopyTilemapAtOnce:
ldh a, [hBGMapMode] ldh a, [hBGMapMode]
push af push af

View File

@ -248,17 +248,6 @@ SetClock::
call CloseSRAM ; unlatch clock, disable clock r/w call CloseSRAM ; unlatch clock, disable clock r/w
ret ret
ClearRTCStatus:: ; unreferenced
; clear sRTCStatusFlags
xor a
push af
ld a, BANK(sRTCStatusFlags)
call OpenSRAM
pop af
ld [sRTCStatusFlags], a
call CloseSRAM
ret
RecordRTCStatus:: RecordRTCStatus::
; append flags to sRTCStatusFlags ; append flags to sRTCStatusFlags
ld hl, sRTCStatusFlags ld hl, sRTCStatusFlags

View File

@ -203,30 +203,6 @@ FacingPlayerDistance::
and a and a
ret ret
CheckTrainerFlag:: ; unreferenced
push bc
ld hl, OBJECT_MAP_OBJECT_INDEX
add hl, bc
ld a, [hl]
call GetMapObject
ld hl, MAPOBJECT_SCRIPT_POINTER
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
call GetMapScriptsBank
call GetFarWord
ld d, h
ld e, l
push de
ld b, CHECK_FLAG
call EventFlagAction
pop de
ld a, c
and a
pop bc
ret
PrintWinLossText:: PrintWinLossText::
ld a, [wBattleType] ld a, [wBattleType]
cp BATTLETYPE_CANLOSE cp BATTLETYPE_CANLOSE

View File

@ -91,7 +91,3 @@ SafeUpdateSprites::
pop af pop af
ldh [hOAMUpdate], a ldh [hOAMUpdate], a
ret ret
SetCarryFlag:: ; unreferenced
scf
ret