Re: [stella] My version of a scrolling demo

Subject: Re: [stella] My version of a scrolling demo
From: Eckhard Stolberg <Eckhard_Stolberg@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 03 Jul 1999 16:03:23 +0200
At 19:58 02.07.99 +0200, you wrote:
>No, not at all... in fact I wouldn't have expected a scrolling demo using a
>charset AND a proportional font! This is great!!! I think I'll have to
>re-convert this to the C-64... I haven't seen anyone doing a scrolling
>proportional font there yet...

That wasn't too hard. I needed a counter for the shifting anyway to
see when I have to copy the next character. Since each character is
only seven scanlines high, adding a width value as the eighth byte
disn't create much ovehead.

>of course you could afterwards still save more space on the cart by
>compressing the font to the chars that were actually used... ;-)

If someone really needs more text: I use only seven bits out of
every byte for the text. If you compress that, you can get room
for 400 characters more. But then you would have to write yourself
a text conversion program to get the data into the BIN. ;-)

>Sorry, but SCRLBAR5.BIN is also hard to read. The reason is that it scrolls
>relatively fast, and the color bars go by the scrolling message on the left
>and right. Maybe it'd be better to have the message itself change the color
>(if possible)?

I think you are right. I slowed it down by half the speed and it is
much more readable now. Changing the text colour in every scanline
would be very hard, since you have to change two colour registers
and the six-sprite routine is already pretty tight. You could change
the text colour every frame or for each new 'paragraph' though.

Someone else already experimented with my binaries and sent me his
results. Not that I would mind that, but if you use a poem as your
test text, please choose one that even foreigners can understand. ;-)

For everyone who want to experiment with my scrolling text demo too,
here is the source code. It isn't commented at all, but I think it's
simple enough that you can make it out anyway. I added code to slow
down shifting speed and fixed a little bug, so that you can have only
five byte of text less than in the last demos. If you only want to have
your own text, you can add as much between the TEXTSTART and TEXTEND
label as DASM allows you without complaining.

SCRLBAR8.DAS is the single scanline version.
SCRLBAR7.DAS is the double scanline version.
SCRLFONT.GRP contains the data for the font.
VCS.H contains the equates for the TIA and the RIOT, in case you don't
have one of those already.


Ciao, Eckhard Stolberg

===Start of SCRLBAR8.DAS====================================================
                processor       6502
                include         vcs.h

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Zeropage variables declaration
;
                SEG.U   Variables
                ORG     $80
LoopCount       ds      1
Temp            ds      1
Sprite1         ds      7
Sprite2         ds      7
Sprite3         ds      7
Sprite4         ds      7
Sprite5         ds      7
Sprite6         ds      7
ShiftCount      ds      1
Sprite7         ds      7
TextPTR         ds      2
CharPTR         ds      2
ColourCycle     ds      1
TempColour      ds      1
SkipFrame       ds      1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
                SEG     Code
                ORG     $f000
                include scrlfont.grp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Program initialization
;

Cart_Init:
                sei
                cld                     

                ldx     #$00
                txa
AllClear:
                sta     $00,x
                dex
                bne     AllClear
                txs

DemoInit:
                sta     WSYNC
                pha
                lda     #$f1
                sta     HMP1
                sta     CTRLPF
                lda     #$0a
                sta     COLUP0
                sta     COLUP1
                lda     #$e3
                sta     HMP0
                sta     NUSIZ0
                sta     NUSIZ1
                sta     VDELP0
                sta     VDELP1
                sta     RESP0
                sta     RESP1
                sta     WSYNC
                sta     HMOVE
                jsr     ResetTextPTR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Main program loop
;
NewFrame:
                ldx     #$02
                sta     WSYNC           
                stx     VSYNC           
                sta     WSYNC           
                sta     WSYNC
                sta     WSYNC
                sta     VSYNC           

                lda     #45
                sta     TIM64T          

                eor     SkipFrame
                sta     SkipFrame
                bne     VblankLoop

                dec     ColourCycle

                ldx     #6
ShiftDisp:
                asl     Sprite7,x
                rol     Sprite6,x
                rol     Sprite5,x
                rol     Sprite4,x
                rol     Sprite3,x
                rol     Sprite2,x
                rol     Sprite1,x
                dex
                bpl     ShiftDisp

                dec     ShiftCount
                bpl     VblankLoop

                ldy     #7
