Booster's Lab - It's Pretty Good Now

Sep 28, 2015 at 4:54 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
you need java installed
 
Sep 28, 2015 at 5:10 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
try reading back in the thread some and see if anything suggested helps because i've answered this question several times
 
Sep 30, 2015 at 9:02 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Oct 2, 2015 at 11:47 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 2, 2014
Location: inactivity.
Posts: 115
Noxid, I have two questions.
1. Are *all* EXE edits Booster's Lab performs (Most importantly, basic operations like map table edits - not just Hackinator operations, but those are equally important) based upon the loaded in-memory address, or the "hexedit position" (which is dependent on compression, segments, and more)?
2. Will there be a "plugin"-like system that allows, say, the integration of ASM-edit-specific editing windows? (Flowchart-based entity programming based upon a NICE-in-hackinator, with Lua replaced with a flowchart runtime, and a flowchart editor as a plugin to Booster's Lab?)
 
Oct 2, 2015 at 3:09 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
1)
yes/no. I load the game assuming an uncompressed PE32 executable. When I load it, I read the PE32 header and separate the segments individually so that I can resize them, but when applying a patch to an address I just drop it in whichever segment it lands according to its address in the assembled file. E.G.

Code:
	public void patch(ByteBuffer data, int offset) {
		//int shift = 0;
		if (offset >= 0x400000) offset -= 0x400000;
		for (ExeSec s : headers) {
			if (offset >= s.getPos() &&
					offset < s.getPos() + s.getLen()) {
				//it's within this section
				ByteBuffer d = s.getData();
				d.position(offset - s.getPos());
				data.position(0);
				d.put(data);
				modified = true;
				break;
			}
		}
	}
I'm not going to cater to EXE's that have been compressed because that would be like trying to write a text editor that can open compressed C code, arbitrary and useless.

2) I might consider it but I've never done plugins before so I'd have to research how it works. Probably adding menu options but I'm not sure how much code i'd need to expose.
 
Oct 2, 2015 at 8:49 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Aug 2, 2014
Location: inactivity.
Posts: 115
1)
yes/no. I load the game assuming an uncompressed PE32 executable. When I load it, I read the PE32 header and separate the segments individually so that I can resize them, but when applying a patch to an address I just drop it in whichever segment it lands according to its address in the assembled file. E.G.

Code:
    public void patch(ByteBuffer data, int offset) {
        //int shift = 0;
        if (offset >= 0x400000) offset -= 0x400000;
        for (ExeSec s : headers) {
            if (offset >= s.getPos() &&
                    offset < s.getPos() + s.getLen()) {
                //it's within this section
                ByteBuffer d = s.getData();
                d.position(offset - s.getPos());
                data.position(0);
                d.put(data);
                modified = true;
                break;
            }
        }
    }
I'm not going to cater to EXE's that have been compressed because that would be like trying to write a text editor that can open compressed C code, arbitrary and useless.
*Shortly after double-checking stuff* Ok, now I'm confused - I thought that PE executables had some built-in compression scheme, and that's why on earth adding bytes in places (EDIT: the nice large unused area near start of CS executable memory, absolute 0x4002D0 - putting code in this region in DA did *something* that made using Cave Editor on the file afterward crash stuff, hence my "backup EXE then run DA" procedure) causes all the offsets to change (when if it were flat segments, this wouldn't be the case)
Now I'm confused ^.^;
By "plugins" I mean "load another JAR & allow running functions in it, preferably passing current location of CS".
Preferably load-save could also be coordinated between plugins & BL.
Admittedly this is probably domain-specific to the cases where an ASM edit actually adds something new that would need it's own editor, so...
 
Last edited:
Oct 2, 2015 at 8:59 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
You should probably read Microsoft's document on the PE32 format for more information if you want to mess around with it, but what you were trying to modify was part of the PE header and if the OS finds anything unexpected in there it's going to throw a fit.
Segments can also have virtual sizes larger than their physical size which can be confusing but otherwise it's basically a direct 1:1 map from disk ROM to RAM
 
Oct 10, 2015 at 8:04 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
I probably copied it from somewhere without checking. Cave Editor has a similar list so whatever it says there is probably correct. But for now i'll just remove the duplicate 78.
 
Oct 18, 2015 at 7:42 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Apr 29, 2015
Location:
Posts: 104
Age: 21
is there a way to change the size of an already-existing map? i can't find an option for it anywhere
 
Oct 18, 2015 at 7:48 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Nov 19, 2015 at 7:24 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
Can confirm that shifting maps still breaks pxa files

Also I'd be nice if the NPC shifting glitch could be fixed.

And where is my TSC graphic preview along with a side of waffles?
 
Nov 19, 2015 at 10:48 PM
Offensive User
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Sep 7, 2011
Location: IT'S TIME FOR A SHAQDOWN
Posts: 539
And where is my TSC graphic preview along with a side of waffles?
I know that there are 3d printers that make shitty pizza. Once humanity reahes a point where we can 3d print waffles he could probably just send a signal to 3d printer to make waffles
 
Nov 19, 2015 at 10:49 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 845
Age: 22
We can do that already.
 
Nov 20, 2015 at 12:14 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6211
Age: 38
I thought a keyboard would be a great waffle iron if we could overheat it via software.

Scratch that, I failed to realise that 3D printers could be made to produce edibile food. I was expecting a waffle made of plastics when that notion was mentioned.
 
Last edited:
Nov 25, 2015 at 10:44 PM
Senior Member
"Huzzah!"
Join Date: Feb 13, 2015
Location: Canada
Posts: 216
Age: 25
I've something to report.

I edited a stage's TSC script in CE, saved, and than opened the script up in BL. The script was of a previous version I saved in BL, but not of the recent TSC script I wrote in CE. Why'd that happen?

I think this has something to do with script source.
 
Last edited:
Nov 25, 2015 at 10:47 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
it is because of ScriptSource
delete folder scriptsource to solve problem

I thought I made it check which of the two was newer but maybe I just thought about implementing that
 
Dec 15, 2015 at 11:18 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Sep 4, 2014
Location: South Korea
Posts: 44
Last edited by a moderator:
Top