Homebrew [Release] Lua Player Plus 3DS (lpp-3ds) - LUA interpreter for 3DS

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 187,239
  • Replies Replies 1,199
  • Likes Likes 35
Is this code wrong, or does System.getBatteryLife() not work?
Code:
life_battery = System.getBatteryLife()
Screen.debugPrint(125, 224, ("Battery:" .. tostring(life_battery)), Color.new(255,255,255), BOTTOM_SCREEN)
This displays a 0 for me.

You can directly concatenate a string with a number without casting it with tostring. Anyway the code should work fine.
 
So theres no cia.. on top of that this is not easy to figure out if your not using homebrew loader ... converting elf to cia .. been on a hunt over google in hopes somebody converted this thing -_-
 
So theres no cia.. on top of that this is not easy to figure out if your not using homebrew loader ... converting elf to cia .. been on a hunt over google in hopes somebody converted this thing -_-

If you don't know how to use makerom, you'll probably not be able to develop in lua too so not a big problem.
 
  • Like
Reactions: Quantumcat
all I want to do is to use Lua Player Plus on Emunand ... I don't have homebrew Launcher so the .3DS file won't work need a cia... just wish somebody would make a video player and actually make a cia! been wanting a video player for a while seems most are confusing and or have the oddest file format ...but this seems to be the only video player released at the moment -_-
 
all I want to do is to use Lua Player Plus on Emunand ... I don't have homebrew Launcher so the .3DS file won't work need a cia... just wish somebody would make a video player and actually make a cia! been wanting a video player for a while seems most are confusing and or have the oddest file format ...but this seems to be the only video player released at the moment -_-

Lua Player Plus is not a video player.
 
I just tried this on my old 3ds and that returns 0 when it's at 3/4 battery. I'll keep looking into this, thanks for your help.


Are you talking about it's ability to play JPGV videos? If you want to do that, get Sunshell.

Is your battery in charge?
If not, maybe the problem could be related on lpp-3ds not properly access to ptm:u service. (If so, try to use a XML descriptor to force service detection).
 
Adding an xml fixed it. Is there a way for me to have access to network functions and the battery function?

You can try to put both in descriptor but probably they won't work. Just a NH2.5 issue with big homebrews :S. On fw 9.2 or lower, your homebrew should be able to access both network and ptm:u services.
 
  • Like
Reactions: Deleted User
all I want to do is to use Lua Player Plus on Emunand ... I don't have homebrew Launcher so the .3DS file won't work need a cia... just wish somebody would make a video player and actually make a cia! been wanting a video player for a while seems most are confusing and or have the oddest file format ...but this seems to be the only video player released at the moment -_-

Hahahahahah, I giggled.
This is not a video player, it's a lua script "translator". You can code lua and play it on 3DS with it.
I kind of understand why you got confused with the name though. :lol:

Anyway, if you really want to compile this as a CIA, you would need to make a banner (png 256x128 pixels), an icon (png 48x48) and a wav file (3 seconds) then use bannertool.exe (steveice10) to compile it into a banner and icon (smdh) for the home menu, then configure a rsf file and compile these 4 files (including the provided lua player .elf) into a cia with makerom.exe. You can find detailed instructions on how to do this around gbatemp. just search.

Edit: Also, by default, if you use the precompiled elf the lua file will be loaded from the root of your sdcard.
 
"It provides different cool features like audio playback, video playback, zip extraction, images loading support, alpha blending, network features, socketing features, etc..."
Yea I got confused ... That tends to happen often misread and mis understand a post ... I am sorry.. I am looking into the cia of sunshell
 
Alright, string.len seems to be causing lpp to freeze.
Is this a bug or am I doing something wrong?

Code:
while true do
   -- updating screens
   Screen.waitVblankStart()
   Screen.refresh()

   -- Exiting to HBL
   if (Controls.check(Controls.read(),KEY_HOME)) then System.exit() end

   -- Variable initializing
   fontsize = 18
   curline = 0
   curscript = 0
   marginx = 10
   marginy = 10
   posline = marginy

   -- Font definitions
   defaultfont = Font.load("default.ttf")
   textcolor = Color.new(255,255,255)
   Font.setPixelSizes(defaultfont,fontsize)

   -- Functions
   function newline (text)
     curline = curline+1
     Font.print(defaultfont, marginx, posline, text, textcolor, BOTTOM_SCREEN)
     posline = posline + fontsize
   end

   function clear ()
     Screen.clear(BOTTOM_SCREEN)
     posline = nil
   end

   function nextline()
     curscript = curscript + 1
     newline(script[curscript])
   end

   -- Setting up the text frame
   Screen.fillRect(5, 315, 5, 235, Color.new(40,40,40), BOTTOM_SCREEN)

   text = "Mussum ipsum cacilds, vidis litro abertis. Consetis adipiscings elitis. Pra lá , depois divoltis porris, paradis. Paisis, filhis, espiritis santis. Mé faiz elementum girarzis, nisi eros vermeio, in elementis mé pra quem é amistosis quis leo. Manduma pindureta quium dia nois paga. Sapien in monti palavris qui num significa nadis i pareci latim. Interessantiss quisso pudia ce receita de bolis, mais bolis eu num gostis."
   strsize = string.len(text)

   newline(strsize)

   Screen.flip()

end

Edit: Sorry, I'm retarded. Was using an already used variable name for 'text' lol.
 
Last edited by phalk,
I decided to release a new important Nightly Build with a really cool new feature: romFS script loader for CIA/3DS builds.

First of all here's the link to download this new release: https://github.com/Rinnegatamante/lpp-3ds/tree/master/bin

What does it means? It means that now main script for CIA/3DS builds will be bundled in the executable so recompiling the sourcecode to edit main script is no longer needed!

To build a working CIA/3DS homebrew you should follow these steps:

1) Download the Nightly Build version: https://github.com/Rinnegatamante/lpp-3ds/tree/master/bin
2) Download makerom.exe, 3dstool.exe, cia_workaround.rsf, gw_workaround.rsf and buildscript.bat from the repository: https://github.com/Rinnegatamante/lpp-3ds
3) Create a folder called romFs and place inside this folder the index.lua file.
4) Create a banner.bin and an icon.bin files to use as banner and icon with whatever you want (bannertool and similars for example).
5) Edit the RSF files to change homebrew name, Unique ID and Product Code.
6) Launch buildscript.bat.
7) Profit!

This is how your folders should look like before launching buildscript:
cia3ds.png


Tell me if it works fine for you!
 
  • Like
Reactions: ihaveahax
I decided to release a new important Nightly Build with a really cool new feature: romFS script loader for CIA/3DS builds.

First of all here's the link to download this new release: https://github.com/Rinnegatamante/lpp-3ds/tree/master/bin

What does it means? It means that now main script for CIA/3DS builds will be bundled in the executable so recompiling the sourcecode to edit main script is no longer needed!

To build a working CIA/3DS homebrew you should follow these steps:

1) Download the Nightly Build version: https://github.com/Rinnegatamante/lpp-3ds/tree/master/bin
2) Download makerom.exe, 3dstool.exe, cia_workaround.rsf, gw_workaround.rsf and buildscript.bat from the repository: https://github.com/Rinnegatamante/lpp-3ds
3) Create a folder called romFs and place inside this folder the index.lua file.
4) Create a banner.bin and an icon.bin files to use as banner and icon with whatever you want (bannertool and similars for example).
5) Edit the RSF files to change homebrew name, Unique ID and Product Code.
6) Launch buildscript.bat.
7) Profit!

This is how your folders should look like before launching buildscript:
cia3ds.png


Tell me if it works fine for you!

Nice one! ;)
 
Some issues with the 3dsx version:
- When I exit to HBL, other apps get a little messed up (ftbrony screen gets unstable)
- At the 4th or 5th time you get out of it back to HBL, the launcher stops working. If I try to run LPP again it won't find the LUA file. If I try to open ftbrony it'll tell me it's unable to open something. The only option I have is to reboot the system entirely so I can resume coding and testing.
- If I let my lua app running idle for some minutes it'll eventually crash -- screen will display garbage and the system totally freezes and I have to reset it.

System: O3DS 9.2 using Menuhax.

Ftbrony error after leaving the app for the 5th time:
nAEri2E.jpg

Edit: By the looks of it, I lose access to the sdcard. Or memory. Or something. :|

I know this is not very important, I can just reset the system and blabla, but it's very annoying and time consuming during coding. Even more so for someone not very experienced like me who do things wrong a LOT before getting it to work, haha.
 
Last edited by phalk,
Some issues with the 3dsx version:
- When I exit to HBL, other apps get a little messed up (ftbrony screen gets unstable)
- At the 4th or 5th time you get out of it back to HBL, the launcher stops working. If I try to run LPP again it won't find the LUA file. If I try to open ftbrony it'll tell me it's unable to open something. The only option I have is to reboot the system entirely so I can resume coding and testing.
- If I let my lua app running idle for some minutes it'll eventually crash -- screen will display garbage and the system totally freezes and I have to reset it.

System: O3DS 9.2 using Menuhax.

Ftbrony error after leaving the app for the 5th time:
nAEri2E.jpg

Edit: By the looks of it, I lose access to the sdcard. Or memory. Or something. :|

I know this is not very important, I can just reset the system and blabla, but it's very annoying and time consuming during coding. Even more so for someone very experienced like me who do things wrong a LOT before getting it to work, haha.

Are you sure to be purging everything fine?
 

Site & Scene News

Popular threads in this forum