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

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 187,230
  • Replies Replies 1,199
  • Likes Likes 35
When I run the "graphics_and_controls.lua" example, it stops registering my button presses as soon as I move the circlepad. I'm using the v2 beta. Am I'm doing something wrong or is this a bug?
 
When I run the "graphics_and_controls.lua" example, it stops registering my button presses as soon as I move the circlepad. I'm using the v2 beta. Am I'm doing something wrong or is this a bug?

Strange, it's probably a bug, i'll take a look into luaControls module.
 
Can someone who have FTP issues check if this build solved the problem? ( http://rinnegatamante.it/test.3dsx NOTE: It takes scripts/index.lua instead of index.lua as main script)
Doesn't seem to do anything. Tried throwing an error to get to "Press Y to start FTP server", as well as "Network.initFTP()". Using Ironhax
 
So I have set up your method partially correct but here is what happens when I try to test


http://bronzeflames.deviantart.com/art/Capture-561037885?ga_submit_new=10%3A1442603585

it doesn't even show a black screen. just sits there waiting


edit: I have tried this with the code that comes with llp still no luck. However, when I load the 3dsx it self into citra I get a error message

You need to put the index.lua file in the citra/user/sdmc folder, not in the same directory as your 3dsx. On a real console they need to be in the same folder. I'm using a symbolic link to keep my files organized so that's why it looks like my files are all together in the screenshot I posted.
 
Last edited by 0x0wl,
  • Like
Reactions: BurningDesire
How do I use Sound.updateStream()? When I load an Ogg with use_streaming = true only a part of it plays. On the other hand, if streaming is off, it takes ages to load, unlike WAV.
 
is there anyway that the 3ds will freeze when i will load an image with this code

Code:
Graphics.init()  
while true do
Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"EXTRACTING CBZ",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    System.extractZIP(System.currentDirectory().."/main.cbz",System.currentDirectory().."/cache")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"LOADING PIC TO CACHE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    page = Screen.loadImage(System.currentDirectory().."/cache/01.jpg")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"CACHING COMPLETE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
        x_print = 0
        y_print = 0
        big_image = false
        width = Screen.getImageWidth(page)
        height = Screen.getImageHeight(page)
        if width > 400 then
            width = 400
            big_image = true
        end
        if height > 240 then
            height = 240
            big_image = true
        end
    -- Showing current image
    if big_image then
    Screen.waitVblankStart()
        Screen.refresh()  
    Screen.drawPartialImage(0,0,x_print,y_print,width,height,page,TOP_SCREEN)
        x,y = Controls.readCirclePad()
        if (x < - 100) and (x_print > 0) then
            x_print = x_print - 5
            if x_print < 0 then
                x_print = 0
            end
        end
        if (y > 100) and (y_print > 0) then
            y_print = y_print - 5
            if y_print < 0 then
                y_print = 0
            end
        end
        if (x > 100) and (x_print + width < Screen.getImageWidth(page)) then
            x_print = x_print + 5
        end
        if (y < - 100) and (y_print + height < Screen.getImageHeight(page)) then
            y_print = y_print + 5
        end
        if x_print + width > Screen.getImageWidth(page) then
            x_print = Screen.getImageWidth(page) - width
        end
        if y_print + height > Screen.getImageHeight(page) then
            y_print = Screen.getImageHeight(page) - height
        end
    else
    Screen.waitVblankStart()
        Screen.refresh()
        Screen.drawImage(0,0,page,TOP_SCREEN)
    end
end

because the pic is too big. or the RAM is a little to little? i want to try load the frist page of one of the sonic scanf site and then its constantly freezing at loading it into the RAM or must i wait a little bit longer?
 
Last edited by ddraco,
I use The code durectly in The 3ds. And for freezing: it only Shows ibstantly "LOADING PIC TO CACHE" also it must still load theoretically The pic into ram or whateve
 
I use The code durectly in The 3ds. And for freezing: it only Shows ibstantly "LOADING PIC TO CACHE" also it must still load theoretically The pic into ram or whateve

You're loading an image on every cycle of your main loop.
You'll go out of memory in few seconds.
 
Probably depends on the order you draw them in. Render the image, then the text.
I'll try that. I put a end after i did the image then I add Screen.Debug blah blah blah after the end then put a end after the debug. Everything works dandy the text just does show i also have the Screen.Flip() fucntion or whatever it is in the function and where i drew the text.

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

Someone needs to make a entire new language for 3ds that would be sick
 
nothing changed after ich changed the code to this
Code:
Graphics.init()   
Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"EXTRACTING CBZ",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    System.extractZIP(System.currentDirectory().."/main.cbz",System.currentDirectory().."/cache")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"LOADING PIC TO CACHE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    page = Screen.loadImage(System.currentDirectory().."/cache/01.jpg")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"CACHING COMPLETE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
while true do
        x_print = 0
        y_print = 0
        big_image = false
        width = Screen.getImageWidth(page)
        height = Screen.getImageHeight(page)
        if width > 400 then
            width = 400
            big_image = true
        end
        if height > 240 then
            height = 240
            big_image = true
        end
    -- Showing current image
    if big_image then
    Screen.waitVblankStart()
        Screen.refresh()   
    Screen.drawPartialImage(0,0,x_print,y_print,width,height,page,TOP_SCREEN)
        x,y = Controls.readCirclePad()
        if (x < - 100) and (x_print > 0) then
            x_print = x_print - 5
            if x_print < 0 then
                x_print = 0
            end
        end
        if (y > 100) and (y_print > 0) then
            y_print = y_print - 5
            if y_print < 0 then
                y_print = 0
            end
        end
        if (x > 100) and (x_print + width < Screen.getImageWidth(page)) then
            x_print = x_print + 5
        end
        if (y < - 100) and (y_print + height < Screen.getImageHeight(page)) then
            y_print = y_print + 5
        end
        if x_print + width > Screen.getImageWidth(page) then
            x_print = Screen.getImageWidth(page) - width
        end
        if y_print + height > Screen.getImageHeight(page) then
            y_print = Screen.getImageHeight(page) - height
        end
    else
    Screen.waitVblankStart()
        Screen.refresh()
        Screen.drawImage(0,0,page,TOP_SCREEN)
    end
end
 
nothing changed after ich changed the code to this
Code:
Graphics.init()  
Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"EXTRACTING CBZ",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    System.extractZIP(System.currentDirectory().."/main.cbz",System.currentDirectory().."/cache")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"LOADING PIC TO CACHE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
    page = Screen.loadImage(System.currentDirectory().."/cache/01.jpg")
    Screen.clear(BOTTOM_SCREEN)
    Screen.waitVblankStart()
    Screen.refresh()
    Screen.debugPrint(0,0,"CACHING COMPLETE",Color.new(255,255,255),BOTTOM_SCREEN)
    Screen.flip()
while true do
        x_print = 0
        y_print = 0
        big_image = false
        width = Screen.getImageWidth(page)
        height = Screen.getImageHeight(page)
        if width > 400 then
            width = 400
            big_image = true
        end
        if height > 240 then
            height = 240
            big_image = true
        end
    -- Showing current image
    if big_image then
    Screen.waitVblankStart()
        Screen.refresh()  
    Screen.drawPartialImage(0,0,x_print,y_print,width,height,page,TOP_SCREEN)
        x,y = Controls.readCirclePad()
        if (x < - 100) and (x_print > 0) then
            x_print = x_print - 5
            if x_print < 0 then
                x_print = 0
            end
        end
        if (y > 100) and (y_print > 0) then
            y_print = y_print - 5
            if y_print < 0 then
                y_print = 0
            end
        end
        if (x > 100) and (x_print + width < Screen.getImageWidth(page)) then
            x_print = x_print + 5
        end
        if (y < - 100) and (y_print + height < Screen.getImageHeight(page)) then
            y_print = y_print + 5
        end
        if x_print + width > Screen.getImageWidth(page) then
            x_print = Screen.getImageWidth(page) - width
        end
        if y_print + height > Screen.getImageHeight(page) then
            y_print = Screen.getImageHeight(page) - height
        end
    else
    Screen.waitVblankStart()
        Screen.refresh()
        Screen.drawImage(0,0,page,TOP_SCREEN)
    end
end

Please ident your code or it will be quite difficult to understand what you meant to write.
 

Site & Scene News

Popular threads in this forum