![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Failed attempt at Wolf3d port within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; So i hate admitting my own failures, but i'd also love to play wolf3d on my psp. Really I was ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
So i hate admitting my own failures, but i'd also love to play wolf3d on my psp. Really I was just hoping to inspire someone with a little more expertise.... And I know about wolf3d on the SNES, almost threw up...
Must admit havent coded anything significant in c in the last 5 years or so, but after finding a Wolf3d linux/SDL port (and gp2x) I thought I'd give it ago. Heres how it went. 1. Its always good to start off with something working, so went to building it on my pc - cygwin style. After building SDL it compiled and ran quite easily, albiet without sound (sound method implementations were deleted by the previous author). 2. On to the PSP. Already had the pspsdk up and running, all the samples compiled and ran ok well. All in all as far as c API's go, i was very impressed. The psp SDL implementation also complied quite nicely. Wolf3d had a few dependancies that weren't implemented in the pspsdk (glob.h!), so hacked the source up a bit (hardcoded loading of shareware versoin, ect). No big deal really. Merged one of the sample makefiles with the one that came with wolf3d and made my very first original eboot. Copied it to my psp... 3. Beginners luck? Never expected it to work first time and it didnt, would of been nice though! Had to run it a couple times just to be sure (i'm running on 2.6, yeah ouch). Each time i was confronted with you typical black screen of death. 4. Debuging, sigh! By the addition of many, many pspdebugprintf calls i was able to ascertain that it was bombing out at a call the the SDL video initialisation. After inspecting the SDL code i figured out that it returned null if i had HW buffering on and specified a non-std screen res (wolf was 320x200). Easy fix, just removed the hardware buffering flag. Recompiled and copied across. Started up again, my printf calls told me that it successfully initialised wolf3d - yet more black screen, sigh. 5. Glimmer of hope. Left it alone for a while, in fact didnt touch the code for a week. Was drinking and playing SNES (on psp of course!), got tired and in my drunken state though it a good idea to see if my wolf3d port had magically started working. Loaded up first time (can tell due to excessive printf statements), but after that - just black, or so I thought! Put the psp down to get another beer - came back to see the wolf3d demo playing through! Sound good? wait for the details. The screen was a lil messed up, how messed up - heaps. Basically it was drawing pixels, from the next line on the current line. See Fig.1 Should be like this But looked like this 1111111111111 11111111111111222222222 2222222222222 22222333333333333344444 3333333333333 44444444 4444444444444 5. Simple fix! Obviously i though this was just due to wolf3d being 320x200 and the psp being 480x272. Changed the SDL init call to the psp's res, hoping for the best - only to see even more of a mess! 6. PSP to PC port. Figured that i may have messed something up in all the hacking (wont say coding as I wasnt real nice to the source), so I figured I'd port my code to the PC, sounds sort of stupid - but seemed like the right thing to do. After removing all psp references (debug printf's, callbacks, etc), i got it to compile and run fine. In 480x272 res aswell! This lead me to believe there are some discrepancies between the psp and pc SDL implementation, to be expected really - nothings really cross platform now is it. 6. Quiting. Well i've now spent many hours on this - to no avail. The psp is not the best env for debugging, and it take about 10min to test each build on the psp (2.6 remember), usb copy -> reset -> load gta -> load loader -> load wolf3d -> hope for the best. I mean there's also the fact that it may never be able to run on a 2.6 psp, due to well know instabilities. Bottom line is i lack the exprience, hopefully someone else out there thinks this is a worthy project! 7. Handover -EBOOT, well I cant upload it (too large), but if anyone wants it pm your email and i'll send it over next week. -Source package, contains only files that differ from when i picked it up (all was too large), the rest of the source can be obtained from http://http://www.bebits.com/app/2718 -You'll need all the *.WL1 files too, shouldn't be too hard to find a SW ver of wolf3d. Try apogee I think - or get me to send them to you. They need to be placed in the same dir as the EBOOT 8. Anyway, I've certainly learnt alot - hope its useful for others out there too, yeah feel free to have a laugh. If all goes according to plan i'll check here on mon and someone will have released a nice wolf3d port. BTW given the half arsed attempt, please dont feel obliged to give me any credit. Cheers, Lock |
|
|
|
|
|
|
#2 |
![]() |
That was a long and nice story. Sounds REALLY bad. Like a chain of bad luck bad.
Hmm, you would have a MUCH easier time if you were on a 1.5 PSP :/ too bad really! Hopefully someone can pick the project up (or you continue to work on it.) Otherwise, thank you for your contribution. And ANYTHING given to the community {except bad PR hehe} helps. No matter what. {Cept lies hehe} Good luck to you. |
|
|
|
|
|
#3 |
![]() ![]() Developer
|
Most certainly a valiant attempt on your part locks =)
Good work for giving it a try, and getting quite reasonably far on it, hopefully another dev may pick up where you left off and have a flick of inspiration and get it working. Either way, even if ultimately it was a failure, was a great read, and a lot better than someone screaming 'I want Wolf3D' lol
__________________
Developer of Airstrike |
|
|
|
|
|
#4 |
![]() Developer
|
Dude! I went through exactly the same problems.. but didn't get past the SDL Init errors (through lack of trying).. then someone reminded me that wolf3d was on the snes and it would be a waste of time to continue.. but hearing your story makes me want to pick up the ball again. I shall take your code and make a start on Monday (I work over the weekend
).. I hope I can get somewhere with it .... just a quick thought for the discussion, does anyone actually know how the PSP determines a break line equivalent for lines of pixels? Shouldn't it be done automatically by SDL: SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) set and forget method.. maybe changing the Uint32 flags will harvest better blitting results?.. That will be one of the first things I try
|
|
|
|
|
|
#7 | |
![]() |
Quote:
he said at the start HE DON'T WANT THE SNES ONE!!!!
__________________
[CENTER]You can hyperlink quotes and the whole box will be a link: [URL=http://forums.qj.net/showthread.php?t=35215][COLOR=DarkRed][QUOTE=ANTONIO_424][CENTER][COLOR=DarkRed]Go for it, and remember, video tape every moment...........I gotta see this :D[/COLOR][/CENTER][/QUOTE][/COLOR][/URL][SIZE=1][B][U][URL=http://forums.qj.net/showthread.php?t=65979]A Ultimate QJ FAQ[/URL][/U][/B]-[B][U][URL=http://forums.qj.net/search.php?do=finduser&u=13500]Topics I'm in[/URL][/U][/B]-[B][U][URL=http://forums.qj.net/f-psp-development-forum-11/t-pps-game-66613.html]My qj game topic[/URL][/U][/B]-[B][U][URL=http://www.psp-programming.com/dev-forum/viewtopic.php?t=962]My psp-prog topic[/URL][/U][/B]-[B][U][URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi]Old QJ Download site[/URL][/U][/B]-[B][U][URL=http://forums.qj.net/showthread.php?t=46926]Only ISO topic[/URL][/U][/B][/SIZE] "You stayed up all night trying to make your psp crash? LOLOL!!" - my brother My PSN name is "icantthinkofone".[/CENTER] |
|
|
|
|
|
|
#13 |
|
Thanks for all the sympathy guys, just thought i'd share my story - hopefully someone will get something from it. The source code I posted was not complete (you need to download rest from another site - see link in orig post), but if anyone wants a full set of source, with eboot and data files just pm me.
Yeah, i tried the SNES version - it was always a poor version of the orig PC game but I would have played it, if it wasnt so damn slow. And as for doom, well I'm on 2.6, need i say more! |
|
|
|
|
|
|
#17 |
|
Nice to see it hasn't died off, its definately got potential. I know the pictures are so screwed up its almost impossible to tell its wolf3d (really, it is impossible to tell if you didnt know!). But, the fact that it plays the demo means that the game is initialising, loading all data files (maps, sprites, etc) and running quite well (good framerate - expected really, games like 15 years old).
Just a few idea's/tips; -all the SDL initialisation code is in the vi_sdl.c file, changing the SDL screen size effects how screwed up the picture is dramatically. I once dropped it down to a res something like 160x200 and it looked like there were 3 wolf3d windows next to each other. Although only the top half of the PSP's screen was being painted, it was actually possible to make out that it was wolf3d playing. Why it looked better at 160x200 than it ever did at 320x200 or 480x272, i have NFI. Maybe the actual res of the wolf3d window, wolf was always quite chunky (pixelated), maybe the PSP SDL implementation is plotting 1 pixel as one pixel when it should be plotting 4 (hope that make sense). -If you can get it to look like wolf3d (see above tip), maybe try mapping the keys correctly. When i had a quick look at it, it seemed quite straighforward. The readmeBlah.PSP file in the psp SDL dir has a listing of what buttons are mapped to which keys. Just because the main menu never gets displayed does not necessarily mean the process is not managing the user's state. For example, if the x button got mapped to enter, its a possibility that a new game would start if you pressed it twice (or something like that). If you mapped all the keys, it may even be playable. If it wasnt valentines day, i might just give it a go myself. And prob will if no one else does. Thanks, for giving this a go guys. |
|
|
|
|
![]() |
| Tags |
| attempt , failed , port , wolf3d |
| Thread Tools | |
|
|