Krap-psp v1.08 - kenma9123

This Homebrew is an entry for the PSP Genesis competition 2011, sponsored by npt, psp-hacks.com, pspgen.com, pspslimhacks.com, exophase.com, pspcustomfirmware.com, daxhordes.org, gamegaz.jp, xtreamlua.com and wololo.net

-Krap-psp is a plugin came up from nowhere, indeed it is just an idea before, but because of someone's help(freddy), i manage to implement a feature which is permit/forbid the battery from charging(that's why its Krap).. and then suddenly some more features we're implemented because of users suggestions.
as I've said before this plugin has the ability to make some sort of krap things happening onto your psp, let say basic ones.
some features are already implemented in other plugins but i will still add more if there is a time.

[Installation]
Copy the krap directory to the seplugins folder of your psp
Add this line to vsh.txt and game.txt

ms0:/seplugins/krap/krap-psp.prx 1
or for PSPGo users
ef0:/seplugins/krap/krap-psp.prx 1

[How to Use]
Of course you need to press the Combo key that you customized if ever,
when navigating Krap info menu. press down or up to select what options to be set(for now only for the Auto sleep/shut),but it will not be saved in config
then press right/left button to change value and press circle if okay(value were just store in ram)

--Configuration options--
Configuration file for KRAP-PSP plugin
When editing the .ini file.. please do take note that every string/integer
you type in after the '=' sign should end with semicolon ';'
thanks you...... ^^, regards kenma9123

[]#COMBO KEYS SECTION#[]
I want you guys to refer the Combo guide below on how to edit combo buttons :D
the values you may first see here are the default ones. but please customize them if you want.

[]#POP-up strings#[]
This section simply tells the pop up messages or strings that you will see when key is pressed for
function like disable/enable battery charging/warn status etc., you can change color's and position's too, max is 480x272
by default Show_pop_strings is set to 1, change this to 0 of you want to get rid of them.

[]#Battery warning#[]
This was introduced in v1.07, i know you know what is this for :0, but you can completely customize it
to the strings,color,position, you can also disable this if you want.
*Warning_percent option is the percent to warn the user,doesnt apply when plugged in(ofcourse)
*Disable_batt_warning is a combo key to hide the pop up message, or wait 10 blinks then vanish :) the default button for that is #0x000320 R+L+Right(HOLD) this button(s) atleast 1second

[]#[Optional Krap option]#[]
This section are optionals for krap.. this is why i always been saying that this plugin is krap :)
The #HELPMENU# is the basic color of the Help menu :) i will improved this as long as i have a time.
If you want to use other optional set the Set_Optionals to 1 or 0 to disable
#PLUGGED IN MODE ONLY# is under optionals, meaning it will only work when the unit it plugged in an Ac adaptor.
*Stop_battery_charging_if <- stop the psp charging on a certain battery percent to avoid draining? or for what reason is..
*Enable_max_option_pluggedin <- by default 1, set the cpu and brightness to max

#BATTERY MODE ONLY# again, section under optionals section, only works when in battery mode but not plugged
*Set_brightness_if <- set the psp brightness and cpu to LOW on a certain battery %
*Set_auto_sleep <- by default 1, This one use to tell that you are going to use the auto_sleep feature, 0 to disable
*Start_suspend_unit_if <- set what bettery % before going to sleep mode, applies only if Set_auto_sleep = 1.

#AUTO FUNCTION#, includes the auto sleep/shut and the Idle mode that is newly introduced
NOTE:In this sections all integer values are going treat as minutes, 1 = 1minute, 1 hour = 60minutes and so onn..
*Autosleep_after <- specify how many minutes, NOTE: to start the countdown please press the combo key
*Autoshut_after <- specify how many minutes, NOTE: to start the countdown please press the combo key
Idle_sleep <-specify how minutes before going to sleep mode when idle
Idle_shutdown <-specify how minutes before going to shutdown mode when idle
Idle_displayoff <-specify how minutes before the display goes off when idle



--Changelog--

v1.08
[+]Added Idle mode, When Idle on a certain minutes the psp will shut/sleep/displayoff
[+]prx compressed, thanks to m33's psp-packer
[-]Removed Up time feature introduced in 1.06 :D
[+]Added a hook-controller to disable vsh/game keys when Krap menu is open

v1.07
[!]Re-encode the entire menu
[+]Added the ability to set the Auto sleep/shut value onto the Krap menu

v1.06
[+]Added Krap information menu - including battery status etc.
[!]Code clean up.. because its messy(so many comment lines)
[+]Added Up-time feature

v1.05 - beta release
[+]Ability to disable/enable psp charging(this will get you think, why?, that's why its crap :lol: )
[+]Ability to stop charging on a certain battery %
[+]Ability to set CPU/Brightness to MAX if plugged in
[+]Ability to automatically set CPU/Brightness to LOW in a certain battery %, in battery mode only
[+]Ability to set auto-sleep mode on a certain battery %(Like laptops) , in battery mode only
[+]Ability to set whether to display POP-UP messages
[+]Ability to change POP-UP messages/color/position.
[+]Ability to shutdown/reset/sleep psp on a certain key combo.
[+]Ability to set a timer before going to Sleep mode/Shutdown
[+]Ability to display warning message if PSP battery is getting low
[+]Ability to change combo keys (for now through config)

[Known Issues]
-On psp2k Prome-4, When you reboot on GAME, the umdrive will spin(you will hear whirr whirrr lol, and later it will get crash)


#################################################
#Available COLORS as of now
#black			0x000000
#white			0xFFFFFF
#red			0x0000FF
#green			0x00FF00
#blue			0xFF0000
#drakblue		0x800000
#lightblue		0xFA0000
#brown			0x404080
#pink			0xFF80FF
#darkgreen		0x008000
#yellowgreen	0x00FF80
#purple			0xFF0080
#orange			0x4080FF
#lemon			0x80FFFF
#yellow			0x00FFFF
#skyblue		0xFFFF00
#pearlorange	0x75BAFF
#gray			0x808080
#silver			0xC0C0C0
#gold			0x20C0E6
################################################
#COMBO KEY GUIDE
#Sorry but i preffered this way on how to change the button
#Okay,let's move on.. so basically what we're just here is to simply add the button that what we want to press.
#So if you want to press the whole psp button then just add it..
#e.g if you want to press the SQUARE+TRIANGLE simultaneously then get the value of Square and Circle button

#0x008000 <- Square button
#0x002000 <- Circle button
#equals
#0x00A000 <- Square+Circle

#If you reach a value of 10 then make it A,11 = B,12 = C,13 = D,14 = E, 15 = F
#If you know the hexadecimal numbers then it shouldn't be a problem
#now if you still can get it, go to google-- type 0x008000+0x002000 in the searchbox and let the google add it for you.

#You only need the 0xXXXXXX of each button
#Select_button        0x000001
#Start_button         0x000008
#Up_DPad_button       0x000010
#Right_DPad_button    0x000020
#Down_DPad_button     0x000040
#Left_DPad_button     0x000080
#Left_trigger         0x000100
#Right_trigger        0x000200
#Triangle_button      0x001000
#Circle_button        0x002000
#Cross_button         0x004000
#Square_button        0x008000
#Hold_button          0x020000
#Music_Note_button    0x800000
#Screen_button        0x400000
#Volume_up_button     0x100000
#Volume_down_button   0x200000


-Please suggest of any features that you want to be added, and let see if i can implement it cause I'm still working on it... thank you

Special Thank's to mr. weltall and  freddy - you guys are awesome :lol:
darko79 for the awesome fonts
Also to astrall for some of the features  ;)