GP2X Porting Stella: Need Zlib Maybe Opengl?


zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
First time poster and porter. I'm not new to linux and I got tired of not seeing Stella in the wiki so I took matters into my own hands. I'm fairly adept at editing makefiles and this is what I've managed to get out of the Stella makefile on my Slackware 10.2 machine with the devkitpro and SDL support thru gp2xlibs.

Code:
root@AAZSLK:/home/alex/stella/stella-2.0.1# ./configure --prefix=/home/alex/stella --host=gp2x
Running Stella configure...
Looking for C++ compiler... arm-linux-g++
Checking for compiler version... 4.0.2, ok
Cross-compiling to gp2x, forcing static build, and disabling openGL.
Checking for zlib... no
Checking for png... no
Checking for opengl... no[B]

Summary:
   OpenGL rendering disabled
   Sound support enabled
   Developer/debugger support enabled
   Snapshot support disabled (missing PNG library)
   Joystick support enabled
   Static binary enabled

Looking for sdl-config... /opt/local/gp2x/bin/sdl-config
WARNING: host system not currenty supported

I get the feeling that it is giving me the unsupported error because of the missing zlib. I want to throw the png support in there (although I realize it isn't necessary). As for opengl, I know that there is no hardware 3d acceleration on the GP2X, but if anyone has any ideas I'm all ears. Again, if I haven't supplied enough info just lemme know.

Alex

Edit: OpenGL is not required for Stella to work on Linux, so scratch OpenGL. I do need zlib and libpng (according to Stella Documentation).
 

DJWillis

Random GP32/GP2X/Wiz & Pandora Moocher
Joined
Jul 20, 2003
Messages
1,470
Age
42
Location
Bath, Somerset, UK
Website
www.distant-earth.com
zansatsu posted on Dec 28 2005 at 10:52 AM said:
Edit: OpenGL is not required for Stella to work on Linux, so scratch OpenGL. I do need zlib and libpng (according to Stella Documentation).

Just compile the libs then ;).

If you need GP2X known good source code for libPNG and Zlib then look in the libs-gp2x module on Open2x's CVS.
 
Last edited by a moderator:

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
DJWillis posted on Dec 28 2005 at 06:37 AM said:
zansatsu posted on Dec 28 2005 at 10:52 AM said:
Edit: OpenGL is not required for Stella to work on Linux, so scratch OpenGL. I do need zlib and libpng (according to Stella Documentation).

Just compile the libs then ;).

If you need GP2X known good source code for libPNG and Zlib then look in the libs-gp2x module on Open2x's CVS.

Well how bout that? :lol: I guess porting with a sleep deficit can do that. Thank you. I will get back to you as soon as I've got the libs fired up.
 
Last edited by a moderator:

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
DJWillis posted on Dec 28 2005 at 06:37 AM said:
zansatsu posted on Dec 28 2005 at 10:52 AM said:
Edit: OpenGL is not required for Stella to work on Linux, so scratch OpenGL. I do need zlib and libpng (according to Stella Documentation).

Just compile the libs then ;).

If you need GP2X known good source code for libPNG and Zlib then look in the libs-gp2x module on Open2x's CVS.

OK, I feel like a dope. I can't get CVS to work for me. It prompts for a password once I execute:

Code:
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/open2x login

What is it? Or is there even a password?

Edit: No password, just hit enter at prompt. Moving on! It's better to be thought a fool then open your mouth and confirm it. :unsure: :blink: :lol:
 
