Jump to content
IGNORED

Emulation question re tv type switch on Atari 2600


guppy
 Share

Recommended Posts

This is a pretty technical question I'm interested in learning about how the Atari 2600 TV type switch works. The color/b&w switch. From an emulation standpoint, how did the switch convert the colors to grays?

 

I'm working on a little project that uses the Atari 2600 ntsc palette, and was interested in doing conversions of these colors to grayscale values. There are numerous ways to do it, and I would like to know how to do it the closest way to how the real hardware did it. For example, I can get the HSV values and drop the saturation to zero. Or I can average the values of rgb to create a grey. I'm really interested in how the Atari hardware did it, and the math that would accurately describe how the hardware did it.

 

Appreciate any advice I can get...

Link to comment
Share on other sites

Yes, entirely determined by the program...which is why the switch was used for different purposes in some games, or not even used at all. The Atari 7800's switch springs back to the upward position the same way that the Select and Reset switches do...so you might want to take this into account when writing your program.

Link to comment
Share on other sites

Bit3 of SWCHB holds it's status...1 if in the up (color) position, 0 if down (B&W). Since it's redesigned to spring back up on the 7800, SWCHB.3 does not hold a zero unless you are physically holding the switch down. So the software needs to track it's changes if you are making a game to function on either console using that switch. Fortunately, the 7800 forces a short BIOS routine into user ram when the system is powered up...so the console type can be auto-detected on powerup by testing bytes in user ram (before executing a clean start routine) to check if it is holding those specific values. User ram is in a random state on a 2600.

Link to comment
Share on other sites

A less elegant solution that still allows the switch to work in both consoles is to check when the bit goes to 0 and then back to 1. In the 7800, you just push and release the "PAUSE" button; in the 2600 you flip the "TV TYPE" switch to B/W and then back to COLOR. That's how the switch is read in "Secret Quest".

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

  • Recently Browsing   0 members

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