GP32 xrick


harminoff

Still Fresh
Joined
Jun 11, 2003
Messages
41
ok has anyone got xrick to compile?? everytime i try, i get errors. I found out it was missing some files, and that i needed to put a bin in c:/ but i still get errors, any help anyone?
 
It compiles fine here. If you get errors, make the directory c:\gp32 (or change the makefile path) and the subdirs include and libs -->

copy the following files to c:\gp32\libs\

libc.a 1,511,120
libgcc.a 230,224
libgpfont.a 23,648
libgpg_ex01.a 40,158
libgpgraphic.a 58,482
libgpmem.a 8,270
libgpos.a 12,544
libgpsdk.a 20,614
libgpsound.a 11,840
libgpstdio.a 109,396
libgpstdlib.a 13,306

and the following files to c:\gp32\include\

defines.h 1,012
gp32.h 196
gpdef.h 1,593
gpfont.h 1,849
gpfont_port.h 350
gpfontres.dat 62,669
gpgraphic.h 5,883
gpmem.h 2,645
gpmm.h 1,097
gpos_def.h 2,509
gpsockdef.h 1,855
gpstdio.h 3,988
gpstdlib.h 1,625
initval_port.h 1,763
 
I've played a little with the xrick sourcecode just to change controls because jump with the dpad is a pain :( -->

button B: fire
button A: jump

syskbd.c

line 19: int syskbd_fire = GPC_VK_FA; --> int syskbd_fire = GPC_VK_FB;
line 20: int syskbd_fire2= GPC_VK_FB; --> int syskbd_fire2= GPC_VK_FA;

control.h

line 21: #define CONTROL_FIRE2 0x100 --> #define CONTROL_FIRE2 0x08


I've compiled it and works perfectly :)

@sdw: Can you release the source code of xrick 1.2, or at least apply my changes and release the new executable?
 
I'll try to put together a releasable version of the source code sometime, but I can't say when it will be done.
About making those changes, I'm not so sure, since I'm guessing there are a few Rick Dangerous purists (like me) who thinks the controls should be as in the original game.
But once I release the source code, you can ofcourse make your own version.
 
if u have up and a button as jump (like the st emulator) theres no problem,
the user chooses how to play

and its not got anything to do with being true to the game
the gp32s joystick is very weak, and mine has become very unresponcive
recently making diagonal movements quite hard and i don't think its gonna
get any better,

a button for jump is gonna help anyone whos warn there joystick
down a bit, unresponcive controls and rick doesn't mix, and unless
my gp32s just a one off more and more people are going to be
having issues with there gps joystick over time
 
sdw i was woundering when you were planning to release your code, because i would like to add some stuff before I go on vacation for 2 weeks.
 
also in the source code, there is 3 cheats, but i dont think they were used in the original code because they just say cheat1=0 or something like that, i know that one of them gives you full ammo,people. I just cant figure out how to make it work. and a600 the control edit you said, thats not the actual place to edit it, its in e_rick.c and pretty easy to change/find, have a look
 
if u have up and a button as jump (like the st emulator) theres no problem,
the user chooses how to play

and its not got anything to do with being true to the game
the gp32s joystick is very weak, and mine has become very unresponcive
recently making diagonal movements quite hard and i don't think its gonna
get any better,

a button for jump is gonna help anyone whos warn there joystick
down a bit, unresponcive controls and rick doesn't mix, and unless
my gp32s just a one off more and more people are going to be
having issues with there gps joystick over time
My GP has the same problem. A Jump button would be very good!
 
Last edited by a moderator:
i cauld relaese a jump button, but save and hi score wont be there, thats why im waiting for srw's release. also here is the rick dang. music lib. link
 
harminoff posted on Jul 2 2003 said:
also here is the rick dang. music lib. link

Thanks for the link but I already added all level musics to the release I posted at gp32spain.com.

I've added hi-score saving. I spent two hours with the damned gp32 file system because I forgot to add GpFatInit() :(

Also I'm going to add a savegame feature: If you pass a level, a file is saved and you can select that level in the main screen with left/right buttons next time you play. So the password codes aren't needed :)
 
Last edited by a moderator:
A600 posted on Jul 3 2003 said:
Thanks for the link but I already added all level musics to the release I posted at gp32spain.com.

