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
I'm trying to use the socket functions, but...

My code is edited from the socket example:
Code:
Socket.init()
server = Socket.createServerSocket(15505)

-- Create a debug console
cns = Console.new(TOP_SCREEN)
state = 0
while true do
    -- Clear screen
    Screen.refresh()
    Screen.clear(TOP_SCREEN)
    -- State 0: Looking for connections
    if state == 0 then
        -- Writing info on screen
        Console.append(cns, "Looking for connections..."..math.random(1,2))
        Console.append(cns, "\nIP: "..Network.getIPAddress().."\n")

        -- Searching for clients      
        cid = Socket.accept(server)
      
        if cid == nil then
            Console.append(cns, "noclient")
        else
            Console.append(cns," cid: "..cid)
            --state = 1
            Socket.close(cid)
        end
        Console.show(cns)
        Screen.flip()
        Screen.waitVblankStart()
        Console.clear(cns)
    end

end
Basically it should just wait for the connection and then close it. Probelm is that the cid is never "nil", meaning that every loop it thinks there is somekind of unknown connection coming.

I tried many different ports but it didn't help. I checked the traffic with Wireshark and there shouldn't be any packets going to the 3ds. Any ideas?

It's a common bug solved after r4 release ( https://github.com/Rinnegatamante/lpp-3ds/commit/3db26bcc567691cb55b9eeaa79f74f90b3ea2a38 ).
If you have a working devkitPro installed you can compile on your own latest GitHub version to solve.
 

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Attempted to use r4 with Blackjack 3DS... OGG sounds fine, WAVs don't play at all. There is also a high pitched whine in the background when I initialize the Sound module. I'm using CSND with the XML descriptor you provided a few pages back. Exiting sometimes freezes as well. Any ideas? I could do some more experimenting tomorrow evening.
 
  • Like
Reactions: Xenosaiga

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
Attempted to use r4 with Blackjack 3DS... OGG sounds fine, WAVs don't play at all. There is also a high pitched whine in the background when I initialize the Sound module. I'm using CSND with the XML descriptor you provided a few pages back. Exiting sometimes freezes as well. Any ideas? I could do some more experimenting tomorrow evening.

That's really strange :/

Anyway today i finished dsp service support ( https://github.com/Rinnegatamante/lpp-3ds/commit/94a67c5cc44d5da53f2b057067c50437a9ca92fc ). Now it should be good. If you want to try it: http://rinnegatamante.it/lpp-3ds.3dsx (Delete the XML to use dsp).
 
Last edited by Rinnegatamante,

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
That's really strange :/

Anyway today i finished dsp service support ( https://github.com/Rinnegatamante/lpp-3ds/commit/94a67c5cc44d5da53f2b057067c50437a9ca92fc ). Now it should be good. If you want to try it: http://rinnegatamante.it/lpp-3ds.3dsx (Delete the XML to use dsp).
Good news! That works pretty damn well! I got the same results with or without the XML. Both the OGG background music and WAV effects play fine, except occasionally there would be a sound glitch when they played at the same time. Hard to detect why it was occurring. Are you aware of any issues like that?
 

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
Good news! That works pretty damn well! I got the same results with or without the XML. Both the OGG background music and WAV effects play fine, except occasionally there would be a sound glitch when they played at the same time. Hard to detect why it was occurring. Are you aware of any issues like that?

Does the bug appears with csnd or with dsp?
 

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Does the bug appears with csnd or with dsp?
It appears with both for me, though it may have been ever so slightly different. With CSND it seemed like it was playing the WAV effect every so often by itself during the looping of the OGG, except when it played it was glitchy. Could just be a hiccup in the OGG playback I suppose? It almost sounded like some of the wav sound effect's audio was inserted into the OGG's buffer, if that makes any sense (I have no idea how CSND or DSP is designed). When I deleted the xml and used DSP (at least I assume I was using DSP), I had a similar problem but it seemed like it would mostly happen when a user action prompting the WAV playback, instead of on it's own like with CSND. Hope that makes sense.
 

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
It appears with both for me, though it may have been ever so slightly different. With CSND it seemed like it was playing the WAV effect every so often by itself during the looping of the OGG, except when it played it was glitchy. Could just be a hiccup in the OGG playback I suppose? It almost sounded like some of the wav sound effect's audio was inserted into the OGG's buffer, if that makes any sense (I have no idea how CSND or DSP is designed). When I deleted the xml and used DSP (at least I assume I was using DSP), I had a similar problem but it seemed like it would mostly happen when a user action prompting the WAV playback, instead of on it's own like with CSND. Hope that makes sense.

My bad, the version i've told you to download enforces dsp usage (cause i'm on NH1.1b and on NH1.1b you always have access to csnd:SND so you cannot use dsp service and i needed to hardcode dsp usage for debugging).
You can compile latest commit anyway to test differences between csnd and dsp (You can use Sound.getService() to know what service your homebrew is running on.)
 

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
My bad, the version i've told you to download enforces dsp usage (cause i'm on NH1.1b and on NH1.1b you always have access to csnd:SND so you cannot use dsp service and i needed to hardcode dsp usage for debugging).
You can compile latest commit anyway to test differences between csnd and dsp (You can use Sound.getService() to know what service your homebrew is running on.)
Sounds good, I'll compile a version tonight and add a debug print to make sure I know which service I'm using.
 

haazet

Well-Known Member
Newcomer
Joined
Dec 15, 2015
Messages
64
Trophies
0
XP
159
Country
United States
Hey Guys, So I got my project running on Citra Emulator just fine, but I can't get Lua Player Plus to start from the Homebrew Launcher on my 9.0 Europe N3ds??

I put the 3dsx file and the index.lua and the /3ds folder named after the 3dsx(lpp-3ds). But its throwing a red screen on the bottom everytime? Do I need to start CFW first im using browserhax to get the HBL

I attached my Code to look at. Its basically just drawing 2 pictures at this point. Cant get my player to change image when i change directions but that shouldnt have to do with this

Edit: Something was with my main boot.3dsx . I replaced it and now can run Lua Player just fine. However it throws an error on a real 3ds unfortunately, but my fault.
 

Attachments

  • StartofGame.zip
    948.3 KB · Views: 169
Last edited by haazet,

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
My bad, the version i've told you to download enforces dsp usage (cause i'm on NH1.1b and on NH1.1b you always have access to csnd:SND so you cannot use dsp service and i needed to hardcode dsp usage for debugging).
You can compile latest commit anyway to test differences between csnd and dsp (You can use Sound.getService() to know what service your homebrew is running on.)

So I'm still getting a high pitched whine when I try to play a WAV. The whine persists if I exit the game and restart it. I converted my sound effects to OGG and everything works great now. :) This is with CSND btw. I've uploaded the a wav file so you can try it out.
 

Attachments

  • flipcard.zip
    24 KB · Views: 152
  • Like
Reactions: Rinnegatamante

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
Is OGG streaming broken? I'm getting the same ~6 second section looped over and over again, even though I'm calling Sound.updateStream() in my game loop. Also looks like the game is freezing
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Sicklyboy @ Sicklyboy: Can't wait for season 2