How did f-1 Race work?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
zeroone
Posts: 929
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: How did f-1 Race work?

Post by zeroone » Fri Apr 28, 2017 2:05 pm

thefox wrote:allocates the tiles dynamically (i.e., only the tiles that have non-empty CHR data will have non-zero nametable entries), and uses palette switching to get double buffering.
I don't understand. :/

tepples
Posts: 21710
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How did f-1 Race work?

Post by tepples » Fri Apr 28, 2017 2:27 pm

Palette switching means that in even frames, bitplane 0 (consisting of bytes $00-$07 of each tile) gets displayed while bitplane 1 (consisting of bytes $08-$0F of each tile) gets filled, and vice versa in odd frames. To display only bitplane 0, set the palette to black, white, black, white, so that bitplane 1 is ignored. To display only bitplane 1, set the palette to black, black, white, white, so that bitplane 0 is ignored.

Dynamic allocation means it stores a partial nametable in main RAM, filled with solid black tiles. When trying to draw pixels into a tile whose current tile number is the solid black tile, it allocates a new tile number for that tile. When trying to draw pixels into a tile that is not the solid black tile, it uses the same tile number that was already there.

Post Reply