NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Sprite Priority Help  
Posted byBig Time
Posted on2/3/03 10:48 PM



The problem here is that your code is simply copying the vertical/horizontal name table select bits ($2000.0 & 2000.1) into your final vram address. This is the formula for a full 4-screen playfield implementation, but you won't get any mirroring out of it.

What you'd have to do is mask out one of the vertical/horizontal name table select bits in order to implement the desired mirroring scheme. For example, mask out the horizontal NT select bit for horizontal mirroring.

I would highly recommend that you implement a look-up table for the 4 possibly selectable name tables. Use the vertical/horizontal name table select value as a 2-bit index into it. The table will naturally contain your PPU's current name table mirroring configuration (i.e., (0,1,0,1) for vertical, (0,0,1,1) for horizontal, (0,1,2,3) for 4 screen, (0,0,0,0) for one screen, etc.).

The beauty of the mirroring lookup table is that it allows you to maintain as many name tables as you want, provided your game has hardware to do so. Games which use more than 4k of RAM for name tables (like for maintaining multiple status screens), would be a cinch to implement into your emulator. Of course, I think the only game that ever used an elaborate name table mapping scheme was Top Gun (all the others fall into well documented categories for NT mapping/mirroring).

- BT

-
Entire Thread
Subject  Posted byPosted On
*Sprite Priority Help  Rainsphere1/29/03 8:33 PM
.*Re: Sprite Priority Help  Big Time1/30/03 09:19 AM
..*Re: Sprite Priority Help  Rainsphere1/30/03 7:13 PM
...*Re: Sprite Priority Help  Big Time1/31/03 04:04 AM
....*Re: Sprite Priority Help  Rainsphere1/31/03 9:03 PM
.....*Re: Sprite Priority Help  Big Time2/1/03 2:04 PM
......*Re: Sprite Priority Help  Rainsphere2/3/03 5:34 PM
........Re: Sprite Priority Help  Big Time2/3/03 10:48 PM
........*Re: Sprite Priority Help  Rainsphere2/4/03 04:22 AM
.........*Re: Sprite Priority Help  Big Time2/4/03 4:12 PM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo