Hacking Need expert help on unpacking/repacking WiiVC WAD (PCEngine emu)

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Hi all,
For a long time I have wondered why WiiVC PCEngine HuCard games were outputting 480i when WiiVC SNES/MD and even PCEngine CD games were outputting 240p (their original rez).

It turns out the early version of the emulator used for PCEngine HuCard games is a piece of crap that forces video output to 480i + adds a picture smoother filter. It looks horrible.

To my complete amazement, I recently found a PCengine HuCard game with proper 240p output and no filter. I dug into it further and found the difference, it simply uses an updated version of the PCEngine HuCard emulator!

A game that exhibits the issue is WiiVC Bomberman 94.
The JPN version (by PLAY-SKiLL) uses HuCard emu version "1"; outputs 480i with the fugly filter.
The EUR version (by SUNSHiNE) uses HuCard emu version "3"; outputs wonderful 240p.

My goal at this point is to unpack the games that use the old emu and repack them with the new emu (without touching anything else); for proper 240p output.

My target candidates are:
- Bomberman.94.VC.JPN.Wii (while the EURO version is OK, I wish to convert this JPN version to check if the theory above is valid)
- Blazing.Lazers.USA.VC.Wii
- Bomberman.93.USA.PROPER.VC.Wii
- Detana.Twinbee.VC.JPN.Wii

I confirmed these candidates use the old version of the emu: they all output 480i+filter (eww).

This is where I'd love expert help: I found a collection of software (wwPacker) to unpack the WADs, but from there I am stuck. I cannot figure out which unpacked file is the emu itself.

In the unpacked Bomberman 94 EUR version (which contains the good PCE HuCard emu I wish to use for the target candidates) are the following files:
-------------------
00000000.app
00000001.app
00000002.app
00000003.app
00000004.app
00000005.app
00000006.app
00000007.app
000100015041474c.cert
000100015041474c.tik
000100015041474c.tmd
000100015041474c.trailer
--------------------

How can I find out which file is the emulator itself, and provided I can find it, can I just extract the candidates, replace the file, repack and I'm good to go?
I'm really a noob at this and could definitely use the help of an expert at the WAD unpacking/repacking/injecting business ^^;
Thanks a bunch in advance for any help.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Thanks for your support man, I think it's child's play to do for a WAD expert, so I really hope someone can give a hand.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Thanks for your reply oji, checking it out..

edit: Unfortunately, neither the linked tutorial nor the video deal with the PCEngine emu directly.
My goal really is to find out how it's called and in which of the .app (I think?) files it is located.
 

oji

Well-Known Member
Member
Joined
Sep 1, 2012
Messages
437
Trophies
1
Location
In Soviet Russia you're the Location
XP
2,443
Country
Russia
You have to unpack all those apps (see video tutorial, author extract 00000000.app where icons / banners are stored) to find out which one stores emulator. But why do you want this? Just inject your roms to the Bomberman 94 PAL WAD instead.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Because I wish to keep everything from the original WAD except the emu.
I believe it should be easier to just switch the emu than the banner, icon and everything.

I found that soft U8Tool.exe (v1.0, 10/17/2008) the video tutorial uses, but it crashes when extracting 00000001.app & 00000007.app (the other .app extract OK, looking into them now ^^)
 

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,321
Country
Puerto Rico
00000001.app is in most cases the software/emulator, it won't extract since it's not a U8 archive.
All you have to do is swap 00000001.app and hope it works, of course if the updated emu handles files differently then it won't work.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
SuperrSonic, thanks for your great tip.
Here's what I did: took the "good" (= recent PCE HuCard emu) 00000001.app and overwrote the old one in the unpacked Bomberman.94.VC.JPN.Wii folder.
Then I dropped that folder onto _wwpacker-NoMod.bat

It created a new .wad without issues. I then proceeded to test on Wii. The good news is it installed properly, with good banner, icon and everything OK.
But when launching, black screen :S

I tried with all the target candidates:
- Bomberman.94.VC.JPN.Wii
- Blazing.Lazers.USA.VC.Wii
- Bomberman.93.USA.PROPER.VC.Wii
- Detana.Twinbee.VC.JPN.Wii

.. but same result everytime, black screen at launch, then must force the Wii to shut down manually.

What I notice:
- all the target candidates with old emu have only 7 .app files (00000000.app to 00000006.app)
- the donor wad with good/newest emu has 8 .app files (00000000.app to 00000007.app)
- the size of good/newest emu 00000001.app is 650kb, while the old emus 00000001.app to replace are all 1.24mb...

Any more tip to make this work are very welcome ^^;
 

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,321
Country
Puerto Rico
You should use Dolphin for quick testing.
The most probable way is to inject the game on the updated wad and import all the other stuff like the e-manual, save icon and banner, for the banner you should be able to swap 00000000.app since they all work the same way.

00000005.app is the rom/iso, save data resources and e-manual.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Yes SuperrSonic, I thought about doing this but then the ticket will be wrong, and it could only be done to inject one rom (since if i inject more than 1, they would all have the same ticket and they would overwrite each other when installing to the Wii).
I still believe updating the emu alone would be best (as it keeps icon, banner, manual, correct ticket, certs, and eveything).
Why it doesn't work currently by just changing the emu (00000001.app) is what I'm trying to find out..
 

SuperrSonic

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
807
Trophies
1
XP
2,321
Country
Puerto Rico
What makes it overwrite is the title id, you can just open the .wad in Customizemii and edit the title id, which means there will be another ticket.
 

stev418

Well-Known Member
Member
Joined
Sep 25, 2007
Messages
492
Trophies
1
Website
Visit site
XP
200
Country
I dont really have time for wii now, but the main issues seem to be LZ77 compression related, ive unpacked both the bom 93 and bom 94. All files are easily accessable and swapable, you just need to make sure to add/remove compression as needed.

Your better off starting off with your 240p WAD - swapping 00.app, edit .tik/.tmd titleid to match your "target" game (I just use HEX editor for this).

Then with the 05.app you need to swap, edit and compress a few files. Here is a little .bat file you can use to easily add the correct LZ77 - LZ77 compress

  • add LZ77 (10 variant) to the *.pce file and rename to LZ77********.BIN to match the rom in the 240p 05.app host - replace file in host 05.app
  • add LZ77 (10 variant) to the html.arc and rename to LZ77_html.arc (if you want emanual) - replace file in host 05.app
  • copy/replace the TITLE.TXT and savedata.tpl to host 05.app
  • check config.ini from game to see if any changes need to be made to host 05.app config file (my knowledge here is minimal but its mostly self explanatory, ie. if your game states backupram=1, then make sure host config.in is edited to same - newer emulator may not have same options)
I never really edited pcengine game a lot, so I cant remember what differences the PAL/NTSC versions had. Some VC has various differences, some such as MD/GEN had identical 01.app. Ill PM you a test file using the EUR bom 94 as a host and with US bom 93 files "injected" files anyway.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Hi Stev418 and thank you very much for your reply!

> Your better off starting off with your 240p WAD - swapping 00.app, edit .tik/.tmd titleid to match your "target"
> game (I just use HEX editor for this).

Yes, that's what I ended up doing. Swapping the new emu (01.app) from bomber94 into the old WAD bomber93 didn't seem to work (in any of the target games).

The main issue was indeed LZ77 compression, the new emu refuses the rom as .PCE / if it hasn't been compressed. (I try renaming .PCE to .BIN and a multitude other things before realising this ^^)

Thank you for the "HUFF and LZ77 DEcomp" pack also, much faster to use than wwcxtool.exe!

What I did different is the TitleID editing. I kept Bomber94 .tik/.tmd original and after the WAD is built, I edit the ID with Customizemii as hinted by SuperrSonic.
It should achieve the same, doesn't it?

I converted the 4 candidates and so far everything seem to be working, icon in system menu, savestates, manual, internal game saves, save icon & title, all is ok.
Finally those old gems in 240p! ;D
 

stev418

Well-Known Member
Member
Joined
Sep 25, 2007
Messages
492
Trophies
1
Website
Visit site
XP
200
Country
nice, you sound as excited as I was when I got N64 VC to run at 60hz on my PAL wii


