Coder Social home page Coder Social logo

pret / pokepinballrs Goto Github PK

View Code? Open in Web Editor NEW
80.0 5.0 27.0 5.38 MB

Decompilation of Pokémon Pinball: Ruby & Sapphire

Makefile 0.24% Assembly 79.90% Shell 0.01% C 17.23% sed 0.01% C++ 2.62%
pokemon decompilation gameboy-advance reverse-engineering c

pokepinballrs's People

Contributors

anonymousrandomperson avatar camthesaxman avatar huderlem avatar iimarckus avatar jiangzhengwenjz avatar luckytyphlosion avatar patilise avatar pikalaxalt avatar red031000 avatar sethbarberee avatar whengryphonsfly 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

Watchers

 avatar  avatar  avatar  avatar  avatar

pokepinballrs's Issues

Post-Full Decompilation Cleanup

Once we have reached 100% code decompilation, some cleanup actions will need to be taken.

  • Resolve remaining NONMATCHING and TODO
  • Find and resolve any fakematches that were not labeled TODO
  • Check duplicate code for the possibility of being an inline function
  • Split c files (such as rom_3219C.c)
  • Split h files (such as functions.h and variables.h)
  • Clean up declarations (e.g., use extern and static as appropriate)
    • Deal with overlapping symbols
  • Ensure when setting IO registers that all fields are specified and are specified in the same order (least to most significant bits?)
  • Establish and follow a style guideline in general
  • Ensure overlapping IO registers use the proper register (see sub_24DC)
  • Ensure proper DMA instructions are used (e.g., DmaCopy16 vs DmaCopy32)
  • Remove magic numbers

Data decompilation and symbol documentation are not on this list, as they will still be calculated by calcrom after 100% code decompilation.

Some RAM addresses I found screwing around in mGBA

02000030: spare balls (0-9)
02000040-3: score increment/decrement
02000044-7: score
02000192: coins
020001C6: spinner turns (00-A8)
020001C8: Pikachu charge? gets continuously incremented and capped to spinner value?
02000296-7: clock time remaining (catch, evo, bonus)
02000306: (Sapphire) Pelipper status (0 idle, 1 cocked, 3-6 starting Spheal game, ?-9 ending Spheal game)
02000308-9: bumper hits (resets on new ball, after Spheal bonus, etc)
0200062A-E: end of ball bonus counters (pokemon caught, evolved, travel count, slots played, pikachu saves) (00-FF work fine, unsure if there's a soft cap)
0200070E: bonus multiplier
02000724-5: Ball Saver time remaining
0200072E: EVO loops (0-3)
0200072F: GET loops (0-3)
0200B0C0: what you apparently call gMain
0200B0CF: 2 pause | 4 debug
0200B134-200: pokedex (01 seen = blacked and no data, 02 traded? = dimmed and description only, 03 traded? = dimmed and no h/w, 04 caught) (you apparently call this gMain_saveData.pokedexFlags[])
0200B201: language (EUR: 0-4, invalid values cause graphics corruption)
0200B204: button layout preset (0-4)
0200B206-19: custom button layout (2 bytes per button, up to 2 ANDed buttons per action in on-screen order, nonstandard scancodes)
0200B21C-39B: highscore table (4 bytes (!) per character, 8 bytes for score)

Don't take the multibyte ones for granted (32 bit score and 64 bit highscore? yet it works...)

Hope you'll find them useful though :)

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.