Abuse-sdl


J201605

Active Member
Joined
Aug 18, 2006
Messages
782
Website
google.com
Abuse-sdl is a cool sidescroller with available source and the only library it uses is sdl. Seems like a simple and easy port to the gp2x but you can correct me if im wrong.

http://www.happypenguin.org/show?Abuse-SDL

(this may have already been ported but i couldn't find it when i searched the archive so please don't flame me)

Edit:
I don't want to start another topic so also would there be any interest in porting this http://www.happypenguin.org/show?ACM or this http://www.happypenguin.org/show?Eat%20the%20Whistle

all three of these look cool
 
The Wiki has an entry on it: http://wiki.gp2x.org/wiki/Abuse-SDL

Looks like no port so far, but I don't see any major blockers. (This is probably a good candidate for learning how to port stuff.)
The only tricky bit would be replacing the mouse with the joystick. The actual movement in the game can be remapped to the shoulder triggers and the jump button to one of the A,B,X,Y buttons.
(or something along those lines)
 
hey there.

I had a bit of an email chat witht he author about a year ago, and he said that he was getting a gp2x and wanted to code the port.

It didn't happen I guess, so I'd go for it. No need to be polite any more. But if someone picks it up, they should be serious about it, because the controls will need a bit of work.
 
I just recently installed the dev tools on my computer, and I was thinking about porting Abuse as one of my first projects. I haven't even downloaded the source code yet, so if it turns out someone else is well on the way, then I won't bother... but my idea for controls was to use the L and R buttons to rotate your gun, and then just use the stick and buttons as expected.

--Zero
 
I got as far as compiling it without changing anything so I could see what the speed would be like, but when I tried to run it, it just segv'd.

At that point I lost interest :)
 
Well, I finally gave it a shot... got the whole mess to compile, but all I get is this error message:

abuse.sdl: relocation error: abuse.sdl: undefined symbol: _Unwind_SjLj_Register

I have absolutely no idea how to fix this... I tried searching the web, and as far as I can tell, it's something to do with C++. Beyond that, I'm not sure.

--Zero
 
abuse.sdl: relocation error: abuse.sdl: undefined symbol: _Unwind_SjLj_Register
Well, I figured out what the problem was... well, actually, I have no idea what the problem was, but I got around it by forcing it to link with libgcc.a when compiling and that seemed to work :D

Now it seems to segfault when trying to set a video mode... strangely enough, the Linux version that I run on my desktop does the exact same thing. I guess this'll take a bit more debugging, as the "-size" argument doesn't work properly in abuse-sdl... Is this where you got up to Parkydr?

--Zero
 
Last edited by a moderator:
hi, its where i got to,
tried forcing screen res,
tried 16 depth instead of 8,
tried hw and sw (i'm using paery's sdl), dbl buffering and not.
bombed every combination.
:(

Code:
Added himem block (3072000 bytes)
Memory available : 3071864
SDL_GP2X: CreateDevice
SDL_GP2X: VideoInit
SDL_GP2X: Physical screen = 320x240 (ilace = 0, pol = 0)
SDL_GP2X: InitHWSurfaces
SDL_GP2X: InitHWSurfaces scratch = 0
SDL_GP2X: Creating cursor 16x16
SDL_GP2X: Allocated WMcursor @ 0x1e8ec8 (32)
SDL_GP2X: SurfaceManager allocating 256 bytes
SDL_GP2X: SurfaceManager adding new free bucket of 5242624 bytes @ 0x1e8ee0
SDL_GP2X: SurfaceManager allocated 256 bytes at 0x413f7000
SDL_GP2X: Looking for a mouse
SDL_GP2X: No mice found
SDL_SYS_JoystickInit
SDL_GP2X: SYS_JoystickName(0)
 Abuse (Version 2.00)
Specs : main file set to abuse.spe
Protocol Installed : UNIX generic TCPIP
Lisp : 529 symbols defined, 99 system functions, 321 pre-compiled functions
(load "abuse.lsp") [........................................]
Lisp : tmp space resized to 16384
Engine : Registering base graphics
Palette has changed, recalculating light table...
white light [......................................  ]
tints [..................................	  ]
Unable to open file light.tbl for writing
SDL_GP2X: ListModes
SDL_GP2X: Setting video mode 320x240 8 bpp, flags=0
SDL_GP2X: Freeing cursor 0x1e8ec8
SDL_GP2X: SurfaceManager freeing 256 bytes @ 0x413f7000 from bucket 0x1e8638
SDL_GP2X: merging with next bucket (0x1e8ee0) making 5242880 bytes
SDL_GP2X: FreeHWSurfaces
SDL_GP2X: Freeing bucket 0x1e8620 (size 17825792)
SDL_GP2X: Freeing bucket 0x1e8638 (size 5242880)
SDL_GP2X: InitHWSurfaces
SDL_GP2X: InitHWSurfaces scratch = 0
SDL_GP2X: Creating cursor 16x16
SDL_GP2X: Allocated WMcursor @ 0x1e8ec8 (32)
SDL_GP2X: SurfaceManager allocating 256 bytes
SDL_GP2X: SurfaceManager adding new free bucket of 5242624 bytes @ 0x1e8ee0
SDL_GP2X: SurfaceManager allocated 256 bytes at 0x413f7000
SDL_GP2X: SurfaceManager allocating 76800 bytes
SDL_GP2X: SurfaceManager adding new free bucket of 5165824 bytes @ 0x1e94f8
SDL_GP2X: SurfaceManager allocated 76800 bytes at 0x413f7100
Segmentation fault

edited for code dump
 
It seems that Abuse-SDL's scaling code only supports scaling by an integer multiple of 320x200. In fact, the original code seems to be mostly hardwired for 320x200. I'm tempted to just go through the rendering code and change all occurances of "200" to "240" and see what happens. Extending the viewport by 40 pixels might let you see things you're not supposed to though.

I suppose another way would be to just toss in 40 rows of black pixels under the window and be done with it.

--Zero
 
abuse.sdl: relocation error: abuse.sdl: undefined symbol: _Unwind_SjLj_Register
Well, I figured out what the problem was... well, actually, I have no idea what the problem was, but I got around it by forcing it to link with libgcc.a when compiling and that seemed to work :D

Now it seems to segfault when trying to set a video mode... strangely enough, the Linux version that I run on my desktop does the exact same thing. I guess this'll take a bit more debugging, as the "-size" argument doesn't work properly in abuse-sdl... Is this where you got up to Parkydr?

--Zero

I can't remember, I just remember it dumped. I've still got the files on my PC so I'll give it a go

Edit: Tried it and it crashed while loading the data files but I don't know if they're ok because I couldn't find where I'd put them, so I copied them from my Debian distribution

Edit again: Downloaded the proper files - dumps loadind tints now
 
Last edited by a moderator:
I'm tempted to just go through the rendering code and change all occurances of "200" to "240" and see what happens.
Well, I did just that, and I got it running at 320x240 on my PC... but I still get a segfault on the GP2X. I see a bit of a screen flash just before it segfaults though, so I think I'm getting closer at least.

poddy: How do you get such verbose information from SDL? The only messages I get from SDL are when the program actually crashes.

--Zero
 
Last edited by a moderator:
Back
Top