Neo Geo Track Ball Games

Yeah µPD4701s can be hard to source (altough you can find them in old serial mice at flea markets for $1), that's why a CPLD repro would be good.
 
Yeah µPD4701s can be hard to source (altough you can find them in old serial mice at flea markets for $1), that's why a CPLD repro would be good.
Only ones I can find are suspect (from China). Going the EPM7128SQC100 route is tempting, but a bit more complicated than I want to undertake right now.
 
Last edited:
In that case just follow the diagram I posted above and replace the CPLD by a µPD4701:

1767813178325.png


Wiring:

P2 UP (edge side) = pin 1 (Xa)
P2 DOWN (edge side) = pin 2 (Xb)
P2 LEFT (edge side) = pin 4 (Ya)
P2 RIGHT (edge side) = pin 5 (Yb)
CN4.7 = pins 3 (RESET X) & 6 (RESET Y)
CN4.6 = pin 14 (!X /Y)
P1 UP (board side) = pin 16 (D0)
P1 DOWN (board side) = pin 17 (D1)
P1 LEFT (board side) = pin 18 (D2)
P1 RIGHT (board side) = pin 19 (D3)
P1 A (board side) = pin 20 (D4)
P1 B (board side) = pin 21 (D5)
P1 C (board side) = pin 22 (D6)
P1 D (board side) = pin 23 (D7)

Lastly tie pins 13 (U/!L) and 15 (!CS) to ground.
(And don't forget the power pins OFC).

Now if you don't want to build a solution that would plug in place of a real SIT board disregard the edge side and simply wire the trackball directly to the µPD4701.


You'd need to amplify the signal coming from CN4.1, I can have a look at the transistor reference used on the original SIT board.
Dude thanks for this pinout, i'm a bit confused on this part:
Why p2 ?

P2 UP (edge side) = pin 1 (Xa)
P2 DOWN (edge side) = pin 2 (Xb)
P2 LEFT (edge side) = pin 4 (Ya)
P2 RIGHT (edge side) = pin 5 (Yb)

I have to connect trackball directly on µPD4701 on this pins ? :

TrackballµPD4701
X Clockpin 1 (XA)
X Directionpin 2 (XB)
Y Clockpin 4 (YA)
Y Directionpin 5 (YB)
 
Hey,

What I meant is on the SIT board Xa for instance comes from P2 UP on the JAMMA (cab side).
You can totally wire the trackball directly to the 4701.

Maybe I should take a pic of the SIT board. On one side it connects to the JAMMA inside the cab, on the other side it connects to the JAMMA of the slot.
 
Hey,

What I meant is on the SIT board Xa for instance comes from P2 UP on the JAMMA (cab side).
You can totally wire the trackball directly to the 4701.

Maybe I should take a pic of the SIT board. On one side it connects to the JAMMA inside the cab, on the other side it connects to the JAMMA of the slot.
Pics always help.

IMG_2256.jpeg

Tracked down my trackball, still looking for my stash of really old mice to see if there's a UPD4701 I can steal. I did order some from china, but assuming they're fake. Fingers crossed they're just rebuilt (but I'll need to figure out a way to test them on a bread board, can use an oscilloscope I figure).
 
After reading my own post again I realized that it might have left some important information in the dark for someone who aims to create a replica of the trackball part of the SIT-board. In case it helps someone out, here are some more in-depth information:

Made a few tables with the perspective of how the BIOS/MVS unit expect the values to arrive. Some confusion might arise from the fact that all units does not even have the "trackball X / Y select" pin exposed. If you are planing to use a MVS without the DB-15 connections, you might have to create a trace from the NEO-D0 to the "SIT-board".

NameAllMV2FMV1FZ*SIT-IC-OUTPUTPurpose
P1 UpJAMMA 181P DB-15 Pin 15-Trackball X / Y Bit 08-bit movement value
P1 DownJAMMA 191P DB-15 Pin 7-Trackball X / Y Bit 18-bit movement value
P1 LeftJAMMA 201P DB-15 Pin 14-Trackball X / Y Bit 28-bit movement value
P1 RightJAMMA 211P DB-15 Pin 6-Trackball X / Y Bit 38-bit movement value
P1 Button AJAMMA 221P DB-15 Pin 13-Trackball X / Y Bit 48-bit movement value
P1 Button BJAMMA 231P DB-15 Pin 5-Trackball X / Y Bit 58-bit movement value
P1 Button CJAMMA 241P DB-15 Pin 12-Trackball X / Y Bit 68-bit movement value
P1 Button DJAMMA 251P DB-15 Pin 4-Trackball X / Y Bit 78-bit movement value
P2 Button AJAMMA Z2P DB-15 Pin 13--Left A
P2 Button BJAMMA a2P DB-15 Pin 5--Left B
P2 Button CJAMMA b2P DB-15 Pin 12--Right A
P2 Button DJAMMA c2P DB-15 Pin 4--Right B