I've added hi-score saving. I spent two hours with the damned gp32 file system because I forgot to add GpFatInit() :(
Umm.. Couldn't you have waited for me to put together and release my source if you wanted to update xrick? Now we have what I belive one of the drawbacks of open source - incompatible versions. People who have played my version and have a highscore file will probably lose their scores with your version (unless you named the file the same and used the same format)
 
Last edited by a moderator:
ok im trying to get fire2 to work,

here is my devtools.c


[/CODE]
/*
* xrick/src/scr_devtools.c
*
* This source code file is part of the xrick distribution, and as such is
* copyrighted. Please read the README file in the root directory of the
* distribution for information about copyrights, trademarks, license,
* disclaimers, etc.
*/

#include "system.h"
#include "game.h"

#include "control.h"
#include "screens.h"
#include "draw.h"
#include "sprites.h"
#include "maps.h"

/*
* DevTools
*/

U8
devtools_run(void)
{
static U8 seq = 0;
static U8 pos = 0;
static U8 pos2 = 0;
U8 i, j, k, l;
U8 s[128];

if (seq == 0) {
sysvid_clear();
game_rects = &draw_SCREENRECT;
#ifdef GFXPC
draw_filter = 0xffff;
#endif
seq = 1;
}

switch (seq) {
case 1: /* draw tiles */
sysvid_clear();
draw_tilesBank = 0;
sprintf(s, "TILES@BANK@%d\376", pos);
draw_setfb(4, 4);
draw_tilesListImm(s);
k = 0;
for (i = 0; i < 0x10; i++) {
draw_setfb(80 + i * 0x0a, 14);
draw_tile((i<10?0x30:'A'-10) + i);
draw_setfb(64, 30 + i * 0x0a);
draw_tile((i<10?0x30:'A'-10) + i);
}
draw_tilesBank = pos;
for (i = 0; i < 0x10; i++)
for (j = 0; j < 0x10; j++) {
draw_setfb(80 + j * 0x0a, 30 + i * 0x0a);
draw_tile(k++);
}
seq = 10;
break;
case 10: /* wait for key pressed */
if (control_status & CONTROL_FIRE)
seq = 98;
if (control_status & CONTROL_FIRE2)
seq = 40;

if (control_status & CONTROL_UP)
seq = 12;
if (control_status & CONTROL_DOWN)
seq = 13;
if (control_status & CONTROL_RIGHT)
seq = 11;
break;
case 11: /* wait for key released */
if (!(control_status & CONTROL_RIGHT)) {
pos = 0;
seq = 21;
}
break;
case 12: /* wait for key released */
if (!(control_status & CONTROL_UP)) {
if (pos < 4) pos++;
seq = 1;
}
break;
case 13: /* wait for key released */
if (!(control_status & CONTROL_DOWN)) {
if (pos > 0) pos--;
seq = 1;
}
break;
case 21: /* draw sprites */
sysvid_clear();
draw_tilesBank = 0;
sprintf(s, "SPRITES\376");
draw_setfb(4, 4);
draw_tilesListImm(s);
for (i = 0; i < 8; i++) {
draw_setfb(0x08 + 0x20 + i * 0x20, 0x30 - 26);
draw_tile((i<10?0x30:'A'-10) + i);
draw_setfb(0x08 + 0x20 + i * 0x20, 0x30 - 16);
draw_tile((i+8<10?0x30:'A'-10) + i+8);
}
for (i = 0; i < 4; i++) {
k = pos + i * 8;
draw_setfb(0x20 - 16, 0x08 + 0x30 + i * 0x20);
j = k%16;
k /= 16;
draw_tile((j<10?0x30:'A'-10) + j);
draw_setfb(0x20 - 26, 0x08 + 0x30 + i * 0x20);
j = k%16;
draw_tile((j<10?0x30:'A'-10) + j);
}
k = pos;
for (i = 0; i < 4; i++)
for (j = 0; j < 8; j++) {
draw_sprite(k++, 0x20 + j * 0x20, 0x30 + i * 0x20);
}
seq = 30;
break;
case 30: /* wait for key pressed */
if (control_status & CONTROL_FIRE)
seq = 98;
if (control_status & CONTROL_FIRE2)
seq = 40;

if (control_status & CONTROL_UP)
seq = 32;
if (control_status & CONTROL_DOWN)
seq = 33;
if (control_status & CONTROL_LEFT)
seq = 31;
if (control_status & CONTROL_RIGHT)
seq = 40;
break;
case 31: /* wait for key released */
if (!(control_status & CONTROL_LEFT)) {
pos = 0;
seq = 1;
}
break;
case 32: /* wait for key released */
if (!(control_status & CONTROL_UP)) {
if (pos < SPRITES_NBR_SPRITES - 32) pos += 32;
seq = 21;
}
break;
case 33: /* wait for key released */
if (!(control_status & CONTROL_DOWN)) {
if (pos > 0) pos -= 32;
seq = 21;
}
break;
case 40:
sysvid_clear();
#ifdef GFXPC
if (pos2 == 0) pos2 = 2;
#endif
#ifdef GFXST
if (pos2 == 0) pos2 = 1;
#endif
sprintf(s, "BLOCKS@%#04X@TO@%#04X@WITH@BANK@%d\376",
pos, pos + 4*8-1, pos2);
draw_setfb(4, 4);
draw_tilesBank = 0;
draw_tilesListImm(s);
draw_tilesBank = pos2;
for (l = 0; l < 8; l++)
for (k = 0; k < 4; k++)
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) {
draw_setfb(20 + j * 8 + l * 36, 30 + i * 8 + k * 36);
draw_tile(map_blocks[pos + l + k * 8][i * 4 + j]);
}
seq = 41;
break;
case 41:
if (control_status & CONTROL_FIRE)
seq = 98;
if (control_status & CONTROL_FIRE2)
seq = 40;

if (control_status & CONTROL_UP)
seq = 42;
if (control_status & CONTROL_DOWN)
seq = 43;
if (control_status & CONTROL_LEFT)
seq = 44;
if (control_status & CONTROL_PAUSE)
seq = 45;
break;
case 42:
if (!(control_status & CONTROL_UP)) {
if (pos < MAP_NBR_BLOCKS - 8*4) pos += 8 * 4;
seq = 40;
}
break;
case 43:
if (!(control_status & CONTROL_DOWN)) {
if (pos > 0) pos -= 8 * 4;
seq = 40;
}
break;
case 44:
if (!(control_status & CONTROL_LEFT)) {
pos = 0;
pos2 = 0;
seq = 21;
}
break;
case 45:
if (!(control_status & CONTROL_PAUSE)) {
#ifdef GFXPC
if (pos2 == 2) pos2 = 3;
else pos2 = 2;
#endif
#ifdef GFXST
if (pos2 == 1) pos2 = 2;
else pos2 = 1;
#endif
seq = 40;
}
break;
case 98: /* wait for key released */
if (!(control_status & CONTROL_FIRE))
seq = 99;
break;
}
break;
case 40: /* wait for key released */
if (!(control_status & CONTROL_FIRE2))
seq = 41;
break;

}

