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

  • Thread starter Thread starter Rinnegatamante
  • Start date Start date
  • Views Views 187,228
  • Replies Replies 1,199
  • Likes Likes 35
Fairly positive I'm on the latest payload, I installed NinjHax2.5 today with cubic ninja.

I'll do more debugging later and see if I can come up with some more info.

Without xml descriptor you'll use dsp: DSP is highly bugged. You MUST use xml descriptor to enable csnd:SND usage.

I also found a new bug with OGG files so if you get such error, it's "normal": https://github.com/smealum/ctrulib/issues/224
 
Last edited by Rinnegatamante,
How do I use the xml descriptor? Do I put that XML in a file somewhere? What should it be named?
name it the same as your .3dsx (e.g. lpp-3ds.3dsx, lpp-3ds.xml) and put this in it:
Code:
<services autodetect="false">
    <request priority="1">csnd:SND</request>
</services>
 
name it the same as your .3dsx (e.g. lpp-3ds.3dsx, lpp-3ds.xml) and put this in it:
Code:
<services autodetect="false">
    <request priority="1">csnd:SND</request>
</services>
Perfect, thank you! I'll report back tonight when I get a chance to work on this again.
 
So adding the xml descriptor made the background music (OGG) start working, sounds great! However, WAV playback for the sound effects sounds odd, almost like it's playing twice with a short offset.

Additionally, I was able to confirm that exiting is definitely broken on that build, and I suspect the speedup code is as well. I test this by swapping out the lpp-3ds file for the last commit on my fork, which was right after I added the speedup code. Exiting works fine and the game runs much faster. Swapping back to your build without changing code caused the issues to come back. I also put together a small test program to test the exiting and this freezes as well with the latest nightly build.

Any thoughts? Is it worth compiling the latest master?
 
So adding the xml descriptor made the background music (OGG) start working, sounds great! However, WAV playback for the sound effects sounds odd, almost like it's playing twice with a short offset.

Additionally, I was able to confirm that exiting is definitely broken on that build, and I suspect the speedup code is as well. I test this by swapping out the lpp-3ds file for the last commit on my fork, which was right after I added the speedup code. Exiting works fine and the game runs much faster. Swapping back to your build without changing code caused the issues to come back. I also put together a small test program to test the exiting and this freezes as well with the latest nightly build.

Any thoughts? Is it worth compiling the latest master?

I was planning to release a new nightly build after solving the ogg issues i reported in my last post.
Anyway, if you want to try the current last commit i can also send a pre-compiled 3dsx to you through skype (just ask for it when you're online).
 
In the source it looks like its possible to add custom images to show on notifications.
Is it possible to do that. This is the code I have what would I have to do to add custom images?
Code:
        System.addNotification(title,text,image)
 
Crappy as f**k but working :P

Camera support incoming:
camera.jpg

As always, syntax will be very easy also for Camera usage.
Code:
Camera.init(TOP_SCREEN, OUTER_CAM, false)
while true do
   Screen.refresh()
   Camera.getOutput()
   if Controls.check(Controls.read(), KEY_A) then
     Camera.term()
     System.exit()
   end
   Screen.flip()
end
 
Last edited by Rinnegatamante,
  • Like
Reactions: ihaveahax
Is there any way to check if a file exists on the internet?
It'd be useful because a 404 on requestString or downloadFile stops the entire program and shows an error.

Without using sockets don't know if it's possible (due to how httpc service works). What kind of error you get?
 
Could it be possible to launch a 3dsx with arguments and target title?
For example:
(Using a homebrew launcher shortcut)
Code:
<shortcut>
    <executable>/3ds/hans/hans.3dsx</executable>
    <icon>/3ds/ctgp-7.smdh</icon>
    <arg>-f/3ds/hans/titles/ctgp-7.txt</arg>
</shortcut>
<targets selectable="false">
    <title mediatype="1">0004000000030700</title>
    <title mediatype="2">0004000000030700</title>
</targets>
 
Could it be possible to launch a 3dsx with arguments and target title?
For example:
(Using a homebrew launcher shortcut)
Code:
<shortcut>
    <executable>/3ds/hans/hans.3dsx</executable>
    <icon>/3ds/ctgp-7.smdh</icon>
    <arg>-f/3ds/hans/titles/ctgp-7.txt</arg>
</shortcut>
<targets selectable="false">
    <title mediatype="1">0004000000030700</title>
    <title mediatype="2">0004000000030700</title>
</targets>

As of now, 3DSX files can be launched only on NH 1.1b (i'm having some issues trying adding 2.x bootloader).
 
Some news:

- Refactored Microphone support. Deprecated Sound.register and added Mic module which allows to record audio in background (so it will not stop your main thread anymore). [ https://github.com/Rinnegatamante/lpp-3ds/blob/master/samples/mic.lua ]
- Solved any Sound module issue.
- A new official release is near, i just have to do minor things with the help of @ihaveamac like some XML descriptor presets.
 
If I try to download a file that doesn't exist, I get
"download request error."
If I request a string to a file that doesn't exist then I get
"error opening url."

I guess what I really want is for the program to not stop when it can't download a file. Have it reuturn false or something.
you can use pcall to catch errors.
Code:
status, err = pcall(function()
    -- do something
end)
if not status then
    -- err contains the error. you could print it on screen or something
end
 

Site & Scene News

Popular threads in this forum