It is currently Wed Nov 14, 2018 4:21 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: PPU Memory
PostPosted: Fri Sep 14, 2018 1:14 am 
Offline

Joined: Thu Sep 13, 2018 12:46 pm
Posts: 1
I am mildly infuriated Because I can't figure out how to:
1. How to change the palettes (mainly the background)
2. How to make graphics
And 3. How to adjust the nametables
if anybody could help me I appreciate it! :)

PS: I am trying to program in pure ASM because I don't know any languages. (I found the opcodes of all of the intructions)


Top
 Profile  
 
 Post subject: Re: PPU Memory
PostPosted: Fri Sep 14, 2018 4:23 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2329
Location: DIGDUG
Have you tried the Nerdy Nights Tutorial?
http://nintendoage.com/forum/messagevie ... eadid=7155
Sometimes it's good to start from working example code, rather than start from scratch.

The PPU can only be written to with rendering OFF (write zero to 2001)...or during v-blank.

To write to the PPU you must first set an address (2 writes to 2006), then write data to 2007.

When that is done. Set the scroll registers (2005 twice). And turn the screen on (1e to 2001).

The palette is PPU addresses 3f00-3f1f.

The main screen (nametable #0) is ppu addresses 2000-23ff.

The graphics can be made separately, and imported into the .nes file. With a tile editor.

There is a lot more to it...init code. ines header. learn 6502 asm. Which is why I recommend a tutorial.


As Einstein used to say. "Do not worry about your difficulties in Mathematics. I can assure you mine are still greater." I am currently reading through a 2000 line source code that I didn't write, trying to fix a bug that I don't understand (involving NES music). we all get frustrated.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: PPU Memory
PostPosted: Fri Sep 14, 2018 7:50 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1440
dougeff wrote:
To write to the PPU you must first set an address (2 writes to 2006), then write data to 2007.

When that is done. Set the scroll registers (2005 twice). And turn the screen on (1e to 2001).

Don't forget to set the "base" nametable too (lower 2 bits of $2000), otherwise the scroll registers won't necessarily work as expected.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group