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 can't even figure out how to compile lpp-3ds.
When I do the commands that are in build.bat (so I can see the errors), I eventually get:

C:\Users\admin\Desktop\lpp-3ds>make
shader.vsh
#@python /aemstro_as.py /c/Users/admin/Desktop/lpp-3ds/data/shader.vsh ../shader
.vsh.shbin Use this if you have only Python 3.x
c:\Python31\Python.exe: can't open file 'c:/devkitPro/msys/aemstro_as.py': [Errno 2] No such file or directory
make[1]: *** [shader.vsh.o] Error 2
make: *** [build] Error 2

There is a directory called msys, it just doesn't have aemstro_as.py in it.

You have to install Python3 (edit the c:\Python31 string with your own folder) and aemstro.
 

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
Alright, I'm done with that. Now I have a different error.
linking lpp-3ds.elf
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/4.9.2/../../../../arm-none-e
abi/bin/ld.exe: cannot find 3dsx_crt0.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/Users/admin/Desktop/lpp-3ds/lpp-3ds.elf] Error 1
make: *** [build] Error 2
I tried googling 3dsx_ctr0.o, but nothing that relevant came up.
Change softfp to hard.
https://github.com/Rinnegatamante/lpp-3ds/blob/master/Makefile#L46
 

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
As @TheCruel said, swapping to hardware floating-pointing makes vorbisfile decoding wrong vorbis packs (and so OGG decoding will be corrupted).

Navigate in \devkitPro\devkitARM\arm-none-eabi\lib and place these files here.

P.S. For who was interested in addNotification, @ihaveamac discovered an interesting thing.
Also, working on error handler improvement, i found what broke System.exit functionallity on NH2.x. Right now, last commit fix the error crash.
 

Attachments

  • 3dsx_crt0.rar
    1.7 KB · Views: 161
Last edited by Rinnegatamante,

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
P.S. For who was interested in addNotification, @ihaveamac discovered an interesting thing.
the trick is to launch lpp-3ds under a game (system titles don't work). that's it, really. as far as I know, this is only needed for ninjhax 2.x.

I took the .xml RetroArch uses for MAME and put it here: https://gist.github.com/ihaveamac/2f902a913fbd7352f7f9
put it alongside the lpp-3ds file and notifications should work. the blue notification light will glow when it's added. they might appear as the title that's used, such as YouTube.
 
  • Like
Reactions: Rinnegatamante

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
thought this was the best place to put it:

"addNotification" seems to respond differently to system titles, now that I've decided to do more thorough tests. all of these were done on Old 3DS 10.3.0-28U.
  • Health & Safety Old 3DS: crash at launch
  • Activity Log: crash at launch
  • Download Play: crash at launch
  • System Settings: crash at launch
  • System Transfer/???: crash at launch
  • Nintendo Network ID Settings: crash adding notification
  • Nintendo eShop: crash adding notification
  • Nintendo 3DS Camera: crash adding notification
  • Mii Maker: crash adding notification
  • Nintendo 3DS Sound: yes
  • StreetPass Mii Plaza: yes
  • AR Games: yes
  • Face Raiders: yes
  • Nintendo Zone viewer: yes
 
Last edited by ihaveahax,
  • Like
Reactions: Rinnegatamante

HexZyle

Pretty Petty Pedant
Member
Joined
Sep 12, 2015
Messages
300
Trophies
0
XP
452
Country
Australia
How do I mimic the exact image that the drawPartialImage function creates using the drawImageExtended function? Because I tried this
Code:
Graphics.drawPartialImage(tx,ty, 0,0, 21,40, img_arc_vaultvr_user, white)
Graphics.drawImageExtended(tx,ty, 0,0, 21,40, 0,1,1, img_arc_vaultvr_user, white)
And it gave me this:
screenshot04-2.png

If the functions were identical I should only see one copy of the image since they'd be both exactly on top of eachother

Do they treat different parts of the image as the origin?

Additionally, when the image generated by drawImageExtended is moving around the screen one pixel at a time, it jitters left and right a pixel.
 
Last edited by HexZyle,

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 mimic the exact image that the drawPartialImage function creates using the drawImageExtended function? Because I tried this
Code:
Graphics.drawPartialImage(tx,ty, 0,0, 21,40, img_arc_vaultvr_user, white)
Graphics.drawImageExtended(tx,ty, 0,0, 21,40, 0,1,1, img_arc_vaultvr_user, white)
And it gave me this:
screenshot04-2.png

If the functions were identical I should only see one copy of the image since they'd be both exactly on top of eachother

Do they treat different parts of the image as the origin?

Additionally, when the image generated by drawImageExtended is moving around the screen one pixel at a time, it jitters left and right a pixel.

Strange, it's probably an issue related to sf2dlib. Function calls looks fine, maybe what causes the problem is the 0 you put for rotation purposes. Anyway if you don't need scalation, rotation and other effects, using drawImageExtended will cause only lower performance (also giving a color like white, if it doesn't change the texture is useless, it will only drop performance).
 

HexZyle

Pretty Petty Pedant
Member
Joined
Sep 12, 2015
Messages
300
Trophies
0
XP
452
Country
Australia
Strange, it's probably an issue related to sf2dlib. Function calls looks fine, maybe what causes the problem is the 0 you put for rotation purposes. Anyway if you don't need scalation, rotation and other effects, using drawImageExtended will cause only lower performance (also giving a color like white, if it doesn't change the texture is useless, it will only drop performance).

Code:
Graphics.drawImageExtended(tx,ty, 0,0, 21,40, 0,tf,1, img_arc_vaultvr_user, white)
I need horizontal scaling for sprite flipping purposes, I just removed the variable from the function for debugging sake. The sprite correctly flips on the spot when I use -1 and 1 as the horizontal scaling factor, however the point is the two draw functions draw the object in different places and I don't know what the offset is or why it occurs.

The white blend is just a placeholder, I plan to have the sprites greyscale and the blend as a selectable variable
 
Last edited by HexZyle,

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 need horizontal scaling for sprite flipping purposes, I just removed the variable from the function for debugging sake. The sprite correctly flips on the spot when I use -1 and 1 as the horizontal scaling factor, however the point is the two draw functions draw the object in different places and I don't know what the offset is or why it occurs.

The white blend is just a placeholder, I plan to have the sprites plain and the blend as a selectable variable

In next few days i'll take a look to last updates from @xerpi to sf2dlib to see if it will solve the problem.
If not, i'll get in touch with him to investigate the issue.
 
  • Like
Reactions: HexZyle

HexZyle

Pretty Petty Pedant
Member
Joined
Sep 12, 2015
Messages
300
Trophies
0
XP
452
Country
Australia
Do they treat different parts of the image as the origin?
My suspicion was correct. The image is 21x40. The top left image (drawImageExtended) is 10 pixels left and 20 pixels above the other (drawPartialImage) indicating that that the former has the origin in the center of the sprite, and the latter has the origin at the top left corner. It also explains the horizontal pixel jitter. (21 divided by 2 is actually 10.5 and this value is being rounded)
 
Last edited by HexZyle,

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
To anyone who wants to use audio in their homebrews, i'm currently working hard to solve dsp:: DSP service problem. In the meantime, i fixxed csnd:SND service on NH 2.5 (it means audio is now available also on NH2.5!) but there are few things to say:

1) There could be some bug with static loud / looped blocks with OGG streaming (report me music files info if this appears like bitrate, samplerate, audiotype, audio length).
2) An audio device has been implemented in lpp-3ds. It means you no longer need to specify channels with Sound.play.
3) Now Sound.play can assume as facoltative 3rd argument an interpolation mode (NO_INTERP, LINEAR_INTERP, POLYPHASE_INTERP). By default is set to LINEAR_INTERP and POLYPHASE_INTERP is available only with dsp:: DSP
4) Sound system now check at the begin if csnd:SND service is accessible. If it's available, it's used as sound service, if not, (experimental) dsp:: DSP is used.
5) To check if your executable is running csnd:SND or dsp:: DSP, you can use Sound.getService(), it will returns you a string with the service currently running with Sound system.
6) Video playback (JPGV & BMPV) are currently using csnd:SND hardcoded. It means if you use a Video module feature when you're on dsp:: DSP, you'll get a console freeze.
7) Network module and csnd:SND are incompatible. It means if you need Socketing or Networking you have to use experminetal dsp:: DSP which have a lot of issues ( https://github.com/smealum/ctrulib/issues/209 )
8) To use csnd:SND you have to use this service descriptor template in your homebrew:

Code:
<services autodetect="false">
  <request priority="1">csnd:SND</request>
</services>

To use sound system, you can grab this Nighly Build: https://github.com/Rinnegatamante/lpp-3ds/commit/6c46ddd9f95aad14e068827ac91e1459907a9b70

Hey man, I'm working on getting sound back in Blackjack 3DS finally, using your nightly build. All I've changed so far is un-commenting my sound code and removing the channels from the Sound.play calls. WAV playback is working fine for my sound effects but OGG playback is stuttering. I use a non-streamed OGG file set to loop for background music. I haven't included your "service descriptor template", not sure where that XML snippet is supposed to go.

Additionally I don't appear to me getting a speed boost from System.setCpuSpeed(NEW_3DS_CLOCK) anymore, and System.exit is bringing me to a black screen instead of the homebrew menu. I'm on NH2.5 with firmware 10.3.

Thanks for the help!
 
  • Like
Reactions: Xenosaiga

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
Additionally I don't appear to me getting a speed boost from System.setCpuSpeed(NEW_3DS_CLOCK) anymore, and System.exit is bringing me to a black screen instead of the homebrew menu. I'm on NH2.5 with firmware 10.3.
odd, they seem to have been working for me. have you tried updating the hax payload for whatever you're using? the latest has the date 2015-11-18. you could also try "System.setCpuSpeed(804)" directly.
 

keanutah

Well-Known Member
Member
Joined
Sep 18, 2015
Messages
173
Trophies
0
Age
34
XP
192
Country
United States
odd, they seem to have been working for me. have you tried updating the hax payload for whatever you're using? the latest has the date 2015-11-18. you could also try "System.setCpuSpeed(804)" directly.

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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @SylverReZ, lol +1