Presentations
Presentations
View On GitHub
–
NES
Nintendo
Entertainment
System
GAME CONSOLE
62 millions sold
about 50 clones
various plugins
midi
floppy disk
modem
OVERVIEW
cpu
memory
graphics
sound
controllers
PART 1
CPU
memory
graphics
sound
controllers
RICOH 2A03/2A07
ricoh 2a03 cpu
2a03 - ntsc
2a07 - pal
1,66 MHz PAL
1,79 MHz NTSC
–
RICOH 2A03/2A07
based on mos 6502
2a03 vs mos 6502
bcd mode
timer
dma
sound system
PART 2
cpu
MEMORY
graphics
sound
controllers
–
MEMORY
two memory chips
program+data
graphics data
no built-in rom
eprom on cartridge
–
MEMORY
2KB RAM
256B OAM
sprites
28B RAM pal.
–
PART 3
cpu
memory
GRAPHICS
sound
controllers
–
GRAPHICS
generated by PPU
256 X 240 pixels
RP2C02/RP2C07
a bit complicated
multiple tables
–
GRAPHICS
256B sprite RAM
2KB backgr. RAM
ROM on cartridge
64 color system palette
–
GRAPHICS
design strategy
as few CPU cycles
as possible
–
BACKGROUND #1
256 X 240 pixels
not bitmap
tiles 8 X 8
groups 4 X 4
4 palettes
4 colors each
3 unique/1 shared
–
BACKGROUND #2
PATTERN TABLE
in ROM
tiles 8 X 8
2 bpp
–
BACKGROUND #2B
PATTERN TABLE size 16 bytes per tile
256 tiles = 4096 bytes
–
BACKGROUND #3
ATTRIBUTE TABLE
64 (60) bytes
upper 2 bits
for 4 X 4 tiles -> 32 X 32 pixels
–
BACKGROUND #3B
why?
tiles 2bpp -> palette #
attrib. 2bpp -> color from palette –
BACKGROUND #4
NAME TABLE
in RAM
grid 32 X 30
offsets
960 bytes
can be manipulated quickly
–
BACKGROUND #5
PPU rendering:
read tile # from NAME TABLE
read palette # from ATTRIB.T.
read pixel colors from PATTERN TABLE
–
BACKGROUND #5B
without CPU intervention
–
SPRITES #1
PATTERN TABLE
in ROM
tiles 8 X 8
2 bpp
SPRITE RAM
256 bytes
–
SPRITES #3
SPRITE RAM
64 sprites
4 bytes/sprite
tile #
x-position
y-position
attributes
–
SPRITES #4
attribues
palette 4-7
priority
horizontal flip
vertical flip
–
TOTAL COLORS
background
sprites
sum
–
TOTAL COLORS
background
main bg.color
4 palettes
each 3 colors
13 in overall
–
TOTAL COLORS
sprites
4 palettes
each 3 colors
12 in overall
–
TOTAL COLORS
summary
25 colors on screen w/o any tricks
–
PART 4
cpu
memory
graphics
SOUND
controllers
–
SOUND
generated by cpu
2A03/2A07
–
2A03 SOUND SYSTEM
5 channels
2 square waves
1 triangle wave
1 noise generator
1 d/a converter
22 control regs
–
2A03 SQUARE WAVES
54.6 hz-12,4 khz
4 bit amplitude
variable duty
1:8
1:4
1:2
3:4
–
2A03 TRIANGLE WAVE
27.3 hz - 55.9 khz
4 bit amplitude
automatic control
–
2A03 NOISE GENERATOR
15 bit lfsr
29.3 hz - 447 khz
two modes
long
32767 bit cycle
short
93 bit cycle
2A03 D/A CONVERTER
dmc
delta modulation
7 bit
4.2 khz - 33.5 khz
semi automatic dma
non-linear d/a
–
PART 5
cpu
memory
graphics
sound
CONTROLLERS
–
CONTROLLERS
two controllers
d-pad
four buttons
A
B
START
SELECT
–
CONTROLLERS
theoretically
8 pins
similar to atari, c64, …
actually
serial io
latch
shift register
–
CONTROLLERS
latch values
read from shift register
8X lda
LDA + AND + BEQ
–
EXAMPLES
–
THANK YOU