Email or username:

Password:

Forgot your password?
Foone🏳️‍⚧️

this goddamn game has 16 functions named quick_sort in it, and one named qsort.

SOME CONSISTENCY IS ALL I'M ASKING, GUYS

91 comments
Foone🏳️‍⚧️

and they're doing that bullshit tag-param thing.
quick_sort takes a pointer to an array of items, an integer count of how many items are there, and a pointer to a comparator function.

the comparator function is never used and it's always passed as a NULL. but a TYPED NULL, so quick_sort can be overloaded.

Foone🏳️‍⚧️

but here's the thing:
THE ARRAY PARAMETER IS ALSO TYPED.

You could overload it with just the array pointer! There is no reason for this damn function to have a comparator function! it is never used!

Foone🏳️‍⚧️

okay I retract my complain about qsort vs quick_sort:
by checking the call listings, I can see that qsort is only used by FMOD functions.
So this isn't THEIR fault, this is them writing their own quicksort implementation and not using the one that comes with one of the libraries they included

Foone🏳️‍⚧️

hey look they've got bsearch vs mbinary_search!
And this time, it's NOT the fault of FMOD.

it's the fault of the Fonix Voicesync middleware.

Foone🏳️‍⚧️

hmm. either this function isn't being decompiled correctly, or it just leaks 40 bytes on every call.

Foone🏳️‍⚧️

okay it's not a complete leak. it goes in a global array of items.
but it doesn't seem to actually get used, which is... weird.

Foone🏳️‍⚧️

also it's slightly infuriating how much stuff here falls into the category of "only used by the scripting engine"
it makes static analysis really hard or even impossible

Foone🏳️‍⚧️

since I don't yet understand how the scripting engine works

Foone🏳️‍⚧️

the game obviously doesn't support it but there IS wii balance board support in this engine.
if only they had the vision to let you play wheel of fortune with the balance board

Foone🏳️‍⚧️

GuiSequenceJunction
GuiSequencerJunction

DO NOT NAME YOUR CLASSES LIKE THIS

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

it turns out the difficulty settings are Easy=0, Medium=1, Hard=2, Custom=3.

that was... expected.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

oh good news! I thought this game was finally sensible in using UTF-8.

NOPE! Parts of it are using UTF16-big endian.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I just named some variables in this function as "head_gender" and "generic_head".
oh my. what's this game rated again? at least it's not named "getHead", though I'm sure this "mersenne_twister" maneuver is banned in at least 12 states.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

the game canonically considers tuxedoes to be "dresses".
and all AI characters start female.

FEMINISM WIN?

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

found a bug. WFCommon::setAllSeenTutorial is supposed to go through all players and set that they have seen the tutorial, like the title explains. It iterates through all three players but only sets player 1, three times

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

hankaku/zenkaku keys support?
IN WHEEL OF FORTUNE?

what

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I'm gonna assume this is just leftovers from the general game engine. this version doesn't even support keyboards.

(well, the engine does. the game itself just does nothing with the keyboard events)

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I'm gonna have to try injecting katakana into a puzzle solution.
just to see if it works

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

BOOOO nope.

although I could have guessed that. I know what font it uses for the puzzles, and while it has a lot of characters you wouldn't expect, it doesn't include katakana.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

UGH I gotta write a program to parse the font files

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

fools will spend hours writing a program to parse font descriptions rather than manually transcribe the following PNG

(it's me. I'm fools)

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

it has been zero days since I have broken the emulator I'm using to reverse engineer a game

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

oh no, it's not broken, it's just CASE SENSITIVE REGISTERS.
bah.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

ugh. they're doing something "clever" here and I don't like it.

I can parse the usual bundle (mostly) fine, but the SharedAssets one has perfectly formed indexes that point to wildly wrong offsets

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

like it'll be "this file is 5 megabytes and located at 24mb into the file" and the file is 34 kilobytes

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

the file is 1.2mb uncompressed and 5.3mb compressed.

the fuck?

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I think they're doing something weird where SOMETIMES those fields mean completely different things, based on flags.
flags I don't at all understand yet

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

the compressed size is ALMOST the size of the "ROM" (the .DOL file), and their engine does support loading resources out of "ROMs", but the offset is still out in 1.2 gigabyte land, on a console with 80mb of ram

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

fun fact: the engine calls it a "ROM", although from what I can tell, this engine has never run on any console with ROMs

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

(do not @ me about the fact there were technically PC ROMs, I know and I made some of them)

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

why did these punks hardcode a font ID.
you build this incredibly complex system for decoding resource names from your damn trie nonsenses, and then you just go stuff font_id=0xf4da54fa in your code?

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

WHERE ARE YOU GETTING ALL THESE FONTS, GAME? I've got a breakpoint on the font loading code and it keeps getting called on fonts I don't see getting loaded!

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

oh right it /might/ generate one at runtime

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I'm gonna have to figure out how to dump these fonts out of RAM.

in an emulator with no scripting support.

ugh

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

what if I just extended the "conditions" function to add a new datatype, which is HUGE HEX STRINGS that get dumped to the log?

Delightfully devilish, Foone!

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I'm now sorting fonts by how big they are, since I can see their load sizes and compare them against the files on the disk.

A full boot of this game loads FIVE fonts. I know the IDs of three, and the names of TWO

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I found another by dumping all resources that were 2,528 bytes long and then hex editing them to see if they're a font

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

buh
one of them IS a font
but it's not the font I was looking for
it's a different font that JUST SO HAPPENS to be the same size.

suspicious

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

okay so I figured out when and where that one is loaded
but still not where the other file of the same size is loaded, or what it is.

so I miscounted. 6 fonts. I have names for three, IDs for 5, and source files for 4.

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

I could get the final source file if I could parse the Weird Bundle, and I could get the filenames if I could parse the filename trie.

ANYWAY I think I have what I need for my current hax

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

this font file ALMOST makes sense. Like I'll look at 19 out of 20 characters and they'll match perfectly and then one will just be completely wrong.
Why does it think the number 4 is in the middle? it's not, it's on the top!

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

well I manually extracted the hidden font, good ol' GENERICFONT.FDX.PRD.

NOPE! it's similarly aligned, so it's not the right one either. the fuck?

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

okay after matching all the dumped textures with the fonts by process of elimination, this is the font I want:

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

that symbol in the top left, which appears to render as "ss", is §.

what the fuck are they doing, exactly?

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

there is a SLIGHT chance that it's actually ß and they invented a new encoding that's a hybrid of utf-8 and MacRoman.

But I really, really hope not

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

why is this function being called with this->__vt set to 5?

I'M PRETTY SURE YOUR OBJECT'S VTABLE IS NOT AT ADDRESS 5, GAME

Foone🏳️‍⚧️ replied to Foone🏳️‍⚧️

especially considering that this is PowerPC and it'd presumably generate an unaligned address fault, and OH YET THE WII HAS NO MEMORY MAPPED AT 0

Go Up