SDL target for Stella (Atari 2600 emulator)

Since SDL ( http://www.libsdl.org/ ) has been ported to Qtopia
(which is what the Sharp Zaurus Linux-based PDA uses), I decided
I’d try to get Stella ( http://stella.atari.org/ ), the Atari 2600
video game system emulator for Unix, running under SDL (which will mean
in our hands via the Zaurus :^) )

Anyway, I successfully created an SDL target for Stella (based on
Bradford (Stella’s author)'s great X11 code). It’s a little limited
right now:

  • It only handles graphics and input - not sound
    (sound works under Linux/Unix - just handled by Stella’s “SndUnix” code)

  • It ignores requests to resize the window

  • It doesn’t do fullscreen

  • It currently forces 16bpp mode

Most of these issues are because I was lazy (it WAS about 3-4am last night)
and was mostly interested in building it for the Zaurus PDA.

Unfortunately, although it works great on the desktop, and should work
very well on the Zaurus (it can do 240x320, rotated-90-degrees-sideways),
I was unable to cross-compile it because the Embedix compiler toolchain
lacks “libstdc++” - references to "#include " cause it to barf.

In the interest of having people look over it for me (someone in the
#zaurus IRC channel on irc.openprojects.net is right now), I’ve placed
my changes online:

ftp://ftp.sonic.net/pub/users/nbs/unix/zaurus/zstella/

It’s just two files - my “mainSDL.cxx” (which should be dropped in
Stella 1.1’s “src/ui/” directory, in a new “sdl/” subdir.), and
my hacked version of “src/build/makefile”, which includes the
"sdl", “zaurus” and “mainSDL.o” targets.

Feel free to poke around! Bradley - please consider integrating the SDL
port to the main Stella tree. SDL’s a great cross-platform library,
and will help let Stella run under Windows, Unix, Linux, Amiga, MacOS,
BeOS and more, all with pretty much one codebase! :^)

If anyone figures out how to get this baby to cross-compile for ARM
(ie, the Zaurus or Qtopia-based, Linux-based iPAQ), PLEASE let me know! :slight_smile:

Thanks and enjoy!

-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/bill/

> > ftp://ftp.sonic.net/pub/users/nbs/unix/zaurus/zstella/

Ok! Catalin on #zaurus was able to get it to compile, and it appeared
that the problem was that I was using the Trolltech “Contest SDK” for
the Zaurus, rather than Lineo’s Embedix toolchain.

I installed the latter, and have successfully built Stella for the Zaurus!

It has some issues, and I’ve got to run, but you can grab a test version
from the above URL in a few moments.

-bill!On Sun, Apr 21, 2002 at 05:12:09PM -0700, nbs wrote:

Actually, there is already a working SDL version in the CVS of Stella,
which will soon become Stella 1.2. I’m the author of that version. I
guess we could collaborate on development of that version, but I’d rather
if we didn’t both work on the same thing. Better to cooperate than to
create different versions of the same code.

Thanks,
Steve AnthonyOn April 21, 2002 09:42 pm, nbs wrote:

Since SDL ( http://www.libsdl.org/ ) has been ported to Qtopia
(which is what the Sharp Zaurus Linux-based PDA uses), I decided
I’d try to get Stella ( http://stella.atari.org/ ), the Atari 2600
video game system emulator for Unix, running under SDL (which will mean
in our hands via the Zaurus :^) )

Anyway, I successfully created an SDL target for Stella (based on
Bradford (Stella’s author)'s great X11 code). It’s a little limited
right now:

  • It only handles graphics and input - not sound
    (sound works under Linux/Unix - just handled by Stella’s "SndUnix"
    code)

  • It ignores requests to resize the window

  • It doesn’t do fullscreen

  • It currently forces 16bpp mode

Most of these issues are because I was lazy (it WAS about 3-4am last
night) and was mostly interested in building it for the Zaurus PDA.

Unfortunately, although it works great on the desktop, and should work
very well on the Zaurus (it can do 240x320,
rotated-90-degrees-sideways), I was unable to cross-compile it because
the Embedix compiler toolchain lacks “libstdc++” - references to
"#include " cause it to barf.

In the interest of having people look over it for me (someone in the
#zaurus IRC channel on irc.openprojects.net is right now), I’ve placed
my changes online:

ftp://ftp.sonic.net/pub/users/nbs/unix/zaurus/zstella/

It’s just two files - my “mainSDL.cxx” (which should be dropped in
Stella 1.1’s “src/ui/” directory, in a new “sdl/” subdir.), and
my hacked version of “src/build/makefile”, which includes the
"sdl", “zaurus” and “mainSDL.o” targets.

Feel free to poke around! Bradley - please consider integrating the
SDL port to the main Stella tree. SDL’s a great cross-platform
library, and will help let Stella run under Windows, Unix, Linux,
Amiga, MacOS, BeOS and more, all with pretty much one codebase! :^)

Actually, there is already a working SDL version in the CVS of Stella,
which will soon become Stella 1.2.

D’oh! What I get for not peering into CVS last night. :slight_smile:
Oh well, it was fun, and easy. It felt good to finally do something
PRODUCTIVE, even if it WAS redundant. :wink:

I’m the author of that version.

Excellent! Would you mind adding a 90 degree rotation option
(either command-line or compile-time) to the SDL target?

And provide a way (again, either command-line or compile-time) to force the
screen size to 240 wide by 320 high, in this rotated mode?

Also maybe a compile-time option to strip out all of the SDL_Joystick*()
related stuff?

(In other words, just some options to make it run properly on the Zaurus
using SDL :^) More or less everything I did last night.)

Oh… it’ll also need some keyboard tweaks, and perhaps an on-screen
set of controls. (The Zaurus has a QWERTY keyboard, but only 37 keys…
no function keys, for example.) In 240x320 mode, there’s a little bit
of room left below (err… on the side? :^) ) where a nifty woodgrain UI
could go. :wink:

See?

http://www.sonic.net/~nbs/zstella.gif
http://www.sonic.net/~nbs/zstella2.gif

I guess we could collaborate on development of that version, but I’d rather
if we didn’t both work on the same thing.

Well, I can’t contribute much more than I have so far, other than to
clean my code up a bit. I have no idea how Stella does sound, and that’s
a core feature that should be implemented in SDL.

Better to cooperate than to
create different versions of the same code.

Definitely. In the meantime, though, I’m quite happy that I can play
my 2600 games on-the-go (even without sound). :^)

Too bad I don’t know C++ or Qt yet, otherwise I’d be whipping up a
game selector GUI for the Zaurus as we speak. :wink:

!

Thanks!

-bill!
(time to subscribe to the mailing list, methinx!)On Sun, Apr 21, 2002 at 11:49:11PM -0230, Stephen Anthony wrote:

BTW - In case you checked and it wasn’t there yet, I placed the
Zaurus port of Stella on my FTP site.

Here are a couple of screenshots from the embedded version running on
my desktop (the first has palette issues which I fixed by the time I made
the 2nd shot)

http://www.sonic.net/~nbs/zstella.gif - Pole Position
http://www.sonic.net/~nbs/zstella2.gif - Adventure (my #1 fav. 2600 game!)

Enjoy!

-bill!
the busy bee of zaurus coding this weekend!On Sun, Apr 21, 2002 at 06:59:59PM -0700, nbs wrote:

On Sun, Apr 21, 2002 at 05:12:09PM -0700, nbs wrote:

ftp://ftp.sonic.net/pub/users/nbs/unix/zaurus/zstella/

Ok! Catalin on #zaurus was able to get it to compile, and it appeared
that the problem was that I was using the Trolltech “Contest SDK” for
the Zaurus, rather than Lineo’s Embedix toolchain.

I installed the latter, and have successfully built Stella for the Zaurus!

It has some issues, and I’ve got to run, but you can grab a test version
from the above URL in a few moments.