Mapper 0 Games that use 8x16 sprites?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Mapper 0 Games that use 8x16 sprites?
by on (#65256)
I'm trying to test out some games that use 8x16 sprites, but I don't have any mappers (or scrolling) implemented yet. Quite a few other games seem to be working normally (Balloon Fight, Mario Bros. original, Donkey Kong, and a few others), but none of them use 8x16 sprites from what I can tell. Any suggestions?

by on (#65257)
There probably are mapper 0 games that use 8x16 sprites, but without scrolling? That makes it much harder I think.

by on (#65258)
tokumaru wrote:
There probably are mapper 0 games that use 8x16 sprites, but without scrolling? That makes it much harder I think.


Well, if it's time for me to implement scrolling, then I'll just do that instead of concentrating on the 8x16 issue.

The real issue is that I"m still a little fuzzy on how 8x16 sprites are accessed. If there is bit to indicate whether or not the tile is located at $0000 or $1000, why do reference documents say that one tile is always at $0000 and it's associated lower tile is always at $1000? If that's always true, what's the purpose of the bit?

by on (#65260)
I'm not 100% sure, but Galaga appears to use 8x16 sprites.

EDIT: I just confirmed it, it does. And apparently it doesn't use scrolling (the scrolling stars are sprites).

by on (#65261)
Devil World uses 8x16 sprites, but that game uses scrolling.
So does Ice Climber, Galaga, Dig Dug, Lode Runner, and probably a bunch of others.

by on (#65262)
tineras wrote:
If there is bit to indicate whether or not the tile is located at $0000 or $1000, why do reference documents say that one tile is always at $0000 and it's associated lower tile is always at $1000? If that's always true, what's the purpose of the bit?

The PPU bit that selects which pattern table to use for sprites (bit 3 of $2000) becomes useless in 8x16 mode, it doesn't do anything.

Instead of using that bit, the PPU allows games to mix sprites from both pattern tables, with bit 0 of the second OAM byte selecting the pattern table and the top 7 bits selecting which pair of tiles in that pattern table.

by on (#65263)
tokumaru wrote:
I'm not 100% sure, but Galaga appears to use 8x16 sprites.


Well, as you have already learned :wink: , answers only bring more questions. Some games switch nametables during the game (like going from a menu to the gameplay). How do you know which nametable to use? I have been checking bits 1-0 of 0x2000, but that doesn't seem to work properly.

For instance, when Galaga starts, it is using $2800 and is mirrored at $2C00, but when the game begins, it changes to $2000 and is mirrored at $2400. How do you know which one is being used?

EDIT: This is what I've been doing, which is obviously wrong:

nameTable = 0x2000 + ((memory.memCPU[0x2000] & 0x03) * 0x0400);

by on (#65264)
tokumaru wrote:
tineras wrote:
If there is bit to indicate whether or not the tile is located at $0000 or $1000, why do reference documents say that one tile is always at $0000 and it's associated lower tile is always at $1000? If that's always true, what's the purpose of the bit?

...with bit 0 of the second OAM byte selecting the pattern table and the top 7 bits selecting which pair of tiles in that pattern table.


Is that only for the lower tile?

by on (#65266)
No, I said how to find the pair, i.e. the top tile. The bottom tile is the one immediately following it.

by on (#65267)
tokumaru wrote:
No, I said how to find the pair, i.e. the top tile. The bottom tile is the one immediately following it.


So if the top tile was number 20 in the OAM (out of 64), then the bottom tile would be 21? And its address would likely point to the same address in the pattern table with the offset of $1000?

by on (#65269)
In 8x16 pixel mode:

OAM tile number $14 -> $0140 and $0150
OAM tile number $15 -> $1140 and $1150
OAM tile number $16 -> $0160 and $0170
OAM tile number $17 -> $1160 and $1170

It's convenient that the base of the hexadecimal number system commonly used for VRAM addresses is the same as the length of one tile in bytes.

Lode Runner has an "edit mode" with 8x16 pixel sprites and no scrolling. It was the first 8x16 game I ever encountered.

by on (#65274)
tepples wrote:
In 8x16 pixel mode:

OAM tile number $14 -> $0140 and $0150
OAM tile number $15 -> $1140 and $1150
OAM tile number $16 -> $0160 and $0170
OAM tile number $17 -> $1160 and $1170

It's convenient that the base of the hexadecimal number system commonly used for VRAM addresses is the same as the length of one tile in bytes.

Lode Runner has an "edit mode" with 8x16 pixel sprites and no scrolling. It was the first 8x16 game I ever encountered.


I see. I'll have to monkey with my code a little bit, but that makes more sense to me now. This seems to be one of those topics that are just glazed over in the documentation. I guess I just expected it to be more complicated. Thanks!!

by on (#65281)
tineras wrote:
This seems to be one of those topics that are just glazed over in the documentation.

Feel free to report anything that looks unclear or missing from the wiki, but I thought this was already explained.