NameMV2FMV1FZ*SIT-IC-INPUTOptional for trackball only?
P1 Output 11P DB-15 Pin 10NEO-D0 Pin 4Trackball X / Y selectNo
P1 Output 21P DB-15 Pin 2NEO-D0 Pin 5DataYes
P1 Output 31P DB-15 Pin 9NEO-D0 Pin 6ClockYes
P2 Output 12P DB-15 Pin 10NEO-D0 Pin 7LatchYes
P2 Output 22P DB-15 Pin 2NEO-D0 Pin 8Card dispenserYes
P2 Output 32P DB-15 Pin 9NEO-D0 Pin 9Air JetYes

BIOS Registry – Trackball
MemoryPurposeSourceUsed by Irritating Maze
0x10FE02Previous frame0x10FE03No
0x10FE03Current frameREG_P1CNT (0x300000)No
0x10FE04Delta (current - previous)0x10FE03 - 0x10FE02Yes
0x10FE05Cache high 4 bit delta for direction(0x10FE03 & 0xF0) - 0x10FE05No

BIOS Registry – Buttons
MemoryPurposeStructureSourceUsed by Irritating Maze
0x10FD94[0-5]"Joypad/Joystick state"Bit 7 = P2 D
Bit 6 = P2 C
Bit 5 = P2 B
Bit 4 = P2 A
Bit 3 = X dir(+)
Bit 2 = Y dir(-)
Bit 1 = Y dir(+)
Bit 0 = Y dir(-)
7-4 = REG_P2CNT (0x340000)[BR]3-0 = BIOS calculationNo
0x10FD9A[0-5]"Joypad/Joystick state"Same as aboveCopy of 0x10FD94Yes
 

P2 Button AJAMMA Z2P DB-15 Pin 13--Left A
P2 Button BJAMMA a2P DB-15 Pin 5--Left B
P2 Button CJAMMA b2P DB-15 Pin 12--Right A
P2 Button DJAMMA c2P DB-15 Pin 4--Right B

