Re: [stella] Does this look right? (clock)

Subject: Re: [stella] Does this look right? (clock)
From: Chris Wilkson - MCD <cwilkson@xxxxxxxxxxxxx>
Date: Wed, 1 Oct 1997 16:06:54 -0700 (PDT)
>Well, I'll need a clock for my virtual pet game, and unfortunately the
>2600 does not have a time clock like the C-64. But I'm hoping this code
>(stuck first thing into the overscan) will accomplish my time keeping
>needs. Is there an easier way to do this?

Try this.  Frames, seconds, minutes, and hours count down instead of up.
You can deal with this later.  Days count up.

-Chris

START	LDA	#60		; 50 for PAL
	DEC	FRAMES
	BNE	END
	STA	FRAMES
	;LDA	#60		; uncomment for PAL
	DEC	SECS
	BNE	END
	STA	SECS
	DEC	MINS
	BNE	END
	STA	MINS
	LDA	#24
	DEC	HOURS
	BNE	END
	STA	HOURS
	INC	DAYS

	END	...
    		...
    		...

--
Archives updated once/day at http://www.biglist.com/lists/stella/archives/
Unsubscribing and other info at http://www.biglist.com/lists/stella/stella.html

Current Thread