mirror of https://github.com/pret/pokecrystal.git
Identify various "????"s (#1125)
This commit is contained in:
parent
23183bb9bb
commit
8819f7b117
|
@ -733,7 +733,7 @@ LoadNote:
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
; get direction of pitch slide
|
; subtract pitch slide from frequency
|
||||||
ld hl, CHANNEL_PITCH_SLIDE_TARGET
|
ld hl, CHANNEL_PITCH_SLIDE_TARGET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, e
|
ld a, e
|
||||||
|
@ -755,7 +755,7 @@ LoadNote:
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
; ????
|
; subtract frequency from pitch slide
|
||||||
ld hl, CHANNEL_PITCH_SLIDE_TARGET
|
ld hl, CHANNEL_PITCH_SLIDE_TARGET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
@ -764,7 +764,6 @@ LoadNote:
|
||||||
ld a, d
|
ld a, d
|
||||||
sbc 0
|
sbc 0
|
||||||
ld d, a
|
ld d, a
|
||||||
; ????
|
|
||||||
ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1
|
ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
|
@ -906,7 +905,7 @@ HandleTrackVibrato:
|
||||||
swap [hl]
|
swap [hl]
|
||||||
or [hl]
|
or [hl]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
; ????
|
; get the frequency
|
||||||
ld a, [wCurTrackFrequency]
|
ld a, [wCurTrackFrequency]
|
||||||
ld e, a
|
ld e, a
|
||||||
; toggle vibrato up/down
|
; toggle vibrato up/down
|
||||||
|
@ -1190,7 +1189,7 @@ ParseMusic:
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
; ????
|
; set noise sampling
|
||||||
ld hl, CHANNEL_NOTE_FLAGS
|
ld hl, CHANNEL_NOTE_FLAGS
|
||||||
add hl, bc
|
add hl, bc
|
||||||
set NOTE_NOISE_SAMPLING, [hl]
|
set NOTE_NOISE_SAMPLING, [hl]
|
||||||
|
@ -1209,10 +1208,10 @@ ParseMusic:
|
||||||
add hl, bc
|
add hl, bc
|
||||||
bit SOUND_SUBROUTINE, [hl] ; in a subroutine?
|
bit SOUND_SUBROUTINE, [hl] ; in a subroutine?
|
||||||
jr nz, .readcommand ; execute
|
jr nz, .readcommand ; execute
|
||||||
|
; are we in a sfx channel right now?
|
||||||
ld a, [wCurChannel]
|
ld a, [wCurChannel]
|
||||||
cp CHAN5
|
cp NUM_MUSIC_CHANS
|
||||||
jr nc, .chan_5to8
|
jr nc, .chan_5to8
|
||||||
; ????
|
|
||||||
ld hl, CHANNEL_STRUCT_LENGTH * NUM_MUSIC_CHANS + CHANNEL_FLAGS1
|
ld hl, CHANNEL_STRUCT_LENGTH * NUM_MUSIC_CHANS + CHANNEL_FLAGS1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
bit SOUND_CHANNEL_ON, [hl]
|
bit SOUND_CHANNEL_ON, [hl]
|
||||||
|
@ -1226,9 +1225,9 @@ ParseMusic:
|
||||||
ld a, [wCurChannel]
|
ld a, [wCurChannel]
|
||||||
cp CHAN5
|
cp CHAN5
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
; ????
|
; sweep = 0
|
||||||
xor a
|
xor a
|
||||||
ldh [rNR10], a ; sweep = 0
|
ldh [rNR10], a
|
||||||
.ok
|
.ok
|
||||||
; stop playing
|
; stop playing
|
||||||
; turn channel off
|
; turn channel off
|
||||||
|
@ -1348,7 +1347,7 @@ GetNoiseSample:
|
||||||
ld [wNoiseSampleAddress], a
|
ld [wNoiseSampleAddress], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNoiseSampleAddress + 1], a
|
ld [wNoiseSampleAddress + 1], a
|
||||||
; clear ????
|
; clear noise sample delay
|
||||||
xor a
|
xor a
|
||||||
ld [wNoiseSampleDelay], a
|
ld [wNoiseSampleDelay], a
|
||||||
ret
|
ret
|
||||||
|
@ -1629,7 +1628,7 @@ MusicEE:
|
||||||
; params: 2
|
; params: 2
|
||||||
; ll hh ; pointer
|
; ll hh ; pointer
|
||||||
|
|
||||||
; if ????, jump
|
; if condition is set, jump
|
||||||
; get channel
|
; get channel
|
||||||
ld a, [wCurChannel]
|
ld a, [wCurChannel]
|
||||||
maskbits NUM_MUSIC_CHANS
|
maskbits NUM_MUSIC_CHANS
|
||||||
|
@ -2206,7 +2205,7 @@ SetNoteDuration:
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
; add ???? to the next result
|
; add ??? to the next result
|
||||||
ld hl, CHANNEL_FIELD16
|
ld hl, CHANNEL_FIELD16
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld l, [hl]
|
ld l, [hl]
|
||||||
|
@ -2215,7 +2214,7 @@ SetNoteDuration:
|
||||||
; copy result to de
|
; copy result to de
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
; store result in ????
|
; store result in ???
|
||||||
ld hl, CHANNEL_FIELD16
|
ld hl, CHANNEL_FIELD16
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
|
@ -2250,7 +2249,7 @@ SetGlobalTempo:
|
||||||
push bc ; save current channel
|
push bc ; save current channel
|
||||||
; are we dealing with music or sfx?
|
; are we dealing with music or sfx?
|
||||||
ld a, [wCurChannel]
|
ld a, [wCurChannel]
|
||||||
cp CHAN5
|
cp NUM_MUSIC_CHANS
|
||||||
jr nc, .sfxchannels
|
jr nc, .sfxchannels
|
||||||
ld bc, wChannel1
|
ld bc, wChannel1
|
||||||
call Tempo
|
call Tempo
|
||||||
|
@ -2284,7 +2283,7 @@ Tempo:
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
; clear ????
|
; clear ???
|
||||||
xor a
|
xor a
|
||||||
ld hl, CHANNEL_FIELD16
|
ld hl, CHANNEL_FIELD16
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
|
|
@ -3,7 +3,7 @@ ChrisNameMenuHeader:
|
||||||
menu_coords 0, 0, 10, TEXTBOX_Y - 1
|
menu_coords 0, 0, 10, TEXTBOX_Y - 1
|
||||||
dw .MaleNames
|
dw .MaleNames
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
db 0 ; ????
|
db 0 ; ???
|
||||||
|
|
||||||
.MaleNames:
|
.MaleNames:
|
||||||
db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags
|
db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags
|
||||||
|
@ -22,7 +22,7 @@ KrisNameMenuHeader:
|
||||||
menu_coords 0, 0, 10, TEXTBOX_Y - 1
|
menu_coords 0, 0, 10, TEXTBOX_Y - 1
|
||||||
dw .FemaleNames
|
dw .FemaleNames
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
db 0 ; ????
|
db 0 ; ???
|
||||||
|
|
||||||
.FemaleNames:
|
.FemaleNames:
|
||||||
db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags
|
db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags
|
||||||
|
|
|
@ -53,7 +53,7 @@ RockMonEncounter:
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
db $05 ; ????
|
db 5 ; unused
|
||||||
|
|
||||||
GetTreeMonSet:
|
GetTreeMonSet:
|
||||||
; Return carry and treemon set in a
|
; Return carry and treemon set in a
|
||||||
|
|
|
@ -647,7 +647,7 @@ endr
|
||||||
|
|
||||||
; Loop through all the patchable link data
|
; Loop through all the patchable link data
|
||||||
ld hl, wLinkData + SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + (1 + PARTY_LENGTH + 1) - 1
|
ld hl, wLinkData + SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + (1 + PARTY_LENGTH + 1) - 1
|
||||||
ld de, wPlayerPatchLists + SERIAL_RNS_LENGTH ; ???
|
ld de, wPlayerPatchLists + SERIAL_RNS_LENGTH
|
||||||
lb bc, 0, 0
|
lb bc, 0, 0
|
||||||
.patch_loop
|
.patch_loop
|
||||||
; Check if we've gone over the entire area
|
; Check if we've gone over the entire area
|
||||||
|
|
|
@ -477,8 +477,8 @@ CheckTimeEvents:
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.unused ; unreferenced
|
.hatch ; unreferenced
|
||||||
ld a, $8 ; ???
|
ld a, PLAYEREVENT_HATCH
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
|
@ -1957,7 +1957,7 @@ ApplyMovementToFollower:
|
||||||
ret z
|
ret z
|
||||||
cp movement_step_end
|
cp movement_step_end
|
||||||
ret z
|
ret z
|
||||||
cp movement_step_4b
|
cp movement_step_stop
|
||||||
ret z
|
ret z
|
||||||
cp movement_step_bump
|
cp movement_step_bump
|
||||||
ret z
|
ret z
|
||||||
|
|
|
@ -73,10 +73,10 @@ MovementPointers:
|
||||||
dw Movement_step_sleep_8 ; 45
|
dw Movement_step_sleep_8 ; 45
|
||||||
dw Movement_step_sleep ; 46
|
dw Movement_step_sleep ; 46
|
||||||
dw Movement_step_end ; 47
|
dw Movement_step_end ; 47
|
||||||
dw Movement_48 ; 48
|
dw Movement_step_wait_end ; 48
|
||||||
dw Movement_remove_object ; 49
|
dw Movement_remove_object ; 49
|
||||||
dw Movement_step_loop ; 4a
|
dw Movement_step_loop ; 4a
|
||||||
dw Movement_4b ; 4b
|
dw Movement_stop ; 4b
|
||||||
dw Movement_teleport_from ; 4c
|
dw Movement_teleport_from ; 4c
|
||||||
dw Movement_teleport_to ; 4d
|
dw Movement_teleport_to ; 4d
|
||||||
dw Movement_skyfall ; 4e
|
dw Movement_skyfall ; 4e
|
||||||
|
@ -213,7 +213,7 @@ Movement_step_end:
|
||||||
ld [hl], STEP_TYPE_FROM_MOVEMENT
|
ld [hl], STEP_TYPE_FROM_MOVEMENT
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Movement_48:
|
Movement_step_wait_end:
|
||||||
call RestoreDefaultMovement
|
call RestoreDefaultMovement
|
||||||
ld hl, OBJECT_MOVEMENT_TYPE
|
ld hl, OBJECT_MOVEMENT_TYPE
|
||||||
add hl, bc
|
add hl, bc
|
||||||
|
@ -249,7 +249,7 @@ Movement_remove_object:
|
||||||
res SCRIPTED_MOVEMENT_STATE_F, [hl]
|
res SCRIPTED_MOVEMENT_STATE_F, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Movement_4b:
|
Movement_stop:
|
||||||
ld hl, OBJECT_ACTION
|
ld hl, OBJECT_ACTION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], OBJECT_ACTION_STAND
|
ld [hl], OBJECT_ACTION_STAND
|
||||||
|
|
|
@ -837,8 +837,11 @@ Hatch_InitShellFragments:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MACRO shell_fragment
|
MACRO shell_fragment
|
||||||
; y tile, y pxl, x tile, x pxl, frameset offset, ???
|
; y tile, y pxl, x tile, x pxl, frameset, angle
|
||||||
db (\1 * TILE_WIDTH) % $100 + \2, (\3 * TILE_WIDTH) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6
|
db (\1) * TILE_WIDTH + (\2) ; y coord
|
||||||
|
db (\3) * TILE_WIDTH + (\4) ; x coord
|
||||||
|
db (\5) - SPRITE_ANIM_FRAMESET_EGG_HATCH_1 ; frameset offset
|
||||||
|
db \6 ; angle (6 bits)
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
.SpriteData:
|
.SpriteData:
|
||||||
|
|
|
@ -62,12 +62,13 @@ StatsScreenInit_gotaddress:
|
||||||
StatsScreenMain:
|
StatsScreenMain:
|
||||||
xor a
|
xor a
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
; ???
|
|
||||||
ld [wStatsScreenFlags], a
|
ld [wStatsScreenFlags], a
|
||||||
|
|
||||||
ld a, [wStatsScreenFlags]
|
ld a, [wStatsScreenFlags]
|
||||||
and ~STAT_PAGE_MASK
|
and ~STAT_PAGE_MASK
|
||||||
or PINK_PAGE ; first_page
|
or PINK_PAGE ; first_page
|
||||||
ld [wStatsScreenFlags], a
|
ld [wStatsScreenFlags], a
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
and ~(1 << 7)
|
and ~(1 << 7)
|
||||||
|
@ -82,12 +83,13 @@ StatsScreenMain:
|
||||||
StatsScreenMobile:
|
StatsScreenMobile:
|
||||||
xor a
|
xor a
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
; ???
|
|
||||||
ld [wStatsScreenFlags], a
|
ld [wStatsScreenFlags], a
|
||||||
|
|
||||||
ld a, [wStatsScreenFlags]
|
ld a, [wStatsScreenFlags]
|
||||||
and ~STAT_PAGE_MASK
|
and ~STAT_PAGE_MASK
|
||||||
or PINK_PAGE ; first_page
|
or PINK_PAGE ; first_page
|
||||||
ld [wStatsScreenFlags], a
|
ld [wStatsScreenFlags], a
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
farcall Mobile_SetOverworldDelay
|
farcall Mobile_SetOverworldDelay
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
|
|
|
@ -124,10 +124,10 @@ MACRO step_end
|
||||||
db movement_step_end
|
db movement_step_end
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const movement_step_48 ; $48
|
const movement_step_wait_end ; $48
|
||||||
MACRO step_48
|
MACRO step_wait_end
|
||||||
db movement_step_48
|
db movement_step_wait_end
|
||||||
db \1 ; ???
|
db \1 ; length
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const movement_remove_object ; $49
|
const movement_remove_object ; $49
|
||||||
|
@ -140,9 +140,9 @@ MACRO step_loop
|
||||||
db movement_step_loop
|
db movement_step_loop
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const movement_step_4b ; $4b
|
const movement_step_stop ; $4b
|
||||||
MACRO step_4b
|
MACRO step_stop
|
||||||
db movement_step_4b
|
db movement_step_stop
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const movement_teleport_from ; $4c
|
const movement_teleport_from ; $4c
|
||||||
|
|
|
@ -239,7 +239,7 @@ Function10016f:
|
||||||
jr z, .asm_1001af
|
jr z, .asm_1001af
|
||||||
cp $f8
|
cp $f8
|
||||||
ret z
|
ret z
|
||||||
ret ; ????????????????????????????
|
ret ; ???
|
||||||
|
|
||||||
.asm_1001af
|
.asm_1001af
|
||||||
ld a, $d7
|
ld a, $d7
|
||||||
|
@ -2445,9 +2445,8 @@ Unknown_10102c:
|
||||||
Function101050:
|
Function101050:
|
||||||
call Function10107d
|
call Function10107d
|
||||||
ld a, [wOTPartyCount]
|
ld a, [wOTPartyCount]
|
||||||
rept 2 ; ???
|
|
||||||
ld hl, wc608
|
ld hl, wc608
|
||||||
endr
|
ld hl, wc608 ; redundant
|
||||||
ld bc, wc7bb - wc608
|
ld bc, wc7bb - wc608
|
||||||
call Function1010de
|
call Function1010de
|
||||||
ld hl, wc7bb
|
ld hl, wc7bb
|
||||||
|
|
Loading…
Reference in New Issue