Linux On iPod Forum Index
 FAQ  •  Search  •  Memberlist  •  Usergroups  •  Profile  •  Log in to check your private messages  •  Log in
 Loader 2 Boot Tune via Piezo!!! View next topic
View previous topic
Post new topicReply to topic
Author Message
Keripo
Contributor


Joined: 26 Jul 2007


PostPosted: Sun May 18, 2008 7:10 pm Reply with quoteBack to top

After playing around with Loader2's "ipod_beep", I added a "boot tune" function to Loader 2 which plays back a .pzm file generated by the piezo maker module.

The download below includes a modified loader.bin, a sample "boot.pzm" file (which Final Fantasy fans will recognize) and the patch file with the modifications (since Trac is down, as always).

Use ipodpatcher to install the bootloader (see the Loader 2 wiki page for instructions). Copy the "boot.pzm" file to your iPod (Loader 2 checks for a "boot.pzm" or "boot_tune.pzm" file in the same locations as it does with the kernel and loader.cfg file). Reboot your iPod and you'll hear your iPod's piezo (if supported) playback a nice tune.

If you want to play your own tune, you can specify the .pzm location in the loader.cfg file. For example:
Code:
boot_tune=(hd0,1)/FinalFantasyVictoryFanfare.pzm

You can create your own .pzm file using bmxr's piezo maker module or with fxb's Windows app.

Download:
http://ipodlinux.org/Image:Loader-2-with-boot-tune.tar.gz

Have fun!

~Keripo

_________________
Project ZeroSlackr
http://sourceforge.net/projects/zeroslackr/

Me = Keripo, Keripo Test Account = Me
010/001/111

Last edited by Keripo on Sun May 18, 2008 10:05 pm; edited 1 time in total
View user's profileSend private message
fedorageek920



Joined: 19 Jun 2007

Location: Hello, says Fedorageek920 from behind you...

PostPosted: Sun May 18, 2008 8:04 pm Reply with quoteBack to top

Shocked WOW. This is... great!

/me uninstalls iloadz and installs this.

I can't put it into words! I love useless-but-cool features!

_________________
I am Fedorageek920 FEAR ME!!!!

lolz idk ur a n00b???!?!?!

C#/C++ programmer

fedorageek920.ipod = iPod_nano_Black;
View user's profileSend private message
jgjake2



Joined: 04 Mar 2006

Location: Texas

PostPosted: Sun May 18, 2008 9:22 pm Reply with quoteBack to top

Keripo wrote:
you'll have to wait a long time before you can select anything


i had that same problem when i was tinkering withthe piezo stuff. but i managed to solve that problem by having it check for user inputs every few miliseconds, if it detected one, then it would stop the song. i dont have the source anymore, but i am just giving a small suggestion.

but great job! Very Happy

_________________
http://ipodlinux.org/allin1
http://www.myspace.com/xxxdiefckr
ajpsk8: (iPod)
i put it in the microwave and it... pops...
View user's profileSend private messageVisit poster's website
Keripo
Contributor


Joined: 26 Jul 2007


PostPosted: Sun May 18, 2008 10:04 pm Reply with quoteBack to top

jgjake2 wrote:
Keripo wrote:
you'll have to wait a long time before you can select anything


i had that same problem when i was tinkering withthe piezo stuff. but i managed to solve that problem by having it check for user inputs every few miliseconds, if it detected one, then it would stop the song. i dont have the source anymore, but i am just giving a small suggestion.

but great job! Very Happy


Thanks for the note. Loader 2 already has a keypad_getkey() function so I just added that check into my while loop. I also added a file existence check and searches for both "boot.pzm" and "boot_tune.pzm". "boottune.pzm" (or anything of filename length 12) doesn't seem to work for some reason though, even if explicitly specified in the loader.cfg file. This is most likely a vfs bug (but not really anything worth fixing).

~Keripo

_________________
Project ZeroSlackr
http://sourceforge.net/projects/zeroslackr/

Me = Keripo, Keripo Test Account = Me
010/001/111
View user's profileSend private message
zowki



Joined: 17 Sep 2006

Location: /mnt/zowki

PostPosted: Mon May 19, 2008 5:31 am Reply with quoteBack to top

Awesome! Make this like in the official loader2!
EDIT: Will this work with zeroslackr?

_________________
My ipods:
iPod Nano 1G 2GB
iPod Video 5g 60GB
View user's profileSend private messageSend e-mailMSN Messenger
Der Papst
Contributor


Joined: 14 Feb 2006

Location: Germany :: Friedberg (<-- Dorf)

PostPosted: Mon May 19, 2008 10:42 am Reply with quoteBack to top

The bootloader is independent of the OF, iPL (whatever flavour), Rockbox, <insert any other "OS here>.

So yes.

_________________
> SELECT * FROM users WHERE clue > 0;
0 rows returned
View user's profileSend private messageSend e-mail
jgjake2



Joined: 04 Mar 2006

Location: Texas

PostPosted: Mon May 19, 2008 1:33 pm Reply with quoteBack to top

Keripo wrote:
jgjake2 wrote:
Keripo wrote:
you'll have to wait a long time before you can select anything


i had that same problem when i was tinkering withthe piezo stuff. but i managed to solve that problem by having it check for user inputs every few miliseconds, if it detected one, then it would stop the song. i dont have the source anymore, but i am just giving a small suggestion.

but great job! Very Happy


Thanks for the note. Loader 2 already has a keypad_getkey() function so I just added that check into my while loop. I also added a file existence check and searches for both "boot.pzm" and "boot_tune.pzm". "boottune.pzm" (or anything of filename length 12) doesn't seem to work for some reason though, even if explicitly specified in the loader.cfg file. This is most likely a vfs bug (but not really anything worth fixing).

~Keripo

hmm, does it check for the files in the same way the boot loader looks for .cfg files?

_________________
http://ipodlinux.org/allin1
http://www.myspace.com/xxxdiefckr
ajpsk8: (iPod)
i put it in the microwave and it... pops...
View user's profileSend private messageVisit poster's website
Keripo Test Account
Contributor


Joined: 11 Apr 2006

Location: Ontario, Canada

PostPosted: Mon May 19, 2008 3:21 pm Reply with quoteBack to top

jgjake2 wrote:
hmm, does it check for the files in the same way the boot loader looks for .cfg files?


vfs_open (the call to open a file for reading) returns a -1 if the file is not accessible. I just use:
Code:
int f;
f = vfs_open (file);
if (f == -1) {
  mlc_printf ("boot_tune file %s not found.\n", file);
  return;
}

I just used pre-existing functions and didn't write anything new really.

zowki: Hopefully this will be added to SVN upon a bit of clean-up (*hint-hint-at-courtc*) and it only adds in 0.8KB more to the file size (most of which comes from the hard-coded file names) so it won't cause any issues. And yes, it will work with ZeroSlackr as for ZS I used an unmodified SVN-built loader.bin. I prefer useful changes to be committed up-stream rather than keeping it ZS exclusive.

~Keripo

Edit: Hehe, identity switch-a-roo. Meh.

_________________
Project ZeroSlackr
http://sourceforge.net/projects/zeroslackr/
http://ipodlinux.org/forums/viewtopic.php?t=29636
View user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressMSN Messenger
zowki



Joined: 17 Sep 2006

Location: /mnt/zowki

PostPosted: Tue May 20, 2008 1:46 am Reply with quoteBack to top

Keripo Test Account wrote:
Hehe, identity switch-a-roo. Meh.

Your multiple forum accounts are really confusing, why do you do it?
By the way I think you're a programmer god, you have worked on so much amazing stuff.

_________________
My ipods:
iPod Nano 1G 2GB
iPod Video 5g 60GB
View user's profileSend private messageSend e-mailMSN Messenger
Keripo Test Account
Contributor


Joined: 11 Apr 2006

Location: Ontario, Canada

PostPosted: Wed May 21, 2008 12:21 pm Reply with quoteBack to top

zowki wrote:
Your multiple forum accounts are really confusing, why do you do it?

History. Too lazy to explain. If you just want a short answer, you could say that searching through posts by the "Keripo" account is far faster than searching through the useless comments of the "Keripo Test Account" account.
Quote:
By the way I think you're a programmer god, you have worked on so much amazing stuff.

There are a lot of very-active devs out there far more worthy of that label (/me points to courtc, Exophase and the rest). I'm just a small fry doing end-user stuff. Wink

[/off-topic]

_________________
Project ZeroSlackr
http://sourceforge.net/projects/zeroslackr/
http://ipodlinux.org/forums/viewtopic.php?t=29636
View user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressMSN Messenger
xs



Joined: 26 Sep 2007


PostPosted: Thu May 22, 2008 2:05 pm Reply with quoteBack to top

Great...
But maybe I cannot reboot my iPod in train Wink
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme :: All times are GMT