1 ; 2 ; NES I/O definitions 3 ; Copyright 2010 Damian Yerrick 4 ; 5 ; Copying and distribution of this file, with or without 6 ; modification, are permitted in any medium without royalty provided 7 ; the copyright notice and this notice are preserved in all source 8 ; code copies. This file is offered as-is, without any warranty. 9 ; 10 11 PPUCTRL = $2000 12 NT_2000 = $00 13 NT_2400 = $01 14 NT_2800 = $02 15 NT_2C00 = $03 16 VRAM_DOWN = $04 17 OBJ_0000 = $00 18 OBJ_1000 = $08 19 OBJ_8X16 = $20 20 BG_0000 = $00 21 BG_1000 = $10 22 VBLANK_NMI = $80 23 24 PPUMASK = $2001 25 LIGHTGRAY = $01 26 BG_OFF = $00 27 BG_CLIP = $08 28 BG_ON = $0A 29 OBJ_OFF = $00 30 OBJ_CLIP = $10 31 OBJ_ON = $14 32 TINT_R = $20 33 TINT_G = $40 34 TINT_B = $80 35 36 PPUSTATUS = $2002 37 OAMADDR = $2003 38 ; Don't worry about $2004; let OAM_DMA do the work for you. 39 PPUSCROLL = $2005 40 PPUADDR = $2006 41 PPUDATA = $2007 42 43 OAM_DMA = $4014 44 SNDCHN = $4015 45 P1 = $4016 46 P2 = $4017 47 48 KEY_A = %10000000 49 KEY_B = %01000000 50 KEY_SELECT = %00100000 51 KEY_START = %00010000 52 KEY_UP = %00001000 53 KEY_DOWN = %00000100 54 KEY_LEFT = %00000010 55 KEY_RIGHT = %00000001 56