Here’s the initial version of Worm Warrior for The Gemei A330:

Worm Warrior screenshot

Worm Warrior for the Gemei A330

This version plays slow, and will crash occasionally when pressing start to begin the game.

To install this, copy the WormWarrior folder to the ‘Game\3D’ folder on the internal storage of the A330.

To play, select WormWarrior.cc underApplications. The WormWarrior.cc file may need to be renamed to WormWarrior.c2d depending on the firmware.

The start button start the game.

To control the game:

Move – Directional pad

Fire – A button

Start – Start button

To exit, press Start and Select buttons at the same time.

 

Thanks to Another World, on the GBATemp forums, I fixed a hard coded path issue. If the game was placed in any folder, other than ‘/PSP/Game/WormWarrior’, the game would fail to load. I fixed the problem by using relative paths. I had initially tried this, but, when running under PSPLink, the current working directory is ‘host:’ rather than the game folder.

The new version can be downloaded from:

Worm Warrior PSP

PSPLink is an excellent way to troubleshoot PSP issues, but causes issues with flickering screens, input, and exiting. I initially thought my rendering code was bad; but once I compiled to an EBOOT file all of the problems disappeared. This ate up a lot of time to figure this out, D’oh!

My favorite sound system, Hekkus Sound System (HSS), work nicely on the PSP when recompiled with the latest DevKitPro toolchain. I made one change to ensure the buffer size is correct: in the sceAudioChReserve function I wrapped the second function parameter with the PSP_AUDIO_SAMPLE_ALIGN() macro. HSS only supports a 44,100 playback frequency on the PSP.

PSP paths must be in the form “ms0:/PSP/GAME/GameName”, some of the code I saw used “ms0:PSP/GAME/GameName”. The second format seems to work fine with the SceIo functions, but fopen requires the first and SceIo has no problem with it.

Here’s the port of Worm Warrior to the PSP:

Worm Warrior PSP Screenshot

Worm Warrior PSP

To install, copy the ‘WormWarrior’ folder, in WormWarriorPSP.rar, to the ‘PSP\GAME’ folder on the memory card or PSP.

The game will work on a PSP with normal or custom firmware, as it was signed with PSPcrypter. If the signed version doesn’t work on a PSP with custom firmware, copy the EBOOT.PBP in the ‘Alt’ folder to ‘PSP\GAME\WormWarrior’ folder.

To play use:

Directional Pad to move

X to shooter

Start to start the game

Home to exit.

Here are the Worm Warrior sources:

Sunplus MP8000 - This contains a slightly modified version of libgame, and should compile cleanly with the SPMP8k development kit downloaded from the internet. The archive also contains LodePNG and Game STL (gstl). I had to use the Game STL since pushing a value into a std::vector would freeze on the second push. It contains the source for two unused libraries, FastLZ and FastXml. The code can also be compiled for Windows using Visual Studio 2010 Express edition or higher and SDL 1.2.15 extracted into a  SDL-1.2.15 subdirectory.

Game Gadget and MotoMagx - This contains the same stuff as the Sunplus version in addition to the Hekkus Sound System compiled for each platform, using SDL sound. I am unable to distribute the source code to my SDL port, as it is typically distributed by the author. The Game Gadget version can be compiled with either the Game Gadget toolchain under Ubuntu or the Dingux toolchain under Windows. The MotoMagx version can be compiled with the MotoMagx toolchain under Ubuntu or andLinux/coLinux (on Windows).

Didj - This contains the source, minus the Hekkus Sound System, FastLZ, and FastXml sources. The Didj version can be compiled with the Windows Didj toolchain. There are linux toolchains located here (I would link to the blog posts, but the links are wrong).

I changed to a 16 bit blitter which fixed the non-transparent issues. Sound effects are also implemented, but only one can be played at a time and starting a new sound effects stops the last one. Music is not implemented, as midi is the only supported music format. There also is no documented way of creating a sound buffer that can notify the game when more sound data is needed.

The new version can be downloaded from the same location:

Sunplus 8000 Worm Warrior

Thanks to AleMaxx and Triple Oxygen for their code. The Sunplus port was developed using libgame and based on the keydemo sources, and Triple Oxygen’s audio demo.

I added the following to the gfx_types.h header file to create a 16 bit bitmap:

#define IMG_TYPE_16BPP 0

… created the bitmap using:

uint8_t bitmapID;
 
gfx_loadimg_t  loadImg;
 
uint16_t pImageBuffer = new uint16_t[SCREENWIDTH * SCREENHEIGHT];
 
loadImg.data = pImageBuffer;
loadImg.width = SCREENWIDTH;
loadImg.height = SCREENHEIGHT;
loadImg.img_type = IMG_TYPE_16BPP;
loadImg.unk2 = 0;
loadImg.pal_data = NULL;
loadImg.pal_size = 0;
loadImg.unk3 = 0x80;
 
gfx_load_image(&loadImg, &bitmapID);

… and blitted the bitmap to the screen using:

gfx_point2d_t pos;
gfx_rect_t rect;
 
pos.x = 0;
pos.y = 0;
rect.x = 0;
rect.y = 0;
rect.width = SCREENWIDTH;
rect.height = SCREENHEIGHT;
 
gfx_set_colorrop(COLOR_ROP_TRANSP);
gfx_bitblt(bitmapID, &rect, &pos);
 
gfx_flush();
gfx_paint();

The created 16 bit buffer is in RGB565 format, where:

Full red is 0xF800

Full green is 0x07E0

Full blue is 0x001F

And white is 0xFFFF

Here’s my initial port of Worm Warrior to a Sunplus MP8000 based system:

Sunplus MP8000 Worm Warrior

The Sunplus processor is used in many Chinese PSP/MP5 game systems.

I haven’t implemented sound, and I’m attempting to figure out how to do a transparent blit for sprites. Currently every sprite is surrounded with color 0, which should be transparent. The port runs smoothly, and sound should be easy to add.

Move the directory in the archive to the GAME folder on the game system.

To play the game:

The direction pad controls the character and X fires.

Select is start.

O will exit back to the menu.