diff options
-rw-r--r-- | .travis.yml | 12 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README.md | 14 | ||||
-rwxr-xr-x | engine/battle/animations.asm | 8 | ||||
-rw-r--r-- | engine/battle/battle_transitions.asm | 2 | ||||
-rwxr-xr-x | engine/battle/core.asm | 6 | ||||
-rw-r--r-- | engine/battle/trainer_ai.asm | 4 | ||||
-rwxr-xr-x | engine/cable_club.asm | 2 | ||||
-rwxr-xr-x | engine/items/items.asm | 2 | ||||
-rwxr-xr-x | engine/menu/start_sub_menus.asm | 2 | ||||
-rw-r--r-- | engine/menu/text_box.asm | 2 | ||||
-rw-r--r-- | engine/overworld/player_state.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/ssanne.asm | 2 | ||||
-rwxr-xr-x | engine/palettes.asm | 2 | ||||
-rwxr-xr-x | engine/slot_machine.asm | 2 | ||||
-rwxr-xr-x | engine/trade.asm | 2 | ||||
-rw-r--r-- | home.asm | 6 | ||||
-rw-r--r-- | home/overworld.asm | 2 | ||||
-rw-r--r-- | home/predef.asm | 2 | ||||
-rw-r--r-- | home/vcopy.asm | 12 | ||||
-rw-r--r-- | pokered.link | 176 | ||||
-rw-r--r-- | text/maps/cerulean_city.asm | 2 | ||||
-rw-r--r-- | text/maps/cinnabar_gym.asm | 4 | ||||
-rw-r--r-- | text/maps/pewter_gym_2.asm | 4 | ||||
-rwxr-xr-x | wram.asm | 6 |
25 files changed, 237 insertions, 44 deletions
diff --git a/.travis.yml b/.travis.yml index bd38f51b..bbcb7721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,12 @@ language: c install: - |- path="$(pwd)"; cd; - wget https://github.com/rednex/rgbds/archive/v0.2.5.tar.gz -O rgbds.tar.gz && - tar xf rgbds.tar.gz && - cd rgbds-0.2.5 && - sudo make install && - cd - && - rm -rf rgbds && + wget https://github.com/rednex/rgbds/archive/v0.3.3.tar.gz -O rgbds.tar.gz && + tar xf rgbds.tar.gz && + cd rgbds-0.3.3 && + sudo make install && + cd - && + rm -rf rgbds && cd "$path" before_script: - |- @@ -44,8 +44,9 @@ pokered_opt = -jsv -k 01 -l 0x33 -m 0x1B -p 0 -r 03 -t "POKEMON RED" pokeblue_opt = -jsv -k 01 -l 0x33 -m 0x1B -p 0 -r 03 -t "POKEMON BLUE" %.gbc: $$(%_obj) - rgblink -n $*.sym -o $@ $^ + rgblink -n $*.sym -l pokered.link -o $@ $^ rgbfix $($*_opt) $@ + sort $*.sym -o $*.sym %.png: ; %.2bpp: %.png ; @$(2bpp) $< @@ -13,9 +13,21 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md). ## See also * Disassembly of [**Pokémon Red & Blue**][pokered] +* Disassembly of [**Pokémon Yellow**][pokeyellow] * Disassembly of [**Pokémon Crystal**][pokecrystal] +* Disassembly of [**Pokémon Pinball**][pokepinball] +* Disassembly of [**Pokémon TCG**][poketcg] +* Disassembly of [**Pokémon Ruby**][pokeruby] +* Disassembly of [**Pokémon Emerald**][pokeemerald] +* Discord: [**pret**][Discord] * irc: **irc.freenode.net** [**#pret**][irc] [pokered]: https://github.com/pret/pokered -[pokecrystal]: https://github.com/kanzure/pokecrystal +[pokeyellow]: https://github.com/pret/pokeyellow +[pokecrystal]: https://github.com/pret/pokecrystal +[pokepinball]: https://github.com/pret/pokepinball +[poketcg]: https://github.com/pret/poketcg +[pokeruby]: https://github.com/pret/pokeruby +[pokeemerald]: https://github.com/pret/pokeemerald +[Discord]: https://discord.gg/cJxDDVP [irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 4964b2cf..1e400aa5 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -213,7 +213,7 @@ PlayAnimation: ld h,a ld de,.nextAnimationCommand push de - jp [hl] ; jump to special effect function + jp hl ; jump to special effect function .playSubanimation ld c,a and a,%00111111 @@ -457,7 +457,7 @@ PlayApplyingAttackAnimation: ld a,[hli] ld h,[hl] ld l,a - jp [hl] + jp hl AnimationTypePointerTable: dw ShakeScreenVertically ; enemy mon has used a damaging move without a side effect @@ -642,7 +642,7 @@ DoSpecialEffectByAnimationId: ld l,a ld de,.done push de - jp [hl] + jp hl .done pop bc pop de @@ -1080,7 +1080,7 @@ CallWithTurnFlipped: ld [H_WHOSETURN],a ld de,.returnAddress push de - jp [hl] + jp hl .returnAddress pop af ld [H_WHOSETURN],a diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index 9e02c56f..985a1eb2 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -62,7 +62,7 @@ BattleTransition: ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl ; the three GetBattleTransitionID functions set the first ; three bits of c, which determines what transition animation diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a60fe4a1..6ec9930c 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3151,7 +3151,7 @@ ExecutePlayerMove: jp z, ExecutePlayerMoveDone call CheckPlayerStatusConditions jr nz, .playerHasNoSpecialCondition - jp [hl] + jp hl .playerHasNoSpecialCondition call GetCurrentMove ld hl, wPlayerBattleStatus1 @@ -5691,7 +5691,7 @@ ExecuteEnemyMove: ld [wDamageMultipliers], a call CheckEnemyStatusConditions jr nz, .enemyHasNoSpecialConditions - jp [hl] + jp hl .enemyHasNoSpecialConditions ld hl, wEnemyBattleStatus1 bit ChargingUp, [hl] ; is the enemy charging up for attack? @@ -7144,7 +7144,7 @@ _JumpMoveEffect: ld a, [hli] ld h, [hl] ld l, a - jp [hl] ; jump to special effect handler + jp hl ; jump to special effect handler MoveEffectPointerTable: dw SleepEffect ; unused effect diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm index cabd4334..fff064fa 100644 --- a/engine/battle/trainer_ai.asm +++ b/engine/battle/trainer_ai.asm @@ -51,7 +51,7 @@ AIEnemyTrainerChooseMoves: ld l, a ld de, .nextMoveChoiceModification ; set return address push de - jp [hl] ; execute modification function + jp hl ; execute modification function .loopFindMinimumEntries ; all entries will be decremented sequentially until one of them is zero ld hl, wBuffer ; temp move selection array ld de, wEnemyMonMoves ; enemy moves @@ -366,7 +366,7 @@ TrainerAI: ld h,[hl] ld l,a call Random - jp [hl] + jp hl TrainerAIPointers: ; one entry per trainer class diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 47b260f0..dba25e56 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -304,7 +304,7 @@ CallCurrentTradeCenterFunction: ld a, [hli] ld h, [hl] ld l, a - jp [hl] + jp hl TradeCenter_SelectMon: call ClearScreen diff --git a/engine/items/items.asm b/engine/items/items.asm index 0b0b2859..fd78ca3c 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -13,7 +13,7 @@ UseItem_: ld a,[hli] ld h,[hl] ld l,a - jp [hl] + jp hl ItemUsePtrTable: dw ItemUseBall ; MASTER_BALL diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 7384797a..0acff19e 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -118,7 +118,7 @@ StartMenu_Pokemon: ld h,[hl] ld l,a ld a,[wObtainedBadges] ; badges obtained - jp [hl] + jp hl .outOfBattleMovePointers dw .cut dw .fly diff --git a/engine/menu/text_box.asm b/engine/menu/text_box.asm index e99d176f..18e8860e 100644 --- a/engine/menu/text_box.asm +++ b/engine/menu/text_box.asm @@ -24,7 +24,7 @@ DisplayTextBoxID_: ld l,a ; hl = address of function ld de,.done push de - jp [hl] ; jump to the function + jp hl ; jump to the function .coordTableMatch call GetTextBoxIDCoords call GetAddressOfScreenCoords diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 79f755b9..b8d734f2 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -103,7 +103,7 @@ IsPlayerFacingEdgeOfMap: ld c, a ld de, .asm_c41e push de - jp [hl] + jp hl .asm_c41e pop bc pop de diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm index 712c53ed..ea4747ce 100755 --- a/engine/overworld/ssanne.asm +++ b/engine/overworld/ssanne.asm @@ -16,7 +16,7 @@ AnimateBoulderDust: ld bc, .returnAddress push bc ld c, 4 - jp [hl] + jp hl .returnAddress ld a, [rOBP1] xor %01100100 diff --git a/engine/palettes.asm b/engine/palettes.asm index 4785ade2..6a798860 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -17,7 +17,7 @@ _RunPaletteCommand: ld l, a ld de, SendSGBPackets push de - jp [hl] + jp hl SetPal_BattleBlack: ld hl, PalPacket_Black diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index b2eab14a..f3bf5cff 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -451,7 +451,7 @@ SlotMachine_CheckForMatches: pop hl ld de, .flashScreenLoop push de - jp [hl] + jp hl .flashScreenLoop ld a, [rBGP] diff --git a/engine/trade.asm b/engine/trade.asm index 4eb5c6c4..b168411f 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -46,7 +46,7 @@ TradeAnimCommon: ld l, a ld de, .loop push de - jp [hl] ; call trade func, which will return to the top of the loop + jp hl ; call trade func, which will return to the top of the loop .done pop af ld [hSCX], a @@ -2978,7 +2978,7 @@ Bankswitch:: ld [MBC1RomBank],a ld bc,.Return push bc - jp [hl] + jp hl .Return pop bc ld a,b @@ -4434,7 +4434,7 @@ CallFunctionInTable:: ld l, a ld de, .returnAddress push de - jp [hl] + jp hl .returnAddress pop bc pop de @@ -4617,7 +4617,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ld [H_LOADEDROMBANK], a ld de, .returnAddress push de - jp [hl] + jp hl .returnAddress xor a jr .done diff --git a/home/overworld.asm b/home/overworld.asm index ec8f1925..509b699b 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -1995,7 +1995,7 @@ RunMapScript:: ld l,a ld de,.return push de - jp [hl] ; jump to script + jp hl ; jump to script .return ret diff --git a/home/predef.asm b/home/predef.asm index 2fac9aca..9bb9be74 100644 --- a/home/predef.asm +++ b/home/predef.asm @@ -24,7 +24,7 @@ Predef:: ld de, .done push de - jp [hl] + jp hl .done pop af diff --git a/home/vcopy.asm b/home/vcopy.asm index 3fe19745..ad92e8fb 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -123,7 +123,7 @@ AutoBgMapTransfer:: ld a,[H_AUTOBGTRANSFERENABLED] and a ret z - ld hl,[sp + 0] + ld hl,sp + 0 ld a,h ld [H_SPTEMP],a ld a,l @@ -205,7 +205,7 @@ VBlankCopyBgMap:: ld a,[H_VBCOPYBGSRC] ; doubles as enabling byte and a ret z - ld hl,[sp + 0] + ld hl,sp + 0 ld a,h ld [H_SPTEMP],a ld a,l @@ -238,7 +238,7 @@ VBlankCopyDouble:: and a ret z - ld hl, [sp + 0] + ld hl, sp + 0 ld a, h ld [H_SPTEMP], a ld a, l @@ -290,7 +290,7 @@ VBlankCopyDouble:: ld a, h ld [H_VBCOPYDOUBLEDEST + 1], a - ld hl, [sp + 0] + ld hl, sp + 0 ld a, l ld [H_VBCOPYDOUBLESRC], a ld a, h @@ -316,7 +316,7 @@ VBlankCopy:: and a ret z - ld hl, [sp + 0] + ld hl, sp + 0 ld a, h ld [H_SPTEMP], a ld a, l @@ -360,7 +360,7 @@ VBlankCopy:: ld a, h ld [H_VBCOPYDEST + 1], a - ld hl, [sp + 0] + ld hl, sp + 0 ld a, l ld [H_VBCOPYSRC], a ld a, h diff --git a/pokered.link b/pokered.link new file mode 100644 index 00000000..ad5ac793 --- /dev/null +++ b/pokered.link @@ -0,0 +1,176 @@ +ROM0 + ORG $61 + "Home" + ORG $150 + "Main" + +ROMX $1 + "bank1" + +ROMX $2 + "Sound Effect Headers 1" ; AUDIO_1 + "Music Headers 1" + "Sound Effects 1" + "Audio Engine 1" + "Music 1" + +ROMX $3 + "bank3" + +ROMX $4 + "NPC Sprites 1" ; NPC_SPRITES_1 + "Graphics" ; GFX + "Battle (bank 4)" + +ROMX $5 + "NPC Sprites 2" ; NPC_SPRITES_2 + "Battle (bank 5)" + +ROMX $6 + "bank6" + +ROMX $7 + "bank7" + +ROMX $8 + "Sound Effect Headers 2" ; AUDIO_2 + "Music Headers 2" + "Sound Effects 2" + "Audio Engine 2" + "Music 2" + +ROMX $9 + "Pics 1" ; PICS_1 + "Battle (bank 9)" + +ROMX $A + "Pics 2" ; PICS_2 + "Battle (bank A)" + +ROMX $B + "Pics 3" ; PICS_3 + "Battle (bank B)" + +ROMX $C + "Pics 4" ; PICS_4 + "Battle (bank C)" + +ROMX $D + "Pics 5" ; PICS_5 + "Battle (bank D)" + +ROMX $E + "bankE" + +ROMX $F + "bankF" + +ROMX $10 + "bank10" + +ROMX $11 + "bank11" + +ROMX $12 + "bank12" + +ROMX $13 + "bank13" + +ROMX $14 + "bank14" + +ROMX $15 + "bank15" + +ROMX $16 + "bank16" + +ROMX $17 + "bank17" + +ROMX $18 + "bank18" + +ROMX $19 + "bank19" + +ROMX $1A + "bank1A" + +ROMX $1B + "bank1B" + +ROMX $1C + "bank1C" + +ROMX $1D + "bank1D" + +ROMX $1E + "bank1E" + +ROMX $1F + "Sound Effect Headers 3" ; AUDIO_3 + "Music Headers 3" + "Sound Effects 3" + "Audio Engine 3" + "Music 3" + +ROMX $20 + "Text 1" ; TEXT_1 + +ROMX $21 + "Text 2" ; TEXT_2 + +ROMX $22 + "Text 3" ; TEXT_3 + +ROMX $23 + "Text 4" ; TEXT_4 + +ROMX $24 + "Text 5" ; TEXT_5 + +ROMX $25 + "Text 6" ; TEXT_6 + +ROMX $26 + "Text 7" ; TEXT_7 + +ROMX $27 + "Text 8" ; TEXT_8 + +ROMX $28 + "Text 9" ; TEXT_9 + +ROMX $29 + "Text 10" ; TEXT_10 + +ROMX $2A + "Text 11" ; TEXT_11 + +ROMX $2B + "Pokedex Text" ; POKEDEX_TEXT + +ROMX $2C + "Move Names" ; MOVE_NAMES + +WRAM0 + "WRAM Bank 0" + +WRAMX 1 + "WRAM Bank 1" + +SRAM 0 + "Sprite Buffers" + +SRAM 1 + "Save Data" + +SRAM 2 + "Saved Boxes 1" + +SRAM 3 + "Saved Boxes 2" + diff --git a/text/maps/cerulean_city.asm b/text/maps/cerulean_city.asm index 89ee1f26..c2db14cf 100644 --- a/text/maps/cerulean_city.asm +++ b/text/maps/cerulean_city.asm @@ -29,7 +29,7 @@ _CeruleanCityText_19672:: prompt _CeruleanCityText_19677:: - text "<RIVAL: Hé!" + text "<RIVAL>: Hé!" line "Tu sais quoi?" para "Chuis allé chez" diff --git a/text/maps/cinnabar_gym.asm b/text/maps/cinnabar_gym.asm index 5ace3daa..6ba84b1f 100644 --- a/text/maps/cinnabar_gym.asm +++ b/text/maps/cinnabar_gym.asm @@ -244,6 +244,6 @@ _CinnabarGymText_75ac2:: done _CinnabarGymText_75ac7:: - text $52, "! You beat" - line "that fire brand!" + text "<PLAYER>! Tu as" + line "battu AUGUSTE!" done diff --git a/text/maps/pewter_gym_2.asm b/text/maps/pewter_gym_2.asm index 588aa27d..c9b2fc0e 100644 --- a/text/maps/pewter_gym_2.asm +++ b/text/maps/pewter_gym_2.asm @@ -20,8 +20,8 @@ _TM34PreReceiveText:: done _ReceivedTM34Text:: - text "<PLAYER> received" - line "TM34!@@" + text "<PLAYER> reçoit" + line "la CT34!@@" _TM34ExplanationText:: text "" @@ -3142,10 +3142,12 @@ wEnemyPartyCount:: ds 1 ; d89c wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d ; Overload enemy party data +UNION + wWaterRate:: db ; d8a4 wWaterMons:: db ; d8a5 - ds wWaterRate - @ +NEXTU wEnemyMons:: ; d8a4 wEnemyMon1:: party_struct wEnemyMon1 @@ -3158,6 +3160,8 @@ wEnemyMon6:: party_struct wEnemyMon6 wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d9ac wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH ; d9ee +ENDU + wTrainerHeaderPtr:: ; da30 ds 2 |