AW2 Procs

I forked @StanH’s Lua Scripts repo to add support for AW2 procs. It took some research in no$gba, and the games aren’t exactly the same, so there were some issues to iron out, and I’m still not sure why it doesn’t display anything in the design room, lol. (If you see this and are interested, Nat, then please have a look. I think you’d do a better job. :sweat_smile:)
See https://feuniverse.us/t/guide-doc-asm-procs-or-6cs-coroutines-threads-fibers-funky-structs-whatever/3352 if you don’t know what procs are.


It’s halted for H: 61 more frames before it will let you skip the text!

This makes it easier to see and edit what the game is doing, especially for things that idle for a number of frames. PROC_SLEEP and PROC_REPEAT in particular handle most pauses before the next thing should happen, in a nutshell.

  • Download repo
  • Get vba-rr
  • Open AW2 in vba-rr and load the lua script
  • Do things ingame until you find a proc address you’re interested in

Next, I use a python script based on the fe8u decomp one by @NoahNelson to dump proc data.

  • Place AW2.GBA in the proc_dump folder.
  • Double-click dump.bat

image

  • Enter an address that the lua script showed you.
  • Optionally name it

image

Now it spits out data in a readable way (and saves it to the end of procscr.txt):

From here, you could use the data in C or EA for example along with the barebones proc.h file I setup. Or if you want to keep it simple, an inline change using the address of the proc command you found.
PROC_SLEEP(frames) is:
SHORT 0xE frames; WORD 0


Going up a few lines from the end address of 0x617044, there is PROC_SLEEP(0x5A).

eg.

ORG $617026 
SHORT 0 // no 90 frame pause after new game text is finished printing 

I dunno if anyone else will use this, but I wanted to document it somewhere. Cheers.

7 Likes