Jump to content
IGNORED

3 questions


Recommended Posts

1) When you write to RESP0 it draws the sprite at that location +/- the HMP0 register value - is this correct? So if you do this during VBLANK, how does TIA remember which pixel position/colour clock it occurred on because it doesn't matter what value you write to RESP0, it isn't like a VICII x register?

 

2) Internally in the 650x processor, when it does SBC, is it converting the number to 2's complement and adding with the carry bit like you would if you were doing it by hand?

 

3) I have a sprite moving around the screen (yay!) using code I scabbed from the collect tutorial, with a playfield showing, but about 2/3 of the way across the screen, the little guy moves up a line for some reason.  Why is this?

 

 

 

 

Link to comment
Share on other sites

1) When you write to RESP0, which is a strobe register, TIA will save the current horizontal position of the electron beam as the X position of player0.  

 

Quote

Strobe registers have the same interface as normal hardware registers, but instead of storing data, they trigger an action each time they are written to (or, in rare cases, read from). They are a means of signaling.


When RESP0 is strobed the value in HMP0 is not used for anything - only when you strobe HMOVE is the value in HMP0 added to the X position of player0. Strobing RESP0 once, then changing the value in HMP0 and strobing HMOVE over multiple scanlines can be used for advanced techniques, such as drawing the dragon in Medieval Mayhem.

 

image.thumb.png.ef9250149a0d64f6d07b2ec5c91ebb55.png

 

2) I do not know how the internals of the 650x processor works, somebody else would have to help with this question.

 

3) for questions like this attach your source code and ROM so we can see what you're doing. As a guess you're most likely updating GRP0 mid-scanline, which can cause shearing.  This is covered in Step 4 - 2 Line Kernel of the Collect tutorial.

 

Quote

For moveable objects(player0, player1, missile0, missile1 and ball) if you update their graphics during the Visible Screen (cycles 23-76) you run the risk of shearing. For something that's moving fast, like the snowball in Stay Frosty 2, shearing may be an acceptable design compromise:


sheared snowball.png
 

That snowball should be square, but the left edge has sheared due to the ball object being updated mid-scanline.
 
To prevent shearing we need to update the objects on cycles 0-22.

 

  • Like 2
Link to comment
Share on other sites

18 hours ago, marienbad said:

1) When you write to RESP0 it draws the sprite at that location +/- the HMP0 register value - is this correct? So if you do this during VBLANK, how does TIA remember which pixel position/colour clock it occurred on because it doesn't matter what value you write to RESP0, it isn't like a VICII x register?

Just a little more on this..  TIA is always running, so even though you are in VBLANK, all of the colors and horizontal positions are still "there".  How does it remember?  It remembers everything you told it and holds it until you change it.  This is why you see stripes when you pull a cartridge out.  Its showing the last things you told it, on every scan line, forever.

 

So  if you think of Pong, for example.  It's only necessary to set the paddles once when the game is turned on, then TIA remembers.  Only the ball needs to be updated every frame.

Link to comment
Share on other sites

20 hours ago, SpiceWare said:

1) When you write to RESP0, which is a strobe register, TIA will save the current horizontal position of the electron beam as the X position of player0.  

 


When RESP0 is strobed the value in HMP0 is not used for anything - only when you strobe HMOVE is the value in HMP0 added to the X position of player0. Strobing RESP0 once, then changing the value in HMP0 and strobing HMOVE over multiple scanlines can be used for advanced techniques, such as drawing the dragon in Medieval Mayhem.

 

image.thumb.png.ef9250149a0d64f6d07b2ec5c91ebb55.png

 

2) I do not know how the internals of the 650x processor works, somebody else would have to help with this question.

 

3) for questions like this attach your source code and ROM so we can see what you're doing. As a guess you're most likely updating GRP0 mid-scanline, which can cause shearing.  This is covered in Step 4 - 2 Line Kernel of the Collect tutorial.

 

 

Both those look amazing, especially that dragon!

Link to comment
Share on other sites

32 minutes ago, marienbad said:

Both those look amazing, especially that dragon!

 

Thanks!  I figured out how to do it after playing Dolphin for the HSC and realizing the dolphin and squid were larger, and way more detailed than they should be:

 

751949159_Dolphin(1983)(Activision).thumb.png.5cb1bb203804b984d3e3ecdb25221384.png

 

Matthew Hubbard talks about it in this interview:

Quote

SS: How did the idea for Dolphin come about?

 

MH: I wanted to make a game where the main characters were a little bigger than normal on the 2600, using double-size mode and line-by-line single pixel shifting. I experimented with making a dolphin animation, and everyone who saw the early screens knew immediately that the pixels represented a dolphin, so I moved forward from there.

 

It was done in earlier games too, the horse in Stampede:

 

882054328_Stampede(1981)(Activision).thumb.png.3bd2a0b59acb341cfdbc61f65dd3fc9c.png

 

and the shark in Fishing Derby:

 

1252597941_FishingDerby(1980)(Activision).thumb.png.85b5ca926b464d187ff76e19058f5798.png

Link to comment
Share on other sites

On 3/23/2021 at 12:54 AM, marienbad said:

2) Internally in the 650x processor, when it does SBC, is it converting the number to 2's complement and adding with the carry bit like you would if you were doing it by hand?

 

SBC uses the one's complement and then performs an addition.

The carry flag is set for subtraction, clear for addition.

 

 

 

 

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...