Jump to content

no intro, no cd, debug info & level select, windowed mode, long load times fix


Iran
 Share

Recommended Posts

https://github.com/Iran/LegoIsland2Patches/blob/master/README.md

 

I did the following so far:

 

-No CD (still requires movie files in the game folder on your hard drive)

-No intro videos

-Debug level select (replaces game credits menu, apparently has already been done before)

-Windowed mode (game doesn't have parsing code anymore for it, but only parsing code was removed)

-Debug info window: Press F9 when in windowed mode (doesn't require any game patches other than windowed mode)

- I found a /force & -force command line arg, it sets a variable but I'm not sure what else it does (I can modify the code to change it in a -win command line arg for windowed mode)

-Slow loading time fix: in fullscreen mode (not windowed mode) the game make sure the loading screen pizza animation is smooth by executing a game frame after every small file read, removing this logic speeds up loading time by 10-20 times.

-In windowed mode pressing F8 makes the game start loading new levels/subgames every 5-15 seconds.

-Running the game with the /nomutex command line arg allows you to run multiple copies of the game simultaneously

 

Offsets are loaded memory offsets (as shown in OllyDbg and IDA)

 

The EXE I'm using has the following hashes

 

CRC32: C0824FAC
MD5: C839F8ECDBD582770B7B4ED69927F047
SHA-1: 0D43741E15BC309C3BB370D4EB49EC142D149CA9
 

 

lego%20island%202%20debug%20window.png

  • Like 7
Link to comment
Share on other sites

lol username

Now that's quite a first post, haha!

 

In the past we haven't allowed no CD patches to be posted here, but the rules have been revised since then and I'm not sure what the admin's current stance is. I'll ask about that. But everything else is definitely a-ok and very much welcome.

 

34 minutes ago, chromecrusher said:

Are you having a problem or is this a mod?

... Uh, what?

Link to comment
Share on other sites

Well I only posted what bytes need to be changed for no-CD, no actual binaries or patching toools.

 

BTW with windowed when pressing F8 the game does something interesting...it starts loading levels/subgames every 15 seconds.

 

EDIT: It seems that changing resolution mode is broken for me, I can't change resolution in-game it stays at 640x480. Does changing resolution work for someone else?

  • Like 2
Link to comment
Share on other sites

lol username
5 hours ago, Iran said:

EDIT: It seems that changing resolution mode is broken for me, I can't change resolution in-game it stays at 640x480. Does changing resolution work for someone else?

Locked to 640x480 in windowed mode for me as well.

 

Normally the game is capped to 60 FPS, but windowed mode disables this (explaining why it loads faster in windowed mode without having to make any additional modifications, given the game is limiting itself to how work it can do on loading per frame). Also, I'm getting around 200 FPS while walking around on LEGO Island. Can't wait to see all the new bugs this introduces, given how many things in the game are tied directly to the framerate, not the actual passage of time. :af: (For example, look at the butterflies and animated waves on the water in windowed mode...)

 

Spoiler

yarbSj4.png

 

pRKPopu.png

 

(Though, I just loaded Pepper's house and it seems to be capped to 30 FPS in that area specifically. Go figure. And to clear up any potential confusion, that's Fraps' FPS counter, not an in-game one.)

 

The GOB list debug tool is awesome, lets you move around game objects on the fly (including Pepper himself of course). Only seems to move the collision of some objects though...?

 

Spoiler

H6lKGSe.png

 

Edit: Abusing game state changes can result in some fun borkery

 

Spoiler

4HoHjsV.png

 

Edit: Uh... Oops.

 

Spoiler

EzGDUle.png

 

S8fX24J.png

 

92mvRMB.png

 

Q9REVSw.png

 

MDt9os4.png

 

Edit - Just tried the load time fix on its own. Holy crap the game loads everything instantly now.

 

Also, lol:

 

Spoiler

Un1ACfK.png

 

 

 

  • Like 2
Link to comment
Share on other sites

Fluffy Cupcake

My MD5 is different, but it still works.

P.S. For those that have Cheat Engine installed you can find this stuff in the memory viewer as well. ;)

Link to comment
Share on other sites

aidenpons

So... you're telling me that the only reason LI2 has such stupendous load times is because of the loading animation itself?

 

 

Also, is there any way I can get my head around how to apply these? The GitHub file makes.... very little sense, all I vaguely recognize is "/force command line." Is there any way I can apply these to my copy?

 

10 hours ago, Terrev said:

In the past we haven't allowed no CD patches to be posted here, but the rules have been revised since then and I'm not sure what the admin's current stance is. I'll ask about that. But everything else is definitely a-ok and very much welcome.

 

I've always understood it as patches = fine, releasing patches = fine, releasing patchED files = not fine.

But given my track record I'm probably incorrect...

Link to comment
Share on other sites

Fluffy Cupcake

I'd explain it in text, but that might still be hard to follow, so...

I didn't even get it immediately. =P

 

Here's Terrev's explanation on the instant loading screen one.

 

Open or attach LEGO Island 2 in OllyDebug, then:

Quote

once it's all loaded

ctrl + g

enter 0042A870

then hit space

in the box that pops up replace what's there with RETN

then close out the box

right click somewhere in that area

Copy to executable > All modifications

Copy all

Yes

right click in the new window that's popped up

Save file

save as LEGO Island 2 SUPER AMAZING MOD.exe or something

done

Link to comment
Share on other sites

Yeah those OllyDbg instructions are the exact same way I patched the game.

 

Did you guys try F8 in windowed mode? I'm not sure what it's doing when it presses F8.

 

I figured windowed mode disables the frame limit cap, as I also noticed butterflies are really quick now.

 

Resolution changing is broken for me in BOTH windowed and full screen mode, that's my issue...I want to try and force the game to load higher res and widescreen resolutions but the game won't even change to 800x600 mode.

 

Have you guys tried using the windowed mode with some special dlls like dxwnd? To fix some of its issues. I haven't had time to try.

 

Where does the game store the graphics and controller settings btw? I noticed it tries to read them from multiple files but it doesn't make sense.

 

The debug info menu has 2 options in the options menu, Color list and sound test but they don't work....from an older topic I saw that the color list dialog is still there.

 

Have you guys noticed anything different when running with the /force or -force command line?

 

To force the '/force' command line arg change:

004029B3   C685 F0FDFFFF 00 MOV BYTE PTR SS:[EBP-210],0

into

004029B3   C685 F0FDFFFF 00 MOV BYTE PTR SS:[EBP-210],1

 

Some fun facts about the game:

- It's compiled with the debug memory checker enabled, the game checks memory integrity A LOT. Patching out some of the functions doesn't seem to affect the game (but I haven't checked for memory leaks after disabling some).

-For textures, models, animations etc the game will do about 6-12 file read calls, with at least half of them reading just a single byte (which MS C runtime library than changes into a 512 byte ReadFile call.

- The game will actually read into the *.bob files a lot with 1 byte file read calls...instead of just reading in the whole .BOB file and then loading all that's needed from memory.

-The game also checks the validity of the stack pointer, which is another Microsoft Visual Studio debug option

  • Like 1
Link to comment
Share on other sites

lol username
8 minutes ago, Iran said:

Did you guys try F8 in windowed mode? I'm not sure what it's doing when it presses F8.

I'm not entirely sure either, but it seems to stop whatever it's doing if you press F8 again while a scene is loaded (you have to be very fast of course as it immediately starts loading the next scene).

 

9 minutes ago, Iran said:

Resolution changing is broken for me in BOTH windowed and full screen mode, that's my issue...I want to try and force the game to load higher res and widescreen resolutions but the game won't even change to 800x600 mode.

Oh, hm. I've only done the windowed mode and loading screen fix edits, and neither at the same time, but I haven't encountered that issue...

 

10 minutes ago, Iran said:

Where does the game store the graphics and controller settings btw? I noticed it tries to read them from multiple files but it doesn't make sense.

If you're running the game as admin, the save files are in the _data folder. If you're not running as admin, it'll be in the VirtualStore equivalent (C:\Users\YOUR NAME HERE\AppData\Local\VirtualStore\Program Files (x86)\LEGO Media\LEGO Island 2\_data).

 

12 minutes ago, Iran said:

The debug info menu has 2 options in the options menu, Color list and sound test but they don't work....from an older topic I saw that the color list dialog is still there.

Oh, I hadn't even noticed that menu until you mentioned it. Hmmm.

 

12 minutes ago, Iran said:

Have you guys noticed anything different when running with the /force or -force command line?

Haven't tried it yet, but I'll post if I do and notice anything.

Link to comment
Share on other sites

Fluffy Cupcake

Okay so not everything is the same in my version. The 3rd entry of the "no intro videos" section wasn't correct, and neither is the "Debug level select" section.

The force thing is the same so I'll give that a go though.

 

Aside from those 2 things (and force). I've got everything else on the list patched. If anyone wants a copy because they find the instructions too hard, PM me.

Link to comment
Share on other sites

lol username
29 minutes ago, Iran said:

-For textures, models, animations etc the game will do about 6-12 file read calls, with at least half of them reading just a single byte (which MS C runtime library than changes into a 512 byte ReadFile call.

- The game will actually read into the *.bob files a lot with 1 byte file read calls...instead of just reading in the whole .BOB file and then loading all that's needed from memory.

88a.png

 

This game is an incredible piece of software.

 

  • Like 2
Link to comment
Share on other sites

aidenpons

Xiron's hax were very useful...

 

 

... all I want to say is the biplane minigame is more broken than usual

 

EDIT: The LI2 cursor doesn't match up with my Windows mouse pointer - what can I do about this?

Link to comment
Share on other sites

Which file does the game use to save and read settings to/from? Settings.set?

 

Maybe the cursor thing is fixed if you use DxWnd or something like that.

 

Seems like the Color Dialog and Sound Test dialogs options don't have any code associated with them, to call them...the dialogs still exist in the game EXE's resource files. When you press the buttons for them in the debug menu the game code doesn't handle the button press and I don't see any code for creating the windows.

 

This game IS definitely compiled as a debug build, stack variables are initialized with value 0xCCCCCCCC.

 

Comparing the differences between the EXE files might be useful..

 

EDIT: There's a pointer to a list of all the GOBs in memory at 0x00975E54. If you follow it and then in memory search for the string 'PEPP' you get the info for your player object, including model scale, position, facing and skew (on skewed land). Can't seem to find velocity/speed though for making skateboard go faster...

 

Link to comment
Share on other sites

I got Xiron's EXE and compared it with my own. The first few functions of the game (as detected by IDA) are the same, with same offsets, afterwards the offsets change..meaning some code is different.

 

The offsets start changing in the function at 0x00601CEA. This function loads the waypath file for map z14OSD, what's different in the EXE versions is something to do with the GOB List I think. Could someone check the level with both exes and see if there are any differences?

 

Some of the strings are saved in a different order.

 

This IDA plugin I'm using to compare the two EXEs seems to suck pretty bad, not really used to it though literally downloaded it just now.

 

BTW has anyone tried comparing the data files for the different versions of the game..just check file hashes?

Link to comment
Share on other sites

lol username

I don't think anybody's ever compared things between their PC versions as nobody's ever noticed any differences.

 

(I'm pretty sure there's different versions of the PS1 game though, at least two. One has some dialogue the other doesn't - the "Dr. Pepper" joke when you meet Kilroy for the first time. Mumboking(?) uploaded a video of it and I'm 99% sure that when I checked the PS1 version I had on hand, that dialogue wasn't there... Plus the outro was different, had credits with "bloopers" from the intro/outro animations playing beside the text. There's a discussion on it somewhere, I'd have to dig it up.)

 

z14OSD... That's the first desert area, where you meet Johnny and Pippin. We shall investigate.

Link to comment
Share on other sites

-Running the game with the /nomutex command line arg allows you to run multiple copies of the game simultaneously

Link to comment
Share on other sites

mumboking
3 hours ago, Terrev said:

(I'm pretty sure there's different versions of the PS1 game though, at least two. One has some dialogue the other doesn't - the "Dr. Pepper" joke when you meet Kilroy for the first time. Mumboking(?) uploaded a video of it and I'm 99% sure that when I checked the PS1 version I had on hand, that dialogue wasn't there... Plus the outro was different, had credits with "bloopers" from the intro/outro animations playing beside the text. There's a discussion on it somewhere, I'd have to dig it up.)

This:

Not sure where the Dr. Pepper video is posted on here though...

Have it here then!

EDIT: Seems I used a link to the video in a status update before... Unfortunately, I can't view the comments on that status update because the link doesn't work.

http://www.rockraidersunited.com/profile/3457-mumboking/?status=9635&type=status :/

Link to comment
Share on other sites

lol username

Alright, here's what we've found so far. Xiron and I have the same version of the game. I've also installed Iran's version, and compared the two installations and contents of the discs with Beyond Compare. For the sake of simplicity I'll call the version Iran's been using version A, and the version Xiron and I have version B, as the latter seems to be from just a day later.

 

Here's the results for the discs. A on the left, B on the right. Files that are red have differing contents:

 

WfQ193I.png

 

And the installations - here I'm only showing the files that differ so it'll all fit on screen:

 

F2D60ib.png

 

Curiously, it seems that the disc with the earlier version of the game was actually burned after the one with the later version of the game. Go figure.

 

I extracted the z27TRX and z42BRP archives and tested those against each other. The only differences were trexvol01.par in z27TRX, and flame1.par in z42BRP, which both had similar changes made.

 

trexvol01.par had these lines removed in version B:

[EMITS]
trexvol02

And flame1.par had these lines removed in version B:

[EMITS]
smoke2.par

So in version B, this particle effect looks different:

 

2HMxDtT.png

 

hmak2cu.png

 

(The Brickster's in different places there just because I hit him with a pizza at different points)

 

I haven't checked to see what particle effect was altered in T-Rex Racing but it was something similar. I haven't checked to see what the difference between the two manuals is, either.

 

Also, I can change my resolution a-ok on both versions, so that must be a bug specific to Iran's computer.

 

 

  • Like 2
Link to comment
Share on other sites

lol username

I'm using a GeForce GTX 660M. I don't really notice anything, it just... switches resolution.

 

Spoiler

FtiupmC.png

 

fkO7EkR.png

 

(The scroll bar is a lie, there aren't any more options than that)

 

There's another laptop I've used the game on that gives less resolution options - I think the whole hi/low thing is gone.

 

Also, on this laptop, the textures are lower resolution by default, I have to turn "high detail" off and on again every time I play the game to get the full resolution textures. That doesn't happen on the other laptop. In other words, LI2's graphical settings are pretty glitchy and weird.

Link to comment
Share on other sites

mumboking
31 minutes ago, Terrev said:

There's another laptop I've used the game on that gives less resolution options - I think the whole hi/low thing is gone.

The low options are missing for me. They were there earlier... /:|

 

31 minutes ago, Terrev said:

Also, on this laptop, the textures are lower resolution by default, I have to turn "high detail" off and on again every time I play the game to get the full resolution textures. That doesn't happen on the other laptop. In other words, LI2's graphical settings are pretty glitchy and weird.

That setting is messed up for me too. You mentioned it in this thread here:

 

This just happened when I scrolled down in the resolution list... What is MODE1?

Clicking them just takes me back a menu.

large.57294854823c4_MODE1ResolutionSetti

Link to comment
Share on other sites

On Monday, May 02, 2016 at 4:45 PM, Iran said:

-Slow loading time fix: in fullscreen mode (not windowed mode) the game make sure the loading screen pizza animation is smooth by executing a game frame after every small file read, removing this logic speeds up loading time by 10-20 times.

 

large.whentheloadingtimesarejustright.pn

 

I can't believe we've suffered all of this time for a stupid pizza disc animation. Thank you so much for fixing this.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.