Terminator 2 acts unexpectedly on real NES

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Post Reply
Skrybe
Posts: 33
Joined: Sun Jun 11, 2006 2:52 pm

Terminator 2 acts unexpectedly on real NES

Post by Skrybe »

I was talking with rbudrick about a Terminator 2 NES proto he owns, and noticed it does something on a real NES that doesn't make sense to me. The proto contains the same code as the final version; the CRC matches the US retail release recorded in bootgod's database. However, according to rbudrick, on a real system, the proto always skips the opening copyright screen that the retail version normally displays on power on. When testing the rom on his Powerpak, it displays the copyright screen. Would a difference in cartridge hardware be able to cause this to happen? That seems to be the only difference here.

A picture of the PCB is here.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Terminator 2 acts unexpectedly on real NES

Post by thefox »

PowerPak is not a reliable way to test for differences, if the game relies on RAM initialization state. (It's plausible that it does, because I see a bunch of accesses to uninitialized RAM when I run the ROM in Nintendulator.)

Has either one of you tested the original retail cartridge?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Skrybe
Posts: 33
Joined: Sun Jun 11, 2006 2:52 pm

Re: Terminator 2 acts unexpectedly on real NES

Post by Skrybe »

I don't own a copy of T2, and I doubt rbudrick does, since he went straight for his Powerpak for comparison. Next stop: eBay, I suppose.
lidnariq
Posts: 11320
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Terminator 2 acts unexpectedly on real NES

Post by lidnariq »

This should be something we can just test with a debugging emulator, especially one that tracks uninitialized RAM like Nintendulator.

Unfortunately, the game seems to do something with the vast majority of uninitialized memory—maybe it's using it to seed a RNG?
(First it takes the 16 bit sum of $0696→$06E5. Then it XORs the entire 768 bytes at $02xx, $04xx and $06xx together, and XORs the entire 512 bytes at $03xx and $05xx together. That all looks like RNGish stuff.
In zero page, $B1→$B6 seem to be mirrored copies of the MMC3 CHR registers. $7F→$86 seem to be a weird way of containing the joypad's buttons? Maybe some kind of debouncing.
$E0+$E1 is some kind of 16-bit running sum. Not certain what it's for.
$64 and $65 seems to be some kind of vblank counter.)

None of those look particularly obvious...
rbudrick
Posts: 284
Joined: Wed Sep 21, 2005 3:20 pm

Re: Terminator 2 acts unexpectedly on real NES

Post by rbudrick »

Yeah, it figures...I own nearly 500 NES games and not one of them was the common T2. I compared the rom to the released version rom I have, but Skrybe believes the differences I found might be due to a bad dump of the rom of the released version I have. The differences are in the middle of the rom as most of the beginning of the roms are the same

-Rob
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Terminator 2 acts unexpectedly on real NES

Post by thefox »

I happened to stumble on this issue again when I noticed that Nintendulator (with zero-initialized memory) didn't show the copyright screen, whereas FCEUX did.

Like lidnariq said, it seems to be calculating a 16-bit checksum of $696..6E5 and places it at $89..8A. Later on at $A4FC it compares $89..8A to $6E6..6E7. If they are equal, it sets $68F to $00, otherwise it gets set to $FF. The flag is then checked at $DFF2 to determine whether to display the copyright screen.

So, the flag at $68F always gets set to zero if the memory was initialized to all zeros.

First guess would be that $696..6E5 houses high scores or something of that nature, but I couldn't find any actual high score table in the game. (Maybe it was planned? There are multiple entries with the text "UNCLE BOB" in RAM at $696..6E5 after the game has started, and $68F..695 seems to be the current score.)

EDIT: The high score theory is confirmed by https://tcrf.net/Terminator_2:_Judgment_Day_(NES)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Post Reply