Bootleg Games Central Forum

Pirate Discussion => Famicom/NES => Topic started by: kelvin donna on June 18, 2020, 01:06:58 PM

Title: Zudu Go ROM Fix
Post by: kelvin donna on June 18, 2020, 01:06:58 PM
hello people,
i have downloaded the ROM of the ZUDU GO Plug and play TV Game.
when i run it on Nintendulator, it barely works.
can someone fix it?
Title: Re: Zudu Go ROM Fix
Post by: infval on July 14, 2020, 01:07:46 AM
It works in MAME.
Title: Re: Zudu Go ROM Fix
Post by: kelvin donna on July 14, 2020, 05:27:57 AM
It works in MAME.
but my problem is:
the newest version of MAME is only 64 bit´windows, whereas i only own 32 bit windows computers
Title: Re: Zudu Go ROM Fix
Post by: guyzis on July 14, 2020, 06:21:47 AM
Well, sorry, but you can't without doing the upgrade. I wonder if one can upgrade already existing PCs from 32 to 64 bits.
Title: Re: Zudu Go ROM Fix
Post by: Shenznanjing5x3lefami on July 14, 2020, 06:54:09 AM
Guyzis, it can be done. Just the 32 bit computers need to be checked if they are compatible with 64 bit install media first.
Title: Re: Zudu Go ROM Fix
Post by: guyzis on July 14, 2020, 07:33:35 AM
I didn't know that! Then again must vary from PC to PC.
Title: Re: Zudu Go ROM Fix
Post by: infval on July 14, 2020, 02:09:15 PM
I fixed iNES.dll (NintendulatorNRS) for the Zudu Go. Put iNES.dll in NintendulatorNRS\Mappers. Other OneBus roms will be broken.
I substituted the registers based on the MAME code (default (https://github.com/mamedev/mame/blob/dc54ba15767eb50e5587374a1c1815ee11de8079/src/mame/machine/nes_vt_soc.cpp#L109), Zudu Go (https://github.com/mamedev/mame/blob/c7adaa808f02615b3f3979e1dcd6122e60ba5dbc/src/mame/drivers/nes_vt.cpp#L877)): 2016 > 2015, 2017 > 2014, 2012 > 2013, 2013 > 2012, 2014 > 2017, 2015 > 2016. I don’t know if the correct mapper can fix this.

What I've done:
1. Downloaded the source code of NintendulatorNRS: http://masterdisk.byethost15.com/blog/libg/static.php?page=NintendulatorNRS (http://masterdisk.byethost15.com/blog/libg/static.php?page=NintendulatorNRS).
2. Opened src/Hardware/h_OneBus.cpp and changed:
Code: [Select]
if (extended) {
multiCHRStart <<=3;
if (bank ==0x20) *EMU->multiCHRSize <<=3;
EMU->SetCHR_Ptr1(bank |0x0 ^flip, &base[((((reg2000[0x16] &~1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x1 ^flip, &base[((((reg2000[0x16] | 1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x2 ^flip, &base[((((reg2000[0x17] &~1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x3 ^flip, &base[((((reg2000[0x17] | 1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x4 ^flip, &base[((( reg2000[0x12]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x5 ^flip, &base[((( reg2000[0x13]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x6 ^flip, &base[((( reg2000[0x14]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x7 ^flip, &base[((( reg2000[0x15]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
} else {
chrOR |=VA18 <<8;
multiCHRStart |=VA18 <<(bit4pp? 9: 8);
EMU->SetCHR_Ptr1(bank |0x0 ^flip, &base[ (((reg2000[0x16] &~1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x1 ^flip, &base[ (((reg2000[0x16] | 1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x2 ^flip, &base[ (((reg2000[0x17] &~1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x3 ^flip, &base[ (((reg2000[0x17] | 1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x4 ^flip, &base[ (( reg2000[0x12]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x5 ^flip, &base[ (( reg2000[0x13]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x6 ^flip, &base[ (( reg2000[0x14]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x7 ^flip, &base[ (( reg2000[0x15]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
}
to:
Code: [Select]
if (extended) {
multiCHRStart <<=3;
if (bank ==0x20) *EMU->multiCHRSize <<=3;
EMU->SetCHR_Ptr1(bank |0x0 ^flip, &base[((((reg2000[0x15] &~1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x1 ^flip, &base[((((reg2000[0x15] | 1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x2 ^flip, &base[((((reg2000[0x14] &~1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x3 ^flip, &base[((((reg2000[0x14] | 1)&chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x4 ^flip, &base[((( reg2000[0x13]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x5 ^flip, &base[((( reg2000[0x12]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x6 ^flip, &base[((( reg2000[0x17]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x7 ^flip, &base[((( reg2000[0x16]     &chrAND |chrOR) <<3 |EVA |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
} else {
chrOR |=VA18 <<8;
multiCHRStart |=VA18 <<(bit4pp? 9: 8);
EMU->SetCHR_Ptr1(bank |0x0 ^flip, &base[ (((reg2000[0x15] &~1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x1 ^flip, &base[ (((reg2000[0x15] | 1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x2 ^flip, &base[ (((reg2000[0x14] &~1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x3 ^flip, &base[ (((reg2000[0x14] | 1)&chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x4 ^flip, &base[ (( reg2000[0x13]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x5 ^flip, &base[ (( reg2000[0x12]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x6 ^flip, &base[ (( reg2000[0x17]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
EMU->SetCHR_Ptr1(bank |0x7 ^flip, &base[ (( reg2000[0x16]     &chrAND |chrOR           |VA21 <<11) &AND |OR) <<10 &chrMask], FALSE);
}
3. Deleted the code (left empty functions) in src/Hardware/Sound/s_VRC7.cpp because emu2413.cpp was not found.
4. Added Winmm.lib to INES Project: Properties > Linker > Input > Additional Dependencies.
5. Compiled INES.
Title: Re: Zudu Go ROM Fix
Post by: infval on July 15, 2020, 01:04:45 PM
I've fixed the ROM. I changed the order of the registers (e.g. STA $2016 > STA $2015). The ROM works in the original NintendulatorNRS, EmuVT. All title screens and first levels are tested.

All changes are in Python 3 script: https://gist.github.com/infval/baf4261878d88f93c0b4f3ab1f977c66.
Drag'n'Drop zudugo.bin or run script via command prompt:
Code: [Select]
zudugo_fixer.py zudugo.bin
Title: Re: Zudu Go ROM Fix
Post by: guyzis on July 15, 2020, 05:28:09 PM
No one uses EmuVT anymore XD It's a thing of the past, man. At least now since we cracked this thing we can now fix more roms in the future!
Title: Re: Zudu Go ROM Fix
Post by: kelvin donna on July 25, 2020, 01:03:43 PM
No one uses EmuVT anymore XD It's a thing of the past, man. At least now since we cracked this thing we can now fix more roms in the future!
HEY! I AM USING EMUVT YOU DINGUS!
Title: Re: Zudu Go ROM Fix
Post by: guyzis on July 25, 2020, 03:34:37 PM
Thanks for the 10-days old bump by not adding anything to contribute with the original topic, and the irony is that the OP himself went off-topic... hahaha.
Title: Re: Zudu Go ROM Fix
Post by: kelvin donna on August 06, 2020, 08:08:14 AM
here is the rom of "Game Sporz Boxing".
if you load the bin file on the newest version of Nintendulator, then the graphics are severely screwed up
Title: Re: Zudu Go ROM Fix
Post by: KingPepe on August 10, 2020, 12:18:51 PM
Locking due to more useless posting and attempted backseat modding.

EDIT: FWIW, with a properly headered ROM, you can play this without modifying any code in Nintendulator.