Sunday, June 16, 2013

Game Sounds


In the midst of my last post I noticed that dronz had rearranged his blog and posted some screenshots of his latest french version of the iz2jffs.  They look quite pretty with that shiny blue background.  I'm somewhat jealous, gotta get me some of that.  I wonder what happened to the older blog posts though.  They don't seem to be available via his archives link.  I know I referenced some of them from this blog way back when I was working on the keyboard, so now I have to go back and review all my old posts for dead links.  Maintaining things on the internet can be quite a drag sometimes.

And speaking of change, I also saw the gmenu2x tabs were reworked, perhaps to sync up better with the gmenu2x from slugs openwrt jffs.  It looks like the utilities and terminal tabs have been dropped in favor of games and programming.  While I'm not sure programming requires it's own tab, I do have to admit I've been somewhat delinquent with the games.  After all, the zipit shares quite a bit in the form-factor department with other portable game systems.  So it should naturally be fully stocked with games.

But what've we got so far?  Doom, nethack, some rockbox games, and an fceu port without sound.  I'm sure there are some others, but nowhere near enough to fill up the games tab.  So I got busy, prowling through the sdl game list links, searching for anything appealing that might scale down to the zipit.

The first thing I spotted was opentyrian.  That seemed to be available on just about everything.  I grabbed the latest sources and built it with the dingux settings but it was painfully slow.  Huh?  Turns out the current sound code is full of floating point ops used to emulate the ancient opl sound hardware.  Now why would they do that?  This was originally a DOS game.  So I dug back in time and found an earlier port for the gp2x that was apparently done before someone went crazy with the floating point.  I built 2 more versions of the executable with that source --- one with sloppy 8bit sound for speed, and one with higher quality 16 bit sound.  I prefer the one with the better sound, but it runs slow when music is enabled and things are really happening in the game.  So I disabled music by default, but you can turn it on if you want via the esc menu.


Next I tried mozzwald's port of ohboy from openwrt.  I was hoping it'd have better keyboard support than the rockbox gnuboy plugin.  I'm not sure why the openwrt build doesn't include the splash screen image, but I guess it isn't really required.  Unfortunately, I'm still stuck on this one.  The menu runs, but not the games, so I put it on the backburner for now.

I have about half a dozen prospects from the sdl game list.  My reflexes are shot, so I need to find some puzzle games like sokoban for me.  Slug also mentioned cards, so I'm on the lookout for a card game that doesn't require a mouse to manipulate the cards.  Of course, wouldn't you know, the first thing I got working was another space shooter game, InsanerzShooter.

It works, despite the use of floats in the particle system.  That actually looks like an easy fix if I decide it's needed.   But for some reason the SDL_mixer lib doesn't like the oss audio driver, and the alsa driver on iz2jffs is my hacked build with extra buffering to reduce the skippies in rockbox.  This means all the laser and explosion sounds arrive about a second late.  Or is that the way it's supposed to be because of the speed of sound in a vacuum?  Heh.  I need to go way back in time and review my documentation on the SDL alsa environment variables that I added to let me tweak the hacked buffer settings.

Goodies will be posted soon.

Update:

Looks like I'm falling behind with the goodies.  Oh well.  Soon, I promise.  I had a refreshingly challenging week at work, and I also got distracted by some other games like blockdude and several different flavors of solitaire for the zipit console and SDL.  I'll get it all sorted out someday...

And here's a little note-to-self:  Walrus45 reminded me --- yet again --- to see what's up with the save function in fceu.   So I'll have figure out how to get past level 1 in something.

opentyrian-iz2s.zip

insanerz-iz2s.zip


Tuesday, June 4, 2013

Cable Guy

One thing I dislike about the zipit is the power adapter.  The connector seems flimsy, and in fact the tiny plastic end sometimes comes off the connector and lodges inside the zipit.  I happen to have one zipit in that sad state right now, unable to get a charge.  This got me thinking again about the Dell Axim x50 and it's expansion cable with the zipit compatible 36 pin connector.  Now I've got a reasonable excuse to make a purchase and see it the Axim cable can be modified for use with the zipit, like for instance as USB charge cable.  So I picked one up online and took it apart.

The connector hood is held together by two screws and some fairly weak clips so it's easy to disassemble.  Here you can see the two screw holes on the left, and the 4 red, black, white, and green USB wires, (is that a standard?) along with 2 jumper wires connecting ground and power to multiple pins.

Here it is from another angle.  And one more shot with the hood removed.  Sorry about the sloppy photography.  I might try to get some better shots.
The interesting thing about this connector is that although it looks very similar to the one from Hirose that's popular with the zipit folks, it's not the same.  The top and bottom rows of pins inside the connector are physically swapped.  Odd numbered pins are routed to the bottom of the Hirose connector, but are sent to the top of the Axim connector.  This threw me for a loop when I tried to match up the colored wires to various online documents describing the Axim pinout.

Next up, I gotta move the wires to different pins so it can charge the zipit.  Wish me luck...