diff options
33 files changed, 2413 insertions, 1508 deletions
diff --git a/INSTALL.md b/INSTALL.md index 67ad45e28..a3e551dda 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,8 +10,6 @@ git clone --recursive git://github.com/kanzure/pokecrystal.git cd pokecrystal -- Copy a Pokémon Crystal rom into `pokecrystal/`. Name it **baserom.gbc**. Eventually this will not be required. - To build **pokecrystal.gbc**: make @@ -35,8 +33,6 @@ In the shell, run: git clone --recursive git://github.com/kanzure/pokecrystal.git cd pokecrystal -- Copy a Pokémon Crystal rom into `pokecrystal/`. Name it **baserom.gbc**. Eventually this will not be required. - To build **pokecrystal.gbc**: make @@ -56,8 +52,6 @@ In the **Cygwin terminal**: git clone --recursive git://github.com/kanzure/pokecrystal.git cd pokecrystal -- Copy a Pokémon Crystal rom into `C:\cygwin\home\<username>\pokecrystal`. Name it **baserom.gbc**. Eventually this will not be required. - To build: make @@ -91,7 +85,3 @@ ssh"): cd /vagrant/pokecrystal make - -To make the build work you will need to copy baserom.gbc into the "pokecrystal" -directory inside the "virtualbox" directory on the host machine. Eventually -this will not be required. @@ -1,7 +1,8 @@ PYTHON := python +MD5 := md5sum -c --quiet .SUFFIXES: -.SUFFIXES: .asm .tx .o .gbc .png .2bpp .1bpp .lz .pal .bin .blk .tilemap +.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .lz .pal .bin .blk .tilemap .PHONY: all clean crystal pngs .SECONDEXPANSION: @@ -54,29 +55,22 @@ all: $(roms) crystal: pokecrystal.gbc clean: - rm -f $(roms) $(all_obj) - find . -iname '*.tx' -exec rm {} + - -baserom.gbc: ; - @echo "Wait! Need baserom.gbc first. Check README and INSTALL for details." && false + rm -f $(roms) $(all_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) +compare: pokecrystal.gbc pokecrystal11.gbc + @$(MD5) roms.md5 %.asm: ; $(all_obj): $$*.asm $$($$*_dep) - @$(gfx) 2bpp $(2bppq); $(eval 2bppq :=) - @$(gfx) 1bpp $(1bppq); $(eval 1bppq :=) - @$(gfx) lz $(lzq); $(eval lzq :=) rgbasm -o $@ $< pokecrystal11.gbc: $(crystal11_obj) rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@ - cmp crystal11.gbc $@ pokecrystal.gbc: $(crystal_obj) rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ - cmp baserom.gbc $@ pngs: @@ -85,9 +79,9 @@ pngs: find . -iname "*.lz" -exec touch {} + find . -iname "*.[12]bpp" -exec touch {} + -%.2bpp: %.png ; $(eval 2bppq += $<) @rm -f $@ -%.1bpp: %.png ; $(eval 1bppq += $<) @rm -f $@ -%.lz: % ; $(eval lzq += $<) @rm -f $@ +%.2bpp: %.png ; @$(gfx) 2bpp $< +%.1bpp: %.png ; @$(gfx) 1bpp $< +%.lz: % ; @$(gfx) lz $< %.pal: ; @@ -2,9 +2,10 @@ This is a disassembly of Pokémon Crystal. -The following rom is used as a base: +It builds the following roms: * Pokemon - Crystal Version (UE) (V1.0) [C][!].gbc `md5: 9f2922b235a5eeb78d65594e82ef5dde` +* Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc `md5: 301899b8087289a6436b0a241fbbb474` To set up the repository, see [**INSTALL.md**](INSTALL.md). diff --git a/audio/music/magnettrain.asm b/audio/music/magnettrain.asm index cb5647540..232c0ca4a 100644 --- a/audio/music/magnettrain.asm +++ b/audio/music/magnettrain.asm @@ -251,7 +251,22 @@ Music_MagnetTrain_Ch4: ; ef6f4 ; ef711 -INCBIN "baserom.gbc", $ef711, $ef71e - $ef711 +; unused +Music_MagnetTrain_branch_ef711: ; ef711 + note G#, 1 + note G_, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note G_, 1 + endchannel +; ef71e Music_MagnetTrain_branch_ef71e: ; ef71e diff --git a/audio/music/unioncave.asm b/audio/music/unioncave.asm index f08926b12..c412cdc3c 100644 --- a/audio/music/unioncave.asm +++ b/audio/music/unioncave.asm @@ -262,10 +262,7 @@ Music_UnionCave_branch_f5da9: ; f5da9 note G#, 4 note __, 8 loopchannel 0, Music_UnionCave_branch_f5da9 -; f5dc1 - - -INCBIN "baserom.gbc", $f5dc1, $f5dc5 - $f5dc1 - + loopchannel 0, Music_UnionCave_branch_f5da9 ; unused +; f5dc5 diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index f23ea0900..96331f9eb 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -90,8 +90,8 @@ DoMove: ; 3402c ld [BattleScriptBufferLoc + 1], a pop af -; $fe is used to terminate branches without ending the read cycle. - cp $fe +; endturn_command (-2) is used to terminate branches without ending the read cycle. + cp endturn_command ret nc ; The rest of the commands (01-af) are read from BattleCommandPointers. @@ -3918,7 +3918,7 @@ BattleCommanda1: ; 35461 Function355b0: ; 355b0 - ld b, $12 ; buildopponentrage + ld b, buildopponentrage_command jp SkipToBattleCommand ; 355b5 @@ -6977,7 +6977,7 @@ BattleCommand21: ; 36671 ld a, BIDE ld [hl], a - ld b, $22 ; unleashenergy + ld b, unleashenergy_command jp SkipToBattleCommand .asm_366dc @@ -7051,7 +7051,7 @@ BattleCommand3e: ; 3671a inc de ld [de], a .asm_3674c - ld b, $3d ; rampage + ld b, rampage_command jp SkipToBattleCommand ; 36751 @@ -7707,7 +7707,7 @@ BattleCommand3a: ; 36b3a res SUBSTATUS_CHARGED, [hl] res SUBSTATUS_UNDERGROUND, [hl] res SUBSTATUS_FLYING, [hl] - ld b, $39 ; charge + ld b, charge_command jp SkipToBattleCommand ; 36b4d @@ -7787,7 +7787,7 @@ BattleCommand39: ; 36b4d ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar cp EFFECT_SKULL_BASH - ld b, $fe ; endturn + ld b, endturn_command jp z, SkipToBattleCommand jp EndMoveEffect @@ -10294,7 +10294,7 @@ BattleCommand9e: ; 37d02 ld a, [Weather] cp WEATHER_SUN ret nz - ld b, $39 ; charge + ld b, charge_command jp SkipToBattleCommand ; 37d0d @@ -10323,7 +10323,7 @@ BattleCommand9b: ; 37d0d ld [CurDamage], a ld a, [de] ld [CurDamage + 1], a - ld b, $9c ; futuresight + ld b, futuresight_command jp SkipToBattleCommand ; 37d34 diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index af5700f19..0ef6bb325 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -1,5 +1,6 @@ MAX_LEVEL EQU 100 MIN_LEVEL EQU 2 +EGG_LEVEL EQU 5 NUM_MOVES EQU 4 REST_TURNS EQU 2 diff --git a/constants/item_constants.asm b/constants/item_constants.asm index fea4632e3..67e20dad6 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -1,254 +1,255 @@ -NO_ITEM EQU $00 -MASTER_BALL EQU $01 -ULTRA_BALL EQU $02 -BRIGHTPOWDER EQU $03 -GREAT_BALL EQU $04 -POKE_BALL EQU $05 -TOWN_MAP EQU $06 -BICYCLE EQU $07 -MOON_STONE EQU $08 -ANTIDOTE EQU $09 -BURN_HEAL EQU $0A -ICE_HEAL EQU $0B -AWAKENING EQU $0C -PARLYZ_HEAL EQU $0D -FULL_RESTORE EQU $0E -MAX_POTION EQU $0F -HYPER_POTION EQU $10 -SUPER_POTION EQU $11 -POTION EQU $12 -ESCAPE_ROPE EQU $13 -REPEL EQU $14 -MAX_ELIXER EQU $15 -FIRE_STONE EQU $16 -THUNDERSTONE EQU $17 -WATER_STONE EQU $18 -ITEM_19 EQU $19 -HP_UP EQU $1A -PROTEIN EQU $1B -IRON EQU $1C -CARBOS EQU $1D -LUCKY_PUNCH EQU $1E -CALCIUM EQU $1F -RARE_CANDY EQU $20 -X_ACCURACY EQU $21 -LEAF_STONE EQU $22 -METAL_POWDER EQU $23 -NUGGET EQU $24 -POKE_DOLL EQU $25 -FULL_HEAL EQU $26 -REVIVE EQU $27 -MAX_REVIVE EQU $28 -GUARD_SPEC EQU $29 -SUPER_REPEL EQU $2A -MAX_REPEL EQU $2B -DIRE_HIT EQU $2C -ITEM_2D EQU $2D -FRESH_WATER EQU $2E -SODA_POP EQU $2F -LEMONADE EQU $30 -X_ATTACK EQU $31 -ITEM_32 EQU $32 -X_DEFEND EQU $33 -X_SPEED EQU $34 -X_SPECIAL EQU $35 -COIN_CASE EQU $36 -ITEMFINDER EQU $37 -POKE_FLUTE EQU $38 -EXP_SHARE EQU $39 -OLD_ROD EQU $3A -GOOD_ROD EQU $3B -SILVER_LEAF EQU $3C -SUPER_ROD EQU $3D -PP_UP EQU $3E -ETHER EQU $3F -MAX_ETHER EQU $40 -ELIXER EQU $41 -RED_SCALE EQU $42 -SECRETPOTION EQU $43 -S_S_TICKET EQU $44 -MYSTERY_EGG EQU $45 -CLEAR_BELL EQU $46 -SILVER_WING EQU $47 -MOOMOO_MILK EQU $48 -QUICK_CLAW EQU $49 -PSNCUREBERRY EQU $4A -GOLD_LEAF EQU $4B -SOFT_SAND EQU $4C -SHARP_BEAK EQU $4D -PRZCUREBERRY EQU $4E -BURNT_BERRY EQU $4F -ICE_BERRY EQU $50 -POISON_BARB EQU $51 -KINGS_ROCK EQU $52 -BITTER_BERRY EQU $53 -MINT_BERRY EQU $54 -RED_APRICORN EQU $55 -TINYMUSHROOM EQU $56 -BIG_MUSHROOM EQU $57 -SILVERPOWDER EQU $58 -BLU_APRICORN EQU $59 -ITEM_5A EQU $5A -AMULET_COIN EQU $5B -YLW_APRICORN EQU $5C -GRN_APRICORN EQU $5D -CLEANSE_TAG EQU $5E -MYSTIC_WATER EQU $5F -TWISTEDSPOON EQU $60 -WHT_APRICORN EQU $61 -BLACKBELT EQU $62 -BLK_APRICORN EQU $63 -ITEM_64 EQU $64 -PNK_APRICORN EQU $65 -BLACKGLASSES EQU $66 -SLOWPOKETAIL EQU $67 -PINK_BOW EQU $68 -STICK EQU $69 -SMOKE_BALL EQU $6A -NEVERMELTICE EQU $6B -MAGNET EQU $6C -MIRACLEBERRY EQU $6D -PEARL EQU $6E -BIG_PEARL EQU $6F -EVERSTONE EQU $70 -SPELL_TAG EQU $71 -RAGECANDYBAR EQU $72 -GS_BALL EQU $73 -BLUE_CARD EQU $74 -MIRACLE_SEED EQU $75 -THICK_CLUB EQU $76 -FOCUS_BAND EQU $77 -ITEM_78 EQU $78 -ENERGYPOWDER EQU $79 -ENERGY_ROOT EQU $7A -HEAL_POWDER EQU $7B -REVIVAL_HERB EQU $7C -HARD_STONE EQU $7D -LUCKY_EGG EQU $7E -CARD_KEY EQU $7F -MACHINE_PART EQU $80 -EGG_TICKET EQU $81 -LOST_ITEM EQU $82 -STARDUST EQU $83 -STAR_PIECE EQU $84 -BASEMENT_KEY EQU $85 -PASS EQU $86 -ITEM_87 EQU $87 -ITEM_88 EQU $88 -ITEM_89 EQU $89 -CHARCOAL EQU $8A -BERRY_JUICE EQU $8B -SCOPE_LENS EQU $8C -ITEM_8D EQU $8D -ITEM_8E EQU $8E -METAL_COAT EQU $8F -DRAGON_FANG EQU $90 -ITEM_91 EQU $91 -LEFTOVERS EQU $92 -ITEM_93 EQU $93 -ITEM_94 EQU $94 -ITEM_95 EQU $95 -MYSTERYBERRY EQU $96 -DRAGON_SCALE EQU $97 -BERSERK_GENE EQU $98 -ITEM_99 EQU $99 -ITEM_9A EQU $9A -ITEM_9B EQU $9B -SACRED_ASH EQU $9C -HEAVY_BALL EQU $9D -FLOWER_MAIL EQU $9E -LEVEL_BALL EQU $9F -LURE_BALL EQU $A0 -FAST_BALL EQU $A1 -ITEM_A2 EQU $A2 -LIGHT_BALL EQU $A3 -FRIEND_BALL EQU $A4 -MOON_BALL EQU $A5 -LOVE_BALL EQU $A6 -NORMAL_BOX EQU $A7 -GORGEOUS_BOX EQU $A8 -SUN_STONE EQU $A9 -POLKADOT_BOW EQU $AA -ITEM_AB EQU $AB -UP_GRADE EQU $AC -BERRY EQU $AD -GOLD_BERRY EQU $AE -SQUIRTBOTTLE EQU $AF -ITEM_B0 EQU $B0 -PARK_BALL EQU $B1 -RAINBOW_WING EQU $B2 -ITEM_B3 EQU $B3 -BRICK_PIECE EQU $B4 -SURF_MAIL EQU $B5 -LITEBLUEMAIL EQU $B6 -PORTRAITMAIL EQU $B7 -LOVELY_MAIL EQU $B8 -EON_MAIL EQU $B9 -MORPH_MAIL EQU $BA -BLUESKY_MAIL EQU $BB -MUSIC_MAIL EQU $BC -MIRAGE_MAIL EQU $BD -ITEM_BE EQU $BE -TM_01 EQU $BF -TM_02 EQU $C0 -TM_03 EQU $C1 -TM_04 EQU $C2 -ITEM_C3 EQU $C3 -TM_05 EQU $C4 -TM_06 EQU $C5 -TM_07 EQU $C6 -TM_08 EQU $C7 -TM_09 EQU $C8 -TM_10 EQU $C9 -TM_11 EQU $CA -TM_12 EQU $CB -TM_13 EQU $CC -TM_14 EQU $CD -TM_15 EQU $CE -TM_16 EQU $CF -TM_17 EQU $D0 -TM_18 EQU $D1 -TM_19 EQU $D2 -TM_20 EQU $D3 -TM_21 EQU $D4 -TM_22 EQU $D5 -TM_23 EQU $D6 -TM_24 EQU $D7 -TM_25 EQU $D8 -TM_26 EQU $D9 -TM_27 EQU $DA -TM_28 EQU $DB -ITEM_DC EQU $DC -TM_29 EQU $DD -TM_30 EQU $DE -TM_31 EQU $DF -TM_32 EQU $E0 -TM_33 EQU $E1 -TM_34 EQU $E2 -TM_35 EQU $E3 -TM_36 EQU $E4 -TM_37 EQU $E5 -TM_38 EQU $E6 -TM_39 EQU $E7 -TM_40 EQU $E8 -TM_41 EQU $E9 -TM_42 EQU $EA -TM_43 EQU $EB -TM_44 EQU $EC -TM_45 EQU $ED -TM_46 EQU $EE -TM_47 EQU $EF -TM_48 EQU $F0 -TM_49 EQU $F1 -TM_50 EQU $F2 -HM_01 EQU $F3 -HM_02 EQU $F4 -HM_03 EQU $F5 -HM_04 EQU $F6 -HM_05 EQU $F7 -HM_06 EQU $F8 -HM_07 EQU $F9 -HM_08 EQU $FA + const_def + const NO_ITEM ; $00 + const MASTER_BALL ; $01 + const ULTRA_BALL ; $02 + const BRIGHTPOWDER ; $03 + const GREAT_BALL ; $04 + const POKE_BALL ; $05 + const TOWN_MAP ; $06 + const BICYCLE ; $07 + const MOON_STONE ; $08 + const ANTIDOTE ; $09 + const BURN_HEAL ; $0A + const ICE_HEAL ; $0B + const AWAKENING ; $0C + const PARLYZ_HEAL ; $0D + const FULL_RESTORE ; $0E + const MAX_POTION ; $0F + const HYPER_POTION ; $10 + const SUPER_POTION ; $11 + const POTION ; $12 + const ESCAPE_ROPE ; $13 + const REPEL ; $14 + const MAX_ELIXER ; $15 + const FIRE_STONE ; $16 + const THUNDERSTONE ; $17 + const WATER_STONE ; $18 + const ITEM_19 ; $19 + const HP_UP ; $1A + const PROTEIN ; $1B + const IRON ; $1C + const CARBOS ; $1D + const LUCKY_PUNCH ; $1E + const CALCIUM ; $1F + const RARE_CANDY ; $20 + const X_ACCURACY ; $21 + const LEAF_STONE ; $22 + const METAL_POWDER ; $23 + const NUGGET ; $24 + const POKE_DOLL ; $25 + const FULL_HEAL ; $26 + const REVIVE ; $27 + const MAX_REVIVE ; $28 + const GUARD_SPEC ; $29 + const SUPER_REPEL ; $2A + const MAX_REPEL ; $2B + const DIRE_HIT ; $2C + const ITEM_2D ; $2D + const FRESH_WATER ; $2E + const SODA_POP ; $2F + const LEMONADE ; $30 + const X_ATTACK ; $31 + const ITEM_32 ; $32 + const X_DEFEND ; $33 + const X_SPEED ; $34 + const X_SPECIAL ; $35 + const COIN_CASE ; $36 + const ITEMFINDER ; $37 + const POKE_FLUTE ; $38 + const EXP_SHARE ; $39 + const OLD_ROD ; $3A + const GOOD_ROD ; $3B + const SILVER_LEAF ; $3C + const SUPER_ROD ; $3D + const PP_UP ; $3E + const ETHER ; $3F + const MAX_ETHER ; $40 + const ELIXER ; $41 + const RED_SCALE ; $42 + const SECRETPOTION ; $43 + const S_S_TICKET ; $44 + const MYSTERY_EGG ; $45 + const CLEAR_BELL ; $46 + const SILVER_WING ; $47 + const MOOMOO_MILK ; $48 + const QUICK_CLAW ; $49 + const PSNCUREBERRY ; $4A + const GOLD_LEAF ; $4B + const SOFT_SAND ; $4C + const SHARP_BEAK ; $4D + const PRZCUREBERRY ; $4E + const BURNT_BERRY ; $4F + const ICE_BERRY ; $50 + const POISON_BARB ; $51 + const KINGS_ROCK ; $52 + const BITTER_BERRY ; $53 + const MINT_BERRY ; $54 + const RED_APRICORN ; $55 + const TINYMUSHROOM ; $56 + const BIG_MUSHROOM ; $57 + const SILVERPOWDER ; $58 + const BLU_APRICORN ; $59 + const ITEM_5A ; $5A + const AMULET_COIN ; $5B + const YLW_APRICORN ; $5C + const GRN_APRICORN ; $5D + const CLEANSE_TAG ; $5E + const MYSTIC_WATER ; $5F + const TWISTEDSPOON ; $60 + const WHT_APRICORN ; $61 + const BLACKBELT ; $62 + const BLK_APRICORN ; $63 + const ITEM_64 ; $64 + const PNK_APRICORN ; $65 + const BLACKGLASSES ; $66 + const SLOWPOKETAIL ; $67 + const PINK_BOW ; $68 + const STICK ; $69 + const SMOKE_BALL ; $6A + const NEVERMELTICE ; $6B + const MAGNET ; $6C + const MIRACLEBERRY ; $6D + const PEARL ; $6E + const BIG_PEARL ; $6F + const EVERSTONE ; $70 + const SPELL_TAG ; $71 + const RAGECANDYBAR ; $72 + const GS_BALL ; $73 + const BLUE_CARD ; $74 + const MIRACLE_SEED ; $75 + const THICK_CLUB ; $76 + const FOCUS_BAND ; $77 + const ITEM_78 ; $78 + const ENERGYPOWDER ; $79 + const ENERGY_ROOT ; $7A + const HEAL_POWDER ; $7B + const REVIVAL_HERB ; $7C + const HARD_STONE ; $7D + const LUCKY_EGG ; $7E + const CARD_KEY ; $7F + const MACHINE_PART ; $80 + const EGG_TICKET ; $81 + const LOST_ITEM ; $82 + const STARDUST ; $83 + const STAR_PIECE ; $84 + const BASEMENT_KEY ; $85 + const PASS ; $86 + const ITEM_87 ; $87 + const ITEM_88 ; $88 + const ITEM_89 ; $89 + const CHARCOAL ; $8A + const BERRY_JUICE ; $8B + const SCOPE_LENS ; $8C + const ITEM_8D ; $8D + const ITEM_8E ; $8E + const METAL_COAT ; $8F + const DRAGON_FANG ; $90 + const ITEM_91 ; $91 + const LEFTOVERS ; $92 + const ITEM_93 ; $93 + const ITEM_94 ; $94 + const ITEM_95 ; $95 + const MYSTERYBERRY ; $96 + const DRAGON_SCALE ; $97 + const BERSERK_GENE ; $98 + const ITEM_99 ; $99 + const ITEM_9A ; $9A + const ITEM_9B ; $9B + const SACRED_ASH ; $9C + const HEAVY_BALL ; $9D + const FLOWER_MAIL ; $9E + const LEVEL_BALL ; $9F + const LURE_BALL ; $A0 + const FAST_BALL ; $A1 + const ITEM_A2 ; $A2 + const LIGHT_BALL ; $A3 + const FRIEND_BALL ; $A4 + const MOON_BALL ; $A5 + const LOVE_BALL ; $A6 + const NORMAL_BOX ; $A7 + const GORGEOUS_BOX ; $A8 + const SUN_STONE ; $A9 + const POLKADOT_BOW ; $AA + const ITEM_AB ; $AB + const UP_GRADE ; $AC + const BERRY ; $AD + const GOLD_BERRY ; $AE + const SQUIRTBOTTLE ; $AF + const ITEM_B0 ; $B0 + const PARK_BALL ; $B1 + const RAINBOW_WING ; $B2 + const ITEM_B3 ; $B3 + const BRICK_PIECE ; $B4 + const SURF_MAIL ; $B5 + const LITEBLUEMAIL ; $B6 + const PORTRAITMAIL ; $B7 + const LOVELY_MAIL ; $B8 + const EON_MAIL ; $B9 + const MORPH_MAIL ; $BA + const BLUESKY_MAIL ; $BB + const MUSIC_MAIL ; $BC + const MIRAGE_MAIL ; $BD + const ITEM_BE ; $BE + const TM_01 ; $BF + const TM_02 ; $C0 + const TM_03 ; $C1 + const TM_04 ; $C2 + const ITEM_C3 ; $C3 + const TM_05 ; $C4 + const TM_06 ; $C5 + const TM_07 ; $C6 + const TM_08 ; $C7 + const TM_09 ; $C8 + const TM_10 ; $C9 + const TM_11 ; $CA + const TM_12 ; $CB + const TM_13 ; $CC + const TM_14 ; $CD + const TM_15 ; $CE + const TM_16 ; $CF + const TM_17 ; $D0 + const TM_18 ; $D1 + const TM_19 ; $D2 + const TM_20 ; $D3 + const TM_21 ; $D4 + const TM_22 ; $D5 + const TM_23 ; $D6 + const TM_24 ; $D7 + const TM_25 ; $D8 + const TM_26 ; $D9 + const TM_27 ; $DA + const TM_28 ; $DB + const ITEM_DC ; $DC + const TM_29 ; $DD + const TM_30 ; $DE + const TM_31 ; $DF + const TM_32 ; $E0 + const TM_33 ; $E1 + const TM_34 ; $E2 + const TM_35 ; $E3 + const TM_36 ; $E4 + const TM_37 ; $E5 + const TM_38 ; $E6 + const TM_39 ; $E7 + const TM_40 ; $E8 + const TM_41 ; $E9 + const TM_42 ; $EA + const TM_43 ; $EB + const TM_44 ; $EC + const TM_45 ; $ED + const TM_46 ; $EE + const TM_47 ; $EF + const TM_48 ; $F0 + const TM_49 ; $F1 + const TM_50 ; $F2 + const HM_01 ; $F3 + const HM_02 ; $F4 + const HM_03 ; $F5 + const HM_04 ; $F6 + const HM_05 ; $F7 + const HM_06 ; $F8 + const HM_07 ; $F9 + const HM_08 ; $FA NUM_TMS EQU 50 @@ -271,61 +272,79 @@ TM_HM EQU 4 CANT_SELECT EQU 1 << 6 CANT_TOSS EQU 1 << 7 + ; held item effects -HELD_BERRY EQU $01 -HELD_LEFTOVERS EQU $03 -HELD_RESTORE_PP EQU $06 -HELD_CLEANSE_TAG EQU $08 + const_def -HELD_HEAL_POISON EQU $0a -HELD_HEAL_FREEZE EQU $0b -HELD_HEAL_BURN EQU $0c -HELD_HEAL_SLEEP EQU $0d -HELD_HEAL_PARALYZE EQU $0e -HELD_HEAL_STATUS EQU $0f -HELD_HEAL_CONFUSION EQU $10 + const HELD_NONE + const HELD_BERRY + const HELD_2 + const HELD_LEFTOVERS + const HELD_4 + const HELD_5 + const HELD_RESTORE_PP + const HELD_7 + const HELD_CLEANSE_TAG -HELD_PREVENT_POISON EQU $14 -HELD_PREVENT_BURN EQU $15 -HELD_PREVENT_FREEZE EQU $16 -HELD_PREVENT_SLEEP EQU $17 -HELD_PREVENT_PARALYZE EQU $18 -HELD_PREVENT_CONFUSE EQU $19 +const_value = 10 + const HELD_HEAL_POISON + const HELD_HEAL_FREEZE + const HELD_HEAL_BURN + const HELD_HEAL_SLEEP + const HELD_HEAL_PARALYZE + const HELD_HEAL_STATUS + const HELD_HEAL_CONFUSION -HELD_ATTACK_UP EQU $1f -HELD_DEFENSE_UP EQU $20 -HELD_SPEED_UP EQU $21 -HELD_SP_ATTACK_UP EQU $22 -HELD_SP_DEFENSE_UP EQU $23 -HELD_ACCURACY_UP EQU $24 -HELD_EVASION_UP EQU $25 +const_value = 20 + const HELD_PREVENT_POISON + const HELD_PREVENT_BURN + const HELD_PREVENT_FREEZE + const HELD_PREVENT_SLEEP + const HELD_PREVENT_PARALYZE + const HELD_PREVENT_CONFUSE -HELD_METAL_POWDER EQU $2a +const_value = 30 + const HELD_30 + const HELD_ATTACK_UP + const HELD_DEFENSE_UP + const HELD_SPEED_UP + const HELD_SP_ATTACK_UP + const HELD_SP_DEFENSE_UP + const HELD_ACCURACY_UP + const HELD_EVASION_UP -HELD_NORMAL_BOOST EQU $32 -HELD_FIGHTING_BOOST EQU $33 -HELD_FLYING_BOOST EQU $34 -HELD_POISON_BOOST EQU $35 -HELD_GROUND_BOOST EQU $36 -HELD_ROCK_BOOST EQU $37 -HELD_BUG_BOOST EQU $38 -HELD_GHOST_BOOST EQU $39 -HELD_FIRE_BOOST EQU $3a -HELD_WATER_BOOST EQU $3b -HELD_GRASS_BOOST EQU $3c -HELD_ELECTRIC_BOOST EQU $3d -HELD_PSYCHIC_BOOST EQU $3e -HELD_ICE_BOOST EQU $3f -HELD_DRAGON_BOOST EQU $40 -HELD_DARK_BOOST EQU $41 -HELD_STEEL_BOOST EQU $42 +const_value = 40 + const HELD_40 + const HELD_41 + const HELD_METAL_POWDER -HELD_CATCH_CHANCE EQU $46 +const_value = 50 + const HELD_NORMAL_BOOST + const HELD_FIGHTING_BOOST + const HELD_FLYING_BOOST + const HELD_POISON_BOOST + const HELD_GROUND_BOOST + const HELD_ROCK_BOOST + const HELD_BUG_BOOST + const HELD_GHOST_BOOST + const HELD_FIRE_BOOST + const HELD_WATER_BOOST + const HELD_GRASS_BOOST + const HELD_ELECTRIC_BOOST + const HELD_PSYCHIC_BOOST + const HELD_ICE_BOOST + const HELD_DRAGON_BOOST + const HELD_DARK_BOOST + const HELD_STEEL_BOOST -HELD_ESCAPE EQU $48 -HELD_CRITICAL_UP EQU $49 -HELD_QUICK_CLAW EQU $4a -HELD_TRADE_EVOLVE EQU $4b -HELD_AMULET_COIN EQU $4c -HELD_BRIGHTPOWDER EQU $4d -HELD_FOCUS_BAND EQU $4f +const_value = 70 + const HELD_CATCH_CHANCE + const HELD_71 + const HELD_ESCAPE + const HELD_CRITICAL_UP + const HELD_QUICK_CLAW + const HELD_TRADE_EVOLVE + const HELD_AMULET_COIN + const HELD_BRIGHTPOWDER + const HELD_4E + const HELD_FOCUS_BAND diff --git a/engine/engine_flags.asm b/engine/engine_flags.asm index 0d4c27e51..414604661 100644 --- a/engine/engine_flags.asm +++ b/engine/engine_flags.asm @@ -3,11 +3,11 @@ ; location, bit ; pokegear - dwb wd957, %00000010 ; radio card ; $0 - dwb wd957, %00000001 ; map card - dwb wd957, %00000100 ; phone card - dwb wd957, %00001000 ; expn card - dwb wd957, %10000000 ; on/off + dwb wPokegearFlags, %00000010 ; radio card ; $0 + dwb wPokegearFlags, %00000001 ; map card + dwb wPokegearFlags, %00000100 ; phone card + dwb wPokegearFlags, %00001000 ; expn card + dwb wPokegearFlags, %10000000 ; on/off ; wDaycareMan, %10000000 ; daycare 1 on dwb wDaycareMan, %01000000 ; monster 1 and 2 are compatible diff --git a/engine/pokedex.asm b/engine/pokedex.asm index dcbc1832e..8ca68ce30 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -1778,7 +1778,7 @@ Function40f08: ; 40f08 (10:4f08) hlcoord 0, 12 ld bc, $412 call Function40ad5 - ld de, $4f32 + ld de, String_40f32 hlcoord 1, 14 call PlaceString ld a, $1 diff --git a/engine/scripting.asm b/engine/scripting.asm index 3835f458d..6999d624d 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -472,7 +472,7 @@ Script_loadmenudata: ; 0x96efa ld l, a call GetScriptByte ld h, a - ld de, $1d35 + ld de, LoadMenuDataHeader ld a, [ScriptBank] call Function26b7 call Function1ad2 @@ -1465,9 +1465,9 @@ EarthquakeMovementEnd Script_loadpikachudata: ; 0x973f0 ; script command 0x5a - ld a, $19 + ld a, PIKACHU ld [wd22e], a - ld a, $5 + ld a, 5 ld [CurPartyLevel], a ret ; 0x973fb @@ -2214,7 +2214,7 @@ Script_trainerclassname: ; 0x9772b ; id (SingleByteParam) ; memory (SingleByteParam) - ld a, $7 + ld a, TRAINER_NAME ld [wcf61], a jr Unknown_9771c ; 0x97730 $ea ; 0x97732 diff --git a/extras b/extras -Subproject a87f66964cc602ff5575efebf27c388ef03fa94 +Subproject 46492bd9075313a52622cc585fe7b2ca404cbdc diff --git a/gfx/mobile/havewant_map.bin b/gfx/mobile/havewant_map.bin Binary files differnew file mode 100644 index 000000000..3551a77c5 --- /dev/null +++ b/gfx/mobile/havewant_map.bin diff --git a/gfx/pics/animation.asm b/gfx/pics/animation.asm index 775eeb075..8e646da93 100644 --- a/gfx/pics/animation.asm +++ b/gfx/pics/animation.asm @@ -54,26 +54,42 @@ Functiond003a: ; d003a ; d0042 -Unknown_d0042: ; d0042 - dw Unknown_d0054 - dw Unknown_d0058 - dw Unknown_d005c - dw Unknown_d0064 - dw Unknown_d006e - dw Unknown_d0076 - dw Unknown_d0080 - dw Unknown_d0088 - dw Unknown_d008b - -Unknown_d0054: db 11, 5, 7, 0 -Unknown_d0058: db 11, 4, 7, 0 -Unknown_d005c: db 10, 4, 7, 2, 3, 6, 7, 0 -Unknown_d0064: db 6, 8, 6, 7, 2, 3, 9, 4, 7, 0 -Unknown_d006e: db 6, 7, 2, 3,10, 4, 7, 0 -Unknown_d0076: db 6, 7,10, 4, 7, 2, 3, 6, 7, 0 -Unknown_d0080: db 10, 4, 7, 2, 3, 6, 7, 0 -Unknown_d0088: db 4, 7, 0 -Unknown_d008b: db 6, 7, 0 +POKEANIM: MACRO + rept _NARG + +; Workaround for a bug where macro args can't come after the start of a symbol +if !def(\1_POKEANIM) +\1_POKEANIM equs "PokeAnim_\1_" +endc + + db (\1_POKEANIM - PokeAnim_SetupCommands) / 2 + shift + endr + + db (PokeAnim_Finish_ - PokeAnim_SetupCommands) / 2 +ENDM + + +PokeAnims: ; d0042 + dw .Slow + dw .Normal + dw .Menu + dw .Trade + dw .Evolve + dw .Hatch + dw .Unused ; same as .Menu + dw .Egg1 + dw .Egg2 + +.Slow: POKEANIM Cry3, Setup2, Play +.Normal: POKEANIM Cry3, Setup, Play +.Menu: POKEANIM Cry2, Setup, Play, SetWait, Wait, Extra, Play +.Trade: POKEANIM Extra, Play2, Extra, Play, SetWait, Wait, Cry, Setup, Play +.Evolve: POKEANIM Extra, Play, SetWait, Wait, Cry2, Setup, Play +.Hatch: POKEANIM Extra, Play, Cry2, Setup, Play, SetWait, Wait, Extra, Play +.Unused: POKEANIM Cry2, Setup, Play, SetWait, Wait, Extra, Play +.Egg1: POKEANIM Setup, Play +.Egg2: POKEANIM Extra, Play Functiond008e: ; d008e @@ -93,7 +109,7 @@ Functiond00a3: ; d00a3 push hl ld c, e ld b, 0 - ld hl, Unknown_d0042 + ld hl, PokeAnims add hl, bc add hl, bc ld a, [hli] @@ -118,7 +134,7 @@ Functiond00b4: ; d00b4 ld l, a add hl, bc ld a, [hl] - ld hl, Jumptable_d00da + ld hl, PokeAnim_SetupCommands rst JumpTable ld a, [w2_d168] ld c, a @@ -131,29 +147,32 @@ Functiond00b4: ; d00b4 ret ; d00da -Jumptable_d00da: ; d00da - dw Functiond0171 - dw Functiond0166 - dw Functiond00f2 - dw Functiond00fe - dw Functiond010b - dw Functiond011d - dw Functiond012f - dw Functiond0141 - dw Functiond0155 - dw Functiond017a - dw Functiond0188 - dw Functiond0196 +PokeAnim_SetupCommands: ; d00da +setup_command: macro +\1_: dw \1 +endm + setup_command PokeAnim_Finish + setup_command PokeAnim_Nop + setup_command PokeAnim_SetWait + setup_command PokeAnim_Wait + setup_command PokeAnim_Setup + setup_command PokeAnim_Setup2 + setup_command PokeAnim_Extra + setup_command PokeAnim_Play + setup_command PokeAnim_Play2 + setup_command PokeAnim_Cry + setup_command PokeAnim_Cry2 + setup_command PokeAnim_Cry3 ; d00f2 -Functiond00f2: ; d00f2 +PokeAnim_SetWait: ; d00f2 ld a, $12 ld [w2_d181], a ld a, [w2_d168] inc a ld [w2_d168], a -Functiond00fe: ; d00fe +PokeAnim_Wait: ; d00fe ld hl, w2_d181 dec [hl] ret nz @@ -163,7 +182,7 @@ Functiond00fe: ; d00fe ret ; d010b -Functiond010b: ; d010b +PokeAnim_Setup: ; d010b ld c, $0 ld b, $0 call Functiond0228 @@ -174,7 +193,7 @@ Functiond010b: ; d010b ret ; d011d -Functiond011d: ; d011d +PokeAnim_Setup2: ; d011d ld c, $0 ld b, $4 call Functiond0228 @@ -185,7 +204,7 @@ Functiond011d: ; d011d ret ; d012f -Functiond012f: ; d012f +PokeAnim_Extra: ; d012f ld c, $1 ld b, $0 call Functiond0228 @@ -196,7 +215,7 @@ Functiond012f: ; d012f ret ; d0141 -Functiond0141: ; d0141 +PokeAnim_Play: ; d0141 call Functiond0250 ld a, [w2_d17e] bit 7, a @@ -208,7 +227,7 @@ Functiond0141: ; d0141 ret ; d0155 -Functiond0155: ; d0155 +PokeAnim_Play2: ; d0155 call Functiond0250 ld a, [w2_d17e] bit 7, a @@ -219,7 +238,7 @@ Functiond0155: ; d0155 ret ; d0166 -Functiond0166: ; d0166 +PokeAnim_Nop: ; d0166 call Functiond01a9 ld a, [w2_d168] inc a @@ -227,14 +246,14 @@ Functiond0166: ; d0166 ret ; d0171 -Functiond0171: ; d0171 +PokeAnim_Finish: ; d0171 call Functiond01a9 ld hl, w2_d168 set 7, [hl] ret ; d017a -Functiond017a: ; d017a +PokeAnim_Cry: ; d017a ld a, [w2_d16b] call _PlayCry ld a, [w2_d168] @@ -243,7 +262,7 @@ Functiond017a: ; d017a ret ; d0188 -Functiond0188: ; d0188 +PokeAnim_Cry2: ; d0188 ld a, [w2_d16b] call PlayCry2 ld a, [w2_d168] @@ -252,7 +271,7 @@ Functiond0188: ; d0188 ret ; d0196 -Functiond0196: ; d0196 +PokeAnim_Cry3: ; d0196 ld a, $f ld [CryTracks], a ld a, [w2_d16b] @@ -346,7 +365,7 @@ Functiond0228: ; d0228 call ByteFill pop bc ld a, b - ld [w2_d172 + 1], a + ld [w2_d173], a ld a, c ld [w2_d172], a call Functiond055c @@ -378,11 +397,11 @@ Functiond0261: ; d0261 call Functiond02f8 ld a, [w2_d182] cp $ff - jr z, Functiond02a8 + jr z, PokeAnim_End cp $fe - jr z, Functiond028e + jr z, PokeAnim_SetRepeat cp $fd - jr z, Functiond0296 + jr z, PokeAnim_DoRepeat call Functiond02c8 ld a, [w2_d183] call Functiond02ae @@ -398,13 +417,13 @@ Functiond0282: ; d0282 ret ; d028e -Functiond028e: ; d028e +PokeAnim_SetRepeat: ; d028e ld a, [w2_d183] ld [w2_d17f], a jr Functiond0253 ; d0296 -Functiond0296: ; d0296 +PokeAnim_DoRepeat: ; d0296 ld a, [w2_d17f] and a ret z @@ -416,7 +435,7 @@ Functiond0296: ; d0296 jr Functiond0253 ; d02a8 -Functiond02a8: ; d02a8 +PokeAnim_End: ; d02a8 ld hl, w2_d17e set 7, [hl] ret diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index 6b6e3eacc..7fb32906d 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -4866,58 +4866,65 @@ Function111f97: ; 111f97 (44:5f97) ds 14 Unknown_112000: ; 112000 -INCBIN "baserom.gbc", $112000, $112001 - $112000 + db $4b Unknown_112001: ; 112001 -INCBIN "baserom.gbc", $112001, $112006 - $112001 + db $99, $66, $10, $00, $00 Unknown_112006: ; 112006 -INCBIN "baserom.gbc", $112006, $112013 - $112006 + db $08, "NINTENDO", $02, $77, $80, $00 Unknown_112013: ; 112013 -INCBIN "baserom.gbc", $112013, $11201d - $112013 + db $99, $66, $11, $00, $00, $00, $00, $11, $80, $00 Unknown_11201d: ; 11201d -INCBIN "baserom.gbc", $11201d, $112023 - $11201d + db $99, $66, $12, $00, $00, $00 Unknown_112023: ; 112023 -INCBIN "baserom.gbc", $112023, $11202d - $112023 + db $99, $66, $13, $00, $00, $00, $00, $13, $80, $00 Unknown_11202d: ; 11202d -INCBIN "baserom.gbc", $11202d, $112037 - $11202d + db $99, $66, $17, $00, $00, $00, $00, $17, $80, $00 Unknown_112037: ; 112037 -INCBIN "baserom.gbc", $112037, $11203c - $112037 + db $99, $66, $21, $00, $00 Unknown_11203c: ; 11203c -INCBIN "baserom.gbc", $11203c, $112046 - $11203c + db $99, $66, $22, $00, $00, $00, $00, $22, $80, $00 Unknown_112046: ; 112046 -INCBIN "baserom.gbc", $112046, $112052 - $112046 + db $99, $66, $19, $00, $00, $02, $00, $60, $00, $7b, $80, $00 Unknown_112052: ; 112052 -INCBIN "baserom.gbc", $112052, $11205e - $112052 + db $99, $66, $19, $00, $00, $02, $60, $60, $00, $db, $80, $00 Unknown_11205e: ; 11205e -INCBIN "baserom.gbc", $11205e, $112063 - $11205e + db $99, $66, $1a, $00, $00 Unknown_112063: ; 112063 -INCBIN "baserom.gbc", $112063, $112068 - $112063 + db $99, $66, $28, $00, $00 Unknown_112068: ; 112068 -INCBIN "baserom.gbc", $112068, $112072 - $112068 + db $99, $66, $14, $00, $00, $00, $00, $14, $80, $00 Unknown_112072: ; 112072 -INCBIN "baserom.gbc", $112072, $11207d - $112072 + db $99, $66, $15, $00, $00, $01, $ff, $01, $15, $80, $00 Unknown_11207d: ; 11207d -INCBIN "baserom.gbc", $11207d, $112083 - $11207d + db $99, $66, $23, $00, $00, $06 Unknown_112083: ; 112083 -INCBIN "baserom.gbc", $112083, $112089 - $112083 + db $99, $66, $24, $00, $00, $01 Unknown_112089: ; 112089 -INCBIN "baserom.gbc", $112089, $11209e - $112089 + db $ec, $14, $c9 + db $e4, $0f, $0e + db $e0, $0c, $53 + db $c4, $07, $94 + db $b0, $05, $ee + db $ec, $10, $b4 + db $e4, $0c, $dd +; 11209e Unknown_11209e: db "HELO ", 0 @@ -8496,14 +8503,14 @@ Function1136c1: ; 1136c1 .asm_113734 ld hl, $cc0c - ld a, $8e + ld a, Unknown_113b8e % $100 ld [hli], a - ld a, $7b + ld a, Unknown_113b8e / $100 ld [hl], a ld hl, $cc0e - ld a, $70 + ld a, Unknown_113a70 % $100 ld [hli], a - ld a, $7a + ld a, Unknown_113a70 / $100 ld [hl], a ld hl, $cbe7 ld de, $cc18 @@ -8586,7 +8593,7 @@ Function1136c1: ; 1136c1 ld [$cc0d], a ld a, l ld [$cc0c], a - cp $8e + cp $8e ; XXX (Unknown_113b8e + $100) % $100 ??? jp nz, .asm_113751 ld de, $cc18 ld hl, $cbe7 @@ -9020,13 +9027,55 @@ Unknown_113a55: ; 113a55 db "Authorization: GB00 name=", $22, 0 ; 113a70 -INCBIN "baserom.gbc", $113a70, $113b70 - $113a70 +Unknown_113a70: + db $00, $00, $00, $07, $06, $04, $00, $0c, $04, $08, $00, $11, $02, $0c, $00, $16 + db $00, $10, $00, $07, $06, $14, $00, $0c, $04, $18, $00, $11, $02, $1c, $00, $16 + db $00, $20, $00, $07, $06, $24, $00, $0c, $04, $28, $00, $11, $02, $2c, $00, $16 + db $00, $30, $00, $07, $06, $34, $00, $0c, $04, $38, $00, $11, $02, $3c, $00, $16 + db $10, $04, $00, $05, $16, $18, $00, $09, $14, $2c, $00, $0e, $12, $00, $00, $14 + db $10, $14, $00, $05, $16, $28, $00, $09, $14, $3c, $00, $0e, $12, $10, $00, $14 + db $10, $24, $00, $05, $16, $38, $00, $09, $14, $0c, $00, $0e, $12, $20, $00, $14 + db $10, $34, $00, $05, $16, $08, $00, $09, $14, $1c, $00, $0e, $12, $30, $00, $14 + db $20, $14, $00, $04, $26, $20, $00, $0b, $24, $2c, $00, $10, $22, $38, $00, $17 + db $20, $04, $00, $04, $26, $10, $00, $0b, $24, $1c, $00, $10, $22, $28, $00, $17 + db $20, $34, $00, $04, $26, $00, $00, $0b, $24, $0c, $00, $10, $22, $18, $00, $17 + db $20, $24, $00, $04, $26, $30, $00, $0b, $24, $3c, $00, $10, $22, $08, $00, $17 + db $30, $00, $00, $06, $36, $1c, $00, $0a, $34, $38, $00, $0f, $32, $14, $00, $15 + db $30, $30, $00, $06, $36, $0c, $00, $0a, $34, $28, $00, $0f, $32, $04, $00, $15 + db $30, $20, $00, $06, $36, $3c, $00, $0a, $34, $18, $00, $0f, $32, $34, $00, $15 + db $30, $10, $00, $06, $36, $2c, $00, $0a, $34, $08, $00, $0f, $32, $24, $00, $15 +; 113b70 Unknown_113b70: ; 113b70 -INCBIN "baserom.gbc", $113b70, $113b7e - $113b70 + dw $cbe7 + dw $cbeb + dw $cbef + dw $cbf3 + dw $cbe7 + dw $cbeb + dw $cbef Unknown_113b7e: ; 113b7e -INCBIN "baserom.gbc", $113b7e, $113c8e - $113b7e + db $01,$23,$45,$67,$89,$ab,$cd,$ef + db $fe,$dc,$ba,$98,$76,$54,$32,$10 + +Unknown_113b8e: + db $78, $a4, $6a, $d7, $56, $b7, $c7, $e8, $db, $70, $20, $24, $ee, $ce, $bd, $c1 + db $af, $0f, $7c, $f5, $2a, $c6, $87, $47, $13, $46, $30, $a8, $01, $95, $46, $fd + db $d8, $98, $80, $69, $af, $f7, $44, $8b, $b1, $5b, $ff, $ff, $be, $d7, $5c, $89 + db $22, $11, $90, $6b, $93, $71, $98, $fd, $8e, $43, $79, $a6, $21, $08, $b4, $49 + db $62, $25, $1e, $f6, $40, $b3, $40, $c0, $51, $5a, $5e, $26, $aa, $c7, $b6, $e9 + db $5d, $10, $2f, $d6, $53, $14, $44, $02, $81, $e6, $a1, $d8, $c8, $fb, $d3, $e7 + db $e6, $cd, $e1, $21, $d6, $07, $37, $c3, $87, $0d, $d5, $f4, $ed, $14, $5a, $45 + db $05, $e9, $e3, $a9, $f8, $a3, $ef, $fc, $d9, $02, $6f, $67, $8a, $4c, $2a, $8d + db $42, $39, $fa, $ff, $81, $f6, $71, $87, $22, $61, $9d, $6d, $0c, $38, $e5, $fd + db $44, $ea, $be, $a4, $a9, $cf, $de, $4b, $60, $4b, $bb, $f6, $70, $bc, $bf, $be + db $c6, $7e, $9b, $28, $fa, $27, $a1, $ea, $85, $30, $ef, $d4, $05, $1d, $88, $04 + db $39, $d0, $d4, $d9, $e5, $99, $db, $e6, $f8, $7c, $a2, $1f, $65, $56, $ac, $c4 + db $44, $22, $29, $f4, $97, $ff, $2a, $43, $a7, $23, $94, $ab, $39, $a0, $93, $fc + db $c3, $59, $5b, $65, $92, $cc, $0c, $8f, $7d, $f4, $ef, $ff, $d1, $5d, $84, $85 + db $4f, $7e, $a8, $6f, $e0, $e6, $2c, $fe, $14, $43, $01, $a3, $a1, $11, $08, $4e + db $82, $7e, $53, $f7, $35, $f2, $3a, $bd, $bb, $d2, $d7, $2a, $91, $d3, $86, $eb Function113c8e: ; 113c8e ld a, c diff --git a/macros.asm b/macros.asm index f7580246d..897636c8f 100644 --- a/macros.asm +++ b/macros.asm @@ -1,3 +1,5 @@ +INCLUDE "macros/enum.asm" + INCLUDE "macros/event.asm" INCLUDE "macros/sound.asm" INCLUDE "macros/text.asm" @@ -114,17 +116,6 @@ endanim: MACRO ENDM -; Constant enumeration - -const_def: MACRO -const_value SET 0 -ENDM - -const: MACRO -\1 EQU const_value -const_value SET const_value + 1 -ENDM - sine_wave: MACRO ; \1: amplitude diff --git a/macros/enum.asm b/macros/enum.asm new file mode 100644 index 000000000..0a72d49d8 --- /dev/null +++ b/macros/enum.asm @@ -0,0 +1,31 @@ +; Enumerate variables + +enum_start: macro +if _NARG >= 1 +__enum__ = \1 +else +__enum__ = 0 +endc +if _NARG >= 2 +__enumdir__ = \2 +else +__enumdir__ = +1 +endc +endm + +enum: macro +\1 = __enum__ +__enum__ = __enum__ + __enumdir__ +endm + + +; Enumerate constants + +const_def: MACRO +const_value = 0 +ENDM + +const: MACRO +\1 EQU const_value +const_value = const_value + 1 +ENDM diff --git a/macros/event.asm b/macros/event.asm index 238f18f85..fe41050c9 100644 --- a/macros/event.asm +++ b/macros/event.asm @@ -1,88 +1,106 @@ + enum_start + + enum scall_command scall: macro - db $00 + db scall_command dw \1 ; pointer endm + enum farscall_command farscall: macro - db $01 + db farscall_command db BANK(\1) dw \1 endm + enum ptcall_command ptcall: macro - db $02 + db ptcall_command dw \1 ; pointer endm + enum jump_command jump: macro - db $03 + db jump_command dw \1 ; pointer endm + enum farjump_command farjump: macro - db $04 + db farjump_command db BANK(\1) dw \1 endm + enum ptjump_command ptjump: macro - db $05 + db ptjump_command dw \1 ; pointer endm + enum if_equal_command if_equal: macro - db $06 + db if_equal_command db \1 ; byte dw \2 ; pointer endm + enum if_not_equal_command if_not_equal: macro - db $07 + db if_not_equal_command db \1 ; byte dw \2 ; pointer endm + enum iffalse_command iffalse: macro - db $08 + db iffalse_command dw \1 ; pointer endm + enum iftrue_command iftrue: macro - db $09 + db iftrue_command dw \1 ; pointer endm + enum if_greater_than_command if_greater_than: macro - db $0a + db if_greater_than_command db \1 ; byte dw \2 ; pointer endm + enum if_less_than_command if_less_than: macro - db $0b + db if_less_than_command db \1 ; byte dw \2 ; pointer endm + enum jumpstd_command jumpstd: macro - db $0c + db jumpstd_command dw \1 ; predefined_script endm + enum callstd_command callstd: macro - db $0d + db callstd_command dw \1 ; predefined_script endm + enum callasm_command callasm: macro - db $0e + db callasm_command db BANK(\1) dw \1 endm + enum special_command special: macro - db $0f + db special_command dw (\1Special - SpecialsPointers) / 3 endm @@ -93,161 +111,191 @@ add_special: MACRO ENDM + enum ptcallasm_command ptcallasm: macro - db $10 + db ptcallasm_command dw \1 ; asm endm + enum checkmaptriggers_command checkmaptriggers: macro - db $11 + db checkmaptriggers_command db \1 ; map_group db \2 ; map_id endm + enum domaptrigger_command domaptrigger: macro - db $12 + db domaptrigger_command db \1 ; map_group db \2 ; map_id db \3 ; trigger_id endm + enum checktriggers_command checktriggers: macro - db $13 + db checktriggers_command endm + enum dotrigger_command dotrigger: macro - db $14 + db dotrigger_command db \1 ; trigger_id endm + enum writebyte_command writebyte: macro - db $15 + db writebyte_command db \1 ; value endm + enum addvar_command addvar: macro - db $16 + db addvar_command db \1 ; value endm + enum random_command random: macro - db $17 + db random_command db \1 ; input endm + enum checkver_command checkver: macro - db $18 + db checkver_command endm + enum copybytetovar_command copybytetovar: macro - db $19 + db copybytetovar_command dw \1 ; address endm + enum copyvartobyte_command copyvartobyte: macro - db $1a + db copyvartobyte_command dw \1 ; address endm + enum loadvar_command loadvar: macro - db $1b + db loadvar_command dw \1 ; address db \2 ; value endm + enum checkcode_command checkcode: macro - db $1c + db checkcode_command db \1 ; variable_id endm + enum writevarcode_command writevarcode: macro - db $1d + db writevarcode_command db \1 ; variable_id endm + enum writecode_command writecode: macro - db $1e + db writecode_command db \1 ; variable_id db \2 ; value endm + enum giveitem_command giveitem: macro - db $1f + db giveitem_command db \1 ; item db \2 ; quantity endm + enum takeitem_command takeitem: macro - db $20 + db takeitem_command db \1 ; item db \2 ; quantity endm + enum checkitem_command checkitem: macro - db $21 + db checkitem_command db \1 ; item endm + enum givemoney_command givemoney: macro - db $22 + db givemoney_command db \1 ; account dt \2 ; money endm + enum takemoney_command takemoney: macro - db $23 + db takemoney_command db \1 ; account dt \2 ; money endm + enum checkmoney_command checkmoney: macro - db $24 + db checkmoney_command db \1 ; account dt \2 ; money endm + enum givecoins_command givecoins: macro - db $25 + db givecoins_command dw \1 ; coins endm + enum takecoins_command takecoins: macro - db $26 + db takecoins_command dw \1 ; coins endm + enum checkcoins_command checkcoins: macro - db $27 + db checkcoins_command dw \1 ; coins endm + enum addcellnum_command addcellnum: macro - db $28 + db addcellnum_command db \1 ; person endm + enum delcellnum_command delcellnum: macro - db $29 + db delcellnum_command db \1 ; person endm + enum checkcellnum_command checkcellnum: macro - db $2a + db checkcellnum_command db \1 ; person endm + enum checktime_command checktime: macro - db $2b + db checktime_command db \1 ; time endm + enum checkpoke_command checkpoke: macro - db $2c + db checkpoke_command db \1 ; pkmn endm + enum givepoke_command givepoke: macro - db $2d + db givepoke_command db \1 ; pokemon db \2 ; level db \3 ; item @@ -258,591 +306,709 @@ givepoke: macro endc endm + enum giveegg_command giveegg: macro - db $2e + db giveegg_command db \1 ; pkmn db \2 ; level endm + enum givepokeitem_command givepokeitem: macro - db $2f + db givepokeitem_command dw \1 ; pointer endm + enum checkpokeitem_command checkpokeitem: macro - db $30 + db checkpokeitem_command dw \1 ; pointer endm + enum checkevent_command checkevent: macro - db $31 + db checkevent_command dw \1 ; event_flag endm + enum clearevent_command clearevent: macro - db $32 + db clearevent_command dw \1 ; event_flag endm + enum setevent_command setevent: macro - db $33 + db setevent_command dw \1 ; event_flag endm + enum checkflag_command checkflag: macro - db $34 + db checkflag_command dw \1 ; engine_flag endm + enum clearflag_command clearflag: macro - db $35 + db clearflag_command dw \1 ; engine_flag endm + enum setflag_command setflag: macro - db $36 + db setflag_command dw \1 ; engine_flag endm + enum wildon_command wildon: macro - db $37 + db wildon_command endm + enum wildoff_command wildoff: macro - db $38 + db wildoff_command endm + enum xycompare_command xycompare: macro - db $39 + db xycompare_command dw \1 ; pointer endm + enum warpmod_command warpmod: macro - db $3a + db warpmod_command db \1 ; warp_id db \2 ; map_group db \3 ; map_id endm + enum blackoutmod_command blackoutmod: macro - db $3b + db blackoutmod_command db \1 ; map_group db \2 ; map_id endm + enum warp_command warp: macro - db $3c + db warp_command db \1 ; map_group db \2 ; map_id db \3 ; x db \4 ; y endm + enum readmoney_command readmoney: macro - db $3d + db readmoney_command db \1 ; account db \2 ; memory endm + enum readcoins_command readcoins: macro - db $3e + db readcoins_command db \1 ; memory endm + enum RAM2MEM_command RAM2MEM: macro - db $3f + db RAM2MEM_command db \1 ; memory endm + enum pokenamemem_command pokenamemem: macro - db $40 + db pokenamemem_command db \1 ; pokemon db \2 ; memory endm + enum itemtotext_command itemtotext: macro - db $41 + db itemtotext_command db \1 ; item db \2 ; memory endm + enum mapnametotext_command mapnametotext: macro - db $42 + db mapnametotext_command db \1 ; memory endm + enum trainertotext_command trainertotext: macro - db $43 + db trainertotext_command db \1 ; trainer_id db \2 ; trainer_group db \3 ; memory endm + enum stringtotext_command stringtotext: macro - db $44 + db stringtotext_command dw \1 ; text_pointer db \2 ; memory endm + enum itemnotify_command itemnotify: macro - db $45 + db itemnotify_command endm + enum pocketisfull_command pocketisfull: macro - db $46 + db pocketisfull_command endm + enum loadfont_command loadfont: macro - db $47 + db loadfont_command endm + enum refreshscreen_command refreshscreen: macro - db $48 + db refreshscreen_command db \1 ; dummy endm + enum loadmovesprites_command loadmovesprites: macro - db $49 + db loadmovesprites_command endm + enum loadbytec1ce_command loadbytec1ce: macro - db $4a + db loadbytec1ce_command db \1 ; byte endm + enum farwritetext_command farwritetext: macro - db $4b + db farwritetext_command db BANK(\1) dw \1 endm + enum writetext_command writetext: macro - db $4c + db writetext_command dw \1 ; text_pointer endm + enum repeattext_command repeattext: macro - db $4d + db repeattext_command db \1 ; byte db \2 ; byte endm + enum yesorno_command yesorno: macro - db $4e + db yesorno_command endm + enum loadmenudata_command loadmenudata: macro - db $4f + db loadmenudata_command dw \1 ; data endm + enum writebackup_command writebackup: macro - db $50 + db writebackup_command endm + enum jumptextfaceplayer_command jumptextfaceplayer: macro - db $51 + db jumptextfaceplayer_command dw \1 ; text_pointer endm + enum farjumptext_command farjumptext: macro - db $52 + db farjumptext_command db BANK(\1) dw \1 endm + enum jumptext_command jumptext: macro - db $53 + db jumptext_command dw \1 ; text_pointer endm + enum closetext_command closetext: macro - db $54 + db closetext_command endm + enum keeptextopen_command keeptextopen: macro - db $55 + db keeptextopen_command endm + enum pokepic_command pokepic: macro - db $56 + db pokepic_command db \1 ; pokemon endm + enum pokepicyesorno_command pokepicyesorno: macro - db $57 + db pokepicyesorno_command endm + enum interpretmenu_command interpretmenu: macro - db $58 + db interpretmenu_command endm + enum interpretmenu2_command interpretmenu2: macro - db $59 + db interpretmenu2_command endm + enum loadpikachudata_command loadpikachudata: macro - db $5a + db loadpikachudata_command endm + enum battlecheck_command battlecheck: macro - db $5b + db battlecheck_command endm + enum loadtrainerdata_command loadtrainerdata: macro - db $5c + db loadtrainerdata_command endm + enum loadpokedata_command loadpokedata: macro - db $5d + db loadpokedata_command db \1 ; pokemon db \2 ; level endm + enum loadtrainer_command loadtrainer: macro - db $5e + db loadtrainer_command db \1 ; trainer_group db \2 ; trainer_id endm + enum startbattle_command startbattle: macro - db $5f + db startbattle_command endm + enum returnafterbattle_command returnafterbattle: macro - db $60 + db returnafterbattle_command endm + enum catchtutorial_command catchtutorial: macro - db $61 + db catchtutorial_command db \1 ; byte endm + enum trainertext_command trainertext: macro - db $62 + db trainertext_command db \1 ; which_text endm + enum trainerstatus_command trainerstatus: macro - db $63 + db trainerstatus_command db \1 ; action endm + enum winlosstext_command winlosstext: macro - db $64 + db winlosstext_command dw \1 ; win_text_pointer dw \2 ; loss_text_pointer endm + enum scripttalkafter_command scripttalkafter: macro - db $65 + db scripttalkafter_command endm + enum talkaftercancel_command talkaftercancel: macro - db $66 + db talkaftercancel_command endm + enum talkaftercheck_command talkaftercheck: macro - db $67 + db talkaftercheck_command endm + enum setlasttalked_command setlasttalked: macro - db $68 + db setlasttalked_command db \1 ; person endm + enum applymovement_command applymovement: macro - db $69 + db applymovement_command db \1 ; person dw \2 ; data endm + enum applymovement2_command applymovement2: macro - db $6a + db applymovement2_command dw \1 ; data endm + enum faceplayer_command faceplayer: macro - db $6b + db faceplayer_command endm + enum faceperson_command faceperson: macro - db $6c + db faceperson_command db \1 ; person1 db \2 ; person2 endm + enum variablesprite_command variablesprite: macro - db $6d + db variablesprite_command db \1 ; byte db \2 ; sprite endm + enum disappear_command disappear: macro - db $6e + db disappear_command db \1 ; person endm + enum appear_command appear: macro - db $6f + db appear_command db \1 ; person endm + enum follow_command follow: macro - db $70 + db follow_command db \1 ; person2 db \2 ; person1 endm + enum stopfollow_command stopfollow: macro - db $71 + db stopfollow_command endm + enum moveperson_command moveperson: macro - db $72 + db moveperson_command db \1 ; person db \2 ; x db \3 ; y endm + enum writepersonxy_command writepersonxy: macro - db $73 + db writepersonxy_command db \1 ; person endm + enum loademote_command loademote: macro - db $74 + db loademote_command db \1 ; bubble endm + enum showemote_command showemote: macro - db $75 + db showemote_command db \1 ; bubble db \2 ; person db \3 ; time endm + enum spriteface_command spriteface: macro - db $76 + db spriteface_command db \1 ; person db \2 ; facing endm + enum follownotexact_command follownotexact: macro - db $77 + db follownotexact_command db \1 ; person2 db \2 ; person1 endm + enum earthquake_command earthquake: macro - db $78 + db earthquake_command db \1 ; param endm + enum changemap_command changemap: macro - db $79 + db changemap_command dw \1 ; map_data_pointer endm + enum changeblock_command changeblock: macro - db $7a + db changeblock_command db \1 ; x db \2 ; y db \3 ; block endm + enum reloadmap_command reloadmap: macro - db $7b + db reloadmap_command endm + enum reloadmappart_command reloadmappart: macro - db $7c + db reloadmappart_command endm + enum writecmdqueue_command writecmdqueue: macro - db $7d + db writecmdqueue_command dw \1 ; queue_pointer endm + enum delcmdqueue_command delcmdqueue: macro - db $7e + db delcmdqueue_command db \1 ; byte endm + enum playmusic_command playmusic: macro - db $7f + db playmusic_command dw \1 ; music_pointer endm + enum playrammusic_command playrammusic: macro - db $80 + db playrammusic_command endm + enum musicfadeout_command musicfadeout: macro - db $81 + db musicfadeout_command dw \1 ; music db \2 ; fadetime endm + enum playmapmusic_command playmapmusic: macro - db $82 + db playmapmusic_command endm + enum reloadmapmusic_command reloadmapmusic: macro - db $83 + db reloadmapmusic_command endm + enum cry_command cry: macro - db $84 + db cry_command dw \1 ; cry_id endm + enum playsound_command playsound: macro - db $85 + db playsound_command dw \1 ; sound_pointer endm + enum waitbutton_command waitbutton: macro - db $86 + db waitbutton_command endm + enum warpsound_command warpsound: macro - db $87 + db warpsound_command endm + enum specialsound_command specialsound: macro - db $88 + db specialsound_command endm + enum passtoengine_command passtoengine: macro - db $89 + db passtoengine_command db \1 ; data_pointer endm + enum newloadmap_command newloadmap: macro - db $8a + db newloadmap_command db \1 ; which_method endm + enum pause_command pause: macro - db $8b + db pause_command db \1 ; length endm + enum deactivatefacing_command deactivatefacing: macro - db $8c + db deactivatefacing_command db \1 ; time endm + enum priorityjump_command priorityjump: macro - db $8d + db priorityjump_command dw \1 ; pointer endm + enum warpcheck_command warpcheck: macro - db $8e + db warpcheck_command endm + enum ptpriorityjump_command ptpriorityjump: macro - db $8f + db ptpriorityjump_command dw \1 ; pointer endm + enum return_command return: macro - db $90 + db return_command endm + enum end_command end: macro - db $91 + db end_command endm + enum reloadandreturn_command reloadandreturn: macro - db $92 + db reloadandreturn_command db \1 ; which_method endm + enum resetfuncs_command resetfuncs: macro - db $93 + db resetfuncs_command endm + enum pokemart_command pokemart: macro - db $94 + db pokemart_command db \1 ; dialog_id dw \2 ; mart_id endm + enum elevator_command elevator: macro - db $95 + db elevator_command dw \1 ; floor_list_pointer endm + enum trade_command trade: macro - db $96 + db trade_command db \1 ; trade_id endm + enum askforphonenumber_command askforphonenumber: macro - db $97 + db askforphonenumber_command db \1 ; number endm + enum phonecall_command phonecall: macro - db $98 + db phonecall_command dw \1 ; caller_name endm + enum hangup_command hangup: macro - db $99 + db hangup_command endm + enum describedecoration_command describedecoration: macro - db $9a + db describedecoration_command db \1 ; byte endm + enum fruittree_command fruittree: macro - db $9b + db fruittree_command db \1 ; tree_id endm + enum specialphonecall_command specialphonecall: macro - db $9c + db specialphonecall_command dw \1 ; call_id endm + enum checkphonecall_command checkphonecall: macro - db $9d + db checkphonecall_command endm + enum verbosegiveitem_command verbosegiveitem: macro - db $9e + db verbosegiveitem_command db \1 ; item db \2 ; quantity endm + enum verbosegiveitem2_command verbosegiveitem2: macro - db $9f + db verbosegiveitem2_command db \1 ; item db \2 ; var endm + enum loadwilddata_command loadwilddata: macro - db $a0 + db loadwilddata_command db \1 ; flag db \2 ; map_group db \3 ; map_id endm + enum halloffame_command halloffame: macro - db $a1 + db halloffame_command endm + enum credits_command credits: macro - db $a2 + db credits_command endm + enum warpfacing_command warpfacing: macro - db $a3 + db warpfacing_command db \1 ; facing db \2 ; map_group db \3 ; map_id @@ -850,35 +1016,41 @@ warpfacing: macro db \5 ; y endm + enum storetext_command storetext: macro - db $a4 + db storetext_command db \1 ; memory endm + enum displaylocation_command displaylocation: macro - db $a5 + db displaylocation_command db \1 ; id db \2 ; memory endm + enum trainerclassname_command trainerclassname: macro - db $a6 + db trainerclassname_command db \1 ; id db \2 ; memory endm + enum name_command name: macro - db $a7 + db name_command db \1 ; type db \2 ; id db \3 ; mempry endm + enum wait_command wait: macro - db $a8 + db wait_command db \1 ; duration endm + enum unknown0xa9_command unknown0xa9: macro - db $a9 + db unknown0xa9_command endm diff --git a/macros/move_effect.asm b/macros/move_effect.asm index 66e419db2..6cca15b2d 100644 --- a/macros/move_effect.asm +++ b/macros/move_effect.asm @@ -1,708 +1,186 @@ -checkturn: macro - db $01 - endm - -checkobedience: macro - db $02 - endm - -usedmovetext: macro - db $03 - endm - -doturn: macro - db $04 - endm - -critical: macro - db $05 - endm - -damagestats: macro - db $06 - endm - -stab: macro - db $07 - endm - -damagevariation: macro - db $08 - endm - -checkhit: macro - db $09 - endm - -effect0x0a: macro - db $0a - endm - -effect0x0b: macro - db $0b - endm - -effect0x0c: macro - db $0c - endm - -resulttext: macro - db $0d - endm - -checkfaint: macro - db $0e - endm - -criticaltext: macro - db $0f - endm - -supereffectivetext: macro - db $10 - endm - -checkdestinybond: macro - db $11 - endm - -buildopponentrage: macro - db $12 - endm - -poisontarget: macro - db $13 - endm - -sleeptarget: macro - db $14 - endm - -draintarget: macro - db $15 - endm - -eatdream: macro - db $16 - endm - -burntarget: macro - db $17 - endm - -freezetarget: macro - db $18 - endm - -paralyzetarget: macro - db $19 - endm - -selfdestruct: macro - db $1a - endm - -mirrormove: macro - db $1b - endm - -statup: macro - db $1c - endm - -statdown: macro - db $1d - endm - -payday: macro - db $1e - endm - -conversion: macro - db $1f - endm - -resetstats: macro - db $20 - endm - -storeenergy: macro - db $21 - endm - -unleashenergy: macro - db $22 - endm - -forceswitch: macro - db $23 - endm - -endloop: macro - db $24 - endm - -flinchtarget: macro - db $25 - endm - -ohko: macro - db $26 - endm - -recoil: macro - db $27 - endm - -mist: macro - db $28 - endm - -focusenergy: macro - db $29 - endm - -confuse: macro - db $2a - endm - -confusetarget: macro - db $2b - endm - -heal: macro - db $2c - endm - -transform: macro - db $2d - endm - -screen: macro - db $2e - endm - -poison: macro - db $2f - endm - -paralyze: macro - db $30 - endm - -substitute: macro - db $31 - endm - -rechargenextturn: macro - db $32 - endm - -mimic: macro - db $33 - endm - -metronome: macro - db $34 - endm - -leechseed: macro - db $35 - endm - -splash: macro - db $36 - endm - -disable: macro - db $37 - endm - -cleartext: macro - db $38 - endm - -charge: macro - db $39 - endm - -checkcharge: macro - db $3a - endm - -traptarget: macro - db $3b - endm - -effect0x3c: macro - db $3c - endm - -rampage: macro - db $3d - endm - -checkrampage: macro - db $3e - endm - -constantdamage: macro - db $3f - endm - -counter: macro - db $40 - endm - -encore: macro - db $41 - endm - -painsplit: macro - db $42 - endm - -snore: macro - db $43 - endm - -conversion2: macro - db $44 - endm - -lockon: macro - db $45 - endm - -sketch: macro - db $46 - endm - -defrostopponent: macro - db $47 - endm - -sleeptalk: macro - db $48 - endm - -destinybond: macro - db $49 - endm - -spite: macro - db $4a - endm - -falseswipe: macro - db $4b - endm - -healbell: macro - db $4c - endm - -kingsrock: macro - db $4d - endm - -triplekick: macro - db $4e - endm - -kickcounter: macro - db $4f - endm - -thief: macro - db $50 - endm - -arenatrap: macro - db $51 - endm - -nightmare: macro - db $52 - endm - -defrost: macro - db $53 - endm - -curse: macro - db $54 - endm - -protect: macro - db $55 - endm - -spikes: macro - db $56 - endm - -foresight: macro - db $57 - endm - -perishsong: macro - db $58 - endm - -startsandstorm: macro - db $59 - endm - -endure: macro - db $5a - endm - -checkcurl: macro - db $5b - endm - -rolloutpower: macro - db $5c - endm - -effect0x5d: macro - db $5d - endm - -furycutter: macro - db $5e - endm - -attract: macro - db $5f - endm - -happinesspower: macro - db $60 - endm - -present: macro - db $61 - endm - -damagecalc: macro - db $62 - endm - -frustrationpower: macro - db $63 - endm - -safeguard: macro - db $64 - endm - -checksafeguard: macro - db $65 - endm - -getmagnitude: macro - db $66 - endm - -batonpass: macro - db $67 - endm - -pursuit: macro - db $68 - endm - -clearhazards: macro - db $69 - endm - -healmorn: macro - db $6a - endm - -healday: macro - db $6b - endm - -healnite: macro - db $6c - endm - -hiddenpower: macro - db $6d - endm - -startrain: macro - db $6e - endm - -startsun: macro - db $6f - endm - -attackup: macro - db $70 - endm - -defenseup: macro - db $71 - endm - -speedup: macro - db $72 - endm - -specialattackup: macro - db $73 - endm - -specialdefenseup: macro - db $74 - endm - -accuracyup: macro - db $75 - endm - -evasionup: macro - db $76 - endm - -attackup2: macro - db $77 - endm - -defenseup2: macro - db $78 - endm - -speedup2: macro - db $79 - endm - -specialattackup2: macro - db $7a - endm - -specialdefenseup2: macro - db $7b - endm - -accuracyup2: macro - db $7c - endm - -evasionup2: macro - db $7d - endm - -attackdown: macro - db $7e - endm - -defensedown: macro - db $7f - endm - -speeddown: macro - db $80 - endm - -specialattackdown: macro - db $81 - endm - -specialdefensedown: macro - db $82 - endm - -accuracydown: macro - db $83 - endm - -evasiondown: macro - db $84 - endm - -attackdown2: macro - db $85 - endm - -defensedown2: macro - db $86 - endm - -speeddown2: macro - db $87 - endm - -specialattackdown2: macro - db $88 - endm - -specialdefensedown2: macro - db $89 - endm - -accuracydown2: macro - db $8a - endm - -evasiondown2: macro - db $8b - endm - -statmessageuser: macro - db $8c - endm - -statmessagetarget: macro - db $8d - endm - -statupfailtext: macro - db $8e - endm - -statdownfailtext: macro - db $8f - endm - -effectchance: macro - db $90 - endm - -effect0x91: macro - db $91 - endm - -effect0x92: macro - db $92 - endm - -switchturn: macro - db $93 - endm - -fakeout: macro - db $94 - endm - -bellydrum: macro - db $95 - endm - -psychup: macro - db $96 - endm - -rage: macro - db $97 - endm - -doubleflyingdamage: macro - db $98 - endm - -doubleundergrounddamage: macro - db $99 - endm - -mirrorcoat: macro - db $9a - endm - -checkfuturesight: macro - db $9b - endm - -futuresight: macro - db $9c - endm - -doubleminimizedamage: macro - db $9d - endm - -skipsuncharge: macro - db $9e - endm - -thunderaccuracy: macro - db $9f - endm - -teleport: macro - db $a0 - endm - -beatup: macro - db $a1 - endm - -ragedamage: macro - db $a2 - endm - -effect0xa3: macro - db $a3 - endm - -allstatsup: macro - db $a4 - endm - -effect0xa5: macro - db $a5 - endm - -effect0xa6: macro - db $a6 - endm - -effect0xa7: macro - db $a7 - endm - -effect0xa8: macro - db $a8 - endm - -clearmissdamage: macro - db $a9 - endm - -movedelay: macro - db $aa - endm - -hittarget: macro - db $ab - endm - -tristatuschance: macro - db $ac - endm - -supereffectivelooptext: macro - db $ad - endm - -startloop: macro - db $ae - endm - -curl: macro - db $af - endm - -endturn: macro - db $fe - endm - -endmove: macro - db $ff - endm - +command: macro + enum \1_command +\1 equs "db \1_command" +endm + + enum_start 1 + + command checkturn + command checkobedience + command usedmovetext + command doturn + command critical + command damagestats + command stab + command damagevariation + command checkhit + command effect0x0a + command effect0x0b + command effect0x0c + command resulttext + command checkfaint + command criticaltext + command supereffectivetext + command checkdestinybond + command buildopponentrage + command poisontarget + command sleeptarget + command draintarget + command eatdream + command burntarget + command freezetarget + command paralyzetarget + command selfdestruct + command mirrormove + command statup + command statdown + command payday + command conversion + command resetstats + command storeenergy + command unleashenergy + command forceswitch + command endloop + command flinchtarget + command ohko + command recoil + command mist + command focusenergy + command confuse + command confusetarget + command heal + command transform + command screen + command poison + command paralyze + command substitute + command rechargenextturn + command mimic + command metronome + command leechseed + command splash + command disable + command cleartext + command charge + command checkcharge + command traptarget + command effect0x3c + command rampage + command checkrampage + command constantdamage + command counter + command encore + command painsplit + command snore + command conversion2 + command lockon + command sketch + command defrostopponent + command sleeptalk + command destinybond + command spite + command falseswipe + command healbell + command kingsrock + command triplekick + command kickcounter + command thief + command arenatrap + command nightmare + command defrost + command curse + command protect + command spikes + command foresight + command perishsong + command startsandstorm + command endure + command checkcurl + command rolloutpower + command effect0x5d + command furycutter + command attract + command happinesspower + command present + command damagecalc + command frustrationpower + command safeguard + command checksafeguard + command getmagnitude + command batonpass + command pursuit + command clearhazards + command healmorn + command healday + command healnite + command hiddenpower + command startrain + command startsun + command attackup + command defenseup + command speedup + command specialattackup + command specialdefenseup + command accuracyup + command evasionup + command attackup2 + command defenseup2 + command speedup2 + command specialattackup2 + command specialdefenseup2 + command accuracyup2 + command evasionup2 + command attackdown + command defensedown + command speeddown + command specialattackdown + command specialdefensedown + command accuracydown + command evasiondown + command attackdown2 + command defensedown2 + command speeddown2 + command specialattackdown2 + command specialdefensedown2 + command accuracydown2 + command evasiondown2 + command statmessageuser + command statmessagetarget + command statupfailtext + command statdownfailtext + command effectchance + command effect0x91 + command effect0x92 + command switchturn + command fakeout + command bellydrum + command psychup + command rage + command doubleflyingdamage + command doubleundergrounddamage + command mirrorcoat + command checkfuturesight + command futuresight + command doubleminimizedamage + command skipsuncharge + command thunderaccuracy + command teleport + command beatup + command ragedamage + command effect0xa3 + command allstatsup + command effect0xa5 + command effect0xa6 + command effect0xa7 + command effect0xa8 + command clearmissdamage + command movedelay + command hittarget + command tristatuschance + command supereffectivelooptext + command startloop + command curl + + enum_start -1, -1 + command endmove + command endturn @@ -8314,7 +8314,7 @@ Functiond906: ; d906 FillPP: ; da6d push bc - ld b, $4 + ld b, NUM_MOVES .asm_da70 ld a, [hli] and a @@ -8332,7 +8332,7 @@ FillPP: ; da6d pop bc pop de pop hl - ld a, [StringBuffer1 + 5] + ld a, [StringBuffer1 + MOVE_PP] .asm_da8f ld [de], a @@ -13218,7 +13218,7 @@ StartMenu:: ; 125cd call .AppendMenuList .no_pack - ld hl, wd957 + ld hl, wPokegearFlags bit 7, [hl] jr z, .no_pokegear ld a, 7 ; pokegear @@ -15456,7 +15456,7 @@ Function1365b:: ; 1365b call IsInArray jr nc, .asm_1367f - ld a, $c ; jumpstd + ld a, jumpstd_command ld [wd03f], a inc hl ld a, [hli] @@ -16111,13 +16111,14 @@ Function13a47: ; 13a47 ld a, [hl] and a ret z - cp 6 + 1 + + cp PARTY_LENGTH + 1 jr c, .asm_13a54 - ld a, 6 + ld a, PARTY_LENGTH ld [hl], a - .asm_13a54 inc hl + ld b, a ld c, 0 .asm_13a58 @@ -16146,6 +16147,7 @@ Function13a47: ; 13a47 dec b jr nz, .asm_13a58 ld [hl], $ff + ld hl, PartyMon1 ld a, [PartyCount] ld d, a @@ -16158,7 +16160,7 @@ Function13a47: ; 13a47 ld a, [hl] and a jr z, .asm_13a8f - cp $fc + cp NUM_POKEMON + 1 jr c, .asm_13a9c .asm_13a8f @@ -16177,8 +16179,8 @@ Function13a47: ; 13a47 ld hl, PartyMon1Level - PartyMon1 add hl, bc ld a, [hl] - cp 2 - ld a, 2 + cp MIN_LEVEL + ld a, MIN_LEVEL jr c, .asm_13ab4 ld a, [hl] cp MAX_LEVEL @@ -16193,7 +16195,7 @@ Function13a47: ; 13a47 add hl, bc ld d, h ld e, l - ld hl, $000a + ld hl, PartyMon1Exp + 2 - PartyMon1 add hl, bc ld b, $1 predef Functione167 @@ -16204,6 +16206,7 @@ Function13a47: ; 13a47 inc e dec d jr nz, .asm_13a83 + ld de, PartyMonNicknames ld a, [PartyCount] ld b, a @@ -16216,6 +16219,7 @@ Function13a47: ; 13a47 pop hl pop bc jr nc, .asm_13b0e + push bc push hl ld hl, PartySpecies @@ -16230,10 +16234,9 @@ Function13a47: ; 13a47 ld [wd265], a call GetPokemonName ld hl, StringBuffer1 - .asm_13b06 pop de - ld bc, $000b + ld bc, PKMN_NAME_LENGTH call CopyBytes pop bc @@ -16241,6 +16244,7 @@ Function13a47: ; 13a47 inc c dec b jr nz, .asm_13adc + ld de, PartyMonOT ld a, [PartyCount] ld b, a @@ -16257,7 +16261,6 @@ Function13a47: ; 13a47 ld hl, PlayerName ld bc, $000b call CopyBytes - .asm_13b34 pop bc inc c @@ -16273,9 +16276,8 @@ Function13a47: ; 13a47 ld a, [hl] and a jr z, .asm_13b4b - cp $fc + cp NUM_ATTACKS + 1 jr c, .asm_13b4d - .asm_13b4b ld [hl], POUND @@ -22405,7 +22407,7 @@ Function16949: ; 16949 call YesNoBox jr c, .asm_1697c ld a, [PartyCount] - cp $6 + cp PARTY_LENGTH jr nc, .asm_16987 call Function169ac ld hl, wDaycareMan @@ -22472,7 +22474,7 @@ Function169ac: ; 169ac ld [CurPartyLevel], a ld hl, PartyCount ld a, [hl] - cp $6 + cp PARTY_LENGTH jr nc, .asm_16a2f inc a ld [hl], a @@ -22487,7 +22489,7 @@ Function169ac: ; 169ac ld a, $ff ld [hl], a ld hl, PartyMonNicknames - ld bc, $000b + ld bc, PKMN_NAME_LENGTH call Function16a31 ld hl, wEggNick call CopyBytes @@ -22510,10 +22512,10 @@ Function169ac: ; 169ac call AddNTimes ld b, h ld c, l - ld hl, $0007 + ld hl, PartyMon1ID + 1 - PartyMon1 add hl, bc push hl - ld hl, $0024 + ld hl, PartyMon1MaxHP - PartyMon1 add hl, bc ld d, h ld e, l @@ -22522,7 +22524,7 @@ Function169ac: ; 169ac ld b, $0 predef Functione167 pop bc - ld hl, $0022 + ld hl, PartyMon1HP - PartyMon1 add hl, bc xor a ld [hli], a @@ -22610,21 +22612,22 @@ Function16a66: ; 16a66 ld [CurPartySpecies], a callab GetPreEvolution callab GetPreEvolution - ld a, $5 + ld a, EGG_LEVEL ld [CurPartyLevel], a + ld a, [CurPartySpecies] - cp $1d + cp NIDORAN_F jr nz, .asm_16ae8 call Random cp $80 - ld a, $1d + ld a, NIDORAN_F jr c, .asm_16ae8 - ld a, $20 - + ld a, NIDORAN_M .asm_16ae8 ld [CurPartySpecies], a ld [CurSpecies], a ld [wEggMonSpecies], a + call GetBaseData ld hl, wEggNick ld de, String_16be0 @@ -23107,7 +23110,6 @@ Function16e1d: ; 16e1d ld c, $fe jr z, .asm_16e9f ld c, $80 - .asm_16e9f ld a, [wBreedMon1ID] ld b, a @@ -23261,25 +23263,30 @@ Function16f7a: ; 16f7a (5:6f7a) and a jp nz, Function1707d ld [hl], $78 + push de + callba Function4dbb8 callba Function10608d ld a, [CurPartyMon] ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species) - ld bc, $30 + ld bc, PartyMon2 - PartyMon1 call AddNTimes ld a, [hl] ld [CurPartySpecies], a dec a call SetSeenAndCaughtMon + ld a, [CurPartySpecies] - cp $af + cp TOGEPI jr nz, .asm_16fbf ld de, $54 ld b, $1 call EventFlagAction .asm_16fbf + pop de + ld a, [CurPartySpecies] dec de ld [de], a @@ -23291,45 +23298,45 @@ Function16f7a: ; 16f7a (5:6f7a) call GetBaseData ld a, [CurPartyMon] ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species) - ld bc, $30 + ld bc, PartyMon2 - PartyMon1 call AddNTimes push hl - ld bc, $24 + ld bc, PartyMon1MaxHP - PartyMon1 add hl, bc ld d, h ld e, l pop hl push hl - ld bc, $1f + ld bc, PartyMon1Level - PartyMon1 add hl, bc ld a, [hl] ld [CurPartyLevel], a pop hl push hl - ld bc, $20 + ld bc, PartyMon1Status - PartyMon1 add hl, bc xor a ld [hli], a ld [hl], a pop hl push hl - ld bc, $a + ld bc, PartyMon1Exp + 2 - PartyMon1 add hl, bc ld b, $0 predef Functione167 pop bc - ld hl, $24 + ld hl, PartyMon1MaxHP - PartyMon1 add hl, bc ld d, h ld e, l - ld hl, $22 + ld hl, PartyMon1HP - PartyMon1 add hl, bc ld a, [de] inc de ld [hli], a ld a, [de] ld [hl], a - ld hl, $6 + ld hl, PartyMon1ID - PartyMon1 add hl, bc ld a, [PlayerID] ld [hli], a @@ -23347,7 +23354,7 @@ Function16f7a: ; 16f7a (5:6f7a) call PrintText ld a, [CurPartyMon] ld hl, PartyMonNicknames - ld bc, $b + ld bc, PKMN_NAME_LENGTH call AddNTimes ld d, h ld e, l @@ -23377,7 +23384,7 @@ Function1707d: ; 1707d (5:707d) ld hl, CurPartyMon inc [hl] pop hl - ld de, $30 + ld de, PartyMon2 - PartyMon1 add hl, de pop de jp Function16f7a @@ -23434,13 +23441,13 @@ Function170bf: ; 170bf call Function17197 ld d, h ld e, l - ld b, $4 + ld b, NUM_MOVES .asm_170c6 ld a, [de] and a jr z, .asm_170e3 ld hl, wEggMonMoves - ld c, $4 + ld c, NUM_MOVES .asm_170cf ld a, [de] cp [hl] @@ -30545,7 +30552,7 @@ Function28771: ; 28771 and a ret z push hl - ld hl, Unknown_28785 + ld hl, .TimeCapsuleAlt .asm_28778 ld a, [hli] and a @@ -30561,10 +30568,11 @@ Function28771: ; 28771 .asm_28783 pop hl ret -; 28785 -Unknown_28785: ; 28785 -; Alternate mappings for unused items. +.TimeCapsuleAlt ; 28785 +; Pokémon traded from RBY do not have held items, so GSC usually interprets the +; catch rate as an item. However, if the catch rate appears in this table, the +; item associated with the table entry is used instead. db ITEM_19, LEFTOVERS db ITEM_2D, BITTER_BERRY db ITEM_32, GOLD_BERRY @@ -33017,7 +33025,7 @@ TradePoofGFX: INCBIN "gfx/trade/poof.2bpp" Function29bfb: ; 29bfb ld hl, PartySpecies - ld b, $6 + ld b, PARTY_LENGTH .asm_29c00 ld a, [hli] cp $ff @@ -37352,7 +37360,7 @@ Function421f5: ; 421f5 call AddNTimes ld e, l ld d, h - ld bc, $0024 + ld bc, PartyMon1MaxHP - PartyMon1 add hl, bc ld a, [hli] ld b, a @@ -37451,7 +37459,7 @@ Function42414: ; 42414 cp "@" jr nz, .asm_4242b ld a, [CurPartyMon] - ld bc, $000b + ld bc, PKMN_NAME_LENGTH ld hl, PartyMonNicknames call AddNTimes push hl @@ -37460,7 +37468,7 @@ Function42414: ; 42414 call GetPokemonName ld hl, StringBuffer1 pop de - ld bc, $000b + ld bc, PKMN_NAME_LENGTH jp CopyBytes ; 42454 @@ -38138,7 +38146,7 @@ Function4424d: ; 4424d ld d, h ld e, l hlcoord 11, 9 - ld bc, ClearVRAM + ld bc, $0245 call PrintNum pop de @@ -38381,7 +38389,7 @@ Function44607: ; 44607 ld d, [hl] ld a, [CurPartyMon] ld hl, PartyMon1Item - ld bc, $30 + ld bc, PartyMon2 - PartyMon1 call AddNTimes ld [hl], d call CloseSRAM @@ -38421,6 +38429,7 @@ Function44654:: ; 44654 ld e, l pop hl pop bc + ld a, $20 ld [wd265], a .asm_44691 @@ -41739,7 +41748,14 @@ Function49856: ; 49856 ; 4985a Unknown_4985a: ; unreferenced -INCBIN "baserom.gbc",$4985a,$4989a - $4985a + db $ab, $03, $57, $24, $ac, $0e, $13, $32 + db $be, $30, $5b, $4c, $47, $60, $ed, $f2 + db $ab, $03, $55, $26, $aa, $0a, $13, $3a + db $be, $28, $33, $24, $6e, $71, $df, $b0 + db $a8, $00, $e5, $e0, $9a, $fc, $f4, $2c + db $fe, $4c, $a3, $5e, $c6, $3a, $ab, $4d + db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c + db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd Function4989a: ; 4989a call DelayFrame @@ -51469,7 +51485,20 @@ INCLUDE "data/base_stats.asm" PokemonNames:: INCLUDE "data/pokemon_names.asm" -INCBIN "baserom.gbc",$53d84,$53d9c - $53d84 +Unknown_53d84: ; unreferenced + db $1a, $15 + db $33, $16 + db $4b, $17 + db $62, $18 + db $79, $19 + db $90, $1a + db $a8, $1b + db $c4, $1c + db $e0, $1d + db $f6, $1e + db $ff, $1f + db $ff, $20 +; 53d9c UnknownEggPic:: ; 53d9c ; Another egg pic. This is shifted up a few pixels. @@ -56364,7 +56393,7 @@ MenuDataHeader_0x8810d: ; 0x8810d db 09, 06 ; start coords db 12, 19 ; end coords -INCBIN "baserom.gbc",$88112,$88116 - $88112 + db 0, 0, -1, 0 ; XXX Function88116: ; 88116 call Function1cfd @@ -70927,7 +70956,7 @@ Function90eb0: ; 90eb0 (24:4eb0) ld bc, $8 ld a, $4f call ByteFill - ld de, wd957 + ld de, wPokegearFlags ld a, [de] bit 0, a call nz, Function90ee4 @@ -71017,7 +71046,7 @@ Function90f3e: ; 90f3e (24:4f3e) and D_RIGHT ret z - ld a, [wd957] + ld a, [wPokegearFlags] bit 0, a jr z, .asm_90f5a ld c, $2 @@ -71025,7 +71054,7 @@ Function90f3e: ; 90f3e (24:4f3e) jr .asm_90f71 .asm_90f5a - ld a, [wd957] + ld a, [wPokegearFlags] bit 2, a jr z, .asm_90f67 ld c, $7 @@ -71033,7 +71062,7 @@ Function90f3e: ; 90f3e (24:4f3e) jr .asm_90f71 .asm_90f67 - ld a, [wd957] + ld a, [wPokegearFlags] bit 1, a ret z @@ -71136,7 +71165,7 @@ Function90ff2: ; 90ff2 (24:4ff2) ret .right - ld a, [wd957] + ld a, [wPokegearFlags] bit 2, a jr z, .asm_91015 ld c, $7 @@ -71144,7 +71173,7 @@ Function90ff2: ; 90ff2 (24:4ff2) jr .done .asm_91015 - ld a, [wd957] + ld a, [wPokegearFlags] bit 1, a ret z ld c, $b @@ -71329,7 +71358,7 @@ Function91112: ; 91112 (24:5112) ret .left - ld a, [wd957] + ld a, [wPokegearFlags] bit 2, a jr z, .asm_9113b ld c, $7 @@ -71337,7 +71366,7 @@ Function91112: ; 91112 (24:5112) jr .asm_9114c .asm_9113b - ld a, [wd957] + ld a, [wPokegearFlags] bit 0, a jr z, .asm_91148 ld c, $2 @@ -71388,7 +71417,7 @@ Function91171: ; 91171 (24:5171) ret .left - ld a, [wd957] + ld a, [wPokegearFlags] bit 0, a jr z, .asm_9119c ld c, $2 @@ -71400,7 +71429,7 @@ Function91171: ; 91171 (24:5171) jr .asm_911ac .right - ld a, [wd957] + ld a, [wPokegearFlags] bit 1, a ret z ld c, $b @@ -72003,7 +72032,7 @@ Function9164e: ; 9164e (24:564e) UpdateRadioStation: ; 9166f (24:566f) ld hl, wd958 ld d, [hl] - ld hl, Unknown_916ad + ld hl, RadioChannels .asm_91676 ld a, [hli] cp $ff @@ -72047,79 +72076,82 @@ Function916a1: ; 916a1 ret ; 916ad -Unknown_916ad: ; 916ad - dbw 16, Function916c9 - dbw 28, Function916d8 - dbw 32, Function916e0 - dbw 40, Function916e8 - dbw 52, Function916f0 - dbw 64, Function916fa - dbw 72, Function91709 - dbw 78, Function91718 - dbw 80, Function91727 + +RadioChannels: +; frequencies and the shows that play on them. +; frequency value given here = 4 × ingame_frequency − 2 + dbw 16, .PkmnTalkAndPokedexShow + dbw 28, .PokemonMusic + dbw 32, .LuckyChannel + dbw 40, .BuenasPassword + dbw 52, .RuinsOfAlphRadio + dbw 64, .PlacesAndPeople + dbw 72, .LetsAllSing + dbw 78, .PokeFluteRadio + dbw 80, .EvolutionRadio db $ff -; 916c9 -Function916c9: ; 916c9 - call Function91744 - jr nc, Function91740 +.PkmnTalkAndPokedexShow +; Pokédex Show in the morning +; Oak's Pokémon Talk in the afternoon and evening + call .InJohto + jr nc, .NoSignal ld a, [TimeOfDay] and a jp z, Function91766 jp Function91753 -Function916d8: ; 916d8 - call Function91744 - jr nc, Function91740 +.PokemonMusic + call .InJohto + jr nc, .NoSignal jp Function9177b -Function916e0: ; 916e0 - call Function91744 - jr nc, Function91740 +.LuckyChannel + call .InJohto + jr nc, .NoSignal jp Function91790 -Function916e8: ; 916e8 - call Function91744 - jr nc, Function91740 +.BuenasPassword + call .InJohto + jr nc, .NoSignal jp Function917a5 -Function916f0: ; 916f0 +.RuinsOfAlphRadio ld a, [wc6d8] cp RUINS_OF_ALPH - jr nz, Function91740 + jr nz, .NoSignal jp Function917d5 -Function916fa: ; 916fa - call Function91744 - jr c, Function91740 - ld a, [wd957] +.PlacesAndPeople + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] bit 3, a - jr z, Function91740 + jr z, .NoSignal jp Function917ea -Function91709: ; 91709 - call Function91744 - jr c, Function91740 - ld a, [wd957] +.LetsAllSing + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] bit 3, a - jr z, Function91740 + jr z, .NoSignal jp Function917ff -Function91718: ; 91718 - call Function91744 - jr c, Function91740 - ld a, [wd957] +.PokeFluteRadio + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] bit 3, a - jr z, Function91740 + jr z, .NoSignal jp Function91829 -Function91727: ; 91727 -; This station airs in the Lake of Rage -; area when Rocket are still in Mahogany. +.EvolutionRadio +; This station airs in the Lake of Rage area when Rocket are still in Mahogany. ld a, [StatusFlags] bit 4, a - jr z, Function91740 + jr z, .NoSignal ld a, [wc6d8] cp MAHOGANY_TOWN @@ -72127,15 +72159,17 @@ Function91727: ; 91727 cp ROUTE_43 jr z, .ok cp LAKE_OF_RAGE - jr nz, Function91740 + jr nz, .NoSignal .ok jp Function9183e -Function91740: ; 91740 +.NoSignal call NoRadioStation ret -Function91744: ; 91744 (24:5744) +.InJohto +; if in Johto or on the S.S. Aqua, set carry +; otherwise clear carry ld a, [wc6d8] cp FAST_SHIP jr z, .johto @@ -77615,12 +77649,12 @@ Functionb8b8f: ; b8b8f (2e:4b8f) Functionb8b90: ; b8b90 (2e:4b90) call Function1052 call PrintText - ld de, $51 + ld de, MUSIC_POKEMON_MARCH call GetWeekday and 1 - jr z, .asm_b8ba3 - ld de, $50 -.asm_b8ba3 + jr z, .done + ld de, MUSIC_POKEMON_LULLABY +.done callab Function91854 ret ; b8baa (2e:4baa) @@ -78722,7 +78756,7 @@ Functionb91eb: ; b91eb (2e:51eb) ret nz call Function1052 call PrintText - ld hl, Unknown_b920b + ld hl, RadioChannelSongs ld a, [wd002] ld c, a ld b, 0 @@ -78735,7 +78769,7 @@ Functionb91eb: ; b91eb (2e:51eb) ret ; b920b (2e:520b) -Unknown_b920b: ; b920b +RadioChannelSongs: ; b920b dw MUSIC_POKEMON_TALK dw MUSIC_POKEMON_CENTER dw MUSIC_TITLE @@ -82026,7 +82060,11 @@ Functione124e: ; e124e ; e126d Unknown_e126d: ; e126d -INCBIN "baserom.gbc",$e126d,$e127d - $e126d + db $00, $01, $02, $03 + db $04, $05, $06, $0b + db $0c, $11, $12, $17 + db $18, $1d, $1e, $23 +; e127d Functione127d: ; e127d call Functione128d @@ -82392,7 +82430,12 @@ Functione1481: ; e1481 ; e148f Unknown_e148f: ; e148f -INCBIN "baserom.gbc", $e148f, $e14a0 - $e148f + db $e0 + db $00, $03, $06, $09 + db $24, $27, $2a, $2d + db $48, $4b, $4e, $51 + db $6c, $6f, $72, $75 +; e14a0 Functione14a0: ; e14a0 ld hl, Unknown_e14b5 @@ -82415,7 +82458,13 @@ Functione14a0: ; e14a0 ; e14b5 Unknown_e14b5: ; e14b5 -INCBIN "baserom.gbc", $e14b5, $e14d9 - $e14b5 + db $00, $00, $00, $00, $00, $00 + db $00, $01, $02, $03, $04, $00 + db $00, $05, $06, $07, $08, $00 + db $00, $09, $0a, $0b, $0c, $00 + db $00, $0d, $0e, $0f, $10, $00 + db $00, $00, $00, $00, $00, $00 +; e14d9 Functione14d9: ; e14d9 call Functione1481 @@ -82459,13 +82508,73 @@ Functione14d9: ; e14d9 ; e150f Unknown_e150f: ; e150f -INCBIN "baserom.gbc",$e150f,$e1534 - $e150f + db $f4, $f4, $00, $00 + db $f4, $fc, $01, $00 + db $f4, $04, $02, $00 + db $fc, $f4, $0c, $00 + db $fc, $fc, $0d, $00 + db $fc, $04, $0e, $00 + db $04, $f4, $18, $00 + db $04, $fc, $19, $00 + db $04, $04, $1a, $00 + db $ff Unknown_e1534: ; e1534 -INCBIN "baserom.gbc",$e1534,$e1559 - $e1534 + db $f4, $f4, $00, $00 + db $f4, $fc, $01, $00 + db $f4, $04, $00, $20 + db $fc, $f4, $02, $00 + db $fc, $fc, $03, $00 + db $fc, $04, $02, $20 + db $04, $f4, $00, $40 + db $04, $fc, $01, $40 + db $04, $04, $00, $60 + db $ff Unknown_e1559: ; e1559 -INCBIN "baserom.gbc",$e1559,$e1631 - $e1559 + +macro_e1559: macro + db \1, \2 + dwcoord \3, \4 + db \5, \6 +endm + + macro_e1559 $1c, $1c, 1, 0, $ee, $00 + macro_e1559 $34, $1c, 4, 0, $ee, $00 + macro_e1559 $4c, $1c, 7, 0, $ee, $00 + macro_e1559 $64, $1c, 10, 0, $ee, $00 + macro_e1559 $7c, $1c, 13, 0, $ee, $00 + macro_e1559 $94, $1c, 16, 0, $ee, $00 + macro_e1559 $1c, $34, 1, 3, $ee, $00 + macro_e1559 $34, $34, 4, 3, $ef, $00 + macro_e1559 $4c, $34, 7, 3, $ef, $00 + macro_e1559 $64, $34, 10, 3, $ef, $00 + macro_e1559 $7c, $34, 13, 3, $ef, $00 + macro_e1559 $94, $34, 16, 3, $ee, $00 + macro_e1559 $1c, $4c, 1, 6, $ee, $00 + macro_e1559 $34, $4c, 4, 6, $ef, $00 + macro_e1559 $4c, $4c, 7, 6, $ef, $00 + macro_e1559 $64, $4c, 10, 6, $ef, $00 + macro_e1559 $7c, $4c, 13, 6, $ef, $00 + macro_e1559 $94, $4c, 16, 6, $ee, $00 + macro_e1559 $1c, $64, 1, 9, $ee, $00 + macro_e1559 $34, $64, 4, 9, $ef, $00 + macro_e1559 $4c, $64, 7, 9, $ef, $00 + macro_e1559 $64, $64, 10, 9, $ef, $00 + macro_e1559 $7c, $64, 13, 9, $ef, $00 + macro_e1559 $94, $64, 16, 9, $ee, $00 + macro_e1559 $1c, $7c, 1, 12, $ee, $00 + macro_e1559 $34, $7c, 4, 12, $ef, $00 + macro_e1559 $4c, $7c, 7, 12, $ef, $00 + macro_e1559 $64, $7c, 10, 12, $ef, $00 + macro_e1559 $7c, $7c, 13, 12, $ef, $00 + macro_e1559 $94, $7c, 16, 12, $ee, $00 + macro_e1559 $1c, $94, 1, 15, $ee, $00 + macro_e1559 $34, $94, 4, 15, $ee, $00 + macro_e1559 $4c, $94, 7, 15, $ee, $00 + macro_e1559 $64, $94, 10, 15, $ee, $00 + macro_e1559 $7c, $94, 13, 15, $ee, $00 + macro_e1559 $94, $94, 16, 15, $ee, $00 Functione1631: ; e1631 ld hl, VTiles2 @@ -85880,7 +85989,7 @@ Functione36f9: ; e36f9 (38:76f9) ret ; e3778 (38:7778) -INCBIN "baserom.gbc",$e3778,$e377b - $e3778 + hlcoord 11, 7 ; XXX MenuDataHeader_0xe377b: ; 0xe377b db $40 ; flags @@ -91294,7 +91403,7 @@ Unknown_fd15e: ; fd15e db $01, $86, $a0, $00, $59, $10, $02, $1a ; SNORLAX_DOLL ; fd1ae -INCBIN "baserom.gbc", $fd1ae, $fd1b1 - $fd1ae + db 0, 0, 0 ; XXX UnknownText_0xfd1b1: ; 0xfd1b1 ; Hi, ! How are you? @@ -91332,13 +91441,13 @@ UnknownText_0xfd1ca: ; 0xfd1ca db "@" ; 0xfd1cf -INCBIN "baserom.gbc", $fd1cf, $fd1d0 - $fd1cf + db 0 ; XXX Functionfd1d0: ; fd1d0 ret ; fd1d1 -INCBIN "baserom.gbc", $fd1d1, $fd1d2 - $fd1d1 + ret ; XXX INCLUDE "misc/mobile_40.asm" @@ -93010,8 +93119,7 @@ Function104da9: ; 104da9 (41:4da9) ret z xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt ld a, [$ff00+c] bit 1, a jr z, Function104da9 @@ -93023,8 +93131,7 @@ Function104db7: ; 104db7 (41:4db7) ret z xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt ld a, [$ff00+c] bit 1, a jr nz, Function104db7 @@ -93039,8 +93146,7 @@ Function104dc5: ; 104dc5 (41:4dc5) ret z xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt jr .asm_104dc8 Function104dd1: ; 104dd1 (41:4dd1) @@ -93051,8 +93157,7 @@ Function104dd1: ; 104dd1 (41:4dd1) ret z xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt jr .asm_104dd4 Function104ddd: ; 104ddd (41:4ddd) @@ -93219,8 +93324,7 @@ Function104ed6: ; 104ed6 (41:4ed6) .asm_104f02 xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt ld a, $c1 ld [rRP], a ; $ff00+$56 ld d, $1 @@ -93239,8 +93343,7 @@ Function104ed6: ; 104ed6 (41:4ed6) jr z, .asm_104f25 xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt .asm_104f25 ld a, [$ffb6] dec a @@ -93252,8 +93355,7 @@ Function104ed6: ; 104ed6 (41:4ed6) ld [rTMA], a ; $ff00+$6 xor a ld [rIF], a ; $ff00+$f - db $76 ;halt (prevents rgbasm from putting in an extra nop) - nop + halt ld d, $5 call Function104dc5 ld d, $11 @@ -94046,7 +94148,22 @@ Function1058e9: ; 1058e9 (41:58e9) ; 1058f0 (41:58f0) OAM_1058f0: ; 1058f0 -INCBIN "baserom.gbc",$1058f0,$105930 - $1058f0 + db $11, $34, $00, $00 + db $11, $3c, $01, $00 + db $11, $44, $02, $00 + db $11, $4c, $03, $00 + db $19, $34, $04, $00 + db $19, $3c, $05, $00 + db $19, $44, $06, $00 + db $19, $4c, $07, $00 + db $01, $5c, $00, $00 + db $01, $64, $01, $00 + db $01, $6c, $02, $00 + db $01, $74, $03, $00 + db $09, $5c, $04, $00 + db $09, $64, $05, $00 + db $09, $6c, $06, $00 + db $09, $74, $07, $00 ; japanese mystery gift gfx MysteryGiftJP_GFX: ; 105930 @@ -96413,12 +96530,12 @@ INCLUDE "text/battle_tower.asm" SECTION "bank7C", ROMX, BANK[$7C] -INCBIN "baserom.gbc",$1f0000,$1f09d8 - $1f0000 +INCBIN "unknown/1f0000.bin" SECTION "bank7D", ROMX, BANK[$7D] -INCBIN "baserom.gbc",$1f4000,$1f4003 - $1f4000 + db $cc, $6b, $1e ; XXX Function1f4003: ; 1f4003 ld a, $6 @@ -96432,7 +96549,7 @@ Function1f4003: ; 1f4003 ; 1f4018 Unknown_1f4018: -INCBIN "baserom.gbc", $1f4018, $1f4dbe - $1f4018 +INCBIN "unknown/1f4018.bin" Function1f4dbe: ; 1f4dbe ld a, $6 @@ -96446,7 +96563,7 @@ Function1f4dbe: ; 1f4dbe ; 1f4dd3 Unknown_1f4dd3: -INCBIN "baserom.gbc", $1f4dd3, $1f5d9f - $1f4dd3 +INCBIN "unknown/1f4dd3.bin" Function1f5d9f: ; 1f5d9f ld a, $6 @@ -96460,7 +96577,7 @@ Function1f5d9f: ; 1f5d9f ; 1f5db4 Unknown_1f5db4: -INCBIN "baserom.gbc", $1f5db4, $1f636a - $1f5db4 +INCBIN "unknown/1f5db4.bin" SECTION "bank7E", ROMX, BANK[$7E] diff --git a/misc/mobile_40.asm b/misc/mobile_40.asm index 12cbd326c..ede68c544 100644 --- a/misc/mobile_40.asm +++ b/misc/mobile_40.asm @@ -1980,8 +1980,7 @@ Function100c98: ; 100c98 ; 100cad Unknown_100cad: ; 100cad -INCBIN "baserom.gbc",$100cad,$100cb5 - $100cad - + db $0a, $01, $ff, $01, $a0, $00, $20, $c3 Function100cb5: ; 100cb5 call Function100dd8 @@ -6305,7 +6304,7 @@ String_102a26: ; 102a26 ; 102a33 Unknown_102a33: -INCBIN "baserom.gbc", $102a33, $102a3b - $102a33 + db $08, $0b, $02, $01, $80, $00, $20, $01 Function102a3b: ; 102a3b ld a, [wcd30] @@ -6455,7 +6454,7 @@ Function102b68: ; 102b68 ; unreferenced ; 102b73 Unknown_102b73: -INCBIN "baserom.gbc", $102b73, $102b7b - $102b73 + db $09, $06, $ff, $01, $a0, $00, $10, $c1 Function102b7b: ; 102b7b xor a @@ -6472,7 +6471,7 @@ Function102b7b: ; 102b7b ; 102b94 Unknown_102b94: -INCBIN "baserom.gbc", $102b94, $102b9c - $102b94 + db $01, $06, $ff, $01, $a0, $00, $10, $c1 Function102b9c: ; 102b9c ld a, [wcd4d] diff --git a/misc/mobile_42.asm b/misc/mobile_42.asm index 310ceb622..761eb90c2 100644 --- a/misc/mobile_42.asm +++ b/misc/mobile_42.asm @@ -9,7 +9,7 @@ Function108000: ; 108000 ; 10800b Unknown_10800b: -INCBIN "baserom.gbc", $10800b, $108012 - $10800b + db $0d, $12, $10, $03, $06, $0f, $0c Function108012: ld a, $80 @@ -24,7 +24,7 @@ asm_108018: ; 108021 Unknown_108021: -INCBIN "baserom.gbc", $108021, $108026 - $108021 + db $11, $07, $08, $0e, $0c Function108026: ; 108026 ld a, $0 @@ -40,7 +40,7 @@ asm_10802c: ; 108035 Unknown_108035: -INCBIN "baserom.gbc", $108035, $10803d - $108035 + db $01, $12, $02, $03, $05, $08, $0b, $0c Function10803d: ; 10803d ld a, $0 @@ -50,7 +50,7 @@ Function10803d: ; 10803d ; 108048 Unknown_108048: -INCBIN "baserom.gbc", $108048, $10804d - $108048 + db $11, $07, $08, $13, $0c Function10804d: ; 10804d ld a, $0 @@ -60,7 +60,7 @@ Function10804d: ; 10804d ; 108058 Unknown_108058: -INCBIN "baserom.gbc", $108058, $10805b - $108058 + db $11, $0e, $0c Function10805b: ; 10805b ld hl, wc734 diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm index 8cecaf721..f03209ca3 100644 --- a/misc/mobile_45.asm +++ b/misc/mobile_45.asm @@ -5648,17 +5648,22 @@ Jumptable_1161c7: ; 1161c7 Function1161d5: ; 1161d5 ld a, [rSVBK] push af + ld a, $6 ld [rSVBK], a + ld hl, Unknown_117356 ld de, w6_d000 ld bc, $0300 call CopyBytes + di + .asm_1161e9 ld a, [rLY] cp $91 jr nz, .asm_1161e9 + ld a, $d0 ld [rHDMA1], a ld a, $0 @@ -5669,6 +5674,7 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + ld a, $d0 ld [rHDMA1], a ld a, $80 @@ -5679,6 +5685,7 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + ld a, $d1 ld [rHDMA1], a ld a, $0 @@ -5689,8 +5696,10 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + ld a, $1 ld [rVBK], a + ld a, $d1 ld [rHDMA1], a ld a, $80 @@ -5701,6 +5710,7 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + ld a, $d2 ld [rHDMA1], a ld a, $0 @@ -5711,6 +5721,7 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + ld a, $d2 ld [rHDMA1], a ld a, $80 @@ -5721,11 +5732,15 @@ Function1161d5: ; 1161d5 ld [rHDMA4], a ld a, $8 ld [rHDMA5], a + xor a ld [rVBK], a + ei + pop af ld [rSVBK], a + callba Function104061 ld a, $8 ld [MusicFade], a @@ -7571,7 +7586,56 @@ Palette_11734e: RGB 15, 14, 14 Unknown_117356: -INCBIN "baserom.gbc", $117356, $117656 - $117356 + db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9 + db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c5, $c6, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c6, $c5, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $d8, $c2, $c2, $d8, $c2, $c2, $c2 + db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c7, $c8, $ca, $cb, $cc, $cd, $ce, $c2, $cf, $d0, $d1, $d2, $d3, $c2, $d4, $d5 + db $d6, $d7, $c8, $c7, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9 + db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 + + db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f + db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $8f, $0f, $0f, $8f, $0f, $0f, $0f + db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f + db $8f, $8f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 + db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f + db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 +; 117656 SECTION "Mobile Stadium", ROMX, BANK[$45] @@ -15347,14 +15411,16 @@ Function11b31b: ; 11b31b ; 11b350 Unknown_11b350: -INCBIN "baserom.gbc",$11b350,$11b36d - $11b350 + db $1a, $5e, $1a, $66, $1a, $6e, $1a, $76, $1a, $7e, $1a, $86, $1a, $8e + db $22, $5e, $22, $66, $22, $6e, $22, $76, $22, $7e, $22, $86, $22, $8e + db $ff Unknown_11b36d: -INCBIN "baserom.gbc",$11b36d,$11b37b - $11b36d + db $30, $31, $31, $31, $31, $31, $32, $40, $41, $41, $41, $41, $41, $42 Unknown_11b37b: -INCBIN "baserom.gbc",$11b37b,$11b389 - $11b37b + db $30, $31, $31, $39, $39, $39, $39, $40, $41, $41, $39, $39, $39, $39 Unknown_11b389: -INCBIN "baserom.gbc",$11b389,$11b397 - $11b389 + db $39, $39, $39, $39, $39, $39, $39, $39, $39, $39, $39, $39, $39, $39 Function11b397: ; 11b397 ld de, Sprites @@ -16320,10 +16386,85 @@ Function11ba38: ; 11ba38 ; 11ba44 Unknown_11ba44: -INCBIN "baserom.gbc",$11ba44,$11bb7d - $11ba44 + db $47, $30, $0a, $0a, $0a, $0a, $0a, $56 + db $46, $2f, $0a, $0a, $0a, $0a, $0a, $55 + db $45, $3d, $0a, $0a, $0a, $0a, $0a, $54 + db $44, $30, $0a, $0a, $0a, $0a, $0a, $53 + db $43, $2f, $0a, $0a, $0a, $0a, $0a, $52 + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $51 + db $4a, $30, $0a, $0a, $0a, $0a, $0a, $50 + db $4a, $2f, $0a, $0a, $0a, $0a, $0a, $4f + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $4e + db $4a, $30, $0a, $0a, $0a, $0a, $4d, $42 + db $4a, $2f, $0a, $0a, $0a, $0a, $6b, $58 + db $4a, $3d, $0a, $0a, $0a, $0a, $6a, $58 + db $4a, $30, $0a, $0a, $0a, $0a, $69, $58 + db $4a, $2f, $0a, $0a, $0a, $0a, $68, $58 + db $4a, $3d, $0a, $0a, $0a, $66, $67, $58 + db $4a, $30, $0a, $0a, $0a, $65, $0a, $58 + db $4a, $2f, $0a, $0a, $0a, $64, $0a, $58 + db $4a, $3d, $0a, $0a, $0a, $63, $0a, $58 + db $4a, $30, $0a, $0a, $61, $62, $0a, $58 + db $4a, $2f, $0a, $0a, $5f, $60, $0a, $58 + db $4a, $3d, $0a, $61, $62, $0a, $0a, $58 + db $4a, $30, $0a, $63, $0a, $0a, $0a, $58 + db $4a, $2f, $69, $0a, $0a, $0a, $0a, $58 + db $4a, $3d, $81, $0a, $0a, $0a, $0a, $58 + db $4a, $30, $80, $0a, $0a, $0a, $0a, $58 + db $4a, $2f, $7f, $0a, $0a, $0a, $0a, $58 + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $58 + db $4a, $30, $0a, $0a, $0a, $0a, $0a, $58 + db $4a, $2f, $68, $87, $88, $89, $0a, $58 + db $4a, $3d, $6e, $6f, $70, $75, $76, $58 + db $4a, $30, $75, $76, $5c, $5d, $5e, $58 + db $4a, $2f, $71, $72, $73, $74, $6d, $58 + db $4a, $3d, $75, $76, $77, $8a, $8b, $58 + db $4a, $30, $66, $67, $65, $0a, $6a, $58 + db $4a, $2f, $83, $84, $0a, $83, $84, $58 + db $4a, $3d, $0a, $85, $82, $84, $0a, $58 + db $4a, $30, $41, $80, $40, $0a, $0a, $58 + db $4a, $2f, $83, $0a, $0a, $0a, $0a, $58 + db $4a, $3d, $40, $0a, $0a, $0a, $0a, $58 + db $ff Unknown_11bb7d: -INCBIN "baserom.gbc",$11bb7d,$11bc9e - $11bb7d + db $0a, $0a, $0a, $0a, $0a, $0a, $16, $00 + db $78, $0a, $0a, $0a, $0a, $0a, $8c, $00 + db $79, $0a, $0a, $0a, $0a, $0a, $8d, $00 + db $7a, $0a, $0a, $0a, $0a, $0a, $8e, $00 + db $7b, $0a, $0a, $0a, $0a, $0a, $8c, $00 + db $7c, $0a, $0a, $0a, $0a, $0a, $8d, $00 + db $7d, $0a, $0a, $0a, $0a, $0a, $8e, $00 + db $2e, $7e, $0a, $0a, $0a, $0a, $8c, $00 + db $2e, $80, $0a, $0a, $0a, $0a, $8d, $00 + db $2e, $81, $0a, $0a, $0a, $0a, $8e, $00 + db $2e, $82, $0a, $0a, $0a, $0a, $8c, $00 + db $2e, $69, $0a, $0a, $0a, $0a, $8d, $00 + db $2e, $6a, $0a, $0a, $0a, $0a, $8e, $00 + db $2e, $6b, $0a, $0a, $0a, $0a, $8c, $00 + db $2e, $0a, $68, $0a, $0a, $0a, $8d, $00 + db $2e, $0a, $69, $0a, $0a, $0a, $8e, $00 + db $2e, $0a, $0a, $6a, $0a, $0a, $8c, $00 + db $2e, $0a, $0a, $6b, $0a, $0a, $8d, $00 + db $2e, $0a, $0a, $0a, $80, $0a, $8e, $00 + db $2e, $0a, $0a, $0a, $82, $0a, $8c, $00 + db $2e, $0a, $0a, $0a, $6c, $0a, $8d, $00 + db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 + db $2e, $0a, $6b, $0a, $0a, $0a, $8c, $00 + db $2e, $0a, $0a, $69, $0a, $0a, $8d, $00 + db $2e, $0a, $0a, $6a, $0a, $0a, $8e, $00 + db $2e, $0a, $0a, $0a, $68, $0a, $8c, $00 + db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 + db $2e, $0a, $0a, $61, $62, $0a, $8e, $00 + db $2e, $0a, $0a, $0a, $5f, $60, $8c, $00 + db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 + db $2e, $0a, $0a, $0a, $0a, $69, $8c, $00 + db $2e, $0a, $0a, $0a, $0a, $6b, $8d, $00 + db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 + db $2e, $0a, $0a, $0a, $0a, $86, $8c, $00 + db $2e, $0a, $85, $0a, $0a, $0a, $8d, $00 + db $2e, $0a, $0a, $84, $0a, $0a, $8e, $00 + db $ff SECTION "bank47", ROMX, BANK[$47] @@ -19015,19 +19156,133 @@ Function11d1fc: ; 11d1fc (47:51fc) ; 11d208 (47:5208) Unknown_11d208: ; 11d208 -INCBIN "baserom.gbc",$11d208,$11d21a - $11d208 + db $0d, $1a + db $3d, $1a + db $6d, $1a + db $0d, $2a + db $3d, $2a + db $6d, $2a + db $0d, $8a + db $3d, $8a + db $6d, $8a + Unknown_11d21a: ; 11d21a -INCBIN "baserom.gbc",$11d21a,$11d23e - $11d21a + db $0d, $42 + db $3d, $42 + db $6d, $42 + db $0d, $52 + db $3d, $52 + db $6d, $52 + db $0d, $62 + db $3d, $62 + db $6d, $62 + db $0d, $72 + db $3d, $72 + db $6d, $72 + db $0d, $82 + db $3d, $82 + db $6d, $82 + db $0d, $92 + db $3d, $92 + db $6d, $92 + Unknown_11d23e: ; 11d23e -INCBIN "baserom.gbc",$11d23e,$11d29e - $11d23e + db $10, $48 + db $18, $48 + db $20, $48 + db $28, $48 + db $30, $48 + db $10, $58 + db $18, $58 + db $20, $58 + db $28, $58 + db $30, $58 + db $10, $68 + db $18, $68 + db $20, $68 + db $28, $68 + db $30, $68 + db $10, $78 + db $18, $78 + db $20, $78 + db $28, $78 + db $30, $78 + db $40, $48 + db $48, $48 + db $50, $48 + db $58, $48 + db $60, $48 + db $40, $58 + db $48, $58 + db $50, $58 + db $58, $58 + db $60, $58 + db $40, $68 + db $48, $68 + db $50, $68 + db $58, $68 + db $60, $68 + db $70, $48 + db $80, $48 + db $90, $48 + db $40, $78 + db $48, $78 + db $50, $78 + db $58, $78 + db $60, $78 + db $70, $58 + db $70, $68 + db $0d, $92 + db $3d, $92 + db $6d, $92 + Unknown_11d29e: ; 11d29e -INCBIN "baserom.gbc",$11d29e,$11d2b6 - $11d29e + db $10, $50 + db $40, $50 + db $70, $50 + db $10, $60 + db $40, $60 + db $70, $60 + db $10, $70 + db $40, $70 + db $70, $70 + db $10, $80 + db $40, $80 + db $70, $80 + Unknown_11d2b6: ; 11d2b6 -INCBIN "baserom.gbc",$11d2b6,$11d2ba - $11d2b6 + db $80, $50 + db $80, $60 + Unknown_11d2ba: ; 11d2ba -INCBIN "baserom.gbc",$11d2ba,$11d2be - $11d2ba + db $20, $50 + db $20, $60 + Unknown_11d2be: ; 11d2be -INCBIN "baserom.gbc",$11d2be,$11d2ee - $11d2be + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $28, $28 + db $29, $26 + db $26, $26 Function11d2ee: ; 11d2ee (47:52ee) ld hl, wcd24 @@ -20288,20 +20543,701 @@ Unknown_11f100: ; 11f100 ; 11f220 Unknown_11f220: -INCBIN "baserom.gbc",$11f220,$11f23c - $11f220 + db $12, $01, $24, $02 + db $45, $05, $45, $05 + db $42, $05, $42, $05 + db $45, $05, $42, $05 + db $27, $03, $27, $03 + db $45, $05, $27, $03 + db $42, $05, $24, $02 Unknown_11f23c: -INCBIN "baserom.gbc",$11f23c,$11f2f0 - $11f23c + db $12, $00, $2f, $00 + db $70, $00, $1e, $00 + db $ac, $00, $11, $00 + db $ce, $00, $09, $00 + db $e0, $00, $2e, $00 + db $3c, $01, $24, $00 + db $84, $01, $1b, $00 + db $ba, $01, $09, $00 + db $cc, $01, $07, $00 + db $da, $01, $1c, $00 + db $12, $02, $12, $00 + db $36, $02, $2b, $00 + db $8c, $02, $10, $00 + db $ac, $02, $08, $00 + db $bc, $02, $0c, $00 + db $d4, $02, $2c, $00 + db $2c, $03, $09, $00 + db $3e, $03, $12, $00 + db $62, $03, $1b, $00 + db $98, $03, $1a, $00 + db $cc, $03, $1c, $00 + db $04, $04, $05, $00 + db $0e, $04, $02, $00 + db $12, $04, $05, $00 + db $1c, $04, $07, $00 + db $2a, $04, $16, $00 + db $56, $04, $0e, $00 + db $72, $04, $0c, $00 + db $8a, $04, $05, $00 + db $94, $04, $16, $00 + db $c0, $04, $19, $00 + db $f2, $04, $0e, $00 + db $0e, $05, $08, $00 + db $1e, $05, $07, $00 + db $2c, $05, $09, $00 + db $3e, $05, $0d, $00 + db $58, $05, $04, $00 + db $60, $05, $14, $00 + db $88, $05, $0b, $00 + db $9e, $05, $01, $00 + db $a0, $05, $02, $00 + db $a4, $05, $02, $00 + db $a8, $05, $02, $00 + db $ac, $05, $15, $00 + db $00, $00, $09, $00 Unknown_11f2f0: -INCBIN "baserom.gbc",$11f2f0,$11f332 - $11f2f0 + db $00, $01, $01, $00, $00, $01 + db $00, $01, $00, $00, $01, $00 + db $00, $01, $00, $00, $00, $01 + db $00, $00, $01, $00, $00, $00 + db $01, $01, $00, $01, $01, $00 + db $00, $00, $01, $01, $01, $00 + db $00, $00, $01, $00, $00, $00 + db $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $01, $00 + db $01, $00, $01, $00, $00, $01 + db $01, $01, $00, $00, $00, $01 + Unknown_11f332: -INCBIN "baserom.gbc",$11f332,$11f3ce - $11f332 + dw Unknown_11f338 + dw Unknown_11f36a + dw Unknown_11f39c + +Unknown_11f338: ; 11f338 + dw UnknownText_0x11f42e + dw UnknownText_0x11f43d + dw UnknownText_0x11f44c + dw UnknownText_0x11f45b + dw UnknownText_0x11f46a + dw UnknownText_0x11f479 + dw UnknownText_0x11f488 + dw UnknownText_0x11f497 + dw UnknownText_0x11f4a6 + dw UnknownText_0x11f4b5 + dw UnknownText_0x11f4c4 + dw UnknownText_0x11f4d3 + dw UnknownText_0x11f4e2 + dw UnknownText_0x11f4f1 + dw UnknownText_0x11f500 + dw UnknownText_0x11f50f + dw UnknownText_0x11f51e + dw UnknownText_0x11f52d + dw UnknownText_0x11f53c + dw UnknownText_0x11f54b + dw UnknownText_0x11f55a + dw UnknownText_0x11f569 + dw UnknownText_0x11f578 + dw UnknownText_0x11f587 + dw UnknownText_0x11f596 + +Unknown_11f36a: ; 11f36a + dw UnknownText_0x11f433 + dw UnknownText_0x11f442 + dw UnknownText_0x11f451 + dw UnknownText_0x11f460 + dw UnknownText_0x11f46f + dw UnknownText_0x11f47e + dw UnknownText_0x11f48d + dw UnknownText_0x11f49c + dw UnknownText_0x11f4ab + dw UnknownText_0x11f4ba + dw UnknownText_0x11f4c9 + dw UnknownText_0x11f4d8 + dw UnknownText_0x11f4e7 + dw UnknownText_0x11f4f6 + dw UnknownText_0x11f505 + dw UnknownText_0x11f514 + dw UnknownText_0x11f523 + dw UnknownText_0x11f532 + dw UnknownText_0x11f541 + dw UnknownText_0x11f550 + dw UnknownText_0x11f55f + dw UnknownText_0x11f56e + dw UnknownText_0x11f57d + dw UnknownText_0x11f58c + dw UnknownText_0x11f59b + +Unknown_11f39c: ; 11f39c + dw UnknownText_0x11f438 + dw UnknownText_0x11f447 + dw UnknownText_0x11f456 + dw UnknownText_0x11f465 + dw UnknownText_0x11f474 + dw UnknownText_0x11f483 + dw UnknownText_0x11f492 + dw UnknownText_0x11f4a1 + dw UnknownText_0x11f4b0 + dw UnknownText_0x11f4bf + dw UnknownText_0x11f4ce + dw UnknownText_0x11f4dd + dw UnknownText_0x11f4ec + dw UnknownText_0x11f4fb + dw UnknownText_0x11f50a + dw UnknownText_0x11f519 + dw UnknownText_0x11f528 + dw UnknownText_0x11f537 + dw UnknownText_0x11f546 + dw UnknownText_0x11f555 + dw UnknownText_0x11f564 + dw UnknownText_0x11f573 + dw UnknownText_0x11f582 + dw UnknownText_0x11f591 + dw UnknownText_0x11f5a0 + Unknown_11f3ce: -INCBIN "baserom.gbc",$11f3ce,$11f686 - $11f3ce + dw Unknown_11f3d4 + dw Unknown_11f3f2 + dw Unknown_11f410 + +Unknown_11f3d4: ; 11f3d4 + dw UnknownText_0x11f5a5 + dw UnknownText_0x11f5b4 + dw UnknownText_0x11f5c3 + dw UnknownText_0x11f5d2 + dw UnknownText_0x11f5e1 + dw UnknownText_0x11f5f0 + dw UnknownText_0x11f5ff + dw UnknownText_0x11f60e + dw UnknownText_0x11f61d + dw UnknownText_0x11f62c + dw UnknownText_0x11f63b + dw UnknownText_0x11f64a + dw UnknownText_0x11f659 + dw UnknownText_0x11f668 + dw UnknownText_0x11f677 + +Unknown_11f3f2: ; 11f3f2 + dw UnknownText_0x11f5aa + dw UnknownText_0x11f5b9 + dw UnknownText_0x11f5c8 + dw UnknownText_0x11f5d7 + dw UnknownText_0x11f5e6 + dw UnknownText_0x11f5f5 + dw UnknownText_0x11f604 + dw UnknownText_0x11f613 + dw UnknownText_0x11f622 + dw UnknownText_0x11f631 + dw UnknownText_0x11f640 + dw UnknownText_0x11f64f + dw UnknownText_0x11f65e + dw UnknownText_0x11f66d + dw UnknownText_0x11f67c + +Unknown_11f410: ; 11f410 + dw UnknownText_0x11f5af + dw UnknownText_0x11f5be + dw UnknownText_0x11f5cd + dw UnknownText_0x11f5dc + dw UnknownText_0x11f5eb + dw UnknownText_0x11f5fa + dw UnknownText_0x11f609 + dw UnknownText_0x11f618 + dw UnknownText_0x11f627 + dw UnknownText_0x11f636 + dw UnknownText_0x11f645 + dw UnknownText_0x11f654 + dw UnknownText_0x11f663 + dw UnknownText_0x11f672 + dw UnknownText_0x11f681 + + +UnknownText_0x11f42e: ; 0x11f42e + text_jump UnknownText_0x1ec000 + db "@" + +UnknownText_0x11f433: ; 0x11f433 + text_jump UnknownText_0x1ec03b + db "@" + +UnknownText_0x11f438: ; 0x11f438 + text_jump UnknownText_0x1ec060 + db "@" + +UnknownText_0x11f43d: ; 0x11f43d + text_jump UnknownText_0x1ec080 + db "@" + +UnknownText_0x11f442: ; 0x11f442 + text_jump UnknownText_0x1ec0a3 + db "@" + +UnknownText_0x11f447: ; 0x11f447 + text_jump UnknownText_0x1ec0c4 + db "@" + +UnknownText_0x11f44c: ; 0x11f44c + text_jump UnknownText_0x1ec0e1 + db "@" + +UnknownText_0x11f451: ; 0x11f451 + text_jump UnknownText_0x1ec108 + db "@" + +UnknownText_0x11f456: ; 0x11f456 + text_jump UnknownText_0x1ec12a + db "@" + +UnknownText_0x11f45b: ; 0x11f45b + text_jump UnknownText_0x1ec14d + db "@" + +UnknownText_0x11f460: ; 0x11f460 + text_jump UnknownText_0x1ec16f + db "@" + +UnknownText_0x11f465: ; 0x11f465 + text_jump UnknownText_0x1ec190 + db "@" + +UnknownText_0x11f46a: ; 0x11f46a + text_jump UnknownText_0x1ec1ae + db "@" + +UnknownText_0x11f46f: ; 0x11f46f + text_jump UnknownText_0x1ec1d0 + db "@" + +UnknownText_0x11f474: ; 0x11f474 + text_jump UnknownText_0x1ec1f4 + db "@" + +UnknownText_0x11f479: ; 0x11f479 + text_jump UnknownText_0x1ec216 + db "@" + +UnknownText_0x11f47e: ; 0x11f47e + text_jump UnknownText_0x1ec238 + db "@" + +UnknownText_0x11f483: ; 0x11f483 + text_jump UnknownText_0x1ec259 + db "@" + +UnknownText_0x11f488: ; 0x11f488 + text_jump UnknownText_0x1ec27b + db "@" + +UnknownText_0x11f48d: ; 0x11f48d + text_jump UnknownText_0x1ec2a0 + db "@" + +UnknownText_0x11f492: ; 0x11f492 + text_jump UnknownText_0x1ec2c0 + db "@" +UnknownText_0x11f497: ; 0x11f497 + text_jump UnknownText_0x1ec2d9 + db "@" + +UnknownText_0x11f49c: ; 0x11f49c + text_jump UnknownText_0x1ec2fe + db "@" + +UnknownText_0x11f4a1: ; 0x11f4a1 + text_jump UnknownText_0x1ec320 + db "@" + +UnknownText_0x11f4a6: ; 0x11f4a6 + text_jump UnknownText_0x1ec33f + db "@" + +UnknownText_0x11f4ab: ; 0x11f4ab + text_jump UnknownText_0x1ec36c + db "@" + +UnknownText_0x11f4b0: ; 0x11f4b0 + text_jump UnknownText_0x1ec389 + db "@" + +UnknownText_0x11f4b5: ; 0x11f4b5 + text_jump UnknownText_0x1ec3ad + db "@" + +UnknownText_0x11f4ba: ; 0x11f4ba + text_jump UnknownText_0x1ec3c5 + db "@" + +UnknownText_0x11f4bf: ; 0x11f4bf + text_jump UnknownText_0x1ec3e5 + db "@" + +UnknownText_0x11f4c4: ; 0x11f4c4 + text_jump UnknownText_0x1ec402 + db "@" + +UnknownText_0x11f4c9: ; 0x11f4c9 + text_jump UnknownText_0x1ec411 + db "@" + +UnknownText_0x11f4ce: ; 0x11f4ce + text_jump UnknownText_0x1ec41f + db "@" + +UnknownText_0x11f4d3: ; 0x11f4d3 + text_jump UnknownText_0x1ec42e + db "@" + +UnknownText_0x11f4d8: ; 0x11f4d8 + text_jump UnknownText_0x1ec461 + db "@" + +UnknownText_0x11f4dd: ; 0x11f4dd + text_jump UnknownText_0x1ec4a0 + db "@" + +UnknownText_0x11f4e2: ; 0x11f4e2 + text_jump UnknownText_0x1ec4d6 + db "@" + +UnknownText_0x11f4e7: ; 0x11f4e7 + text_jump UnknownText_0x1ec4f5 + db "@" + +UnknownText_0x11f4ec: ; 0x11f4ec + text_jump UnknownText_0x1ec512 + db "@" + +UnknownText_0x11f4f1: ; 0x11f4f1 + text_jump UnknownText_0x1ec532 + db "@" + +UnknownText_0x11f4f6: ; 0x11f4f6 + text_jump UnknownText_0x1ec54b + db "@" + +UnknownText_0x11f4fb: ; 0x11f4fb + text_jump UnknownText_0x1ec565 + db "@" + +UnknownText_0x11f500: ; 0x11f500 + text_jump UnknownText_0x1ec580 + db "@" + +UnknownText_0x11f505: ; 0x11f505 + text_jump UnknownText_0x1ec59d + db "@" + +UnknownText_0x11f50a: ; 0x11f50a + text_jump UnknownText_0x1ec5b5 + db "@" + +UnknownText_0x11f50f: ; 0x11f50f + text_jump UnknownText_0x1ec5d3 + db "@" + +UnknownText_0x11f514: ; 0x11f514 + text_jump UnknownText_0x1ec5ee + db "@" + +UnknownText_0x11f519: ; 0x11f519 + text_jump UnknownText_0x1ec60d + db "@" + +UnknownText_0x11f51e: ; 0x11f51e + text_jump UnknownText_0x1ec631 + db "@" + +UnknownText_0x11f523: ; 0x11f523 + text_jump UnknownText_0x1ec651 + db "@" + +UnknownText_0x11f528: ; 0x11f528 + text_jump UnknownText_0x1ec68f + db "@" + +UnknownText_0x11f52d: ; 0x11f52d + text_jump UnknownText_0x1ec6b1 + db "@" + +UnknownText_0x11f532: ; 0x11f532 + text_jump UnknownText_0x1ec6d0 + db "@" + +UnknownText_0x11f537: ; 0x11f537 + text_jump UnknownText_0x1ec708 + db "@" + +UnknownText_0x11f53c: ; 0x11f53c + text_jump UnknownText_0x1ec720 + db "@" + +UnknownText_0x11f541: ; 0x11f541 + text_jump UnknownText_0x1ec73e + db "@" + +UnknownText_0x11f546: ; 0x11f546 + text_jump UnknownText_0x1ec75b + db "@" + +UnknownText_0x11f54b: ; 0x11f54b + text_jump UnknownText_0x1ec77f + db "@" + +UnknownText_0x11f550: ; 0x11f550 + text_jump UnknownText_0x1ec798 + db "@" + +UnknownText_0x11f555: ; 0x11f555 + text_jump UnknownText_0x1ec7bb + db "@" + +UnknownText_0x11f55a: ; 0x11f55a + text_jump UnknownText_0x1ec7d8 + db "@" + +UnknownText_0x11f55f: ; 0x11f55f + text_jump UnknownText_0x1ec818 + db "@" + +UnknownText_0x11f564: ; 0x11f564 + text_jump UnknownText_0x1ec837 + db "@" + +UnknownText_0x11f569: ; 0x11f569 + text_jump UnknownText_0x1ec858 + db "@" + +UnknownText_0x11f56e: ; 0x11f56e + text_jump UnknownText_0x1ec876 + db "@" + +UnknownText_0x11f573: ; 0x11f573 + text_jump UnknownText_0x1ec898 + db "@" + +UnknownText_0x11f578: ; 0x11f578 + text_jump UnknownText_0x1ec8b1 + db "@" + +UnknownText_0x11f57d: ; 0x11f57d + text_jump UnknownText_0x1ec8d5 + db "@" + +UnknownText_0x11f582: ; 0x11f582 + text_jump UnknownText_0x1ec8f0 + db "@" + +UnknownText_0x11f587: ; 0x11f587 + text_jump UnknownText_0x1ec911 + db "@" + +UnknownText_0x11f58c: ; 0x11f58c + text_jump UnknownText_0x1ec928 + db "@" + +UnknownText_0x11f591: ; 0x11f591 + text_jump UnknownText_0x1ec949 + db "@" + +UnknownText_0x11f596: ; 0x11f596 + text_jump UnknownText_0x1ec969 + db "@" + +UnknownText_0x11f59b: ; 0x11f59b + text_jump UnknownText_0x1ec986 + db "@" + +UnknownText_0x11f5a0: ; 0x11f5a0 + text_jump UnknownText_0x1ec99b + db "@" + + + + +UnknownText_0x11f5a5: ; 0x11f5a5 + text_jump UnknownText_0x1ec9bd + db "@" + +UnknownText_0x11f5aa: ; 0x11f5aa + text_jump UnknownText_0x1ec9d9 + db "@" + +UnknownText_0x11f5af: ; 0x11f5af + text_jump UnknownText_0x1ec9f7 + db "@" + +UnknownText_0x11f5b4: ; 0x11f5b4 + text_jump UnknownText_0x1eca0a + db "@" + +UnknownText_0x11f5b9: ; 0x11f5b9 + text_jump UnknownText_0x1eca2a + db "@" + +UnknownText_0x11f5be: ; 0x11f5be + text_jump UnknownText_0x1eca47 + db "@" + +UnknownText_0x11f5c3: ; 0x11f5c3 + text_jump UnknownText_0x1eca64 + db "@" + +UnknownText_0x11f5c8: ; 0x11f5c8 + text_jump UnknownText_0x1eca82 + db "@" + +UnknownText_0x11f5cd: ; 0x11f5cd + text_jump UnknownText_0x1eca9d + db "@" + +UnknownText_0x11f5d2: ; 0x11f5d2 + text_jump UnknownText_0x1ecabf + db "@" + +UnknownText_0x11f5d7: ; 0x11f5d7 + text_jump UnknownText_0x1ecade + db "@" + +UnknownText_0x11f5dc: ; 0x11f5dc + text_jump UnknownText_0x1ecafa + db "@" + +UnknownText_0x11f5e1: ; 0x11f5e1 + text_jump UnknownText_0x1ecb19 + db "@" + +UnknownText_0x11f5e6: ; 0x11f5e6 + text_jump UnknownText_0x1ecb37 + db "@" + +UnknownText_0x11f5eb: ; 0x11f5eb + text_jump UnknownText_0x1ecb55 + db "@" + +UnknownText_0x11f5f0: ; 0x11f5f0 + text_jump UnknownText_0x1ecb70 + db "@" + +UnknownText_0x11f5f5: ; 0x11f5f5 + text_jump UnknownText_0x1ecb92 + db "@" + +UnknownText_0x11f5fa: ; 0x11f5fa + text_jump UnknownText_0x1ecbb6 + db "@" + +UnknownText_0x11f5ff: ; 0x11f5ff + text_jump UnknownText_0x1ecbd9 + db "@" + +UnknownText_0x11f604: ; 0x11f604 + text_jump UnknownText_0x1ecbf3 + db "@" + +UnknownText_0x11f609: ; 0x11f609 + text_jump UnknownText_0x1ecc15 + db "@" + +UnknownText_0x11f60e: ; 0x11f60e + text_jump UnknownText_0x1ecc39 + db "@" + +UnknownText_0x11f613: ; 0x11f613 + text_jump UnknownText_0x1ecc55 + db "@" + +UnknownText_0x11f618: ; 0x11f618 + text_jump UnknownText_0x1ecc75 + db "@" + +UnknownText_0x11f61d: ; 0x11f61d + text_jump UnknownText_0x1ecc92 + db "@" + +UnknownText_0x11f622: ; 0x11f622 + text_jump UnknownText_0x1ecca7 + db "@" + +UnknownText_0x11f627: ; 0x11f627 + text_jump UnknownText_0x1eccc1 + db "@" + +UnknownText_0x11f62c: ; 0x11f62c + text_jump UnknownText_0x1eccd7 + db "@" + +UnknownText_0x11f631: ; 0x11f631 + text_jump UnknownText_0x1eccef + db "@" + +UnknownText_0x11f636: ; 0x11f636 + text_jump UnknownText_0x1ecd0e + db "@" + +UnknownText_0x11f63b: ; 0x11f63b + text_jump UnknownText_0x1ecd2b + db "@" + +UnknownText_0x11f640: ; 0x11f640 + text_jump UnknownText_0x1ecd4d + db "@" + +UnknownText_0x11f645: ; 0x11f645 + text_jump UnknownText_0x1ecd6b + db "@" + +UnknownText_0x11f64a: ; 0x11f64a + text_jump UnknownText_0x1ecd8d + db "@" + +UnknownText_0x11f64f: ; 0x11f64f + text_jump UnknownText_0x1ecdaf + db "@" + +UnknownText_0x11f654: ; 0x11f654 + text_jump UnknownText_0x1ecdcf + db "@" + +UnknownText_0x11f659: ; 0x11f659 + text_jump UnknownText_0x1ecded + db "@" + +UnknownText_0x11f65e: ; 0x11f65e + text_jump UnknownText_0x1ece0d + db "@" + +UnknownText_0x11f663: ; 0x11f663 + text_jump UnknownText_0x1ece2a + db "@" + +UnknownText_0x11f668: ; 0x11f668 + text_jump UnknownText_0x1ece4b + db "@" + +UnknownText_0x11f66d: ; 0x11f66d + text_jump UnknownText_0x1ece70 + db "@" + +UnknownText_0x11f672: ; 0x11f672 + text_jump UnknownText_0x1ece8a + db "@" + +UnknownText_0x11f677: ; 0x11f677 + text_jump UnknownText_0x1ecea8 + db "@" + +UnknownText_0x11f67c: ; 0x11f67c + text_jump UnknownText_0x1ecec9 + db "@" + +UnknownText_0x11f681: ; 0x11f681 + text_jump UnknownText_0x1ecee8 + db "@" SECTION "bank5B", ROMX, BANK[$5B] @@ -23215,7 +24151,17 @@ Function170b44: ; 170b44 ; 170b90 Unknown_170b90: -INCBIN "baserom.gbc",$170b90,$170bd2 - $170b90 + db $12, $13, $14, $15, $18, $17 + db $16, $19, $04, $05, $11, $01 + db $1c, $1b, $21, $1e, $1a, $1d + db $1f, $3c, $20, $27, $27, $27 + db $28, $0a, $23, $24, $2a, $2b + db $35, $40, $2a, $29, $22, $25 + db $3a, $2b, $24, $49, $2b, $07 + db $2c, $2d, $4a, $0d, $4b, $3a + db $2b, $41, $35, $27, $28, $27 + db $36, $3e, $30, $2c, $2d, $3d + db $26, $2e, $06, $07, $43, $36 Function170bd2: ; 170bd2 ret diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm index 375701a2c..b39c1d6ae 100644 --- a/misc/mobile_5f.asm +++ b/misc/mobile_5f.asm @@ -93,11 +93,89 @@ INCBIN "gfx/mobile/select.2bpp" HaveWantMap: ; 17cb83 ; Interleaved tile/palette map. -INCBIN "baserom.gbc", $17cb83, $17cff3 - $17cb83 +INCBIN "gfx/mobile/havewant_map.bin" HaveWantPals: ; 17cff3 ; BG and OBJ palettes. -INCBIN "baserom.gbc", $17cff3, $17d073 - $17cff3 + RGB 0, 0, 0 + RGB 21, 21, 21 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 4, 17, 29 + RGB 6, 19, 31 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 2, 13, 18 + RGB 6, 19, 31 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 31, 5, 5 + RGB 29, 21, 21 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 4, 17, 29 + RGB 6, 19, 31 + RGB 2, 15, 27 + + RGB 0, 0, 0 + RGB 28, 19, 18 + RGB 25, 9, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 31, 27, 27 + RGB 31, 10, 4 + RGB 29, 0, 0 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 26, 8, 23 + RGB 22, 0, 16 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 20, 8, 31 + RGB 15, 1, 26 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 17, 12, 31 + RGB 12, 6, 31 + + RGB 0, 16, 0 + RGB 11, 11, 14 + RGB 5, 5, 7 + RGB 31, 31, 31 + + RGB 0, 31, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 16, 31, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 Function17d073: ; 17d073 @@ -258,7 +336,8 @@ Function17d187: ; 17d187 ; 17d194 Unknown_17d194: -INCBIN "baserom.gbc", $17d194, $17d199 - $17d194 + db "クりス@@" +; 17d198 Function17d199: ; 17d199 ld hl, Unknown_17d1a6 @@ -269,7 +348,7 @@ Function17d199: ; 17d199 ; 17d1a6 Unknown_17d1a6: -INCBIN "baserom.gbc", $17d1a6, $17d1ab - $17d1a6 + db "?????" Function17d1ab: ; 17d1ab ld a, $50 @@ -284,7 +363,8 @@ Function17d1ab: ; 17d1ab ; 17d1c3 Unknown_17d1c3: -INCBIN "baserom.gbc", $17d1c3, $17d1c9 - $17d1c3 + db "こんにちは@" +; 17d1c9 Function17d1c9: ; 17d1c9 ld a, $50 diff --git a/roms.md5 b/roms.md5 new file mode 100644 index 000000000..79ca0bc51 --- /dev/null +++ b/roms.md5 @@ -0,0 +1,2 @@ +9f2922b235a5eeb78d65594e82ef5dde pokecrystal.gbc +301899b8087289a6436b0a241fbbb474 pokecrystal11.gbc diff --git a/tilesets/palette_maps.asm b/tilesets/palette_maps.asm index 9f2f76676..fc5867aad 100644 --- a/tilesets/palette_maps.asm +++ b/tilesets/palette_maps.asm @@ -105,7 +105,9 @@ Tileset20PalMap: ; 0x4caf5 INCBIN "tilesets/20_palette_map.bin" ; 0x4cb65 -INCBIN "baserom.gbc", $4cb65, $4cbd5 - $4cb65 +UnusedPalMap1: +INCBIN "tilesets/unused_palette_map_1.bin" +; 4cbd5 Tileset29PalMap: ; 0x4cbd5 INCBIN "tilesets/29_palette_map.bin" @@ -127,5 +129,6 @@ Tileset04PalMap: ; 0x4cd95 INCBIN "tilesets/04_palette_map.bin" ; 0x4ce05 -INCBIN "baserom.gbc", $4ce05, $4ce1f - $4ce05 - +UnusedPalMap2: +INCBIN "tilesets/unused_palette_map_2.bin" +; 4ce1f diff --git a/tilesets/unused_palette_map_1.bin b/tilesets/unused_palette_map_1.bin Binary files differnew file mode 100644 index 000000000..04cb3ff2d --- /dev/null +++ b/tilesets/unused_palette_map_1.bin diff --git a/tilesets/unused_palette_map_2.bin b/tilesets/unused_palette_map_2.bin new file mode 100644 index 000000000..aba1b3cbf --- /dev/null +++ b/tilesets/unused_palette_map_2.bin @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/unknown/1f0000.bin b/unknown/1f0000.bin Binary files differnew file mode 100644 index 000000000..1ecd2d61e --- /dev/null +++ b/unknown/1f0000.bin diff --git a/unknown/1f4018.bin b/unknown/1f4018.bin Binary files differnew file mode 100644 index 000000000..aa8c73e78 --- /dev/null +++ b/unknown/1f4018.bin diff --git a/unknown/1f4dd3.bin b/unknown/1f4dd3.bin Binary files differnew file mode 100644 index 000000000..511d62cb7 --- /dev/null +++ b/unknown/1f4dd3.bin diff --git a/unknown/1f5db4.bin b/unknown/1f5db4.bin Binary files differnew file mode 100644 index 000000000..f4adbc0db --- /dev/null +++ b/unknown/1f5db4.bin @@ -2106,7 +2106,7 @@ PCItemsEnd:: ds 1 -wd957:: ds 1 +wPokegearFlags:: ds 1 wd958:: ds 1 wd959:: ds 2 WhichRegisteredItem:: ; d95b |