Last edited by a moderator:

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
Okie Dokie. Got configure to run finally and now when I go to make, I get this:
root@AAZSLK:/home/alex/stella/stella-2.0.1# make
arm-linux-g++ -static src/emucore/Booster.o src/emucore/Cart2K.o src/emucore/Cart3F.o src/emucore/Cart3E.o src/emucore/Cart4K.o src/emucore/CartAR.o src/emucore/CartCV.o src/emucore/Cart.o src/emucore/CartDPC.o src/emucore/CartE0.o src/emucore/CartE7.o src/emucore/CartF4.o src/emucore/CartF4SC.o src/emucore/CartF6.o src/emucore/CartF6SC.o src/emucore/CartF8.o src/emucore/CartF8SC.o src/emucore/CartFASC.o src/emucore/CartFE.o src/emucore/CartMB.o src/emucore/CartMC.o src/emucore/CartUA.o src/emucore/Console.o src/emucore/Control.o src/emucore/Deserializer.o src/emucore/Driving.o src/emucore/Event.o src/emucore/EventHandler.o src/emucore/FrameBuffer.o src/emucore/FSNode.o src/emucore/Joystick.o src/emucore/Keyboard.o src/emucore/M6532.o src/emucore/MD5.o src/emucore/MediaSrc.o src/emucore/OSystem.o src/emucore/Paddles.o src/emucore/Props.o src/emucore/PropsSet.o src/emucore/Random.o src/emucore/Serializer.o src/emucore/Settings.o src/emucore/Switches.o src/emucore/TIA.o src/emucore/TIASnd.o src/emucore/unzip.o src/emucore/m6502/src/Device.o src/emucore/m6502/src/M6502.o src/emucore/m6502/src/M6502Hi.o src/emucore/m6502/src/NullDev.o src/emucore/m6502/src/System.o src/gui/AboutDialog.o src/gui/AudioDialog.o src/gui/BrowserDialog.o src/gui/CheatCodeDialog.o src/gui/CommandDialog.o src/gui/CommandMenu.o src/gui/DialogContainer.o src/gui/Dialog.o src/gui/EditableWidget.o src/gui/EditTextWidget.o src/gui/EventMappingDialog.o src/gui/Font.o src/gui/GameInfoDialog.o src/gui/GameList.o src/gui/HelpDialog.o src/gui/InputTextDialog.o src/gui/Launcher.o src/gui/LauncherDialog.o src/gui/LauncherOptionsDialog.o src/gui/ListWidget.o src/gui/Menu.o src/gui/OptionsDialog.o src/gui/PopUpWidget.o src/gui/ProgressDialog.o src/gui/ScrollBarWidget.o src/gui/CheckListWidget.o src/gui/StringListWidget.o src/gui/TabWidget.o src/gui/VideoDialog.o src/gui/Widget.o src/common/Cheat.o src/common/CheetahCheat.o src/common/BankRomCheat.o src/common/mainSDL.o src/common/SoundNull.o src/common/SoundSDL.o src/common/FrameBufferSoft.o src/common/FrameBufferGL.o src/common/Snapshot.o -L/opt/local/gp2x/lib -Wl,-rpath,/opt/local/gp2x/lib -lSDL -lm -ldl -lz -lpng -o stella.gpe
/usr/local/devkitPro/devkitGP2X/lib/gcc/arm-linux/4.0.2/../../../../arm-linux/bin/ld: src/emucore/Booster.o: Relocations in generic ELF (EM: 3)
src/emucore/Booster.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [stella.gpe] Error 1

My question is this: What usually leads to this error? What am I missing?

Update: Deleted the files and that fixed the problem. Leftovers from a bad build attempt. Thanx for all your help. I'll keep everyone posted. This is what make clean is for. I need some coffee. :huh:
 

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
Ok. Now that I have an executable on my GP2X, in sterm, I run it and I get:

[root@Linux sd]$./stella.gpe
Error: Couldn't load settings file
SDL_SYS_JoystickInit
ERROR: Unable to open SDL window: No video mode large
enough for 640x480
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
[root@Linux sd]$

It's a start. I can't say that I've ever been excited about an error message, but this one was, by far, an exception. <_<

But bad humor aside, anyone have any ideas on how best to tackle the segmentation fault? I think my first order of business is to work a settings file into the mix to possibly kill one of those messages. The current executable is staticly linked. I've heard it suggested that staticly linked execs are the way to go but with a 7mb exec, I have my doubts. Also, when I went to "make install" I got a "strip failed" message from make. Could this be a symptom of the segmentation fault?

