| View previous topic :: View next topic |
| Author |
Message |
LBGSHI
Joined: 07 Aug 2006 Posts: 136
|
Posted: Sat Jun 28, 2008 11:18 am Post subject: |
|
|
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... _________________ I may be lazy, but I can...zzzZZZzzzZZZzzz... |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Sat Jun 28, 2008 5:01 pm Post subject: |
|
|
| 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... |
You need to install gsKit before SDL, as SDL requires it for graphics.
Assuming you already have PS2SDK installed, the following will checkout gsKit and SDL from subversion, as well as build and install.
| Code: |
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 ..
|
This will install SDL into $PS2SDK/ports.
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 :-) _________________ Lukasz.dk |
|
| Back to top |
|
 |
LBGSHI
Joined: 07 Aug 2006 Posts: 136
|
Posted: Sun Jun 29, 2008 2:39 pm Post subject: |
|
|
Thanks very much.
| Quote: | | 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 :-) |
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 :)
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: |
i_main.c:28:17: SDL.h: No such file or directory
make: *** [i_main.o] Error 1
|
...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 may be lazy, but I can...zzzZZZzzzZZZzzz... |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Sun Jun 29, 2008 7:31 pm Post subject: |
|
|
If you read the included README.PS2, you would see that you need to use Makefile.ps2 to compile the source.
| Code: | | make -f Makefile.ps2 |
_________________ Lukasz.dk |
|
| Back to top |
|
 |
LBGSHI
Joined: 07 Aug 2006 Posts: 136
|
Posted: Mon Jun 30, 2008 1:58 am Post subject: |
|
|
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. _________________ I may be lazy, but I can...zzzZZZzzzZZZzzz... |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Mon Jun 30, 2008 3:17 am Post subject: |
|
|
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
| Code: | | make -f Makefile.ps2 clean all |
This command will remove all the objects files and compile the source for PS2. _________________ Lukasz.dk |
|
| Back to top |
|
 |
LBGSHI
Joined: 07 Aug 2006 Posts: 136
|
Posted: Mon Jun 30, 2008 11:45 am Post subject: |
|
|
Awesome; thanks! That worked perfectly. _________________ I may be lazy, but I can...zzzZZZzzzZZZzzz... |
|
| Back to top |
|
 |
dirsors
Joined: 04 Mar 2008 Posts: 17 Location: Porto Alegre, RS, Brazil
|
Posted: Sun Nov 30, 2008 9:57 am Post subject: |
|
|
| Any news, updates, new releases or updates for this port? |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Wed Dec 03, 2008 8:50 am Post subject: |
|
|
| dirsors wrote: | | Any news, updates, new releases or updates for this port? |
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. |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Mon Dec 15, 2008 8:04 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Tue Dec 16, 2008 3:09 am Post subject: |
|
|
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 :-) _________________ Lukasz.dk |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Mon Dec 22, 2008 12:13 am Post subject: |
|
|
| 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... |
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 :) |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Mon Dec 22, 2008 12:21 am Post subject: |
|
|
| 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 :-) |
Yes, debugging SDL is no appealing to me much. Without decent debugging tools it can be a very time consuming task.
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. |
|
| Back to top |
|
 |
dirsors
Joined: 04 Mar 2008 Posts: 17 Location: Porto Alegre, RS, Brazil
|
Posted: Thu Dec 25, 2008 9:19 am Post subject: |
|
|
Also,
You should know that Doom music is in MIDI format. The question is: how could the PS2 play Doom music? Is there a "midi synthesizer" on PS2 hardware? |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Dec 25, 2008 4:13 pm Post subject: |
|
|
| Actually, DOOM's music is in MUS format. Most DOOM ports convert the MUS score into a MIDI score, then play that with timidity. My own port (for the PSP) actually plays the MUS score directly. |
|
| Back to top |
|
 |
theli
Joined: 14 Nov 2008 Posts: 1 Location: Ukraine,Kyiv
|
Posted: Sat Dec 27, 2008 12:02 am Post subject: |
|
|
| why bother with sdl for doom port? |
|
| Back to top |
|
 |
dirsors
Joined: 04 Mar 2008 Posts: 17 Location: Porto Alegre, RS, Brazil
|
Posted: Sat Jan 17, 2009 11:23 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Mon Jan 19, 2009 9:46 am Post subject: |
|
|
| 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? |
Hi,
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 :) |
|
| Back to top |
|
 |
kouky

Joined: 25 Sep 2007 Posts: 48 Location: London
|
Posted: Tue Jan 20, 2009 9:31 pm Post subject: |
|
|
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 :) _________________ softwares for artists on video game systems - http://www.pikilipita.com |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Wed Jan 21, 2009 9:50 am Post subject: |
|
|
| kouky wrote: | | Cosmito, I would like to know how you force PAL signal in your Doom port. |
Hi,
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.
| 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 :) |
Hmmm are you searching at the right places? Please look here :
http://svn2.assembla.com/svn/pedroduarteps2dev_public/lsdldoom_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. |
|
| Back to top |
|
 |
dirsors
Joined: 04 Mar 2008 Posts: 17 Location: Porto Alegre, RS, Brazil
|
Posted: Tue Feb 03, 2009 12:49 am Post subject: |
|
|
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:
| Code: |
$ 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'm using MSYS. What can I do? |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Tue Feb 03, 2009 8:52 am Post subject: |
|
|
| LBGSHI already reported that issue... It seems a MinGW issue, I'm afraid. With cygwin romfs compiles perfectly. |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
|
| Back to top |
|
 |
mazxim
Joined: 24 Jan 2008 Posts: 23
|
Posted: Wed Feb 25, 2009 11:18 am Post subject: |
|
|
Thank you!
I'm glad to see good coders having fun while tribute historical masterpiece games. I'm gonna try it soon. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri Feb 27, 2009 5:24 pm Post subject: |
|
|
Your RabidSwear link gives an error. |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sat Feb 28, 2009 8:27 am Post subject: |
|
|
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.
Last edited by cosmito on Sat Feb 28, 2009 9:35 pm; edited 1 time in total |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Sat Feb 28, 2009 5:56 pm Post subject: |
|
|
Great job on adding sound support Cosmito! I've updated my original Doom post at my website, linking to your website for further updates on the port. Keep up the good work. _________________ Lukasz.dk |
|
| Back to top |
|
 |
protomank
Joined: 18 Dec 2008 Posts: 64 Location: Porto Alegre, RS, Brazil
|
Posted: Sat Feb 28, 2009 10:03 pm Post subject: |
|
|
Question, why not you guys fix SDL Mixer instead of creating a new sound system?
While it is good for doom, if SDL Mixer worked well, more people would benefit.
Just my 2 cents. |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Sun Mar 01, 2009 7:49 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
protomank
Joined: 18 Dec 2008 Posts: 64 Location: Porto Alegre, RS, Brazil
|
Posted: Sun Mar 01, 2009 8:41 am Post subject: |
|
|
Thnaks for the information, I'll try to take a look once I got a bit better into PS2 development and have a free time.
Anyway ps2 doom is great, keep the good work :D |
|
| Back to top |
|
 |
|