![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Lua Flashing Mod Functions within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Can someone please give me all the functions to the new lua falshing mod. I just want to see what ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Can someone please give me all the functions to the new lua falshing mod. I just want to see what it can do, no i'm not gonna create some kind of flasher so don't call me a noob. I just know it can do other things and I wanna see what it can do. Thank you.
__________________
Need a GFX Guy for EBOOT ICONS, BACkGROUNDS?? I can help you there. Just see some of my work. PM me for GFX. |
|
|
|
|
|
|
#3 |
![]() ![]() ...in a dream...
|
The new mod has the following:
Code:
-- Unassign an IO device -- Parameters: -- dev - IO device to unassign as a string System.Unassign ( dev ) -- This will unassign your memory stick device System.Unassign ( "ms0:" ) Code:
-- This will assign an IO device -- Parameters: -- dev1 - The device name to assign as a string -- dev2 - The block device to assign from as a string -- dev3 - The filesystem device to map the block device to dev1 as a string System.Assign ( dev1, dev2, dev3 ) -- This will reassign flash0 (assiging gives that device read and write privelages autoatmically) System.Assign ( "flash0", "lflash0:0,0", "flashfat0:" ) Code:
-- This allows you to write 'source' file to 'destination' file with a flag to remove 'source' file after writing to 'destination'. NOTE - overwrites if 'destination' exists -- Parameters: -- source - File to be copied as a string -- destination - Place for 'source' to be copied to as a string -- remove - Flag for removing 'source' file after being copied to 'desitination'. ---- "yes" to remove 'source' file ---- anything else to NOT remove 'source' file System.writeFile ( source, destination, remove ) -- This will copy your current 'topmenu_plugin.rco' to the root of your memory stick System.writeFile ( "flash0:/vsh/resource/topmenu_plugin.rco", "ms0:/", "no" ) Here's an example script to flash or dump an entire basic theme (advanced rco's not included, meaning just the basic rcos). Hopefully this will stop all the confusion. Code:
white = Color.new(255,255,255)
Pressed = {flash=false,dump=false}
System.createDirectory("ms0:/flash")
System.createDirectory("ms0:/dump")
function DumpTheme()
System.writeFile( "flash0:/vsh/resource/topmenu_plugin.rco", "ms0:/dump/topmenu_plugin.rco", "no")
System.writeFile( "flash0:/vsh/resource/system_plugin.rco", "ms0:/dump/system_plugin.rco", "no")
System.writeFile( "flash0:/vsh/resource/system_plugin_fg.rco", "ms0:/dump/system_plugin_fg.rco", "no")
System.writeFile( "flash0:/vsh/resource/system_plugin_bg.rco", "ms0:/dump/system_plugin_bg.rco", "no")
System.writeFile( "flash0:/vsh/resource/impose_plugin.rco", "ms0:/dump/impose_plugin.rco", "no")
System.writeFile( "flash0:/vsh/resource/01-12.bmp", "ms0:/dump/01-12.bmp", "no")
System.writeFile( "flash0:/vsh/resource/gameboot.pmf", "ms0:/dump/gameboot.pmf", "no")
end
function FlashTheme()
System.Unassign("flash0:") -- these 2 lines give us read-write privelages
System.Assign("flash0:", "lflash0:0,0", "flashfat0:") -- to flash0:
if io.open("ms0:/flash/topmenu_plugin.rco","r") then
System.writeFile("ms0:/flash/topmenu_plugin.rco","flash0:/vsh/resource/topmenu_plugin.rco","yes")
end
if io.open("ms0:/flash/system_plugin.rco","r") then
System.writeFile("ms0:/flash/system_plugin.rco","flash0:/vsh/resource/system_plugin.rco","yes")
end
if io.open("ms0:/flash/system_plugin_fg.rco","r") then
System.writeFile("ms0:/flash/system_plugin_fg.rco","flash0:/vsh/resource/system_plugin_fg.rco","yes")
end
if io.open("ms0:/flash/system_plugin_bg.rco","r") then
System.writeFile("ms0:/flash/system_plugin_bg.rco","flash0:/vsh/resource/system_plugin_bg.rco","yes")
end
if io.open("ms0:/flash/impose_plugin.rco","r") then
System.writeFile("ms0:/flash/impose_plugin.rco","flash0:/vsh/resource/impose_plugin.rco","yes")
end
if io.open("ms0:/flash/01-12.bmp","r") then
System.writeFile ("ms0:/flash/01-12.bmp", "flash0:/vsh/resource/01-12.bmp","yes")
end
if io.open("ms0:/flash/gameboot.pmf","r") then
System.writeFile ("ms0:/flash/gameboot.pmf", "flash0:/vsh/resource/gameboot.pmf","yes")
end
end
while true do
screen:clear()
screen:print(0,0,"Basic Theme Flasher in LUA",white)
screen:print(0,140,"Press [L Trigger] + [X] to flash a theme", white)
screen:print(0,160,"Press [R Trigger] + [O] to dump a theme", white)
pad = Controls.read()
if pad:r() and pad:circle() then
if not Pressed.flash then
DumpTheme()
for i=-32,480 do
screen:clear()
screen:print(i,131,"Done",white)
screen.waitVblankStart()
screen.flip()
end
Pressed.flash = true
end
else Pressed.flash = false end
if pad:l() and pad:cross() then
if not Pressed.dump then
FlashTheme()
Pressed.dump = true
for i=-32,480 do
screen:clear()
screen:print(i,131,"Done",white)
screen.waitVblankStart()
screen.flip()
end
end
else Pressed.dump = false end
screen.waitVblankStart()
screen.flip()
end
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) Last edited by SG57; 03-13-2007 at 07:14 PM.. Reason: Automerged Doublepost |
|
|
|
|
|
#5 |
![]() ![]() ...in a dream...
|
Nah, go ahead. It isnt too complicated, so theres no need to hollar 'zomg you copied me!' like so many other lua-users...
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
![]() |
| Tags |
| flashing , functions , lua , mod |
| Thread Tools | |
|
|