| View previous topic :: View next topic |
| Author |
Message |
phenomnon
Joined: 15 Jun 2007 Posts: 6
|
Posted: Tue May 27, 2008 5:03 am Post subject: My ps2 game in a CD |
|
|
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? |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Tue May 27, 2008 6:26 am Post subject: |
|
|
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: | | fopen("cdrom:\\data\textures\loading.tga", "rb"); |
or the relative host path
| Code: | | 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. _________________ Lukasz.dk |
|
| Back to top |
|
 |
phenomnon
Joined: 15 Jun 2007 Posts: 6
|
Posted: Tue May 27, 2008 8:28 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
|
| Back to top |
|
 |
phenomnon
Joined: 15 Jun 2007 Posts: 6
|
Posted: Tue May 27, 2008 7:00 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Thu May 29, 2008 6:52 am Post subject: Re: My ps2 game in a CD |
|
|
| 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 |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Tue Jun 03, 2008 9:38 am Post subject: |
|
|
@phenomnon,
check PM. |
|
| Back to top |
|
 |
phenomnon
Joined: 15 Jun 2007 Posts: 6
|
Posted: Tue Jun 03, 2008 6:38 pm Post subject: |
|
|
I finally embebed all files on the ELF using romfs. Very useful tool!!!
Thank you for your replies! |
|
| Back to top |
|
 |
|