Doom - PS2 Port
I'd love to compile a copy (mostly for educational purposes), but I'm having trouble with SDL. I can grab SDL from the SVN repository (there I don't know if it's important where exactly I store it), but I'm at a loss as to what to do next. Should I compile or install SDL? Should I simply place the SDL include directory in a path according to the source of whatever SDL project I'm trying to compile? Do I (as I've seen mentioned in a very old thread) need to install gsKit first?
A little help would go a long way. I hope I don't sound like I want someone to hold my hand; it's just difficult to find much info...
A little help would go a long way. I hope I don't sound like I want someone to hold my hand; it's just difficult to find much info...
I may be lazy, but I can...zzzZZZzzzZZZzzz...
You need to install gsKit before SDL, as SDL requires it for graphics.LBGSHI wrote:I'd love to compile a copy (mostly for educational purposes), but I'm having trouble with SDL. I can grab SDL from the SVN repository (there I don't know if it's important where exactly I store it), but I'm at a loss as to what to do next. Should I compile or install SDL? Should I simply place the SDL include directory in a path according to the source of whatever SDL project I'm trying to compile? Do I (as I've seen mentioned in a very old thread) need to install gsKit first?
A little help would go a long way. I hope I don't sound like I want someone to hold my hand; it's just difficult to find much info...
Assuming you already have PS2SDK installed, the following will checkout gsKit and SDL from subversion, as well as build and install.
Code: Select all
svn co svn://svn.ps2dev.org/ps2/trunk/gsKit
cd gsKit
make all install
cd ..
svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports/sdl
cd sdl
make all install
cd ..
I dont think these things are documented anywhere, for the most part I just look in Makefiles and source code to figure out how things work :-)
Thanks very much.
It's for that reason that I'd like to write some really good documentation for many things involving PS2Dev.
Anyway, I checked out and installed both gsKit and SDL, which seemed to have worked fine, but I'm still getting this error on attempted make of the Doom source you have hosted on Lukasz.dk:
...which is referencing the line stating #include "SDL.h" in i_main.c. Doesn't including a file with quotation marks usually imply the file should be in the same directory? I do know that with classic ANSI C, it would next check the usr/include dir, but is there another place "SDL.h" should be found? Or, shall I just jam a copy of the file into the source directory of PS2Doom?
I've done much of the same myself (though I'm still learning), and though the lessons learned in doing so have been useful, I think it would have been more useful if I'd spent that time writing functioning code :)I dont think these things are documented anywhere, for the most part I just look in Makefiles and source code to figure out how things work :-)
It's for that reason that I'd like to write some really good documentation for many things involving PS2Dev.
Anyway, I checked out and installed both gsKit and SDL, which seemed to have worked fine, but I'm still getting this error on attempted make of the Doom source you have hosted on Lukasz.dk:
Code: Select all
i_main.c:28:17: SDL.h: No such file or directory
make: *** [i_main.o] Error 1
I may be lazy, but I can...zzzZZZzzzZZZzzz...
If you read the included README.PS2, you would see that you need to use Makefile.ps2 to compile the source.
Code: Select all
make -f Makefile.ps2
Ack, my apologies. Unfortunately this resulted in:
am_map.o: file not recognized: File format not recognized
make: *** [doom.elf] Error 1
After sniffing around a bit in am_map.c, I can't imagine what the issue is...
In any case, sorry to be such a bother, and I do greatly appreciate the help.
am_map.o: file not recognized: File format not recognized
make: *** [doom.elf] Error 1
After sniffing around a bit in am_map.c, I can't imagine what the issue is...
In any case, sorry to be such a bother, and I do greatly appreciate the help.
I may be lazy, but I can...zzzZZZzzzZZZzzz...
The problem is that you have already compiled am_map.c into a x86 am_map.o object. So you need to delete it and compile it for PS2. You can do this with
This command will remove all the objects files and compile the source for PS2.
Code: Select all
make -f Makefile.ps2 clean all
Yes and no... Updates only on an indirect way. I've been exploring how to do basic debugging on the PS2 since with little free time and no basic debugging I'll not go far. But keep tuned to my blog (see above) since any new announcements will be made there instead of here, since ps2dev forums were made ideally for discussing development.dirsors wrote:Any news, updates, new releases or updates for this port?
I've been including the sound routines from prboom+ into Lukasz port and also tried to incorporate Jason's but I only get garbled sound in particular conditions and silence is normal conditions... Let me explain:
After replacing sound routines from prboom+ sources I got only silence. But
when I was debugging it by inserting some printf, suddenly I've got some weird chopping sound - the thing is if I don't do any printf I'll would get only silence! I checked also that the sounds samples being fed to the SDLmixer engine are OK by inspecting the samples sent under debugging prboom+.
I was surprised when I also got no sound from replacing the sound routines from the working Jason's... But I must admit I must do some more checking for this last one. But again, it happened again the same when I did some printf.
Is there something fishy with the SDL_mixer PS2 port? Some kind of thread issues?
Yesterday I was also surprised after looking at the code for PS2 Pang and saw some 'printf("");' statements before and after the SDL mixer Mix_PlayChannel function... This is no coincidence :) And if I remove those printf, I get silence has well.
Unfortunably, weird sound is only what I can get currently with the printf trick, not regular and perfect Doom sounds as in Jason's port.
After replacing sound routines from prboom+ sources I got only silence. But
when I was debugging it by inserting some printf, suddenly I've got some weird chopping sound - the thing is if I don't do any printf I'll would get only silence! I checked also that the sounds samples being fed to the SDLmixer engine are OK by inspecting the samples sent under debugging prboom+.
I was surprised when I also got no sound from replacing the sound routines from the working Jason's... But I must admit I must do some more checking for this last one. But again, it happened again the same when I did some printf.
Is there something fishy with the SDL_mixer PS2 port? Some kind of thread issues?
Yesterday I was also surprised after looking at the code for PS2 Pang and saw some 'printf("");' statements before and after the SDL mixer Mix_PlayChannel function... This is no coincidence :) And if I remove those printf, I get silence has well.
Unfortunably, weird sound is only what I can get currently with the printf trick, not regular and perfect Doom sounds as in Jason's port.
My experience working with the SDL on the Doom port tells me that SDL is by no means complete nor properly tested.
I also briefly tried to make sound work, but the sound support in SDL appears to be far from complete. Jason Yu also confirms this in his post in this thread.
I would personally expect to do some heavy debugging and developing on SDL itself while porting a SDL application to the PS2. Which is also why I had no interest in continuing work on the Doom port :-)
I also briefly tried to make sound work, but the sound support in SDL appears to be far from complete. Jason Yu also confirms this in his post in this thread.
I would personally expect to do some heavy debugging and developing on SDL itself while porting a SDL application to the PS2. Which is also why I had no interest in continuing work on the Doom port :-)
Sometimes I get amazed myself with the rubish I sometimes write :) Indeed I read that from the documentation but I guess the USB drivers are tested enough nowadays :)cosmito wrote:Accodingly to the authors of the USB driver, the write operations weren't enough tested, so there's the risk of data corruption. I may add support to save to USB, but in any way I will be resposible for any data loss...
Yes, debugging SDL is no appealing to me much. Without decent debugging tools it can be a very time consuming task.Lukasz wrote:My experience working with the SDL on the Doom port tells me that SDL is by no means complete nor properly tested.
(...)
I would personally expect to do some heavy debugging and developing on SDL itself while porting a SDL application to the PS2. Which is also why I had no interest in continuing work on the Doom port :-)
So I see two paths :
- Debug it more, specially the inclusing of Jason sound functions into your port (damn, it should work!)
- Forget about SDL_mixer regarding sound and start to use other sound library. SjPCM may be a candidate.
Hi,dirsors wrote:And why the DOOM_no_sound.ELF only loads from USB mass storage device? What's necessary to be HDD (uLaunchelf) compatible?
ps2hdd.irx not loaded?
Well it's necessary to add code to it for HD support.
Currently I'm busy building a sound mixer from scratch so I can replace SDL_mixer from it.
I could add HD support later, not for now. It should be quite simple.
If anyone want to collaborate adding it now, fetch the sources from
http://svn2.assembla.com/svn/pedroduarteps2dev_public/
and be my guest :)
Cosmito, I would like to know how you force PAL signal in your Doom port.
You didn't explain how you mad it and unfortunately your Doom source file does no longer exists.
Sharing your PAL fix would be very helpful :)
You didn't explain how you mad it and unfortunately your Doom source file does no longer exists.
Sharing your PAL fix would be very helpful :)
softwares for artists on video game systems - http://www.pikilipita.com
Hi,kouky wrote:Cosmito, I would like to know how you force PAL signal in your Doom port.
Just to be fair to the authors, it's not my port. 99,9% of the hard work was made by Lukasz and Jason (I'm experimenting with the two ports).
LOL! I was going to say that I'm not forcing PAL nor NTSC since I forgot I added an option to do it :) Well, my memory is funny sometimes.
Both ports use SDL which by his turn uses gsKit. There is a SDL function (PS2SDL_ForceSignal) which tells later PS2_VideoInit to open a PAL or NTSC screen by calling gsKit_init_global.
Hmmm are you searching at the right places? Please look here :kouky wrote:You didn't explain how you mad it and unfortunately your Doom source file does no longer exists.
Sharing your PAL fix would be very helpful :)
http://svn2.assembla.com/svn/pedroduart ... ldoom_PS2/
My "force" call is at l_main.c line 438. Basically I check of the main() args to get the ELF file name, so adding PAL or NTSC at the end of the filename (not the extension of course) triggers the override trick.
I'm trying to compile lsdldoom-v005nosound.
It requires ROMFS, so I got the romfs from the svn repository.
When I tape 'make all install', it shows:
I'm using MSYS. What can I do?
It requires ROMFS, so I got the romfs from the svn repository.
When I tape 'make all install', it shows:
Code: Select all
$ make all install
make -C tools/genromfs all
make[1]: Entering directory `/home/usr/ps2sdk-ports/romfs/tools/genromfs'
gcc -O2 -Wall -c -o genromfs.o genromfs.c
genromfs.c:78:24: netinet/in.h: No such file or directory
genromfs.c:80:28: sys/sysmacros.h: No such file or directory
genromfs.c: In function `romfs_checksum':
genromfs.c:233: warning: implicit declaration of function `htonl'
genromfs.c: In function `fixsum':
genromfs.c:242: warning: implicit declaration of function `ntohl'
genromfs.c: In function `dumpnode':
genromfs.c:349: warning: implicit declaration of function `S_ISLNK'
genromfs.c:353: warning: implicit declaration of function `readlink'
genromfs.c:386: warning: implicit declaration of function `major'
genromfs.c:386: warning: implicit declaration of function `minor'
genromfs.c:395: warning: implicit declaration of function `S_ISSOCK'
genromfs.c: In function `processdir':
genromfs.c:546: warning: implicit declaration of function `lstat'
make[1]: *** [genromfs.o] Error 1
make[1]: Leaving directory `/home/usr/ps2sdk-ports/romfs/tools/genromfs'
make: *** [all] Error 2
$
I (finally) fixed sound for Lukasz's PS2Doom port. I implemented my own mixer engine and got rid of SDLmixer calls.
Get it from :
http://ps2homebrewing.wordpress.com/200 ... d-at-last/
Get it from :
http://ps2homebrewing.wordpress.com/200 ... d-at-last/
Your RabidSwear link gives an error.cosmito wrote:I (finally) fixed sound for Lukasz's PS2Doom port. I implemented my own mixer engine and got rid of SDLmixer calls.
Get it from :
http://ps2homebrewing.wordpress.com/200 ... d-at-last/
The link is now fixed (I'm using 4shared service).
BTW: It's still not impremented yet in this port the changes I made to lsdldoom (adding support for next/prev weapon, game save/load to memory card) but I'll add soon of course.
BTW: It's still not impremented yet in this port the changes I made to lsdldoom (adding support for next/prev weapon, game save/load to memory card) but I'll add soon of course.
Last edited by cosmito on Sat Feb 28, 2009 9:35 pm, edited 1 time in total.
Personally I've found more appealing and even educational for me to write a sound mixer instead of debugging/fixing others people code.
But yes, I see your point. I believe the problem with SDLmixer is a side effect of PS2 cooperative multitasking. The sound playing task seems to be freezed all the time. So this is a hint for anyone willing to dig into it.
Maybe a simple thread switching solution would do the trick, like the one EEUG points over :
http://forums.ps2dev.org/viewtopic.php?t=10294
But yes, I see your point. I believe the problem with SDLmixer is a side effect of PS2 cooperative multitasking. The sound playing task seems to be freezed all the time. So this is a hint for anyone willing to dig into it.
Maybe a simple thread switching solution would do the trick, like the one EEUG points over :
http://forums.ps2dev.org/viewtopic.php?t=10294