Re: [stella] Games that do bad things to HMOVE...

Subject: Re: [stella] Games that do bad things to HMOVE...
From: bwmott@xxxxxxxxxxxxxx
Date: Fri, 24 Apr 1998 00:36:08 -0400 (EDT)
> Just out of curiosity, what debugger is generating that? (I really hope
> you aren't typing it... :) )

It's a trace generated by Stella...

> > Does this mean that if you hit HMOVE during let's say the middle of a 
> > scanline it would have no effect?
> 
> Or it might move the objects 30 or 40 pixels one direction. :)  experiment
> :)

Yes, it looks like a lot of experimenting is needed :-) 

> Who says they knew what they were doing?   It could've been just trial and
> error and it happened to work... I certainly did enough of that in the INV
> kernel :)  If it does avoid the HMOVE lines, though, it might be worth
> keeping and looking into.  (unfortunately, I can't think of a way to
> position a sprite variably and then do the HMOVE on cycle 74 that same
> scanline... anyone?)

Well, it's a little late but I think the following routine with the
"right" HorzTable would allow you to position P1 at any pixel location
from 0 to 120 without any HMOVE Blanks in one scanline.  I believe it
may also allow you to position P1 from pixels 145 to 159 as well.
However, there is a deadzone from 121 to 144 where P1 can't be positioned :-(
If I get the time I'll try to figure out the HorzTable and see if this 
routine works or not tomorrow.

It may be possible to arrange the code so that the 121 to 144 deadzone is
moved to the left and right sides of the screen.  If this could be done 
then the routine might be useful.

Later,
Brad

DelayTab: dc.b  8, 7, 6, 5, 4, 3, 2, 1, 0

          STA WSYNC
          LDX Player1Pos         ; +3  3
          LDA HorzTable,X        ; +4  7
          STA HMP1               ; +3  10

          AND #$0F               ; +2  12
          TAX                    ; +2  14

          DEX                    ; +2  16
          BPL                    ; +2  18

          STA RESP1              ; +3  21 + 5 * X1

; so far this has been the HMOVE format as described by Erik Mooney
; except for a different HorzTable

          TAY                    ; +2  23 + 5 * X1   (These can be moved to
          LDX DelayTab,Y         ; +4  27 + 5 * X1    shift 121-144 deadzone)

          DEX                    ; +2  29 + 5 * X1
          BPL                    ; +2  31 + 5 * X1

          STA HMOVE              ; +3  34 + 5 * X1 + 5 * X2  (should be 74)
          NOP                    ; +2  36 + 5 * X1 + 5 * X2  (should be 76)

                                 ; 0 <= X1 <= 8
                                 ; X2 = 8 - X1


--------------------------------------------------------------------------
Bradford W. Mott (bwmott@xxxxxxx)          Computer Science Department
http://www4.ncsu.edu/~bwmott/www           North Carolina State University
--------------------------------------------------------------------------

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

Current Thread