glitchNES – Soft Circuit Bending on the NES Bent Festival 2009 Don Miller / NO CARRIER
Introduction <ul><li>About me </li></ul><ul><li>Introduction to NES graphics </li></ul><ul><ul><li>NES Background Informat...
<ul><li>The NES CPU core is based on the 6502 processor and runs at approximately 1.79 MHz (1.66 MHz in a PAL NES). </li><...
<ul><li>The PPU (Picture Processing Unit), more specifically known as Ricoh RP2C02 (NTSC version) / RP2C07 (PAL version), ...
 
<ul><li>The chip is known for its effective use of memory, using very little memory to store graphical data. </li></ul><ul...
<ul><li>Picture resolution of 256 × 240 pixels (fully visible on PAL, but cropped to 256 × 224 on most NTSC television set...
Picture resolution of 256 × 240 pixels <ul><li>The NES screen is made of 8x8 pixel background tiles. </li></ul><ul><li>Tha...
 
2KB external RAM for graphics information storage <ul><li>The NES has four nametables, arranged in a 2x2 pattern. </li></u...
2KB external RAM for graphics information storage <ul><li>Each byte in the nametable controls one 8x8 pixel character cell...
The Nametables <ul><li>Load up SMB and Xevious in Nintendulator to view horizontal and vertical nametables </li></ul>$2000...
Two 4kb tile sets with space for 256 tiles each <ul><li>Even the most basic NES game (think SMB or Balloon Fight) has 8kb ...
32 bytes for palette storage <ul><li>The NES palette storages used one byte for each color stored. </li></ul><ul><ul><li>1...
25 colors simultaneously <ul><li>The NES palette is 64 total colors. </li></ul><ul><li>From the 32 colors chosen for backg...
Early games <ul><li>Early games didn’t use a mapper, and only included a few chips on the main board: </li></ul>
glitchNES – Introduction <ul><li>Open source software for the NES </li></ul><ul><li>Produces graphical glitches similar to...
glitchNES – Inspiration  <ul><li>NES hardware problems </li></ul><ul><li>Game Genie </li></ul><ul><li>noteNdo </li></ul>
glitchNES – How it works <ul><li>Doing the right things at the wrong times: </li></ul><ul><ul><li>Writing while the screen...
glitchNES – What? Who? <ul><li>Messing around: </li></ul><ul><ul><li>Stable (yes, stable) code base for your NES projects ...
glitchNES – Make it  your own <ul><li>Editing the tiles: </li></ul><ul><ul><li>YY-CHR </li></ul></ul><ul><li>Editing the c...
glitchNES – Software and Hardware options <ul><li>NES development cartridge  </li></ul><ul><li>RetroUSB PowerPak </li></ul...
glitchNES – Development Cart <ul><li>Benefits: </li></ul><ul><ul><li>Easy to switch out PRG / CHR chips </li></ul></ul><ul...
glitchNES – PowerPak <ul><li>Benefits: </li></ul><ul><ul><li>Easy to change tile sets </li></ul></ul><ul><ul><li>Easy to m...
glitchNES – Emulation <ul><li>Benefits: </li></ul><ul><ul><li>Easy to change tile sets </li></ul></ul><ul><ul><li>Easy to ...
glitchNES – Software and Hardware options <ul><li>Let’s take a look… </li></ul>
glitchNES – What’s next <ul><li>New wiki on my homepage </li></ul><ul><li>Controller two usage for more effects </li></ul>...
glitchNES – What YOU can do <ul><li>Submit tile sets / graphics </li></ul><ul><li>Submit snippets of code </li></ul><ul><l...
glitchNES – What YOU can do <ul><li>Let’s edit some tiles and code… </li></ul>
Programs and Compilers <ul><li>Programs I like to use: </li></ul><ul><ul><li>YY-CHR (freeware tile editor) </li></ul></ul>...
More information <ul><li>NESDEV: </li></ul><ul><ul><li>Online: nesdev.parodius.com </li></ul></ul><ul><ul><li>IRC: #nesdev...
Upcoming SlideShare
Loading in …5
×

glitchNES - Bent Fest workshop

5,777 views

Published on

PPT presentation from my workshop on glitchNES at the 2009 Bent Festival @ The Tank, NYC.

glitchNES is an open source software project for the Nintendo Entertainment System. This software causes graphical glitches similar to hardware circuit-bending. The current version is 0.1 (initial release).

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,777
On SlideShare
0
From Embeds
0
Number of Embeds
183
Actions
Shares
0
Downloads
59
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

glitchNES - Bent Fest workshop

  1. 1. glitchNES – Soft Circuit Bending on the NES Bent Festival 2009 Don Miller / NO CARRIER
  2. 2. Introduction <ul><li>About me </li></ul><ul><li>Introduction to NES graphics </li></ul><ul><ul><li>NES Background Information </li></ul></ul><ul><ul><li>NES PPU (Picture Processing Unit)‏ </li></ul></ul><ul><li>glitchNES </li></ul><ul><ul><li>Lots of subtopics </li></ul></ul>
  3. 3. <ul><li>The NES CPU core is based on the 6502 processor and runs at approximately 1.79 MHz (1.66 MHz in a PAL NES). </li></ul><ul><li>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. </li></ul>
  4. 4. <ul><li>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. </li></ul>
  5. 6. <ul><li>The chip is known for its effective use of memory, using very little memory to store graphical data. </li></ul><ul><li>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. </li></ul>
  6. 7. <ul><li>Picture resolution of 256 × 240 pixels (fully visible on PAL, but cropped to 256 × 224 on most NTSC television sets)‏ </li></ul><ul><li>2KB external RAM for graphics information storage </li></ul><ul><li>Up to 64 sprites (movable objects) on screen simultaneously (only 8 visible per scan line)‏ </li></ul><ul><li>256 bytes for sprite data storage </li></ul><ul><li>8 × 8 or 8 × 16 (selectable) sized sprite tiles </li></ul><ul><li>Two 4KB tile sets with space for 256 tiles each </li></ul><ul><li>32 bytes for palette storage </li></ul><ul><li>25 colors simultaneously from a hardware color palette of 64 colors </li></ul>
  7. 8. Picture resolution of 256 × 240 pixels <ul><li>The NES screen is made of 8x8 pixel background tiles. </li></ul><ul><li>That means the NES screen is 32x30 tiles. </li></ul><ul><li>The magic number: 32 * 30 = 960. </li></ul>
  8. 10. 2KB external RAM for graphics information storage <ul><li>The NES has four nametables, arranged in a 2x2 pattern. </li></ul><ul><li>Each occupies a 1 KB chunk of PPU address space, starting at $2000 at the top left, $2400 at the top right, $2800 at the bottom left, and $2C00 at the bottom right. </li></ul>$2000 $2400 $2800 $2C00
  9. 11. 2KB external RAM for graphics information storage <ul><li>Each byte in the nametable controls one 8x8 pixel character cell. </li></ul><ul><li>Each nametable has 32 tiles across and 30 tiles down, for a total of 960 ($3C0) bytes. </li></ul><ul><li>The rest is used by each nametable's attribute table (960 + 64 = 1024, or 1KB)‏. </li></ul><ul><li>But the NES system board itself has only 2 KB of VRAM, enough for two nametables. </li></ul><ul><li>That means that two nametables are mirrored horizontally or vertically. </li></ul>
  10. 12. The Nametables <ul><li>Load up SMB and Xevious in Nintendulator to view horizontal and vertical nametables </li></ul>$2000 $2400 $2800 $2C00
  11. 13. Two 4kb tile sets with space for 256 tiles each <ul><li>Even the most basic NES game (think SMB or Balloon Fight) has 8kb for graphics data storage. </li></ul><ul><ul><li>4kb in one tile set, for background </li></ul></ul><ul><ul><li>4kb in another tile set, for the sprites </li></ul></ul><ul><li>Load up YY-CHR to show SMB / Balloon Fight </li></ul>
  12. 14. 32 bytes for palette storage <ul><li>The NES palette storages used one byte for each color stored. </li></ul><ul><ul><li>16 bytes for the background </li></ul></ul><ul><ul><li>16 bytes for the sprites </li></ul></ul><ul><li>Here is an example of the NES palette: </li></ul>
  13. 15. 25 colors simultaneously <ul><li>The NES palette is 64 total colors. </li></ul><ul><li>From the 32 colors chosen for background and sprites, only 25 can be shown simultaneously. </li></ul><ul><li>This is because the first color repeats every four colors, and is the transparent/background color. </li></ul><ul><li>Example: </li></ul><ul><ul><li>$0f , $30, $16, $29, $0f , $10, $39, $30 </li></ul></ul><ul><li>Load up Nintendulator to show 25 color limit </li></ul>
  14. 16. Early games <ul><li>Early games didn’t use a mapper, and only included a few chips on the main board: </li></ul>
  15. 17. glitchNES – Introduction <ul><li>Open source software for the NES </li></ul><ul><li>Produces graphical glitches similar to hardware circuit bending </li></ul>
  16. 18. glitchNES – Inspiration <ul><li>NES hardware problems </li></ul><ul><li>Game Genie </li></ul><ul><li>noteNdo </li></ul>
  17. 19. glitchNES – How it works <ul><li>Doing the right things at the wrong times: </li></ul><ul><ul><li>Writing while the screen is rendering </li></ul></ul><ul><li>Doing things faster than you should be: </li></ul><ul><ul><li>Scrolling and other basic techniques </li></ul></ul>
  18. 20. glitchNES – What? Who? <ul><li>Messing around: </li></ul><ul><ul><li>Stable (yes, stable) code base for your NES projects </li></ul></ul><ul><ul><li>Learning more about 6502 and/or the NES </li></ul></ul><ul><li>Live visuals: </li></ul><ul><ul><li>Dan Winckler, Enso, other visualists? </li></ul></ul>
  19. 21. glitchNES – Make it your own <ul><li>Editing the tiles: </li></ul><ul><ul><li>YY-CHR </li></ul></ul><ul><li>Editing the code: </li></ul><ul><ul><li>6502 ASM and included compiler: ASM6 by loopy </li></ul></ul>
  20. 22. glitchNES – Software and Hardware options <ul><li>NES development cartridge </li></ul><ul><li>RetroUSB PowerPak </li></ul><ul><li>Emulation </li></ul>
  21. 23. glitchNES – Development Cart <ul><li>Benefits: </li></ul><ul><ul><li>Easy to switch out PRG / CHR chips </li></ul></ul><ul><ul><li>Easy to do further hardware bending to supplement glitchNES effects </li></ul></ul><ul><ul><li>Fun / awesome / cool factors </li></ul></ul>
  22. 24. glitchNES – PowerPak <ul><li>Benefits: </li></ul><ul><ul><li>Easy to change tile sets </li></ul></ul><ul><ul><li>Easy to make multiple copies of the program with different effects </li></ul></ul><ul><li>Challenges: </li></ul><ul><ul><li>Looks different than dev cart and emulation </li></ul></ul>
  23. 25. glitchNES – Emulation <ul><li>Benefits: </li></ul><ul><ul><li>Easy to change tile sets </li></ul></ul><ul><ul><li>Easy to make multiple copies of the program with different effects </li></ul></ul><ul><li>Challenges: </li></ul><ul><ul><li>Different emulators provide different results </li></ul></ul>
  24. 26. glitchNES – Software and Hardware options <ul><li>Let’s take a look… </li></ul>
  25. 27. glitchNES – What’s next <ul><li>New wiki on my homepage </li></ul><ul><li>Controller two usage for more effects </li></ul><ul><ul><li>Looped visual effects </li></ul></ul><ul><li>PowerPad support for further interaction </li></ul><ul><ul><li>Good for live performance </li></ul></ul><ul><li>Sprites </li></ul><ul><ul><li>Another layer to play with </li></ul></ul><ul><li>“ Music” generated by button presses </li></ul><ul><ul><li>All four channels, maybe even samples </li></ul></ul>
  26. 28. glitchNES – What YOU can do <ul><li>Submit tile sets / graphics </li></ul><ul><li>Submit snippets of code </li></ul><ul><li>Submit pictures and videos </li></ul><ul><li>Ask questions </li></ul><ul><li>Make suggestions </li></ul><ul><li>Have fun </li></ul>
  27. 29. glitchNES – What YOU can do <ul><li>Let’s edit some tiles and code… </li></ul>
  28. 30. Programs and Compilers <ul><li>Programs I like to use: </li></ul><ul><ul><li>YY-CHR (freeware tile editor) </li></ul></ul><ul><ul><li>XVI32 (freeware hex editor) </li></ul></ul><ul><ul><li>Pin Eight nametable editor: name.exe </li></ul></ul><ul><ul><li>Loopy’s ASM6 compiler (for 6502 ASM language)‏ </li></ul></ul><ul><ul><li>Context (with 6502 ASM highlighter) </li></ul></ul><ul><ul><li>Nestopia and Nintendulator (accurate NES emulators) </li></ul></ul>
  29. 31. More information <ul><li>NESDEV: </li></ul><ul><ul><li>Online: nesdev.parodius.com </li></ul></ul><ul><ul><li>IRC: #nesdev on efnet </li></ul></ul><ul><ul><li>Wiki: nesdevwiki.org </li></ul></ul><ul><li>8bitcollective.com </li></ul><ul><ul><li>http://tinyurl.com/d6w47f </li></ul></ul><ul><li>Programming the 6502, by Rodney Zaks </li></ul><ul><li>6502.org </li></ul><ul><li>http://www.no-carrier.com </li></ul><ul><li>don@no-carrier.com (contact me)‏ </li></ul>

×