Page 1 of 2

Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Nov 01, 2020 9:54 am
by chimaera
*SOLVED* works in the latest NES core update 201102

Has anyone got an INES 2.0 header that makes this game work or is it not supported?
It is an MMC5 EWROM with 1024kB PRG + 1024kB CHR and 32kB saveram.

The same applies to Infidelitys' hack Super Mario All-Stars NES which also doesn't work.

The header info from INES 2.0 db from nesdev contains these entries:

<game><!-- Homebrew\Hacks\Zelda꞉ The Legend of Link (2018-12-23).nes -->
<prgrom size="1048576" crc32="0D9A405E" sha1="11F6FFA8F4985A0E7F7DACF707C7FC9BA18E0859" sum16="427E" />
<chrrom size="1048576" crc32="B3F1B2B7" sha1="8C1F91F7F26965D9689C2600143323A5D9CD87D1" sum16="35FE" />
<rom size="2097152" crc32="D430A9EF" sha1="354CB91E5F72D9FE83EA7EA95F734B11C5F2FBC6" />
<prgnvram size="32768" />
<pcb mapper="5" submapper="0" mirroring="H" battery="1" />
<console type="0" region="0" />
<expansion type="1" />
</game>

<game><!-- Homebrew\Hacks\Super Mario All-Stars NES (cartridge).nes -->
<prgrom size="1048576" crc32="6DB01FA3" sha1="D6AF776081655FD6D62D92685650D864BAD7F987" sum16="DA71" />
<chrrom size="1048576" crc32="B7F46B4F" sha1="560BC2FE50AD6FB6CB4F51A6257220D866E2E1CA" sum16="1A53" />
<rom size="2097152" crc32="6FC02929" sha1="C853E5EB49518D0777B1C9D863A1218CBEAC3E36" />
<prgnvram size="32768" />
<pcb mapper="5" submapper="0" mirroring="H" battery="1" />
<console type="0" region="0" />
<expansion type="1" />
</game>
<game><!-- Homebrew\Hacks\Super Mario All-Stars NES (emulator).nes -->
<prgrom size="1048576" crc32="D45F2E3D" sha1="8C893EE12B3AE525505E1E8868B53D529631A376" sum16="A823" />
<chrrom size="1048576" crc32="B7F46B4F" sha1="560BC2FE50AD6FB6CB4F51A6257220D866E2E1CA" sum16="1A53" />
<rom size="2097152" crc32="06143FB3" sha1="5AAA9E21842606E85B4044F6370FBE10E8012BCB" />
<prgnvram size="32768" />
<pcb mapper="5" submapper="0" mirroring="H" battery="1" />
<console type="0" region="0" />
<expansion type="1" />
</game>

Re: Zelda - The Legend of Link romhack not working?

Posted: Sun Nov 01, 2020 1:08 pm
by Stupid Dufus
The binary header for my Mario All Stars NES (Super Mario All-Stars NES (SMB3 Hack) crt_v10-15-17 infidelity.nes) is:
4E 45 53 1A 40 80 52 08 00 00 99 00 00 00 00 00
and it loads fine for me on MiSTer's NES core.

The binary header for my Legend of Link (Zelda - Legend Of Link, The (TLOZ Hack) infidelity 2020-02-20.nes) is:
4E 45 53 1A 40 80 52 08 00 00 90 00 00 00 00 00
and it doesn't load on MiSTer for me, but works fine on an Everdrive N8 Pro.

Re: Zelda - The Legend of Link romhack not working?

Posted: Sun Nov 01, 2020 3:01 pm
by KnC
it will work when a new nes release is available the latest patch broke it
its been fixed just no rfb released since its been fixed

Re: Zelda - The Legend of Link romhack not working?

Posted: Sun Nov 01, 2020 3:07 pm
by chimaera
Super Mario All-Stars NES does indeed work with that header, thanks.

KnC wrote: Sun Nov 01, 2020 3:01 pm it will work when a new nes release is available the latest patch broke it
its been fixed just no rfb released since its been fixed
OK, thanks for the info. I'll just wait for the release then.

Re: Zelda - The Legend of Link romhack not working?

Posted: Sun Nov 01, 2020 7:34 pm
by wark91
The new release of NES core is available.
I tried the last patch of Super Mario All-Stars NES (https://www.romhacking.net/hacks/2422/) 24/03/2020. There is some issues for Super Mario 2 USA.

Edit: I removed saves presents in the hack and it fixed those issues.

Re: Zelda - The Legend of Link romhack not working?

Posted: Mon Nov 02, 2020 12:15 am
by Stupid Dufus
Can confirm the Legend of Link I have starts up now with the updated core. Thanks!

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sat Jan 16, 2021 8:09 pm
by zypheratus
is this the same issue that happened with Star Tropics?, I remember I had to change the header with Messen to make it work on MiSTer.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Jan 17, 2021 12:56 am
by aberu
zypheratus wrote: Sat Jan 16, 2021 8:09 pm is this the same issue that happened with Star Tropics?, I remember I had to change the header with Messen to make it work on MiSTer.
Star Tropics is one of, I think, 2 or 3 games (Zoda's Revenge- Star Tropics 2 being the other) that I've come across which needs to be played using the NES 2.0 Headers.

https://github.com/MiSTer-devel/NES_MiSTer/issues/169

Relevant issue.

Mesen can load it because it has a full rom database that detects games and basically picks the correct mapper. Startropics in the iNES header format does not correctly state it's mapper. Basically the vast majority of NES ROMs ought to be converted to NES 2.0 since that is the more "accurate" method and wouldn't require all these emulators to have massive rom databases and tons of crc32 hash checks, etc... (https://wiki.nesdev.com/w/index.php/NES_2.0 - more on nes 2.0 here)

EDIT: Adding this

https://github.com/SourMesen/Mesen/issues/610

To give further context, Mesen also has issues with a hack of Startropics for a similar reason. Because Mesen doesn't have the rom hacks of startropics in it's crc32 database, it behaves the same as the MiSTer core essentially to those. So they made a whole other patch just to correctly set Startropics to MM6 mapper in the header :P

https://www.romhacking.net/hacks/4871/

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Jan 17, 2021 3:28 am
by chimaera
Use kitrinx NES header repair https://github.com/Kitrinx/NES_Header_Repair with the INES header db http://forums.nesdev.com/viewtopic.php? ... pt#p248905 to make your nes headers up to date

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sat Feb 27, 2021 5:13 pm
by JWDog
chimaera wrote: Sun Jan 17, 2021 3:28 am Use kitrinx NES header repair https://github.com/Kitrinx/NES_Header_Repair with the INES header db http://forums.nesdev.com/viewtopic.php? ... pt#p248905 to make your nes headers up to date
I have the nes20db.xml and nes_header_repair.py, and a rom in a subfolder

So, I am new at this and tried to run this python script by:

python nes_header_repair.py >change.txt

but I get the following error:

line 7,
<!DOCTYPE html>
^
Syntax Error: invalid syntax

Please help..
Thanks

Also, when i try to run it with python3 it says it is not recognized as an internal or external command

PS i am using the cmd prompt

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sat Feb 27, 2021 6:49 pm
by MostroW
That error message almost looks to me like it's a html file instead of a .nes file, because the line 7 error it throws is a html document type declaration.

If the file is zipped maybe unzip it, then make sure it is a .nes file?
If the file is html then maybe something went wrong?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sat Feb 27, 2021 9:03 pm
by JWDog
Thanks. It is strange because the rom in the folder is .nes. do you think it could have problems if the rom is a japanese famicom rom?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 2:23 am
by chimaera
JWDog wrote: Sat Feb 27, 2021 9:03 pm Thanks. It is strange because the rom in the folder is .nes. do you think it could have problems if the rom is a japanese famicom rom?
It works with .nes roms from all regions, if they are in the iNES2 .xml list.
I don't really know why you get that problem though..

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 3:11 am
by JWDog
I understand. Maybe i should try more roms that aren't working except just 1. To see if the script is really working. I will try that and post the results. Does anyone know if there is a list out there that shows .nes roms that are not working on the MiSTer?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 5:00 pm
by chimaera
Just open the file in a text editor and search.
iNES header entries looks like this:

Code: Select all

	<game><!-- Licensed Japan\10-Yard Fight (rev0).nes -->
		<prgrom size="16384" crc32="D3D248C9" sha1="64185EDC4FD64B5F5E565B90B0DDC241592D899C" sum16="0339" />
		<chrrom size="8192" crc32="9C124A53" sha1="BEDDF6A65A1A72410CFB1208E8B6B6E0CF5B2E74" sum16="16E5" />
		<rom size="24576" crc32="836C4FA7" sha1="55DC03A493150258E10166CF38ED76DFADE605D6" />
		<pcb mapper="0" submapper="0" mirroring="H" battery="0" />
		<console type="0" region="0" />
		<expansion type="1" />
	</game>
Just do a search and check the <game> part for the game title.

Code: Select all

<game><!-- Licensed Japan\10-Yard Fight (rev0).nes --> <--- THIS PART!!
I think all official games are listed, and some hacks/translations/unlicensed.

If nes_header_repair.py doesnt repair the header, it could already be iNES 2, or perhaps it is a bad dump.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 5:04 pm
by JWDog
So, i tried it again adding more .nes roms and get the same error. Not sure what is happening...

here is the cmd.exe statement again.
C:\Users\Owner\Documents\My Games\Mister FPGA Stage\NES ROM Repair>python nes_header_repair.py>change.txt
File "C:\Users\Owner\Documents\My Games\Mister FPGA Stage\NES ROM Repair\nes_header_repair.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax

inside of the NES ROM Repair folder i have the following files:
games folder containing .nes roms
nes_header_repair.py
nes20db.xml

Can someone help me understand the python setup maybe that is what it is...

WIndows 10
downloaded and installed python
added it to PATH

Thanks for your help.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 5:08 pm
by JWDog
chimaera wrote: Sun Feb 28, 2021 5:00 pm Just open the file in a text editor and search.
iNES header entries looks like this:

Code: Select all

	<game><!-- Licensed Japan\10-Yard Fight (rev0).nes -->
		<prgrom size="16384" crc32="D3D248C9" sha1="64185EDC4FD64B5F5E565B90B0DDC241592D899C" sum16="0339" />
		<chrrom size="8192" crc32="9C124A53" sha1="BEDDF6A65A1A72410CFB1208E8B6B6E0CF5B2E74" sum16="16E5" />
		<rom size="24576" crc32="836C4FA7" sha1="55DC03A493150258E10166CF38ED76DFADE605D6" />
		<pcb mapper="0" submapper="0" mirroring="H" battery="0" />
		<console type="0" region="0" />
		<expansion type="1" />
	</game>
Just do a search and check the <game> part for the game title.

Code: Select all

<game><!-- Licensed Japan\10-Yard Fight (rev0).nes --> <--- THIS PART!!
I think all official games are listed, and some hacks/translations/unlicensed.

If nes_header_repair.py doesnt repair the header, it could already be iNES 2, or perhaps it is a bad dump.
Maybe, i don't know what i am doing. but, i tried opening the .nes file in notepad and it looks like unreadable code.
What am i doing wrong?
Thanks.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 8:27 pm
by MostroW
if the .nes file looks like garbled data then it could very well be a rom, try it i an emulator maybe to see if it works there?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 8:46 pm
by JWDog
MostroW wrote: Sun Feb 28, 2021 8:27 pm if the .nes file looks like garbled data then it could very well be a rom, try it i an emulator maybe to see if it works there?
It is a rom. Maybe i dont undetstand this header business. But, i tried the rom in MiSTer and it didn't work. So, thought i would try this method. And still having trouble. Most of the roms i have work in MiSTer with a small amount not. I have tried finding different roms of the same game. But, they too don't work. So, i thought they needed header repair. Is there a list of .nes roms that don't work in MiSTer?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 9:10 pm
by chimaera
For my iNES2 header converter setup, I have nes20db.xml, nes_header_repair.py, .nes roms and iNES2CONVERT.bat in the same directory.

The .BAT contains this line:

Code: Select all

c:\Python39\python.exe nes_header_repair.py
change c:\Python39\python.exe to the correct location for your setup

nes_header_repair.py needs to be edited change this code:

Code: Select all

TRIAL_RUN = 1
to this:

Code: Select all

TRIAL_RUN = 0
run iNES2CONVERT.bat and it should work, atleast it does for me.

I hope that helps you

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 9:21 pm
by JWDog
How do i change the .py script code to what you suggest?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 11:02 pm
by Orfax
Is it possible that your nes_header_repair.py has the <!DOCTYPE html> in it?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Sun Feb 28, 2021 11:54 pm
by JWDog
If I use Mesen emulator to check the headers, do you think I could discover more info?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 1:01 am
by JWDog
Orfax wrote: Sun Feb 28, 2021 11:02 pm Is it possible that your nes_header_repair.py has the <!DOCTYPE html> in it?
I think it actually does. What does that mean? Do I have the wrong .py script?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 1:22 am
by Orfax
I suspect you have not grabbed the python script correctly. It's probably the correct script but wrapped up in a HTML page. How did you download it?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 11:19 am
by chimaera
JWDog wrote: Sun Feb 28, 2021 9:21 pm How do i change the .py script code to what you suggest?
Just Open it in notepad.exe in windows or the corresponding texteditor if you use Another OS.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 4:18 pm
by JWDog
Orfax wrote: Mon Mar 01, 2021 1:22 am I suspect you have not grabbed the python script correctly. It's probably the correct script but wrapped up in a HTML page. How did you download it?
You're probably right. I went to the github page and right clicked on the name of the file and saved it.

I didn't see a download for it.

Ok. So, I went back went to the code and downloaded the zip file.
Unzipped it and vooilaa! It doesn't have the html info anymore.

Thanks.

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 5:33 pm
by JWDog
So, I got the script to run... But, now I am noticing that it didn't look at all the .nes files.

Is there still a problem?

or is it limited to how many .nes files?

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 6:21 pm
by chimaera
no limit, if it doesn't process the .nes file, then its probably already ines2, a bad dump or not in the list

Re: Zelda - The Legend of Link romhack not working? [Solved]

Posted: Mon Mar 01, 2021 7:00 pm
by JWDog
Ok. Cool. Thanks for all of your help.

Is Mesen a good emulator to look at the header of a rom?
Do you know if there is a list out there of .nes roms that don't work with MiSTer?