Jump to content

USB Interface to Atari Classic/Modern Controllers


flickertail

294 views

My Atari VCS controllers arrived today. I spent most of the day trying to decipher the classic controller's communication.

 

I was able to get the Pico to identify both the Classic and the Modern controller using the Pico C++ SDK along with TinyUSB.

Atari VID: 3250 3252 - 0x0cb2 - EDITTED since my first post (3250 is the HEX value)

Classic - PID: 1001 - 0x03e9 - EDITTED since my first post (1001 is the HEX value)

Modern - PID: 1002 - 0X03ea - EDITTED since my first post (1002 is the HEX value)

 

I found it very confusing. After a long time searching the internet I found a short barebones tutorial on how to run the Pico as a USB host for a mouse using TinyUSB.

https://www.giters.com/a-h/pico_usb_kbd_mouse

 

Here's what I discovered about the Classic controller.

Joystick Direction: Value Range: 0-128  ( atari_classic_report_t.cDir)

  • 0     - JS is centered
  • 16   - Up/North
  • 32   - NE
  • 48   - Right/East
  • 64   - SE
  • 80   - Down/South
  • 96   - SW
  • 112 - Left/West
  • 128 - NW

 

Fire Buttons: Value Range: 0-3 ( atari_classic_report_t.cFire)

  • 0 - Neither Button is pressed
  • 1 - Thumb Button is pressed
  • 2 - Side Button is pressed
  • 3 - Both Buttons are pressed

 

Joystick Paddle Rotation: Range: 0-255 ( atari_classic_report_t.cPad) - EDITTED since my first post

  • Not sure what angle 0 is considered to be, but I'll guess directly south.
  • For those who have a classic controller
    • You'll notice that it rotates past 360 degs in both directions
    • But the paddle rotation value range of 0-255 is across a 90 deg turn

 

Joystick Revolution: Range: 0-3 ( atari_classic_report_t.cRev) - EDITTED since my first post

  • The revolution count starts at 0
  • The revolution count increments by 1 when the stick
    • is rotated a complete 360 degs 90 degrees in the clockwise direction
  • When the Revolution count reaches 0 at the end of the 4th revolution
    • (aka count 3 - a full 360 rotation)
    • the Revolution count starts over at 0
  • If rotated counter-clockwise, the the Revolution count goes to 3
    • when the rotation value drops below zero
    • (aka, it goes from Rev count 0, Rotation 0 to Rev count 3, Rotation 255)
  • As such, a full 360 revolution of the joystick in the context of a 'paddle' is 4 revolution counts (0-3) x 256 degrees of freedom (0-255). --- ADDED since my first post

 

Much of my Pico code today was based on the Dual Shock PS 4 gamepad code I mentioned previously. Not really knowing for sure what I was doing, I ended up reusing the "struct" - data structure -  that was used by the author to map the devices USB report.

 

I guess... they are the same sized report... probably just by accident. Honestly, I'm not really 100% sure how it works yet.

 

But using the same "struct" structure, the Atari Classic joystick data maps to the DSPS4 data in the following manner:

sony_ds4_report_t                            atari_classic_report_t

-------------------------------------------------------------------

           x                                                    cFire

           y                                                    cDir

           z                                                    cPad

           rz                                                   cRev

 

Once I had this all figured out, I thought... oh yeah, this should be super easy to prototype on a breadboard... I was all psyched to record JS demos of me using the Classic controller with my 7800... but I failed miserably. It's been a long day though, and I'm probably just tired.

 

I was up at 4am this morning so I could drive an hour to the nearest Target that still had the Taylor Swift special edition release in stock (4 x record vinyl album)... Christmas present for my daughter.

 

Anyway, now it's almost midnight. I'll probably let this sit for a few days before I take another look at it.

 

 

atari-cont.jpg

0 Comments


Recommended Comments

There are no comments to display.

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