Is it possible to disable anti-aliasing in N64 games via GameShark cheats?

more codes for you.

(M) is a so called 'Enable' code. Without it, the game won't start. Usually you can find these codes on the internet. However I haven't found (M) codes for the following games:
Sin & Punishment, Dezaemon 3D, Shadowgate (PAL).
If you have them, please send me a pm.

1080° Snowboarding (PAL):
DE000400 0000 (M)
800917FD 0000
8009182D 0000
800917FE 0032
8009182E 0032

Banjo Kazooie (PAL):
DE000400 0000 (M)
8124C628 1000 (M)
812874C4 1000 (M)
812D3F80 2400 (M)
802770FD 0000
8027712D 0000
802770FE 0032
8027712E 0032

Conker's Bad Fur Day (PAL):
8002C0DD 0000
8002C10D 0000
8002C0DE 0032
8002C10E 0032


Diddy Kong Racing v1.0 (US):
DE000400 0000 (M)
F1024FC0 1000 (M)
F1024FC2 0002 (M)
F105F97C 1000 (M)
F105F97E 0004 (M)
800E481D 0000
800E484D 0000
800E481E 0032
800E484E 0032

F-Zero X (PAL):
game is already pretty sharp, so this code won't make a huge difference
DE067000 0000 (M)
800C582E 0032
800C585E 0032

Multi Racing Championship (US):
800909BD 0000
800909ED 0000
800909BE 0032
800909EE 0032

NBA Hangtime (PAL):
8009C14D 0000
8009C17D 0000
8009C14E 0032
8009C17E 0032

Polaris Snow Cross (US):
80086F5D 0000
80086F8D 0000
80086F5E 0032
80086F8E 0032

Star Soldier Vanishing Earth (JP):
game is already pretty sharp, so this code won't make a huge difference
80081F1D 0000
80081F4D 0000
80081F1E 0032
80081F4E 0032

Wave Race 64 Rumble Pak Edition (JP):
800EAA6D 0000
800EAA9D 0000
800EAA6E 0032
800EAA9E 0032

