jeunealbert Posted April 12, 2004 Share Posted April 12, 2004 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 More sharing options...
Benny Posted April 12, 2004 Share Posted April 12, 2004 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 More sharing options...
Rapp Scallion Posted April 12, 2004 Share Posted April 12, 2004 Hey, I wanna do this too Please tell me how. And it would me nice if you could post the numbers for the other resolutions aswell. Is that hex-program for download? Or do you know about a downloadable one? -Rapp Scallion Link to comment Share on other sites More sharing options...
Benny Posted April 12, 2004 Share Posted April 12, 2004 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 More sharing options...
jeunealbert Posted April 12, 2004 Author Share Posted April 12, 2004 @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 More sharing options...
Benny Posted April 12, 2004 Share Posted April 12, 2004 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 More sharing options...
jeunealbert Posted April 12, 2004 Author Share Posted April 12, 2004 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 More sharing options...
Gabez Posted April 12, 2004 Share Posted April 12, 2004 This sounds great! Any chance of some screenshots for lazy people like me? Link to comment Share on other sites More sharing options...
Benny Posted April 12, 2004 Share Posted April 12, 2004 There's thumbnailfromfile and screenshotforsavegame functions too. Unfortunately I dont know assembly either :~ Link to comment Share on other sites More sharing options...
jeunealbert Posted April 12, 2004 Author Share Posted April 12, 2004 At offset 23386 I changed another occurence of 80 02 to 00 04. It's right before calling _BinkBufferBlit. Now the videos are visible, although not scaled. I think, it's the best we can get. Link to comment Share on other sites More sharing options...
Benny Posted April 12, 2004 Share Posted April 12, 2004 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 More sharing options...
jeunealbert Posted April 13, 2004 Author Share Posted April 13, 2004 I don't have a "vQA12" header, for me it's "v1.1" +0x00. I think the imediately following three bytes are the length of the image data, for 640x480 savegame it's 00 80 01, ie. 98,304 dec., for 1280x1024 it's 00 00 06 = 393,216 dec. Link to comment Share on other sites More sharing options...
Benny Posted April 13, 2004 Share Posted April 13, 2004 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 More sharing options...
Gabez Posted April 13, 2004 Share Posted April 13, 2004 *drools at thought of such a program* Link to comment Share on other sites More sharing options...
James Isaac Posted April 13, 2004 Share Posted April 13, 2004 Wow - that sounds really great Good work. Link to comment Share on other sites More sharing options...
Mafiozi Posted April 13, 2004 Share Posted April 13, 2004 Cool, ill replay the gaeme again then.. P.S.Hey maybe u can make something like this for Grim Fandango? Link to comment Share on other sites More sharing options...
Udvarnoky Posted April 13, 2004 Share Posted April 13, 2004 Nice job! I like things! Link to comment Share on other sites More sharing options...
Joshi Posted April 13, 2004 Share Posted April 13, 2004 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 More sharing options...
Benny Posted April 13, 2004 Share Posted April 13, 2004 I tried it with Grim Fandango too, unfortunately the backgrounds dont scale up in that so its no good. Link to comment Share on other sites More sharing options...
Thrik Posted April 13, 2004 Share Posted April 13, 2004 Hee. That looks funky. Also, Gabez! IRC >: Link to comment Share on other sites More sharing options...
Mafiozi Posted April 13, 2004 Share Posted April 13, 2004 Originally posted by bgbennyboy I tried it with Grim Fandango too, unfortunately the backgrounds dont scale up in that so its no good. Hmm..Too bad Maybe u missed somethiing?? Link to comment Share on other sites More sharing options...
Benny Posted April 13, 2004 Share Posted April 13, 2004 No Link to comment Share on other sites More sharing options...
jeunealbert Posted April 14, 2004 Author Share Posted April 14, 2004 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 More sharing options...
Benny Posted April 14, 2004 Share Posted April 14, 2004 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 Link to comment Share on other sites More sharing options...
jeunealbert Posted April 14, 2004 Author Share Posted April 14, 2004 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.