From 9852fbd5641ac12949c8db9721fec2db5f1f8d98 Mon Sep 17 00:00:00 2001 From: Christopher RYU Date: Tue, 3 Oct 2023 18:46:43 +0900 Subject: [PATCH] Checkpoint comments. --- bitsy.bye.s | 140 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 80 insertions(+), 60 deletions(-) diff --git a/bitsy.bye.s b/bitsy.bye.s index ff1537b..a28aa2b 100644 --- a/bitsy.bye.s +++ b/bitsy.bye.s @@ -3,9 +3,16 @@ ; Input file: bitsy.bye ; Page: 1 +OPEN_BUFFER := $0280 L2000 := $2000 +L1400 := $1400 PRODOS_MLI := $BF00 +DEVNUM := $BF30 +BITMAP := $BF58 + +DRVSM2 := $C082 + INIT := $FB2F BASCALC := $FBC1 BELL1 := $FBDD @@ -24,7 +31,7 @@ NEWVIDEO := $C029 .org $1000 cld - lda $C082 + lda DRVSM2 ; turn all drive phases off cli sta CLR80VID sta CLR80COL @@ -35,26 +42,27 @@ NEWVIDEO := $C029 jsr HOME ldx #$DF lda #$CF -L101E: sta $BE79,x - lda L1270,x - sta $7A,x +L101E: sta BITMAP-$df,x ; $BF58, aka BITMAP + lda L135F -$df,x ; $134F + sta $7A,x ; $0159 lda #$00 txs inx bne L101E - .byte $C2 - .byte $02 - beq L1034 ; f0 04 - inx ; e8 - stx NEWVIDEO -L1034: inc $BF6F - ldx #$57 -L1039: lda L12FF,x +.setcpu "65816" ; this is a NOP on 65x02 + rep #$02 ; reset processor status bits +.setcpu "6502" + beq L1034 ; branch-always on 6502 + inx ; only //gs + stx NEWVIDEO ; only //gs +L1034: inc BITMAP+$17 ; bitmap of low 48k of memory + ldx #(L1356-L12FE-1) ; $57 +L1039: lda L12FE+1,x ; $1356 bmi L1045 - jsr BASCALC + jsr BASCALC ; row in a -> screen address in ($28) ldy L1300,x .byte $2C ; mask next ... -L1045: sta ($28),y +L1045: sta ($28),y ; store directly to $(SCREEN) from BASCALC dey dex bne L1039 @@ -62,24 +70,27 @@ L104B: sta $0480,y sta ($28),y dey bpl L104B - lda $BF30 - lsr a - lsr a - lsr a + +; done drawing screen + + lda DEVNUM ; get current active slot (DSSS/0000) + lsr a ; for 7, that's 0111/0000 + lsr a + lsr a ; now 0000/1110 tax inx - cmp #$10 + cmp #$10 ; legit slot? bcc L1060 L105F: dex -L1060: jsr L1254 +L1060: jsr OPEN_PREFIX beq L105F -L1065: lda #$14 - sta $7B - sta $59 - ldy #$00 +L1065: lda #>L1400 + sta $7A+1 + sta $58+1 + ldy #