QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Failed attempt at Wolf3d port

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 ...

Reply
 
LinkBack Thread Tools
Old 02-10-2006, 12:06 AM   #1
 
Join Date: Nov 2005
Posts: 8
Trader Feedback: 0
Default Failed attempt at Wolf3d port

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
Attached Files
File Type: zip wolfSource.zip‎ (44.6 KB, 22 views)
locks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 01:15 AM   #2
 
Join Date: Jul 2005
Posts: 298
Trader Feedback: 0
Default

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.
Who Knows is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 06:05 AM   #3

Developer
 
Smerity's Avatar
 
Join Date: Jun 2005
Location: Sydney, Australia
Posts: 128
Trader Feedback: 0
Default

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
Smerity is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 10:29 AM   #4
Developer
 
BlackPhoenix's Avatar
 
Join Date: Dec 2005
Location: UK
Posts: 149
Trader Feedback: 0
Lightbulb

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
BlackPhoenix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 12:27 PM   #5
 

 
Join Date: Jun 2005
Location: Canada
Posts: 1,486
Trader Feedback: 0
Default

This also could be due to you running it on a 2.6....it may run just fine on a 1.5...I'd like to get the eboot, or the hacked source and I will just compile it myself...
__________________
PSN: Shatterdome
Shatterdome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 12:33 PM   #6
 
Join Date: Jul 2005
Posts: 1,562
Trader Feedback: 0
Default

working attempt of wolf3d port -
get the snes rom and a snes game.... or use the wolf3d doomwad
Simpson17 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 01:22 PM   #7
 
 
Join Date: Jul 2005
Location: Brampton
Posts: 631
Trader Feedback: 0
Default

Quote:
Originally Posted by Simpson17
working attempt of wolf3d port -
get the snes rom and a snes game.... or use the wolf3d doomwad
You didn't even read the topic did you????
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]
lord pip is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 08:25 PM   #8
 
Join Date: Jul 2005
Posts: 1,562
Trader Feedback: 0
Default

what about the doom wad....
Simpson17 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-10-2006, 10:03 PM   #9
PREMIUM Member
 
Join Date: Jul 2005
Posts: 27
Trader Feedback: 0
Default

Well your port could be perfectly fine, and you wouldnt even know it since your testing it on 2.6.
Very few homebrew works on 2.6.

Get your hands on a 1.5 if you can and test it on that
TerryHau is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-11-2006, 07:40 AM   #10
 
Join Date: Feb 2006
Posts: 4
Trader Feedback: 0
Default

Has anyone else compiled the code? It might work just fine on a 1.0-1.5 or 2.0
crash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-11-2006, 10:48 AM   #11
 
Robert88's Avatar
 
Join Date: Dec 2005
Location: Columbus, OH
Posts: 92
Trader Feedback: 0
Default

what do you compile it with
i have time all day to do it
Robert88 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-11-2006, 03:03 PM   #12
 
will1234's Avatar
 
Join Date: Oct 2005
Real First Name: Will
Location: Sheffield, UK
Posts: 844
Trader Feedback: 0
Default

your source wont even compile under my pspsdk
will1234 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-12-2006, 01:12 PM   #13
 
Join Date: Nov 2005
Posts: 8
Trader Feedback: 0
Default

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!
locks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-13-2006, 07:10 AM   #14
Developer
 
BlackPhoenix's Avatar
 
Join Date: Dec 2005
Location: UK
Posts: 149
Trader Feedback: 0
Default

Check your PM's locks!

I'd be willing to check your source and test the eboot on both my 1.5 & 2.01 PSPs. I've got all day... hell I got all week :icon_wink
BlackPhoenix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-13-2006, 02:36 PM   #15

Is in your zone.
 
Mast3r_Shak3's Avatar
 
Join Date: Oct 2005
Location: Jacksonville, FL
Posts: 3,429
Trader Feedback: 0
Default

It doesnt work on 2.00, it looks like this
__________________

--XBL Gamertag: PhenoM904--
Mast3r_Shak3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-13-2006, 07:58 PM   #16
Developer
 
BlackPhoenix's Avatar
 
Join Date: Dec 2005
Location: UK
Posts: 149
Trader Feedback: 0
Default

I got the source and have tested it on my 1.5 & 2.01 and this is the result:

1.5


2.01


I'm gonna be tweeking the code to see if I can make it playable..
BlackPhoenix is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-13-2006, 10:34 PM   #17
 
Join Date: Nov 2005
Posts: 8
Trader Feedback: 0
Default

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.
locks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
attempt , failed , port , wolf3d

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 05:14 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us