CopyChar:
                lda     (CharPTR),y
                sta     ShiftCount,y
                dey
                bpl     CopyChar

                inc     TextPTR
                bne     T1
                inc     TextPTR+1
T1:
                jsr     NewCharPTR
                lda     #<TextEnd
                cmp     TextPTR
                bne     NoWrap
                ldx     #>TextEnd
                cpx     TextPTR+1
                bne     NoWrap
                jsr     ResetTextPTR
NoWrap:
VblankLoop:
                lda     INTIM
                bne     VblankLoop      
                sta     WSYNC           
                sta     VBLANK          
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DisplayStart:
                ldy     ColourCycle
                jsr     ColourFX
                sty     COLUBK
                dey
                sty     TempColour
                lda     #%11111100
                sta     PF2

                lda     #6
                sta     LoopCount
DS1:   
                ldx     LoopCount
                lda     Sprite1,x
                sta     GRP0
                sta     WSYNC
                ldy     TempColour
                sty     COLUBK
                lda     Sprite2,x
                sta     GRP1
                lda     Sprite3,x
                sta     GRP0
                lda     Sprite4,x
                sta     Temp
                lda     Sprite5,x
                tay
                lda     Sprite6,x
                tax
                lda     Temp
                sta     GRP1
                sty     GRP0
                stx     GRP1
                stx     GRP0

                dec     TempColour
                ldy     TempColour
                nop

                ldx     LoopCount
                lda     Sprite1,x
                sta     GRP0
                lda     Sprite2,x
                sta     GRP1
                sty     COLUBK
                lda     Sprite3,x
                sta     GRP0
                pha
                pla
                lda     Sprite5,x
                tay
                lda     Sprite6,x
                tax
                lda     Temp
                dec     TempColour
                sta     GRP1
                sty     GRP0
                stx     GRP1
                stx     GRP0

                dec     LoopCount
                bpl     DS1   

                lda     #0
                sta     GRP0
                sta     GRP1
                sta     GRP0
                sta     GRP1
                sta     PF2
                ldy     TempColour
                jsr     ColourFX
                lda     #$22            ;dec 34 = hex 22
                sta     VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
OverscanStart:
                sta     TIM64T

OverscanLoop:
                lda     INTIM
                bne     OverscanLoop    
                sta     WSYNC           

                jmp     NewFrame

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
ResetTextPTR
                lda     #<TextStart
                sta     TextPTR
                lda     #>TextStart
                sta     TextPTR+1
NewCharPTR:
                ldy     #0
                lda     (TextPTR),y
                sec
                sbc     #32
                sta     CharPTR
                tya
                asl     CharPTR
                rol
                asl     CharPTR
                rol
                asl     CharPTR
                rol
                ora     #$f0            ; start of character data (highbyte)
                sta     CharPTR+1
                rts
ColourFX:
                ldx     #88
D1:
                sty     COLUBK
                sta     WSYNC
                dey
                dex
                bne     D1
                rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
TextStart:
                .byte   "This is just a test text.        "
                .byte   "This is a test text too.        "
                .byte   "text wrap:        3        2        1        "
TextEnd:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Set up the 6502 interrupt vector table
;
                ORG     $fffc
Reset           .word   Cart_Init
IRQ             .word   Cart_Init
        
		END

===Start of SCRLBAR7.DAS===================================================
                processor       6502
                include         vcs.h

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Zeropage variables declaration
;
                SEG.U   Variables
                ORG     $80
LoopCount       ds      1
Temp            ds      1
Sprite1         ds      7
Sprite2         ds      7
Sprite3         ds      7
Sprite4         ds      7
Sprite5         ds      7
Sprite6         ds      7
ShiftCount      ds      1
Sprite7         ds      7
TextPTR         ds      2
CharPTR         ds      2
ColourCycle     ds      1
TempColour      ds      1
SkipFrame       ds      1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
                SEG     Code
                ORG     $f000
                include scrlfont.grp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Program initialization
;

Cart_Init:
                sei
                cld                     

                ldx     #$00
                txa
AllClear:
                sta     $00,x
                dex
                bne     AllClear
                txs

