It is currently Sat Dec 16, 2017 9:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: PPU help
PostPosted: Sat Jun 25, 2016 5:41 am 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
Hello Nes developers , I need your help

I am studying electronics and digital systems design engineering , I heared about NES PPU and I want to implement it using ahardware description language

I have read many but till now there is nothing explaining the internal components of the ppu , all talking about pattern tables , name table , ...etc but I need to know more about the hardware and how it renders the graphics from the tables till reaching the TV with them , I am willing to make it compatible with the micro-processor we designed in the university.

I want to know more about the hardware of PPU to implement it using a HDL , I need not to know an overview.

thanks in advance.


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:50 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3969
I think you want this page: http://wiki.nesdev.com/w/index.php/PPU_rendering

Quick summary of rendering backgrounds:
Read byte from nametable
Read byte from attribute table
Read pattern table byte #1
Read pattern table byte #2
Then you have 8 pixels of background ready.

In order to have pixels ready by the time it starts drawing the image, it actually fetches the first 16 pixels of background before it starts drawing it out.
Fine X scroll is used to determine where in the buffer it draws background pixels from.

It uses the "V" address as counters for this process, then increments the vertical parts of "V", and sets the horizontal parts back to "T" address when it reaches the end of a scanline.

To actually make the colors, it uses square waves at different phases and different voltage levels, see http://wiki.nesdev.com/w/index.php/NTSC_video

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Last edited by Dwedit on Sat Jun 25, 2016 5:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:52 am 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
right , I want something like this but in much details , I want anything that explain PPU as harwdare from A to Z


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:59 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3969
I don't know the best way to actually implement hardware in an HDL, but if you can get the repeated 4 reads working, and have it spit out pixels, that's a good start.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 6:02 am 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
Can you explain what do you mean by " the repeated 4 reads working, and have it spit out pixels," ? I didn't get it sorry .


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 6:22 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2983
Location: Tampere, Finland
This doc is closest to "hardware level" description that I know of: http://nesdev.com/2C02%20technical%20reference.TXT. It's over 10 years old, so it may contain some mistakes.

Most other docs are written from a behavioral point of view. They have all the information you would need for a hardware implementation, but it's your job to make sense of them and translate accordingly.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 6:24 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19353
Location: NE Indiana, USA (NTSC)
Over the course of a scanline, the PPU reads bytes from video memory and uses the data to generate a background picture. This means "the repeated 4 reads working" refers to the "Quick summary of rendering backgrounds" that Dwedit mentioned.

Read byte from nametable
Read byte from attribute table
Read pattern table byte #1
Read pattern table byte #2

The wiki page "PPU rendering" describes in which order the PPU reads bytes of data from video memory, and for what purpose each byte of data read from video memory is used. If you reproduce these, you can make a PPU subset that renders a background.

"and have it spit out pixels" refers to a set of latches and shift registers that the PPU uses to decode the planar pixels (which means pixels separated into bit planes) into.

Have you ever developed a program for the NES? Or are you only trying to emulate existing ROMs?

I noticed from the way you left spaces around commas and quotation marks that English may not be your first language.


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 6:44 am 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
tepples wrote:
Over the course of a scanline, the PPU reads bytes from video memory and uses the data to generate a background picture. This means "the repeated 4 reads working" refers to the "Quick summary of rendering backgrounds" that Dwedit mentioned.

Read byte from nametable
Read byte from attribute table
Read pattern table byte #1
Read pattern table byte #2

The wiki page "PPU rendering" describes in which order the PPU reads bytes of data from video memory, and for what purpose each byte of data read from video memory is used. If you reproduce these, you can make a PPU subset that renders a background.

"and have it spit out pixels" refers to a set of latches and shift registers that the PPU uses to decode the planar pixels (which means pixels separated into bit planes) into.

Have you ever developed a program for the NES? Or are you only trying to emulate existing ROMs?

I noticed from the way you left spaces around commas and quotation marks that English may not be your first language.



You are right , English is not my 1st language
I am not trying to develop NES program or emulate a ROM , I am trying to implement NES graphic card from hardware point of view to apply what I have learned about micro-processor design in a simple graphic card such as PPU.


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 6:55 am 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
thefox wrote:
This doc is closest to "hardware level" description that I know of: http://nesdev.com/2C02%20technical%20reference.TXT. It's over 10 years old, so it may contain some mistakes.

Most other docs are written from a behavioral point of view. They have all the information you would need for a hardware implementation, but it's your job to make sense of them and translate accordingly.


Can you put links to the other docs you are talking about ? may them help me.

I have no problem no with the behavioral point of view , my problem is that there are many things are uncovered and others seem ambiguous to me


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 7:01 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2983
Location: Tampere, Finland
I was mainly referring to the NESDev Wiki (which was linked earlier).

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 1:32 pm 
Offline
User avatar

Joined: Tue Jul 03, 2007 1:49 pm
Posts: 969
Muhammad_R4 wrote:
thefox wrote:
This doc is closest to "hardware level" description that I know of: http://nesdev.com/2C02%20technical%20reference.TXT. It's over 10 years old, so it may contain some mistakes.

Most other docs are written from a behavioral point of view. They have all the information you would need for a hardware implementation, but it's your job to make sense of them and translate accordingly.


Can you put links to the other docs you are talking about ? may them help me.

I have no problem no with the behavioral point of view , my problem is that there are many things are uncovered and others seem ambiguous to me


Not to sound too antagonizing, but other's have made FPGA implementations with LESS info available than on the wiki. Imo it's about as detailed as you can get.

Can you perhaps give an example of a document that would be close to the level of information you expect? (say a different CPU)


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 2:03 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3969
So, um, what specific questions do you have?

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:04 pm 
Offline

Joined: Sat Jun 25, 2016 5:33 am
Posts: 66
I think of it as follows :

when we designed our micro-processor , we had a RTL schematic showing all registers , memories , hardware signals and everything hardware related to the processor

I tried to do the same but I failed , that's why I am asking for a document explaining all this


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:10 pm 
Offline
User avatar

Joined: Tue Jul 03, 2007 1:49 pm
Posts: 969
That's because that plain does not exist for the NES ppu. All implementations other people have done were made by implementing the logic themselves based on what they knew the registers etc should do.

edit: To clarify, that means the "RTL schematic". Obviously the wiki has info on registers etc. Even some on timing (but not bus timing)


Top
 Profile  
 
 Post subject: Re: PPU help
PostPosted: Sat Jun 25, 2016 5:26 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
We don't have an RTL schematic of the PPU - the best we have is a transistor-level schematic (in the form of the Visual 2C02), and it isn't so much a schematic as it is a netlist.

_________________
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  [ 15 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 7 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