Page 1 of 1
My ps2 game in a CD
Posted: Tue May 27, 2008 5:03 am
by phenomnon
Hi. I make a ps2 game using ps2sdk and pacogl (i'm sure that you don't know pacogl jejeje, it's a subset of the opengl 1.1 standard for playstation 2 developed on the computer sciences faculty of Las Palmas de Gran Canaria University, Spain.).
That's my problem: I develop, test and use my game using ps2link-ps2client. (ps2client execee host:balls.elf .... ), and it works perfectly, but I burn the .elf and the .tga textures in a mode2 cd, and I load it using swapmagic cd and the textures dont load! The game runs but the textures don't load :( the program can't find them.
What's the problem? Could I embed the textures in the .elf? or load an .irx to read the cd unit?
I read my textures with the typical instruction
and I use in the next values for the
file variable: "data/textures/loading.tga", "host:/data/textures/loading.tga" and "cdfs:/data/textures/loading.tga". No one works :((
Any suggestion?
Posted: Tue May 27, 2008 6:26 am
by Lukasz
I've never heard of pacogl before, is there a homepage? (Can't find anything official on Google)
You can embed the textures in the ELF by using a tool like bin2s/bin2c/bin2o, all included in PS2SDK.
Try
Code: Select all
fopen("cdrom:\\data\textures\loading.tga", "rb");
or the relative host path
Code: Select all
fopen("host:data/textures/loading.tga", "rb");
Remember you don't have access to "host:" unless you run the ELF in a loader like PS2Link.
Posted: Tue May 27, 2008 8:28 am
by phenomnon
If I embed the textures in the .elf, can I access to them using fopen?
For example, fopen("loading.tga", "rb"); or fopen("data/loading.tga", "rb"); ?? I'll investigate this ;)
PacoGL have just reach a "alpha version". In 1 month or 2 we will publish the library on internet. I can tell you that a member of our Videogames Group make work Quake 2 with the library in PS2. He achieved about 5 FPS.., but the game works!
I'll post the url on this forum when the page is online. If u are interested, I can e-mail you the source code.
sorry for my english :P
Posted: Tue May 27, 2008 3:59 pm
by Lukasz
If you wish to use fopen, you can try using romfs from the PS2SDK.
You can check lsdldoom by Jason Yu for an example of how to use it:
http://forums.ps2dev.org/viewtopic.php?p=66358#66358
I found a version of the pacogl source code on Mega Upload:
http://www.megaupload.com/?d=XAHB5TZ0
Looking forward to the official release :-)
Posted: Tue May 27, 2008 7:00 pm
by phenomnon
That's the oldest version of pacogl, the first release. The double buffer don't work and many other bugs. The next release is much better ;). The only "but" is that the illumination (glLight, glEnable(LIGHT_0), etc.) is not implemented.
Re: My ps2 game in a CD
Posted: Thu May 29, 2008 6:52 am
by cosmito
phenomnon wrote:That's my problem: I develop, test and use my game using ps2link-ps2client. (ps2client execee host:balls.elf .... ), and it works perfectly, but I burn the .elf and the .tga textures in a mode2 cd, and I load it using swapmagic cd and the textures dont load! The game runs but the textures don't load :( the program can't find them.
You just need to do some initialization to be able to access the cdfs: device. Grab the source of the PGEN emulador (search inside these forums, the download link is somewhere here) and look how it's done.
I already burned a lot of media just to get it right :)
Don't forget to do the sbv_patch_enable_lmb() - it's crutial for unlock the access to cd device (and others).
Remind me next weeked for me to post a small example if you're in trouble.
Saludos
Posted: Tue Jun 03, 2008 9:38 am
by cosmito
@phenomnon,
check PM.
Posted: Tue Jun 03, 2008 6:38 pm
by phenomnon
I finally embebed all files on the ELF using romfs. Very useful tool!!!
Thank you for your replies!