WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TinyZSNES ! ...and some questions...  (Read 3455 times)

Offline Medox

  • Newbie
  • *
  • Posts: 36
TinyZSNES ! ...and some questions...
« on: May 19, 2009, 02:40:47 PM »
Hello again,

After Jason W filled my request, I worked on TinyZSNES... a LiveCD just for (z)snes fans, like me :)

It contains zsnes (of course) and ALSA. (ok, nano too but that's not important)
It starts in text mode and loads zsnes automatically with the rom path already set.
Put your roms in the "snesroms" folder (in the iso) so that you find them in zsnes (game -> load)



I'll put new versions (or just the last ones) in this forder:

http://www.box.net/shared/p02j5j78m1

This is my first public LiveCD so it's still far from what I want or what I could learn from now on... so please test it and tell me it something goes wrong.

Some questions for the next releases:

  • How do I remove or change the PNM/image that shows up when booting? (if it's ok to do so...)
  • I would like to have the "snesroms" folder mounted automatically, if it's on a cd/dvd/usb or any other device, independent of hdc/sr0/sdb1/sdc1.... My laptop needed sr0 but in virtualpc/qemu it's hdc, so my startupscript includes both... and if one fails the other one gets mounted. I know, it's not really how it should be done, but how? Scripts that mount everything and search for that folder just slow down the bootprocess, I think.
  • What should a script contain so that, after exiting zsnes, it would shut down or restart the pc. Well, maybe return to a filemanager also, but that's just big thinking (maybe in some other upcoming version). The shut down should do it for now.

p.s. I didn't remove the gui... so it still has 3-4 MB's too much but I'll wait for the microcore version... (I don't really know how to strip it down correctly). Then it would be really the smallest zsnes livecd, ever 8)
“Your body's just a vehicle, transporting the soul.
It's what's inside of people, is beauty to behold.” - Damian Marley

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: TinyZSNES ! ...and some questions...
« Reply #1 on: May 20, 2009, 05:15:44 AM »
The pic is compiled in in the kernel. You can prevent it from showing with the bootcode "logo.nologo".

To shut down after running zsnes, the script would do something like:
Quote
zsnes
poweroff
The only barriers that can stop you are the ones you create yourself.

Offline Medox

  • Newbie
  • *
  • Posts: 36
Re: TinyZSNES ! ...and some questions...
« Reply #2 on: May 27, 2009, 08:30:26 AM »
@curaga
thanks

Another question/problem...

I made a script that lets me choose if I want to reboot or shut down. Something like this:

echo ...
echo "R - reboot"
echo "Q - turn off"

read -n 1 -s -p option

case $option in

"R" | "r" )
...

* )
echo "Wrong key..."
...

and so on, the script works great with "./options" or something that I run myself but not if I place it after zsnes, in bootlocal.sh. It chooses "* )" automatically and I get "wrong key" instead of letting me press R or whatever.

How do I get the script to really pause & read my pressed key?
“Your body's just a vehicle, transporting the soul.
It's what's inside of people, is beauty to behold.” - Damian Marley

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: TinyZSNES ! ...and some questions...
« Reply #3 on: May 27, 2009, 08:56:11 AM »
read -n 1 -s -p option

should be

read -n 1 -s -p option option

aka there was no variable to store the result to, and so $option is empty
The only barriers that can stop you are the ones you create yourself.

Offline Medox

  • Newbie
  • *
  • Posts: 36
Re: TinyZSNES ! ...and some questions...
« Reply #4 on: May 27, 2009, 09:20:00 AM »
thanks but it still jumps right to the * ) case... :-[
“Your body's just a vehicle, transporting the soul.
It's what's inside of people, is beauty to behold.” - Damian Marley

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: TinyZSNES ! ...and some questions...
« Reply #5 on: May 27, 2009, 09:30:41 AM »
Is zsnes exited with a keypress? maybe that key is taken then
The only barriers that can stop you are the ones you create yourself.

Offline Medox

  • Newbie
  • *
  • Posts: 36
Re: TinyZSNES ! ...and some questions...
« Reply #6 on: May 27, 2009, 09:50:48 AM »
well, zsnes exits by selecting Game -> Exit (and pressing enter, of course) but that's not the problem, I guess, because even without zsnes, the problem remains and nothing in bootlocal.sh (or scripts that run from here) can pause this script(s) to read a pressed key.

Weird...

I'm trying to solve this for some days now, still nothing :-\
“Your body's just a vehicle, transporting the soul.
It's what's inside of people, is beauty to behold.” - Damian Marley

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: TinyZSNES ! ...and some questions...
« Reply #7 on: May 27, 2009, 10:05:54 AM »
Ah, bootlocal.sh is backgrounded as not to slow down boot. Since you're running everything from there, you should remove the "&" from the line calling bootlocal.sh in /etc/init.d/tc-config.
The only barriers that can stop you are the ones you create yourself.

Offline Medox

  • Newbie
  • *
  • Posts: 36
Re: TinyZSNES ! ...and some questions...
« Reply #8 on: May 27, 2009, 10:17:56 AM »
works great! :D

thanks!
“Your body's just a vehicle, transporting the soul.
It's what's inside of people, is beauty to behold.” - Damian Marley