Jump to content
IGNORED

Graphics Questions


Just Jeff

Recommended Posts

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.

Link to comment
Share on other sites

I did find this image that I recall seeing before,

e01-vcs-playfield-asym-timing.png
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.

  • Like 1
Link to comment
Share on other sites

[...] 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).

  • Like 3
Link to comment
Share on other sites

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 :P

  • Like 1
Link to comment
Share on other sites

I did find this image that I recall seeing before,

 

e01-vcs-playfield-asym-timing.png

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....

  • Like 5
Link to comment
Share on other sites

 

 

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 by NoLand
  • Like 1
Link to comment
Share on other sites

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.)

  • Like 2
Link to comment
Share on other sites

 

 

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.

  • Like 1
Link to comment
Share on other sites

 

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

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

  • 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...