Hi, I tried the exercise from Sessions 14-15 to draw a box around the playfield. But my code is rendering funky in both Stella and z26. In Stella, the top wall is rendering twice as thick as the horizontal walls, while the bottom wall is the same thickness as the horizontal walls. (My understanding is that the top wall should be the same thickness.) In z26, the top wall is roughly 4x thicker than the horizontal walls, with a corresponding black gap at the bottom of the screen with a thin red line below that. I tried Andrew Davie's exercise code provided in Session 15, and the output looks very similar to mine in both Stella and z26, not matching what the screenshot shows. Though his has a black background (mine has the rainbow background), he still has the extra thick top wall, and in z26, the black gap on the bottom.
I'm using z26 3.02.01, and Stella 6.0. I'm compiling my code with dasm 2.20.11:
dasm.exe "..\..\Documents\Docs\@Inbox\atari\playfield-3.asm" -lplayfield-3.txt -f3 -v5 -oplayfield-3.bin
My code follows:
processor 6502 include "vcs.h" PAT_PF0_THICK = %11110000 PAT_PF0_THIN = %00010000 PAT_PF_THICK = %11111111 PAT_PF_NONE = %00000000 SEG ORG $f000 ; Clear RAM and all TIA registers Reset ldx #0 lda #0 Clear sta 0,x inx bne Clear ; once-only initialization lda #$45 sta COLUPF ; mirror the playfield lda #%00000001 sta CTRLPF ldy #0 StartOfFrame ; vertical sync lda #0 sta VBLANK lda #2 sta VSYNC sta WSYNC sta WSYNC sta WSYNC lda #0 sta VSYNC ; vertical blank ldx #0 VerticalBlank sta WSYNC inx cpx #37 bne VerticalBlank ; start drawing picture ldx #0 ; start drawing top wall lda #PAT_PF0_THICK sta PF0 lda #PAT_PF_THICK sta PF1 sta PF2 PictureTop sta WSYNC inx cpx #8 bne PictureTop ; start drawing main area lda #PAT_PF0_THIN sta PF0 lda #PAT_PF_NONE sta PF1 sta PF2 PictureMain stx COLUBK sta WSYNC inx cpx #184 bne PictureMain ; start drawing bottom wall lda #PAT_PF0_THICK sta PF0 lda #PAT_PF_THICK sta PF1 sta PF2 PictureBottom stx COLUBK sta WSYNC inx cpx #192 bne PictureBottom ; overscan area lda #%01000010 sta VBLANK ldx #0 Overscan sta WSYNC inx cpx #30 bne Overscan jmp StartOfFrame ORG $FFFA InterruptVectors .word Reset .word Reset .word Reset END