AGS engine PSP port

Started by JJS, Fri 15/07/2011 16:27:57

Previous topic - Next topic

Crimson Wizard

Sad to hear. 3 fps drop won't be a problem if that was a drop from 40 to 37. When it drops from 7 to 4 it hurts more, I think :/.
I will try to make few changes to interpreter, removing unnecessary real-time fixups (that turned out to be a bad idea, don't know - or remember - what I was thinking), hopefully that will make it a little faster.

I found I may actually see some difference on Windows, if I run the game with "--fps" argument, then max out fps by Ctrl+E (did not know about that, but found occasionally in the code). In this situation Gemini Rue runs stably at 140 fps in common places; in the rainy rooms it jumps between 133-137, and during gunfights it drops occasionally from 140 to 130-133. Still that's not very accurate estimation, so I'll have no choice but to ask users to report their fps.

lestat666

It's nice to see this isn't dead yet.

I actually came to the psp scene only a year and a bit ago, so it is still very new to me and has plenty of novelty with a huge library of games yet to be played.

With kids... buying the latest thing on the market is just not an option due to expense.

Anyway, if you need any help with testing, let me know.
I can try to see what happens once you make those changes to the script interpreter.  Might be able to get just a few frames that makes all the difference. 

Can those Maniac Mansion saves be fixed or is the current fix you put in that prevents it in the future all that can be done?

And is a converter for the saves from Win to PSP and vice versa and/or between AGS versions, which could fix the MM Saves possible?

Thanks for all your work with this, even though it seems I might be the only person still interested in the psp version at the moment.  :) :smiley:

Crimson Wizard

#182
Quote from: lestat666 on Thu 27/12/2012 02:13:26
It's nice to see this isn't dead yet.
Huh... dead? We just started. :)

Quote from: lestat666 on Thu 27/12/2012 02:13:26
Can those Maniac Mansion saves be fixed or is the current fix you put in that prevents it in the future all that can be done?
And is a converter for the saves from Win to PSP and vice versa and/or between AGS versions, which could fix the MM Saves possible?

Let's clear this out first. The savedgames should be compatible between platforms. That's our goal. If they don't this has to be considered as something to be fixed.
Actually, I thought this is already working, in basic case... I remember JJS mentioned that plugins can save their data too and it is not portable, but I personally haven't looked into that.

Regarding the older savedgames. They were not compatible between some platforms. Additionally, as I said, there was a mistake introduced somewhere in August/September, that made them save and load differently from official 3.21.1115 AGS. Now this mistake is fixed, but this also means that all the games saved in this period became incompatible.

Now, portability is one issue, and it should be dealt with separately.
As for converting older savegames, I hope it will be not difficult, since we have all changes history stored, it's just loading game old way and saving new way.

BTW, I could miss something, where can I see those Maniac Mansion saves?

JJS

#183
QuoteBTW, I could miss something, where can I see those Maniac Mansion saves?
Sorry, didn't know you wanted them too. I uploaded them here now: http://jjs.at/temp/Maniac_Mansion_Saves_AGS.zip

I guess the "dead" comment was more about the PSP port than AGS in general. Honestly I find it pretty hard to keep all the ports working. Somehow they seem to erode over time and even though I think nothing has changed that would break them, they still break either in building or (even worse) while running. :-\


Edit: About plugin compatibility. The opensource snow/rain and flashlight plugins by default save in their own format. While loading they support three cases:
1. No plugin data saved. This happens when the plugin stub is used, that means no plugin was loaded and the plugin functions were just dummies inside the engine. Before the plugins were written this was the only way the ports saved the plugin data.
2. New plugin data. Can be loaded as is.

Then there is a compatibility mode (enabled by a define, only for snowrain) where they will just read as many bytes as the original plugin on loading and write as many 0 bytes on saving. This is just so they can load files that were saved with the original plugin and it is not enabled by default.

Ideally the plugin should detect that it is supposed to load old plugin data but I remember the problem is that there is no interface for seeking back in the savefile exposed by AGS. Just taking the FILE* pointer given by AGS directly still works on the PSP though but not on Windows IIRC.

Really, the best way to have this plugin interface would be that the engine knows exactly how much data a plugin has written and just reads that on load and passes it as a buffer to the plugin. Then on save it should also receive a buffer and write that itself. Then it would be trivial for the engine to just skip a plugin when loading and a plugin could do whatever with the whole saved data.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

Quote from: JJS on Thu 27/12/2012 07:58:36
Really, the best way to have this plugin interface would be that the engine knows exactly how much data a plugin has written and just reads that on load and passes it as a buffer to the plugin. Then on save it should also receive a buffer and write that itself. Then it would be trivial for the engine to just skip a plugin when loading and a plugin could do whatever with the whole saved data.
This is how dynamic objects are deserialized, and those, created by plugins. That would be safer too, I guess.
However, what about the compatibility between little and big endian platforms? Should engine rely on plugin's ability to interpret data properly?

JJS

Interesting question. Right now the plugins read/write in native byte order which is indeed not the best way. Since plugins can save any kind of data (which is just a binary blob to the engine) they have to do the endianness conversion themselves I think.

Maybe - instead of a raw buffer - the plugins should receive a MemoryStream object to which they can write data with endinaness translating methods. Just like the engine does with the game data.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

lestat666

It's interesting to read what you guys are writing back and forth, even though it is all foreign to me.

My programing experience is limited to Touring hehe... grade 11 programming.

Yea.... never even dabbled in visual basic, although I am guessing you guys use c++ which is way over my head.
You are explaining it pretty well though.

You guys all self taught or did you go to school for programming?

Crimson Wizard

Quote from: lestat666 on Fri 28/12/2012 01:07:40
You guys all self taught or did you go to school for programming?
I guess I am ~80% self-taught, but on retrospect, that would hugely simplify things if at least half of that 80% was taught to me by (a good) teacher :). Self-teaching is very much based on trial and error, unfortunately, and that costs more time and effort.

Crimson Wizard

#188
I seem to confused two savegame problems. MMD saves can actually load with the latest engine build, do they? At least I was able to load them on Windows (with small hack which skipped plugin data). I only wonder, why are they so huge related to windows saves. The saved plugin data was about 80 bytes :/.

EDIT: err, actually nevermind. I forgot that saved game incrases in size when player visits more rooms. :)

So, the problem with these saves was crashes in sound system, right?
I'll look into Gemini Rue saves then.

JJS

QuoteI only wonder, why are they so huge related to windows saves :/.
Do you mean they are smaller if you load a game and then save it again in Windows or if you start a new game in Windows and then save it. Because savegames become larger the farther you get in the game since they contain the roomstatus of every room you have visited so far.

E: Well, beaten.

QuoteSo, the problem with these saves was crashes in sound system, right?
Yes, some of them crash in the sound routines after loading.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

#190
Here's savegames for Gemini Rue, that could be loaded with recent build: http://www.mediafire.com/?7ai7boeck2176i2
Please tell if they load for you on PSP. I had to use a hack when loading them on Windows to test if they are working, so it was not a "correct" test.

lestat666

#191
Good news,
The Gemini Saves work now.
Bad news, new saves don't work in the old build where the interpreter has not been changed and Gemini works doesn't run slow.
Guess I will just keep my old saves for this build.

Maniac Mansion saves do not work with the Dec 26th build.
They still need to be converted to work, although I know JJS has fixed this error for future releases.

Bug at the end Maniac still good, so no problems there.

Resonance has some weird red screen when loading, but if you wait long enough, it loads properly.

I guess all that is left now is to fix the realtime interpreter issues you were talking about and converting the MM saves to work.

Crimson Wizard

Quote from: lestat666 on Mon 31/12/2012 11:34:03
Bad news, new saves don't work in the old build.
Well, obviously they don't.

Quote from: lestat666 on Mon 31/12/2012 11:34:03
They still need to be converted to work, although I know JJS has fixed this error for future releases.
If I understood correctly, the saves format is okay, so it does not need to be coverted. The reason is in audio crash. Probably related to what audio state was stored in save game, but I do not know if that is possible to fix this just in there.

lestat666

So these saves will not work then....

It's not that big a deal anyway, since they aren't the main saves.  Only a couple of them are busted...
I can just scrap those two I guess.

So the only thing left then is the real time interpreter stuff.
If that is sped up, then those two games will be fully functional.

Thanks again for taking the time to work on this.

lestat666

Hey there,
I just downloaded the latest daily, dated Jan 17, 2013.

Everything seems to still be working ok with the 3 games, although I can't tell if anything was changed with the script speed issue.  It still isn't as fast as the Aug Build, but it might be minimally faster than the Dec build...  but I can't be sure.

Was anything changed with this?
Was also curious what other updates were done with the newest build.

Crimson Wizard

Quote from: lestat666 on Sat 19/01/2013 03:46:36It still isn't as fast as the Aug Build, but it might be minimally faster than the Dec build...  but I can't be sure.

Was anything changed with this?
Few minor things were changed, and from what you say it seems it did not affect the performance much.
I keep thinking on this problem, but it might take some time before I address it, for I want to make some other changes first.

Shane 'ProgZmax' Stevens

#196
Tested this on my PS Vita and my games launch but suffer from a variety of problems, mostly related to being locked at the low speed of the psp and the limited memory.  If there was a setting to adjust these from inside the emulator that would probably resolve 90% of the issues with it other than some mapped keys not responding. Other than that (and a fit to screen option) I'm well impressed.  In some ways it actually works better than the android version!

lestat666

New PSP build
All three games work great still.

No change in speed.

lestat666

The builds are coming out too fast for me to keep up with =P

So in that case, I will test after every 3 to 5 or so, unless they slow down again.
Hopefully nothing breaks in between those.
Harder to find which build it happened with when I skip a few.
Oh well.
Thanks for keeping the PSP port alive.

Crimson Wizard

Quote from: lestat666 on Sat 02/02/2013 02:58:00
The builds are coming out too fast for me to keep up with =P
:) Yes, we are fixing various errors here and there, which are not directly related to certain port, so unless you played bugged games, you wont notice any difference.
It may probably be better to check after every 2-3 weeks. Or maybe we should print changelog somewhere...

SMF spam blocked by CleanTalk