HarryTuttle wrote:Bart wrote:Now, the VROM check is another matter. It always fails.
Ah, Ok! I was a bit vague with my question, infact the CROM never fails on unpatched games, VROM instead (and in some games the "boundary check", which I don't know what's about) fails. Thanks for the explanation.
Boundary scan is a very common way to debug integrated circuits. Special testing circuitry is added to device pins (or really, anywhere inside a chip, but usually on some sort of I/O pins or internal state registers), hence allowing the "boundary" of the chip to be tested by overriding the pins with certain values and then capturing the results elsewhere in the chip (or even on another chip, if one is connected to the other) using the same kind of logic on the other side. The values to drive the signals are shifted in one bit at a time using the JTAG serial protocol. The port that exposes this interface is called the Test Access Port (TAP). I refer to TAP and JTAG interchangeably. The results of the test are also read out serially using the same interface.
This is very specific to the chip being tested and would change from revision to revision. It's normally used for hardware engineers to debug and verify their design. But it can also be used to implement software patches if enough functionality is exposed and a bug in the logic is found after tape-out.
Bart wrote:This will probably never be emulated, although if someone is a masochist, they can try to figure it out
Not me...This is the kind of things that usually MAME dev are onto for emulation accuracy, maybe one day it'll be possible to port the code, who knows?
What the VROM test logic is almost certainly doing is using the TAP port to drive pins on the Real3D chips that connect to the VROM. They probably program in specific VROM addresses and then capture what appears on the data bus and shift it back out through the TAP port. This is actually a perfect example of what boundary scan logic is for. The VROM address and data buses are not connected to the PowerPC but they are connected to one or more of the Real3D chips. These chips are JTAG-enabled and so the PowerPC can manipulate their pins directly, sample the values on each one, and then shift the results in and examine them one bit at a time.
The easy way to get the VROM checks to pass would be to detect the test and then shift back the exact values that the game expects. The correct way to do it would be to try to decipher the values and figure out which part of the VROM is being read. This would be very tricky but theoretically doable.
This is probably more than you wanted to know

Also, somewhat related, I've seen that in the last months, if I recall, they've added some network board emulation code for the various Model hardware.
Model 3's network board is very similar to Model 1/2. SailorSat is the expert on this stuff. I would like to discuss with her at some point. Nik actually had it all figured out but he's been too busy to get in touch and I'm not hopeful that I'll ever see the source code. But I will try to ask him for it at some point. Network emulation is tricky because these games used a fiber optic link with a custom protocol that expected to be synchronized frame by frame.