decomp.me icon indicating copy to clipboard operation
decomp.me copied to clipboard

[PRESET] Create Compiler Presets for "Aironauts"

Open bismurphy opened this issue 1 year ago • 2 comments

I would like to create/update a compiler preset on decomp.me.

  • Preset Name: Aironauts
  • Preset ID (when updating): N/A; this is a request for new presets
  • Platform: e.g. psx
  • Compiler ID: e.g. gcc
  • Compiler Flags: e.g. -G0 -O2 -gcoff

Hello!

I have recently started a light "Aironauts" decompilation project, at https://github.com/bismurphy/Aironauts-decomp. I have been using decomp.me to get started, and now that I have some working functions decompiled, it would be great to have a preset.

There are two key issues here. One is that this game does NOT appear to use ASPSX like all existing PlayStation games do, and therefore should not use maspsx. Please view the Makefile on the project above (https://github.com/bismurphy/Aironauts-decomp/blob/main/Makefile) to see this. Instead, I am using a simple Python script I made called "menospsx" (https://github.com/bismurphy/Aironauts-decomp/blob/main/tools/menospsx/menospsx.py) to do some very light cleanup on the assembly from the compiler.

The other issue is that this game seems to use GCC 2.8 for some functions, and 2.7 for others (specifically, I have been using 2.8.1-psx and 2.7.2-psx). I have not explored enough of the game to work out which parts use which, and it's possible that there are yet more GCC versions being used in different places. What this means is that ultimately, this game will need two different compiler options.

I think it would be a bit silly to make two whole presets just for this one game (especially since I'm probably the only person interested in this game), so ideally it would be nice if there could just be one preset with 2.7 or 2.8 (doesn't matter which), and be able to toggle over after making the scratch.

So far from what I've found, all the functions want -G0 -O2 -gcoff, regardless of which compiler is used. Presumably as more functions are decompiled we will narrow down the edge cases and may need to add more arguments.

It may end up being that the best way to fulfill the needs of this game is to allow independent selection of compiler and assembler on the site. Alternatively, there could maybe be a toggle in the Options to use either maspsx or menospsx?

I don't know enough about the site internals to start putting this together, but thought I would make the issue here to start a conversation, and hopefully an active maintainer might pick this up :)

Happy to work with anyone to iterate on this as needed, thank you for your time.

bismurphy avatar Sep 11 '24 22:09 bismurphy

Sorry for not replying to this sooner, but I'm wondering if it'd be possible for you to migrate to maspsx as one potential option. (also l0l @ menos/mas)

Having multiple presets for one game is something other games do and is totally fine. Eventually ™️ when the projects feature is more fleshed out, a project will be a collection of presets anyway, so going ahead and making the presets you need is totally encouraged.

Decoupling the assembler from the compiler is a thing we could do, but it's a lot of plumbing and dramatically increases the number of "configurations" we're signing up for supporting on the site, which is kind of scary to me personally..but yeah I see the use-case for it for sure

ethteck avatar Nov 28 '24 11:11 ethteck

re: I'm probably the only person interested in this game

I might also be interested in decompiling some functions from this game. Not on a frequent basis but maybe if I see some scratch on the site that I could finish or at least match further, I'll very likely do it. I have the full soundtrack of Aironauts on my YouTube channel and have spoken to a few persons from the development team. Certain things would be interesting to see decompiled source for, like I remember programmer Jean-Paul Cossigny telling me that because the game wasn't land-based, sometimes the polygons would become too big on the screen and would be harder to subdivide them to reduce the PS1 jiggle. Some really neat techniques are there in the code, that might be worth uncovering.

fmil95 avatar Mar 29 '25 04:03 fmil95