Jeroen,
EDIT:
I updated the code. The first version of the code I put up had a glitch in the scrolling (sorry
Also updated the rom on the download link so the title screen works properly.
Here is the code. I apologize up front if its a little convoluted. I'm trying to keep things as clean as possible but again, beginner here
To give a run down of how it works, it loads the title screen in, and when you hit start (enter) it goes to the playfield. At this point the palette SHOULD change. The bricks should be orange instead of red and the and background should be grey instead of blue. Here is the full code. The CHR to compile it and the compiled rom are available via download links at the bottom of the screen.
Code:
.inesprg 1 ; 1x 16KB PRG code
.ineschr 1 ; 1x 8KB CHR data
.inesmap 0 ; mapper 0 = NROM, no bank swapping
.inesmir 1 ; background mirroring
;;;;;;;;;;;;;;;
;; DECLARE SOME VARIABLES HERE
.rsset $0000 ;;start variables at ram location 0
gamestate .rs 1 ; .rs 1 means reserve one byte of space
ballx .rs 1 ; ball horizontal position
bally .rs 1 ; ball vertical position
ballup .rs 1 ; 1 = ball moving up
balldown .rs 1 ; 1 = ball moving down
ballleft .rs 1 ; 1 = ball moving left
ballright .rs 1 ; 1 = ball moving right
ballspeedx .rs 1 ; ball horizontal speed per frame
ballspeedy .rs 1 ; ball vertical speed per frame
paddle1ytop .rs 1 ; player 1 paddle top vertical position
paddle2ybot .rs 1 ; player 2 paddle bottom vertical position
buttons1 .rs 1 ; player 1 gamepad buttons, one bit per button
buttons2 .rs 1 ; player 2 gamepad buttons, one bit per button
score1 .rs 1 ; player 1 score, 0-15
score2 .rs 1 ; player 2 score, 0-15
pointer .rs 1 ; background 1 pointer
pointer2 .rs 1
sleeping .rs 1
scroll .rs 1 ; Scroll Counter for background scrolling
nametable .rs 1
;; DECLARE SOME CONSTANTS HERE
STATETITLE = $00 ; displaying title screen
STATEPLAYING = $01 ; move paddles/ball, check for collisions
STATEGAMEOVER = $02 ; displaying game over screen
RIGHTWALL = $F4 ; when ball reaches one of these, do something
TOPWALL = $C
TOPWALLSPRITE2 = $14
TOPWALLSPRITE3 = $1C
TOPWALLSPRITE4 = $24
BOTTOMWALL = $D8
BOTTOMWALLSPRITE2 = $D0
BOTTOMWALLSPRITE3 = $C8
BOTTOMWALLSPRITE4 = $C0
LEFTWALL = $04
PADDLE1X = $20 ; horizontal position for paddles, doesnt move
PADDLE2X = $E0
;;;;;;;;;;;;;;;;;;
.bank 0
.org $C000
RESET:
SEI ; disable IRQs
CLD ; disable decimal mode
LDX #$40
STX $4017 ; disable APU frame IRQ
LDX #$FF
TXS ; Set up stack
INX ; now X = 0
STX $2000 ; disable NMI
STX $2001 ; disable rendering
STX $4010 ; disable DMC IRQs
vblankwait1: ; First wait for vblank to make sure PPU is ready
BIT $2002
BPL vblankwait1
clrmem:
LDA #$00
STA $0000, x
STA $0100, x
STA $0300, x
STA $0400, x
STA $0500, x
STA $0600, x
STA $0700, x
LDA #$FE
STA $0200, x
INX
BNE clrmem
vblankwait2: ; Second wait for vblank, PPU is ready after this
BIT $2002
BPL vblankwait2
LoadPalettes:
LDA $2002 ; read PPU status to reset the high/low latch
LDA #$3F
STA $2006 ; write the high byte of $3F00 address
LDA #$00
STA $2006 ; write the low byte of $3F00 address
LDX #$00 ; start out at 0
LoadPalettesLoop:
LDA palette, x ; load data from address (palette + the value in x)
; 1st time through loop it will load palette+0
; 2nd time through loop it will load palette+1
; 3rd time through loop it will load palette+2
; etc
STA $2007 ; write to PPU
INX ; X = X + 1
CPX #$20 ; Compare X to hex $20, decimal 32 - copying 16 bytes = 4 sprites
BNE LoadPalettesLoop ; Branch to LoadPalettesLoop if compare was Not Equal to zero
; if compare was equal to 32, keep going down
;; Load Background Title
LoadBackground:
LDA $2002 ; read PPU status to reset the high/low latch
LDA #$20
STA $2006 ; write the high byte of $2000 address
LDA #$00
STA $2006 ; write the low byte of $2000 address
LDA #$00
STA pointer ; put the low byte of the address of background into pointer --- This equals 00?
LDA #HIGH(background) ;What does the #HIGH signify? Its not a constant. Is this pulling the tile number from the nametable below?
STA pointer+1 ; put the high byte of the address into pointer. Do we now have $2400?
LDX #$00 ; start at pointer + 0
LDY #$00
OutsideLoop:
InsideLoop:
LDA [pointer], y ; copy one background byte from address in pointer plus Y
STA $2007 ; this runs 256 * 8 times
INY ; inside loop counter
CPY #$00
BNE InsideLoop ; run the inside loop 256 times before continuing down
INC pointer+1 ; low byte went 0 to 256, so high byte needs to be changed now
INX
CPX #$08
BNE OutsideLoop ; run the outside loop 256 times before continuing down
;;:Set starting game state
LDA #STATETITLE
STA gamestate
;Initialize sleeping variable
LDA #$00
STA sleeping
;Enable NMI
LDA #%10010000 ; enable NMI, sprites from Pattern Table 0, background from Pattern Table 1
STA $2000
LDA #%00011110 ; enable sprites, enable background, no clipping on left side
STA $2001
;;Scroll Title Screen In
Forever:
;JMP Forever ;jump back to Forever, infinite loop, waiting for NMI
LDA sleeping
BEQ Forever
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Load In Title Screen
;;Start Scrolling For Title Screen
;;Check if Scrolling is done for title screen
LDA gamestate
CMP #$01
BEQ TitleScrollFinished
LDA scroll
CMP #$FF
BEQ TitleScrollFinished
INC scroll ; add one to our scroll variable each frame
NTSwapCheck:
LDA scroll ; check if the scroll just wrapped from 255 to 0
BNE NTSwapCheckDone
NTSwap:
LDA nametable ; load current nametable number (0 or 1)
EOR #$01 ; exclusive OR of bit 0 will flip that bit
STA nametable ; so if nametable was 0, now 1
; if nametable was 1, now 0
NTSwapCheckDone:
;;Clean Up PPU address registers
LDA #$00
STA $2006
STA $2006
;;Increment Scroll Counter For Title Screen
LDA scroll
STA $2005 ; write the horizontal scroll count register
LDA #$00 ; no vertical scrolling
STA $2005
TitleScrollFinished:
GameLogic:
JSR ReadController1 ;get the current button data for player 1
JSR ReadController2 ;;get the current button data for player 2
GameEngine:
LDA gamestate
CMP #STATETITLE
BNE DontJumpTitle ;;game is displaying title screen
JMP EngineTitle
DontJumpTitle:
LDA gamestate
CMP #STATEGAMEOVER
BNE DontJumpGameOver ;;game is displaying ending screen
JMP EngineGameOver
DontJumpGameOver:
LDA gamestate
CMP #STATEPLAYING
BNE DontJumpStatePlaying ;;game is playing
JMP EnginePlaying
DontJumpStatePlaying:
GameEngineDone:
JSR UpdateSprites ;;set ball/paddle sprites from positions
LDA #$00
STA sleeping
JMP Forever
NMI:
LDA $2002
;;Sprite DMA
LDA #$00
STA $2003 ; set the low byte (00) of the RAM address
LDA #$02
STA $4014 ; set the high byte (02) of the RAM address, start the transfer
;Run Other Game Graphics Code Here
JSR DrawScore
;;This is the PPU clean up section, so rendering the next frame starts properly.
LDA #%10010000 ; enable NMI, sprites from Pattern Table 0, background from Pattern Table 1
ORA nametable
STA $2000
LDA #%00011110 ; enable sprites, enable background, no clipping on left side
STA $2001
LDA #$01
STA sleeping
;; All Graphics Updates done by here.
RTI ; return from interrupt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
EngineTitle:
;;if start button pressed
lda buttons1 ;load the current button state for controller1
and #%00010000 ;isolate the bit representing "up", by clearing all the other bits
beq READSTARTDONE ;if the result was 0, then the "up" bit was clear (thus not pressed), so skip the following code
;;Go To Playing State. Set Paddles
LDA #STATEPLAYING
STA gamestate
;; Turn Screen Off
LDA #%00000000
STA $2001
;;Load Paddle Sprites
LoadPaddleSpritesLoop:
LDA sprites1, x ; load data from address (sprites + x)
STA $0204, x ; store into RAM address ($0200 + x)
INX ; X = X + 1
CPX #$20 ; Compare X to hex $20, decimal 32
BNE LoadPaddleSpritesLoop ; Branch to LoadSpritesLoop if compare was Not Equal to zero
; if compare was equal to 4, keep going down
;;Update Background
JSR UpdateBackground
;;;Set some initial ball stats
LoadPrimaryBallStats:
LDA #$01
STA balldown
STA ballright
LDA #$00
STA ballup
STA ballleft
LDA #$50
STA bally
LDA #$80
STA ballx
LDA #$02
STA ballspeedx
STA ballspeedy
JMP GameEngineDone
READSTARTDONE:
JMP GameEngineDone
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
EngineGameOver:
;;if start button pressed
;; turn screen off
;; load title screen
;; go to Title State
;; turn screen on
JMP GameEngineDone
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
EnginePlaying:
; Read Controllers and Update Graphics Sprites
lda buttons1 ;load the current button state for controller1
and #%00001000 ;isolate the bit representing "up", by clearing all the other bits
beq READUPDONE ;if the result was 0, then the "up" bit was clear (thus not pressed), so skip the following code
;code for moving paddle position up here
LDA $0204 ; load dave paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0204 ; save sprite Y position
LDA $0208 ; load dave paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0208 ; save sprite Y position
LDA $020c ; load dave paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $020c ; save sprite Y position
LDA $0210 ; load dave paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0210 ; save sprite Y position
LDA $0204
CMP #TOPWALL
BCS READUPDONE
LDA #TOPWALL
STA $0204
LDA #TOPWALLSPRITE2
STA $0208
LDA #TOPWALLSPRITE3
STA $020C
LDA #TOPWALLSPRITE4
STA $0210
READUPDONE:
lda buttons1 ;load the current button state for controller1
and #%00000100 ;isolate the bit representing "down", by clearing all the other bits
beq READDOWNDONE
LDA $0204 ; load dave paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0204 ; save sprite Y position
LDA $0208 ; load dave paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0208 ; save sprite Y position
LDA $020c ; load dave paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $020c ; save sprite Y position
LDA $0210 ; load dave paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0210 ; save sprite Y position
LDA $0210
CMP #BOTTOMWALL
BCC READDOWNDONE
LDA #BOTTOMWALL
STA $0210
LDA #BOTTOMWALLSPRITE2
STA $020C
LDA #BOTTOMWALLSPRITE3
STA $0208
LDA #BOTTOMWALLSPRITE4
STA $0204
READDOWNDONE:
lda buttons2 ;load the current button state for controller1
and #%00001000 ;isolate the bit representing "up", by clearing all the other bits
beq READP2UPDONE ;if the result was 0, then the "up" bit was clear (thus not pressed), so skip the following code
;code for moving paddle position up here
LDA $0214 ; load John paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0214 ; save sprite Y position
LDA $0218 ; load John paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0218 ; save sprite Y position
LDA $021c ; load John paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $021c ; save sprite Y position
LDA $0220 ; load John paddle sprite y position
SEC ; make sure the carry flag is clear
SBC #$04 ; A = A - 4
STA $0220 ; save sprite Y position
LDA $0214
CMP #TOPWALL
BCS READP2UPDONE
LDA #TOPWALL
STA $0214
LDA #TOPWALLSPRITE2
STA $0218
LDA #TOPWALLSPRITE3
STA $021C
LDA #TOPWALLSPRITE4
STA $0220
READP2UPDONE:
lda buttons2 ;load the current button state for controller1
and #%00000100 ;isolate the bit representing "down", by clearing all the other bits
beq READP2DOWNDONE
LDA $0214 ; load John paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0214 ; save sprite Y position
LDA $0218 ; load John paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0218 ; save sprite Y position
LDA $021c ; load John paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $021c ; save sprite Y position
LDA $0220 ; load John paddle sprite y position
CLC ; make sure the carry flag is clear
ADC #$04 ; A = A + 4
STA $0220 ; save sprite Y position
LDA $0220
CMP #BOTTOMWALL
BCC READP2DOWNDONE
LDA #BOTTOMWALL
STA $0220
LDA #BOTTOMWALLSPRITE2
STA $021C
LDA #BOTTOMWALLSPRITE3
STA $0218
LDA #BOTTOMWALLSPRITE4
STA $0214
READP2DOWNDONE:
;Move Ball Sprite
MoveBallRight:
LDA ballright
BEQ MoveBallRightDone ;;if ballright=0, skip this section
LDA ballx
CLC
ADC ballspeedx ;;ballx position = ballx + ballspeedx
STA ballx
LDA ballx
CMP #RIGHTWALL
BCC MoveBallRightDone ;;if ball x < right wall, still on screen, skip next section
LDA #$00
STA ballright
LDA #$01
STA ballleft ;;bounce, ball now moving left
;;in real game, give point to player 1, reset ball
MoveBallRightDone:
MoveBallLeft:
LDA ballleft
BEQ MoveBallLeftDone ;;if ballleft=0, skip this section
LDA ballx
SEC
SBC ballspeedx ;;ballx position = ballx - ballspeedx
STA ballx
LDA ballx
CMP #LEFTWALL
BCS MoveBallLeftDone ;;if ball x > left wall, still on screen, skip next section
LDA #$01
STA ballright
LDA #$00
STA ballleft ;;bounce, ball now moving right
;;in real game, give point to player 2, reset ball
MoveBallLeftDone:
MoveBallUp:
LDA ballup
BEQ MoveBallUpDone ;;if ballup=0, skip this section
LDA bally
SEC
SBC ballspeedy ;;bally position = bally - ballspeedy
STA bally
LDA bally
CMP #TOPWALL
BCS MoveBallUpDone ;;if ball y > top wall, still on screen, skip next section
LDA #$01
STA balldown
LDA #$00
STA ballup ;;bounce, ball now moving down
MoveBallUpDone:
MoveBallDown:
LDA balldown
BEQ MoveBallDownDone ;;if ballup=0, skip this section
LDA bally
CLC
ADC ballspeedy ;;bally position = bally + ballspeedy
STA bally
LDA bally
CMP #BOTTOMWALL
BCC MoveBallDownDone ;;if ball y < bottom wall, still on screen, skip next section
LDA #$00
STA balldown
LDA #$01
STA ballup ;;bounce, ball now moving down
MoveBallDownDone:
CheckPaddleCollision:
;;if ball x < paddle1x
LDA ballx ;Load current horizontal position of ball
CMP #PADDLE1X+8 ;Compare to horizontal position of paddle
BCS CheckPaddleCollisionDone ;if ball x position is less than paddle x position branch to CheckPaddleCollisionDone. Otherwise move on to vertical
;; if ball y > paddle y top
LDA bally ;Load current vertical position of ball
CLC
ADC #$05
CMP $0204 ;Compare to paddle1ytop. If ball y position is less than paddle1ytop possition branch to CheckPaddle Collision Done. Otherwise Move on.
BCC CheckPaddleCollisionDone
LDA bally ;;Load Current Vertical Position of ball
SEC
SBC #$05
CMP $0210 ;; if ball y greater than paddle y bottom
BCS CheckPaddleCollisionDone
;; bounce, ball now moving right
LDA #$01
STA ballright
LDA #$00
STA ballleft
;;increase ball speed
LDA ballspeedx
CMP #$04
BEQ ballspeed1done
CLC
ADC #01
STA ballspeedx
LDA ballspeedy
CMP #04
BEQ ballspeed1done
CLC
ADC #01
STA ballspeedy
ballspeed1done:
CheckPaddleCollisionDone:
CheckPaddleCollision2:
;;if ball x < paddle1x
LDA ballx ;Load current horizontal position of ball
CMP #PADDLE2X-8 ;Compare to horizontal position of paddle
BCC CheckPaddleCollision2Done ;if ball x position is less than paddle x position branch to CheckPaddleCollisionDone. Otherwise move on to vertical
;; if ball y > paddle y top
LDA bally ;Load current vertical position of ball
CLC
ADC #$05
CMP $0214 ;Compare to paddle1ytop. If ball y position is Greater than paddle1ytop possition branch to CheckPaddle Collision Done. Otherwise Move on.
BCC CheckPaddleCollision2Done
LDA bally ;;Load Current Vertical Position of ball
SEC
SBC #$05
CMP $0220 ;; if ball y < paddle y bottom
BCS CheckPaddleCollision2Done
;; bounce, ball now moving left
LDA #$00
STA ballright
LDA #$01
STA ballleft
;;increase ball speed
LDA ballspeedx
CMP #$04
BEQ ballspeed2done
CLC
ADC #$01
STA ballspeedx
LDA ballspeedy
CMP #04
BEQ ballspeed2done
CLC
ADC #01
STA ballspeedy
ballspeed2done:
CheckPaddleCollision2Done:
JMP GameEngineDone
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;UpdateBackground
UpdateBackground:
;; Load Game State
LDA gamestate
CMP #STATEPLAYING
BNE UpdateBackgroundDone
;; Load Palette
;; Vblank Screen by turning off rendering
LDA #%00010000 ; Disable NMI, sprites from Pattern Table 0, background from Pattern Table 1
STA $2000
LDA #%00000000 ; disable sprites, disable background, no clipping on left side
STA $2001
;; Load Palettes for Game Area
LoadPalettes2:
LDA $2002 ; read PPU status to reset the high/low latch
LDA #$3F
STA $2006 ; write the high byte of $3F00 address
LDA #$00
STA $2006 ; write the low byte of $3F00 address
LDX #$00 ; start out at 0
LoadPalettesLoop2:
LDA palette2, x ; load data from address (palette + the value in x)
; 1st time through loop it will load palette+0
; 2nd time through loop it will load palette+1
; 3rd time through loop it will load palette+2
; etc
STA $2007 ; write to PPU
INX ; X = X + 1
CPX #$20 ; Compare X to hex $20, decimal 32 - copying 16 bytes = 4 sprites
BNE LoadPalettesLoop2 ; Branch to LoadPalettesLoop if compare was Not Equal to zero
; if compare was equal to 32, keep going down
LoadPlayBackground:
LDA $2002 ;Read PPU status to reset hi/lo latch
LDA #$20
STA $2006 ;write the high byte of $2000 address
LDA #$00
STA $2006 ;write the low byte of the $2000 address
LoadPlayBackgroundLoop:
LDA #$00
STA pointer2 ; put the low byte of the address of background into pointer --- This equals 00?
LDA #HIGH(backgroundtwo) ;What does the #HIGH signify? Its not a constant. Is this pulling the tile number from the nametable below?
STA pointer2+1 ; put the high byte of the address into pointer. Do we now have $2400?
LDX #$00 ; start at pointer + 0
LDY #$00
OutsideLoopPlay:
InsideLoopPlay:
LDA [pointer2], y ; copy one background byte from address in pointer plus Y
STA $2007 ; this runs 256 * 4 times
INY ; inside loop counter
CPY #$00
BNE InsideLoopPlay ; run the inside loop 256 times before continuing down
INC pointer2+1 ; low byte went 0 to 256, so high byte needs to be changed now
INX
CPX #$04
BNE OutsideLoopPlay ; run the outside loop 256 times before continuing down
LDA #%10010000 ; enable NMI, sprites from Pattern Table 0, background from Pattern Table 1
STA $2000
LDA #%00011110 ; enable sprites, enable background, no clipping on left side
STA $2001
RTS
UpdateBackgroundDone:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
UpdateSprites:
LDA bally ;;update all ball sprite info
STA $0200
LDA #$30
STA $0201
LDA #$00
STA $0202
LDA ballx
STA $0203
RTS
DrawScore:
;;draw score on screen using background tiles
;;or using many sprites
RTS
ReadController1:
LDA #$01
STA $4016
LDA #$00
STA $4016
LDX #$08
ReadController1Loop:
LDA $4016
LSR A ; bit0 -> Carry
ROL buttons1 ; bit0 <- Carry
DEX
BNE ReadController1Loop
RTS
ReadController2:
LDA #$01
STA $4016
LDA #$00
STA $4016
LDX #$08
ReadController2Loop:
LDA $4017
LSR A ; bit0 -> Carry
ROL buttons2 ; bit0 <- Carry
DEX
BNE ReadController2Loop
RTS
;;;;;;;;;;;;;;
.bank 1
.org $E000
background:
;;First Portion Of Title Scrolling Screen
.db $80,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$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0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
;attributes for first portion of title scroll in
.db %00000000, %00000000, %00000000, %01010101, %01010101, %00000000, %00000000, %00000000
.db %01010101, %01010101, %00000000, %01010101, %01010101, %00000000, %00000000, %00000000
.db %01010101, %01010101, %01010000, %00000000, %00000000, %00000000, %01010101, %01010101
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %11111111, %01110101, %01010000, %00000000, %00000000, %00000000, %11010101, %11111111
.db %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010
.db %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010
;;Main Title Screen
.db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $1d,$18,$19,$24,$00,$00,$00,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$26,$27,$28,$29,$2a,$2b,$2c,$2d,$2e,$2f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$80,$81,$82,$83,$84,$85,$ff,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$3e,$3f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$90,$91,$92,$93,$94,$95,$ff,$44,$45,$46,$47,$48,$49,$4a,$4b,$4c,$4d,$4e,$4f,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $ff,$ff,$a0,$a1,$a2,$a3,$a4,$a5,$ff,$54,$55,$56,$57,$58,$59,$5a,$5b,$5c,$5d,$5e,$5f,$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ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
.db $f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0,$f0
;;End Main Title Screen
attributes: ;8 x 8 = 64 bytes
;Main Title Scroll In
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %01010101, %01010101, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %01010101, %01010101, %01010000, %00000000, %00000000, %00000000, %01010101, %01010101
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %11111111, %01110101, %01010000, %00000000, %00000000, %00000000, %11010101, %11111111
.db %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010
.db %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010, %10101010
backgroundtwo:
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$80,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$34,$35,$36,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$40,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$d0,$d0
.db $d0,$d0,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$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
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
.db %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000, %00000000
palette:
.db $31,$30,$05,$0f,$31,$30,$21,$0f,$31,$06,$16,$0f,$31,$19,$29,$0f ;;Title palette
.db $22,$1C,$15,$14, $22,$02,$38,$3C, $22,$1C,$15,$14, $22,$02,$38,$3C ;;sprite palette
palette2:
.db $10,$26,$05,$0f, $10,$30,$21,$0f, $10,$06,$16,$0f, $10,$19,$29,$0f ;;playfield palette
.db $22,$1C,$15,$14, $22,$02,$38,$3C, $22,$1C,$15,$14, $22,$02,$38,$3C ;;sprite palette
sprites:
;vert tile attr horiz
.db $80, $32, $00, $80 ;sprite 0
.db $80, $33, $00, $88 ;sprite 1
.db $88, $34, $00, $80 ;sprite 2
.db $88, $35, $00, $88 ;sprite 3
sprites1: ;Paddle Sprites
.db $50, $76, $02, PADDLE1X ;Dave Paddle Sprite
.db $58, $86, $02, PADDLE1X ;Dave Paddle Sprite 2
.db $60, $96, $02, PADDLE1X ;Dave Paddle Sprite 3
.db $68, $A6, $02, PADDLE1X ;Dave Paddle Sprite 4
;; John Paddle Sprites
.db $50, $7A, $02, PADDLE2X
.db $58, $8A, $02, PADDLE2X
.db $60, $9A, $02, PADDLE2X
.db $68, $AA, $02, PADDLE2X
.org $FFFA ;first of the three vectors starts here
.dw NMI ;when an NMI happens (once per frame if enabled) the
;processor will jump to the label NMI:
.dw RESET ;when the processor first turns on or is reset, it will jump
;to the label RESET:
.dw 0 ;external interrupt IRQ is not used in this tutorial
;;;;;;;;;;;;;;
.bank 2
.org $0000
.incbin "mario.chr" ;includes 8KB graphics file from SMB1
Here is the rom
http://www.bidyourheart.com/pong1.nesHere is the CHR
http://www.bidyourheart.com/mario.chrDon't mind the website. Its an old dating site I put together when I was learning PHP