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

cere_ender

Active Member
Newcomer
Joined
Jul 7, 2015
Messages
44
Trophies
0
Age
31
XP
97
Country
If you're not a developer, what you have to do with lpp-3ds itself?
Because I'm a developer, but I use lua instead C because my 3ds development is very low, and LUA is more easier for me right now. (Well, I know C, but I don't dare to programming for 3DS). And as Ninjhax doesn't work in rxtools 2.6, the only way to use lpp-3ds I found is installing it as cia. But only some example code (fixed with System.currentDirectory()) work, and does not show the main menu (execute program, ftp server, etc.
 

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
Because I'm a developer, but I use lua instead C because my 3ds development is very low, and LUA is more easier for me right now. (Well, I know C, but I don't dare to programming for 3DS). And as Ninjhax doesn't work in rxtools 2.6, the only way to use lpp-3ds I found is installing it as cia. But only some example code (fixed with System.currentDirectory()) work, and does not show the main menu (execute program, ftp server, etc.

CIA build of lpp-3ds load index.lua file from SD root. It doesn't have a menu itself cause it's tought to be used for stand-alone homebrews creation.
 
Last edited by Rinnegatamante,
  • Like
Reactions: dfsa3fdvc1

cere_ender

Active Member
Newcomer
Joined
Jul 7, 2015
Messages
44
Trophies
0
Age
31
XP
97
Country
CIA build of lpp-3ds load index.lua file from SD root. It doesn't have a menu itself cause it's tought to be used for stand-alone homebrews creation.
I see. For FTP connection you recommend FTPpony for upload the code? Thank you very much for your support

edit: IDK why, but Controls.check doesn't work properly. Only HOME button works, but when I try to exit or change the program, always stucks at "Closing program".
 
Last edited by cere_ender,

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 see. For FTP connection you recommend FTPpony for upload the code? Thank you very much for your support

edit: IDK why, but Controls.check doesn't work properly. Only HOME button works, but when I try to exit or change the program, always stucks at "Closing program".

ftpBrony is the best FTP solution for 3DS right now.
Check examples for Controls using ( https://github.com/Rinnegatamante/lpp-3ds/blob/master/samples/graphics_and_controls.lua )

Also post your code if you want help, telling "Controls.check don't work" is a bit shameless
 

cere_ender

Active Member
Newcomer
Joined
Jul 7, 2015
Messages
44
Trophies
0
Age
31
XP
97
Country
ftpBrony is the best FTP solution for 3DS right now.
Check examples for Controls using ( https://github.com/Rinnegatamante/lpp-3ds/blob/master/samples/graphics_and_controls.lua )

Also post your code if you want help, telling "Controls.check don't work" is a bit shameless
Hi, rinnegatamante! here's the script:
Code:
if System.currentDirectory() == "/" then
    System.currentDirectory("")
end

Controls.init();

while true do
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(10,10,"Hola mundo",Color.new(255,255,0),TOP_SCREEN);
    if (Controls.check(Controls.read(),KEY_X)) then
        System.exit()
    end
    if (Controls.check(Controls.read(),KEY_HOME)) then
        System.showHomeMenu();
    end
    Screen.flip();
end

Also I tried with pad=Controls.read() on the loop and Controls.check(pad,KEY_...) but doesn't work

Edit: Ok, If I use Controls.check(Controls.read(),KEY_HOME) then System.exit() end it works, but if I use any other KEY, don't.
 
Last edited by cere_ender,

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
Hi, rinnegatamante! here's the script:
Code:
if System.currentDirectory() == "/" then
    System.currentDirectory("")
end

Controls.init();

while true do
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(10,10,"Hola mundo",Color.new(255,255,0),TOP_SCREEN);
    if (Controls.check(Controls.read(),KEY_X)) then
        System.exit()
    end
    if (Controls.check(Controls.read(),KEY_HOME)) then
        System.showHomeMenu();
    end
    Screen.flip();
end

Also I tried with pad=Controls.read() on the loop and Controls.check(pad,KEY_...) but doesn't work

Edit: Ok, If I use Controls.check(Controls.read(),KEY_HOME) then System.exit() end it works, but if I use any other KEY, don't.

On latest release of lpp-3ds, Controls.init is deprecated. Anyway, you have to use it inside main loop.
 

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
Hello Rinnegatamante, what's the way to edit image size once it is loaded?

Currentl images can't be resized via software automatically through lpp-3ds but i'll surely add this feature later.
For now, if you need such a feature you have to write your own rescaler using drawPartialImage/drawPixel feature.
 

cere_ender

Active Member
Newcomer
Joined
Jul 7, 2015
Messages
44
Trophies
0
Age
31
XP
97
Country
Currentl images can't be resized via software automatically through lpp-3ds but i'll surely add this feature later.
For now, if you need such a feature you have to write your own rescaler using drawPartialImage/drawPixel feature.
wow, I don't know how to use this feature. You're doing a great work with this Lua Player! :D
 

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
Last edited by Rinnegatamante,

0x0wl

Member
Newcomer
Joined
Aug 18, 2015
Messages
17
Trophies
0
Age
33
XP
66
Country
United States
I'm interested in using this, but I have a couple of questions.
  • Do I just run make, build lpp-3ds and rename the .3dsx binary and I'm good to go?
  • The included libctru in this repository is 5 months old. Should I replace it with a newer version before building?
  • Are there any issues or disadvantages to using lpp-3ds instead of straight C and ctrulib?
 

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'm interested in using this, but I have a couple of questions.
  • Do I just run make, build lpp-3ds and rename the .3dsx binary and I'm good to go?
  • The included libctru in this repository is 5 months old. Should I replace it with a newer version before building?
  • Are there any issues or disadvantages to using lpp-3ds instead of straight C and ctrulib?

You don't have to use devkitpro to use lpp-3ds just grab R2 from releases

For the issues/disadvantages you're quite limited obviously on what interpreter offer and LUA interpreter take a bit of resources to run (like 1 MB RAM) but for the rest, you'll have only advantages (like a fully working Sound module easy-to-use, FTP server working with only a command, etc...)
 

The_Marcster

Well-Known Member
Newcomer
Joined
Aug 18, 2015
Messages
98
Trophies
0
Age
24
XP
86
Country
Gambia, The
A few weeks ago, I found this thread while browsing, and I wanted to try it out. Unfortunately, I had no way of installing homebrew on my 2DS, so I couldn't do it back then. Now that Smealum released Tubehax, I installed the homebrew channel and tried to run a sample program on my 2DS. Strangely the top screen just turns black und the bottom screen turns red, after that my 2DS just freezes. Do you have an idea why it isn't working for me?
 

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
A few weeks ago, I found this thread while browsing, and I wanted to try it out. Unfortunately, I had no way of installing homebrew on my 2DS, so I couldn't do it back then. Now that Smealum released Tubehax, I installed the homebrew channel and tried to run a sample program on my 2DS. Strangely the top screen just turns black und the bottom screen turns red, after that my 2DS just freezes. Do you have an idea why it isn't working for me?

Update boot.3dsx with the new one Smealum released few hours ago or downgrade to NH 2.0 boot.3dsx.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @K3Nv2, Lol K3N1.