NTSC games on PAL N64 rolling video / shifted colours fix

for more info: Video Interface@64brew
special greetings to Roadhouse of High Society

Now... no need for paladin (& sound issues) or a RGB mod... do this:
Hex edit the rom, search for 00000C150C150C15 & replace all instances with 00170C690C6F0C6D
Usually this is enough, but on some tvs you also need to do this:
search for 03E5223900 replace with 04541E3A00
Remember to fix CRC or the game will not boot. (I use rn64crc2)
If the game's compressed (ex. no pattern found) or you aren't using a copier / flashcard, you can easily create a GameShark code.
Dump the ram & search for the aforementioned values. As an example, here's the code that I made for Densha De Go. It is pretty long, since patching only a few video tables just crashed the output (tv: no video but could hear the audio)

#VIBURST
8107425C 0454
8107425E 1E3A
810742AC 0454
810742AE 1E3A
810742FC 0454
810742FE 1E3A
8107434C 0454
8107434E 1E3A
8107439C 0454
8107439E 1E3A
810743EC 0454
810743EE 1E3A
8107443C 0454
8107443E 1E3A
8107448C 0454
8107448E 1E3A
810744DC 0454
810744DE 1E3A
8107452C 0454
8107452E 1E3A
8107457C 0454
8107457E 1E3A
810745CC 0454
810745CE 1E3A
8107461C 0454
8107461E 1E3A
8107466C 0454
8107466E 1E3A
810753DC 0454
810753DE 1E3A
8107580C 0454
8107580E 1E3A
#VIBURST_END

#HSYNC
81074264 0017
81074266 0C69
81074268 0C6F
8107426A 0C6D
810742B4 0017
810742B6 0C69
810742B8 0C6F
810742BA 0C6D
81074304 0017
81074306 0C69
81074308 0C6F
8107430A 0C6D
81074354 0017
81074356 0C69
81074358 0C6F
8107435A 0C6D
810743A4 0017
810743A6 0C69
810743A8 0C6F
810743AA 0C6D
810743F4 0017
810743F6 0C69
810743F8 0C6F
810743FA 0C6D
81074444 0017
81074446 0C69
81074448 0C6F
8107444A 0C6D
81074494 0017
81074496 0C69
81074498 0C6F
8107449A 0C6D
810744E4 0017
810744E6 0C69
810744E8 0C6F
810744EA 0C6D
81074534 0017
81074536 0C69
81074538 0C6F
8107453A 0C6D
81074584 0017
81074586 0C69
81074588 0C6F
8107458A 0C6D
810745D4 0017
810745D6 0C69
810745D8 0C6F
810745DA 0C6D
81074624 0017
81074626 0C69
81074628 0C6F
8107462A 0C6D
81074674 0017
81074676 0C69
81074678 0C6F
8107467A 0C6D
810753E4 0017
810753E6 0C69
810753E8 0C6F
810753EA 0C6D
81075814 0017
81075816 0C69
81075818 0C6F
8107581A 0C6D
#HSYNC_END

I attached a json file in order to automate the process with Garey27's Binary-AutoPatcher (you can find it on GitHub) - Big Endian (z64) input file
 

Attachments

  • Love
Reactions: hippy dave
Man thank you so much! With that i finally could fix the problem that my upscaler didn't want to take the Output signal of the original NTSC roms on my RGB modded PAL N64. While weirdly on my other old flatscreen with Scart input it perfectly works even without the patch. It seems like that the TV does something different than the upscaler.

I made a powershell script that automated the process of patching all the rooms in the folder, put them in an extra folder and also rename them without the ".patched" afterwards. Then I let the checksum checker run over them et voila, all of them worked, no matter if US or JP.

For anyone who wants to use it: Put the files of the patcher, the n64 json script and also the powershellscript in the same folder as your roms. Then start the powershell-script. After it's done, all the patched roms should be in the "patched" folder.

Thank you again!
 

Attachments

Last edited by Tommy_Tc,
  • Like
Reactions: Fabax01
This has worked great for most games. However, it doesn't seem to work with Goldeneye, with rn64crc just saying the CRC is OK rather than UPDATED. I do mainly use the PAL Goldeneye but i'm trying to play Goldfinger 64 and still getting the ghosting, if anyone has a way to fix this for Goldeneye specifically I'd really appreciate it.

Is there also a way to apply this fix to N64DD games?

And a fun quirk I've noticed is that the Neversoft games (Spider-Man and THPS) do work with this fix, but the ghosting remains in the menus, it goes away in game so it's not a dealbreaker.
 