Wipeout 64 (PAL):
800976FD 0000
800976FE 0032
Looks like you and I are following very similar research paths :). I also took a look at __osViInit and discovered the 0x80000300 check and mode table reference. I noticed that the 0xA4400000 control register was 0 prior to this function being called (meaning that it is the first to set the register). Note however, that the single 32 bit value 0x0000324e is not enough to define the mode since the mode is a structure that is 0x50 bytes long (you can see its definition in the header file os_vi.h). There are a few modes that set the VI ctrl reg to 0x0324e - NTSC_LPF1, NTSC_HPN1, NTSC_HPF1, and the corresponding PAL/MPAL/FPAL entries. The value for NTSC_LAN1 that I found was 0x0000311E (perhaps you made a typo? or maybe I'm mistaken...).

Anyway, changing the mode table entry to 320E does indeed set it to NTSC_LPN1. However, when I try this, the games that I've tested this on appear to modify the register again and overwrite the change. The change appears to be coming from the osViSetSpecialFeatures call, which unfortunately, is compressed in the games that I've tested it on making a patch difficult.

Not sure what you mean by 'header checksum' - which header are you referring to?
yes, it is overwritten by osViSetSpecialFeatures
i pm you my new patcher, but it is only working for a few games, where it could find a
specific signature version of osViSetSpecialFeatures. like in starfox us v1.0
:>

- the checksum inside the rom header at 0x10 CRC1/CRC2 ^^
- yes it was a typo 0x0000311e is the correct value for NTSC_LAN1 ctrl

Spoiler: patcher output
-== N64 VideoTable AA-patcher v0.1 ==- by saturnu
Star Fox 64 (USA).z64 found
Rom size: 12582912
search for mode: 2
searching...
vt entry found!
found at offset: 000c4454
search for mode: 3
searching...
error: mode: 3 no VT offset found
search for mode: 6
searching...
error: mode: 6 no VT offset found
search for mode: 7
searching...
error: mode: 7 no VT offset found
search for mode: 10
searching...
error: mode: 10 no VT offset found
search for mode: 11
searching...
error: mode: 11 no VT offset found
search for mode: 16
searching...
vt entry maybe found! (5/8)
try anyway :D
found at offset: 000c44a4
search for mode: 17
searching...
error: mode: 17 no VT offset found
search for mode: 20
searching...
error: mode: 20 no VT offset found
search for mode: 21
searching...
error: mode: 21 no VT offset found
search for mode: 24
searching...
error: mode: 24 no VT offset found
search for mode: 25
searching...
error: mode: 25 no VT offset found
search for mode: 30
searching...
vt entry found!
found at offset: 000c44f4
search for mode: 31
searching...
error: mode: 31 no VT offset found
search for mode: 34
searching...
error: mode: 34 no VT offset found
search for mode: 35
searching...
error: mode: 35 no VT offset found
search for mode: 38
searching...
error: mode: 38 no VT offset found
search for mode: 39
searching...
error: mode: 39 no VT offset found
3/18 modes patched!
osViSetSpecialFeatures offset 1 found
osViSetSpecialFeatures offset 2 found
file patched!
done...

universal patcher betatest :>
not really - at the moment it isn't working with a lot of roms at all.

https://f.zdev.com/dl/smurbq.zip

It's tested with
Star Fox 64 US 1.0
Lylat Wars E
Super Mario 64 E
Wow, this would be a godsend! Looking at MDMX's Turok 1 post, It seems that for at least some games, there are various degrees of how much the image can be sharpened; I don't suppose there could be an option in the patcher to choose the degree of sharpness we want the games to end up at?
Saturnu, thank you for your patcher. I will now start testing. For my EverDrive 64 i would prefer not to patch the rom itself, but to create ips files, so that I can keep the original rom dumps on my sd card and just add the ips files for the autopatcher.
atm i'm working on an improved version, that's searching for the patch offsets instead of using byte chains to detect the function. ^^
the uploaded patcher in the thread isn't very usefull at it's current state. ^^

the osViSetSpecialFeatures varies a lot. :>
Has anyone been able to identify if the N64 has any actual processing differences with these codes in effect?

I would imagine it has a less stressful processing time as it's removing an extra step in the way it displays the game but I could be wrong.
You are awesome!

One idea would be that it spits a game shark code in YAML file so it can be used in your alt menu just selecting cheats on or off, the only problem with this is that it would count on game shark compatibility to work.


Does Alt Menu or the Original ED64 menu supports on the fly ips patching?
Thanks for your efforts. Is it possible to output GameShark codes optionally? I ask this because I prefer to use the original cartridges.
Perhaps a modification to the n64hijacker that saturnu linked to earlier would be a more universal solution. That program allows you to run code before the game starts - when used with the patcher.asm program that was linked to, a ROM can be patched to include GS cheats embedded inside of it. Unfortunately, as we saw earlier in this thread, it seems that writing to the 0xA4400000 register directly does not work - I think it is because the cheat codes are applied at each interrupt (e.g. vertical trace) which is the same time that the context buffer switch occurs, leading to a conflict and garbage output on the screen.

However, we can still use n64hijacker to automate the sequence of finding all context buffers, and patching them instead of modifying the VI ctrl register directly by doing this:
- read VI ctrl/status register (0xA4400000)
- search RAM for any values that match what's inside that register (indicating a context buffer)
- save these addresses so that they don't need to be searched for again
- install gameshark-style cheat that will overwrite the addresses that were found with the desired values

What patcher.asm currently does is install an exception handler. The handler that it installs will go through the list of codes that the user supplies and apply them to the game one by one. We just need to modify the handler in patcher.asm so that before going through the GS code list, it searches for the context buffers and adds a GS code to its existing list. This would essentially automate what the participants of this thread have been doing manually- i.e. opening up an emulator, searching for occurrences of the VI register value in memory and writing a GS cheat to patch those addresses.
universal aa-patcher v0.2 beta ^^
should now work with a lot more games.

if you want to give some feedback
please report non-working games with a checksum
http://www.pc-tools.net/win32/md5sums/

Download v0.2:
https://f.zdev.com/dl/zofswj.zip
This.
It makes sense for 2D pixel art based games. But 3D is not intended to be or should be 100% ultra pixel sharp.
Thanks very much for that - just to clarify, am I right in saying that the resulting patched roms will work on any flash cart on the N64 itself?
Thanks for the update. It does indeed work with a lot more games.

Here are a few games the patcher doesn't work with:
  • Automobili Lamborghini (U) [!] ec39579f066a9714ff030d07dec3c9d3
  • Blast Corps (U) (V1.1) [!] 5875fc73069077c93e214233b60f0bdc
  • Banjo-Tooie (U) [!] c02ad68b60e2ec824222a2074c3cdb1c
  • Conker's Bad Fur Day (U) [!] 00e2920665f2329b95797a7eaabc2390
  • Custom Robo V2 (J) [!] 115118dd5e0f02d82ba1bf070a7b78f1
  • Extreme-G (U) [!] 3e660d3f991c0529e90bfec0244db31a
  • Extreme-G XG2 (U) [!] 44fe06ba3686c02a7988f27600a533da
  • Gauntlet Legends (U) [!] 9cb963e8b71f18568f78ec1af120362e
  • Killer Instinct Gold (U) (V1.2) [!] dd0a82fcc10397afb37f12bb7f94e67a
  • Kirby 64 - The Crystal Shards (U) [!] d33e4254336383a17ff4728360562ada
  • Ms. Pac-Man - Maze Madness (U) [!] 08bea3310e778a6584eb64cd3f15f86e
  • Perfect Dark (U) (V1.1) [!] e03b088b6ac9e0080440efed07c1e40f
  • Super Smash Bros. (U) [!] f7c52568a31aadf26e14dc2b6416b2ed
  • Turok - Dinosaur Hunter (U) (V1.2) [!] 039875b92c0e4fef9797ec1744877b17
  • Vigilante 8 (U) [!] d616adf6441acbbd0e6bef023a8f6031
  • Vigilante 8 - 2nd Offense (U) [!] 60cdf7445fad2aba05c958f46691501b
ah great, thank you for the feedback ^^
Here is a batch file that creates ips patches and names them accordingly, so that you can just put them in the ED64/AUTO folder:
Code:
@echo off
for /f "tokens=2delims=$," %%a in ('.\tools\rn64crc.exe "%~n1.z64" -c') do set checksum=%%a
.\tools\aapatcher.exe "%~n1.z64"
.\tools\rn64crc.exe output.z64 -u
uips.exe c "%checksum%.ips" "%~n1.z64" "output.z64"
del output.z64
pause
To use the batch file, you need to install saturnu's patcher, ucon64, rn64crc and uips in a subfolder called tools. Then you can just drag and drop the roms you want to be patched into the batch file. Only roms in the .z64 format are supported.
ah using rn64crc.exe for fixing the checksums is a nice idea, i think it's working better for some cic types than ucon64.
Hi there :)
I really like the way this thread goes, and wanna congrat' all the people working on this.
@hyperterminal, your link lead to Mac OS X utility, is there something equivalent for PC ?
Thank you !
Guys great stuff! Thanks!! :) ...the only thing which is missing are widescreen codes :D
I fixed the link in post #79.

The patches should be tested thoroughly before replacing the old roms.

I just played the patched version of Legend of Zelda, The - Ocarina of Time (U) (V1.1) [!] (MD5: 721fdcc6f5f34be55c43a807f2a16af4) and it froze when I tried to play the Song of Time or the Sun's Song on the Ocarina of Time.

Original thread: https://assemblergames.com/threads/is-it-possible-to-disable-anti-aliasing-in-n64-games-via-gameshark-cheats.59916/