Hello There, Guest! Register
Enjoy our site and services? You may donate to help fund server and domain costs. Donate Here for special benefits. You have donated $

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a Script to Backup Cartridges?
#11
Great info thanks.
Reply
#12
Question 
(10-30-2015, 02:57 PM)Joshtech Wrote: The way that I do it is as followed... 
I put this script in /etc/init.d/ as jackel


For Leapster Explorer/GS
Code:
#!/bin/sh

case "$1" in
    start)
        
        ISSHOWING="FALSE"
        ISDUMPING="FALSE"
        ISDONE="FALSE"
        
        echo "Starting JACKEL!"
        if [ "`gpio-control /dev/gpio invalue 2 13 | grep value | cut -d = -f 2`" -eq "1" ] ; then  # LFT-SHOULDER
            echo "Left Shoulder Button not held, stopping JACKEL!"
            exit
        fi
        if [ ! -e /var/fonts/monotext8x16.rgb -a -e /test/monotext8x16.rgb ] ; then
            mkdir -p /var/fonts
            cp -s /test/monotext8x16.rgb /var/fonts
        fi

        if [ -e /sys/class/graphics ]; then
            DRAWTEXT_CMD="drawtext-fb /dev/fb0 /var/fonts/monotext8x16.rgb"
            SCREEN_SELECT="fbctrl /dev/fb0"
            LAYER_CONTROL="0"    #"fbctrl /dev/fb0"
        else
            DRAWTEXT_CMD="drawtext /dev/layer0 /var/fonts/monotext8x16.rgb"
            SCREEN_SELECT="fbctrl /dev/layer0"    
            LAYER_CONTROL="1"    #"layer-control /dev/layer0"
        fi
        display_screen /Jackel/jackel.png
        $DRAWTEXT_CMD "Jackel v0.1" 0 0 1
        $DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
        $DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
        $DRAWTEXT_CMD "    to Console" 4 3 1
        $DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
        $DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
        $DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
        $SCREEN_SELECT set blank 1
        while true ; do
            if [ "`gpio-control /dev/gpio invalue 2 4 | grep value | cut -d = -f 2`" -eq "0" ] && [ $ISDUMPING == "FALSE" ] && [ $ISSHOWING == "TRUE" ] ; then # PAUSE BUTTON
                break
            fi
            if [ "`gpio-control /dev/gpio invalue 2 6 | grep value | cut -d = -f 2`" -eq "0" ] && [ $ISDUMPING == "FALSE" ] ; then  #RIGHT SHOULDER
                    $DRAWTEXT_CMD "            " 13 3 1
                    #$DRAWTEXT_CMD "                                   " 13 3 1
                    $SCREEN_SELECT set blank 1
                    ISSHOWING="FALSE"
            elif [ "`gpio-control /dev/gpio invalue 2 13 | grep value | cut -d = -f 2`" -eq "0" ] ; then  # LFT-SHOULDER
                    display_screen /Jackel/jackel.png
                    $DRAWTEXT_CMD "                                   " 13 3 1
                    #$DRAWTEXT_CMD "L" 13 3 1
                    display_screen $PROG_PATH/jackel.png
                    $DRAWTEXT_CMD "Jackel v0.1" 0 0 1
                    $DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
                    $DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
                    $DRAWTEXT_CMD "    to Console" 4 3 1
                    $DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
                    $DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
                    $DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
                    $SCREEN_SELECT set blank 0
                    ISSHOWING="TRUE"
            fi
            if [ $ISSHOWING == "TRUE" ] && [ $ISDUMPING == "FALSE" ] ; then
                if [ "`gpio-control /dev/gpio invalue 2 3 | grep value | cut -d = -f 2`" -eq "0" ] ; then     # A button
                    $DRAWTEXT_CMD "                                   " 13 3 1
                    $DRAWTEXT_CMD "                         " 3 3 1
                    $DRAWTEXT_CMD "                         " 4 3 1
                    $DRAWTEXT_CMD "                         " 6 3 1
                    $DRAWTEXT_CMD "DO NOT PRESS ANYTHING!!!   " 8 3 1
                    $DRAWTEXT_CMD "DO NOT TURN OFF POWER!!!           " 11 3 1
                    $DRAWTEXT_CMD "DUMPING CART PLEASE WAIT!" 13 3 1
                    ISDUMPING="TRUE"
                    cp -avr /LF/Cart/. /LF/Bulk/ProgramFiles
                    $DRAWTEXT_CMD "                          " 13 3 1
                    $DRAWTEXT_CMD "DONE DUMPING!" 13 3 1
                    $DRAWTEXT_CMD "A = Dump Game Cartridge" 3 3 1
                    $DRAWTEXT_CMD "    to Console" 4 3 1
                    $DRAWTEXT_CMD "Hint = Stop Jackel" 6 3 1
                    $DRAWTEXT_CMD "L & R Show/Hide Jackel" 8 3 1
                    $DRAWTEXT_CMD "PAUSE = Reboot (Needed after dump/s)" 11 3 1
                    ISDUMPING="FALSE"    
                elif [ "`gpio-control /dev/gpio invalue 2 5 | grep value | cut -d = -f 2`" -eq "0"  ] ; then  # Hint
                    $DRAWTEXT_CMD "                                   " 13 3 1
                    #$DRAWTEXT_CMD "Hint" 13 3 1
                    $SCREEN_SELECT set blank 1
                    exit
                fi
            fi
        done
        echo "Reboot requested by Jackel!"
        reboot
        ;;
    stop)
        echo "Stopping JACKEL"
        exit
        ;;
    *)
        echo "Usage: /etc/init.d/jackel {start|stop}"
        exit 1
        ;;