This has worked great for most games. However, it doesn't seem to work with Goldeneye, with rn64crc just saying the CRC is OK rather than UPDATED. I do mainly use the PAL Goldeneye but i'm trying to play Goldfinger 64 and still getting the ghosting, if anyone has a way to fix this for Goldeneye specifically I'd really appreciate it.

Is there also a way to apply this fix to N64DD games?

And a fun quirk I've noticed is that the Neversoft games (Spider-Man and THPS) do work with this fix, but the ghosting remains in the menus, it goes away in game so it's not a dealbreaker.
What's the issue with N64DD? Black screen?
I think N64DD conversion do not use a common CIC, at least not one that rn64crc2 knows about (it's old software, after all...)
I no longer have it, but "n64.py" should be able to correctly recalculate checksum. Game should boot then.
---
About "Goldeneye" - OK = probably means that the patcher changed nothing (as in, pattern not found).
99% sure goldeneye is compressed. Can't seem to find the video tables by manually looking with an hex editor.
Please make a cheat code by looking where the video tables are located in RAM... like I did for Densha De Go
(check thread, use good old "nemu" or newer debug-enabled pj64 as your emulator of choice.)
Either then add the code to your ED64 or if you have another flashcard you can integrate the code inside the ROM using n64_gameshark_code_injector.
---
Re: Neversoft - interesting.... maybe "menu mode" video tables are loaded from compressed area?
As in, patcher can't find them -> patches only tables used by "game mode".
If this is the issue, cheat code method should also fix these Neversoft games...
 
With N64DD the games run fine but still have the ghosting, it just seems as though the patcher doesn't work with them.

With Goldeneye, I'm quite new to this stuff so i'll give it a go, though I'm currently on Summercart 64 and apparently that doesn't take Gamesharm codes yet. I also tried other methods such as changing the region of the rom with Info64 but no luck
 
With N64DD the games run fine but still have the ghosting, it just seems as though the patcher doesn't work with them.

With Goldeneye, I'm quite new to this stuff so i'll give it a go, though I'm currently on Summercart 64 and apparently that doesn't take Gamesharm codes yet. I also tried other methods such as changing the region of the rom with Info64 but no luck
Hmm... Try the code injector then. A friend with a ED64+ (which is a clone, stuck on ver 1.x, a version that doesn't support enabling game shark codes from the everdrive interface) had success enabling my Densha de go 64 code with it...
"Mini"-tutorial to make the n64 cheat:
Load rom (I used NEMU. PJ64 is way, way faster if you know what you're doing, but let's use NEMU for the sake of a "simple" explanation.)
Plugins -> Search memory.
Search value -> 00000C15, hex 32 BITS ALIGNED
Click on the results to verify (did we find 00000C150C150C15? Let's proceed.)
Focus on the last 6 numbers of the address, ignore the initial double zeros
append "81" to the address ex.
000269d4 -> 810269d4
& add what we'll write to the location AKA 00170C690C6F0C6D (pal values of: 5bit leap pattern, total duration of a line in 1/4 pixels, leap a & b - the alternative duration of 1st or 2nd vsync line in 1/4 pixels)
There's no way to do 32 bit write, only 16 bit so we'll split the numbers in groups of 4.
(0017) (0C69) (0C6F) (0C6D)
Example (partial):
810269D4 0017
Now we add +2 to find next address to write to:
810269D6 0C69
& then...
810269D8 0C6F
finally...
810269DA 0C6D
hint: why A? in hex 9+1 = A, A+1 = B, B+1 = C, and so on until "F". F+1 = 10.
---
Example (full):
#GOLDENEYE PALFIX
810269D4 0017
810269D6 0C69
810269D8 0C6F
810269DA 0C6D
---
Repeat for all the other addresses found during SEARCH, add to code (check main post, see densha de go for example of long, full cheat)
////////////////
OPTIONAL:
You may also want to adjust VI_BURST (or/and "Timing", see NEMU register page) if there are still issues.
Search value -> 03E52239, hex 32 BITS ALIGNED
Same method as before...
ex. Address is 000269CC -> 810269CC
hint: verify that number of correct results match - as in, if you found 5 00000C150C150C15 there will be 5 03E52239, as it's a part of a video table. If, as an example, search returns 6 results, it means that one is extra data and not part of a video table... so double check location of data, you'll see that the correct ones are "near" each 00000C150C150C15 result.
We need to write 04541E3A (pal values of: color burst in pixels from h-sync, vertical sync height in half lines, color burst width in pixels, horizontal sync width in pixels)
So... again, let's split in groups of 4, (0454) (1E3A)
Example (partial):
810269CC 0454
We do +2
810259CE 1E3A
--
Example (full):
#GOLDENEYE VIBURST
810269CC 0454
810259CE 1E3A
---
Repeat for all the other addresses found during SEARCH, add to code (check main post, see densha de go for example of long, full cheat)
Re: 64DD
Sorry - can't help you there.
Never cared much for 64DD, but a few years ago the common method was to use converted roms (z64 extension)
Seems like the "Summercart" expects 64DD disc drive images... Even if you could patch these images (by the way, I'm not sure why you couldn't... a simple search with an hex editor in one of them reveals clear video tables...)
I think the game wouldn't boot if you don't fix the checksum... which rn64crc2 cannot do, as I said before.
Not for the disk images, nor for the zoinkity conversions.
If they one day implement GS codes in the summercart (I don't think n64 code injector works with dd conversions), you could craft a cheat code, exactly in the same way as one for a compressed, cart game (using PJ64, I think it supports DD games nowadays)
 
Last edited by Fabax01,
Thanks so much for the detailed reply, I'll give this a go at the weekend when I have time. I'm assuming it's one of those things that looks less complicated when you actually do it and even then it doesn't look so bad
 
So my attempt almost worked. I put Goldfinger 64 into NEMU and made the code, and it didn't work, giving me errors on NEMU and PJ64 and blackscreening on my SC64. Out of curiousity I applied the code to a stock US Goldeneye rom and it actually worked, at least on NEMU and PJ64. So i'm unsure if it's just the romhacks being weird (I tried Goldfinger and Tomorrow Never Dies) or an error on my part with me being new to this, but props to your tutorial for actually getting me some success as someone who's never done this before, if I come across any more compressed roms this will work a treat.
For reference, this is my code:

#VIBURST
810269CC 0454
810269CE 1E3A
81026A1C 0454
81026A1E 1E3A
81026A6C 0454
81026A6E 1E3A
81026ABC 0454
81026ABE 1E3A
81026B0C 0454
81026B0E 1E3A
81026B5C 0454
81026B5E 1E3A
81026BAC 0454
81026BAE 1E3A
81026BFC 0454
81026BFE 1E3A
81026C4C 0454
81026C4E 1E3A
81026C9C 0454
81026C9E 1E3A
81026CEC 0454
81026CEE 1E3A
81026D3C 0454
81026D3E 1E3A
81026D8C 0454
81026D8E 1E3A
81026DDC 0454
81026DDE 1E3A
#VIBURST_END

#HSYNC
810269D4 0017
810269D6 0C69
810269D8 0C6F
810269DA 0C6D
81026A24 0017
81026A26 0C69
81026A28 0C6F
81026A2A 0C6D
81026A74 0017
81026A76 0C69
81026A78 0C6F
81026A7A 0C6D
81026AC4 0017
81026AC6 0C69
81026AC8 0C6F
81026ACA 0C6D
81026B14 0017
81026B16 0C69
81026B18 0C6F
81026B1A 0C6D
81026B64 0017
81026B66 0C69
81026B68 0C6F
81026B6A 0C6D
81026BB4 0017
81026BB6 0C69
81026BB8 0C6F
81026BBA 0C6D
81026C04 0017
81026C06 0C69
81026C08 0C6F
81026C0A 0C6D
81026C54 0017
81026C56 0C69
81026C58 0C6F
81026C5A 0C6D
81026CA4 0017
81026CA6 0C69
81026CA8 0C6F
81026CAA 0C6D
81026CF4 0017
81026CF6 0C69
81026CF8 0C6F
81026CFA 0C6D
81026D44 0017
81026D46 0C69
81026D48 0C6F
81026D4A 0C6D
81026D94 0017
81026D96 0C69
81026D98 0C6F
81026D9A 0C6D
81026DE4 0017
81026DE6 0C69
81026DE8 0C6F
81026DEA 0C6D
#HSYNC_END
 
Last edited by thunder_gun1,
  • Like
Reactions: Fabax01
Hello @thunder_gun1 and sorry for the late response.
Nice to see that you've successfully made a code :grog:! I've tested it on real hardware (injected retail usa goldeneye) and it works.
Don't worry - it is not the fault of your code, but of the code injector. Doesn't work with these hackroms...
You can easily verify this by simply pressing "patch" without inserting any cheats.
Retail goldeneye will boot, "Goldfinger" will not. Try contacting the author, maybe they can sort out a solution.
 
Hello @thunder_gun1 and sorry for the late response.
Nice to see that you've successfully made a code :grog:! I've tested it on real hardware (injected retail usa goldeneye) and it works.
Don't worry - it is not the fault of your code, but of the code injector. Doesn't work with these hackroms...
You can easily verify this by simply pressing "patch" without inserting any cheats.
Retail goldeneye will boot, "Goldfinger" will not. Try contacting the author, maybe they can sort out a solution.

Glad to hear the code works on your end too, and thanks again for putting such a good guide together. While it doesn't get the game working it's quite comforting knowing it isn't my fault haha. I'll try contacting them too
 
Glad to hear the code works on your end too, and thanks again for putting such a good guide together. While it doesn't get the game working it's quite comforting knowing it isn't my fault haha. I'll try contacting them too
Bad news :mellow:
I did a closer inspection (this time) using headphones.
Rare must've optimized the hell out of Goldeneye between PAL & NTSC ver.

Minimal patch that you can do in games to fix rolling video is to change only 0000--->0C15<---0C150C15
PAL = 0C69
PAL_M = 0C12
Not that I suggest patching only H_TOTAL without touching leap and all (you'll have screen glitches, such as shaking...) but the image will, at least, not roll. Useful to know if you need to do a quick - does the tv sync? - test.

Well, if you edit this in any way in Goldeneye the audio will become kinda fucky...
So your code works..! but you get bad audio instead. Sorry, never happened in other games...
At least it's not like "paladin", which forces 50Hz, inherently causing audio issues in ALL games.
---
BTW, I have tested "Spider-Man", my hunch was correct.
You'll find a lonely 00000C150C150C15 in RAM :P even when it's patched with the tool.
And the menu uses NTSC video table (you can check from the register page in Nemu) and switches to PAL when in game.
"OK, I'll make a code!" there's a catch - spider man still doesn't work with the injector, so guess you're out of luck...
 
Last edited by Fabax01,
That's actually crazy, trust me to find a bunch of games that end up being really weird to fix haha. Tbf with Spider-Man and THPS3 I can live with the graphics being weird in the menus so it isn't a big issue. The one curiousity I have now is that sketchy ebay sellers have repro carts of Goldfinger and Tomorrow Never Dies and advertise them as PAL. I wonder if they have the ghosting too or if they've done something else to them. I don't think it's worth spending £40 on a cart to find out though
Post automatically merged:

So it seems to be a Rare thing. I tried running the patcher on Banzo-Kazooie (I was wanting to play Nostalgia 64) and the same thing happened. I haven't deep-dived or tried to make a code with it since it'd probably lead to the same result as Goldeneye, but it seems Rare really like to compress their games :rofl2:
 
Last edited by thunder_gun1,
Hello,

here's a bit of "experimentation"...
Any expert feel free to chime in if I got something wrong.

"lines per field" = VI_V_SYNC_REG (value /2)
"dots per line" = VI_H_SYNC_REG (value +1)/4
"pixel clock" = videoclock /4

PAL video clock = 49656530 hz

video modes:
625i@?
(49656530/4)=x*312.5*(3178/4)
x = 50.000281938326

313p@49.92Hz reported by ossc users.
(49656530/4)=x*313*(3178/4)
x = 49.920409283472

here's what happens when you try to play a NTSC game on a PAL console without patching!
(49656530/4)=x*263*(3094/4)
x = 61.023949211156 - 61hz! too quick

swap (current patching method)
(49656530/4)=x*263*(3178/4)
x = 59.410981390596, slightly slow

optimized ntsc2pal? will test and upload patterns for the patcher later...
(49656530/4)=59.826097856516*263*(y/4)
y = 3155.9487518665 -> 3156? nets around 59.825hz. (or 3155, which is 59.844hz)
I suggest 3156, so to HSYNC_REG we'll write 3156-1= 3155 (0C53 in hex)


NTSC video clock = 48681812 hz

video modes:
525i@59.94Hz reported by ossc users.
(48681812/4)=x*262.5*(3094/4)
x = 59.940052328624

263p@59.82Hz reported by ossc users.
(48681812/4)=x*263*(3094/4)
x = 59.826097856516

here's what happens when you try to play a PAL game on NTSC console without patching!
313p@48.94Hz reported by ossc users.
(48681812/4)=x*313*(3178/4)
x = 48.940511544022 - 49Hz! too slow

optimized pal2ntsc? cannot test, only have PAL n64 at hand
(48681812/4)=49.920409283472*313*(y/4)
y = 3115.6183997553 -> 3116? nets around 49.914hz (or 3115, which is 49.930hz)
I suggest 3115, so to HSYNC_REG we'll write 3115-1= 3114 (0C2A in hex)
 
Last edited by Fabax01,


Write your reply...

Site & Scene News