• Most people probably don't realise this, but this forum has had two editors for a number of years. One is the xenForo default editor, and the other is a custom editor I made years back I called BBCEd.

    All the settings for which editor you use was lost during the upgrade. You can find the setting under Account Settings > Preferences > Editor.

Cave Story Tribute Site Forums

zxin
zxin
Y'think I don't know that? I suggest that BL reads the NPC pointer table of the currently loaded .exe, and then goes down a couple lines from each of those addresses and reads the first set of framerects.
zxin
zxin
The way it reads the framerects currently is it reads a list of inaccurate framerects stored in a file. It doesn't care what the framerects actually are, or if they change.
Noxid
Noxid
your suggestion is patently absurd
zxin
zxin
How so?
andwhyisit
andwhyisit
You have no way of any program knowing the difference between an instruction opcode and an operand argument without parsing a shittonne of asm code to get to that point for EVERY GODDAMN FRAMERECT. You are asking Noxid to convert BL to a full on virtual machine. Yes it is absolutely absurd.
andwhyisit
andwhyisit
@Noxid: Just add a framerects file automatically to the mod folder and have people manage these on a per mod basis. Then simply load framerects from this file or create it using the default if it doesn't exist. Problem solved.
zxin
zxin
I'm not asking him to convert it into a virtual machine. I don't see how making it able to read an argument of a single type of instruction doesn't make it closer to a decompiler.
Noxid
Noxid
@andwhyisit you can specify them in entityinfo.txt for display in the editor but apparently that's not good enough for some people
gamemanj
gamemanj
zxin: Because you need to read *every type of instruction* to even be able to find the "single type of instruction" - furthermore, what kind of instruction are you even looking for?

The same instruction formats which apply to framerects apply to other, non-framerect things. Finally, due to C Compiler Roulette, sometimes those instruction formats aren't used in a given NPC.

EDIT: I suspect a particular example of this would be found in an NPC similar to Quote, following fixed-spritesheet-size rules.
Quote's the most likely one for this, but I'm sure the people devoted to the study of ASM in this conversation know of some others they'd like to add.

Here, the framerects would be calculated at runtime for simplicity's sake (something like left = spriteNum * 16, right = left + 16, top = mimigaMask * 16, bottom = top + 16). To figure out the results, you'd *need* a virtual machine.
zxin
zxin
What's a virtual machine gonna do?
EnlightenedOne
EnlightenedOne
A virtual machine is gonna translate the raw hex data into readable instructions. The instructions you see in olly are basically made up imaginary code for humans to process, whereas the machine (and therefore Booster's Lab) will be processing raw hex.

Basically, what we are trying to say, is that in order to do what you are suggesting, one needs to rebuild their own version of olly in java.
zxin
zxin
But it only has to read one kind of instruction?
Top