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

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

AshleyCummings

Gamer Girl
Member
Joined
Dec 14, 2011
Messages
545
Trophies
1
Age
35
Location
My own world
XP
420
Country
United States
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 -_-
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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

AshleyCummings

Gamer Girl
Member
Joined
Dec 14, 2011
Messages
545
Trophies
1
Age
35
Location
My own world
XP
420
Country
United States
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 -_-
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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.
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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).
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,078
Country
Brazil
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.
 

AshleyCummings

Gamer Girl
Member
Joined
Dec 14, 2011
Messages
545
Trophies
1
Age
35
Location
My own world
XP
420
Country
United States
"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
 

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,078
Country
Brazil
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,

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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

NichyXD

Well-Known Member
Member
Joined
Feb 13, 2015
Messages
129
Trophies
0
Age
32
XP
231
Country
Italy
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! ;)
 

phalk

Handheld Maniac
Member
Joined
Apr 23, 2009
Messages
588
Trophies
1
Age
36
XP
2,078
Country
Brazil
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,

Rinnegatamante

Well-Known Member
OP
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
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

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
  • S @ salazarcosplay:
    does update 19 really block it
  • SylverReZ @ SylverReZ:
    Update 19 never came out yet. Just the 18.1.
    SylverReZ @ SylverReZ: Update 19 never came out yet. Just the 18.1.