From a9418f88fab3666db4e667ff586f3206ce4d20eb Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 11 Nov 2021 20:29:38 -0500 Subject: [PATCH] d2_hgr: closer to submit --- demos/d2/d2.s | 14 +++++++------- demos/d2/mockingboard_setup.s | 7 +++++-- demos/d2/moving.s | 2 +- demos/d2/wires.s | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/demos/d2/d2.s b/demos/d2/d2.s index b70cf7e3..bf79afc2 100644 --- a/demos/d2/d2.s +++ b/demos/d2/d2.s @@ -123,6 +123,8 @@ forever: ;===================== ; repeat + bit TEXTGR + jmp forever @@ -153,16 +155,14 @@ print_message: jsr clear_both_bottoms - ldx #13 + ldx #12 print_message_loop: lda message1,X -; ora #$80 - sta $650,X - sta $A50,X + sta $6d2,X + sta $Ad2,X lda message2,X -; ora #$80 - sta $6d0,X - sta $AD0,X + sta $6ea,X + sta $Aea,X dex bpl print_message_loop diff --git a/demos/d2/mockingboard_setup.s b/demos/d2/mockingboard_setup.s index 7402efb4..cda09abd 100644 --- a/demos/d2/mockingboard_setup.s +++ b/demos/d2/mockingboard_setup.s @@ -100,6 +100,7 @@ mockingboard_setup_interrupt: ; Note, on Apple II the clock isn't 1MHz but is actually closer to ; roughly 1.023MHz, and every 65th clock is stretched (it's complicated) + ; c7ce / 1.023e6 = .050s, 20Hz ; 9c40 / 1.023e6 = .040s, 25Hz ; 8534 / 1.023e6 = .033s, 30Hz ; 4fe7 / 1.023e6 = .020s, 50Hz @@ -120,12 +121,14 @@ mockingboard_setup_interrupt: sta MOCK_6522_IFR ; IFR: 1100, enable interrupt on timer one oflow sta MOCK_6522_IER ; IER: 1100, enable timer one interrupt - lda #$40 + lda #$CE +; lda #$40 ; lda #$34 ; lda #$E7 sta MOCK_6522_T1CL ; write into low-order latch - lda #$9C + lda #$C7 +; lda #$9C ; lda #$85 ; lda #$4f sta MOCK_6522_T1CH ; write into high-order latch, diff --git a/demos/d2/moving.s b/demos/d2/moving.s index e37ae223..f5d4806d 100644 --- a/demos/d2/moving.s +++ b/demos/d2/moving.s @@ -99,7 +99,7 @@ ror_nop_smc: ; sta HGR_PAGE lda FRAME - cmp #$1f + cmp #$1b ; NOTE: NEEDS TO BE ODD bne draw_moving ; bra rts diff --git a/demos/d2/wires.s b/demos/d2/wires.s index e370db27..dd206ae6 100644 --- a/demos/d2/wires.s +++ b/demos/d2/wires.s @@ -78,7 +78,7 @@ noflo: inc COUNT inc FRAME lda FRAME - cmp #32 + cmp #53 bne outer_loop