Jump to content
  • entries
    62
  • comments
    464
  • views
    86,887

Enhanced paddle concept


Guest

601 views

Atari paddles jitter. This is a consequence of a design which makes the wiper resistance part of the measurement. There's another way to read a potentiometer which works better: put a fixed voltage on the pot and measure the voltage at the wiper. Although severe grunge can still cause slight jitter, it will generally be on the order of 2-3 degrees--far less than in the normal design.In addition to the jitter problem, Atari paddles are time-consuming to read. Because measurements take many milliseconds, they must be polled repeatedly during a large part of the game kernel. This severely limits the types of displays the kernel can produce.I would like to offer a solution to both these problems.The paddle enhancement mod would involve opening up each paddle in a pair and rewiring it to include a small 8-pin microcontroller ($3.15 quantity 1, or about $2 in quantity 25) and two capacitors. A perboard could be used, but it may be just as easy to simply glue the part in place. Although one microcontroller could handle both paddles, doing things that way would require replacing the cabling; using a separate micro in each controller avoids that hassle.The micro would supports two methods of reading:-1- Dump the load capacitor on the paddle bin using the appropriate bit in VBLANK, then wait for the appropriate TIA input to switch (as is done with current software).-2- Output a special code sequence using the paddle's fire button "input" pin and read pack the paddle position serially over the course of 2-3 scan lines.The former approach would work with current software, and with future homebrews that are designed for standard paddles. The latter approach would be usable by new homebrew software that was written to use the enhanced paddles. While I would guess many authors would prefer to be compatible with old paddles, the CPU load they impose would make some games impossible to program. Further, adding paddle support to existing games would be much easier with the latter approach than the former.Proposed format details Output a low pulse on the fire button "input" that lasts at least 32us, then float the pin for 20 cycles, output low for 4, float for 15 or 21 (see below), then output low for 4, float for 9, and then read nine bits of data (position + button) at a rate of 13 cycles/bit.The data would be output in a somewhat unusual sequence depending upon the time between the last two falling edges. If it was 19 cycles (4+15), the data would be output in the sequence (0, 2, 4, 6, 1, 3, 5, 7). If 25 cycles (4+21), the sequence would be (4, 6, 0, 2, 5, 7, 1, 3). In either case, bits 0, 1, 4, and 5 would be inverted and the other bits not.Note that if the AtariVox EEPROM is being used during a paddle read, it may be necessary to adjust the code to set up SWCHA/SWACTL to avoid disrupting it.Note that the code to read the pots starts by reading the data from the two pots intermixed, and then fixes them.

6507 code:  lda #$00  sta SWCHA  lda #$C0  sta SWACTL ; Do whatever you like here, so long as it takes at least 32us.  ldx #$00  stx SWACTL ; Float the pins  SLEEP 14  lda #$C0  sta SWACTL  stx SWACTL  SLEEP 11  sta SWACTL  stx SWACTL  SLEEP 5  lda SWCHA ; Bit 0  lsr  lsr  nop  nop 0  eor SWCHA ; Bit 2  lsr  lsr  lsr  sta pot1  lda SWCHA ; Bit 4  lsr  lsr  lsr pot1  eor SWCHA ; Bit 6  eor pot1  and #$F0  eor.w pot1  ldx SWCHA ; Bit 1  sta pot1  txa  lsr  lsr  eor SWCHA ; Bit 3  lsr  lsr  lsr  sta pot2  lda SWCHA ; Bit 5  lsr  lsr  lsr pot2  eor SWCHA ; Bit 7  eor pot2  and #$F0  eor.w pot2  ldx SWCHA  stx potbuttons  sta pot2  asl  eor pot1  and #$AA  eor pot1  tax  lda pot1  lsr  eor pot2  and #$55  eor pot2  sta pot1  stx pot2

A somewhat nasty bit of code, perhaps, but it should take less than 3 scan lines to execute. Much nicer than having to kill 8 cycles/loop within the kernel.If all four pots must be read, the above code would be used to read the first two and similar code would read the second, but some of the shifts would be reversed and the initial trigger sequence would be 6 cycles longer (causing the micro to resequence the bits).Does all that seem practical?

4 Comments


Recommended Comments

The intersection of the two sets "people who want this mod" and "people with the technical skill to do it themselves" is probably very small. I'm sure a few would do the mod, but I think it has potential to sell quite a few units if you make it into a pass-through adapter (if this is even possible.) That is, a DB9 male and female with the microcontroller in between in a tiny case. I don't know how much this would cost, but it would be more likely to catch on and it would work with two paddles at once.

Link to comment
The intersection of the two sets "people who want this mod" and "people with the technical skill to do it themselves" is probably very small.  I'm sure a few would do the mod, but I think it has potential to sell quite a few units if you make it into a pass-through adapter (if this is even possible.)  That is, a DB9 male and female with the microcontroller in between in a tiny case.  I don't know how much this would cost, but it would be more likely to catch on and it would work with two paddles at once.

 

Solving the jitter problem would require modifying the paddle assemblies; a pass-through adapter alone would not suffice. Using a pass-through adapter would allow the mod to be made simpler--either a simple wire between the unconnected end of the pot and the ground terminal on the button (which would prevent the paddle from working without the pass-through adapter) or a shotky diode between those points (anode on the switch ground) which would allow the paddles to be used with or without the adapter.

 

Easing the software interface without solving the jitter problem would certainly be possible with an adapter, though I would see that as being more of a chicken-and-egg problem. People aren't going to spend money on an adapter with no software support, and people aren't going to write games for an adapter nobody has. The anti-jitter feature would IMHO be the key to making the microcontrollers useful even without special software support, and I see no way around requiring a paddle mod for that.

 

Though there is another possibility... are there any other cheaply- and commonly-available analog controllers? Perhaps one of those might be adaptable?

Link to comment

Just a note here: If you do come up with something that can be sold cheaply (like a passthrough adaptor) then you could get it into a bunch of peoples hands by bundling it with a homebrew game that uses it.

 

That solves the problem of nobody buying something with no software support and also the problem of no one writing software for something that no one has.

 

It just needs to be cheap enough: < $10 for sure, < $5 preferable.

 

I've been thinking about writing a game that would require, and would come bundled with, the Memcard, as another example. At $10 a pop (perhaps less if bundled with a game) I think people would buy the bundle if the game required it and the game was worth it. :|

 

Being able to read a paddle in 3 scanlines outside the kernel would certainly make an Arkanoid port much simpler. Actually - since one of my goals is to write a paddle game this year, if you come up with something that can be cheaply bundled with a homebrew game, I almost certainly would write something that would use it. Both of my tentative paddle ideas could use it. No promises, but... :|

 

On the other hand, emulator support is an issue.

 

EDIT: And speaking of this, have you talked to Al or Richard H. about adding an option to bundle a Memcard or AVox with SOG? I think SOG makes enough use of the Memcard to make that a reasonable idea. Might get more people to buy one of those devices then would otherwise.

Link to comment

I don't know about you, but I find that controllers are not fun to organize. If new paddles could be backwards-compatible, that's great. Otherwise it would be difficult to convince me to acquire another controller with more cables to get tangled.

Link to comment
Guest
Add a comment...

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