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

Previous ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Background/Tiles & Sprites Movement  
Posted byIndy
Posted on1/4/02 01:02 AM
From IP62.40.201.139  



First I recommend you to red the NesTech.txt (you can get it here: http://nesdev.parodius.com/ndox200.zip).

Background Tiles are defined in the nametable (the nametables are located in the VRAM from $2000 to $3000). The NES has 2 (independend) nametables - altough it has adressing space for 4 (so the 2 nametables are mirrored to the other 2 which makes 4). You specify the current nametable with the PPU control register 1 (which is in NES Memory @ memory location $2000). Then you have to write to this nametable (the numbers of your tiles) where one Byte in the nametable represents 1 tile. You can write to the VRAM with the help of 2 other registers:
The first register is the PPU Adressing register aka $2006. The first byte written to this register specifies the high part, the second byte the low part of a 16-bit adress (in the VRAM). You can now write to this adress in VRAM with register $2007 (write a value to $2007 and this one will be written to the VRAM location specified by the 16-bit adress). After each write to $2007 the adress is incremented (depending on $2000 content -> look in the nestech.txt) with 1 or 32.

Sprite RAM is accessed via 2 other registers - it works the same way as above - only that adresses are only 1 byte in size so you have to write only once to the adress register (you can look up the register in nestech.txt -):)). The format of the data in Sprite RAM is also descriped there.

I hope this helps a bit. Just read the document and you'll see that what i wrote will make sense -):D
If you still have questions - just ask

regards Martin



-
Entire Thread
Subject  Posted byPosted On
*Background/Tiles & Sprites Movement  Anonymous1/3/02 2:55 PM
..Re: Background/Tiles & Sprites Movement  Indy1/4/02 01:02 AM
..*Re: Background/Tiles & Sprites Movement  mcmartin1/4/02 08:55 AM
...*Re: Background/Tiles & Sprites Movement  Anonymous1/5/02 2:02 PM
....*Re: Background/Tiles & Sprites Movement  mcmartin1/7/02 00:17 AM
....*Re: Background/Tiles & Sprites Movement  Indy1/5/02 3:57 PM
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo