Homebrew HzMod - old3DS screen streaming

  • Thread starter Sono
  • Start date
  • Views 250,734
  • Replies 573
  • 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 .

CyberTails

Well-Known Member
Member
Joined
Feb 10, 2009
Messages
201
Trophies
0
XP
337
Country
United States
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,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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).
 

AlternativeZero

Well-Known Member
Member
Joined
Apr 7, 2017
Messages
250
Trophies
0
XP
817
Country
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?
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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).
 

AlternativeZero

Well-Known Member
Member
Joined
Apr 7, 2017
Messages
250
Trophies
0
XP
817
Country
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

WarioWaffles

Well-Known Member
Member
Joined
Sep 27, 2014
Messages
104
Trophies
0
Age
33
XP
338
Country
United States
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

  • DumpNLog.7z
    410 bytes · Views: 168

yonaikerlol

Active Member
Newcomer
Joined
Feb 7, 2018
Messages
36
Trophies
0
Age
19
Location
Venezuela
Website
github.com
XP
130
Country
Venezuela
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
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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.
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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.
 

yonaikerlol

Active Member
Newcomer
Joined
Feb 7, 2018
Messages
36
Trophies
0
Age
19
Location
Venezuela
Website
github.com
XP
130
Country
Venezuela
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
 

yonaikerlol

Active Member
Newcomer
Joined
Feb 7, 2018
Messages
36
Trophies
0
Age
19
Location
Venezuela
Website
github.com
XP
130
Country
Venezuela
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.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,392
Trophies
4
Location
Space
XP
14,027
Country
Norway
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,

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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
 

yonaikerlol

Active Member
Newcomer
Joined
Feb 7, 2018
Messages
36
Trophies
0
Age
19
Location
Venezuela
Website
github.com
XP
130
Country
Venezuela
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
 

Sono

cripple piss
OP
Developer
Joined
Oct 16, 2015
Messages
2,832
Trophies
2
Location
home
XP
9,441
Country
Hungary
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

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    Similar to FOX Kids. I remember when Sonic X aired.
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, the latin american fox feed doesnt air news, it airs movies and tv shows
    +1
  • SylverReZ @ SylverReZ:
    Ah, I see.
  • Xdqwerty @ Xdqwerty:
    and i wasnt even born when fox kids/jetix was alive
  • Xdqwerty @ Xdqwerty:
    also a couple years ago latin american fox got renamed to star channel
  • SylverReZ @ SylverReZ:
    Yes?
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, sorry
    i thought you didnt read the last couple messages before quoting you agin
  • BakerMan @ BakerMan:
    ah sonic x, that show is valid
  • BakerMan @ BakerMan:
    (of course the mf with a sonic pfp would say that 😭)
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty you are not dumb or stupid, you need to stop saying that, you are very smart, even about alot of things I have no clue about. We all love you here, like a big family.
    +1
  • K3Nv2 @ K3Nv2:
    Yeah @BigOnYa love me so much he started yelling at me for having my shoes on in the bed when he caught me with his wife
    +2
  • BigOnYa @ BigOnYa:
    True, I don't want mud crumbs in my bed, and btw you left without paying your tab. Ill add it to next month but getting tired of extending.
  • K3Nv2 @ K3Nv2:
    I hope silent hill 2 turns out good
    +1
  • BigOnYa @ BigOnYa:
    I seen that, hope so too, the first was so epic back then.
  • K3Nv2 @ K3Nv2:
    Didn't look into much is it just a remake
  • BigOnYa @ BigOnYa:
    Only thing drive me crazy is all these new horror games nowadays is its so dark, all time. I can't even play them. I understand they trying to create spooky but be creative a little, not just darkness with pop out scare scenes.
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, either that or mascot horror
  • Xdqwerty @ Xdqwerty:
    gonna watch gintama for the first time
  • Psionic Roshambo @ Psionic Roshambo:
    @BigOnYa, I always turn the lights up on those lol
  • K3Nv2 @ K3Nv2:
    Two studio lights for one horror game
  • K3Nv2 @ K3Nv2:
    Couch casting for horror
    K3Nv2 @ K3Nv2: Couch casting for horror