DemoInit:
                sta     WSYNC
                pha
                lda     #$f1
                sta     HMP1
                sta     CTRLPF
                lda     #$0a
                sta     COLUP0
                sta     COLUP1
                lda     #$e3
                sta     HMP0
                sta     NUSIZ0
                sta     NUSIZ1
                sta     VDELP0
                sta     VDELP1
                sta     RESP0
                sta     RESP1
                sta     WSYNC
                sta     HMOVE
                jsr     ResetTextPTR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Main program loop
;
NewFrame:
                ldx     #$02
                sta     WSYNC           
                stx     VSYNC           
                sta     WSYNC           
                sta     WSYNC
                sta     WSYNC
                sta     VSYNC           

                lda     #45
                sta     TIM64T          

                eor     SkipFrame
                sta     SkipFrame
                bne     VblankLoop

                dec     ColourCycle

                ldx     #6
ShiftDisp:
                asl     Sprite7,x
                rol     Sprite6,x
                rol     Sprite5,x
                rol     Sprite4,x
                rol     Sprite3,x
                rol     Sprite2,x
                rol     Sprite1,x
                dex
                bpl     ShiftDisp

                dec     ShiftCount
                bpl     VblankLoop

                ldy     #7
CopyChar:
                lda     (CharPTR),y
                sta     ShiftCount,y
                dey
                bpl     CopyChar

                inc     TextPTR
                bne     T1
                inc     TextPTR+1
T1:
                jsr     NewCharPTR
                lda     #<TextEnd
                cmp     TextPTR
                bne     NoWrap
                ldx     #>TextEnd
                cpx     TextPTR+1
                bne     NoWrap
                jsr     ResetTextPTR
NoWrap:
VblankLoop:
                lda     INTIM
                bne     VblankLoop      
                sta     WSYNC           
                sta     VBLANK          
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DisplayStart:
                ldy     ColourCycle
                jsr     ColourFX
                sty     COLUBK
                dey
                sty     TempColour
                lda     #%11111100
                sta     PF2

                lda     #6
                sta     LoopCount
DS1:   
                ldx     LoopCount
                lda     Sprite1,x
                sta     GRP0
                sta     WSYNC
                ldy     TempColour
                sty     COLUBK
                lda     Sprite2,x
                sta     GRP1
                lda     Sprite3,x
                sta     GRP0
                lda     Sprite4,x
                sta     Temp
                lda     Sprite5,x
                tay
                lda     Sprite6,x
                tax
                lda     Temp
                sta     GRP1
                sty     GRP0
                stx     GRP1
                stx     GRP0

                dec     TempColour
                ldy     TempColour
                nop

                ldx     LoopCount
                lda     Sprite1,x
                sta     GRP0
                lda     Sprite2,x
                sta     GRP1
                sty     COLUBK
                lda     Sprite3,x
                sta     GRP0
                pha
                pla
                lda     Sprite5,x
                tay
                lda     Sprite6,x
                tax
                lda     Temp
                dec     TempColour
                sta     GRP1
                sty     GRP0
                stx     GRP1
                stx     GRP0

                dec     LoopCount
                bpl     DS1   

                lda     #0
                sta     GRP0
                sta     GRP1
                sta     GRP0
                sta     GRP1
                sta     PF2
                ldy     TempColour
                jsr     ColourFX
                lda     #$22            ;dec 34 = hex 22
                sta     VBLANK
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
OverscanStart:
                sta     TIM64T

OverscanLoop:
                lda     INTIM
                bne     OverscanLoop    
                sta     WSYNC           

                jmp     NewFrame

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
ResetTextPTR
                lda     #<TextStart
                sta     TextPTR
                lda     #>TextStart
                sta     TextPTR+1
NewCharPTR:
                ldy     #0
                lda     (TextPTR),y
                sec
                sbc     #32
                sta     CharPTR
                tya
                asl     CharPTR
                rol
                asl     CharPTR
                rol
                asl     CharPTR
                rol
                ora     #$f0            ; start of character data (highbyte)
                sta     CharPTR+1
                rts
ColourFX:
                ldx     #88
D1:
                sty     COLUBK
                sta     WSYNC
                dey
                dex
                bne     D1
                rts
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
TextStart:
                .byte   "This is just a test text.        "
                .byte   "This is a test text too.        "
                .byte   "text wrap:        3        2        1        "