Talking this buttons, are they used in game ? ?(
What is their purpose in the game?

Testing in game I understand that A is used but I don't understand what B is used for and why having two A and two B, I see that Left A and Right A in game do the same thing.
 
Last edited:
Talking this buttons, are they used in game ? ?(
What is their purpose in the game?
7e1eefbcfb2b45931923a2c40d9aa49c.jpg


Testing in game I understand that A is used but I don't understand what B is used for and why having two A and two B, I see that Left A and Right A in game do the same thing.
it's to simplify wiring and maintenance even though they have the same function left and right by having independent wiring if one button fails it doesn't take out the other button and they can be independently tested in game test mode.
 
Seems we dont need B and double A buttons on dedicated trackball pad.
We just need one A and Start
 
I'm trying to understand better the part about:

CN4.7 = pins 3 (RESET X) & 6 (RESET Y)
CN4.6 = pin 14 (!X /Y)

CN4.6 is OUT1 but if we take this signal from 1P DB-15 Pin 10 its hex inverted from 74ls06 so maybe ca be a problem.

1768258922911.png


CN4.7 reset pin is from NEO-SDR-T pin 70, and on NEO-D0 pin 20 ?
Its not on side connector of MV2F and not on the DB15

1768259057506.png

1768259168403.png
 
I'm trying to understand better the part about:

CN4.7 = pins 3 (RESET X) & 6 (RESET Y)
CN4.6 = pin 14 (!X /Y)

I believe the reset signal is unnecessary for a trackball-only implementation. It is very likely used to reset other parts of the SIT-board and since the trackball is always read as an offset compare to previous frame, it really doesn't matter if the first value is very large at the first frame/read.
Just for information, this reset signal is shared across the whole board and can be source from any IC/pin, although RESET and RESETP is not the same so use the system wide RESET and react when the this line goes low (reset is in action when low).

Regarding the inverter for x/y, it is just a matter of matching the trackball output to the correct version. If it is the wrong way around, like spinning left/right is up/down, then just swap the wires :)
 
Looks like back in '88 Logitech was already on custom ICs.
1769003502047.jpeg

Know I have more old mice around here, the hunt continues. If anyone knows of a make and model that has a UPD4701 in it please share.
 
~$4 from Aliexpress gets you a couple suspect UPD4701s (breadboard and SBC not included). Definitely not "new", the shiny legs are indicative of them being rebuilt. Not sure there's even real. Will have to see if I can cobble together a quick test circuit on the breadboard (any help with this would be welcome, brain not working gud right now).
IMG_2265.jpeg
 
If this uses the same technique as for reading a spinner then I now have a working circuit built using 74xx logic, obviously it needs to be doubled to read both the X and Y axis on a trackball or mouse.

I did have a test sketch using an Arduino that would bit-bang a uPD4701 with a trackball attached to prove it worked. I'll see if I can find it.
 
  • Like
Reactions: nem
If this uses the same technique as for reading a spinner then I now have a working circuit built using 74xx logic, obviously it needs to be doubled to read both the X and Y axis on a trackball or mouse.

I did have a test sketch using an Arduino that would bit-bang a uPD4701 with a trackball attached to prove it worked. I'll see if I can find it.
That'd be appreciated, having a hard time even finding pinouts for these things.
 
That'd be appreciated, having a hard time even finding pinouts for these things.
I had since reinstalled my laptop so I had to dig through the backup I made before I wiped it. Here's what I found:

C:
// Basic NEC µPD4701AC test code
//
// Wire up the Arduino pins to the chip based on the comments below.
// You will use digital pins 2-11 as inputs and analog pins 0-4 as outputs.
//
// In addition:
// * Use 10KΩ pullup resistors on the three button inputs
// * Use 4.7KΩ pullup resistors on the four X1/X2/Y1/Y2 inputs

void setup() {
  Serial.begin(9600);
 
  // D0-D7
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(6, INPUT);
  pinMode(7, INPUT);
  pinMode(8, INPUT);
  pinMode(9, INPUT);
 
  // !SF
  pinMode(10, INPUT);
 
  // !CF
  pinMode(11, INPUT);
 
  // Reset X & Y
  pinMode(A0, OUTPUT);
  pinMode(A1, OUTPUT);
  digitalWrite(A0, LOW);
  digitalWrite(A1, LOW);
 
  // !CS
  pinMode(A2, OUTPUT);
  digitalWrite(A2, HIGH);
 
  // X/Y
  pinMode(A3, OUTPUT);
  digitalWrite(A3, LOW);
 
  // U/L
  pinMode(A4, OUTPUT);
  digitalWrite(A4, LOW);
}

byte readByte() {
  byte b;
  for (int i = 0; i < 8; i++) {
    b |= digitalRead(i+2) << i;
  }
  return b;
}

void loop() {
  byte left, middle, right;
  uint16_t x, y;

  // Read CF & SF interrupt pins
  if (!(digitalRead(10) && digitalRead(11))) {

    // CS low
    digitalWrite(A2, LOW);

    // X counter low byte (X/Y=0 U/L=0)
    digitalWrite(A3, LOW);
    digitalWrite(A4, LOW);
    x = readByte();
 
    // X counter high byte (X/Y=0 U/L=1)
    digitalWrite(A3, LOW);
    digitalWrite(A4, HIGH);
    x |= uint16_t(readByte()) << 8;

    // Pick out the button status from the upper nibble of the upper byte
    left = x & 0x4000 ? 1 : 0;
    right = x & 0x2000 ? 1 : 0;
    middle = x & 0x1000 ? 1 : 0;

    // Mask out the upper nibble of the upper byte
    x &= 0xfff;

    // Y counter low byte (X/Y=1 U/L=0)
    digitalWrite(A3, HIGH);
    digitalWrite(A4, LOW);
    y = readByte();

    // Y counter high byte (X/Y=1 U/L=1)
    digitalWrite(A3, HIGH);
    digitalWrite(A4, HIGH);
    y |= uint16_t(readByte() & 0xf) << 8; // Mask out the button status this time

    Serial.print("L=");
    Serial.print(left);
    Serial.print(" M=");
    Serial.print(middle);
    Serial.print(" R=");
    Serial.print(right);
    Serial.print(" X=");
    Serial.print(x);
    Serial.print(" Y=");
    Serial.println(y);
    
    // CS high again
    digitalWrite(A2, HIGH);
  }
}

I think you will need the datasheet to know what the pinout on the chip is.
 
Back
Top