Quake porting issues
Quake porting issues
Howdy everyone.
I'm porting PocketQuake for the psp, and I'm running into some issues. I'm using the latest version of oopo's psp tool chain build script, and I can't seem to get a lot of math functions to link correctly. Everything compiles fine, but the psp-ld linker complains about not finding a lot of __dfs symbols. I did a search in the libraries, and it looks like what I need is in libiberty.a, I've included it, but everythting is still blowing up.
Basically, it seems I can't use floating point math functions, or anything that does a floating point conversion, Integer math seems to work fine.
Is there a library I'm missing somehow? Or a compiler flag to enable floating point math?
any help would be appreciated.
-PMF
I'm porting PocketQuake for the psp, and I'm running into some issues. I'm using the latest version of oopo's psp tool chain build script, and I can't seem to get a lot of math functions to link correctly. Everything compiles fine, but the psp-ld linker complains about not finding a lot of __dfs symbols. I did a search in the libraries, and it looks like what I need is in libiberty.a, I've included it, but everythting is still blowing up.
Basically, it seems I can't use floating point math functions, or anything that does a floating point conversion, Integer math seems to work fine.
Is there a library I'm missing somehow? Or a compiler flag to enable floating point math?
any help would be appreciated.
-PMF
Another quake porting question
OK, I've made some progress, Everything colpiles and links fine, now I'm trying to debug this thing to get it to work properly.
Does anyone have any hints / tips for debugging? Currently, I'm commenting things out and putting in return statements to change/compile/ and run the EBOOT under the PSE emulator. Is there a way to run a debugger on the EBOOT file?
Or can someone tell me if the psp file functions work under the emualtor? I've been having trouble getting the Quake prog. to log debug info to a file. Every time I try to open /write to a file, it crashes the emulator. I haven't tried it yet on the PSP.
Thanks in advance.
-PacManFan
Does anyone have any hints / tips for debugging? Currently, I'm commenting things out and putting in return statements to change/compile/ and run the EBOOT under the PSE emulator. Is there a way to run a debugger on the EBOOT file?
Or can someone tell me if the psp file functions work under the emualtor? I've been having trouble getting the Quake prog. to log debug info to a file. Every time I try to open /write to a file, it crashes the emulator. I haven't tried it yet on the PSP.
Thanks in advance.
-PacManFan
PSPQuake status update(if anyone is interested)
I've got Quake compiling, and linking for the PSP. I've gone as far as I can go with the PSP emualtor, because it doesn't seem to support va args, or seem to support any File I/O functions. I'm running my Quake test application on my PSP now, and I've successfully got it loading up a .pak file. My next step is to implement the video functions, input, and sound. Network support is on hold right now until someone figures out the PSP net function (maybe it'll be me?!?)
My question is: Does anyone know a good way to quickly go through the change/compile/upload/test cycle on the PSP? It still takes me about 1-2 minutes to make a change, and then get it on the PSP to test. At least now I've got a debug log and I'm not going blind.
-PMF
My question is: Does anyone know a good way to quickly go through the change/compile/upload/test cycle on the PSP? It still takes me about 1-2 minutes to make a change, and then get it on the PSP to test. At least now I've got a debug log and I'm not going blind.
-PMF
This is how I do it:
Keep the KXploit app in the background so it remembers the path. Keep the PSP connected.
After a test run, arrow over to USB mode. Then start coding. When done type make, press Generate files in kxploit (will automatically copy to psp), press circle and arrow over to Game/Memstick/yourtestapp on the PSP and press X. I suppose the kxploit step could be automated better by adding a step to the makefile, that's next on my TODO.
Keep the KXploit app in the background so it remembers the path. Keep the PSP connected.
After a test run, arrow over to USB mode. Then start coding. When done type make, press Generate files in kxploit (will automatically copy to psp), press circle and arrow over to Game/Memstick/yourtestapp on the PSP and press X. I suppose the kxploit step could be automated better by adding a step to the makefile, that's next on my TODO.
After playing around with KXploit.exe, which's found in the folder you installed KXploit Tool in, I've magically discovered that the argument list is as follows: kxploit.exe <PBP to patch> <folder to create on PSP> <output location> <output log> <path to look for arial.ttf?>
For example: kxploit.exe C:\hellopsp\EBOOT.PBP HELLOPSP F:\PSP\GAME
(AFAIK, output log and font path aren't required.)
EDIT: Made a slight mistake...
For example: kxploit.exe C:\hellopsp\EBOOT.PBP HELLOPSP F:\PSP\GAME
(AFAIK, output log and font path aren't required.)
EDIT: Made a slight mistake...
Debugging Quake
Hippo, ector,
Thanks for the tips,
I really wish that PSPE would work. Every time it tries to execute teh code compiled for a va_args (va_start - va_end) function, it crashes. That means it crashes on printf, sprintf, Log(), etc... just about everywhere. The code works on the PSP, I guess the compiler is generating an instruction that the PSPE can't interpret.
Quake is coming along nice. Last night, I got more garbage on the screen. Now I need to keep working out the color map and some of the blitting routines.
-PMF
Thanks for the tips,
I really wish that PSPE would work. Every time it tries to execute teh code compiled for a va_args (va_start - va_end) function, it crashes. That means it crashes on printf, sprintf, Log(), etc... just about everywhere. The code works on the PSP, I guess the compiler is generating an instruction that the PSPE can't interpret.
Quake is coming along nice. Last night, I got more garbage on the screen. Now I need to keep working out the color map and some of the blitting routines.
-PMF
Not long now.
Alright!
I just played my first very crippled game of PSPQuake last night!
Current status:
Controls:
Controls are mapped to the buttons, I may change things around to improve playability.
Video:
The palette needs to be mapped to the correct colors and converted to 16bpp
Audio:
Not implemented.
Network/ Multiplayer:
Not until we can figure out the Network libraries
Today, I'm going to add the audio, work on input mapping, and palette. I also need to go back and look at some video routines I commented out because there were causing crashes.
It's not going to be long now.
I'd just like to say that the only way that this was possible is because I hacked the gcc 4.0.0 toolchain script to remove the SEB/SEH instructions so I could get this running in the PSPE emulator.
-PMF out.
I just played my first very crippled game of PSPQuake last night!
Current status:
Controls:
Controls are mapped to the buttons, I may change things around to improve playability.
Video:
The palette needs to be mapped to the correct colors and converted to 16bpp
Audio:
Not implemented.
Network/ Multiplayer:
Not until we can figure out the Network libraries
Today, I'm going to add the audio, work on input mapping, and palette. I also need to go back and look at some video routines I commented out because there were causing crashes.
It's not going to be long now.
I'd just like to say that the only way that this was possible is because I hacked the gcc 4.0.0 toolchain script to remove the SEB/SEH instructions so I could get this running in the PSPE emulator.
-PMF out.
Re: Not long now.
As I indicated yesterday, a simple -march=6000 on the GCC command line would've removed the Allegrex-specific instructions.PacManFan wrote:I'd just like to say that the only way that this was possible is because I hacked the gcc 4.0.0 toolchain script to remove the SEB/SEH instructions so I could get this running in the PSPE emulator.
Re: Not long now.
Any chance you have tried out on a real psp? Have to be careful with what PSPE allows vs the real thing.PacManFan wrote:Alright!
I just played my first very crippled game of PSPQuake last night!
Current status:
Controls:
Controls are mapped to the buttons, I may change things around to improve playability.
Video:
The palette needs to be mapped to the correct colors and converted to 16bpp
Audio:
Not implemented.
Network/ Multiplayer:
Not until we can figure out the Network libraries
Today, I'm going to add the audio, work on input mapping, and palette. I also need to go back and look at some video routines I commented out because there were causing crashes.
It's not going to be long now.
I'd just like to say that the only way that this was possible is because I hacked the gcc 4.0.0 toolchain script to remove the SEB/SEH instructions so I could get this running in the PSPE emulator.
-PMF out.
Moving closer
I've got PSPQuake running at about 8-9 FPS under the PSPE, I'm at work right now ;) , so I don't have my PSP with me. I briefly ran it last night, but it crashes after about 8 seconds on the loading screen. I've got to debug that when I get home.
Status:
Video:
Colors are all correct now, 8-9 FPS in PSPE emulator, not sure what this translates to on a real PSP. I'm going to put in an option to bump up the processor speed to 333 just in case. I rewrote some of the blit routines to copy from the quake frame buffer to the PSP screen with 8->16bpp color mapping, this could still be tweaked / rewritten in assembler.
Controls:
Still tweaking for playablilty.
Audio:
I put in the low level stuff just a little while ago, no longer crashes, still no sound, maybe later tonight or tommorrow.
Network:
Monitoring the Network "Some sceNet / sceHttpInit usage questions" thread intently.
I'll try to post a screenshot soon.
-PMF
Status:
Video:
Colors are all correct now, 8-9 FPS in PSPE emulator, not sure what this translates to on a real PSP. I'm going to put in an option to bump up the processor speed to 333 just in case. I rewrote some of the blit routines to copy from the quake frame buffer to the PSP screen with 8->16bpp color mapping, this could still be tweaked / rewritten in assembler.
Controls:
Still tweaking for playablilty.
Audio:
I put in the low level stuff just a little while ago, no longer crashes, still no sound, maybe later tonight or tommorrow.
Network:
Monitoring the Network "Some sceNet / sceHttpInit usage questions" thread intently.
I'll try to post a screenshot soon.
-PMF
A screen shot
Here's a screen capture from the PSPE running PSPQuake.
I'm still working on figuring out why some the text isn't drawing correctly, and why the console background image causes it to crash.
-PMF
I'm still working on figuring out why some the text isn't drawing correctly, and why the console background image causes it to crash.
-PMF
Beta test version ready
OK, Here's the deal,
I want to get this release ready ASAP for everyone. The first couple of people to email me get a BETA EBOOT.PBP and the pak file.
A couple of restrictions though:
1)Don't distribute it to everyone else quite yet, I don't want to get slashdotted when this thing is half working.
2) I need feedback for playability / buttons mappings, make some suggestions as to the layout and function.
3) Play test, this is the fun part. report back any crashes /glitches/ graphical errors, etc...
Here's the current status:
Video:
Looks good, runs at about 20 fps (estimate)
Audio:
I'm working on it tonight, hopefully I'll have it by tomorrow.
Controls:
I need some good suggestions as to what to map where.
Networking:
As soon as someone has a Berkley compatible socket API.
Thanks for the help everyone.
-PMF out...
I want to get this release ready ASAP for everyone. The first couple of people to email me get a BETA EBOOT.PBP and the pak file.
A couple of restrictions though:
1)Don't distribute it to everyone else quite yet, I don't want to get slashdotted when this thing is half working.
2) I need feedback for playability / buttons mappings, make some suggestions as to the layout and function.
3) Play test, this is the fun part. report back any crashes /glitches/ graphical errors, etc...
Here's the current status:
Video:
Looks good, runs at about 20 fps (estimate)
Audio:
I'm working on it tonight, hopefully I'll have it by tomorrow.
Controls:
I need some good suggestions as to what to map where.
Networking:
As soon as someone has a Berkley compatible socket API.
Thanks for the help everyone.
-PMF out...
"I'm a little source code, short and stout
Here is my input, here is my out."
Author of PSPQuake and PSPSOne.
Here is my input, here is my out."
Author of PSPQuake and PSPSOne.
-
- Posts: 6
- Joined: Wed Jun 22, 2005 7:51 am
You can send it to a small amount of testers and ask them nicely not to redistribute it, but you can't prevent them since Quake is licensed under the GPL. So PSP-hacker et al could distribute it to all and sundry once they get ahold of a copy.
So PacManFan's original plan is probably best suited for his purpose of having a few people beta test it.
So PacManFan's original plan is probably best suited for his purpose of having a few people beta test it.
Maybe this keymapping would work for a game like quake:
Control view with analog "stick".
Walk forward, backwards and strafe with the buttons on the right (x,o etc).
Select weapon and such with the cross.
Shoot with R and jump with L or vice versa.
This could take a while getting used to, but one would want to be able to look in any direction and strafe etc when playing quake =)
Control view with analog "stick".
Walk forward, backwards and strafe with the buttons on the right (x,o etc).
Select weapon and such with the cross.
Shoot with R and jump with L or vice versa.
This could take a while getting used to, but one would want to be able to look in any direction and strafe etc when playing quake =)
Thanks
Thanks to everyone who responded,
I sent out a beta to the first five who emailed me, and I've already gotten back quite a few usefull comments.
1) The game crashes randomly (I know why now, it's a floating point rounding problem)
2) Controls aren't really mapped to any good inputs (I' m still working on this, I've got a fairly playable setup right now)
3) Framerate could still be tweaked a little.
4) Audio isn't implemented
5) Save and Load don't work.
Most of these things I can fix today.
BTW, I spoke with Malum, the Forum Admin over at PSPHacker.com, and I gave him a copy to preview. He's prepping a news story now, and promised not to distribute anything till I give the go-ahead.
I've got a busy day today fixing bugs
I'll post an update l8r
-PMF out
I sent out a beta to the first five who emailed me, and I've already gotten back quite a few usefull comments.
1) The game crashes randomly (I know why now, it's a floating point rounding problem)
2) Controls aren't really mapped to any good inputs (I' m still working on this, I've got a fairly playable setup right now)
3) Framerate could still be tweaked a little.
4) Audio isn't implemented
5) Save and Load don't work.
Most of these things I can fix today.
BTW, I spoke with Malum, the Forum Admin over at PSPHacker.com, and I gave him a copy to preview. He's prepping a news story now, and promised not to distribute anything till I give the go-ahead.
I've got a busy day today fixing bugs
I'll post an update l8r
-PMF out
"I'm a little source code, short and stout
Here is my input, here is my out."
Author of PSPQuake and PSPSOne.
Here is my input, here is my out."
Author of PSPQuake and PSPSOne.