Top Banner
Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director
16

Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Jan 01, 2016

Download

Documents

Jonas Matthews
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Introduction to NES graphics

Don Miller / NO CARRIERPlayPower.org

Platform Education Director

Page 2: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Introduction

The $10 Computer & NES Introduction to NES graphics

› NES Background Information› NES PPU (Picture Processing Unit)

Page 3: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

The $10 Computer & NES

• The PlayPower $10 Computer is a clone of the popular 8-bit Nintendo NES.

• There are some differences, but they run the same software.

Page 4: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

The NES CPU core is based on the 6502 processor and runs at approximately 1.79 MHz (1.66 MHz in a PAL NES).

In the NTSC NES, the RP2A03 chip contains the CPU and APU; in the PAL NES, the CPU and APU are contained within the RP2A07 chip.

Page 5: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

The PPU (Picture Processing Unit), more specifically known as Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), is the microprocessor in the NES responsible for generating video signals from graphic data stored in memory.

Page 6: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.
Page 7: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

The chip is known for its effective use of memory, using very little memory to store graphical data.

It was rather advanced for its time when the Famicom (Japanese version of the NES) was released, sporting full sprite support, movable backgrounds, and many colors on screen at the same time.

Page 8: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Picture resolution of 256 × 240 pixels (fully visible on PAL, but cropped to 256 × 224 on most NTSC television sets)

2KB external RAM for graphics information storage Up to 64 sprites (movable objects) on screen

simultaneously (only 8 visible per scan line) 256 bytes for sprite data storage 8 × 8 or 8 × 16 (selectable) sized sprite tiles Two 4KB tile sets with space for 256 tiles each 32 bytes for palette storage 25 colors simultaneously from a hardware color

palette of 64 colors

Page 9: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Picture resolution of 256 × 240 pixels

The NES screen is made of 8x8 pixel background tiles.

That means the NES screen is 32x30 tiles.

The magic number: 32 * 30 = 960.

Page 10: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.
Page 11: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Two 4kb tile sets with space for 256 tiles each

Even the most basic NES game (think SMB or Balloon Fight) has 8kb for graphics data storage. 4kb in one tile set, for background 4kb in another tile set, for the sprites

Load up YY-CHR to show SMB

Page 12: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

32 bytes for palette storage

The NES palette storages used one byte for each color stored. 16 bytes for the background 16 bytes for the sprites

Here is an example of the NES palette:

Page 13: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

25 colors simultaneously

The NES palette is 64 total colors. From the 32 colors chosen for background

and sprites, only 25 can be shown simultaneously.

This is because the first color repeats every four colors, and is the transparent/background color.

Example: $0f, $30, $16, $29, $0f, $10, $39, $30

Load up Nintendulator to show 25 color limit

Page 14: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Early games

Early games didn’t use a mapper, and only included a few chips on the main board:

Page 15: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Programs and Compilers

Programs I like to use:› YY-CHR (freeware tile editor)› XVI32 (freeware hex editor)› Pin Eight nametable editor: name.exe› Loopy's ASM6 compiler (for 6502 ASM

language)› Context (with 6502 ASM highlighter)› Nestopia and Nintendulator (accurate NES

emulators)

Page 16: Introduction to NES graphics Don Miller / NO CARRIER PlayPower.org Platform Education Director.

Programs and Compilers

Programs I like to use:› YY-CHR (freeware tile editor)› XVI32 (freeware hex editor)› Pin Eight nametable editor: name.exe› Loopy's ASM6 compiler (for 6502 ASM

language)› Context (with 6502 ASM highlighter)› Nestopia and Nintendulator (accurate NES

emulators)