Jump to content

Zexx Moore

New Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by Zexx Moore


  1. 11 minutes ago, NoLand said:

    This is in the 6502 Hardware manual, http://www.bitsavers.org/components/mosTechnology/6500-10A_MCS6500hwMan_Jan76.pdf

     

    What I do not really know, is how long the TIA takes to latch the signal. I recall somewhat faintly that it may be as much as 2 TIA clocks. But I wouldn't even know where to look this up.

    Thanks for the manual link NoLand.  I just recently bought Lance Leventhal's 6502 book on ebay, but I'm not too far in yet. 


    Regarding the latch, in the atari course I'm taking, I don't recall that being mentioned yet thus I have no idea of it's importance at this time.


  2. I'm having a challenge understanding the divide portion of this code.

     

            LDA PlayerXPos
            AND #$7F
            
            STA WSYNC
            STA HMCLR
            
            SEC
    DivideLoop:
    	SBC #15
            BCS DivideLoop
            
            EOR #7
            ASL
            ASL
            ASL
            ASL
            STA HMP0
            STA RESP0
            STA WSYNC
            STA HMOVE

     

    The video I watched stated that you wanted the remainder for the "fine" positioning, which I believe is -8 to +7.  If I use the value 20 for PlayerXPos, I expect a remainder of 5, as 15 goes into 20 one time with a remainder of 5.  After doing the exclusive or, and the four left shifts, I end up with the value 0001 for the upper 4 bits, not five.  If I worked from 30, and subtract 10 to arrive at 20, then that's out bounds of the negative range, thus it would have to be 15 + the remainder 5.

     

    I don't yet know why the one's complement is taken of the lower three bits, nor where my thinking is flawed, but it's flawed alright.    

×
×
  • Create New...