Jump to content
IGNORED

Programming for the Trackball


BigO

Recommended Posts

More of an academic "how does it work" type question than anything else.

 

I expect your first response will be "It works just like a joystick, bonehead."

 

I think I pretty well understand how it works from a hardware level. I've seen the signals on an oscilloscope while repairing a 5200 (my first: owning, playing and repairing.) The way it seems to work is that spinning the trackball produces a variance in the output voltage level, thus simulating the action of the potentiometers in the joystick.

 

Now, finally, here's my actual question. Once the ball stops spinning, the voltage returns to it's "neutral", unmodified level. This being the case, how do games like Centipede not move the player back to a neutral position once the ball stops spinning?

Link to comment
Share on other sites

Well, I think I answered my own question as a result of just asking the question. I had been thinking that, being analog, the joystick would control position directly. Instead, at least in some games, joystick position must control the rate and direction of player motion instead of player position. Move it back to zero and the motion stops. Trackball stops spinning, player stops moving.

 

I'm new to the 5200, so I have another bonehead question. Since the sticks are non-self-centering, I had assumed that the games would work like the typical paddle game in the 2600 world: a given setting represents a position on screen. Apparently, this just ain't so. Are there 5200 games in which the player's position correlates directly to the position indicated by the joystick?

 

Just curious.

 

 

[Edit]: So I don't look like a complete idiot, I couldn't do much testing with the joysticks as, you guessed it, they're not working right. I got a pile of dead trackball controllers and was able to get one of them working without to much ado, hence my joystick-ignorant position.

 

I got the joystick controllers working okay, but the stupid flexible circuit connector doesn't seem to want to stay in the socket. The buttons work until I close the thing up tight. More work on that later. :)

Edited by BigO
Link to comment
Share on other sites

The 5200 sticks read similar to paddles, ie a position registers a value from 0 to 227 (vertically or horizontally).

 

The range of movement in a joystick isn't really enough to correlate precisely to an exact screen position, so most games would just use a range of values to correspond to a given direction and velocity.

A game like Breakout would be next to unplayable if the joystick directly controlled the bat's position. The slightest movement would cause it to rocket out of control.

 

 

Since most 5200 games were just ports from the computer range, many just had a left zone, dead zone and right zone.

 

Trackball? I'm not sure.

 

With the 8-bit computers, the trackball is the same as a mouse for reading. Two bits of input are assigned to X and Y directions, and the bit pairs just go through a succession of values when the ball is moved along each axis.

 

Since the 5200 doesn't have a PIA, obviously it would need to read the trackball by other means.

Edited by Rybags
Link to comment
Share on other sites

I haven't put a meter to it yet and didn't find it documented anywhere; what is the overall range of resistance supplied to the console by those 5200 controllers? Is it an overall range difference or an issue of lacking the fine control that would preclude the direct positioning mode? Some 2600 paddle games use only about 90 degrees of rotation. The 5200 joystick is probably more restricted than that.

 

Left, right, dead: so, essentially, most games act as though the analog stick is actually a digital stick.

 

I've found that the trackball doesn't work with some games. Their left and right zones must be expected to be farther out in the range than the trackball can manage...or that I can manage with the trackball. On Popeye and Wizard of Wor for example, I can't get the players to move.

 

Speaking of those twitchy OEM hand held controllers, do any games actually use the keypad during play or is it only used for setup?

 

 

The 5200 sticks read similar to paddles, ie a position registers a value from 0 to 227 (vertically or horizontally).

 

The range of movement in a joystick isn't really enough to correlate precisely to an exact screen position, so most games would just use a range of values to correspond to a given direction and velocity.

A game like Breakout would be next to unplayable if the joystick directly controlled the bat's position. The slightest movement would cause it to rocket out of control.

 

 

Since most 5200 games were just ports from the computer range, many just had a left zone, dead zone and right zone.

 

Trackball? I'm not sure.

 

With the 8-bit computers, the trackball is the same as a mouse for reading. Two bits of input are assigned to X and Y directions, and the bit pairs just go through a succession of values when the ball is moved along each axis.

 

Since the 5200 doesn't have a PIA, obviously it would need to read the trackball by other means.

Link to comment
Share on other sites

The 5200 trackball has circuitry to simulate the action of a joystick. The faster you roll the ball, the further the stick appears to be pressed. In games like Centipede the values are taken to mean velocity, not position.

 

There is a pin in the 5200 controller port used to detect the trackball, but I'd have to go look up how it works (maybe when I'm not at work).

 

This thread discusses the trackball:

 

http://www.atariage.com/forums/index.php?showtopic=43965

Edited by Bryan
Link to comment
Share on other sites

The 5200 trackball has circuitry to simulate the action of a joystick. The faster you roll the ball, the further the stick appears to be pressed. In games like Centipede the values are taken to mean velocity, not position.

 

There is a pin in the 5200 controller port used to detect the trackball, but I'd have to go look up how it works (maybe when I'm not at work).

 

This thread discusses the trackball:

 

http://www.atariage.com/forums/index.php?showtopic=43965

 

It's not really a special pin that detects it just a technique using the normal pins. Here is a post I made about it a while back:

 

"The key is bit 2 or the CONSOL ($C01F) register which enables/disables the pots in the controllers (I believe a 0 disables the POTs). When you disable the pots in a normal controller they always return $E4 which is the max pot value that can be returned. But when you disabled the trackball it returns a $7A which is also the value that the trackball returns when it is at rest. So you can use this to determine whether a trackball or stick is connected.

"

Link to comment
Share on other sites

  • 2 weeks later...

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