SONY LUA GDC 9 March 2010 RJ Mical
Overview <ul><li>Lua on the PS3 </li></ul><ul><li>SLED </li></ul><ul><li>Sony use of Lua </li></ul>
Lua on the PS3 <ul><li>Available for the PPU and the SPU </li></ul><ul><ul><li>Several versions available, including 5.1.4...
SPU Lua <ul><li>Full Lua implementation, except: </li></ul><ul><ul><li>No parser, code must be precompiled </li></ul></ul>...
SPU Lua Details - 1 <ul><li>Interface provided to allow shared data to be passed to SPU Lua from the PPU </li></ul><ul><ul...
SPU Lua Details - 2 <ul><li>It’s possible to call C++ functions from SPU Lua code </li></ul><ul><ul><li>Register the PPU f...
SLED <ul><li>Excellent editor (any script language, not just Lua) </li></ul><ul><li>Full IDE for script editing and debugg...
Sony Use of Lua <ul><li>Lua available for the PS3 and the PSP </li></ul><ul><li>There are a number of apps that use Lua: <...
Thanks! <ul><li>[email_address] </li></ul><ul><li>http://www.mical.org/ </li></ul>
Upcoming SlideShare
Loading in...5
×

Sony Lua - RJ Mical (SCEA)

2,767

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,767
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sony Lua - RJ Mical (SCEA)

  1. 1. SONY LUA GDC 9 March 2010 RJ Mical
  2. 2. Overview <ul><li>Lua on the PS3 </li></ul><ul><li>SLED </li></ul><ul><li>Sony use of Lua </li></ul>
  3. 3. Lua on the PS3 <ul><li>Available for the PPU and the SPU </li></ul><ul><ul><li>Several versions available, including 5.1.4 </li></ul></ul><ul><li>SLED for editing </li></ul>
  4. 4. SPU Lua <ul><li>Full Lua implementation, except: </li></ul><ul><ul><li>No parser, code must be precompiled </li></ul></ul><ul><ul><li>Not much space so only limited usefulness </li></ul></ul><ul><ul><ul><li>70K memory for Lua objects </li></ul></ul></ul><ul><ul><li>Not able to call Lua from C </li></ul></ul><ul><ul><ul><li>Though you can share data, call C functions on the PPU, signal and synchronize with your C app on the PPU </li></ul></ul></ul>
  5. 5. SPU Lua Details - 1 <ul><li>Interface provided to allow shared data to be passed to SPU Lua from the PPU </li></ul><ul><ul><li>You have to use struct.unpack before using the data </li></ul></ul><ul><li>Programs must be precompiled ofline </li></ul><ul><li>lua_number is a single-precision float </li></ul><ul><li>Memory is a premium, so do garbage collection often! </li></ul>
  6. 6. SPU Lua Details - 2 <ul><li>It’s possible to call C++ functions from SPU Lua code </li></ul><ul><ul><li>Register the PPU functions when initializing the Lua task manager </li></ul></ul><ul><ul><li>In Lua, define a wrapper function that packs the data, sends it to the PPU function, and unpacks the results </li></ul></ul><ul><li>Synchronization between PPU tasks and SPU Lua is accomplished with signals </li></ul>
  7. 7. SLED <ul><li>Excellent editor (any script language, not just Lua) </li></ul><ul><li>Full IDE for script editing and debugging </li></ul><ul><ul><li>Syntax highlighting </li></ul></ul><ul><ul><li>Breakpoints </li></ul></ul><ul><ul><li>Callstack and variable watch list </li></ul></ul><ul><ul><li>Edit and continue </li></ul></ul><ul><li>libsleddebugger on the PPU </li></ul><ul><ul><li>Uses TCP/IP to communicate with the debugger </li></ul></ul><ul><li>Lua plug-in supports compilation too </li></ul>
  8. 8. Sony Use of Lua <ul><li>Lua available for the PS3 and the PSP </li></ul><ul><li>There are a number of apps that use Lua: </li></ul><ul><ul><li>Home </li></ul></ul><ul><ul><li>PhyreEngine </li></ul></ul><ul><ul><li>Buzz </li></ul></ul><ul><ul><li>State Machine </li></ul></ul>
  9. 9. Thanks! <ul><li>[email_address] </li></ul><ul><li>http://www.mical.org/ </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×