TextEnd:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;
; Set up the 6502 interrupt vector table
;
                ORG     $fffc
Reset           .word   Cart_Init
IRQ             .word   Cart_Init
        
		END

===Start of SCRLFONT.GRP===================================================
; The first value for each character represents the character's width-1

; BLANK
                                .byte   5
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
; !     
                                .byte   2
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %11000000
                                .byte   %11000000
                                .byte   %11000000
                                .byte   %11000000
                                .byte   %11000000
; "
                                .byte   3
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %10100000
                                .byte   %10100000
; # 
                                .byte   5
                                .byte   %01010000
                                .byte   %01010000
                                .byte   %11111000
                                .byte   %01010000
                                .byte   %11111000
                                .byte   %01010000
                                .byte   %01010000
; $
                                .byte   7
                                .byte   %00101000
                                .byte   %11111100
                                .byte   %00101010
                                .byte   %01111100
                                .byte   %10101000
                                .byte   %01111110
                                .byte   %00101000
; %
                                .byte   7
                                .byte   %10000100
                                .byte   %01001010
                                .byte   %00100100
                                .byte   %00010000
                                .byte   %01001000
                                .byte   %10100100
                                .byte   %01000010
; &
                                .byte   7
                                .byte   %01100010
                                .byte   %10010100
                                .byte   %10001000
                                .byte   %10010100
                                .byte   %01100000
                                .byte   %10010000
                                .byte   %01100000
; '
                                .byte   1
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %10000000
                                .byte   %10000000
; (
                                .byte   3
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
; )
                                .byte   3
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %10000000
; *
                                .byte   5
                                .byte   %00000000
                                .byte   %00100000
                                .byte   %10101000
                                .byte   %01110000
                                .byte   %01110000
                                .byte   %10101000
                                .byte   %00100000
; +
                                .byte   5
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %11111000
                                .byte   %00100000
                                .byte   %00100000
; ,
                                .byte   2
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
; -
                                .byte   5
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %11111000
                                .byte   %00000000
                                .byte   %00000000
; .
                                .byte   2
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
; /
                                .byte   7
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %00000100
                                .byte   %00000010
; 0
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %11001000
                                .byte   %10101000
                                .byte   %10011000
                                .byte   %10001000
                                .byte   %01110000
; 1
                                .byte   5
                                .byte   %11111000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %10100000
                                .byte   %01100000
                                .byte   %00100000
; 2
                                .byte   5
                                .byte   %11111000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00110000
                                .byte   %00001000
                                .byte   %11110000
; 3
                                .byte   5
                                .byte   %11100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00110000
                                .byte   %00001000
                                .byte   %11110000
; 4
                                .byte   5
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %11111000
                                .byte   %10001000
                                .byte   %10001000
; 5
                                .byte   5
                                .byte   %11100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %11110000
                                .byte   %10000000
                                .byte   %11111000
; 6
                                .byte   5
                                .byte   %01100000
                                .byte   %10010000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %01000000
                                .byte   %00111000
; 7
                                .byte   5
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %11111000
; 8
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %01110000
; 9
                                .byte   5
                                .byte   %11100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %01110000
; :
                                .byte   2
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %11000000
                                .byte   %00000000
; ;
                                .byte   2
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %11000000
                                .byte   %00000000
; <
                                .byte   4
                                .byte   %00010000
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
; =
                                .byte   5
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %11111000
                                .byte   %00000000
                                .byte   %11111000
                                .byte   %00000000
; >
                                .byte   4
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %10000000
; ?
                                .byte   5
                                .byte   %00100000
                                .byte   %00000000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %10001000
                                .byte   %01110000
; @
                                .byte   7
                                .byte   %01111100
                                .byte   %10000000
                                .byte   %10011110
                                .byte   %10101010
                                .byte   %10011010
                                .byte   %10000010
                                .byte   %01111100
; A
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11111000
                                .byte   %10001000
                                .byte   %01110000
; B
                                .byte   5
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %11110000
; C
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10001000
                                .byte   %01110000
; D
                                .byte   5
                                .byte   %11100000
                                .byte   %10010000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10010000
                                .byte   %11100000
; E
                                .byte   5
                                .byte   %11111000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11100000
                                .byte   %10000000
                                .byte   %11111000
; F
                                .byte   5
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11100000
                                .byte   %10000000
                                .byte   %11111000
; G
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10011000
                                .byte   %10000000
                                .byte   %01111000
; H
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11111000
                                .byte   %10001000
                                .byte   %10001000
; I
                                .byte   3
                                .byte   %11100000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %11100000
; J
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
; K
                                .byte   5
                                .byte   %10001000
                                .byte   %10010000
                                .byte   %10100000
                                .byte   %11000000
                                .byte   %10100000
                                .byte   %10010000
                                .byte   %10001000
; L
                                .byte   5
                                .byte   %11111000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
; M
                                .byte   7
                                .byte   %10000010
                                .byte   %10000010
                                .byte   %10010010
                                .byte   %10111010
                                .byte   %11101110
                                .byte   %11000110
                                .byte   %10000010
; N
                                .byte   6
                                .byte   %10000100
                                .byte   %10001100
                                .byte   %10011100
                                .byte   %10110100
                                .byte   %11100100
                                .byte   %11000100
                                .byte   %10000100
; O
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01110000
; P
                                .byte   5
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %11110000
; Q
                                .byte   5
                                .byte   %01101000
                                .byte   %10010000
                                .byte   %10101000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01110000
; R
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %11110000
; S
                                .byte   5
                                .byte   %11110000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %01110000
                                .byte   %10000000
                                .byte   %01111000
; T
                                .byte   5
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %11111000
; U
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
; V
                                .byte   5
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %01010000
                                .byte   %01010000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
; W
                                .byte   7
                                .byte   %01000100
                                .byte   %11101110
                                .byte   %10111010
                                .byte   %10010010
                                .byte   %10000010
                                .byte   %10000010
                                .byte   %10000010
; X
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01010000
                                .byte   %00100000
                                .byte   %01010000
                                .byte   %10001000
                                .byte   %10001000
; Y
                                .byte   5
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
; Z
                                .byte   5
                                .byte   %11111000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %00001000
                                .byte   %11111000
; [
                                .byte   3
                                .byte   %11100000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11100000
; \
                                .byte   7
                                .byte   %00000010
                                .byte   %00000100
                                .byte   %00001000
                                .byte   %00010000
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %10000000
; ]
                                .byte   3
                                .byte   %11100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %11100000
; ^
                                .byte   5
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %10001000
                                .byte   %01010000
                                .byte   %00100000
; _
                                .byte   5
                                .byte   %11111000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
