GithubHelp home page GithubHelp logo

pret / pokefirered Goto Github PK

View Code? Open in Web Editor NEW
888.0 31.0 476.0 122.81 MB

Decompilation of Pokémon FireRed/LeafGreen

Makefile 0.41% Assembly 16.79% C++ 4.93% C 77.86% Shell 0.01%
pokemon decompilation gameboy-advance reverse-engineering c

pokefirered's Introduction

pokefirered's People

Contributors

asparaguseduardo avatar cbt6 avatar colonelsalt avatar delta456 avatar deokishisu avatar fieldy101 avatar garakmon avatar ghoulslash avatar griffinrichards avatar gwimm avatar hjk321 avatar huderlem avatar jiangzhengwenjz avatar kurausukun avatar louroboros avatar luckytyphlosion avatar melthelesbian avatar missingmew avatar mrgriffin avatar petuuuhhh avatar pikalaxalt avatar revosucks avatar satomew avatar scnorton avatar sierraffinity avatar sombrabsol avatar sphericalice avatar tianmaru avatar ultima-soul avatar v-fexrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokefirered's Issues

Event flags (literally)

#define FLAG_0x84A 0x84A
#define FLAG_0x84B 0x84B
are set by the appropriate DLC scripts after receiving, respectively, the MysticTicket and the AuroraTicket to enable processing of the appropriate item at the Vermilion dock;
0x2F0 and 2F1 record whether the matching introductory text has been seen!

cannot find -lc, -lgcc

I'm trying to compile fire red on a WSL2 Debian distro. I'm following the INSTALL.md
I have installed all the packages and setup DEVKITPRO, DEVKITARM variables correctly.

image

my windows version.
image

when I try to compile with make -j$(nproc)
image

Drop reliance on agbsdk

  • Library sources should be newly assembled except libgcc and libc
  • Sys and library headers should be included from the iquote path

deleting unused pokemon

in fire red theres 25 unused pokemon i wanna remove. how do i go about this. cuz its messing up my trainer rando alot.

How do I utilize the repository and the ROM I built in Ubuntu 18.04 LTS?

I believe I have a serious knowledge gap. I've been trying for weeks to run this provided build of FireRed, but I can't seem to get the program to run correctly. In Ubuntu, I've successfully built a repository for the game and a ROM to play the game. Then I used mednafen because I read a comment that said that works well. I got that going but whenever I input mednafen gba it gives me the specs and says it's starting but nothing happens. When I've tried to run my rom in the past, it returns "Cannot specify local host" or something like that. Obviously, I should've asked about this while I was doing it so all of this wouldn't currently be so foggy in my brain. Ultimately, my question is this: how do I play FireRed with my own builds, if it is possible?
...Upon reviewing my whole paragraph of a question, I also have another, related question. How do I navigate in Ubuntu or any CLI for that matter? This whole thing on mapping locations for files-- I'm super lost. Any help would be mundo mundo appreciated. Thank you for all you do.

Milestone: Decompile ASM to C

If you wish to contribute to this milestone, please join the Discord and claim a file from this list in #pokefirered.

  • asm/text_printer.s
  • asm/battle_bg.s
  • asm/battle_interface.s
  • asm/smokescreen.s
  • asm/overworld.s
  • asm/field_camera.s
  • asm/field_player_avatar.s
  • asm/event_object_movement.s
  • asm/field_ground_effect.s folded into event_object_movement
  • asm/event_object_80688E4.s TODO: fold into event_object_movement
  • asm/field_message_box.s
  • asm/field_control_avatar.s
  • asm/field_tasks.s
  • asm/field_weather.s
  • asm/field_weather_effects.s
  • asm/field_screen_effect.s
  • asm/cable_club.s
  • asm/trainer_see.s
  • asm/field_effect.s
  • asm/pokemon_storage_system.s
  • asm/script_movement.s
  • asm/fldeff_cut.s
  • asm/naming_screen.s
  • asm/script_pokemon_util_80A0058.s
  • asm/pc_screen_effect.s
  • asm/water.s
  • asm/bike.s
  • asm/script_pokemon_util_80BF8FC.s
  • asm/region_map.s
  • asm/fldeff_flash.s
  • asm/post_battle_event_funcs.s
  • asm/field_effect_helpers.s
  • asm/save_failed_screen.s
  • asm/clear_save_data_screen.s
  • asm/box_party_pokemon_dropdown.s
  • asm/link_rfu_2.s --> src/link_rfu_2.c, src/link_rfu_3.c
  • asm/easy_chat_2.s --> src/easy_chat_2.c, src/easy_chat_3.c
  • asm/link_rfu.s
  • asm/pokedex_screen.s
  • asm/item_menu.s
  • asm/link_rfu_3.s asm/union_room.s
  • asm/pokemon_special_anim.s
  • asm/union_room_chat.s
  • asm/pokemon_summary_screen.s
  • asm/pokemon_jump.s
  • asm/pokemon_jump_2.s --> src/pokemon_jump_[2-6].c
  • asm/berry_crush.s
  • asm/berry_crush_2.s
  • asm/berry_crush_3.s
  • asm/dodrio_berry_picking.s
  • asm/dodrio_berry_picking_2.s
  • asm/librfu_stwi.s
  • asm/librfu.s

