SEGA Rally 2 Driver Board Force Feedback GAL Reverse Engineering

SEGA Rally 2 Championship was probably the best rally racing game for arcades in 1998 but a lot of gamers agree that SEGA Rally 2 is still nowadays the best rally cabinet arcade. SEGA Rally 2 was (is) famous for the realism of the Force FeedBack (FFB) steering wheel.

The core of the FFB is the Driver Board where the FFB commands are received from the main computer (SEGA Model 3), processed and transferred to the power module in order to move the steering wheel.

The Driver Board is an electronic board which mounts a lot of components. One of this component is a Lattice GAL16V8, a programmable IC. In this article I’m going to describe how I have made a reverse engineering of the GAL16V8 to obtain the internal logic.

sega rally 2 championship twin arcade cabinet

SEGA Rally 2 championship twin arcade cabinet

The FFB is realized in the SEGA Rally 2 cabinet using 4 main components:

  • The SEGA Model 3 main computer which sends, through a serial bus, the FFB commands to the Driver Board. The serial commands have already been studied by few users. See these links for more info about the type of commands and how to drive the Driver Board externally:
    http://superusr.free.fr/model3.htm
    https://github.com/njz3/vJoyIOFeederWithFFB
    https://github.com/njz3/vJoyIOFeederWithFFB/blob/master/DRIVEBOARD.md
  • The Driver Board receives the FFB commands from the SEGA Model 3 and the feedback from the Motor Board. The Driver Board processes the commands received according to the feedback and drives the Motor Board;
  • The Motor Board is driven by the Driver Board and contains the electronic components to drive the DC Motor mounted below the steering wheel.
  • The DC Motor is mechanically connected to the steering wheel.

In the image below, a list of SEGA games with different types of FFB.

Sega Model Drive Board EEPROM

List of Board/EEPROM (Thanks to BigPanik and njz3 for the great work!!!)

The Driver Board is composed by a lot of electronic components mostly produced by Toshiba (which are very hard to find nowadays).

SEGA Rally 2 Driver Board

SEGA Rally 2 Driver Board

A list of the main components of the Driver Board is reported here:

  • IC3 – Microcontroller (Toshiba TMPZ84C015BF-10);
  • IC9 – SRAM (Toshiba TC55257DFI-85L);
  • IC8 – EEPROM (ST M27C512-15FI);
  • IC4 – GAL (Lattice GAL16V8D-15LP);
  • OSC1 – 16MHz Oscillator;
  • IC7 – IC Reset Circuit;
  • IC33 – ADC (OKI MSM6253);
  • LED2/LED3 – 7 segment display.

The Driver Board is used in multiple SEGA cabinet games (see “List of Board/EEPROM” figure). The hardware is exactly the same but the code in the instruction memory contained in the EEPROM changes, therefore how FFB is processed changes as well. The EEPROM of a lot of games have already been dumped and the .bin can be found with Google (inside MAME ROMS), so the replacement of the EEPROM in the Driver Board is quite easy to achieve.

The big issue while repairing the Driver Board is GAL16V8D which contains a programmable logic. The logic inside the GAL16V8D is unknown, so replacing this IC was impossible (until now).

So, I decided to make a reverse engineering of the logic inside the GAL16V8D and to post the combinational logic and the JEDEC file to be programmed inside a new Lattice GAL16V8D for free, as a gift for SEGA cabinet repairer.

The reverse engineering process starts analyzing the Driver Board schematic to find which are the input and the output pins of the GAL16V8D. The schematic is not very simple so I decided to skip this description and post the Input/Output of the GAL16V8D:

While analyzing the schematic it is clear that the logic inside the GAL is pure combinational without state machine or clock process. This makes the reverse engineering process simpler: to understand the logic inside the GAL is possible to drive all signals combinations in Inputs and to observe all the Outputs. To do this operation (applicable to every GAL not only for SEGA Rally 2) I have used an Arduino MEGA to drive every Inputs pin of the GAL16V8D and to observe every Outputs pin. Every Output is pull-upped to assure that the GAL really drove the Outputs.

Arduino Mega con GAL16V8D

Arduino MEGA with GAL16V8D

The code I have written for Arduino MEGA is the following:

After the reset, Arduino MEGA starts to drive the Inputs and reads the Outputs. The result of every combination is printed in the Serial console where it is possible to make a Copy and Paste in a .csv. The CSV can be imported in an Excel sheet to better analyze the combination. Below, a screenshot of the Excel file with the first part of the Inputs/Outputs combination.

EXCEL GAL Combinational Logic

EXCEL GAL Combinational Logic (only first part)

After analyzing the Inputs/Outputs, the following combinational logic can be found. The logic is described in VHDL.

In this article I described how to synthetize a VHDL for the GAL16V8D using the Lattice ispLEVER software. I will not repeat the procedure where but if you are interested you can read the article. Note: The article is written in Italian but you can use an online translator (Like Google Translate) to understand the procedure.

As a gift I decided to release, for free, the JEDEC file (.jed) ready to be programmed in a brand new GAL16V8D (see bottom page).

If you like this article and I helped you with a (big) problem, please donate me e coffee, I’ll be very happy!!!

Bye bye, have a nice day and happy holidays!!!

 

 


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *