swiley Posted December 16, 2009 Share Posted December 16, 2009 I noticed that if you reset a player multiple times on one scan line it isn't drawn at all. I lost the original program I found this in (I was afraid of asking then) so I modified the How to Draw a Playfield example to show this. Is this a bug in stella, or can you not do this on a real Atari? I thought I read somware that you could do this to make a backround that repetaed the same pattern over and over again but I can't remember where that was. thanks in advance for your answeres. dos.bin dos.asm.txt Quote Link to comment Share on other sites More sharing options...
e1will Posted December 16, 2009 Share Posted December 16, 2009 I noticed that if you reset a player multiple times on one scan line it isn't drawn at all. I lost the original program I found this in (I was afraid of asking then) so I modified the How to Draw a Playfield example to show this. Is this a bug in stella, or can you not do this on a real Atari? I thought I read somware that you could do this to make a backround that repetaed the same pattern over and over again but I can't remember where that was. thanks in advance for your answeres. I haven't gone through the .asm you posted, but here's how I do it in the game I'm working on: WriteLives STA WSYNC NOP3 WriteLives_loop LDA graphicPtr,Y DEY BPL KeepOnWriting RTS KeepOnWriting STA.w GRP0 STA GRP1 REPEAT 8 STA RESP0 STA RESP1 REPEND STA RESP0 STX GRP1 STX GRP0 JMP WriteLives_loop It's a little clunky, but it works. Give that a try in Stella... works fine with 2.8.x and 3.0. Hope this helps. --Will Quote Link to comment Share on other sites More sharing options...
e1will Posted December 16, 2009 Share Posted December 16, 2009 Oops, I should have mentioned you'll need to set NUSIZn appropriately before calling that: LDA #$01 STA NUSIZ0 STA NUSIZ1 --Will Quote Link to comment Share on other sites More sharing options...
swiley Posted December 16, 2009 Author Share Posted December 16, 2009 Thanks so much! that worked! Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted December 17, 2009 Share Posted December 17, 2009 Thanks so much! that worked! Yes, it's just the way the TIA works. If you reset the position of a player on a given scan line, its primary copy will not appear on that scan line-- that is, unless it's already been drawn. For example, if you reset player0 to screen position 2 on the last line of VBLANK before the active area, then it will appear at that position on (active) scan line 1. Then on line 1 you could reset player0 to screen position 18, and it might not display a second time on line 1, but it will display there on line 2. Then on line 2 you could reset player0 to screen position 34, and it will display there on line 3. Do as long as you wait until after the player has been drawn on a line, and then reset it to a position to the right of that one, it will appear once per line, and will be moved to the right on the next line, like this: ...XXXXXXXX ...................XXXXXXXX ...................................XXXXXXXX etc. Note that you cannot do the same thing going to the left: ...................................XXXXXXXX ...................XXXXXXXX ...XXXXXXXX Instead, you would have to leave at least one blank line between the leftward repositionings: ...................................XXXXXXXX ....................... ...................XXXXXXXX ....................... ...XXXXXXXX If you keep resetting a player multiple times on each line, chances are it won't ever get a chance to be drawn, because on the next line down-- where it would first appear at the new position-- you'll be resetting it to some position that's way to the left of the last position you'd set it to on the previous line, see? On the other hand, the extra copies of a player will be displayed on the line where you reset the player, as long as you wait long enough between each strobe of RESPx to give the first extra copy a chance to be displayed. So if you set NUSIZx to display 2 copies, you can get one copy that displays (the second copy), and keep getting additional copies of it by repeatedly strobing RESPx (but not too quickly between each strobe). It's confusing, but once you "get" it, it's easy. Michael 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.