Homebrew HzMod - old3DS screen streaming

  • Thread starter Thread starter Sono
  • Start date Start date
  • Views Views 290,430
  • Replies Replies 576
  • Likes Likes 102

What should be HorizonModule renamed to?

  • HzMod

    Votes: 11 50.0%
  • HzModule

    Votes: 8 36.4%
  • HzProc

    Votes: 2 9.1%
  • HzDbg

    Votes: 1 4.5%
  • HzDebug

    Votes: 0 0.0%

  • Total voters
    22
  • Poll closed .
I have absolutely no idea why it would crash :/ Low on free RAM? Out of VRAM? What CPU?

I'm going to try to update Windows 10 and see if that helps. I'll give you further details

UPDATE: I just update to Windows 10 1803 and the software loads and works now, ty (How do I take advantage of the New 2DS XL's Feature for HzMod?)
 
Last edited by CyberTails,
I'm going to try to update Windows 10 and see if that helps. I'll give you further details

UPDATE: I just update to Windows 10 1803 and the software loads and works now, ty (How do I take advantage of the New 2DS XL's Feature for HzMod?)

No need to do anything, new3DS checks are inside HzMod which should run stuff on Core3 (I hope).
 
Thought I test this since there was talk about it on the Snickerstream thread and it runs okay-ish on the N2DSXL if you drop the quality down to 50%, just curious if there is any way for performance to be on par or better than NTR in the future or is this the best it can get without hacky workarounds?
 
Thought I test this since there was talk about it on the Snickerstream thread and it runs okay-ish on the N2DSXL if you drop the quality down to 50%, just curious if there is any way for performance to be on par or better than NTR in the future or is this the best it can get without hacky workarounds?

Well, for new3DS I could definitely do some optimizations, but this is sadly old3DS-optimized, and any change to the code WILL break old3DS compatibility, which would defeat the purpose of this thing. But yeah, since you can't map physical memory to your process, it's not possible to have better performance than what we have. NTR runs inside nwm (Nintendo Wireless Module, aka. the wifi (and Ethernet) sysmodule), AND it runs its code inside kernel mode when compressing the frames, so it doesn't need to map physmem to itself because it can already access physmem instead of having to use IntrProcessDMA (which requires time to copy data and RAM to hold the duplicate data).
 
Well, for new3DS I could definitely do some optimizations, but this is sadly old3DS-optimized, and any change to the code WILL break old3DS compatibility, which would defeat the purpose of this thing. But yeah, since you can't map physical memory to your process, it's not possible to have better performance than what we have. NTR runs inside nwm (Nintendo Wireless Module, aka. the wifi (and Ethernet) sysmodule), AND it runs its code inside kernel mode when compressing the frames, so it doesn't need to map physmem to itself because it can already access physmem instead of having to use IntrProcessDMA (which requires time to copy data and RAM to hold the duplicate data).
Ah, so that's why NTR get's such good performance but is somewhat buggy to use, I had many times where it would just not work and I had to reboot and enable it again, I did find HzMod to be much more stable than NTR with the only issue is slightly poorer performance but I'm guessing having 2 versions to maintain is a lot of work.

It's pretty amazing you were able to get this much out of the o3ds despite it's hardware limitations.
 
  • Like
Reactions: Sono
Not having luck getting this to play nice with luma inputredirect, I tried running Hz then running input redirect and it works but Hz shuts off (I assume it does because the teal led shuts off) I then tried launching Hz again then my 3ds crashed. I included the crash dump and Hz log.

When I try running input redirect with HzMem input redirect fails and spits out an error code.
 

Attachments

How do I compile this for Linux?

I already installed libsdl2-dev, and even so it tells me that a bin2c command is missing, so I installed hxtools, and even then it tells me an error.

Log:

Code:
ctrufont.bin
bin2c -o ctrufont.bin.o.c_tmp -n `(echo ctrufont.bin | tr . _)` /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/data/ctrufont.bin && cat ctrufont.bin.o.c_tmp | sed 's/static //g' >ctrufont.bin.o.c && gcc -g -Wall -O0 -Wno-format -Wno-write-strings -Wno-unused-variable -Wno-unused-value  -I/usr/include/SDL2 -D_REENTRANT -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/include -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//include  -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/platform/PC -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/_lzz_temp -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/build_PC_ -D_PC -DBUILDTIME=\"2018/09/27\" -c ctrufont.bin.o.c -o ctrufont.bin.o
Unknown option: -o
Usage: bin2c [-v] [-C FILE] [-D DIR] [-G ARG] [-H FILE] [-p N] [--wxbitmap]
       [--ultra] [-?|--help] [--usage]
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:155: recipe for target 'ctrufont.bin.o' failed
make[1]: *** [ctrufont.bin.o] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2
 
How do I compile this for Linux?

I already installed libsdl2-dev, and even so it tells me that a bin2c command is missing, so I installed hxtools, and even then it tells me an error.

Log:

Code:
ctrufont.bin
bin2c -o ctrufont.bin.o.c_tmp -n `(echo ctrufont.bin | tr . _)` /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/data/ctrufont.bin && cat ctrufont.bin.o.c_tmp | sed 's/static //g' >ctrufont.bin.o.c && gcc -g -Wall -O0 -Wno-format -Wno-write-strings -Wno-unused-variable -Wno-unused-value  -I/usr/include/SDL2 -D_REENTRANT -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/include -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//include  -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/platform/PC -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/_lzz_temp -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/build_PC_ -D_PC -DBUILDTIME=\"2018/09/27\" -c ctrufont.bin.o.c -o ctrufont.bin.o
Unknown option: -o
Usage: bin2c [-v] [-C FILE] [-D DIR] [-G ARG] [-H FILE] [-p N] [--wxbitmap]
       [--ultra] [-?|--help] [--usage]
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:155: recipe for target 'ctrufont.bin.o' failed
make[1]: *** [ctrufont.bin.o] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2

What version of devkitARM do you have? The bin2c command comes from a devkitARM installation.
 
Now install devKitARM, what should I install with the devKitARM pacman?

Oh fuck, I forgot about pacman... well uh, I have no idea. I downloaded my devkitARM package from Sourceforge. It's highly discouraged here to use old versions, but you could either grab the devkitARM_r45 package from Sourceforge or compile bin2c.c from the devkitPro Github.
 
Oh fuck, I forgot about pacman... well uh, I have no idea. I downloaded my devkitARM package from Sourceforge. It's highly discouraged here to use old versions, but you could either grab the devkitARM_r45 package from Sourceforge or compile bin2c.c from the devkitPro Github.

I already installed everything, but now it tells me this:

Code:
[LD] HorizonScreen-PC.elf
g++  ctrufont.bin.o main.o inet_pton.o tga/targa.o   -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/lib -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//lib -lturbojpeg -lz -lSDL2 -o /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf
/usr/bin/x86_64-linux-gnu-ld: cannot find -lturbojpeg
collect2: error: ld returned 1 exit status
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:147: recipe for target '/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf' failed
make[1]: *** [/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2
 
You just need the regular toolchain to compile for Linux.

I already have the devKitARM installed, devKitPRO, with all the packages from the pacman repository: 3ds-dev, I have installed the bin2c compiled since the last version (1.1).
In addition to the basics, GCC.

The error apparently gives it to me because I do not have the turbojpeg installed, since from the main repository it can not be compiled (or at least I did not find how).
So just copy the turbojpeg.h library to the folder soos of HorizonM, and I compiled that part (which I could not before), but now I got stuck in it.
 
I already have the devKitARM installed, devKitPRO, with all the packages from the pacman repository: 3ds-dev, I have installed the bin2c compiled since the last version (1.1).
In addition to the basics, GCC.

The error apparently gives it to me because I do not have the turbojpeg installed, since from the main repository it can not be compiled (or at least I did not find how).
So just copy the turbojpeg.h library to the folder soos of HorizonM, and I compiled that part (which I could not before), but now I got stuck in it.
In addition to the .h which is just the header, you also need the library itself installed on the system.
In the turbojpeg source you should be able to run the usual ./configure (or a variation thereof), make and make install and it should all be taken care of. That's usually how it goes. But it will likely have more specific install instructions.
 
Last edited by The Real Jdbye,
I already have the devKitARM installed, devKitPRO, with all the packages from the pacman repository: 3ds-dev, I have installed the bin2c compiled since the last version (1.1).
In addition to the basics, GCC.

The error apparently gives it to me because I do not have the turbojpeg installed, since from the main repository it can not be compiled (or at least I did not find how).
So just copy the turbojpeg.h library to the folder soos of HorizonM, and I compiled that part (which I could not before), but now I got stuck in it.

libturbojpeg has a ridiculous package name in apt; something like libjpeg-turbo or something like that... just use apt-cache search to find it
 
libturbojpeg has a ridiculous package name in apt; something like libjpeg-turbo or something like that... just use apt-cache search to find it

I installed it (along with its other dev packages, and dbg), and even then it gives me the error of turbojpeg.h, this:

Code:
ctrufont.bin
bin2c -o ctrufont.bin.o.c_tmp -n `(echo ctrufont.bin | tr . _)` /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/data/ctrufont.bin && cat ctrufont.bin.o.c_tmp | sed 's/static //g' >ctrufont.bin.o.c && gcc -g -Wall -O0 -Wno-format -Wno-write-strings -Wno-unused-variable -Wno-unused-value  -I/usr/include/SDL2 -D_REENTRANT -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/include -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//include  -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/platform/PC -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/_lzz_temp -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/build_PC_ -D_PC -DBUILDTIME=\"2018/09/28\" -c ctrufont.bin.o.c -o ctrufont.bin.o
[CX] main.cpp
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:34:10: fatal error: turbojpeg.h: No such file or directory
 #include <turbojpeg.h>
          ^~~~~~~~~~~~~
compilation terminated.
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:139: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2

If I put the file turbojpeg.h in the folder soos of HorizonM, it gives me this:

Code:
[CX] main.cpp
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp: In function ‘int main(int, char**)’:
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:406:24: warning: variable ‘timeout’ set but not used [-Wunused-but-set-variable]
         struct timeval timeout;
                        ^~~~~~~
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:602:9: warning: label ‘nocoffei’ defined but not used [-Wunused-label]
         nocoffei:
         ^~~~~~~~
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp: In destructor ‘bufsoc::~bufsoc()’:
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:134:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
         if(!this) return;
         ^~
[CC] inet_pton.c
[CC] targa.c
[LD] HorizonScreen-PC.elf
g++  ctrufont.bin.o main.o inet_pton.o tga/targa.o   -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/lib -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//lib -lturbojpeg -lz -lSDL2 -o /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf
/usr/bin/x86_64-linux-gnu-ld: cannot find -lturbojpeg
collect2: error: ld returned 1 exit status
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:147: recipe for target '/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf' failed
make[1]: *** [/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2

Everything is compiled completely, but the error comes when compiling the executable, and the error is that it does not find the turbojpeg library, but if I have it installed, I can not find another way to install that library.

The library install it like this:
Code:
sudo apt install libjpeg-turbo8* -y

And it settled me:
libjpeg-turbo8
libjpeg-turbo8-dev
libjpeg-turbo8-dbg
 
I installed it (along with its other dev packages, and dbg), and even then it gives me the error of turbojpeg.h, this:

Code:
ctrufont.bin
bin2c -o ctrufont.bin.o.c_tmp -n `(echo ctrufont.bin | tr . _)` /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/data/ctrufont.bin && cat ctrufont.bin.o.c_tmp | sed 's/static //g' >ctrufont.bin.o.c && gcc -g -Wall -O0 -Wno-format -Wno-write-strings -Wno-unused-variable -Wno-unused-value  -I/usr/include/SDL2 -D_REENTRANT -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/include -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//include  -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/platform/PC -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/_lzz_temp -I/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/build_PC_ -D_PC -DBUILDTIME=\"2018/09/28\" -c ctrufont.bin.o.c -o ctrufont.bin.o
[CX] main.cpp
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:34:10: fatal error: turbojpeg.h: No such file or directory
 #include <turbojpeg.h>
          ^~~~~~~~~~~~~
compilation terminated.
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:139: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2

If I put the file turbojpeg.h in the folder soos of HorizonM, it gives me this:

Code:
[CX] main.cpp
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp: In function ‘int main(int, char**)’:
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:406:24: warning: variable ‘timeout’ set but not used [-Wunused-but-set-variable]
         struct timeval timeout;
                        ^~~~~~~
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:602:9: warning: label ‘nocoffei’ defined but not used [-Wunused-label]
         nocoffei:
         ^~~~~~~~
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp: In destructor ‘bufsoc::~bufsoc()’:
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/soos/main.cpp:134:9: warning: nonnull argument ‘this’ compared to NULL [-Wnonnull-compare]
         if(!this) return;
         ^~
[CC] inet_pton.c
[CC] targa.c
[LD] HorizonScreen-PC.elf
g++  ctrufont.bin.o main.o inet_pton.o tga/targa.o   -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC/lib -L/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/inc/PC//lib -lturbojpeg -lz -lSDL2 -o /home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf
/usr/bin/x86_64-linux-gnu-ld: cannot find -lturbojpeg
collect2: error: ld returned 1 exit status
/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/Makefile:147: recipe for target '/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf' failed
make[1]: *** [/home/yonaikerlol/Documentos/HorizonM/HorizonScreen/out/PC/HorizonScreen-PC.elf] Error 1
Makefile:115: recipe for target 'build_PC_' failed
make: *** [build_PC_] Error 2

Everything is compiled completely, but the error comes when compiling the executable, and the error is that it does not find the turbojpeg library, but if I have it installed, I can not find another way to install that library.

The library install it like this:
Code:
sudo apt install libjpeg-turbo8* -y

And it settled me:
libjpeg-turbo8
libjpeg-turbo8-dev
libjpeg-turbo8-dbg

Uh... I have no idea then :/

Also, I just realized... how did you get HorizonScreen source? It must be a super ancient version which doesn't even work properly with newer builds. If I survive then I'll hit up my Linux installation in a VM and figure out how to build it.
 

Site & Scene News

Popular threads in this forum