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

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country
Code:
arm-none-eabi-gcc -MMD -MP -MF /c/Users/Chris/Desktop/lpp-3ds-master/build/jutils.d -g -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/c/Users/Chris/Desktop/lpp-3ds-master/include -I/c/Users/Chris/Desktop/lpp-3ds-master/libctru/include -I/c/Users/Chris/Desktop/lpp-3ds-master/source/include -I/c/Users/Chris/Desktop/lpp-3ds-master/build -DARM11 -D_3DS -DLODEPNG_NO_COMPILE_ENCODER -DLUA_C89_NUMBERS -DLIBCTRU_NO_DEPRECATION -c /c/Users/Chris/Desktop/lpp-3ds-master/source/include/libjpeg/jutils.c -o jutils.o
linking lpp-3ds-master.elf
sharedbook.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/Users/Chris/Desktop/lpp-3ds-master/lpp-3ds-master.elf] Error 1
make: *** [build] Error 2

I get this error when trying to compile can someone help?
 

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,

Giantblargg

Active Member
Newcomer
Joined
Nov 28, 2015
Messages
41
Trophies
0
Location
Behind you
XP
167
Country
Canada
You can write a converter from hex value to binary value if you really need it. To read a file in hex values you can see ORGANIZ3D or Sunshell Filebrowser sourcecode for the Hex Viewer ( https://github.com/Rinnegatamante/Sunshell/blob/master/LUA/modules/fb.lua#L549-L581 + https://github.com/Rinnegatamante/Sunshell/blob/master/LUA/modules/fb.lua#L592-L607)

Thanks, I didn't know about string.byte. Most other lua implementations I've used have a native way to read binary files.
 

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
Code:
arm-none-eabi-gcc -MMD -MP -MF /c/Users/Chris/Desktop/lpp-3ds-master/build/jutils.d -g -O2 -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=softfp -I/c/Users/Chris/Desktop/lpp-3ds-master/include -I/c/Users/Chris/Desktop/lpp-3ds-master/libctru/include -I/c/Users/Chris/Desktop/lpp-3ds-master/source/include -I/c/Users/Chris/Desktop/lpp-3ds-master/build -DARM11 -D_3DS -DLODEPNG_NO_COMPILE_ENCODER -DLUA_C89_NUMBERS -DLIBCTRU_NO_DEPRECATION -c /c/Users/Chris/Desktop/lpp-3ds-master/source/include/libjpeg/jutils.c -o jutils.o
linking lpp-3ds-master.elf
sharedbook.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/Users/Chris/Desktop/lpp-3ds-master/lpp-3ds-master.elf] Error 1
make: *** [build] Error 2

I get this error when trying to compile can someone help?

Pretty strange issue, if you only need latest commits, you can grab a build up-to-date here: https://github.com/Rinnegatamante/Lua-RayCast3D
 

HeyItsJono

Breath of Fresh Heir
Member
Joined
Mar 26, 2011
Messages
213
Trophies
1
XP
285
Country
Hi there! This interpreter is awesome, but I'm running into a couple of problems with some of the System functions. For me it seems that System.launch3DSX() doesn't work. My homebrew just hangs when I call it and I have to do a soft reset to the homebrew launcher to get out of it. System.exit() also doesn't seem to work, it begins the exiting process and the bottom screen flashes red, but then instead of booting to the HBL it just continues flashing red then black then red then black. During this time I can soft reboot (hold bumpers + down + B) to properly boot back into the HBL but it seems the System.exit() function itself isn't working, at least on my 3DS. Any help I could get with these issues would be greatly appreciated! I'm using a N3DS XL and the latest Menuhax on 10.3. Thanks for the awesome app!
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,854
Country
United States
For me it seems that System.launch3DSX() doesn't work. My homebrew just hangs when I call it and I have to do a soft reset to the homebrew launcher to get out of it.
this has been solved in newer commits. it was an issue with *hax 2.x changing how it launches 3DSX files. if you would like, I can compile the latest commit for you.
System.exit() also doesn't seem to work, it begins the exiting process and the bottom screen flashes red, but then instead of booting to the HBL it just continues flashing red then black then red then black. During this time I can soft reboot (hold bumpers + down + B) to properly boot back into the HBL but it seems the System.exit() function itself isn't working, at least on my 3DS.
this only happens with mashers's grid launcher. it might be related to sound, I think.
 

HeyItsJono

Breath of Fresh Heir
Member
Joined
Mar 26, 2011
Messages
213
Trophies
1
XP
285
Country
this has been solved in newer commits. it was an issue with *hax 2.x changing how it launches 3DSX files. if you would like, I can compile the latest commit for you.

That would be amazing, thank you! I'm running Windows so compiling these things is a bit over my head.

this only happens with mashers's grid launcher. it might be related to sound, I think.
Ah that's fine! I was just worrying it would affect my users, idm it myself. Thanks for the reply :)
 

HeyItsJono

Breath of Fresh Heir
Member
Joined
Mar 26, 2011
Messages
213
Trophies
1
XP
285
Country
and as if by magic, a built 3dsx appeared.

just for posterity: based on a34b5bf

Thank you, that fixed it!

--------------------- MERGED ---------------------------

@ihaveamac I wanted to take a few screenshots of the homebrew app I made with lpp, but it seems like the standard Home button shortcut to take a screenshot doesn't work. Would you happen to know of any easy way to do it?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,854
Country
United States
@ihaveamac I wanted to take a few screenshots of the homebrew app I made with lpp, but it seems like the standard Home button shortcut to take a screenshot doesn't work. Would you happen to know of any easy way to do it?
lpp-3ds handles the home button so you can use it in a script somehow.

an easy workaround is to add something like this to your script:
Code:
if Controls.check(Controls.read(), KEY_Y) then
    System.takeScreenshot(System.currentDirectory().."/screenshot.bmp")
end
 
Last edited by ihaveahax,

Jwiz33

Banned
Joined
Jun 5, 2014
Messages
2,654
Trophies
0
Location
in the illuminati headquar—I have said too much!
Website
iwillcleanyourbasement.webstarts.com
XP
1,492
Country
United States
lpp-3ds handles the home button so you can use it in a script somehow.

an easy workaround is to add something like this to your script:
Code:
if Controls.check(Controls.read(), KEY_Y) then
    System.takeScreenshot(System.currentDirectory().."/screenshot.bmp")
end
Or, couldn't you just use KEY_HOME instead of KEY_Y? To make it more like the *hax 2.5 payload's screenshots.
Or is the home button only usable in the CIA build(s)?
 

HeyItsJono

Breath of Fresh Heir
Member
Joined
Mar 26, 2011
Messages
213
Trophies
1
XP
285
Country
lpp-3ds handles the home button so you can use it in a script somehow.

an easy workaround is to add something like this to your script:
Code:
if Controls.check(Controls.read(), KEY_Y) then
    System.takeScreenshot(System.currentDirectory().."/screenshot.bmp")
end

Thanks, that did it!
 

ElyosOfTheAbyss

Well-Known Member
Member
Joined
Aug 20, 2015
Messages
2,225
Trophies
1
XP
1,911
Country
When I try to load an image iit gives me the error "attempt to access wrong memory block"

and this is what I wrote that gave me this error
Code:
Screen.drawImage(0,0,background,TOP_SCREEN)
 

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
When I try to load an image iit gives me the error "attempt to access wrong memory block"

and this is what I wrote that gave me this error
Code:
Screen.drawImage(0,0,background,TOP_SCREEN)

background appears to not be an image for CPU rendering system. (loaded with Screen.loadImage)
 

Kartik

Well-Known Member
Member
Joined
Jun 6, 2015
Messages
653
Trophies
0
Location
github
XP
2,748
Country
India
Code:
bg= Screen.loadImage("/3ds/PixelDraw/Themes/bg/pixeldraw.png")
my_font=Font.load("/3ds/PixelDraw/fonts/agencyfb.ttf")

while true do

Screen.waitVblankStart()
    Screen.refresh()

    Screen.drawImage(0, 0,bg, TOP_SCREEN)

    Font.print(my_font, 0,0 , "Hello World!.I am Kartik.THis my first program using lua and ipp-3ds ", Color.new(255,0,0), TOP_SCREEN)
    Font.print( my_font,0,15,"Press the x button to clear bottom screen",Color.new(0,0,255),TOP_SCREEN)
    Font.print(my_font, 0,30,"Press the x button to change the font to pretendo ",Color.new(255,0,255),TOP_SCREEN)
    Font.print(my_font,0,45,"Press the L+R+B+DDOWN buttons to exit ",Color.new(255,0,0),TOP_SCREEN)
    Font.print( my_font,0,60,"Press the DDOWN button to change the pixel color to green ",Color.new(255,0,255),TOP_SCREEN)
    Font.print(my_font,0,75,"Press the DUP button to change the pixel color to blue ",Color.new(0,0,255),TOP_SCREEN)
    Font.print(my_font, 0,90,"Press the DLEFT button to change the pixel color to yellow ",Color.new(0,255,255),TOP_SCREEN)
    Font.print(my_font,0,105,"Press the DRIGHT button to change the pixel color to pink ",Color.new(0,0,010),TOP_SCREEN)


        Screen.flip()



    if (Controls.check(Controls.read(),KEY_START)) then

    System.exit()
     end


           pad = Controls.read()
    if (Controls.check(pad,KEY_TOUCH)) then



            Screen.waitVblankStart()
             Screen.refresh()

            x,y = Controls.readTouch()
            Screen.drawPixel(x, y, Color.new(255,0,0), BOTTOM_SCREEN)
                Screen.flip()

                end
                if (Controls.check(Controls.read(),KEY_A)) then
                Font.unload(my_font)
                end
                if (Controls.check(Controls.read(),KEY_X)) then
                Screen.clear(BOTTOM_SCREEN)
          end
           end
i am trying to excute this but when i draw the pixels on the ds they act strangely can anybody tell why and how can i solve it
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Si :D