Jump to content

Home

EFMI High Resolution


jeunealbert

Recommended Posts

Hi all,

I just tried to switch the game to really high res, since opengl and d3d are pretty resolution independend, so I took my hexeditor and changed at offset 6494 the value 8002 (=640) to 0005 (=1280) and at offset 649B the value E001 (=480) to 0004 (=1024.)

Started monkey4 and the game was running in true 1280x1024.

There are problems with the movies though, but that doesn't really matter.

But there's one big problem: you can't save anymore (well, you can, but you can't load a game, that's saved with this resolution, savegames are slightly bigger than with normal res.)

Does anybody know, how the savegame format looks like? I've figured out, it's gzipped binary data.

Link to comment
Share on other sites

  • Replies 70
  • Created
  • Last Reply

I dont know the format of it, if its like Grim Fandango then the entire heap is just dumped for a save game.

 

The problems with the movies might be because the movies are bink and are handled by bink.dll rather than the engine itself I think.

Link to comment
Share on other sites

Me and Huz are having a look at this at the moment. Right now I'm trying to stop the problem of the crashing save/load, I think I know what's causing it. If I get this sorted then i'll release a program to change the resolution to whatever you want.

 

Well done for spotting this jeunealbert!

Link to comment
Share on other sites

@bgbennyboy

The problem with saving/restoring seems to be related to monkey4 saving a preview image with the savegame, so it's not just a heap dump. The preview image is slightly bigger, thus expanding the whole file and probably moving things to unexpected places so monkey4 chokes upon loading those savegames.

The problem with the movies is bink-related, bink still thinks, the screen is runng at 640x480.

 

@Rapp Scallion

Just search with google and you will find dozens of hexeditors.

Calculating numbers for other resolutions is easy: start windows' calc.exe and switch to scientific view. Switch to decimal view and type your desired width (eg 800.) Switch to hex view and read the value (eg. 0320) switch high- and lobyte (eg. 2003) and you've got the value to be written to monkey4.exe. Do the same for y-res.

 

The offsets that I've mentioned are for monkey4.exe v 1.1, if you've got some other version, it's easy to find the right offsets: search for the hex-value "80 02". There will be some of them, but not so much with the value "E0 01" following a few bytes later. Then it's trial-and-error to find the right ones.

Link to comment
Share on other sites

Yeah, thats what we figured, i'm trying to extract the image data atm, so I can shrink it to the right size and fix the saves. It doesnt seem to be stored in EMI's own TIL format nor in TIF which it also uses. I cant find bitmap, jpeg or gif data either so it might just be stored as raw pixels.

 

Also note that if you change all the hex values you end up changing the value for windowed mode too, so care is needed.

Link to comment
Share on other sites

Me and Huz are having a look at this at the moment. Right now I'm trying to stop the problem of the crashing save/load, if I get this sorted then i'll release a program to change the resolution to whatever you want.

Nice to hear that, bgbennyboy!

I go stuck at that, I disassembled monkey4.exe with http://www.geocities.com/~sangcho/disasm.zip,

which gives a nice output, there are two functions worth looking at: lua_save and sputLua_ThumbnailFromScreen, but I don't know enough about assembly language to really figure it out.

Link to comment
Share on other sites

Right:

 

The image data is stored after the "vQA12" header and is 98308 bytes long (it *might* be 98309). After chopping a new save down so that it fits there were still problems. Throughout the file, the odd byte was different (when compared to a save taken in exactly the same place with the unedited version). There are mention's of resolution in the saves - of 641 (and 1281 in the edited tile). I've been getting Huz to test the save's that i've been making, since I dont have my EMI cds with me, but he's had to go now so I dont know if changing the resolution data in the saves back to 640*480 will have any effect.

Link to comment
Share on other sites

Yes! I fixed it! I accidentally removed that size header before. Now when I crop down the image, the preview is messed up but the save game works!

 

I'll make a program to 'quickly and easily' change the EMI resolution and fix saved games tomorrow :)

Link to comment
Share on other sites

Here's a game for us laymens, at which post in this thread did you stop reading? My arm got whiplash from going over my own head so fast. But hey, good work, this should make playing this on my laptop even better, keep up the good work.

Link to comment
Share on other sites

Didn't make much progress today, disabled the previews in the load screen (now just white boxes), works for old savegames, but as soon as there's a new one, it crashes; I can't imagine, what the load screens tries to read besides the name and the preview...

 

Preview image data is raw image, 256*128 3 bytes per pixel (RGB) = 98,304 bytes. For 1280x1024 it's 512*256 respectively.

Link to comment
Share on other sites

When you say you disabled the previews do you mean that you edited the save file as I did? Or that you patched the exe?

 

If you edited the save then yes, it will crash every time there's a new one, because the save will need 'fixing' every time EMI saves to it.

 

If you edited the exe so it doesnt display the preview, it might still mess up because the fileposition isnt where it expects (its inside all that extra image data that just after it). Of course thats just a theory.

 

Serge and I are having a go at fixing it through the assembly. That is, Serge is and i'm trying desperately to keep up :p

Link to comment
Share on other sites

I've patched the exe to not load the image data from the savegame.

 

I don't think, it's crashing because savegamedata isn't at an expected position, I think, it's just because it's allocating a buffer, that's too small and thus overwriting memory, when loading the imagedata anyway.

 

As far as I can tell the size of the image data isn't hardcoded in the exe.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...