Re: [stella] Programming for Credit

Subject: Re: [stella] Programming for Credit
From: emooney@xxxxxxxxxxxxxxxx (Erik Mooney)
Date: Sat, 22 Mar 1997 23:20:12 GMT
>okay, some questions.
>
>1.)  is STA  TIM64T some sort of timer?

Yes.  TIM64T takes the value written to it and decrements it once every 64
machine cycles.  The value may be read at INTTIM.. when it reaches zero,
the timer has expired.

>2.)  What does the STA mean?

It means "Store Accumulator".. sends the value in the accumulator to the
specified destiation; in the 2600, the destination will always be either
RAM or a graphics/timer register.

STA is one of the 6502 assembler instructions.. if you're serious about
programming the 2600, you need a good 6502 reference.

>3.)  LDY #$08 ;how many scanlines is each block? 
>     LDX  #$17 ;number of blocks of data. LDY * LDX = 192!
>
>	Are these height and width values?  I tried messing
>around with them and ended up with  some pretty strange stuff.

They are both height values.. Each block is 8 lines, times $17 (23 decimal)
blocks = 192 scanlines, which is how many scanlines are on the screen.  If
you change either of these, without them multiplying to 192, the program
won't be drawing the corrent number of scanlines on the screen and you'll
get unpredictable effects.

>4.)  Is JMP essentially just a goto?

That's exactly what it is.

>5.) LDX  PF0 
>	What does this code do?

Theoretically, it would load the value in PF0 into the X register.  Problem
is, all the 2600 graphics registers are write-only; you can't read from
them.  PF0 is write register 13 ($0D), and read register $0D is INPT5,
which reads the trigger on the second joystick.. this line loads X with
whether or not the button on joystick 2 is pressed ($00 if it is, $80 if
it's not.)

>6.)  In the values function, are all the .BYTE $00 code lines used to
>store your graphics?  How does this work?

I don't recall exactly what Crackers' code did, so I can't help you here =)

>7.) Crackers, didn't you say you had a small program that would
>let you create graphics for the 2600 instead of having to use graph paper?

He said it would be a lot easier with one, but I don't think anyone has
actually written it.

--
Archives available at http://www.biglist.com/lists/stella/archives/
E-mail UNSUBSCRIBE in the body to stella-request@xxxxxxxxxxx to be removed.

Current Thread