For those interested, this is a pic I took of the terminal output just for hell of it:
http://img314.imageshack.us/my.php?image=img02794od.jpg

Any suggestions are welcome.
 

garteth

Member
Joined
Sep 22, 2005
Messages
207
Location
United Kingdom
Website
Visit site
I think its failing because you need to change the code to run in 320x240. I got this message on an emulator because it was trying to run at too high a res. When I changed it to 320x240 it worked.
 

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
garteth posted on Dec 29 2005 at 01:58 PM said:
I think its failing because you need to change the code to run in 320x240. I got this message on an emulator because it was trying to run at too high a res. When I changed it to 320x240 it worked.

Thanx swf and garteth. I've changed some of the code concerning the resolution and pending a recompilation, I think I might have some of the bugs ironed out. The only thing I have left is to implement the GP2X joystick and I think I'll be ready for testing.

Swf: Thanx for the link. Sometimes the answer is staring you in the face.


Alex
 
Last edited by a moderator:

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
Just an update: I have the Stella gui visible and running on my GP2X. Now I just need to map the joystick/buttons and we are in business. I'm trying not to be overly optimistic as to how well emulation will or won't occur, but I hope to test that soon enough. I will post a screencap as soon as I have control over the gui.

Alex
 

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
Thanx to everyone in the community for the support. I am happy to report that I have successfully run and tested several 2600 ROMs (all seem to run well) and as soon as I have a few GUI and Joystick issues worked out, I will be releasing my Stella port.

Alex
 

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
luteijn posted on Dec 31 2005 at 02:11 PM said:
If you're still getting the failure to strip, make sure you're using the right 'strip' (i.e. one that understands arm binaries; e.g. arm-linux-strip.) try " locate strip | grep bin " to find where you put the proper strip binary..

Pieter

--
http://luteijn.xs4all.nl/html/luteijn.html#gp2x


I know this is probably a dumb question, but what is the purpose of stripping exactly? I have an executable that works extremely well (emulation appears smooth and gameplay is acceptable, minus the joystick dead spot), so I haven't noticed anything out of the ordinary with it. I'm not saying that I'm going to let it go unchecked, quite the contrary, I'm a perfectionist. How does this effect my end result? Thanx for the reply and your time.

Alex


Side note: For all those anxious, as soon as I get back to my linux box (possibly tomorrow or the next day), I will be releasing my Stella port. According to the GPL, I must make the source code available and would not want to violate it by releasing it without the source. As it stands, I'm having to use the rom loader script, available at archive.gp2x.de, as a temporary front end. Stella's gui is un-navigable and impractical (it is resource intensive) on the GP2X, although it does render properly. If anyone knows how best to append the c code and script to the beginning of my port (without too much coding), I'd love to hear from you. Also, sound is not working so I have to go back into the code and see what's happening there. Overall, I think this is the port that everyone has been waiting for but I will let the port speak for itself. Thank you for the support and Happy New Year.
 
Last edited by a moderator:

gfoot

Member
Joined
Nov 15, 2005
Messages
218
'strip' removes symbols (names and debugging data) from executables - its main purpose is to reduce executable size when you don't need this information. It won't have any effect on your program's footprint at runtime, nor its speed, as (AFAIK) the symbol information is not loaded when your program is run.

You should be able to get this information by typing "man strip". Maybe that's not installed though.
 

zansatsu

Certified Guru
Joined
Dec 28, 2005
Messages
121
Location
Atlanta, GA USA
Website
stella.sourceforge.net
What's the framerate like? I heard the 2600 can be a tough machine to emulate.

It seems to be running at full speed without sound. I haven't tested every rom so there might be a few that are slow. As soon as I get everything tweaked and packed, I'll be interested to hear about any issues there are. Once I get the sound enabled, the framerate might change again, but I'll deal with that when the time comes. If everything goes well, I will be releasing it sooner than my previously stated time. I really have very little left to do. It's nice to have more time if I need it, but I will post here the moment I do release Stella.

Alex
 
Last edited by a moderator:
Top