OSDN Git Service

bg scroll test
[motonesfpga/motonesfpga.git] / tools / test-image / sample1.asm
index 96d47a3..afc9d26 100644 (file)
@@ -122,10 +122,11 @@ at_st:
     sta $2007\r
 \r
     ;;set scroll reg.\r
-    lda #$03\r
-    sta $2005\r
-    lda #$00\r
-    sta $2005\r
+    lda #05\r
+    sta $0300\r
+    lda #00\r
+    sta $0301\r
+    jsr set_scroll\r
 \r
     ;;set next page name table\r
     ldy #$00\r
@@ -174,6 +175,7 @@ read_status:
 \r
 \r
 nmi_test:\r
+    jsr set_scroll\r
 \r
     rti\r
 \r
@@ -203,6 +205,17 @@ no_carry:
     tax\r
     rts\r
 \r
+set_scroll:\r
+    lda $0300\r
+    sta $2005\r
+    adc #$01\r
+    sta $0300\r
+    lda $0301\r
+    sta $2005\r
+    adc #04\r
+;;    sta $0301\r
+    rts\r
+\r
 nt1:\r
        .byte   $61, $62, $63, $64, $65, $66, $67, $68, $69, $6a, $6b\r
        .byte   $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $3a\r