maybe I'd be better at getting back into my reverse engineering projects if getting back into them didn't involve first figuring out which of the 13 Ghidra versions I have installed is for that project
-
@foone useless_boolean will detect if the for loop never ran at all, because of the stop requirement.
-
@RueNahcMohr useless_boolean is actually never read by any code. thus the "useless"
-
@foone .....huh, ok, maybe the author didn't turn out to actually need it in the end???
-
@RueNahcMohr yeah! and apparently their compiler didn't warn them about this. or they didn't care
-
@foone Various Amiga formats would do that as a plain 68000 won't do misaligned memory accesses. Your mention of 24-bit addresses also makes me think of the 68000. But then you say the game is 14 years old, and 2010 is a tad late for m68k hardware…
-
Riley S. Faelanreplied to Foone🏳️⚧️ last edited by [email protected]
@foone This is relatively common, because a bunch of old (mostly, pre-C) machines used to be word-addressable, not byte-addressable. Even nowadays, with byte addressability the universal norm, there's RISC systems that throw an exception if you try to access a non-aligned multibyte value. DVI does 4-byte padding in a couple of places, for an example; IIRC, its first implementation was on a machine whose memory comprised of 36-bit words, four bytes per word.
-
-
@riley I know of it in ram addressing, but not so much in files.
Though I guess this game just fread()s the whole block, so on-disk padding is needed to allow for in-memory alignment -
@pndc yeah, it's a Wii game, so it's PowerPC.
-
@foone When your memory is word-addressable, it kind of comes naturally to design the bulk loading and saving routines, whether or not you have an OS to encapsulate the file I/O for you, in a way that retains the memory alignment even on disk. A very common concept of what a disk file is is, it's a piece of memory dumped out to a non-volatile carrier.
-