if (control_status & CONTROL_EXIT) /* check for exit request */
return SCREEN_EXIT;


[/CODE]
#ifndef _CONTROL_H
#define _CONTROL_H

#define CONTROL_UP 0x08
#define CONTROL_DOWN 0x04
#define CONTROL_LEFT 0x02
#define CONTROL_RIGHT 0x01
#define CONTROL_PAUSE 0x80
#define CONTROL_END 0x40
#define CONTROL_EXIT 0x00
#define CONTROL_FIRE 0x20
#define CONTROL_FIRE2 0x10

#define CONTROL_FIRE3 0x200


extern U16 control_status;
extern U16 control_last;
extern U16 control_active;

#endif

/* eof */
Code:
  if (seq == 99) {  /* we're done */
    sysvid_clear();
    seq = 0;
    return SCREEN_DONE;
  }
if (seq == 41) {  /* we're done */
    sysvid_clear();
    seq = 0;
    return SCREEN_DONE;
  }

  return SCREEN_RUNNING;
}

/* eof */[CODE]

ok xrick does weird stuff when you change the 0x10 or leave it at that. i know that f2 suppose to be 0x40, but that doesn't work either.
 
Source is released, see topic about it in the "news" section of this forum.

I have messed around a bit with the makefile to get it working with devkitadv, so if you use something else you might have to change it a bit.
 
Back
Top