All Functions Modules Pages
os

Functions

NIL os.debug ()
 Enables the editor in the error screen (Debugger), to edit the script. More...
 
NIL os.modetv (NUMBER quality)
 Enables TV out. More...
 
NIL os.modetv ()
 Disables TV out. More...
 
NUMBER os.cabletv ()
 Allows it to recognize video cable type connected. More...
 
NIL os.delay (NUMBER milliseconds)
 Allows a system delay. More...
 
STRING os.cfw ()
 Identifies the Custom Firmware (CFW) or HEN installed. More...
 
STRING os.versiontxt ()
 The version.txt obtained of the file flash0:/etc/version.txt. More...
 
STRING os.nick ()
 User Nick. More...
 
STRING os.mac ()
 Obtains the MAC adress of the console. More...
 
STRING os.language ()
 The Language set in the PSP. More...
 
STRING os.password ()
 Gets the console password. More...
 
NUMBER os.ram ()
 Obtains the free RAM. More...
 
NUMBER os.totalram ()
 Obtains the total amount of RAM. More...
 
NUMBER os.cpu ()
 The actual CPU velocity. More...
 
NIL os.cpu (NUMBER speed)
 Change or set up the CPU velocity to the specified velocity. More...
 
NUMBER os.bus ()
 Actual CPU frequency. More...
 
STRING os.getdate ()
 Current date and time. More...
 
TABLE os.infoms0 ()
 Gets the information of the storage capacity of the memory stick (ms0). More...
 
TABLE os.infoef0 ()
 Gets the information of the storage capacity of the internal memory of the PSP Go(ef0). More...
 
NIL os.message (STRING mje)
 Show a message. More...
 
NUMBER os.message (STRING mje, NUMBER mode)
 Show a message. More...
 
NUMBER os.messagebox (STRING title, STRING mje)
 Displays a message box-shaped screen. More...
 
NUMBER os.messagebox (STRING title, STRING mje, NUMBER button1, NUMBER assigned1)
 Displays a message box-shaped screen. More...
 
NUMBER os.messagebox (STRING title, STRING mje, NUMBER button1, NUMBER assigned1, NUMBER button2, NUMBER assigned2)
 Displays a message box-shaped screen. More...
 
NUMBER os.messagebox (STRING title, STRING mje, NUMBER button1, NUMBER assigned1, NUMBER button2, NUMBER assigned2, NUMBER button3, NUMBER assigned3)
 Displays a message box-shaped screen. More...
 
NIL os.restart ()
 Restart the homebrew. More...
 
NIL os.exit ()
 Closes the homebrew. More...
 
NUMBER os.initprx (STRING path, STRING argv)
 Allows to load and start an external prx module. More...
 
BOOLEAN os.stopprx (NUMBER id)
 Allows you to download and complete a module external prx. More...
 
NUMBER os.requiere (STRING path)
 Allows to use ONELua API to add external modules. More...
 

Detailed Description

OS functions.

Function Documentation

NIL os.debug ( )

Enables the editor in the error screen (Debugger), to edit the script.

Returns
Nothing.
NIL os.modetv ( NUMBER  quality)

Enables TV out.

Parameters
qualityThe pixels quality.
  • __8888 (32 bits RGBA)
  • __4444 (16 bits R4G4B4A4)
  • __5551 (16 bits R5G5B5A1)
  • __5650 (16 bits R5G5B5, no alpha channel)
Note
Requires dvemgr.prx on the location of the pbp, is attached at the discharge and is the same found in daedalus emulator.
Returns
Nothing.
NIL os.modetv ( )

Disables TV out.

Note
Restart the scene and reload 3d objects after this function is used.
Returns
Nothing.
NUMBER os.cabletv ( )

Allows it to recognize video cable type connected.

Returns
Number, Returns a numeric value associated with the cable connected:
  • 0: No cable connected.
  • 1: S-Video/AV (composite).
  • 2: D Terminal Cable/Component Cable.
NIL os.delay ( NUMBER  milliseconds)

Allows a system delay.

Parameters
millisecondsDelay duration (in milliseconds).
Returns
Nothing.
STRING os.cfw ( )

Identifies the Custom Firmware (CFW) or HEN installed.

