Thread: Development: The Ruins of Alph Puzzles
View Single Post
Old October 16th, 2010 (1:53 PM). Edited April 26th, 2017 by Diegoisawesome.
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
  • Silver Tier
Join Date: Dec 2007
Location: :noitacoL
Age: 21
Gender: Male
Nature: Naive
Posts: 1,040
Well, it's been done. Three years after making this thread, many advancements in the Ruins of Alph have been accomplished; shiny quagsire obtained the original source code from Mastermind_X and put it up on GitHub, mwksoul took that code and made it almost work in Emerald, and finally, I took that code and made it completely compatible with existing in-game systems, getting rid of any bugs and incompatibilities and adding in things like fading. More recently, shiny quagsire ported my code over to FireRed, allowing for much more hacks to use it than before.


Released under GPLv3, anyone is free to take this code and use it in their own hack as-is, or modify it and release the source code as well. Any forks from the code are free to be discussed in this thread.

Q: What engines does this work in?
A: Emerald and FireRed only.

Q: Will you be porting this to [Ruby, Sapphire, LeafGreen]?
A: Sorry, but no. Feel free to port the code over if you want to, though! shiny quagsire made this process extremely simple!

Q: How do you put this into a hack?
A: Get devkitARM from Drop your ROM of choice in the project folder. Compile the source into your ROM with
make (ROM code) fname="(ROM name.gba)" offset=(free space offset)
without parentheses.
The ROM code is either bpre for FireRed or bpee for Emerald.
Once it's been injected into your hack, use a script such as this to start it:
#org @start
setvar 0x8004 0x0
fadescreen 0x1
callasm 0x(free space offset + 1)
compare LASTRESULT 0x1
if 0x1 goto @success
Setting var 0x8004 to 0, 1, 2, or 3 will choose which one of the four puzzles to load (Kabuto, Aerodactyl, Omanyte, and Ho-Oh respectively), and you can check to see whether or not the player successfully solved the puzzle with the contents of LASTRESULT.

Q: Who did what in this?
A: Mastermind_X made the original standalone ROM (of course), shiny quagsire obtained the source and uploaded it to GitHub, mwksoul did the initial hard work (cleaning up the original, making it not a standalone), while I made it fully compatible with Emerald's callback system, sprite loading system, etc. shiny quagsire then ported that code over to FireRed, making it fully compatible with that engine.

Credits: (if you want to use this, then make sure to credit all of us)
Mastermind_X: The original
shiny quagsire: The obtaining of the source, the port to FireRed
mwksoul: The initial port and cleanup
diegoisawesome: The compatibility and customization

We all know the Ruins of Alph puzzle made by Mastermind_X, right?
Well, it was made for Fire Red, and when I wanted it in my Emerald hack, I tried to port it over. I changed the LASTRESULT address and tried it in-game.

As you can see, the result was less than satisfactory, and although it did work, it did have some glitches. As you can see here, the strange coloration is one part, and the other part is that after exiting it, pressing start would give you a weirdly formatted start menu, at the botom of the screen. Exiting it and trying again would bring up the normal Start menu, except exiting this one would remove all of the tiles on the top layer of the map.

So my question is this: How can Mastermind_X's brilliant puzzle be taken over to Emerald?

My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote