Hacking [RELEASE] Phacox's Injector (NES/SNES/N64/GBA/NDS for Wii U)

zerofalcon

Well-Known Member
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,920
Country
Hi and thanks for your app. I injected some VC NDS games successfully. I want to ask you if there is a possibility of adding, in future releases, the option to edit some configurations (like 2x scale render, pause folding, stretch to full screen or remove the background of the NDS phat image) in base_nds/content/0010/configuration_cafe.json directly from the UI rather than editing or copy/paste or copy/replace the aforementioned file. Today I was changing some screen resolution values in that file and I guess it looks nice to have this option for injects. I uploaded some example TV screenshots taken directly from the Wii U. Keep up the good work!

WiiU_screenshot_TV_01957.jpg

WiiU_screenshot_TV_01957 (1).jpg
 
  • Like
Reactions: phacox_cll

XaneTenshi

Well-Known Member
Member
Joined
Nov 24, 2013
Messages
506
Trophies
0
Age
34
XP
1,124
Country
Denmark
Hi
You have discovered that I programmed some layers to customize the presentation of the games, in descending order:
- Background (only visible if the program does not have a target console or cannot find the files in the resources/images folder).
- Title screen box.
- Boot image frame.
- Texts: Name, Release date, Players.

More important than the dimensions is the aspect ratio to avoid distorting the images, since the program automatically resizes the images.
These are the dimensions and aspect ratios:
Icon: 128x128, 1:1
TV: 1280x720, 16:9
GamePad: 854x480, 16:9
Title screen (NES, SNES, N64, NDS): 400x300, 4:3
Title screen (GBA): 399x266, 3:2

For the text the program uses Trebuchet MS at 10em, the text boxes are:
Only short name: Position 578x340, Size 640x50.
Line 1 long name: Position 578x313, Size 640x50.
Line 2 long name: Position 578x368, Size 640x50.
Release date: Position 586x450, Size 250x40.
Players: Position 586x496, Size 200x40.
This applies to the 1280x720 image and then resized to 854x480 for the GamePad.

Plantillas.png

Thanks for the explanation. This will certainly help me the next time I will be doing an injection. The image that I was used for TV is, ironically, big enough for the GamePad, but not big enough for the TV Image XD. I can see that the image was indeed resized, and it still looks good enough to me.

I do have one small suggestion though: When I first did the injection and tried it on my Wii U, the game worked fine, but the whole game was just the Base game that I had used, everything except for the images was wrong. Like the ROM had not been injected at all.

It was only when I looked at my conversion in the Injector that I, by sheer coincidence, found the issue. I had chosen my ROM to be injected before I had chosen the appropriate profile for the injection type. What I didn't notice at the time was that my loaded ROM was unloaded the moment I switched the profile to nds.

You won't necessarily see this, because the profile can be changed from any Menu in the Injector, and you will only see the ROM being unloaded if you are in the Main tab when you do it.

So I'd suggest that you either:

Make a check that ensures the preloaded ROM won't get unloaded as long as the ROM matches the selected profile
or
Make a pop-up that warns the user that the ROM will/has been unloaded after they select a profile.

I hope this makes sense. I have a bad habit of going into excessive details when I describe things like this XD
 
  • Like
Reactions: phacox_cll

phacox_cll

Well-Known Member
OP
Member
Joined
Mar 30, 2019
Messages
172
Trophies
0
XP
1,339
Country
Mexico
When you chose a ROM in Auto Mode the program detects which target Virtual Console to use, there is no need to adjust the Mode after that.

If at any time you change the Mode, the ROM you chose will be deselected (I will put a message that warned of this fact).

You were able to do the injection without a selected ROM because you had put a name and loaded a base game, surely you noticed that the result of that "injection" was "name [title id] (edited)". This behavior is expected as it allows you to edit the Virtual Console settings and presentation images without modifying the ROM and the meta.xml file.
 

XaneTenshi

Well-Known Member
Member
Joined
Nov 24, 2013
Messages
506
Trophies
0
Age
34
XP
1,124
Country
Denmark
When you chose a ROM in Auto Mode the program detects which target Virtual Console to use, there is no need to adjust the Mode after that.

If at any time you change the Mode, the ROM you chose will be deselected (I will put a message that warned of this fact).

You were able to do the injection without a selected ROM because you had put a name and loaded a base game, surely you noticed that the result of that "injection" was "name [title id] (edited)". This behavior is expected as it allows you to edit the Virtual Console settings and presentation images without modifying the ROM and the meta.xml file.

Well....Damn...That makes sense:glare:

I guess my half OSD just told me to change the profile to NDS regardless because "Things will be better if you do"...

I did actually notice that the injection result was named [title id] (edited). I had no idea why it also said edited however, but I remember it especially because the "correct" injection that I did afterwards didn't have (edited) in the name.
 
  • Like
Reactions: phacox_cll

phacox_cll

Well-Known Member
OP
Member
Joined
Mar 30, 2019
Messages
172
Trophies
0
XP
1,339
Country
Mexico
An injection can fail for multiple reasons. Post the contents of the log file "PhacoxsInjector.log" from a failed injection to analyze what happens to you.
 

Spikemech88

Well-Known Member
Newcomer
Joined
Mar 7, 2020
Messages
90
Trophies
0
Age
35
XP
63
Country
United States
Phacox's Injector 1.1
3/28/2020 7:05:39 PM
Language to EN.
Players changed: None
TV preview updated.
GamePad preview updated.
GUI changed to Famicom.
Menu icon preview updated.
TV preview updated.
GamePad preview updated.
Changed mode to Indeterminate.
GUI changed to default.
Menu icon preview updated.
TV preview updated.
GamePad preview updated.
Wii U Common Key files: OK!
ROM format: N64
GUI changed to N64.
Loaded base: Hash: BE3CEC5F, SVN: 2234 TIME: 2016/02/02 10:56:10
Title: Mario Party 2 (USA/EUR/JPN)
Menu icon preview updated.
TV preview updated.
GamePad preview updated.
Reading ROM...
ROM is valid.
Hash: 1DB0
Title: MarioParty
Product code: CLBE
Reading N64 Config file...
N64 Config file is valid.
Hash: 155A
Show name enabled.
Use short name: Mario Party
TV preview updated.
GamePad preview updated.
Images button clicked.
Menu icon preview updated.
Menu icon changed.
TV preview updated.
TV image changed.
Show name disabled.
TV preview updated.
GamePad preview updated.
TV preview updated.
TV image changed.
GamePad preview updated.
GamePad image changed.
Main button clicked.
Show name disabled.
TV preview updated.
GamePad preview updated.
Images button clicked.
Injecting button clicked.
Settings button clicked.
Injecting button clicked.
Inject encrypt: True
Short name: Mario Party
Long name: Mario Party
N64 DarkFilter: True
N64 Widescreen: False
N64 Horizontal Zoom: 100
N64 Vertical Zoom: 100
N64 Translation X: 0
N64 Translation Y: 0
Show name disabled.
TV preview updated.
GamePad preview updated.
Change menu icon.
Change TV image.
Change GamePad image.
Starting injection...
System.Exception: Encrypt fail.
at PhacoxsInjector.NusContent.Encrypt(String inputPath, String outputPath)
at PhacoxsInjector.N64Injector.Inject(Boolean encrypt, String outputPath, String shortName, String longName, Bitmap menuIconImg, Bitmap bootTvImg, Bitmap bootDrcImg)
at PhacoxsInjector.PhacoxsInjectorGUI.Inject(Boolean encrypt)
Injection failed.
Main button clicked.
Show name disabled.
TV preview updated.
GamePad preview updated.
Images button clicked.
Main button clicked.
Injecting button clicked.
Inject encrypt: True
Short name: Mario Party
Long name: Mario Party
N64 DarkFilter: False
N64 Widescreen: False
N64 Horizontal Zoom: 100
N64 Vertical Zoom: 100
N64 Translation X: 0
N64 Translation Y: 0
Show name disabled.
TV preview updated.
GamePad preview updated.
Change menu icon.
Change TV image.
Change GamePad image.
Starting injection...
System.Exception: Encrypt fail.
at PhacoxsInjector.NusContent.Encrypt(String inputPath, String outputPath)
at PhacoxsInjector.N64Injector.Inject(Boolean encrypt, String outputPath, String shortName, String longName, Bitmap menuIconImg, Bitmap bootTvImg, Bitmap bootDrcImg)
at PhacoxsInjector.PhacoxsInjectorGUI.Inject(Boolean encrypt)
Injection failed.
 

CORE

3:16
Member
Joined
Jul 15, 2018
Messages
1,176
Trophies
1
XP
2,067
Country
United Kingdom
Encryption appears to be failing resulting in Inject Fail?

CommonKey Issue?

I have had a couple if issues due to No Product IDs but to resolve I just used another Inject and swapped out Rom and made necessary adjustments to Meta.xml and Title Id aswell as making a Header on Rom with HexEditor.

A simple copy and paste and edit the Four Characters to whatever you choose for an ID.
 

phacox_cll

Well-Known Member
OP
Member
Joined
Mar 30, 2019
Messages
172
Trophies
0
XP
1,339
Country
Mexico
It is not a problem with the common key ("Wii U Common Key files: OK!").
You are having a problem with running the batch file "resources/pack/run.bat". Delete it and try to make an injection again.
 
  • Like
Reactions: CORE

phacox_cll

Well-Known Member
OP
Member
Joined
Mar 30, 2019
Messages
172
Trophies
0
XP
1,339
Country
Mexico
The injection as such is being performed, the failure lies in the file "resources / pack / run.bat" or in the program "resources / pack / CNUSPACKER.exe". You can do two more things:

It is possible that you are trying to put the injection result in a path where CNUSPacker does not have write permissions, you can grant administrator permissions to CNUSPacker or change to a path that does not require special permissions.

You can do the packaging manually. Open a command window and put yourself in the path where CNUSPacker is located, run the command:

>CNUSPacker -in <InputFolder> -out <OutputFolder> -encryptKeyWith <WiiUCommonKey>

Inputfolder should be something like: C:\Users\YourUserName\PathTo\PhacoxsInjector\base_n64
Outputfolder should be something like: C:\Users\YourUserName\PathTo\PhacoxsInjector\base_n64_encrypted
You must use absolute paths and the common key that you already know.
 
  • Angry
Reactions: GBATmpEhUmaBOSTAAAA

denpanosekai

Well-Known Member
Newcomer
Joined
Jan 4, 2009
Messages
65
Trophies
0
XP
180
Country
Canada
My first time using this software and I'm already stumped. I'm trying to inject Mario's Early Years (fun with numbers AND fun with letters) but the wiki doesn't mention which game to use as a base. Do I have to try all of the ones that normally come up until I find one that works?

Secondly, will Gameboy/Gameboy Color ever be supported? I want to create channels for Mario Land 1 and 2 DX (the colored versions)
 

phacox_cll

Well-Known Member
OP
Member
Joined
Mar 30, 2019
Messages
172
Trophies
0
XP
1,339
Country
Mexico
For the trilogy of "Mario's Early Years!" You must use "The Ignition Factor (USA)" from the Virtual Console as a base game.

How did I get to that base game? I used the list of characteristics of the NES and SNES Virtual Console, knowing that the ROMs that are interesting to inject are 1MiB, I filtered the list by "ROM raw size" to "1048576 bytes", to further reduce I filtered by "Region" to "USA" and by "Type" to "B2", then I started testing base games from bottom to top (newest to oldest), I did injection without packaging (Do not pack button) and tried the result in CEMU, if I get black screen I try another base game (I change the filters in the list if necessary). If the game loads I proceed to make a packed injection (Do pack button) and test on the real console.

You can currently inject Game Boy and Game Boy Color games if you previously convert them to GBA format using Goomba Color, (try GBC to GBA conversions previously in an emulator as not all Game Boy Color games are supported).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: It can act as a swap drive but that isn't more RAM, it's slooow.