Build fails on Ubuntu 22.04

Hello,

I'm trying to build the project using INSTALL.md but I get the error bellow.

sylvain@Ubuntu-22:~/Documents/pokefirered$ make compare
gcc -Wall -Wextra -Wno-switch -Werror -std=c11 -O2 main.c extended.c -o aif2pcm  -lm
gcc -Wall -Wextra -Werror -std=c11 -O2 bin2c.c -o bin2c 
gcc gbafix.c -o gbafix 
gcc -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O3 -flto -DPNG_SKIP_SETJMP_CHECK main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c huff.c -o gbagfx  -lpng -lz
g++ -Wall -std=c++11 -O2 -I . jsonproc.cpp -o jsonproc 
g++ -Wall -std=c++11 -O2 json11.cpp mapjson.cpp -o mapjson 
g++ -std=c++11 -O2 -Wall -Wno-switch -Werror agb.cpp error.cpp main.cpp midi.cpp tables.cpp -o mid2agb 
g++ -std=c++11 -O2 -Wall -Wno-switch -Werror asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp utf8.cpp -o preproc 
g++ -std=c++11 -O2 -Wall -Wno-switch -Werror main.cpp sym_file.cpp elf.cpp -o ramscrgen 
gcc -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK main.c convert_png.c util.c font.c -o rsfont  -lpng -lz
g++ -Wall -Werror -std=c++11 -O2 scaninc.cpp c_file.cpp asm_file.cpp source_file.cpp -o scaninc 
tools/ramscrgen/ramscrgen .bss sym_bss.txt ENGLISH > build/firered/sym_bss.ld
In file included from src/agb_flash_1m.c:1:
include/gba/gba.h:4:10: fatal error: string.h: Aucun fichier ou dossier de ce type
    4 | #include <string.h>
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:275 : build/firered/src/agb_flash_1m.o] Erreur 1
make: *** [Makefile:195 : compare] Erreur 2

Seems like wrong compiler is used or compiler not installed correctly?

I installed gcc-arm-none-eabi by my side hoping it would solve the issue but it did not ;)

Thanks in advance :)

Wrong Songs in FireRed

Hello , i just recently came across your blog and in the end , here, because i wanted to hack some pokemon game rom's so i can make my own custom changes and also go even a little deeper.

So, while i came across your blog, i also have came across the FireRed and LeafGreen source codes, which is awesome, but while i was checking them , i realised that the folder with the Songs, has the wrong music , is not the music from FireRed/LeafGreen, but Emerald.

Could you check and upload the corect Songs ? , if you still got the Source Codes.
But either way , is fine, i mostly took the source code to see how it's writen, and to see the scripting part, because i want to custom that but i don't understand it very well yet.

Thanks.

Removing cut trees in viridian city breaks tutorial man

To recreate:
Remove either or both of the cut tree objects in ~/pokefirered/data/maps/ViridianCity/map.json, making no other changes to the file. Rebuild (currently using leafgreen 1.1, unsure if the issue occurs in other builds). the old man will move ~5 tiles up from his original position and the woman typically next to him will take his place. unaware if this issue occurs beyond the coffee event.