Returns
The version of the Custom Firmware (CFW) or HEN installed (doesn't recognize specifical versions: PRO-C1, PRO-C2, ME1.8, etc).
  • "5.00 M33-X"
  • "5.03 GEN"
  • "5.50 GEN"
  • "6.20 PRO-X"
  • "6.20 ME/LME"
  • "6.20 TN-X"
  • "6.35 PRO-X"
  • "6.35 Custom"
  • "6.37 ME"
  • "6.38 ME"
  • "6.39 PRO-X"
  • "6.39 TN"
  • "6.39 ME-X"
  • "6.39 PRO-X"
  • "6.39 ME-9.1"
  • "6.39 ME-9.2"
  • "6.39 ME-9.X"
  • "6.39 TN"
  • "6.60 PRO-A"
  • "6.60 PRO-B"
  • "6.60 PRO-C"
  • "6.60 ME/LME"
  • "6.61 PRO-A"
  • "6.61 PRO-B"
  • "6.61 PRO-C"
  • "6.61 ME/LME"
  • "eCFW TN-VX.X"
  • "eCFW ARK"
  • "VHBL"
  • "UNK"
  • "PPSSPP"
STRING os.versiontxt ( )

The version.txt obtained of the file flash0:/etc/version.txt.

Returns
The content of the file version.txt (only is accessible in read-only mode).
STRING os.nick ( )

User Nick.

Returns
The User's Nick configured in the PSP.
STRING os.mac ( )

Obtains the MAC adress of the console.

Returns
The MAC adress in format: XX:XX:XX:XX:XX:XX
STRING os.language ( )

The Language set in the PSP.

Returns
The stablished language in the PSP (capital letters).
STRING os.password ( )

Gets the console password.

Returns
The password configured in the console.
NUMBER os.ram ( )

Obtains the free RAM.

Returns
The amount of free RAM in bytes.
NUMBER os.totalram ( )

Obtains the total amount of RAM.

Returns
The total amount of RAM in bytes (calculated when ONElua starts).
NUMBER os.cpu ( )

The actual CPU velocity.

Returns
The actual CPU velocity (from 1 to 333).
Note
Must use with os.bus() for obtain the result like this: CPU/BUS = 333/166.
NIL os.cpu ( NUMBER  speed)

Change or set up the CPU velocity to the specified velocity.

Parameters
speedNew CPU clock velocity, from 1 to 333.
Returns
Nothing.
NUMBER os.bus ( )

Actual CPU frequency.

Returns
The actual CPU frequency (from 1 to 166).
Note
Must use with os.cpu() for obtain the result like this: CPU/BUS = 333/166.
STRING os.getdate ( )

Current date and time.

Returns
The current date and time set on the PSP in format: "DD/MM/YYYY @ HH:MM:SS"
TABLE os.infoms0 ( )

Gets the information of the storage capacity of the memory stick (ms0).

Returns
A table with these fields:
  • max: Maximum capacity of the memory stick (bytes).
  • free: Free capacity of the memory stick (bytes).
  • used: Used capacity of the memory stick (bytes).
TABLE os.infoef0 ( )

Gets the information of the storage capacity of the internal memory of the PSP Go(ef0).

Returns
A table with these fields:
  • max: Maximum capacity of the memory stick (bytes).
  • free: Free capacity of the memory stick (bytes).
  • used: Used capacity of the memory stick (bytes).
NIL os.message ( STRING  mje)

Show a message.

Parameters
mjeThe message to show.
Returns
Nothing.
Note
Only show "Accept" option.
NUMBER os.message ( STRING  mje,
NUMBER  mode 
)

Show a message.

Parameters
mjeThe message to show.
modeNumeric value: 1 for advanced message (with YES or NO options).
Returns
A numeric value according to the message reply:
  • 1: If the reply is YES.
  • 0: If the reply is NO.
  • -1: If is CANCELLED.
NUMBER os.messagebox ( STRING  title,
STRING  mje 
)

Displays a message box-shaped screen.

Parameters
titleIt is the title bar text box.
mjeThe message text to display.
Note
By placing only the Title and Message as default arguments will be shown two boxes of buttons:
  • X to OK
  • O to CANCEL
Returns
A numerical value according to the button pressed.
  • 1: When the answer is OK (When you press the button X).
  • 2: When the answer is CANCEL (When you press the button O).
See the following sample for more details.
NUMBER os.messagebox ( STRING  title,
STRING  mje,
NUMBER  button1,
NUMBER  assigned1 
)

Displays a message box-shaped screen.

Parameters
titleIt is the title bar text box.
mjeThe message text to display.
button1Button to show.
assigned1Allocation Button to show (button1).
Note
For values of the buttons can be used the same constants buttons.read() buttons except: HOME, NOTE y HOLD.
For mapping values to 5 constants can be possible (in parentheses its numerical value):
  • __OK (1)
  • __CANCEL (2)
  • __YES (3)
  • __NO (4)
  • __EXIT (5)
Returns
Number, a numerical value according to the button assigned.
  • 1 For botón assigned __OK.
  • 2 For botón assigned __CANCEL.
  • 3 For botón assigned __YES.
  • 4 For botón assigned __NO
  • 5 For botón assigned __EXIT
Note
If the answer is the value __EXIT It will not return anything, as will the XMB.

See the following sample for more details.

NUMBER os.messagebox ( STRING  title,
STRING  mje,
NUMBER  button1,
NUMBER  assigned1,
NUMBER  button2,
NUMBER  assigned2 
)

Displays a message box-shaped screen.

Parameters
titleIt is the title bar text box.
mjeThe message text to display.
button1Button to show.
assigned1Allocation Button to show (button1).
button2Button to show.
assigned2Allocation Button to show (button2).
Note
For values of the buttons can be used the same constants buttons.read() buttons except: HOME, NOTE y HOLD.
For mapping values to 5 constants can be possible (in parentheses its numerical value):
  • __OK (1)
  • __CANCEL (2)
  • __YES (3)
  • __NO (4)
  • __EXIT (5)
Returns
Number, a numerical value according to the button assigned.
  • 1 For botón assigned __OK.
  • 2 For botón assigned __CANCEL.
  • 3 For botón assigned __YES.
  • 4 For botón assigned __NO
  • 5 For botón assigned __EXIT
Note
If the answer is the value __EXIT It will not return anything, as will the XMB.

See the following sample for more details.

NUMBER os.messagebox ( STRING  title,
STRING  mje,
NUMBER  button1,
NUMBER  assigned1,
NUMBER  button2,
NUMBER  assigned2,
NUMBER  button3,
NUMBER  assigned3 
)

Displays a message box-shaped screen.

Parameters
titleIt is the title bar text box.
mjeThe message text to display.
button1Button to show.
assigned1Allocation Button to show (button1).
button2Button to show.
assigned2Allocation Button to show (button2).
button3Button to show.
assigned3Allocation Button to show (button3).
Note
For values of the buttons can be used the same constants buttons.read() buttons except: HOME, NOTE y HOLD.
For mapping values to 5 constants can be possible (in parentheses its numerical value):
  • __OK (1)
  • __CANCEL (2)
  • __YES (3)
  • __NO (4)
  • __EXIT (5)
Returns
Number, a numerical value according to the button assigned.
  • 1 For botón assigned __OK.
  • 2 For botón assigned __CANCEL.
  • 3 For botón assigned __YES.
  • 4 For botón assigned __NO
  • 5 For botón assigned __EXIT
Note
If the answer is the value __EXIT It will not return anything, as will the XMB.

See the following sample for more details.

NIL os.restart ( )

Restart the homebrew.

Returns
Nothing.
NIL os.exit ( )

Closes the homebrew.

Returns
Nothing.
NUMBER os.initprx ( STRING  path,
STRING  argv 
)

Allows to load and start an external prx module.

Parameters
pathPath to the prx.
argvOptionally, you can send a string as an argument to the module.
Returns
A numerical value, in this case id, 0 in case of error, or greater success.
BOOLEAN os.stopprx ( NUMBER  id)

Allows you to download and complete a module external prx.

Parameters
idid of the prx.
Returns
true if success, false otherwise.
NUMBER os.requiere ( STRING  path)

Allows to use ONELua API to add external modules.

Parameters
pathPath to the prx.
Returns
1 if success, 0 otherwise.