Just Jeff Posted June 17, 2018 Share Posted June 17, 2018 Good Afternoon, I'd like to do some RESPx, RESMx, RESBLs inside the kernel. Does anyone know of a chart or detailed description of which of the 76 cycle counts correspond to which pixel positions along the 160 possible pixel positions? For example, something that tells me if I RESBL at cycle 50 through 65, it puts the ball at pixel 140 or 150 or wherever. Quote Link to comment Share on other sites More sharing options...
Kiwi Posted June 18, 2018 Share Posted June 18, 2018 I did find this image that I recall seeing before,I found it at this site, http://www.masswerk.at/rc2018/04/01.htmlIt shows 3 rulers. Just a note, that this is course positioning. You'll need to use HMP0 thru HMBL to do fine positioning. Then HMOVE to apply the horizontal motion, it needs 22 cycles to work, so no command to the TIA chip at this time if I understand it correctly. This generates the blank line on the left side of the screen if you're repositioning the object midway the screen. 1 Quote Link to comment Share on other sites More sharing options...
TheHoboInYourRoom Posted June 18, 2018 Share Posted June 18, 2018 [...] it needs 22 cycles to work, so no command to the TIA chip at this time if I understand it correctly. Not every TIA command, just avoiding changing the contents of the HMxxx registers during the HMOVE. I can't remember if you already know this, BNE Jeff, but as well as multiplying the CPU cycle count by 3 to get the pixel count, there's a delay of at least 4 pixels for the RESxx strobe to take effect. Missiles and ball have a 4-pixel delay, no matter their width; single-width players have a 5-pixel delay; and double- and quad-width players have a 6-pixel delay (see here and the post immediately after it). 3 Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted June 18, 2018 Share Posted June 18, 2018 I have already previously posted an explanation here of RESx behavior here: http://atariage.com/forums/topic/266156-atari-flashback-portable-programming-considerations/?p=3802407 Note that the rules are slightly different when you strobe RESx during HBLANK: This will cause the counter to wrap two color clocks earlier, so the resulting position will be shifted by two pixels to the left. And there is a small time window just before an extended HBLANK (the one that you get when you use HMOVE as it is intended) where the shift will only be one single pixel 1 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 19, 2018 Share Posted June 19, 2018 I did find this image that I recall seeing before, I found it at this site, http://www.masswerk.at/rc2018/04/01.html It shows 3 rulers. Just a note, that this is course positioning. You'll need to use HMP0 thru HMBL to do fine positioning. Then HMOVE to apply the horizontal motion, it needs 22 cycles to work, so no command to the TIA chip at this time if I understand it correctly. This generates the blank line on the left side of the screen if you're repositioning the object midway the screen. Bit of an amateurish diagram, if you ask me.... 5 Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted June 19, 2018 Share Posted June 19, 2018 BTW: That website is pretty good for beginners. 1 Quote Link to comment Share on other sites More sharing options...
NoLand Posted June 19, 2018 Share Posted June 19, 2018 (edited) Bit of an amateurish diagram, if you ask me.... It should be mentioned that the diagram is a copy from AtariAge, "2600 Programming For Newbies, Part 2" (compare the link provided with the image), http://atariage.com/forums/topic/29326-session-18-asymmetrical-playfields-part-2/ I'm not sure, if you are the original source. If so, thanks for producing the diagram! I think, it serves the purpose quite well. (author of that page / mass:werk, here) Edited June 19, 2018 by NoLand 1 Quote Link to comment Share on other sites More sharing options...
NoLand Posted June 19, 2018 Share Posted June 19, 2018 BTW: That website is pretty good for beginners. Thanks! :-) It's worth mentioning that it was merely meant to allow bystanders to follow the project and not as a general tutorial. So it covers only what may be of a more general interest (what ever this may mean for readers who are already actively into retro computing in a way or another) and what arose in the course of that particular project. Notably, this was also my first attempt on Atari 2600 programing and I may not claim any higher expertise. (On the other hand, I tried to convey what I had learned and to provide some resources. If this is found useful or of service to others, I'm glad.) 2 Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 21, 2018 Share Posted June 21, 2018 It should be mentioned that the diagram is a copy from AtariAge, "2600 Programming For Newbies, Part 2" (compare the link provided with the image), http://atariage.com/forums/topic/29326-session-18-asymmetrical-playfields-part-2/ I'm not sure, if you are the original source. If so, thanks for producing the diagram! I think, it serves the purpose quite well. (author of that page / mass:werk, here) Yes I am the original author. Took many hours. I am happy for it to be shared and used, I was just having a bit of a laugh. 1 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 21, 2018 Author Share Posted June 21, 2018 Thanks Everybody! I've been digesting all of this slowly. Surely, I'll have questions soon.. Quote Link to comment Share on other sites More sharing options...
NoLand Posted June 21, 2018 Share Posted June 21, 2018 Yes I am the original author. Took many hours. I am happy for it to be shared and used, I was just having a bit of a laugh. Thank's again, your effort is much appreciated! Since it's about sharing, here's in return my amateurish version of the VCS block diagram for public use (It's close to what is found in the TIA-1A manual and in the "Reconstructed Stella Programmer's Guide): http://www.masswerk.at/rc2018/04/images/e01-stella-block-diagram.png 1 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted June 30, 2018 Author Share Posted June 30, 2018 Two more questions.. How many lines of playfield will make a square? In other words, a PF pixel is 4 clocks wide but it looks like it might take 5 scan lines to make a square with that- is that the closest? And a related question, when using objects to draw lines, what's a good way to make a 45 degree line? Right now I'm using object speeds of -1 and 1 in a one line kernel, and it looks like its closer to a 30 degree line. Would using an HMOVE every other line instead of every line make it closer to 45 degrees or would that just make the line too vertical? Quote Link to comment Share on other sites More sharing options...
bluswimmer Posted June 30, 2018 Share Posted June 30, 2018 Two more questions.. How many lines of playfield will make a square? In other words, a PF pixel is 4 clocks wide but it looks like it might take 5 scan lines to make a square with that- is that the closest? And a related question, when using objects to draw lines, what's a good way to make a 45 degree line? Right now I'm using object speeds of -1 and 1 in a one line kernel, and it looks like its closer to a 30 degree line. Would using an HMOVE every other line instead of every line make it closer to 45 degrees or would that just make the line too vertical? Eight playfield lines will create a square. Generally, a single pixel on the 2600 is about twice as wide as it is tall. And yes, using an HMOVE every other line will create a 45 degree angle. 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted June 30, 2018 Share Posted June 30, 2018 I crashed into this while doing the Aardvark title screen, I couldn't get the right aspect ratio. After some serious research (i.e. G search) the aspect ratio is 12/7. This means a pixel is almost double wide in comparison to its vertical size. 1 Quote Link to comment Share on other sites More sharing options...
JeremiahK Posted June 30, 2018 Share Posted June 30, 2018 Also note that the NTSC and PAL systems are slightly different, so what looks like a square in one region might be a bit skewed in the other. 2 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.