forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

My ps2 game in a CD

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
phenomnon



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue May 27, 2008 5:03 am    Post subject: My ps2 game in a CD Reply with quote

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

Code:
fopen(file, "rb")


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
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Tue May 27, 2008 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
phenomnon



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue May 27, 2008 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Lukasz



Joined: 19 Jan 2004
Posts: 248
Location: Denmark

PostPosted: Tue May 27, 2008 3:59 pm    Post subject: Reply with quote

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 :-)
_________________
Lukasz.dk
Back to top
View user's profile Send private message Visit poster's website
phenomnon



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue May 27, 2008 7:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Thu May 29, 2008 6:52 am    Post subject: Re: My ps2 game in a CD Reply with quote

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
View user's profile Send private message Visit poster's website
cosmito



Joined: 04 Mar 2007
Posts: 314
Location: Portugal

PostPosted: Tue Jun 03, 2008 9:38 am    Post subject: Reply with quote

@phenomnon,

check PM.
Back to top
View user's profile Send private message Visit poster's website
phenomnon



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue Jun 03, 2008 6:38 pm    Post subject: Reply with quote

I finally embebed all files on the ELF using romfs. Very useful tool!!!

Thank you for your replies!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group