http://www.upperland.net/rockbot/
News in the page are still in Portuguese, I did not had the time for translations - feel free to use google translator - but you can have a little idea of how the project is.
Game is made in SDL, and with some adjustments is portable to PS2. It is still in early development and I plan to put the code on sourceforge as soon as I finish the process of creating self-made graphics, because I can't use ones that are copyright from Capcom :)
Introducing Rockbot - a Megaman clone
You can parse the argv[0] path/filename string to figure out from which device your program was started. For the HDD case, the things are trickier, since it's reported as from 'host:'...I'll post a PS2 build once I find out how to load files independently from the place (CD, DVD, HD, MC or MASS) you run the elf.
There are almost infinite ways of doing this, but if you want to spare some dev time, you can use my solution I implemented for ps2doom (and if you spot some bug, warn me please :) ) :
Code: Select all
void GetElfFilename(const char *argv0, char* deviceName, char* fullPath, char* elfFilename)
{
int i;
int lenght = strlen(argv0);
int doispontosIndex = 0;
int slashIndex = 0;
int isFileOnRoot = 0;
// locate '/' from the end of path
for(i=lenght-1; i>=0; i--)
{
if (argv0[i] == '/')
{
slashIndex = i;
break;
}
}
if (slashIndex == 0)
isFileOnRoot = 1; // elf is located on root of device
// locate ':' from the start of path
for(i=0; i<lenght; i++)
{
if (argv0[i] == ':')
{
doispontosIndex = i;
break;
}
}
// set deviceName to device name (ex: 'mass:', 'host:', 'mc0', etc)
strncpy(deviceName, argv0, doispontosIndex+1);
deviceName[doispontosIndex+1] = 0;
// set fullPath to full path (ex: 'mass:directory/', 'mass:directory1/directory2/', etc (no limit over depth))
if (isFileOnRoot)
strcpy(fullPath, deviceName); // fullPath = deviceName actually
else
{
strncpy(fullPath, argv0, slashIndex+1);
fullPath[slashIndex+1] = 0;
}
// set elfFilename
if (isFileOnRoot)
memcpy(elfFilename, argv0 + doispontosIndex + 1, lenght - doispontosIndex);
else
memcpy(elfFilename, argv0 + slashIndex + 1, lenght - slashIndex);
}
Well, beta3 was just released, including builds for PS2 USB and CDROM besides Windows and Linux builds. See information and download it in: http://rockbot.upperland.net
On the PS2 front, the things that need work or are missing:
- find a way to build a decent timer on PS2 that counts milisseconds to fix SDL_Timer
- HDD support
- fix SDL_Mixer
- add a way for SDL to disable bilinear filter in gsKit
Any help is appreciated in those fronts :)
On the PS2 front, the things that need work or are missing:
- find a way to build a decent timer on PS2 that counts milisseconds to fix SDL_Timer
- HDD support
- fix SDL_Mixer
- add a way for SDL to disable bilinear filter in gsKit
Any help is appreciated in those fronts :)
Yes, known bug.
Sadly I did rushed beta3 because I was tired of waiting for people being able to test it, and let it out with 4 or 5 bugs I knew about - shame on me :)
Thanks anyway, the first thing I need to work on beta4 is the collision verification, because of this bug, and one more that allows player to walk in the middle air, because he gets locked into a platform. I did the beta3 in less than a month, beta4 is planned to take 2 or 3 months, and this includes my vacation period, so it should be pretty solid :)
Sadly I did rushed beta3 because I was tired of waiting for people being able to test it, and let it out with 4 or 5 bugs I knew about - shame on me :)
Thanks anyway, the first thing I need to work on beta4 is the collision verification, because of this bug, and one more that allows player to walk in the middle air, because he gets locked into a platform. I did the beta3 in less than a month, beta4 is planned to take 2 or 3 months, and this includes my vacation period, so it should be pretty solid :)