Jump to content
IGNORED

Adapting Jaguar controller to use on Intellivision for about $5


Uzumaki

Recommended Posts

Without damaging Jaguar controller!

 

I wanted to build one some years ago when I first saw this:

post-11037-0-32307200-1366857082_thumb.jpg

from http://www94.pair.co...ag_adapter.html

 

But it required a lot of parts, an osciloscope to set initial timing, and the resulting box is huge. BLAH.

 

Last year I started experimenting with Arduino (www.arduino.cc) and it did occur to me using a $3 microchip (blank ATMega328 from mouser if you can load bootloader yourself) can make this a reality without the bulk!

 

After a successful project to connect Playstation controller to my Atari Lynx, I decided to tackle Jaguar to Intellivision. No library exists so I had to come up with a code to read Jaguar controller and manipulate Intellivision controller lines. Jaguar controller and Intellivision controller both uses negative logic (ground when button is pressed) so it's fairly simple with no bit flipping.

 

/*
Jaguar controller pinout
pin 1 = Col (option, 3, 6, 9, #)
pin 2 = Col (C, 2, 5, 8, 0)
pin 3 = Col (B, 1, 4, 7, *)
pin 4 = Col (Pause, A, N, S, E, W)
pin 6 = Row (pause) There seems to be room for 3 more buttons, maybe Pro controller uses it on this row?
pin 7 = +5VDC Source (typical VGA video extension cable has this pin missing, BEWARE!!)
pin 9 = GND
pin 10 = Row (A, B, C, Option)
pin 11 = Row (E, 1, 2, 3)
pin 12 = Row (W, 4, 5, 6)
pin 13 = Row (S, 7, 8, 9)
pin 14 = Row (N, *, 0, #)
Pin 5, 8, and 15 is not used
See http://emu-docs.org/Jaguar/Controllers/jagcont.html for pinout info and details
I have seen a couple diagram that has pin 6 and 9 flipped but a test run of this code confirms the above seems correct.

Jaguar controller has negative logic. The row line goes low when a button is pressed.
*/
/*
Intellivision pins
Intellivision has 2 different pinouts depending on which models. Intellivision II and Sears Super Video Arcade uses standard and common 9 pin D connector
The wiring between Arduino and Intellivision 2/Sears follows the same numbering as standard 9 pin D connector.
For other Intellivision whose conntroller can't be detatched without taking the system apart, the are 9 pin in line as follow:

5 4 3 2 1 9 8 7 6
Brn Red Orn Yel Grn Blu Blk Gry Wht

Pin 5 on D-sub connector and black wire on in line connector are ground and is connected to Arduino ground. This is important, no ground connection can lead
to unpredictable result.
*/
#define LED_HB 9 // LED "heart beat" to show it is running. Can remove it in final revision
int InvUp=HIGH; // up button
int InvDo=HIGH; // down burron
int InvLe=HIGH; // left, obviously
int InvRi=HIGH; // right
int Inv0=HIGH; // button 0, et al.
int Inv1=HIGH;
int Inv2=HIGH;
int Inv3=HIGH;
int Inv4=HIGH;
int Inv5=HIGH;
int Inv6=HIGH;
int Inv7=HIGH;
int Inv8=HIGH;
int Inv9=HIGH; // button 9 on Intellivison
int InvCl=HIGH; // clear button from Jaguar * button
int InvEn=HIGH; // enter button from Jaguar # button
int InvS1=HIGH; // top side buttons, Jaguar B button both top buttons are the same
int InvS2=HIGH; // bottom left side button, Jaguar C button
int InvS3=HIGH; // bottom right side button, Jaguar A button
int InvP=HIGH; // pause button from Jaguar pause
void setup()
{			
for(int i=2; i<=5; i++)
{
pinMode(i, OUTPUT); // set some pins output for column
}
for(int i=6; i<=12; i++)
{
pinMode(i, INPUT); // set some pins input for rows
}
{
digitalWrite(2, HIGH); // sets the 4 column high for the moment.
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
pinMode(LED_HB, OUTPUT); // LED heartbeat
}
uint8_t hbval=128;	 //part of heart beat routine. I can remove this line and the next few lines down to...
int8_t hbdelta=8;
void heartbeat() {
if (hbval > 192) hbdelta = -hbdelta;
if (hbval <16) hbdelta = -hbdelta;
hbval += hbdelta;
analogWrite(LED_HB, hbval);
delay(20);
}					 // ... this line in final revision to save on CPU cycles.
void loop()
{
heartbeat();		 // jumps to heart beat loop, must remove this line if the above loop is removed.

digitalWrite(2, LOW); // enable column 1
InvP=digitalRead(6); // pause button
Inv3=digitalRead(; // 3 button
Inv6=digitalRead(10); // 6 button
Inv9=digitalRead(11); // 9 button
InvEn=digitalRead(12); // # button
digitalWrite(2,HIGH); // turn off column 1

digitalWrite(3, LOW); // enable column 2
InvS2=digitalRead(7); // C button
Inv2=digitalRead(; // 2 button
Inv5=digitalRead(10); // 5 button
Inv8=digitalRead(11); // 8 button
Inv0=digitalRead(12); // 0 button
digitalWrite(3,HIGH); // turn off column 2

digitalWrite(4, LOW); // enable column 3
InvS1=digitalRead(7); // B button
Inv1=digitalRead(; // 1 button
Inv4=digitalRead(10); // 4 button
Inv7=digitalRead(11); // 7 button
InvCl=digitalRead(12); // * button
digitalWrite(4,HIGH); // turn off column 4

digitalWrite(5, LOW); // enable column 4
InvS3=digitalRead(7); // A button
InvRi=digitalRead(; // East button
InvLe=digitalRead(10); // West button
InvDo=digitalRead(11); // South button
InvUp=digitalRead(12); // North button
digitalWrite(5,HIGH); // turn off column 4

digitalWrite (Pin1, (InvLe | InvCl | Inv0 | InvEn));
digitalWrite (Pin2, (InvUp | Inv7 | Inv8 | Inv9 | InvP));
digitalWrite (Pin3, (InvRi | Inv4 | Inv5 | Inv6)));
digitalWrite (Pin4, (InvDo | Inv1 | Inv2 | Inv3 | InvP));
digitalWrite (Pin6, (InvS1 | InvS3 | Inv1 | Inv4 | Inv 7 | InvCl| InvP));
digitalWrite (Pin7, (InvS2 | InvS3 | Inv2 | Inv5 | Inv 8 | Inv0));
digitalWrite (Pin8, (InvS1 | InvS2 | Inv3 | Inv6 | Inv 9 | InvEn| InvP));

if (InvUp==InvLe==LOW) {
digitalWrite(Pin9,LOW); // up and left
}
else if (InvLe==InvDo==LOW) {
digitalWrite(Pin9,LOW); // down and left
}
else if (InvDo==InvRi==LOW) {
digitalWrite(Pin9,LOW); // down and right
}
else if (InvRi==InvUp==LOW) {
digitalWrite(Pin9,LOW); // up and right
}
else
{
digitalWrite(Pin9,HIGH); // no diagonal control
}
}

 

I haven't tested it with Intellivision but using Serial.print to read the code it seems to be working correctly. I need to find my Intellivision 2 system and a game and hook it up first. I also need to hook it up to my osciloscope and check the timing to see how much latency, if any, exists between Jag button pressing and Intellivision line changing state. Without the heart beat loop, I don;t think there'd be any.

 

post-11037-0-13319100-1366857714_thumb.jpg

My first version of the controller adapter, with Arduino UNO board r2. There is no intellivision controller line yet as I was reading the code via Serial.print.

 

The final version will be just a 28 pin chip, a clock, a few capacitors, and some wires. I'll probably remove the stock 9 pin plugs on my system and put 15 pin connector, and install the chip inside. Since Intellivision controller port doesn't have 5v, external adapter would need an extra wire running from Intellivision console or from external source like a $5 USB charger you can find at most places now day.

 

I don't have any Colecovision system (2 working power supply and loads of untested controllers though) or a working 5200 system so I can't do much here for the other 2 systems. I'm sure the code can work for Colecovision without any problem. Atari 5200 uses analog joysticks so one would have to build resistor divider to convert the digital controller to pseduo-analog controller. I'm sure it'd be perfect for some games like Pac Man and Pitfall that don't really benefit from analog sticks anyway.

 

PS the above code finalized for Intellivision connection had error but I am tired and ready for bed so I'll fix it later.

Edited by Uzumaki
Link to comment
Share on other sites

Finalized the code:

 

/*
Jaguar controller pinout
pin 1 = Col (option, 3, 6, 9, #)
pin 2 = Col (C, 2, 5, 8, 0)
pin 3 = Col (B, 1, 4, 7, *)
pin 4 = Col (Pause, A, N, S, E, W)
pin 6 = Row (pause) There seems to be room for 3 more buttons, maybe Pro controller uses it on this row?
pin 7 = +5VDC Source (typical VGA video extension cable has this pin missing, BEWARE!!)
pin 9 = GND
pin 10 = Row (A, B, C, Option)
pin 11 = Row (E, 1, 2, 3)
pin 12 = Row (W, 4, 5, 6)
pin 13 = Row (S, 7, 8, 9)
pin 14 = Row (N, *, 0, #)
Pin 5, 8, and 15 is not used
See http://emu-docs.org/Jaguar/Controllers/jagcont.html for pinout info and details
I have seen a couple diagram that has pin 6 and 9 flipped but a test run of this code confirms the above seems correct.

Jaguar controller has negative logic. The row line goes low when a button is pressed.
*/
/*
Intellivision pins
Intellivision has 2 different pinouts depending on which models. Intellivision II and Sears Super Video Arcade uses standard and common 9 pin D connector
The wiring between Arduino and Intellivision 2/Sears follows the same numbering as standard 9 pin D connector.
For other Intellivision whose conntroller can't be detatched without taking the system apart, the are 9 pin in line as follow:

5 4 3 2 1 9 8 7 6
Brn Red Orn Yel Grn Blu Blk Gry Wht

Pin 5 on D-sub connector and black wire on in line connector are ground and is connected to Arduino ground. This is important, no ground connection can lead
to unpredictable result.
*/
int InvUp=LOW; // up button
int InvDo=LOW; // down burron
int InvLe=LOW; // left, obviously
int InvRi=LOW; // right
int Inv0=LOW; // button 0, et al.
int Inv1=LOW;
int Inv2=LOW;
int Inv3=LOW;
int Inv4=LOW;
int Inv5=LOW;
int Inv6=LOW;
int Inv7=LOW;
int Inv8=LOW;
int Inv9=LOW; // button 9
int InvCl=LOW; // clear button from Jaguar * button
int InvEn=LOW; // enter button from Jaguar # button
int InvS1=LOW; // top side buttons, Jaguar B button both top buttons are the same
int InvS2=LOW; // bottom left side button, Jaguar C button
int InvS3=LOW; // bottom right side button, Jaguar A button
int InvP=LOW; // pause button from Jaguar pause
int Pin1=12;
int Pin2=13;
int Pin3=A0;
int Pin4=A1;
int Pin6=A2;
int Pin7=A3;
int Pin8=A4;
int Pin9=A5;
void setup()
{
for(int i=2; i<=5; i++)
{
pinMode(i, OUTPUT); // set some pins output for column
}
for(int i=6; i<=11; i++)
{
pinMode(i, INPUT);	 // set some pins input for rows
}			
pinMode(Pin1, INPUT); // Intellivision controller pin 1
pinMode(Pin2, INPUT);
pinMode(Pin3, INPUT);
pinMode(Pin4, INPUT); // intellivision controller pin 4
pinMode(Pin6, INPUT); // intellivision controller pin 6
pinMode(Pin7, INPUT);
pinMode(Pin8, INPUT);
pinMode(Pin9, INPUT); // intellivision controller pin 9
digitalWrite(2, HIGH); // sets the 4 column high for the moment.
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(Pin1, LOW); // sets Intellivion all to high, no button down atm.
digitalWrite(Pin2, LOW);
digitalWrite(Pin3, LOW);
digitalWrite(Pin4, LOW);
digitalWrite(Pin6, LOW);
digitalWrite(Pin7, LOW);
digitalWrite(Pin8, LOW);
digitalWrite(Pin9, LOW);
}
void loop()
{
digitalWrite(2, LOW); // enable column 1
// pin 7 would be option but it is not used.
Inv3=digitalRead(; // 3 button
Inv6=digitalRead(10); // 6 button
Inv9=digitalRead(11); // 9 button
InvEn=digitalRead(12); // # button
digitalWrite(2,HIGH); // turn off column 1
digitalWrite(3, LOW); // enable column 2
InvS2=digitalRead(7); // C button
Inv2=digitalRead(; // 2 button
Inv5=digitalRead(10); // 5 button
Inv8=digitalRead(11); // 8 button
Inv0=digitalRead(12); // 0 button
digitalWrite(3,HIGH); // turn off column 2
digitalWrite(4, LOW); // enable column 3
InvS1=digitalRead(7); // B button
Inv1=digitalRead(; // 1 button
Inv4=digitalRead(10); // 4 button
Inv7=digitalRead(11); // 7 button
InvCl=digitalRead(12); // * button
digitalWrite(4,HIGH); // turn off column 4
digitalWrite(5, LOW); // enable column 4
InvP=digitalRead(6); // pause button
InvS3=digitalRead(7); // A button
InvRi=digitalRead(; // East button
InvLe=digitalRead(10); // West button
InvDo=digitalRead(11); // South button
InvUp=digitalRead(12); // North button
digitalWrite(5,HIGH); // turn off column 4
/* I am using input and output vs writing high and low. Arduino retains the low state even when the
pin mode is changed. Making the pin input has the added benefit of making that line high impedence, that is
no signal from the chip. This should allow users to use original controller along with Jaguar controller
at the same time.
*/

if (InvLe && InvCl && Inv0 && InvEn) {					 // if all variables are high, assume no button was pressed
pinMode(Pin1, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin1, OUTPUT);									 // else one button was pressed, make a low signal
}
if (InvUp && Inv7 && Inv8 && Inv9 && InvP) {				 // if all variables are high, assume no button was pressed
pinMode(Pin2, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin2, OUTPUT);									 // else one button was pressed, make a low signal
}
if(InvRi && Inv4 && Inv5 && Inv6){						 // if all variables are high, assume no button was pressed
pinMode(Pin3, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin3, OUTPUT);									 // else one button was pressed, make a low signal
}
if(InvDo && Inv1 && Inv2 && Inv3 && InvP){				 // if all variables are high, assume no button was pressed
pinMode(Pin4, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin4, OUTPUT);									 // else one button was pressed, make a low signal
}
if(InvS1 && InvS3 && Inv1 && Inv4 && Inv7 && InvCl && InvP){ // if all variables are high, assume no button was pressed
pinMode(Pin6, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin6, OUTPUT);									 // else one button was pressed, make a low signal
}
if(InvS2 && InvS3 && Inv2 && Inv5 && Inv8 && Inv0){		 // if all variables are high, assume no button was pressed
pinMode(Pin7, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin1, OUTPUT);									 // else one button was pressed, make a low signal
}
if(InvS1 && InvS2 && Inv3 && Inv6 && Inv9 && InvEn && InvP){ // if all variables are high, assume no button was pressed
pinMode(Pin8, INPUT);									 // high-Z mode for no button
}
else
{
pinMode(Pin8, OUTPUT);									 // else one button was pressed, make a low signal
}
// diagonal controller section. Pin 9 on Intellivision is only used for diagonal check.
if (!InvUp & !InvLe) {
pinMode(Pin9, OUTPUT); // up and left pulled low
}
else if (!InvLe & !InvDo) {
pinMode(Pin9, OUTPUT); // down and left pulled low
}
else if (!InvDo & !InvRi) {
pinMode(Pin9, OUTPUT); // down and right pulled low
}
else if (!InvRi & !InvUp) {
pinMode(Pin9, OUTPUT); // up and right pulled low
}
else
{
pinMode(Pin9, INPUT); // high-Z mode for no diagonal control
}
}

 

 

Some bugs were squashed and I changed how it handled Intellivision output. Instead of going high and low, I changed to use pin.mode input and output. Arduino saves the last state it was set while in output so it will always be low when switched back to output, to pull the line down. When it goes to input mode, it becomes tri-stated and will not affect the lines. This means original Intellivision controllers can be used as well. Using the disc for 16 direction and Jag pad for the fire or numbers.

 

Next I'll wire up my system (using Inty 2) and see if it works. I'm going to put 2 Jag adapters so my system would be 2-players ready. Plus a few games did use both key pads for different uses. Now where to install the ports...? I'm planned on using the empty spot on the right side above the cart port, facing up.

 

PS code tag sucks. Formatting still got lost anyway

Edited by Uzumaki
Link to comment
Share on other sites

jagadapter_zpsfcd959fe.png

 

Initial schematic of the adapter. I've decided to not mod Inty 2 since it's a little cramped for space inside. Putting 2 adapters and a future AV mod would be quite hard to do. So I'd be my Inty 3.

 

Since the standard controller conveniently uses proper 0.1" pin spacing, I could do this as a drop in mod. Add a cable from the mod board to a female 1x9 connector, and install a 9 pins header on the board to put original controller back in service. The only soldering this would require after I complete the board is for +5v from the power supply.

 

My first attempt with Eagle, not bad eh? Only gripe, no 328 in the library. mega8 has same pinout but different size flash memory. I could also do this without external 16MHz oscilator by reprogramming it to use internal 8MHz but I'd like to see how it performs first.

 

PS working on board now, see if I can make it work without getting lost in Eagle.

Link to comment
Share on other sites

jagPCB_zps67e9b504.png

 

Looks good (viewing the bottom), single layer with only 1 jumper. I decided to make the 15 pin Jag plug mounted on the case via cable so there are 12 wires rather than a connector on board. One question, how do I convert this in a format that can be done by PCB fab, and which one would you suggest in USA?

Edited by Uzumaki
Link to comment
Share on other sites

No recommendations here.

 

Of course, now I realize I'm going to have to finally buy the prototyping breadboard setup so that I can test this for myself. Then, if it works for me, buy more parts and get some replacement ATMegas.

Link to comment
Share on other sites

Yet another revision:

 

[/font][/size]

/* 
Jaguar controller pinout
pin  1 = Col (option, 3, 6, 9, #)
pin  2 = Col (C, 2, 5, 8, 0)
pin  3 = Col (B, 1, 4, 7, *)
pin  4 = Col (Pause, A, N, S, E, W)
pin  6 = Row (pause) There seems to be room for 3 more buttons, maybe Pro controller uses it on this row?
pin  7 = +5VDC Source  (typical VGA video extension cable has this pin missing, BEWARE!!)
pin  9  = GND
pin 10 = Row (A, B, C, Option)
pin 11 = Row (E, 1, 2, 3)
pin 12 = Row (W, 4, 5, 6)
pin 13 = Row (S, 7, 8, 9)
pin 14 = Row (N, *, 0, #)
Pin 5, 8, and 15 is not used
See http://emu-docs.org/Jaguar/Controllers/jagcont.html for pinout info and details 
I have seen a couple diagram that has pin 6 and 9 flipped but a test run of this code confirms the above seems correct.

Jaguar controller has negative logic. The row line goes low when a button is pressed.
*/

/*
Intellivision pins
Intellivision has 2 different pinouts depending on which models.  Intellivision II and Sears Super Video Arcade uses standard and common 9 pin D connector
The wiring between Arduino and Intellivision 2/Sears follows the same numbering as standard 9 pin D connector.
For other Intellivision whose conntroller can't be detatched without taking the system apart, the are 9 pin in line as follow:

5    4    3    2    1    9    8    7    6
Brn  Red  Orn  Yel  Grn  Blu  Blk  Gry  Wht

Pin 5 on D-sub connector and brown wire on in line connector are ground and is connected to Arduino ground. This is important, no ground connection can lead
to unpredictable result.
*/

int InvUp=LOW; // up button
int InvDo=LOW; // down burron
int InvLe=LOW; // left, obviously
int InvRi=LOW; // right
int Inv0=LOW;  // button 0, et al.
int Inv1=LOW;
int Inv2=LOW;
int Inv3=LOW;
int Inv4=LOW;
int Inv5=LOW;
int Inv6=LOW;
int Inv7=LOW;
int Inv8=LOW;
int Inv9=LOW;  // button 9
int InvCl=LOW; // clear button from Jaguar * button
int InvEn=LOW; // enter button from Jaguar # button
int InvS1=LOW; // top side buttons, Jaguar B button both top buttons are the same
int InvS2=LOW; // bottom left side button, Jaguar C button
int InvS3=LOW; // bottom right side button, Jaguar A button
int InvP=LOW;  // pause button from Jaguar pause
int InvOut1=12;
int InvOut2=13;
int InvOut3=A0;
int InvOut4=A1;
int InvOut6=A2;
int InvOut7=A3;
int InvOut8=A4;
int InvOut9=A5;

void setup()
{ 
 Serial.begin(9600);
 for(int i=2; i<=5; i++)
 {
   pinMode(i, OUTPUT);    // set some pins output for column
   digitalWrite(i, HIGH); // sets the 4 column high for the moment.
 }  
 for(int i=6; i<=11; i++)
 {
   pinMode(i, INPUT);     // set some pins input for rows
   digitalWrite(i,HIGH);  // enable pullup resistor internally, it would read HIGH, cause the output to be in high-Z and not interfere with regular Intellivision controller.
 }             
 pinMode(InvOut1, OUTPUT);   // Intellivision controller pin 1
 pinMode(InvOut2, OUTPUT);  
 pinMode(InvOut3, OUTPUT); 
 pinMode(InvOut4, OUTPUT);   // intellivision controller pin 4
 pinMode(InvOut6, OUTPUT);   // intellivision controller pin 6
 pinMode(InvOut7, OUTPUT); 
 pinMode(InvOut8, OUTPUT); 
 pinMode(InvOut9, OUTPUT);   // intellivision controller pin 9
 digitalWrite(InvOut1, HIGH);  // sets Intellivion all to high, no button "down" atm.
 digitalWrite(InvOut2, HIGH);
 digitalWrite(InvOut3, HIGH);
 digitalWrite(InvOut4, HIGH);
 digitalWrite(InvOut6, HIGH);
 digitalWrite(InvOut7, HIGH);
 digitalWrite(InvOut8, HIGH);
 digitalWrite(InvOut9, HIGH);
}
void loop() 
{
 digitalWrite(2, LOW);   // enable column 1
 // pin 7 would be option button but it is not used.
 Inv3=digitalRead(;    // 3 button
 Inv6=digitalRead(9);    // 6 button 
 Inv9=digitalRead(10);   // 9 button
 InvEn=digitalRead(11);  // # button
 digitalWrite(2,HIGH);   // turn off column 1

 digitalWrite(3, LOW);   // enable column 2
 InvS2=digitalRead(7);   // C button 
 Inv2=digitalRead(;    // 2 button
 Inv5=digitalRead(9);    // 5 button 
 Inv8=digitalRead(10);   // 8 button
 Inv0=digitalRead(11);   // 0 button
 digitalWrite(3,HIGH);   // turn off column 2

 digitalWrite(4, LOW);   // enable column 3
 InvS1=digitalRead(7);   // B button 
 Inv1=digitalRead(;    // 1 button
 Inv4=digitalRead(9);    // 4 button 
 Inv7=digitalRead(10);   // 7 button
 InvCl=digitalRead(11);  // * button
 digitalWrite(4,HIGH);   // turn off column 4

 digitalWrite(5, LOW);   // enable column 4
 InvP=digitalRead(6);    // pause button
 InvS3=digitalRead(7);   // A button 
 InvRi=digitalRead(;   // East button
 InvLe=digitalRead(9);   // West button 
 InvDo=digitalRead(10);  // South button
 InvUp=digitalRead(11);  // North button
 digitalWrite(5,HIGH);   // turn off column 4

 /* I am using input and output vs writing high and low. Arduino retains the low state even when the 
  pin mode is changed. Making the pin input has the added benefit of making that line high impedence, that is
  no signal from the chip. This should allow users to use original controller along with Jaguar controller
  at the same time.
  */

 if (InvLe && InvCl && Inv0 && InvEn) {                       // if all variables are high, assume no button was pressed
   pinMode(InvOut1, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut1, OUTPUT);                                  // else one button was pressed, make a low signal
 }
 if (InvUp && Inv7 && Inv8 && Inv9 && InvP) {                 // if all variables are high, assume no button was pressed
   pinMode(InvOut2, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut2, OUTPUT);                                  // else one button was pressed, make a low signal
 } 
 if(InvRi && Inv4 && Inv5 && Inv6){                           // if all variables are high, assume no button was pressed
   pinMode(InvOut3, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut3, OUTPUT);                                  // else one button was pressed, make a low signal
 }
 if(InvDo && Inv1 && Inv2 && Inv3 && InvP){                   // if all variables are high, assume no button was pressed
   pinMode(InvOut4, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut4, OUTPUT);                                  // else one button was pressed, make a low signal
 }
 if(InvS1 && InvS3 && Inv1 && Inv4 && Inv7 && InvCl && InvP){ // if all variables are high, assume no button was pressed
   pinMode(InvOut6, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut6, OUTPUT);                                  // else one button was pressed, make a low signal
 }
 if(InvS2 && InvS3 && Inv2 && Inv5 && Inv8 && Inv0){          // if all variables are high, assume no button was pressed
   pinMode(InvOut7, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut7, OUTPUT);                                  // else one button was pressed, make a low signal
 }
 if(InvS1 && InvS2 && Inv3 && Inv6 && Inv9 && InvEn && InvP){ // if all variables are high, assume no button was pressed
   pinMode(InvOut8, INPUT);                                   // high-Z mode for no button
 }
 else
 {
   pinMode(InvOut8, OUTPUT);                                  // else one button was pressed, make a low signal
 } 
 //diagonal controller section. Pin 9 on Intellivision is only used for diagonal check.
 if (!InvUp & !InvLe) {
   pinMode(InvOut9, OUTPUT);   // up and left pulled low
 }
 else if (!InvLe & !InvDo) {
   pinMode(InvOut9, OUTPUT);   // down and left pulled low
 }
 else if (!InvDo & !InvRi) {
   pinMode(InvOut9, OUTPUT);   // down and right pulled low
 }
 else if (!InvRi & !InvUp) {
   pinMode(InvOut9, OUTPUT);   // up and right pulled low
 }
 else
 {
   pinMode(InvOut9, INPUT);    // high-Z mode for no diagonal control
 } 
}
[font=arial, helvetica, sans-serif]

 

I had problem with the last one. I didn't see the problem when I used Serial.print to read value as no output pins was being handled in the earlier beta version. When I enabled output on pins, the LEDs would spazz out on certain buttons.

 

It seems Arduino isn't treating my naming such as Pin1 properly but instead is assuming literal pin naming. When I use a button West, Clear, 0, or Enter it'd write low to Pin1 which happens to be reset pin on ATMega chip, causing my project to spazz out. Writing to pin 7, 8, 9, or 10 wouldn't work at all since they are Vcc, ground, and 2 external clock pins. Renamed them to InvOutx Now it plays nicely when handling output to LEDs.

 

Lesson learned, I need to find a list of terms or words that can't be used as general variable container.

 

 

 

My video of the test, button or controller I press causes LED to light up. One of the LED seems dimly lit when it should be off, it's due to Arduino board. Most board has an LED connected to digital pin 13, a resistor, and ground. Since Intellivision uses low for button press, I wired with LED on 5v rail and resistor. So when digital pin 13 went low, the red LED lit up properly but when digital pin 13 switched to input mode to be in high-Z and not interfere with other Intellivision controller, there was current flowing from 5v through both LEDs and both resistors to ground.

 

Since I am not using Arduino board but rather a stand alone ATMega328 with minimal components and no LED that extra LED won't be a problem.

 

Still looking for help or advice on Eagle PCB finalizing and finding a fab to make some.

 

PS I need to hook up my oscilloscope to check for latency between Jaguar controller and Intellivision output. If it's a few millisec or so and no noticeable lag, I may not need the external oscillator and can reprogram ATMega (altered bootloader) to use internal 8MHz clock instead. That'd be 3 less pieces.

Edited by Uzumaki
Link to comment
Share on other sites

I use OSHpark.com in the US. They are low cost and takes about 2-3 weeks. 3 orders, all have been perfect.

 

Would this Eagle file help:

 

http://arduino.cc/en...ArduinoBoardUno

 

EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)

Schematic: arduino-uno-Rev3-schematic.pdf

Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical on all three processors.

Edited by grips03
Link to comment
Share on other sites

I use OSHpark.com in the US. They are low cost and takes about 2-3 weeks. 3 orders, all have been perfect.

Great, that's one place I can try.

 

Would this Eagle file help:

 

http://arduino.cc/en...ArduinoBoardUno

 

EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)

Schematic: arduino-uno-Rev3-schematic.pdf

Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical on all three processors.

 

I just checked it, it is for the whole UNO board and not for stand alone ATMega chip. :/ ATMega8 has the same pinout, just smaller internal flash memory. Which is fine, the PCB doesn't care about memory size.

 

Forgot to add this. With the test LEDs in place the max power draw I got barely peaked at 60mA. So probably about 20mA or 30 without LEDs, very small hit on Intellivision power supply. I checked with O-Scope, it is doing the entire cycle at about 2mS per full cycle (scan Jag controller, set Inty output). Dropping to 8MHz would probably be closer to 4mS per cycle

Edited by Uzumaki
Link to comment
Share on other sites

Since I am not using Arduino board but rather a stand alone ATMega328 with minimal components and no LED that extra LED won't be a problem.

 

That would be my plan. Test my configuration off the Arduino board, but the ultimate install will be perfboard, socket, whatever parts I need, and ATMega328 chip. No point in shoving a $20 PCB in there when I can shove $5 worth of parts into something the ATMega plugs right into.

 

(Why, yes, I do believe in using sockets for ICs in projects.)

Link to comment
Share on other sites

Heh :) Sockets FTW. A blank ATMega is second only to the cost of PCB board. If something's going to get ruined I'd like to be able to salvage a few dollars and one chip goes a long way toward saving on ruined experiments.

 

I made a change to the PCB design:

final_pcb_zpsca8ff17d.png

 

More labels to ID where what goes. Also connected a missing 5v line to pin 20 of the chip (Vcc). I may still adjust it some more before I send it off to be fabbed. Each board is roughly 1.55" x 2.15" and about 3.8 sq in.

 

EDIT: just realized a mistake. The PCB board uses in line connector used by the fat intellivision but the code assumed DB-9 connector used by Inty 2 which had different pin numbering. I'd need to revise the code for correct pinout. :P

Edited by Uzumaki
Link to comment
Share on other sites

pcb_final_no_clock_zpsf0f42527.png

 

Another version for using internal 8MHz clock rather than external. Results in smaller board at 1.6" x 1.95" which would shave a bit off the total price. About $15.60 from OSH for 3 boards.

 

I've ordered a few parts but waiting on PCB before I send the file in and order them.

Link to comment
Share on other sites

Wonder how many games would be affected negatively? I mean, the Jag pad is just an 8 position controller, and the INTV pad is a 16 position controller.

 

I assume as long as the primary directions are right, it should work for most games though, but some games use those extra directions and may not work.

Link to comment
Share on other sites

One game I know for sure is Vectron, you would have some trouble getting optimal aim to stop enemies and rebuild. You may also need to adjust in a few games like Tropical Trouble since you'd have less precise directional control.

 

Both AD&D, Shark Shark!, Snafu, Loco Motion, and many more will not have a problem.

Link to comment
Share on other sites

Pro:

  • More comfortable than Intellivision pad
  • longer than 3 feet
  • can use extension anytime on any console
  • lasts longer

Con:

  • Can't flip left and right handed anymore
  • Cable doesn't self coil
  • No 16 direction pad
  • Intellivision overlay doesn't fit

Edited by Uzumaki
Link to comment
Share on other sites

I had a thought: how about adding analog thumbstick for 16 directions since afaik no one sells a stand alone 16 direction digital joystick. You'd need to modify the controller to remove the D pad (or mount the stick near D pad), replace the Jaguar cord with one that has all the wires (Jaguar cord is missing pin 5, 8, and 15 since they aren't used) and run 2 lines from analog stick to Arduino.

 

You can move 2 Intellivision lines from analog pins to digital pin 0 and 1 (it's used for USB or Serial on Arduino board but not used in stand alone use) and you could then wire the analog stick. You would need to figure how to map the analog value to 16 digital directions.

 

I'm not going to do this part since I'd like to keep my controller intact for Jaguar system, and this mod would likely render it non-Jaguar with the extra wires. Just an idea if you're familiar with Arduino and know how to modify the code above to read analog value and inject them, plus remove digital D pad code to prevent interference.

Link to comment
Share on other sites

Placed an order for PCB. I went with iteadstudio as they are $10 for 5cm by 5cm boards (just under 2" by 2") and you get 10 per order. So that's $1 per PCB plus shipping. It'd be a few weeks though. OSHPark would have been about $20 for 3 boards.

 

Yeah made in China is less than made in USA

Link to comment
Share on other sites

Hey! Cool. If these are made, i would want one!

 

Dont forget to add me to the list if there is one.

 

:-)

 

I had considering making a batch to sell. I got word from Itead they shipped off my pcb design to be fabricated so it shouldn't be too long. It's the shipping that would take longer.

Link to comment
Share on other sites

It would have to be internal mod because controller port doesn't provide 5v required for the adapter. In all of the "fat" Intellivision (1, 3, and Sears) the controller plug can be removed off the mainboard for this adapter, and plugged back on the adapterboard to keep the original controller, so all I'd need is to solder in a +5v line off the power supply board. Intellivision 2 do not have the room inside to do this mod unless you want to install the Jaguar controller port on the side near cart slot and not use ECS, IntelliVoice, or System Changer at all. Or remove the old port and make the change permanent, no longer able to use original controller.

Link to comment
Share on other sites

Just heads up, the initial batch of 10 PCB was done and is headed back toward me. Hopefully it won't get lost.

 

So far the initial cost is:

$1.38 (10 of 5x5cm for $9.90 +$3.90 shipping)

$2.13 from Mouser for Atmega328p (in single order of 10 or more, next discount tier at 25)

$0.24 for 28 pin socket (for chip, this can be omitted for permanent use)

$0.03 for 1x9 pin header (for connecting original controller, bought in lot of 10 40 pins which can be broken into 40x 9 pins with few extra pins This can be omitted but it's too cheap to not include anyway)

$0.38 for 1x9 female header (to plug into Inty motherboard controller port)

$2.25 for female VGA plug with solder tab

-------

$6.41 total, a bit more than my estimate of $5 in parts. This does not include solder, wires, electricity, and time spent assembling and testing. Another $0.55 for 2 caps and 16MHz clock if the internal 8MHz clock proves useless. The board will have spot for external clock. Also one would need screw and nut to mount the VGA port on the console so it'd stay in place, probably $0.20 worth at local hardware store.

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