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
-
okay now I have a disassembler that can only disassemble the relocatable instructions (and can't fully do one of them, because it's complicated)
I now need to add the ones that don't relocate, which is a separate headache
-
Foone🏳️⚧️replied to Ron Gilbert #KamalaHarris last edited by
@grumpygamer @nickzoic it sure should, but since I'm looking at disassembly here... it didn't!
-
ugh. apparently EnterFrame also adds a frame pointer (somewhere) and then the pvm_PushLocal operates off it.
-
Food $200
Data $150
Rent $800
Stacks $3,600
Utility $150
someone who is good at interpreters please help me budget this. my scripting language is dying -
@foone reduce your stacks usage
-
@0xSim no
-
anyway I'm now at the point where I've written enough of a disassembler that I need to basically throw it away and make this thing better and more systematic, so I can eventually have it give me real source files (not log output) and even further on, so I can round-trip it and re-compile these scripts
-
@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.
-