yes, that's what I ended up doing. Swapping the new emu (01.app) from bomber94 into the old WAD bomber93 didn't seem to work (in any of the target games).
yep, in newer VC we have a better nand-loader (07.app in this case) which can decompress 01.app that are LZ77 compressed.

also - if you want to play with the config file, from looking at the emu there seem to be a lot more options in the newer emulator.

BACKUPRAM=%d....
CHASEHQ=%d..
MULTITAP=%d.
RASTER=%
POPULUS=%d..
SPRLINE=%d..
PATCH=%x....
NOFPA=%x
EUROPE=%x...
ARCADE=%d...
PADBUTTON=%d....
IRQMODE=%d..
SGENABLE=%d.
CD_VOLUME=%f
ADPCM_VOLUME=%f.
PSG_VOLUME=%
HIDEOVERSCAN=%d.
WDITH320OVER=%d.
YOFFSET=%d
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
Yes :)
I got the Wii connected to PVM (CRT) via RGB and the PCEngine HuCards really looked super bad because of the forced 480i + smooth filter.
Oh yeah, so is there a difference between editing the TitleID via Customizemii on the built WAD versus editing the .tik/.tmd before building the WAD?
Thanks again for your time.
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Actually, while we're on the topic, anyone know of any open sourced VC injecting software? I understand that it's supposed to be fairly straightforward but I was just looking for a good place that documents which APP file to look at for each emulator type and if there's any version differences to look at or any other considerations to take.

Was hoping to be able to automate this process a bit more on the Wii itself through homebrew.
 

TheShadowRunner

I'm like you, I have no name.
OP
Member
Joined
Mar 14, 2009
Messages
727
Trophies
1
XP
1,105
Country
United States
yep, in newer VC we have a better nand-loader (07.app in this case) which can decompress 01.app that are LZ77 compressed.

also - if you want to play with the config file, from looking at the emu there seem to be a lot more options in the newer emulator.

BACKUPRAM=%d....
CHASEHQ=%d..
MULTITAP=%d.
RASTER=%
POPULUS=%d..
SPRLINE=%d..
PATCH=%x....
NOFPA=%x
EUROPE=%x...
ARCADE=%d...
PADBUTTON=%d....
IRQMODE=%d..
SGENABLE=%d.
CD_VOLUME=%f
ADPCM_VOLUME=%f.
PSG_VOLUME=%
HIDEOVERSCAN=%d.
WDITH320OVER=%d.
YOFFSET=%d

Oh I hadn't seen your edit. So that's why replacing the new emu inside the old WAD didn't work, they just lack the 0000007.app able to decompress the new 0000001.app.

Regarding the options in config.ini, I kept the originals as to ensure the ROMS were emulated as intended but this is interesting, especially the last 3 options.
Also, I notice that the option:
PAD5= 0 or 1
that was present for the old emulator is no longer present, I wonder if it's now always enabled by default..

Maxternal, sorry but I've no clue about that, maybe Stev would have further infos.

Also I still wonder if editing the TitleID via Customizemii on the built WAD versus editing the .tik/.tmd before building the WAD gives the same result, or if one solution is better than the other..
 

stev418

Well-Known Member
Member
Joined
Sep 25, 2007
Messages
492
Trophies
1
Website
Visit site
XP
200
Country
Also I still wonder if editing the TitleID via Customizemii on the built WAD versus editing the .tik/.tmd before building the WAD gives the same result, or if one solution is better than the other..
Na, both do the same thing, its just 4 bytes of data. Im just old school and still do a lot of stuff manually.

anyone know of any open sourced VC injecting software? I understand that it's supposed to be fairly straightforward but I was just looking for a good place that documents which APP file to look at for each emulator type and if there's any version differences to look at or any other considerations to take.
Not sure really, ive never used any auto injectors, just used a mishmash of programs. Generally 01.app is your executable (Emulator) and 05.app has the game files. Some like NES have the rom embedded in 01.app though.
 
  • Like
Reactions: Maxternal

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: you can fap to your favorite character without it being gay