Re: [stella] Horizontal

Subject: Re: [stella] Horizontal
From: Andrew Towers <mariofrog@xxxxxxxxxxx>
Date: Wed, 05 Mar 2003 16:44:21 +1100

When I change the loads to take up 18 cycles it works fine. Apparently it has to do with RESPx only being accurate to 5 cycles. Is this correct? When the loads take up 18 cycles then RESPx happens on intervals of 5.

Since you're doing a HMOVE on the same line, cycle 24 *is* technically inside the extended HBlank, so I'd say this is the root of your problem. By starting on cycle 18 you're moving the minimum RESP1 cycle to 25, which seems to be safe but only by the barest of margins (it's still 1 pixel inside the extended HBlank.)

As I understand it, RESPx is perfectly accurate on any CPU
cycle. The Stella Programmers Guide states only that:

  "Since there are 3 color clocks per machine cycle, and it
   can take up to 5 machine cycles to write the register, the
   programmer is confined to positioning the objects at 15
   color clock intervals across the screen."

This was written with the assumption that the programmer
would be using a DEY/BNE (or SBC/BNE) loop to perform the
positioninig. However it places no restrictions on which
CPU cycle the 5-cycle loop starts, although the statement
is somewhat ambiguous ;)

- M.

Archives (includes files) at
Unsub & more at

Current Thread