Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
What is Cannonball?
Cannonball is not an emulator; it is a complete rewrite of the original game into portable C++.
Compiled versions of CannonBall can be downloaded from here.
You will need the OutRun Revision B ROMs. They must be named correctly and uncompressed to the roms subdirectory.
Most problems arise from incorrect ROM naming. roms.txt specifies exactly what you need.
You can optionally add the Japanese ROMS for additional courses (found in the outruno set).
Run Cannonball by clicking the relevant icon.
Most options can be toggled with the internal menu.
Some advanced options, like force feedback and music configuration, must be configured by editing the config.xml file.
- 60 fps gameplay (smoother than the original game)
- True widescreen mode (extend the play area by 25%)
- High Resolution mode (improves sprite scaling)
- New Camera Views
- Time Trial Mode (Beat your time on a chosen level)
- Continuous Mode (Play all 15 stages sequentially)
- Western, Japanese & Prototype Track Support
- Support for Custom Tracks from LayOut
- Customisable Music
- Toggle Fixed Audio ROM
- High Score Saving
- Analog and Digital Controllers Supported
- Force Feedback / Haptic Support (Windows Only)
- Automatic gear change
- Cheats (No Traffic, Infinite Time)
- Optional Attract Mode AI Improvements
- More level objects
Fixes for bugs present in the original game:
- Erroneous shadow fix
- Sprite zoom fix
- Correct millisecond value shown on passing checkpoint
- Steering bug
- Misplaced tile on music selection screen fixed
Connect joypads, steering wheels and pedals before starting Cannonball.
The default keys are as follows. You can redefine the keys in the menu.
- Cursors: Steering
- Z: Accelerate
- X: Brake
- Space: Gear Change
- 5: Insert Coin
- 1: Start
- Shift: Change Camera View
- F1: Pause
- F2: Advance a frame when paused (useful for observing visual problems)
- F3: Toggle/Freeze timers. (i.e. infinite time)
- F5: Menu
Analog controls are simulated with digital controls. For example, when you press the left key it takes a second or so until the steering wheel is actually at the hard-left position. You can adjust this speed in the settings to make the controls more responsive (or twitchy if you like!)
Cannonball can also work with analog controllers including racing wheels and pedals.
You can enable analog controls in the Settings -> Controls menu. You should also redefine the gamepad buttons accordingly for start/coin in etc.
There are a few advanced options you might need to edit in the config.xml file. These include which axis the steering and pedals are mapped to. You should be able to check this using the driver software provided with your wheel. It is recommended that each control is mapped to a separate axis in your driver software. However, there is limited split axis support. To enable this, simply configure both the brake and accelerator to be on the same axis.
There is a further zone setting to denote how much of the turning circle of your wheel should be used. Increasing this value from 0 means less of the turning circle of your wheel will be used. This results in tighter steering.
Cannonball provides support for force feedback devices on Windows only.
Firstly, some background; the original OutRun arcade machines provide feedback in three ways:
The mini-upright offers the most basic feedback. During a crash, or when driving off-road, the end of the steering column is struck repeatedly. This causes the wheel to vibrate outwards in a crude manner.
The deluxe upright is somewhat more sophisticated. The steering assembly is mounted on a moveable layer. This layer, and therefore the steering column, is shifted left and right at varying speeds by a motor.
The deluxe sitdown is different yet again. The steering wheel is not connected to a motor mechanism at all. Instead, the entire unit rolls left and right based on your cornering speed, driving off-road and crashing.
On all machines, the wheel is centred by a pair of strong springs.
Cannonball ports the deluxe sitdown motor code. Instead of connecting it to a giant moving seat, the forces are channelled directly to the wheel. This results in both appropriate cornering forces and vibrations on impact. The codebase was not intended to be used in this way, so the results may not be perfect. And the benefits of force feedback will vary depending on your hardware and configuration options.
Force Feedback is one of the more complex areas of Cannonball to configure correctly. Here is what you need to do:
- Open the config.xml file to make these changes.
- Enable analog controls and ensure your analog wheel works fine in Cannonball without feedback. I would suggest setting the zone to a minimum to use most of your wheel's turning circle, presuming your wheel has around 270 degrees of movement.
- Set haptic enabled to "1".
- Experiment with max_force to cap the maximum force sent to the wheel. If the force feels too strong, lower this value. The value should be between 0 and 10,000.
- Experiment with min_force to set the weakest force sent to the wheel. Cannonball sends a range of strengths to the wheel, so you can scale the range appropriately with this setting. The value should be between 0 and max_force.
- If the forces appear to be in the wrong direction, you should make both the max_force and min_force negative.
- Cannonball sends up to 30 commands per second to the hardware. Adjusting the force_duration will alter the length of each of these commands. The value is 1/force_duration seconds. So raising this value shortens the length of each effect.
Unfortunately, due to the range of hardware on the market it's impossible to say how the experience will differ. Start by using the default settings and make adjustments as necessary.
If the wheel rocks left and right whilst driving normally, lower the zone and/or lower the min_force setting.
Replicate the original 4:3 arcade experience as closely as possible.
Enable enhanced features including widescreen, 60 fps gameplay and high resolution sprite scaling.
Time Trial Mode
This is a new game mode that allows you to compete for a best time on any of the 15 tracks. You select a particular track and choose the number of laps you would like to attempt.
More details can be found here.
This is a new game mode. Play all 15 stages sequentially with no road split. This mode features its own high-score table.
Additional Course Options
The original Japanese release of OutRun had different track layouts to the final Western release. Overall, the game is tougher with sharper unforgiving hills, and more aggressive turns.
This selection of tracks is less polished; Coconut Beach is nowhere near as rich in terms of design and the overall difficulty curve doesn't feel as good.
However, it's great to see the evolution of the track design between versions. And Gateway has some cool twists and turns that were removed due to it becoming an easier stage in the Western version.
Japanese tracks can be selected using the internal menu. Note that each set of tracks has its own high score table.
Prototype Coconut Beach
OutRun contains an early, unused version of Coconut Beach (aka Stage 1). It is significantly different from both the Japanese and World versions of this level. It's tougher, with sharper bends although the final chicane is missing. You'll notice there are a few scenery changes, as well as small amounts of ground debris. There are also scenery errors with directional signs pointing the wrong way.
This track can be enabled in the game engine settings using the menu system.
Bored of the existing OutRun tracks? You can make your own using LayOut and play them in CannonBall.
There are a choice of three views: original, in-car and overhead. You can use the shift key to toggle between them, although this can be redefined. You can toggle the view at any point during gameplay.
Basic configuration is available through the built in interface. Advanced configuration is done by editing config.xml manually.
There are two versions of CannonBall. One supports OpenGL Hardware acceleration; the other uses pure software rendering. The software version is compatible with a wider range of graphics cards but is slower as a result.
CannonBall can be run in the following modes:
- Windowed (Can be scaled appropriately)
- Full-Screen Mode (Aspect ratio maintained. Borders may be present.)
- Full-Screen Stretch (Aspect ratio may be lost. No borders.)
CannonBall should v-sync in full-screen mode. For the OpenGL version, you may need to force a vertical sync at 60Hz in your driver settings.
Hi Res Mode
The original game ran at 320x224. This mode doubles that resolution to 640x448. However, rather than simply doubling up the display, the sprites and road are rendered at a higher resolution where possible.
More details can be found here.
Simulate CRT scanlines. You can select the intensity of the scanlines.
In windowed mode, scanlines require a scale factor of 2 or more.
Frames Per Second
The frame rate of the original arcade hardware is somewhat confusing. The game logic, road scrolling and therefore sprite zooming updates at 30fps. However, the horizon scrolls at 60fps.
Cannonball provides three options:
- 30 fps mode. (Useful for slower machines)
- Original mode. (Replicates the arcade hardware)
- 60 fps mode. (The game engine runs at full 60 fps).
Extends the play area to widescreen. The internal resolution is set to 398x224, which is approximately a 16:9 aspect ratio. This means the screen is 25% wider and you get to see more of the game world.
The tilemap x-scroll position is different, to compensate for tilemap wrapping. So the backdrop position will be slightly different to the normal mode.
OutRun Engine Settings
The time setting matches the dip switch setting of the original machine, with the exception of infinite time. The time setting does more than adjust the start time. More details can be found here.
- 0 = Easy (80 seconds)
- 1 = Normal (75 seconds)
- 2 = Hard (72 seconds)
- 3 = Very Hard (70 seconds)
- 4 = Infinite Time
The traffic setting matches the dip switch setting of the original machine, with the exception of no traffic. The setting controls the number of traffic objects that can be spawned. This varies on a per-stage basis. More details can be found here.
- 0 = Easy
- 1 = Normal
- 2 = Hard
- 3 = Very Hard
- 4 = No Traffic
Change the gear shift behaviour. Useful to configure based on your target hardware.
- 0 = Manual (Click to shift, for normal play)
- 1 = Manual (Hold to shift, for cabinet play)
- 2 = Manual (Separate Buttons for High/Low)
- 3 = Automatic (No need to change gear)
Extra Level Objects
For performance reasons, the original game has a limited number of object slots. On particularly busy levels, like Gateway, all the slots are used. This randomly causes elements from the level to be missing. The broken arches are an example of this. Setting this option fixes this issue. Disable it for the original experience.
This screenshot illustrates the problem on MAME:
More information can be found here.
New Attract Mode
Ever been frustrated by just how bad the attract mode AI is? Selecting this option enables a new attract mode that replaces the AI and cycles the camera views for added coolness.
Play sounds in attract mode.
Preview the music tracks at the point of selection in-game. The original game did not have this option and you would not hear the audio track until the game started.
Fix Corrupted Audio
OutRun shipped with a corrupted ROM which contained some of the percussion samples used by the music tracks. Every music track bar Last Wave, is affected by this. Even the original sound track CDs, recorded from the production boards, contain the glitch!
The offending rom, opr-10188.71, appears to have a single bit stuck high (xx1xxxxx). The sample data is distorted as a result.
The samples in this file include the wood blocks and big cymbal crashes. The most noticeable difference is for Splash Wave, which uses many of these samples in it's introduction.
You can visually see the problem in the screenshot below. The bottom waveform is the glitched version. The top waveform is a corrected version.
The corrupt audio ROM can be patched using the bspatch tool.
The file to patch against the audio rom can be found in the following file. You will need the file entitled patch-opr-10188.71. Patch this against the original audio rom to produce the fixed file.
The fixed file should be placed in the roms subdirectory. It should be named opr-10188.71f. It can be toggled using the in-built configuration menu.
Custom Audio Tracks
Cannonball can play WAVs instead of using the inbuilt game music. Configure the name of the replacement tracks for full ingame integration!
You must edit the config.xml file to configure the music.
Please note, I do not intend to support additional file formats like MP3. This is a decision to avoid bloating the codebase with third party libraries. Convert your files with a free audio editor like Audacity.
Copyright (c) 2012-2014 Chris White.
OutRun is a trademark of the SEGA Corporation. This project is not affiliated with SEGA in any way.