marienbad Posted March 22, 2021 Share Posted March 22, 2021 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? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 22, 2021 Share Posted March 22, 2021 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. 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: 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. 2 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted March 23, 2021 Share Posted March 23, 2021 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. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 23, 2021 Share Posted March 23, 2021 Yep, Combat's interesting as well - RESP0 and RESP1 are only hit when a new game is started to set the initial X position of each player. After that HMP0 and HMP1 plus HMOVE are used each frame to shift the tanks/planes left/right as needed. Quote Link to comment Share on other sites More sharing options...
marienbad Posted March 23, 2021 Author Share Posted March 23, 2021 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. 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! Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 23, 2021 Share Posted March 23, 2021 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: 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: and the shark in Fishing Derby: Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted March 23, 2021 Share Posted March 23, 2021 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.