Jump to content
IGNORED

NES Hardware Question(s)


m308gunner

Recommended Posts

  I'm putting together a self-help guide to NES programming (kind of an "Idiot's Guide" format) and I wanted to touch on the individual components on the NES' motherboard. My problem is that I'm having a hard time finding descriptions of what each chip does. The CPU, yeah, fine, Central Processing Unit. Main brain. PPU? Picture Processing Unit. Makes pretty pictures. Decoder/Demultiplexer?... Generic Logic Chip?!... Hex Bus Buffers?!?!?!?... The hell?!?

  So is there a good source for more... pedestrian descriptions for what this stuff is/does? I'm not planning on going into excruciating detail, but I thought it would be good to include as some background information.

Thanks!

Link to comment
Share on other sites

I'd assume you're familiar with the Nesdev Wiki? There really is no better resource.

A lot of it comes across very confusing when you aren't really into the tech behind it, but once you start understanding it, you'll see that it's kind of impossible to explain the details in any better way.

That said, in the context of NES programming, the only hardware you really need to be familiar with, is the CPU (obviously), the PPU, the APU, and the controller interface. I'm not sure what a hex bus buffer is either.

The APU is probably the most confusing part, especially if you aren't familiar with computer music as it is, but it's also the part that's most easily ignored in the context of creating a basic game (and lots of plug-and-play sound engines are available).

The PPU meanwhile is the bread and butter of the NES, and pretty much what defines what it can and can't do. In the eyes of the public, the NES PPU is what most people think of when they hear the term "8 bit". It should be the primary focus of any NES programmer.

  • Thanks 1
Link to comment
Share on other sites

 

On 12/3/2019 at 7:59 PM, m308gunner said:

Generic Logic Chip

Logic chips will have inputs and outputs. In most cases it will compare two inputs, and based on a set of rules (called truth tables) will output a specific value. These will include the AND operation with AND gates, the XOR operation, the NOT operation with hex inverters, and the list goes on, (NOR, XNOR, OR, etc) They are vital in designing a computer and are what you will find are used for simple mappers like UNROM and CNROM for bankswitching. You should google 'Logic Gates' and this will become clear what these chips do.

 

On 12/3/2019 at 7:59 PM, m308gunner said:

Hex Bus Buffers

A Hex buffer is basically a logic gate that takes a signal from another source and makes sure the peaks are at the full 5v signal height they are supposed to be. It takes in a 1 and spits out a 1. It takes in a 0 and spits out a 0. Its only job it to ensure the signal is not degraded. Since when running through resistors and diodes the voltage can drop slightly.  In analog electronics it is like running a signal through the positive input of an OPAMP with the output connected to the inverting input. 


The rest of the chips are in a similar vein. They perform a specific function with voltages and signal you give it. Look up the part number and find a datasheet. The top page will have a description of their function and there will be pinouts, and example application schematics you can look at. 


However ultimately, If your focus is programming, you might gloss over hardware that are not directly related to programming. Especially if this is meant for beginners. It will conflate the learning process and you mentioning a logic gate or buffer will make the reader think that is info they will need in order to code. 

Edited by TylerBarnes
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Late to the party, but..

"hex" in the hex buffer just means there are 6 individual buffers in one chip.  Like 74HC00 is called a "quad NAND", means there's 4 NAND gates in one chip.

U3: 74LS139 - demultiplexer - takes small number of NES CPU address lines, and outputs individual enable signals for different chips. This is how the NES RAM, PPU registers, and cart area are mapped into CPU address space.  Could also call it a binary decoder.  Like a 3:8 decoder for example, as we know 3 bits can represent 8 values.  The 3 bits are encoded in binary, and the 8 outputs pins are active one at a time for each value.

U2: 74LS373 - PPU address latch.  Allows the PPU chip package to have less pins.  Without this, the PPU wouldn't fit in a DIP-40 package, it would have needed 7 more pins to support the same size memory.

U7,U8: 74HC368 - inverting buffer / line driver.  As a buffer, protects the NES CPU inputs from being directly connected to the outside world.

U9: 74HCU04 - unbuffered inverter.  I don't fully understand the physics behind this part.  Seems to be usable as an amplifier.  The six buffers in there are used individually for a lot of things, the NES audio goes through one, it makes an oscillator with the 4mhz crystal for the lockout chip, it inverts a PPU A13 for use as a nametable memory enable, the rest of them relate to the lockout chip clock and reset.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...