[stella] *Why* does the AtariVox work?

Eckhard Stolberg Eckhard_Stolberg at web.de
Wed Apr 16 11:03:40 CDT 2008


> OK, can someone trace the following code, stating what's in A after each 
> instruction (and a brief description of why):
> 
>    lda #%11111111
>    sta SWACNT
> 
>    lda #%11000011
>    sta SWCHA
> 
>    lda #%00000000
>    lda SWCHA
> 
> I think I know the issue, but I'd like confirmation.

I didn't try this on real hardware, but I think after the last
instruction A should be #$ab0000cd where abcd depend on what is
connected to the left and right controller ports. Pulling a pin
on the controller port low should always take priority no matter
if it's done internally by writing to SWCHA or externally by a
controller that connects the pin to ground.

Star Raiders does this. It sets all bits in SWACNT to output so
it can select the row for the keyboard controller. But it still
manages to read the joystick input on the left port, because it
writes #$1111xxxx to SWCHA, which still allows the joystick to
pull the direction pins low.


Ciao, Eckhard Stolberg




More information about the Stella mailing list