Page 1 of 1
Cowboy Kid - Black Tiles
Posted: Sun Sep 06, 2015 8:00 pm
by isosceles
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?
Re: Cowboy Kid - Black Tiles
Posted: Mon Sep 07, 2015 9:57 am
by Dwedit
Are you mirroring the CHR-ROM correctly? Out of range bank values should be mirrored to the range of valid banks.
Re: Cowboy Kid - Black Tiles
Posted: Mon Sep 07, 2015 10:59 am
by isosceles
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.
Re: Cowboy Kid - Black Tiles
Posted: Mon Sep 07, 2015 12:16 pm
by Dwedit
So um, what are the pattern tables and nametables during the time when everything is black?
Re: Cowboy Kid - Black Tiles
Posted: Mon Sep 07, 2015 5:58 pm
by isosceles
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!
Re: Cowboy Kid - Black Tiles
Posted: Tue Sep 08, 2015 10:39 am
by MottZilla
Did it look like it was intentionally writing or was it just poor code? Just curious why they would do that.
Re: Cowboy Kid - Black Tiles
Posted: Tue Sep 08, 2015 11:22 am
by tepples
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.
Re: Cowboy Kid - Black Tiles
Posted: Wed Sep 09, 2015 3:15 pm
by Grapeshot
Milon's Secret Castle does this as well.