; `
                                .byte   2
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %01000000
                                .byte   %10000000
                                .byte   %10000000
; a
                                .byte   5
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01111000
                                .byte   %00000000
                                .byte   %00000000
; b
                                .byte   5
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %10000000
                                .byte   %10000000
; c
                                .byte   5
                                .byte   %01111000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %01111000
                                .byte   %00000000
                                .byte   %00000000
; d
                                .byte   5
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01111000
                                .byte   %00001000
                                .byte   %00001000
; e
                                .byte   5
                                .byte   %01111000
                                .byte   %10000000
                                .byte   %11111000
                                .byte   %10001000
                                .byte   %01110000
                                .byte   %00000000
                                .byte   %00000000
; f
                                .byte   5
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %11110000
                                .byte   %01000000
                                .byte   %00111000
; g
                                .byte   5
                                .byte   %11110000
                                .byte   %00001000
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %01110000
                                .byte   %00000000
                                .byte   %00000000
; h
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %10000000
                                .byte   %10000000
; i
                                .byte   3
                                .byte   %11100000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %11000000
                                .byte   %00000000
                                .byte   %01000000
; j
                                .byte   3
                                .byte   %11000000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00100000
                                .byte   %00000000
                                .byte   %00100000
; k
                                .byte   5
                                .byte   %10001000
                                .byte   %10010000
                                .byte   %11100000
                                .byte   %10010000
                                .byte   %10001000
                                .byte   %10000000
                                .byte   %10000000
; l
                                .byte   3
                                .byte   %11100000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %11000000
; m
                                .byte   7
                                .byte   %10010010
                                .byte   %10010010
                                .byte   %10010010
                                .byte   %10010010
                                .byte   %11111100
                                .byte   %00000000
                                .byte   %00000000
; n
                                .byte   5
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %00000000
                                .byte   %00000000
; o
                                .byte   5
                                .byte   %01110000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %01110000
                                .byte   %00000000
                                .byte   %00000000
; p
                                .byte   5
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11110000
                                .byte   %10001000
                                .byte   %11110000
                                .byte   %00000000
                                .byte   %00000000
; q
                                .byte   5
                                .byte   %00001000
                                .byte   %00001000
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %01111000
                                .byte   %00000000
                                .byte   %00000000
; r
                                .byte   5
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %11001000
                                .byte   %10110000
                                .byte   %00000000
                                .byte   %00000000
; s
                                .byte   5
                                .byte   %11110000
                                .byte   %00001000
                                .byte   %01110000
                                .byte   %10000000
                                .byte   %01111000
                                .byte   %00000000
                                .byte   %00000000
; t
                                .byte   5
                                .byte   %00111000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %11111000
                                .byte   %01000000
                                .byte   %01000000
; u
                                .byte   5
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %00000000
                                .byte   %00000000
; v
                                .byte   5
                                .byte   %00100000
                                .byte   %01010000
                                .byte   %01010000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %00000000
                                .byte   %00000000
; w
                                .byte   7
                                .byte   %01000100
                                .byte   %10101010
                                .byte   %10010010
                                .byte   %10000010
                                .byte   %10000010
                                .byte   %00000000
                                .byte   %00000000
; x
                                .byte   5
                                .byte   %10001000
                                .byte   %01010000
                                .byte   %00100000
                                .byte   %01010000
                                .byte   %10001000
                                .byte   %00000000
                                .byte   %00000000
; y
                                .byte   5
                                .byte   %11110000
                                .byte   %00001000
                                .byte   %01111000
                                .byte   %10001000
                                .byte   %10001000
                                .byte   %00000000
                                .byte   %00000000
; z
                                .byte   5
                                .byte   %11111000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %00010000
                                .byte   %11111000
                                .byte   %00000000
                                .byte   %00000000
; {
                                .byte   3
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %00100000
; |
                                .byte   1
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %00000000
                                .byte   %10000000
                                .byte   %10000000
                                .byte   %10000000
; }
                                .byte   3
                                .byte   %10000000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %00100000
                                .byte   %01000000
                                .byte   %01000000
                                .byte   %10000000
; ~
                                .byte   6
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %00000000
                                .byte   %10011000
                                .byte   %01100100
                                .byte   %00000000
                                .byte   %00000000
===Start of VCS.H==========================================================

;        globals
; Atari 2600 Equates

VSYNC   equ     $00             ;   0000 00x0       Vertical Sync Set-Clear
VBLANK  equ     $01             ;   xx00 00x0       Vertical Blank Set-Clear
WSYNC   equ     $02             ;   ---- ----       Wait for Horizontal Blank
RSYNC   equ     $03             ;   ---- ----       Reset Horizontal Sync
Counter
NUSIZ0  equ     $04             ;   00xx 0xxx       Number-Size
player/missle 0
NUSIZ1  equ     $05             ;   00xx 0xxx       Number-Size
player/missle 1
COLUP0  equ     $06             ;   xxxx xxx0       Color-Luminance Player 0
COLUP1  equ     $07             ;   xxxx xxx0       Color-Luminance Player 1
COLUPF  equ     $08             ;   xxxx xxx0       Color-Luminance Playfield
COLUBK  equ     $09             ;   xxxx xxx0       Color-Luminance Background
CTRLPF  equ     $0A             ;   00xx 0xxx       Control Playfield,
Ball, Collisions
REFP0   equ     $0B             ;   0000 x000       Reflection Player 0
REFP1   equ     $0C             ;   0000 x000       Reflection Player 1
PF0     equ     $0D             ;   xxxx 0000       Playfield Register Byte 0
PF1     equ     $0E             ;   xxxx xxxx       Playfield Register Byte 1
PF2     equ     $0F             ;   xxxx xxxx       Playfield Register Byte 2
RESP0   equ     $10             ;   ---- ----       Reset Player 0
RESP1   equ     $11             ;   ---- ----       Reset Player 1
RESM0   equ     $12             ;   ---- ----       Reset Missle 0
RESM1   equ     $13             ;   ---- ----       Reset Missle 1
RESBL   equ     $14             ;   ---- ----       Reset Ball
AUDC0   equ     $15             ;   0000 xxxx       Audio Control 0
AUDC1   equ     $16             ;   0000 xxxx       Audio Control 1
AUDF0   equ     $17             ;   000x xxxx       Audio Frequency 0
AUDF1   equ     $18             ;   000x xxxx       Audio Frequency 1
AUDV0   equ     $19             ;   0000 xxxx       Audio Volume 0
AUDV1   equ     $1A             ;   0000 xxxx       Audio Volume 1
GRP0    equ     $1B             ;   xxxx xxxx       Graphics Register Player 0
GRP1    equ     $1C             ;   xxxx xxxx       Graphics Register Player 1
ENAM0   equ     $1D             ;   0000 00x0       Graphics Enable Missle 0
ENAM1   equ     $1E             ;   0000 00x0       Graphics Enable Missle 1
ENABL   equ     $1F             ;   0000 00x0       Graphics Enable Ball
HMP0    equ     $20             ;   xxxx 0000       Horizontal Motion Player 0
HMP1    equ     $21             ;   xxxx 0000       Horizontal Motion Player 1
HMM0    equ     $22             ;   xxxx 0000       Horizontal Motion Missle 0
HMM1    equ     $23             ;   xxxx 0000       Horizontal Motion Missle 1
HMBL    equ     $24             ;   xxxx 0000       Horizontal Motion Ball
VDELP0  equ     $25             ;   0000 000x       Vertical Delay Player 0
VDELP1  equ     $26             ;   0000 000x       Vertical Delay Player 1
VDELBL  equ     $27             ;   0000 000x       Vertical Delay Ball
RESMP0  equ     $28             ;   0000 00x0       Reset Missle 0 to Player 0
RESMP1  equ     $29             ;   0000 00x0       Reset Missle 1 to Player 1
HMOVE   equ     $2A             ;   ---- ----       Apply Horizontal Motion
HMCLR   equ     $2B             ;   ---- ----       Clear Horizontal Move
Registers
CXCLR   equ     $2C             ;   ---- ----       Clear Collision Latches
 
; Read Address Registers
                                                       ;		bit 7   bit 6
CXM0P   equ     $0              ;   xx00 0000       Read Collision  M0-P1
M0-P0
CXM1P   equ     $1              ;   xx00 0000                       M1-P0
M1-P1
CXP0FB  equ     $2              ;   xx00 0000                       P0-PF
P0-BL
CXP1FB  equ     $3              ;   xx00 0000                       P1-PF
P1-BL
CXM0FB  equ     $4              ;   xx00 0000                       M0-PF
M0-BL
CXM1FB  equ     $5              ;   xx00 0000                       M1-PF
M1-BL
CXBLPF  equ     $6              ;   x000 0000                       BL-PF
-----
CXPPMM  equ     $7              ;   xx00 0000                       P0-P1
M0-M1
INPT0   equ     $8              ;   x000 0000       Read Pot Port 0
INPT1   equ     $9              ;   x000 0000       Read Pot Port 1
INPT2   equ     $A              ;   x000 0000       Read Pot Port 2
INPT3   equ     $B              ;   x000 0000       Read Pot Port 3
INPT4   equ     $C              ;   x000 0000       Read Input (Trigger) 0
INPT5   equ     $D              ;   x000 0000       Read Input (Trigger) 1
 
; Atari 2600      RIOT Memory Map

; RAM equ $80                             ; 80-FF, also shadowed to $180-$1FF
 
SWCHA   equ     $280            ;                   Port A data register
for joysticks:
							;					Bits 4-7 for player 1.  Bits 0-3 for player 2.
SWACNT  equ     $281            ;                   Port A data direction
register (DDR)
SWCHB   equ     $282            ;                   Port B data (console
switches)
SWBCNT  equ     $283            ;                   Port B DDR
INTIM   equ     $284            ;                   Timer output
TIM1T   equ     $294            ;                   set 1 clock interval
TIM8T   equ     $295            ;                   set 8 clock interval
TIM64T  equ     $296            ;                   set 64 clock interval
T1024T  equ     $297            ;                   set 1024 clock interval




--
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread