From 9ec8010d25481438addd3bac29b1da7ed23d32da Mon Sep 17 00:00:00 2001 From: astoria-d Date: Mon, 9 Sep 2013 16:21:00 +0900 Subject: [PATCH] - test for ppu status read defect --- tools/test-image/sample1.asm | 66 +++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/tools/test-image/sample1.asm b/tools/test-image/sample1.asm index ea85c4d..dc8e9a8 100644 --- a/tools/test-image/sample1.asm +++ b/tools/test-image/sample1.asm @@ -136,31 +136,31 @@ copymap: ;; dey ;; bne copymap2 - ;;vram read test - lda #$20 - sta $2006 - lda #$ab - sta $2006 - - ldx #$0a - lda $2007 -load_vram: - lda $2007 - dex - bne load_vram - - ;;palette read test - lda #$3f - sta $2006 - lda #$00 - sta $2006 - - ldx #$0a - lda $2007 -load_plt: - lda $2007 - dex - bne load_plt +;; ;;vram read test +;; lda #$20 +;; sta $2006 +;; lda #$ab +;; sta $2006 +;; +;; ldx #$0a +;; lda $2007 +;;load_vram: +;; lda $2007 +;; dex +;; bne load_vram +;; +;; ;;palette read test +;; lda #$3f +;; sta $2006 +;; lda #$00 +;; sta $2006 +;; +;; ldx #$0a +;; lda $2007 +;;load_plt: +;; lda $2007 +;; dex +;; bne load_plt ;;scroll reg set. lda #$00 @@ -875,6 +875,22 @@ load_plt: lda #$80 sta $2000 + ;;read ppu status reg while displaying + ;;vram read test + ldx #$0a +l1: + nop + dex + bne l1 + + ldx #$0a +read_status: + lda $2002 + dex + bne read_status + + + ;;done... ;;infinite loop. mainloop: -- 2.11.0