Saturday, September 24, 2011

OutRun Rev A vs. Rev B

I've looked into the code changes between the revision A and revision B roms. Comparing the roms isn't easy, because the addresses of the routines are aligned differently rendering a binary compare impractical. Therefore, my technique was to align a rough decompilation of the Rev A code to the addresses of the Rev B code in IDA.

I manually compared the code. It was easy to see if a function had changed in size for example as subsequent functions would be shifted to different addresses. Clearly, this is prone to human error and I may have missed something. But, if I have, it should be minor.

The differences are:
  • Easter Egg activation is more complex in Revision B. I have blogged about this already here.
  • The steering wheel vibration code for the Upright Mini cabinet has been altered. In Revision B, the vibration frequency has changed to make it less aggressive. I would guess this must was done in response to hardware problems reported by operators. The code can be found at address 0xEBA2 in Rev A and 0xEC42 in Rev B. 
And that would appear to be it! Maybe not a huge surprise, given that I've not noticed any other differences playing the versions. I hope to compare the original version next, which may yield more interesting surprises. 

As a final note, only IC118 and IC133 change between the revisions. The sub CPU code is identical.

Monday, September 12, 2011

OutRun Philko Bootleg

Philko were a South Korean company, founded in 1985, responsible for manufacturing a number of arcade bootleg PCBs. They manufactured a good quality bootleg of OutRun, along with other Sega titles, before being prosecuted in 1989.


The OutRun bootleg is identifiable by the copyright message reading BETA as opposed to SEGA, as shown in the screenshot below.


Although the hardware is different to the original Sega boardset (see MAME source code for details), it turns out that the game code is identical to the standard Rev B edition. The only changes are in fact the copyright message, the patched rom checksum and the encoding detailed below. 

Bizarrely, Philko felt compelled to perform some crude encryption on their code by bitswapping it. As documented in the MAME source code, for the main CPU bits 11,12 and 6,7 should be swapped. For the sub CPU bits 14,15 and 2,3 should be swapped. 

There are at least two distinct revisions of the Philko PCB. Both revisions are three-layer boards. They have the same power and video connectors but a different edge connector for the controls. 

Here is an example of the first revision, kindly provided by Luke Wells. 


Here is an example of the second revision. Note that a custom processor (top middle) has replaced some of the sound section, and the control edge connectors are different (bottom left):


Here are some closeups I found on ebay:



Dip Switches are located on the Middle PCB (Board 2)

Board Dip switch banks are labelled as 1 & 2. These correspond to an original board as follows:
  • Dip switch bank 1 = Original board dip switch B 
  • Dip switch bank 2 = Original board dip switch A


Small Molex .1" - Video Connector
1-Red (Closest to power connector)
2-Green
3-Blue
4-Sync
5-Ground

18 Pin Connector - Controls

Component Side           | Solder Side
-------------------------|------------------------
1  (GND)-Brake Pot 1     | (GND)-Gas Pot 1            
2  (GND)-Steering Pot 1  |   
3  Steering Pot 2 (Wiper)|   
4  Gas Pot 2 (Wiper      |
5  Brake Pot 2 (Wiper)   |
6  Motor Control         |
7  Start Lamp*           |
8  (5v)-Brake Pot 3      |
9  (5v)-Steering Pot 3   |
10 (5v)-Gas Pot 3        |
11 (5v) From Supply      |
12 Test                  |
13 Start 1 |
14 Gear H/L              |
15 Coin 1                |
16 ?                     |
17 (GND)                 |
18 (GND)                 |

*using an LED connect the Cathode to Pin7 and the Anode to 5VDC

Here are photos of a bootlegged cabinet, provided by Francois:

Lots of differences! (Start button, Steering wheel, bezel etc.)

Bootleg cabinet interior shot. Click to enlarge

So this means a couple of things to bootleg board owners: I can potentially provide a version of OutRun Enhanced Edition if there's demand. Or owners can patch with a bitswapped Sega revision B romset, if they dislike the BETA copyright message.

Saturday, September 10, 2011

Turbo OutRun Boardset

I picked up a Turbo OutRun boardset this week. Unlike OutRun, Sega decided to mount the board in a protective cage. The cage has its own internal wiring as shown below. 


The board was in very good condition, it didn't look the cage had ever been opened. The original serial (or selial) stickers were intact:



The board is still fitted with its original FD1094 suicide processor. I'm shocked that some of these are still working 22 years on! The white sticker on the processor reads: SEGA 317-0106.


Here's a closeup of the connections, for my own reference:


And here we have it running on the wiring harness made by RetroClinic. I took the board out of the cage to plug it in.


Tuesday, September 06, 2011

Space Harrier: Enduro Racer Edition

This is a customized version of Space Harrier, modified to run on Enduro Racer hardware.


This means that the game is fully playable on the Enduro boardset without the programmed security i8751 CPU.

Normally, if you try to run Space Harrier on Enduro Racer hardware, the game controls will not function and therefore the game is unusable.

I'd like to thank Mark at retroclinic.com for performing the hardware testing. Without him, this wouldn't have been possible as I don't own either boardset. Please note that currently this requires Enduro Racer hardware with the earlier YM2203 sound board.

Download here: sega_enhanced_v203.zip

Version 2.0.3: Space Harrier: Protection Fix #2 (Enemy shots getting faster over time)
Version 2.0.1:
Incorporated into Sega Enhanced package. Fixed lives bug. 
Version 1.0.1: JunoMan from Sega Resurrection suggested a more elegant solution. Results should be the same. Thanks! 
Version 1.0.0: Initial Release


Please note that no portions of the original game code are included in this package.

Thursday, August 11, 2011

Sega Enhanced [No Longer Supported]

Please note the latest version, OutRun: Enhanced Edition v2 is now available from here. I will leave this old version up for reference only. Please consider it no longer supported. 

This pack contains a collection of enhancements to original SEGA arcade games from the 1980s. It is intended to be used to reprogram the original hardware. Please note that no portions of the original game code are included in this package.

This software is free to use, but not to be sold or used in a commercial product or activity (i.e. do not sell programmed EPROMs on eBay!) For full details please read the license included in the package. 



The following titles are supported:
  • OutRun
  • Space Harrier
  • Super Hang-On
  • Limited Edition Hang-On


OutRun Enhancements:
  • High score saving using existing RAM (no hardware modification required)
  • Improved freeplay mode with attract; press start to begin
  • Music is played during the music selection (radio dial) screen
  • Dipswitch-selectable "MPH" / "km/h" speed display
  • Sound Test: Last Wave added
  • Initial Entry improvements and bugfixes

OutRun Bug-fixes:

Super Hang-On Enhancements:
  • Improved free play mode with attract; press START button to begin

Space Harrier Enhancements:
  • Patch Space Harrier to run on Enduro Racer Hardware. 

Compatibility, programming and installation instructions can be found in the documentation. 

I'd like to thank Darren Finck and Adrian Smethurst  for contributing to this project and for providing hardware testing. 

Older OutRun specific online documentation here.

Sunday, July 24, 2011

OutRun Controller Project

The aim of this project was to have a fully playable OutRun PCB in my lounge, without the overhead of the original controls or cabinet. As an extra requirement, I wanted to be able to swap the original control panel in if desired without any complex rewiring.



The original hardware consists of three analog controls: the accelerator, brake and steering. A perfect replacement pad appeared to be the Dreamcast controller. It contains two analog triggers, which we can map to acceleration and braking plus an analog thumbstick for the steering.

Unfortunately, the original Dreamcast pad uses hall effect sensors for the analog controls and would be unsuitable. Thankfully, many of the third party controllers aren't made to the same standard and instead use cheaper potentiometers, just like the original arcade hardware! In addition to this, there are plenty of digital buttons we can map to things like the gear change and the start button.



I plumped for a Madcatz Dreamcast pad. It's a nasty piece of work, but suitable for rewiring. I cut the original cable off, bypassing the pad's logic circuits and soldered wires directly onto the necessary components. One problem is that many of the components are connected via the pad circuity in a way that makes them unusable. For example, the buttons share a ground connection and the pots are also connected. You'll want to use a continuity tester and cut the PCB tracks between the components.



Thanks to some forum assistance, I found out that the connectors on the OutRun wiring harness are 'Amp Mate N Lok' which can be bought from Swallow Amusements. Using these connectors, I was able to create a wiring harness that would plug straight into the original OutRun wiring loom. It's possible to create your own plugs without buying an official (and expensive) crimping tool. You can simply add solder to the wire, press it into the crimping pin and hope it makes a firm connection. When it does, crush the crimping pin around the wire with some pliers. It might take some time to get it right, but you can still achieve decent results.


One other thing to note is that the OutRun 50P controller connector requires 5v to be sent to pins A24 and A25 or your controls won't work. An odd design decision on behalf of Sega it would seem. The pinouts for the ports can be found below; I've used brackets to denote pins that I didn't wire up:

AMP 50P

Pin A1 Coin Sw #2                     Pin B1  Coin Sw Ground
Pin A2 Coin Sw #1                     Pin B2  (Ground)           
Pin A3                                Pin B3  (Ground)
Pin A4 Shift Switch                   Pin B4  Shift Switch Ground 
Pin A5 Start Sw                       Pin B5  Start Sw Ground
Pin A6 Service Sw                     Pin B6  Service & Test Ground
Pin A7 Test Sw                        Pin B7  (Ground)               
Pin A8                                Pin B8  (Ground)
Pin A9                                Pin B9  (Ground)
Pin A10                               Pin B10 (Ground)
Pin A11                               Pin B11 (Ground)
Pin A12                               Pin B12 (Ground)
Pin A13                               Pin B13 (Ground)    
Pin A14                               Pin B14 Ground
Pin A15                               Pin B15 Ground
Pin A16                               Pin B16 (Ground)                
Pin A17                               Pin B17 (+5V)
Pin A18                               Pin B18 (+5V)
Pin A19                               Pin B19 (+5V)
Pin A20                               Pin B20 (+5V)
Pin A21 (Start Lamp Ground)           Pin B21 (Start Lamp)
Pin A22                               Pin B22 (+5V)
Pin A23                               Pin B23 (+5V)
Pin A24 +5V                           Pin B24 (+5V)
Pin A25 +5V                           Pin B25 (+5V)


AMP 20P

Pin A1 Accel Pot                      Pin B1 Steering Pot
Pin A2 Accel Pot Wiper                Pin B2 Steering Pot Wiper
Pin A3 Accel Pot                      Pin B3 Steering Pot
Pin A4                                Pin B4 Brake Pot
Pin A5                                Pin B5 Brake Pot Wiper
Pin A6                                Pin B6 Brake Pot 
Pin A7                                Pin B7
Pin A8                                Pin B8
Pin A9                                Pin B9
Pin A10                               Pin B10


Here's a video of the final setup in action!


Sunday, December 05, 2010

Road Layer and Slave CPU Code Converted

The entire code for the slave 68k CPU has been ported. This CPU solely controls road generation and interfacing with the road hardware. It's probably the most complex area of the game code. As expected, debugging the code was relatively painful. The code now needs a considerable clean-up, but I'll do that once more of the game code is hooked up, to ensure it's more obvious if I break something whilst refactoring.

The following screenshot shows a section of curved track using both road layers on Coconut Beach. You can begin to see that all the elements are coming together and we're now in a position where we have the building blocks to rewrite the higher level code.