I'm having some trouble getting Cowboy Kid to work properly with my emulator. Whenever you're "outside", many of the background tiles appear to be black! However, when you go into a building, the background renders properly (see attached images).
It appears to be a mapper 4 game. My emulator does not have trouble with any other mapper 4 games (that I'm aware of); I don't know what's so unusual about this one case. Has anyone else experienced problems with this game? Does Cowboy Kid rely on some obscure behaviour to render properly?
Are you mirroring the CHR-ROM correctly? Out of range bank values should be mirrored to the range of valid banks.
Yes, I believe so. Though in this case it wouldn't matter, since Cowboy Kid has 256 1K CHR-ROM banks so there is no way it could ask for a bank value out of range.
It's strange that no other games out of the hundreds I've tried exhibit similar behavior - it's just this one game, which is what makes it so maddening.
So um, what are the pattern tables and nametables during the time when everything is black?
After some investigation, I found that the game tries to write to the pattern tables, even though it has no CHR-RAM. I was allowing the writes, which caused the CHR-ROM bank to be corrupted. I found a couple of other games that do this as well:
- Baseball Stars 2
- Empire Strikes Back
- Fantasy Zone
- Shinobi
- Star Wars
- World Champ
- WWF Steel Cage Challenge
Allowing the write will cause graphics corruption or other issues.
Anyway, thanks for you help!
Did it look like it was intentionally writing or was it just poor code? Just curious why they would do that.
It could be poor code, or it could be copy protection to discourage use with devices primarily marketed for playing infringing copies of video games. In the case of Concentration Room, it's
admittedly poor code. Because I forgot to set the write direction bit ($2000 D2) when writing the palette during the first frame of gameplay, the top row of several tiles gets corrupted when it tries to write the palette. But for any other game, we won't likely be able to get a definitive answer one way or the other out of the developer. The best we can do is disassemble the code that performs these writes and interpret the evidence.
Milon's Secret Castle does this as well.