Re: [stella] Is there an error in the Stella Manual?

Subject: Re: [stella] Is there an error in the Stella Manual?
From: Chris Wilkson <ecwilkso@xxxxxxx>
Date: Mon, 7 Sep 1998 21:50:20 -0400 (EDT)


On Mon, 7 Sep 1998, Chris Cracknell wrote:

> I think I might have my clock finished. The sprites are all doing what I
> want them to and I just implimented a requested feature. A friend liked the
> clock but didn't like the 24 hour format. So I made the B/W switch toggle
> between a 12 hour and 24 hour clock. I got it working but I had a hard time
> doing it. There seems to be a discepancy between what the Stella manual says
> and what my 2600 says.

I can't get the 24hr clock to work on stella.  But the sprites kick ass!!!

Very cool...

> In the Stella Manual the data bits for SWCHB says:
>
> D3 - B/W Switch

I don't remember the others, but the bw/color switch is indeed d3.

> But here is the code I had to use to read the B/W switch
> 
> joy     lda SWCHB
> 	and %0010000
> 	cmp %0010000
> 	bne swa
> 	lda HOURS
> 	cmp #$0c
> 	bpl swa
> 	lda #$17
> 	sta HOURS
> 
> On my 2600 D5 is the B/W switch, D3 is select, and D2 is reset.
> 
> Is there an error in the manual, my code, or is there something odd with
> my 2600.

Try this to read the bw/color switch:

joy	lda	SWCHB
	and	#08	; sets the z flag if bit 3 = 0
			; clears it otherwise
	beq	bw	; I forget which is black and white, 0 or 1... :)
color	...
	...
	...

This worked in my hacked version of the playfield demo
(on PCAE and multiple 2600s).  And it matches what the
Stella docs say.

-Chris


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

Current Thread