HunterDavis.com 4.0!

4Oct/09126

Z2 gaming and system update – GBA, GB/GBC, ScummVM (Sam and Max/Full Throttle Full Talkie), auto-login to Fluxbox on boot

So now that the Z2 is running debian and everything is working, it's really easy to install new programs and emulators. They are even automatically added to the fluxbox right-click mouse menu. I haven't changed or recompiled a single C file this time, this is fully "general public" ready! Here's what I've been playing with this weekend.


Before we get to the fun stuff, let's set up fluxbox to start (no more console login required)

  1. edit a file called /etc/init.d/flux
  2. the contents of this script should read

    #!/bin/sh
    su root -c startx
  3. now just: update-rc.d flux defaults
  4. Fluxbox should now start up on boot!
  • VisualBoyAdvance (GBA) runs about 10% speed with gba roms, 70% speed with gb/gbc roms. I'm guessing a straight gb/gbc emulator may run 100%
  • Scummvm runs perfectly with sound, movies, voice, everything!! when you set scale=1x in the .scummvmrc
    1. Monkey Island 2 - 100% perfect
    2. Full Throttle - 100% perfect!
    3. Zak McKracken - 100% perfect
    4. Beneath a Steel Sky - 100% perfect
    5. Flight of the Amazon Queen - 100% perfect
    6. Indiana Jones and the Fate of Atlantis - 100% perfect
    7. Indiana Jones and the last Crusade - 100% perfect
    8. Maniac Mansion - 100% perfect
    9. Simon the Sorceror 2 - Full CD Talkie - 100% perfect
    10. Sam and Max hit the road - Full CD Talkie - 100% perfect
Comments (126) Trackbacks (2)
  1. Hunter, squeeze appeared to be working well, I removed it and started from scratch… I got the same error again, with a freedma message…This time i tried to use mpg123…

    I have also built a very cool ui setup, and some scripts to connect to wireless. I just need to figure out this sound issue…

    What do you think the permissions issues could be?

    pxa_free_dma: trying to free channel 0 which is already freed
    pxa_free_dma: trying to free channel 0 which is already freed
    pxa_free_dma: trying to free channel 0 which is already freed

  2. hey soundguy,

    Not sure what’s going on here. Could be alsa has a handle to the device, and isn’t playing nice with oss? What processes are running? Anything funny in the dmesg log? This is a new one on me…. Would be interested to see your UI setup, planning on a release?

  3. Hunter, Is there a recent kernel I can flash, with directions on how to do it on a system that does not have the original firmware? I am thinking maybe this could be an issue?!

  4. Actually, I was planning on releasing it… Ill take screenshots of it. Its almost windows user friendly at this point.

    As for dmesg, I dont see anything too out of the ordinary

    I do see No device for DAI WM8750 then below that it shows WM8750 Audio Codec…

    I moved the libertas firmware folder temporarily to see if that might be the cause but no luck. it still did it.

    I even installed mpg123-alsa

  5. soundguy,

    what kernel are you running? Does mpg123-alsa not work?

  6. Linux OpenZipIt 2.6.29 #1 Sat Sep 12 13:15:44 CDT 2009 armv5tel GNU/Linux

    mpg123-alsa causes the error, everything except mplayer does.

    $ lsmod | grep snd
    snd_soc_z2 4748 0
    snd_soc_wm8750 21876 1 snd_soc_z2
    snd_soc_pxa2xx_i2s 4404 1 snd_soc_z2
    snd_soc_pxa2xx 2480 1 snd_soc_z2
    snd_pxa2xx_lib 4780 1 snd_soc_pxa2xx
    snd_soc_core 39240 4 snd_soc_z2,snd_soc_wm8750,snd_soc_pxa2xx_i2s,snd_soc_pxa2xx
    snd_pcm_oss 39696 0
    snd_pcm 68241 4 snd_soc_pxa2xx,snd_pxa2xx_lib,snd_soc_core,snd_pcm_oss
    snd_mixer_oss 15056 1 snd_pcm_oss
    snd_timer 19952 1 snd_pcm
    snd_page_alloc 6560 1 snd_pcm
    snd 47932 7 snd_soc_z2,snd_soc_wm8750,snd_soc_core,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_timer
    soundcore 6064 1 snd

  7. hey soundguy,

    Do you have volume in scummvm?

  8. No I do not. Upon opening it I got the kernel panic.

  9. Ok this is odd. Alsa appears to be broken. I tried mpg123 -o oss file.mp3 and it played…. So right now I am doing dpkg-reconfigure linux-sound-base and select oss… and I am going to install libsdl1.2debian-oss

    Ill keep you posted on the status

  10. Hunter; Problem solved.

    The debian image comes configured with alsa… And alsa doesnt work

    I did as I stated in the above posting and also made a .asoundrc

    pcm.card0 {
    type hw
    card 0
    }
    ctl.card0 {
    type hw
    card 0
    }

    So heres what I have so far.

    Full X Interface with a Desktop, File Manager, Browser (fully working and configured as mobile web browser), GameBoy Emulator, and mp3 player.

    Gameboy is full screen correct aspect ratio with 95% full speed inside of xorg

  11. Hunter, I have the userland somewhat ready. Its so easy to use anyone who has used a computer once in their life can take full advantage of the Z2.

    It might peak some interest in other users developing for it.

    Is there somewhere specific you would like me to post it around here?

    Im thinking of uploading to rapidshare or a similar site.

  12. Hey Soundguy,

    You’re welcome to link it here. I would suggest putting it on the SF page for everybody. Sounds like good stuff :)

  13. Ill do it here. Im not familiar with posting to SF; How can I do it on the SF site? I would need to create an account? Or is there a way to post it to the current developer site on SF for openzipit?

  14. Hey soundguy,

    Yeah, I think you should be able to post up to the SF page with just a regular SF login. The admins for the openzipit sourceforge page should also be able to grant you post access if not.

  15. Hunter. I posted some screen-shots.
    I’m cleaning up the user-land a little bit and taking out some rough edges and unused software. So just a few more days ;)

    Its designed with an average user in mind who wants to accomplish some sort of regular every day tasks.

    I would like to find info on the battery status and maybe locate a battery monitor of some kind.

    Also is there a feature such as s2disk for ARM?

    Boots to xorg.
    Has a failsafe mode if xorg breaks.
    Currently uses ext3 (looking into switching to jffs; don’t know if its possible yet)
    Has a complete file manager.
    Media Player.
    Instant Messenger (will either be finch or pidgin)
    Document editor
    Calculator
    FTP Server/Telnet server via inetd.
    Web Browser using mobile browsing modifications with SSL(links2)
    Shortcut key(s) to task manager.
    Wifi Connection scripts G/CUI.
    This release will use Lenny, the later release should be with Sid/Squeeze

    Since a lot of this is hacked together the code name I’m giving this release is:
    scratch

    Check out the screen-shots if you want;

    http://zipit.rootnexus.org/

  16. Hey soundguy,

    Looking good! I am digging the screenshots. I think people would definitely be interested in this. You can get the battery status from /proc/apm, although you’ll need to scale it as the range appears to be from 40 to 80% when unplugged instead of 0 to 100%. I have head of s2disk working on the Zaurus, so I don’t think there’d be any problem using it on the Z2, provided the apm support is in there already. I think there’s been some discussion on this previously. Hope it works out well, good luck !!

  17. Hunter, You’re right. Im testing and polling the /proc/apm with:
    $ while true ; do cat /proc/apm; sleep 1;clear ; done

    Its not very accurate, its started at 90%
    dropped to 80% within 3 minutes.
    And it showed 6% once. between the time period and jumps back to 90% then to 80%

    Im a little bit afraid to poll it with any type of script that produces an action. But it appears to settle within about 5 minutes.

    For now I am going to make a script to read /proc/apm and awk out the #%. Once it drops to 50 or below Ill have it spit a warning with xmessage that the battery is low and to power down to avoid data loss. I guess I could set it to ignore if its above 80.. I really wanted to use s2disk to halt it at 5% remaining.

    My other thought is to halt it when it gets below 5% and just display a warning that it will shut down. At least it will happen cleanly until s2disk works.

    Do you know what the 1.13 and 1.2 numbers stand for?
    1.13 1.2 0×02 0×00 0×00 0×00 81% -1 min

    Also do you know anything about forcefully switching these 2 modes?

    Run Mode clock: 208.00MHz (*16)
    Turbo Mode clock: 312.00MHz (*1.5, active)

  18. Hey soundguy,

    Yeah, you might want to change your script to average the deviation from the previous poll number. We can at least pretend the Z2 has a linear discharge profile :) Don’t know what all the numbers from /proc/apm mean, I know 2 of the rightmost registers are for powered and charging status. As for switching the CPU scaling frequency, you can do that from a script. Somebody was having issues with dynamically scaling in one of the other comments threads here on the site, probably can get the command structure etc from that discussion. Good luck!

  19. Hunter, I wrote a shell script to call a shutdown when the battery gets low, as well as provide warnings with xmessage. Im testing it out now…

    I think It can be executed from a .xinitrc without any problems.

    http://zipit.rootnexus.org/files/battery-daemon.txt

  20. FCE Ultra NES EMULATOR:
    So, I got this working very well, How can I get it full screen? I cant seem to stretch it to the size of a terminal window and full screen passes an error.

  21. I’m loving those screenshots, soundguy. I’ve been trying to set up a decent gui with the debian image. Currently I have openbox running with lxpanel from LXDE. It seems to run fairly well. There are some screenshots posted at my site if you want to take a look. Can’t wait to try out your image soundguy. Let us know when/where it can be downloaded.

  22. Hunter,mozzwald: I created a copy of the image.
    Its a little rough right now. But it shows what im trying to accomplish.

    http://zipit.rootnexus.org/files/Z2-USERLAND/SCRATCH/REVA01-PRE/

    You are welcome to try it out and give any feedback.

    Mozzwald: Im going to use your script which calls xmessage in it. I really liked that idea. I think I can incorporate it into my netconfig script.

    Check this example out. Its a little simpler. I borrowed it from a Linux forum.

    #!/bin/sh
    XMESSAGE=$(which gxmessage) || XMESSAGE=xmessage

    $XMESSAGE ” Logout Selections ” -center -buttons “Cancel”:1,”Reboot”:2,”Shutdown”:3,”Exit X”:4
    case $? in
    1) exit 0 ;;
    2) reboot ;;
    3) halt ;;
    4) killall matchbox-window-manager ;;
    esac

  23. oh. and pull as much bandwidth as you like. apparently from what i read, i pay for unlimited bandwidth and disk space.

    http://zipit.rootnexus.org/files/Z2-USERLAND/SCRATCH/REVA01-PRE/

  24. Hey very nice blog!!….I’m an instant fan, I have bookmarked you and I’ll be checking back on a regular….See ya

  25. Does anyone know if there is a way to change the screen size when playing gbc games. I’m using gngb and it’s only using about 1/3 or the screen. I’ve messed with the options a bit(res=), but it didn’t do anything.
    Thanks,

    Chris

  26. Hello,
    Okay, gngb -Y –rex=320×240 did it for me.
    Thanks,


Leave a comment