-
Notifications
You must be signed in to change notification settings - Fork 8
2k sports games that don't boot #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
it looks like maybe the problem is that this game splits a single read operation up into multiple DMA transfers, and somehow WashingtonDC doesn't implement that correctly. I seem to remember Windows CE having a similar problem back in March... |
it looks like there's something fundamentally wrong with the way GDLEND is implemented, we only update it when state is GDROM_STATE_DMA_READING but some games may only read it after the transition to GDROM_STATE_DMA_WAITING; in this case the value of GDLEND will be incorrect because it will have retained the value it had before the DMA transfer. but even though this needs to be fixed, it doesn't seem to be the reason why the 2k sports games are failing. |
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
current status of 2k sports games with commit 931d7ba:
the "unimplemented texture format" mentioned above is YUV-422 with VQ compression Tennis 2K2 is not included in this list since it's actually just Virtua Tennis 2 rebranded. Going forward, the following things need to be done before merging this branch to master:
the NHL games are going to be handled in a separate bug since those don't seem to be using the same engine as the NBA and NFL games. |
Oh geez, there's even more sports games on this console than I realized:
|
wrt to the 32767-sector read commands, one thing I've noticed is that it never actually transfers that much data to memory. It'll DMA something on the order of two or three figures. So maybe the reason why this works on real hardware is that it doesn't matter if programs over-read if they don't actually fetch the extra data from the drive. |
2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
regarding hang in NFL2K: I have determined the cause of the hang is that the SH4 is stalled waiting for 0xa080203c to be non-zero. 0xa080203c is within AICA memory, and corresponds to 0x203c from the ARM7's perspective. This is the main-loop
|
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
the ARM7 is stuck in a loop at 0x2ceo where it polls address 0x3a04 until it is at least 3. 0x3a04 is a variable that counts how many times the FIQ vector has been invoked. So the problem is that it can't continue until FIQ has happened at least 3 times, and in our case it isn't happening. Ergo the next step will be to understand why it is expecting FIQs, and why there have not been any. |
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
bit 10 is the only bit in SCIEB which is set. This corresponds to "One-sample interval interrupt" according to neil corlett's AICA notes. I don't believe this is implemented yet, therefore this is highly likely to be the root-cause of the problem.
|
gdrom: don't raise an error for out-of-bounds GD-ROM reads. 2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
the one-sample interval interrupt has been implemented in commit 3221acc; with this commit, NFL2k is finally booting so that was indeed the root cause of the problem with that game. |
2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
current state of 2k-sports games in master vs the 2k_sports branch. MMU column denotes whether the given game requires MMU support.
|
2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
2K sports games are doing 32767-sector reads that go past the end of the final track. I'm still not sure if this is the correct behavior or if there is some other error which is causing it to issue the abnormal read commands. with this commit, NBA 2K is now in-game. NFL 2K is not in-game yet because it hangs at a blank screen. see issue #97 on github.
still trying to piece together what's going on, but the general gist is that these games are doing some erratic operations with the GD-ROM drive (such as sending DMA read packets but never initiating the DMA transfer) before ultimately trying to read past the end of the GD, which triggers an ERROR_UNIMPLEMENTED in WashingtonDC. The earliest sign of trouble and the first thing that should be investigated is when they use a NOP to cancel a read.
The most important thing to note about these games is that they do not appear to be using the firmware's system calls for GD-ROM drive access; I believe they have their own custom GD-ROM driver which would explain why this problem appears to be unique to 2K sports games.
I've only tried out NBA 2K and NFL 2K, but i assume that the same problem applies to most other games from the 2K sports series.
The text was updated successfully, but these errors were encountered: