1#! bash 2 3if [ $# -eq 0 ] 4then 5 echo "usage: setsmemsize 24" 6 echo "usage: setsmemsize 48" 7 echo " Sets console simulated mem size. Either 24MB or 48MB is set as the console simulated memory size." 8 exit 1 9fi 10 11if [ "$AMCDDKBIN" = "" -a "$ODEMUSDKBIN" = "" ] 12then 13 echo "Neither DDH nor GDEV are found. Do nothing and exit." 14fi 15 16if [ "$AMCDDKBIN" != "" ] 17then 18 echo "DDH detected" 19 20 stop 21 22 # 23 # change DDH configuration 24 # 25 26 if [ $1 = 24 ] 27 then 28 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x1800000 29 echo "Successfully done. Set 24MB as the console simulated mem size." 30 elif [ $1 = 48 ] 31 then 32 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x3000000 33 echo "Successfully done. Set 48MB as the console simulated mem size." 34 elif [ $1 = 47 ] 35 then 36 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x2f00000 37 echo "Successfully done. Set 47MB as the console simulated mem size." 38 elif [ $1 = "0x1800000" ] 39 then 40 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x1800000 41 echo "Successfully done. Set 24MB as the console simulated mem size." 42 elif [ $1 = "0x3000000" ] 43 then 44 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x3000000 45 echo "Successfully done. Set 48MB as the console simulated mem size." 46 elif [ $1 = "0x2f00000" ] 47 then 48 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x2f00000 49 echo "Successfully done. Set 47MB as the console simulated mem size." 50 elif [ $1 = "0" ] 51 then 52 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x0 53 echo "Successfully done. Physical memory size is considered as the console simulated mem size." 54 elif [ $1 = "0x0" ] 55 then 56 $DOLPHIN_ROOT/x86/bin/tickleBI2 -d `getdvddriveletter` 4 0x0 57 echo "Successfully done. Physical memory size is considered as the console simulated mem size." 58 else 59 echo "usage: setsmemsize 24" 60 echo "usage: setsmemsize 48" 61 echo " Sets console simulated mem size. Either 24MB or 48MB is set as the console simulated memory size." 62 exit 1 63 fi 64fi 65 66 67if [ "$ODEMUSDKBIN" != "" ] 68then 69 echo "GDEV detected" 70 71 # 72 # change GDEV configuration 73 # 74 75 if [ $1 = 24 ] 76 then 77 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x1800000 78 echo "Successfully done. Set 24MB as the console simulated mem size." 79 elif [ $1 = 48 ] 80 then 81 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x3000000 82 echo "Successfully done. Set 48MB as the console simulated mem size." 83 elif [ $1 = 47 ] 84 then 85 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x2f00000 86 echo "Successfully done. Set 47MB as the console simulated mem size." 87 elif [ $1 = "0x1800000" ] 88 then 89 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x1800000 90 echo "Successfully done. Set 24MB as the console simulated mem size." 91 elif [ $1 = "0x3000000" ] 92 then 93 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x3000000 94 echo "Successfully done. Set 48MB as the console simulated mem size." 95 elif [ $1 = "0x2f00000" ] 96 then 97 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x2f00000 98 echo "Successfully done. Set 47MB as the console simulated mem size." 99 elif [ $1 = "0" ] 100 then 101 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x0 102 echo "Successfully done. Physical memory size is considered as the console simulated mem size." 103 elif [ $1 = "0x0" ] 104 then 105 $DOLPHIN_ROOT/x86/bin/tickleBI2 -o "$ODEMUSDKBIN/OdemRun.bi2" 4 0x0 106 echo "Successfully done. Physical memory size is considered as the console simulated mem size." 107 else 108 echo "usage: setsmemsize 24" 109 echo "usage: setsmemsize 48" 110 echo " Sets console simulated mem size. Either 24MB or 48MB is set as the console simulated memory size." 111 exit 1 112 fi 113fi 114 115echo 116echo "******************************************************************************" 117echo "* If you make master data, you must execute loadrun/odrun before you do so!! *" 118echo "******************************************************************************" 119echo 120 121