Thread: Research: Asm-scanner
View Single Post
Old July 24th, 2010 (8:55 AM).
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
Crystal Tier
Join Date: Jun 2006
Posts: 1,314
Originally Posted by knizz View Post
Now I have a few questions...
  1. Pokemon Ruby reads (and even executes) a lots of data from the 0x03000000-area. How do these code-segments get there and where are their original positions (in the rom)?
  2. Is it true that the 3rd games gen only use THUMB-Mode?
  3. What is the code at 081e082c good for?
    081e082c 4700 bx r0
    081e082e 46c0 mov r8, r8
    081e0830 4708 bx r1
    081e0832 46c0 mov r8, r8
    081e0834 4710 bx r2
    081e0836 46c0 mov r8, r8
    081e0838 4718 bx r3
    081e083a 46c0 mov r8, r8
    081e083c 4720 bx r4
    081e083e 46c0 mov r8, r8
    081e0840 4728 bx r5
    081e0842 46c0 mov r8, r8
    081e0844 4730 bx r6
    081e0846 46c0 mov r8, r8
    081e0848 4738 bx r7
    081e084a 46c0 mov r8, r8
    081e084c 4740 bx r8
    081e084e 46c0 mov r8, r8
    081e0850 4748 bx r9
    081e0852 46c0 mov r8, r8
  1. Ruby (and all other 3rd gen games) copy those routines from the ROM. To track their original position you should use a debugger like VBA-SDL-H.
  2. 99% of the routines are THUMB, because they take less space and execute faster. Few of them, in particular the initialization ones, are coded in ARM though.
  3. Those are small helper routines used in most THUMB routines to call a particular subroutine stored at an arbitrary address.
Reply With Quote