make -jX not working with LeafGreen

When using the -j parameter with "make leafgreen", I'm getting the following make warning about it using -j1.
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.

grafik

This does not appear when just using "make -j16" for FireRed. Therefore, building LeafGreen is way slower.

Porymap Support

Now that Fire Red is free of baserom calls, we need to make this a priority somewhere.

  • decompile event object movement data
  • layout 21 is missing field(s)

Colorizing PNGs

Some .png files are still grayscale, others have a single palette applied incorrectly to all tiles.
Have an in-progress branch for this, but may submit some of it piecemeal. Feel free to comment with images missing from the list (map tileset images intentionally excluded)

  • battle_interface/healthbox_elements.png
  • berry_crush/berry_crush.png
  • berry_fix/gba_small.png
  • berry_fix/gba_transfer_error.png
  • berry_fix/gba_transfer_highlight.png
  • berry_fix/gba_transfer.png
  • berry_fix/logo.png
  • berry_pouch/background.png
  • contest/misc_2.png
  • contest/misc.png
  • diploma/diploma.png
  • easy_chat/text_input_frame.png
  • fame_checker/bg.png
  • interface/dex_caught_pokeball_and_pokemon_types.png
  • interface/hold_icons.png
  • interface/party_menu_misc.png
  • interface/trainer_memo.png
  • item_menu/bag_tiles.png
  • item_pc/bg.png
  • map_preview/altering_cave/tiles.png
  • map_preview/berry_forest/tiles.png
  • map_preview/cerulean_cave/tiles.png
  • map_preview/digletts_cave/tiles.png
  • map_preview/dotted_hole/tiles.png
  • map_preview/icefall_cave/tiles.png
  • map_preview/lost_cave/tiles.png
  • map_preview/monean_chamber/tiles.png
  • map_preview/mt_ember/tiles.png
  • map_preview/mt_moon/tiles.png
  • map_preview/pokemon_mansion/tiles.png
  • map_preview/pokemon_tower/tiles.png
  • map_preview/power_plant/tiles.png
  • map_preview/rock_tunnel/tiles.png
  • map_preview/rocket_hideout/tiles.png
  • map_preview/rocket_warehouse/tiles.png
  • map_preview/safari_zone/tiles.png
  • map_preview/seafoam_islands/tiles.png
  • map_preview/silph_co/tiles.png
  • map_preview/victory_road/tiles.png
  • map_preview/viridian_forest/tiles.png
  • oak_speech/bg_tiles.png
  • oak_speech/leaf/pic.png
  • oak_speech/oak/pic.png
  • oak_speech/oak_speech_bg.png
  • oak_speech/red/pic.png
  • oak_speech/rival/pic.png
  • pokedex/caught_marker.png
  • pokemon_storage/menu.png
  • region_map/background.png
  • region_map/map_edge.png
  • region_map/region_map.png
  • shop_menu/shop_menu.png
  • slot_machine/unk_8464a14.png
  • slot_machine/unk_84659d0.png
  • slot_machine/unk_8466620.png
  • slot_machine/unk_lg_8465f00.png
  • slot_machine/unk_lg_846535c.png
  • slot_machine/unk_lg_8464434.png
  • teachy_tv/tiles.png
  • tm_case/hm.png
  • tm_case/tm_case.png
  • trainer_card/card_em.png
  • trainer_card/card.png

Editing maps layout and rebuilding doesn't update map

To recreate:
Edit any map layout (~/pokefirered/data/layouts/*/map.bin)
Rebuild as leafgreen 1.1 (unsure if it happens with other builds). clearing existing built files or using NODEP=1 argument does not affect the outcome
Reload the map ingame. exiting and reentering the area reveals it does not update (i am aware that the map is stored in the save file and needs to be reloaded by reentering).

Typo in define for pokemon_summary_screen.c

at line 2536 the define for GetMovePpPinterYpos has a typo.

It's missing the "r" it should be GetMovePpPrinterYpos

I apologize for not sending a pr, as is typical,
but I'm not accustomed to working in git, and the repo I'm working in
has substantial changes.

It'd prob be easier for ya'll to just rename the file on your end than try to merge mine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.