AGS engine PSP port

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

Previous topic - Next topic

lestat666

K, Gemini Rue is working again.  :cool:

I tried Resonance as you suggested.  Got another blue screen of death, but the exception was a bit different.

I got
Your PSP has crashed.
Exception details:

Exception - Bus error (data)
EPC       - 0884E92C / gro Application.text + 0004A92C
Cause     - 1000001C
Status    - 60008613
BadVAddr  - 01140C04
zr:00000000 at:08C50000 v0:00000001 v1:00000001
a0:00000000 a1:0B9FBF48 a2:00000001 a3:0000006C
t0:08A5942C t1:00000078 t2:08A59434 t3:08C30000
t4:00000000 t5:00000000 t6:08C30000 t7:DEADBEEF
s0:000000F0 s1:08A70000 s2:08B00000 s3:08A70000
s4:08B00000 s5:08A70000 s6:08AB2D90 s7:08A70000
t8:DEADBEEF t9:DEADBEEF k0:0BABFF00 k1:00000000
gp:08A63150 sp:0BABF098 fp:00000054 ra:0884E90C

Is this one hopeless due to the system requirements, or is there possibly another glitch that can be fixed?
Thanks again for all your efforts.

Funny thing I found... BTW, were putting all this effort into getting this deluxe version of maniac mansion working when I found this today.

Night of the Meteor

Although, MMD is almost running perfectly and this project is probably at least a year or two away still.

Joseph DiPerla

I do not see the system requirements as being an issue as Gemini Rue and Resonance are pretty much same as far as graphic intensity. I mean, Resonance might have more sprites and animation on screen going on at once, however, I highly doubt that it would affect gameplay on a psp since the PSP is capable of playing games that are very powerful 3d games. The scripting although might be far more advanced than Gemini Rue, but again, I do not think it would affect its performance on the PSP. At the very least, even if it was a performance issue, Resonance would still play, but it would be choppy.

I am thinking that perhaps it has something to do with the versions of AGS in which both games were compiled with. One being compatible with the port, while the other might still have some bugs to work out.

Correct me if I am wrong people.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

JJS

#142
The only real problem on the PSP is the limited RAM. 64 MiB is just not enough. Cpu-wise it can run most games just fine unless they have a lot of scripting.

E: From the exception log it is pretty clear that Resonance runs out of memory.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Joseph DiPerla

#143
Not that this would be an easy (or possible) task, or even one that would make a difference, but, would it be possible to use PSP storage space as a type of Virtual RAM for the game so it would run? Again, I know VRAM is not an appropriate substitute for RAM, but would that be possible? I am totally pulling that out of my butt as right now I am REALLY sleep deprived since my daughter woke up 7 times during the night and now woke me up at 5:30 am and is up for the long haul.

EDIT: I guess others have thought up the same thing, but are saying its not possible:

http://forums.qj.net/psp-speculation/124574-virtual-ram-using-mem-stick.html
http://share.blog.us.playstation.com/ideas/2010/08/06/psp-virtual-memory/

I have not read this in its entirety, but it might suggest a work around:
http://forums.ps2dev.org/viewtopic.php?p=31028
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

lestat666

That is an interesting concept...

I don't think it is possible, but I guess we will see what JJS says.

I don't hold too much hope for Resonance on the go until the VITA is hacked.

I'll wait for your response with MMD.  Hopefully a lead can be found...
I am pretty sure it doesn't do this in the windows version, or I would have been able to find something on google concerning this, or on the AGS forums.

Thanks JJS.

Joseph DiPerla

#145
Read my modified post above yours lestat.

Edit: Doing this will also free up some memory:  delete a txt file in the flash 0 file that will increase the memory slightly
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

JJS

#146
Not feasible at all because the CPU of the PSP does not have an MMU. This means there is no hardware to translate virtual addresses into physical memory. A software-only MMU replacement would theoretically be possible but hard to implement and absolutely unusably slow at the same time.

Edit: Please don't mess around with flash0! It will not help at all and I don't want you guys to brick your PSP.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

lestat666

I've given up on Resonance for now personally.

I will probably just play in on my computer.

Sane Co.

Any headway with BJ8? I posted the log earlier.

lestat666

Did you try the latest daily?

Here is the link to the dailies.

August 12th is the latest one.

AGS Dailies

Hopefully the next one has MMD and BJ8 bugs fixed.  Gemini Rue is now fixed =)

JJS

#150
R9!

The new version gives more game compatibility because the memory footprint of the engine has been reduced quite a bit (about 12 MB). I did this by replacing the static array for the state-saving rooms (number < 300) by a dynamic allocation scheme. So a lot more games should now load on a PSP 1000 (I got Gemini Rue to run on it).

Resonance might now just be able to start if the additional memory is enabled. But I don't think that it will be playable for long.

The error in Ben Jordan 8 has been fixed (more liked worked around). It was in fact an FPU exception being caused by a multiplication with NAN. It seems to be related to the clock drawing in the library because the clock doesn't work. But at least the game doesn't crash anymore.

Download version R9 from http://jjs.at/software/ags.html


Edit: Fiddled around a bit more and now Resonance is down from ~105 MB to ~68 MB at the point where you take control of the character. These values are from my Windows build which has about a 35 MB overhead. So I suppose it would now run a PSP. Make sure the configuration file has these values:
Code: ini
[compatibility]
enable_extra_memory=1
clear_cache_on_room_change=1


I updated the R9 version and created a daily build. So either of them works as they are the same.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

lestat666

R9 is great!

But I have some good news and bad news about it after testing.

Good news, Gemini Rue is working perfectly.

Resonance actually loads and goes into the game, but it is highly unplayable.  The audio in the videos is very choppy and the actual game runs in slow mo.  I have my psp clocked at 333/166 for the clock speed in game too, and this makes no difference, and I tried the memory settings you had.  So... it loads, no crashing, but the psp cpu is just not strong enough to run it smoothly.  I am sure when there are effects on the screen, this gets even worse.  Again... it is probably due to the 1.8 ghz minimum requirements.

Maniac Mansion Deluxe loads perfectly fine too.
But.... now my saved game will not load to test to see if that bug was fixed......
No saved games load.  When I load them... I get the blue screen of death with this exception error.  Strangely enough, it looks like the same one Resonance had previously.  Here it is.

Exception details:

Exception - Bus error (instr)
EPC       - 04800000 / gro Application.text + FBFFC000
Cause     - 10000018
Status    - 40008613
BadVAddr  - 158E176E
zr:00000000 at:DEADBEEF v0:08A5AA54 v1:08A5AA4C
a0:0901E950 a1:08C58804 a2:00000004 a3:00000000
t0:08C622B4 t1:08C58804 t2:08F9398F t3:0BABBE70
t4:08A5A71C t5:DEADBEEF t6:DEADBEEF t7:DEADBEEF
s0:08C58984 s1:00000006 s2:08C58970 s3:08A7D880
s4:00000001 s5:08A77E90 s6:08C622B4 s7:00000001
t8:DEADBEEF t9:DEADBEEF k0:0BABFF00 k1:00000000
gp:08A643E0 sp:0BABBE98 fp:00000032 ra:08884FC8

It is still amazing you reduced the amount of memory this uses.

Hope these MM Deluxe errors are possibly to fix.... can't win them all I guess.

Thanks for all your hard work, we appreciate it.  :smiley:

JJS

Please try this daily build: http://jjs.at/daily/AGS_for_PSP_2012-08-27_12-41-46.zip

It should fix the save related problem. But that specific bug in MMD should still exist, I haven't implemented any fix for that.


Also thanks for trying Resonance. It's nice to hear that it runs because that proves the effectiveness of the changes. A shame that it is so slow though. The PSP is always clocked at 333 Mhz in AGS, so that it doesn't make a difference is expected.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

lestat666

That worked.
Thanks.

I found another place the previous endgame bug happens. 

The first I mentioned previously, is when you beat the game with Dave.

Again, if you beat the game with one of the other kids and Dave is alive, no glitch.

Now here is where I found the other bug... If you kill Dave off, and then try to beat the game with another kid, same bug.  This is probably because Dave is technically in this ending.  Well, his grave stone is, so the glitch is activated.

It seems it only happens in any of the endings Dave or his gravestone appears.  If he doesn't appear, then the ending is fine.

Do you have any leads or ideas as to what is causing this bug in Maniac Mansion?
Thanks again JJS.

Joseph DiPerla

Is it possible this is a glitch specific to just MMD? In other words, can it be that its game related and not engine related?
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

lestat666

#155
I don't think so...  I hadn't played to the end of it with the windows version, but I tried to find some mention of it on google, and the ags website.

There is no mention of this glitch anywhere, and I looked long and hard, which is what leads me to believe it is engine related.

Any leads on the glitch yet?
Thanks for all your hard work JJS.

lestat666

#156
Have some new info concerning the maniac mansion glitch.

I have played through the PC version with the same characters as I did on the psp version and can officially confirm that the glitch does not exist in the pc version.

I will send you a saved game so you can take a look.  It might help with figuring out the glitch.

Thanks again.

Update to this post.
I tried the new dailies... nothing seems to be working.
In the November release, Gemini Rue and Resonance give me the blue screen of death....
and Maniac Mansion loads, but when I start a save game it either gives me a blue screen without loading, or i walk around for a bit and then get what looks like the blue screen but zoomed in with a red background instead.

In the december release, I get a black screen that says
"You must create and save a game first in the AGS editor before you can use this engine.
If you have just downloaded AGS, you are probably running the wrong executable.
Run AGSEditor.exe to launch the editor.

unable to find ms0:......... etc."

It says something along those lines for all 3 games I tried loading in the December release....
I figured before putting up the exception logs for the Nov daily, it might be beneficial to fix the error in the Dec daily first.
If you want the exception logs, let me know.

Thanks.

Crimson Wizard

#157
Quote from: lestat666 on Wed 05/12/2012 11:25:28
In the december release, I get a black screen that says
"You must create and save a game first in the AGS editor before you can use this engine.
If you have just downloaded AGS, you are probably running the wrong executable.
Run AGSEditor.exe to launch the editor.

unable to find ms0:......... etc."
That seem to be related to some recent changes... I probably know what's wrong (and who did it  :-[). We'll look into this asap.

JJS

#158
The problem is with the MakeAbsolutePath() function because it assumes that paths are always like Windows- oder Unix-paths. But on the PSP they are a weird mixture. You have sort of drive letters (like ms0: or ef0:) and forward slashes. I will commit a (temporary) fix.

The crashes are plugin related... again. It is most definitely something stupid that I did. I won't need crash logs because I can reproduce the errors.

Edit: I spoke too soon. The crash is in the script interpreter. Maybe misaligned data? I will investigate this further.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Crimson Wizard

Quote from: JJS on Wed 12/12/2012 18:09:01
Edit: I spoke too soon. The crash is in the script interpreter. Maybe misaligned data? I will investigate this further.
If that's the case, it won't be difficult to fix. These reads and writes to data of unknown type are located solely in RuntimeScriptValue implementation and could be just replaced with memcpy.

SMF spam blocked by CleanTalk