esac
exit 0

For LeapPad2 - LeapPad2's don't have the gpio-control... well not on the one I managed to get my hands on for 2 secs haha read_button will do altho we only have the direction keys

Code:
#!/bin/sh

# For some reason leappad2's don't have gpio-control but ultras do
# They have a function read_button

case "$1" in
    start)
        
        ISSHOWING="FALSE"
        ISDUMPING="FALSE"
        ISDONE="FALSE"
        
        echo "Starting JACKEL!"
        if [ "`read_button left`" != "pressed" ] ; then  # up Button
            echo "Left not held, stopping JACKEL!"
            exit
        #else
        #    echo "Jackel would have started"
        #    exit
        fi
        if [ ! -e /var/fonts/monotext8x16.rgb -a -e /test/monotext8x16.rgb ] ; then
            mkdir -p /var/fonts
            cp -s /test/monotext8x16.rgb /var/fonts
        fi

        if [ -e /sys/class/graphics ]; then
            DRAWTEXT_CMD="drawtext-fb /dev/fb0 /var/fonts/monotext8x16.rgb"
            SCREEN_SELECT="fbctrl /dev/fb0"
            LAYER_CONTROL="0"    #"fbctrl /dev/fb0"
        else
            DRAWTEXT_CMD="drawtext /dev/layer0 /var/fonts/monotext8x16.rgb"
            SCREEN_SELECT="fbctrl /dev/layer0"    
            LAYER_CONTROL="1"    #"layer-control /dev/layer0"
        fi
        display_screen /Jackel/jackel.png
        $DRAWTEXT_CMD "Jackel v0.1" 0 0 1
        $DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
        $DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
        $DRAWTEXT_CMD "    to Console" 4 3 1
        $DRAWTEXT_CMD "                  " 6 3 1
        $DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
        $DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
        $SCREEN_SELECT set blank 1
        while true ; do
            if [ "`read_button down`" == "pressed" ] && [ $ISDUMPING == "FALSE" ] && [ $ISSHOWING == "TRUE" ] ; then # PAUSE BUTTON
                break
            fi
            if [ "`read_button right`" == "pressed" ] && [ $ISDUMPING == "FALSE" ] ; then  #RIGHT
                    $DRAWTEXT_CMD "            " 13 3 1
                    #$DRAWTEXT_CMD "                                   " 13 3 1
                    $SCREEN_SELECT set blank 1
                    ISSHOWING="FALSE"
            elif [ "`read_button left`" == "pressed" ] ; then  # Left
                    display_screen /Jackel/jackel.png
                    $DRAWTEXT_CMD "                                   " 13 3 1
                    #$DRAWTEXT_CMD "L" 13 3 1
                    display_screen $PROG_PATH/jackel.png
                    $DRAWTEXT_CMD "Jackel v0.1" 0 0 1
                    $DRAWTEXT_CMD "Written by Josh Johansson" 1 0 1
                    $DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
                    $DRAWTEXT_CMD "    to Console" 4 3 1
                    $DRAWTEXT_CMD "                   " 6 3 1
                    $DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
                    $DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
                    $SCREEN_SELECT set blank 0
                    ISSHOWING="TRUE"
            fi
            if [ $ISSHOWING == "TRUE" ] && [ $ISDUMPING == "FALSE" ] ; then
                if [ "`read_button up`" == "pressed" ] ; then     # Up
                    $DRAWTEXT_CMD "                                   " 13 3 1
                    $DRAWTEXT_CMD "                         " 3 3 1
                    $DRAWTEXT_CMD "                         " 4 3 1
                    $DRAWTEXT_CMD "                         " 6 3 1
                    $DRAWTEXT_CMD "DO NOT PRESS ANYTHING!!!   " 8 3 1
                    $DRAWTEXT_CMD "DO NOT TURN OFF POWER!!!            " 11 3 1
                    $DRAWTEXT_CMD "DUMPING CART PLEASE WAIT!" 13 3 1
                    ISDUMPING="TRUE"
                    cp -avr /LF/Cart/. /LF/Bulk/ProgramFiles
                    $DRAWTEXT_CMD "                          " 13 3 1
                    $DRAWTEXT_CMD "DONE DUMPING!" 13 3 1
                    $DRAWTEXT_CMD "> = Dump Game Cartridge" 3 3 1
                    $DRAWTEXT_CMD "    to Console" 4 3 1
                    $DRAWTEXT_CMD "                   " 6 3 1
                    $DRAWTEXT_CMD "^ & v Show/Hide Jackel" 8 3 1
                    $DRAWTEXT_CMD "< = Reboot (Needed after dump/s)" 11 3 1
                    ISDUMPING="FALSE"

                fi
            fi
        done
        echo "Reboot requested by Jackel!"
        reboot
        ;;
    stop)
        echo "Stopping JACKEL"
        exit
        ;;
    *)
        echo "Usage: /etc/init.d/jackel {start|stop}"
        exit 1
        ;;
esac
exit 0





then at the end of /etc/init.d/rc5 I append
Code:
chmod +x /etc/init.d/jackel
nice /etc/init.d/jackel start;

Then when I want to dump carts to console I just turn on my console while holding left shoulder button and toggle showing it with left and right shoulder buttons
or
For the LeapPad2 hold left while booting till you see the jackel screen...


This is a direct dump from fb0 on a Leapster Explorer
[Image: MAVRpRf.png]

This is the little image that I use(I just have it in /Jackel/jackel.png) for Leapster Explorer 320x240
[Image: UV6Ravc.png]

LeapPad2 Version 480x272
[Image: mZb0njL.png]

This was just a quick way of doing this on a leapster explorer/gs...

This method will also work on an ultra but there is more that has to be done
But if you delete \LF\Bulk\SharedPackageInfo.db and restart. It will rebuild the database to my understand according to the meta.inf files in the folders under /LF/Bulk/ProgramFiles.
Keep in mind wifi has to be off or it will connect to Mr Leapfrog and correct the database.

App file, please.
Reply


Forum Jump: