Hacking [WIP] (S)NESInject: A ROM injector tool for Loadiine

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
yeah you would probably have to do some sort of detection as the game id part (WUP-XXXX) part shifts depending on if its a nes or snes rom too, but the wup header itself is always the same length.....to have a better look at the header you can download the amiibo classics game from the eshop, it has a bunch of roms you can look at to compare headers

Thanks, I'll probably look into it.
 

Xplic1T

Well-Known Member
Member
Joined
May 26, 2006
Messages
252
Trophies
0
XP
531
Country
Still cant get this to work, either a white screen or a crash dump.

Used Super Metroid and Super Mario World as base ... Tried it with Final Fight Guy and Mega Man X...

No dice
 

n1ghty

Well-Known Member
Member
Joined
Aug 8, 2013
Messages
273
Trophies
0
XP
606
Country
Saint Kitts and Nevis
Still cant get this to work, either a white screen or a crash dump.

Used Super Metroid and Super Mario World as base ... Tried it with Final Fight Guy and Mega Man X...

No dice
I did not try this injector, but try using "-old" with makerpl. That helped on my tests.
 

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Still cant get this to work, either a white screen or a crash dump.

Used Super Metroid and Super Mario World as base ... Tried it with Final Fight Guy and Mega Man X...

No dice

My last answer still applies:

If you're not using a game with a 4MB base (Donkey Kong Country or possibly a couple others, like mentioned above), you'll get crashes/freezes/unexpected behaviour since the program will end up overwriting other stuff in the ELF, and not just the ROM.

It's still not updated to use smaller bases yet. Yesterday was a holiday in the US. :P
 
Last edited by daxtsu,
  • Like
Reactions: Azel

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
i messaged normmatt about the alldata.bin file, see if he can work his magic, he said he will take a look (but no promises, so please don't bug him about it :P )
figured with M2 making the sega 3DS VC emulators and the wiiu GBA emulator the formatting/encryption may be similar enough for him to figure it out seeing as he figured out the 3DS sega VC encryption

you should be able to get that info from the WUP header, at 0xE it appears to store the rom size
40=4MB
20=2MB
10=1MB
08=512kb
04=256kb
02=128kb
01=64kb
00=32kb
....that should be good for injecting into any NES/SNES game and detecting the size automatically

oh and as an added bonus, 0x01 will let you detect if its a snes game or a NES game automatically
, 01 for snes, 00 for nes

So I'm taking another look at this finally, and I can't seem to find what you're describing. The WUP header always seems to be surrounded by zeroes with standalone VC titles. I see 00 00 00 00 57 55 50 2D 4A 41 4A 45 00 00 00 00 (....WUP-JAJE....) for Super Metroid, for example.
 

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
So I'm taking another look at this finally, and I can't seem to find what you're describing. The WUP header always seems to be surrounded by zeroes with standalone VC titles. I see 00 00 00 00 57 55 50 2D 4A 41 4A 45 00 00 00 00 (....WUP-JAJE....) for Super Metroid, for example.
this is the header size
00 01 00 00 75 98 48 00 30 00 00 00 30 00 30 00
90 8A 48 00 52 98 48 00 70 98 48 00 70 98 48 00
00 00 00 00 57 55 50 2D 4A 41 4A 50 00 00 00 00
(taken from super metroid)see 01 for snes, 30 for 3MB
its 3 lines before the rom starts, as i said if you take a look at the amiibo classics or even nes remix you can see the roms with the wup headers attached,
 
Last edited by gamesquest1,

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
this is the header size
(taken from super metroid)see 01 for snes, 30 for 3MB
its 3 lines before the rom starts, as i said if you take a look at the amiibo classics or even nes remix you can see the roms with the wup headers attached,

Oh, I see it now. In the standalone VC titles, it's two lines up (so 32 bytes-ish) instead of three. Thanks!
 

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I'm almost done with the update, thanks to @gamesquest1's info. Once I test and make sure it's good to go, I'll release 0.3, which should work with any base size SNES game, and also support NES injects (with an NES base; it'd be cool if we could figure out how to switch the system emulated on the fly (maybe it's literally as simple as setting the 01 for SNES to 00 for NES? I'll test it later)).

Edit: First test, using a smaller ROM for SNES works. Second test, using a larger ROM than the base rom, rejected as expected. Third test, using a ROM the same size as the base, working fine (must..resist..urge..to play..FF6). Now I just need to test NES games...
 
Last edited by daxtsu,

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
I'm almost done with the update, thanks to @gamesquest1's info. Once I test and make sure it's good to go, I'll release 0.3, which should work with any base size SNES game, and also support NES injects (with an NES base; it'd be cool if we could figure out how to switch the system emulated on the fly (maybe it's literally as simple as setting the 01 for SNES to 00 for NES? I'll test it later)).
think i tried by just replacing the whole rom including the header and it didn't work.....but feel free to try again it might have been one of those things i intended to try but never got around to :P
 

daxtsu

Well-Known Member
OP
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
0.3 is out. It supports NES ROMs and the base ROM size shouldn't matter anymore. I only have a few VC games to test with, so it's probably not perfect.

You can actually just inject the roms directly into the rpx and fix the rpx sector checksums. I made myself a tool for that a while back.

Wouldn't I then have to add a bunch of code similar to rpl2elf? I'd prefer to keep this program as simple as possible.
 
Last edited by daxtsu,
  • Like
Reactions: Azel

n1ghty

Well-Known Member
Member
Joined
Aug 8, 2013
Messages
273
Trophies
0
XP
606
Country
Saint Kitts and Nevis
hi how to increase the resolution of nes games on the Wii U VC injects to full screen?
8.jpg
 
  • Like
Reactions: lordelan

jiezhang0518

Member
Newcomer
Joined
Feb 27, 2016
Messages
7
Trophies
0
Age
34
XP
75
Country
Switzerland
lol, So it does not have a file like "configuration_cafe.json" can change the resolution. So sad but thank you for your help -0-
 

JerJer

Well-Known Member
Newcomer
Joined
Jun 5, 2010
Messages
58
Trophies
0
XP
205
Country
United States
MAKERPL for CAFE
Version Name: Thompson
Version MinSDK: 1.7
using makerpl64 -f -zx -s -v
I get
***Error: Relocation in sec 8, entry 13481 uses non-present symbol!
if I try -z8
I get
***Option -z does not take an argument. Return -1.
any ideas?
 

fiveighteen

Distractible Dabbler
Member
Joined
Jun 30, 2008
Messages
1,768
Trophies
2
XP
1,930
Country
United States
@daxtsu, or maybe @gamesquest1

At which hex address are you looking for these values in the ROM?

Code:
case 0x40: return 4 * 1024 * 1024; // 4MB
case 0x30: return 3 * 1024 * 1024; // 3MB
case 0x20: return 2 * 1024 * 1024; // 2MB
case 0x10: return 1 * 1024 * 1024; // 1MB
case 0x0C: return 128 * 1024; // 128KB? Contra uses this weird value, but then, Contra doesn't seem to work as a base game anyway.
case 0x08: return 512 * 1024; // 512KB
case 0x06: return 384 * 1024; // 384KB
case 0x04: return 256 * 1024; // 256KB
case 0x02: return 128 * 1024; // 128KB
case 0x01: return 64 * 1024; // 64KB
case 0x00: return 32 * 1024; // 32KB
default: return 0xDEADC0DE; // Give an absurd size if we get anything invalid

Contra is 128KB but I don't see 0C in the ROM header?
Super Mario Bros is 40KB but I don't even see that in the list lol, so I'm curious what value that should have.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BakerMan @ BakerMan:
    fuck ubisoft, and fuck activision
    +1
  • realtimesave @ realtimesave:
    Nintendo needs to release a new console, switch is getting such shitty little games lately lol it's pathetic
  • Purple_Heart @ Purple_Heart:
    Lmao a new flashcart... The Unlock Switch... I knew it's not fake xD
    +1
  • NinStar @ NinStar:
    A new consoles won't solve that problem
  • NinStar @ NinStar:
    It will actually make it worse
  • The Real Jdbye @ The Real Jdbye:
    well actually
    a new console won't do anything right now, because the games are still in development, that's why there are few games being released
  • The Real Jdbye @ The Real Jdbye:
    it won't make the games finish any faster
  • Veho @ Veho:
    2/3rds of launch titles for the Switch 2 will just be lazy ports of Switch games anyway.
  • The Real Jdbye @ The Real Jdbye:
    probably
  • The Real Jdbye @ The Real Jdbye:
    maybe mario kart 9 will be a launch title
  • The Real Jdbye @ The Real Jdbye:
    i really want a new mario kart
  • Veho @ Veho:
    What, you mean the endless stream of DLCs doesn't count?
  • Veho @ Veho:
    Why develop a new game when you can just sell season passes forever?
  • Veho @ Veho:
    I'm still on MKDS so I'm not bothered :tpi:
  • The Real Jdbye @ The Real Jdbye:
    i like the dlc tbh, i'd like a new game more
  • ZeroT21 @ ZeroT21:
    but the current version is still selling fine at full price
  • SylverReZ @ SylverReZ:
    Hello
  • ZeroT21 @ ZeroT21:
    sup
    +1
  • SylverReZ @ SylverReZ:
    @realtimesave, You seen the Unlock Switch flashcart yet?
  • K3Nv2 @ K3Nv2:
    I'll see the 19.0 update that blocks use ability to it
    +1
  • K3Nv2 @ K3Nv2:
    Lol newegg+
    Screenshot-20240423-053504-Gmail.jpg
  • S @ salazarcosplay:
    does update 19 really block it
  • SylverReZ @ SylverReZ:
    Update 19 never came out yet. Just the 18.1.
    SylverReZ @ SylverReZ: Update 19 never came out yet. Just the 18.1.