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

Unfortunately a lot of Nintendo 64 games have very blurry visuals because of anti-aliasing.

A few games do not use anti-aliasing which result in a sharper picture. For example Hydro Thunder or Automobili Lamborghini.

Quake 64 does even have an option to turn anti-aliasing on and off. That made me wonder if it's possible to turn off anti-aliasing in other games as well. Probably with a GameShark cheat code? Does anyone know if that's even possible?
You flip around flags on VI Status. I don't know why people seem to prefer raw pixels to smoothed images, but whatever.
Code:
VI Status	A4400000
	00000003	color source for framebuffer(s)
	00000004	gamma divot enabled
	00000008	gamma enabled
	00000010	divot enabled
	00000040	serrate
	00000300	antialiasing mode
		0: antialias and resample, always fetching extra lines
		1: antialias and resample, fetching lines as needed
		2: resample
		3: replicate pixels without interpolation
FINALY
I just watched a video discussing this today:




So the code I must enter is "A4400000", just it?
What does serrate means in 3D graphics?
unfortunately with GameShark Pro I can only search between address 0x80000400 and 0x803FFFFF:
http://doc.kodewerx.org/hacking_n64.html#gs_code_types

Does that mean it's impossible to create a GameShark code?
All assuming I didn't mess up...

Check if/where there's a mirror of the VI Status register somewhere in memory that's accessible by the GameShark, from which the game in question writes to the actual register. In the case of Zelda OoT (NTSC v1.2), "810069EE 3216" and "81006A1E 3216" seem to do the job, as can hopefully be seen below; first photo with AA, second without.

In this case, the original value in the register at 0xA4400000 is 0x00013016. That value can also be found at addresses 0x000069EC and 0x00006A1C. So, using this file as a guideline, I arrived at 0x00013216 as the value that would disable AA but keep the rest of the display... functioning properly (0x00013316 caused the image to, um, not look very playable). And that was turned into a 16-bit write GS code, although 8-bit should be sufficient.

Anyway, I'd be glad if someone could confirm or deny that I've done this correctly.

(Edit, I'm leaning towards I've done this at least not 100% correctly, because this does cause a bunch of vertical stripes of ca. 1cm width to appear on the screen...)

[​IMG]
[​IMG]
I've connected my old Win98 Laptop to my Gameshark. With GSCC I can view Address A4400000.

I've used Quake 64 (PAL) to check the values when the filter was turned on (default) and after turning the filter off. The interesting part happens at Offset 01 and Offset 02.

Filter Off: 00 32
QUAKE64_PAL_FilterOff.png

Filter On: 01 30
QUAKE64_PAL_FilterOn.png

Offset 05 and 06 is constantly changing regardless of the filter setting.

However when I try to overwrite these values in GSCC the game immediately crashes.

edit: Found it at address 800706AC
Try searching for the value (that is, the 32-bit value / 4 bytes) at 0xA4400000 elsewhere in memory. I've tried a couple of games - Zelda OoT, Mario 64, F-Zero X, Mario Kart 64 - all of which have exactly two copies of the value, 0x30 bytes apart from each other. These copies can be modified by the GameShark itself at least, and do affect the game.

Also, the vertical bands I mentioned in my edit to my last post go away if you disable the dither filter, i.e. bit 16. Thus OoT's 0x00013016 becomes 0x00003216, and the codes for NTSC v1.2 are 810069EC 0000, 810069EE, 3216, 81006A1C 0000 and 81006A1E 3216. The same thing for Super Mario 64 JPN is 813348BC 0000, 813348BE 3216, 813348EC 0000 and 813348EE 3216.
Thanks for your help. I'm new into game hacking. This is my first try and I'm doing it on real hardware, no emulator.

I did search for 00013016 on Turok 1 (PAL). Found the values at 0x800EF37C

When I change 0x800EF37D to 00 the image is much sharper, but anti-aliasing is still active.
When I change 0x800EF37E to 32 then anti aliasing is off. The value 33 will make it even a bit sharper. However it's not noticeable on my photos. Try it out by yourself :)

But how do I turn this into a Gameshark code?

Here are a few pics:

Default:
Turok1_PAL_default.jpg

changed 0x800EF37D to 00:
Turok1_PAL_00.jpg

changed 0x800EF37D to 00
AND changed 0x800EF37E to 32
Turok1_PAL_32.jpg

changed 0x800EF37D to 00
AND changed 0x800EF37E to 33
Turok1_PAL_33.jpg
Nice to see it worked for you!

As for making a GS code out of that, the easiest way would probably be that you split the 32-bit value into two 16-bit ones, then make two 16-bit write codes. So with ex. 00003216 as the new value, it'll be 0000 and 3216; 16-bit writes are prefixed with 0x81 instead of 0x80 (which are 8-bit writes), so with address 0x800EF37C, the codes should be 810EF37C 0000 and 810EF37E 3216.
Thanks, I think I've got it.

In this case I could also use two 8bit codes for the GameShark:

800EF37D 0000 (turn Filter in Turok off)
800EF37E 0032 (turn Anti-Aliasing in Turok off)

edit: For some reason the second code doesn't work properly without the first code.
It worked here using atl64 (alternative menu for the everdrive 64) using YALM cheat codes.
Spoiler: BIG IMAGE
Before:
[​IMG]

After:
[​IMG]
@ Fandangos: Thanks for your photos.

I've got the codes for another game: Star Wars Shadows Of The Empire (PAL):

default:
SOTE_PAL_default.jpg

changed 0x800E910D to 00
AND 0x800E910E to 32
SOTE_PAL_0032.jpg

changed 0x800E910D to 00
AND 0x800E10E to 33
SOTE_PAL_0033.jpg

GameShark code: 880E910D 0000 (disable Filter, push GS button to activate)
GameShark code: 880E910E 0033 (disable Anti-Aliasing, push GS button to activate)

For some strange reason these GameShark codes did only work with the GS button method for me
SotE looks like it's losing some of its colors - I hope that's just a camera issue (probably is). Other than that, awesome idea/thread/progress!
Don't worry, SotE does not loose colors. This is because I'm using a CRT and it's difficult to make good photos.

The main problem with SotE is the horrible dithering. Without the filters it's clearly visible. Does anyone know how to disable the dither?
Damn, that makes quite a big difference. Looking forward to playing with this myself.
mdmx: We're disabling the filter that removes the dither by changing that 1 to 0, see DITHER_FILTER_EN in the file I linked to before. I'm guessing that, considering the description for the dither filter there, we would need to have a 32-bit color depth instead of just 16-bit to get rid of it. I have not tried changing that setting yet, so I have no idea if we can just force a game to use a different color depth than what it's meant to be using...

Edit, nope, can't just force it this way:

[​IMG]
This is some interesting stuff! If this becomes easy enough to work out and enable for many or all games, you should totally set up a database for it of some kind. That'd be pretty awesome.
I don't know why anyone would want to do this but I find it fascinating all the same, much like those Dreamcast widescreen hacks. Thanks for your hard work!
Just like the DC Widescreen, exactly my thoughts!

This looks beautiful with the xrgb mini, without the mods, n64 looks like composite on hdmi.

If it's possible to get 32bit and remove dithering, this is going to give a new breath to n64 poor graphics and get closer to emulation without the bugs.

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