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
Is there some sort of wait command?
Like the one in lpp-vita?

If not, would you help me figure out how to make a wait function?

You can use a Timer to temporary block your thread. (Remember to purge the Timer object and take in mind that Timer uses milliseconds, System.wait in lpp-vita uses microseconds).

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

This, for example, is a System.wait implementation for lpp-3ds:

Code:
function System.wait(milliseconds)
   tmp = Timer.new()
   while Timer.getTime(tmp) < milliseconds do end
   Timer.destroy(tmp)
end
 

0x0wl

Member
Newcomer
Joined
Aug 18, 2015
Messages
17
Trophies
0
Age
33
XP
66
Country
United States
You can use a Timer to temporary block your thread. (Remember to purge the Timer object and take in mind that Timer uses milliseconds, System.wait in lpp-vita uses microseconds).

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

This, for example, is a System.wait implementation for lpp-3ds:

Code:
function System.wait(milliseconds)
   tmp = Timer.new()
   while Timer.getTime(tmp) < milliseconds do end
   Timer.destroy(tmp)
end

Doesn't this cause a useless loop (wasting battery)? What if I wanted a thread to wait like 10 minutes?
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
How do I distribute a homebrew as .cia? Should I compile the source with index.lua on its folder? I have no kernel hax so I can't even experiment myself.
 

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
How do I distribute a homebrew as .cia? Should I compile the source with index.lua on its folder? I have no kernel hax so I can't even experiment myself.

You can compile the elf provided in the R3 build with your own banner and icon (but it will use index.lua from root of SD card so it's not very good) or you can compile from sources your own build which loads a custom script by editing main.cpp( https://github.com/Rinnegatamante/lpp-3ds/blob/master/source/main.cpp#L85-L88 )
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina

dannyboy941

Well-Known Member
Newcomer
Joined
Jun 30, 2012
Messages
90
Trophies
0
XP
142
Country
Put index.lua in the same directory as the 3dsx
Thanks now works but i got my 3ds now bricked because i used the Cia Manager i tought A button was launch but he delete it.
But still i can use L button i have ThemeHax there before he load it and how i fix my 3ds?
 
Last edited by dannyboy941,

yodamerlin

Bok bok.
Member
Joined
Apr 1, 2014
Messages
322
Trophies
0
XP
1,050
Country
United Kingdom
The draw rotated image on the GPU, the documentation says radius, but no angle input? How could a radius be helpful? With no angle to base rotation on.
 

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
The draw rotated image on the GPU, the documentation says radius, but no angle input? How could a radius be helpful? With no angle to base rotation on.

0, 0 is the angle used for rotation. I'll probably add another function to rotate an image using the center as rotation angle.
 

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
void Sound.play(wav_id wav_file, int loop, u32 channel, [u32 channel2])
Sorry to be a noob, but where can I find the u32 channel of my wav file?

You can use whatever channel you want expect for dsp reserved ones (from 0x00 to 0x07).
All current homebrews use 0x08 and 0x09 channels for audio.
 
  • Like
Reactions: Jwiz33

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: The only CoD game I played that I truly enjoyed was Black Ops 1, and only the single player...