Re: Quake on the Chumby

(I was only half-serious, too. Actually, less than half. About 20%. smile )

Re: Quake on the Chumby

The biggest problem I had with the keyboard / mouse was figuring out which was which.  They both show up as /dev/input/eventX, where X is a number between 1 and lots.  Which is a bit of a problem, because SDL has a very clear idea of what's a mouse and what's a keyboard, while Linux's input_event system doesn't.  So if one were to come up with a working system, it would need to re-implement the handle_mouse() and handle_keyboard() functions in SDL_fbevent.c

Re: Quake on the Chumby

Well, considering this is the original Quake, mouse support isn't wholly necessary. Definitely helps for multiplayer, but then the Chumby needs one more USB port than it currently has.

Re: Quake on the Chumby

darundal wrote:

Definitely helps for multiplayer, but then the Chumby needs one more USB port than it currently has.

I typically use a cheap USB hub, or a keyboard (like some of the old Apple iMac ones) that have a built in hub.

Re: Quake on the Chumby

Duane wrote:

like some of the old Apple iMac ones

The new ones do, too. I think.

(I'll let you know for sure when my shiny new iMac shows up, hopefully today! smile )

Re: Quake on the Chumby

Yeah, the new Apple keyboards do.

Re: Quake on the Chumby

So thanx for SDL. I have tried to compile SDL but all test doesn't work. With your SDL, that's work now. Thanks wink

Re: Quake on the Chumby

I've a problem when I want to recompile the test application:

/usr/lib/gcc/arm-linux/4.1.2/../../../../arm-linux/lib/libSDL.so: undefined reference to `__clear_bit'
/usr/lib/gcc/arm-linux/4.1.2/../../../../arm-linux/lib/libSDL.so: undefined reference to `__set_bit'
collect2: ld returned 1 exit status

When I do the make of SDL I had:

./src/video/fbcon/SDL_fbevents.c:1377: warning: conflicting types for 'keychange'
./src/video/fbcon/SDL_fbevents.c:1212: warning: previous implicit declaration of 'keychange' was here
./src/video/fbcon/SDL_fbevents.c: In function 'process_keys':
./src/video/fbcon/SDL_fbevents.c:1521: warning: passing argument 2 of 'test_bit' from incompatible pointer type
./src/video/fbcon/SDL_fbevents.c:1521: warning: passing argument 2 of 'test_bit' from incompatible pointer type
./src/video/fbcon/SDL_fbevents.c:1544: warning: passing argument 2 of 'test_bit' from incompatible pointer type
./src/video/fbcon/SDL_fbevents.c:1544: warning: passing argument 2 of 'test_bit' from incompatible pointer type

Can you help me?

Thanx

Re: Quake on the Chumby

darundal wrote:

Yeah, the new Apple keyboards do.

It's been so long since I've had a desktop Mac - I've just been using Powerbooks and Macbooks for a decade now.

Re: Quake on the Chumby

You can try this non-atomic version of clear_bit, which ought to work in what it is you're doing.  Grabbed from the non-atomic.h file out of the sys-include directory of the toolchain I used:

#define BITS_PER_LONG 32
#define BITOP_MASK(nr)      (1UL << ((nr) % BITS_PER_LONG))
#define BITOP_WORD(nr)      ((nr) / BITS_PER_LONG)
static inline void __clear_bit(int nr, volatile unsigned long *addr)
{
    unsigned long mask = BITOP_MASK(nr);
    unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);

    *p &= ~mask;
}

Re: Quake on the Chumby

For the CHUMBY_TS, on the event SDL_MOUSEBUTTONUP I've dx=0 and dy=0. You don't have set this setting because you don't need it (I should do myself) ?? Or pehaps I have a bug ??

Thanx

Re: Quake on the Chumby

I've remove the line 1253:                 //~ dx = 0; dy = 0; relative = 1;

I think that's working!

Re: Quake on the Chumby

I downloaded this to my thumbdrive and replaced the demo pak files, with the real ones from the original quake to have the full game, it runs so surprisingly well on my chumby i was totally blown away, that sweet sound of retro pc game sound, tottaly love it, with the chumbys accelerometers it gives the game a whole new way to play it. Respect to the programmer / re-coder

Whats driving me nuts though, is not being able to swim up/down, have you seen the iphones version of quake with the onscreen buttons?
would running some sort of flash overlay to add a few buttons be a way to get a few more buttons? Like maybe just one in each corner, one for switch weapon so your not stuck with a shotgun when theres zombies around to explode with grenades, one for jump, one for swim down, one for swim up. anyway, its just an idea.

-----------------------------------------------------------------------

Re: Quake on the Chumby

Just tried this on the chumby one as I'm interested in trying some hacks using SDL.  sdlquake fails during startup with "Error: VID: Couldn't load SDL: Unable to open mouse".  There's an earlier line about opening the accelerometer failing "Opened accel driver.  FD: -1", so I assume this is a hardware difference in what device is used to access that information.

Any chance of a new build that works on the C1?  Also, if you use the CodeSourcery toolset described in http://wiki.chumby.com/mediawiki/index.php/Scratchbox, is softfloat available?

Re: Quake on the Chumby

Yes, it should be possible to use the new toolchain.  This all was built before we went EABI, so I had to pull that trick to get softfloat.  Everything is softfloat now, so there shouldn't be much of an issue.  Maybe even network support would work now.

Also, yes, the accelerometer behaves completely differently on the C1.  It lives in the kernel on the chumby classic, but it's an ordinary i2c device on the C1.  And since it's what acts as the mouse, the accelerometer is kind of a big part of it.