2011-04-24 01:14:00 +00:00
|
|
|
/**
|
|
|
|
** Supermodel
|
|
|
|
** A Sega Model 3 Arcade Emulator.
|
2011-09-14 19:08:43 +00:00
|
|
|
** Copyright 2011 Bart Trzynadlowski, Nik Henson
|
2011-04-24 01:14:00 +00:00
|
|
|
**
|
|
|
|
** This file is part of Supermodel.
|
|
|
|
**
|
|
|
|
** Supermodel is free software: you can redistribute it and/or modify it under
|
|
|
|
** the terms of the GNU General Public License as published by the Free
|
|
|
|
** Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
** any later version.
|
|
|
|
**
|
|
|
|
** Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
** more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License along
|
|
|
|
** with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**/
|
2011-08-03 03:18:51 +00:00
|
|
|
|
2011-04-24 01:14:00 +00:00
|
|
|
/*
|
|
|
|
* Games.h
|
|
|
|
*
|
|
|
|
* Header file containing Model 3 game and ROM file information.
|
|
|
|
*/
|
2011-08-03 03:18:51 +00:00
|
|
|
|
2011-04-24 01:14:00 +00:00
|
|
|
#ifndef INCLUDED_GAMES_H
|
|
|
|
#define INCLUDED_GAMES_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ROMLoad.h" // ROMInfo structure
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
Definitions
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
// Input flags
|
Some updates to Supermodel made at beginning of the year but only now got around to checking in (better late than never...):
- hooked up the remaining controls in Supermodel (except for Magical Truck Adventure which does not work at all yet). The new controls are:
* InputAnalogJoyTrigger2 and InputAnalogJoyEvent2 for the additional second trigger and event buttons that were missing from Star Wars Trilogy,
* InputRearBrake and InputMusicSelect for the rear brake and music selection buttons that were missing from Harley Davidson,
* InputAnalogGunXXX, InputAnalogTriggerXXX, InputAnalogGunXXX2 and InputAnalogTriggerXXX2 for the analogue guns of Ocean Hunter and LA Machineguns (NOTE: these controls must be calibrated in the games' service menus otherwise they will not work properly. Also, the alignment of the gun cursor does not line up very well with the mouse position at the moment, but at least the games are a bit more playable now, although still with numerous graphical glitches...)
* InputSkiXXX for the controls of Ski Champ, making the game playable now.
- hooked up existing InputViewChange control to Harley Davidson's view change button
- improved the handling of InputGearShiftUp/Down inputs so that they work better with the driving games. With Dirt Devils, ECA, Harley and LeMans this means they map directly to the game's own shift up/down controls, while with the 4-speed games such as Daytona 2, Scud Racer and Sega Rally 2, they simulate the user shifting up and down through the gears
- added defaults for the new controls to Supermodel.ini
- other small code tweaks:
* fix small bug with handling of pos/neg inputs mapping to a control with inverted range (0XFF to 0x00) - this was needed to get Ski Champ's X-axis to work properly
* removed Wait method from InputSystem and added to CThread as CThread::Sleep instead
* added FrameTimings struct to hold all frame timings in a single place
No networking code yet as just haven't had a chance to work on it since initial progress at the beginning of the year - am *hoping* might have some time to pick it up again over Christmas...
2013-11-30 19:39:59 +00:00
|
|
|
#define GAME_INPUT_COMMON 0x00001 // game has common controls
|
|
|
|
#define GAME_INPUT_VEHICLE 0x00002 // game has vehicle controls
|
|
|
|
#define GAME_INPUT_JOYSTICK1 0x00004 // game has joystick 1
|
|
|
|
#define GAME_INPUT_JOYSTICK2 0x00008 // game has joystick 2
|
|
|
|
#define GAME_INPUT_FIGHTING 0x00010 // game has fighting game controls
|
|
|
|
#define GAME_INPUT_VR4 0x00020 // game has four VR view buttons
|
|
|
|
#define GAME_INPUT_VIEWCHANGE 0x00040 // game has single view change button
|
|
|
|
#define GAME_INPUT_SHIFT4 0x00080 // game has 4-speed shifter
|
|
|
|
#define GAME_INPUT_SHIFTUPDOWN 0x00100 // game has up/down shifter
|
|
|
|
#define GAME_INPUT_HANDBRAKE 0x00200 // game has handbrake
|
|
|
|
#define GAME_INPUT_HARLEY 0x00400 // game has Harley Davidson controls
|
|
|
|
#define GAME_INPUT_GUN1 0x00800 // game has light gun 1
|
|
|
|
#define GAME_INPUT_GUN2 0x01000 // game has light gun 2
|
|
|
|
#define GAME_INPUT_ANALOG_JOYSTICK 0x02000 // game has analog joystick
|
|
|
|
#define GAME_INPUT_TWIN_JOYSTICKS 0x04000 // game has twin joysticks
|
|
|
|
#define GAME_INPUT_SOCCER 0x08000 // game has soccer controls
|
|
|
|
#define GAME_INPUT_SPIKEOUT 0x10000 // game has Spikeout buttons
|
|
|
|
#define GAME_INPUT_ANALOG_GUN1 0x20000 // game has analog gun 1
|
|
|
|
#define GAME_INPUT_ANALOG_GUN2 0x40000 // game has analog gun 2
|
|
|
|
#define GAME_INPUT_SKI 0x80000 // game has ski controls
|
|
|
|
#define GAME_INPUT_ALL 0xFFFFF
|
2011-08-03 03:18:51 +00:00
|
|
|
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
Data Structures
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* GameInfo:
|
|
|
|
*
|
|
|
|
* Describes a Model 3 game. List is terminated when title == NULL.
|
|
|
|
*/
|
|
|
|
struct GameInfo
|
|
|
|
{
|
|
|
|
// Game information
|
2011-08-03 03:18:51 +00:00
|
|
|
const char id[10]; // 9-character game identifier (also serves as zip archive file name)
|
2012-07-12 05:28:08 +00:00
|
|
|
const char *parent; // parent game identifier
|
2011-04-24 01:14:00 +00:00
|
|
|
const char *title; // complete game title
|
|
|
|
const char *mfgName; // name of manufacturer
|
|
|
|
unsigned year; // year released (in decimal)
|
|
|
|
int step; // Model 3 hardware stepping: 0x10 = 1.0, 0x15 = 1.5, 0x20 = 2.0, 0x21 = 2.1
|
|
|
|
unsigned cromSize; // size of fixed CROM (up to 8 MB)
|
2011-09-08 06:34:18 +00:00
|
|
|
bool mirrorLow64MB; // mirror low 64 MB of banked CROM space to upper 64 MB
|
2011-07-16 04:53:12 +00:00
|
|
|
unsigned vromSize; // size of video ROMs (32 or 64 MB; if 32 MB, will have to be mirrored)
|
|
|
|
unsigned sampleSize; // size of sample ROMS (8 or 16 MB; if 8 MB, will have to be mirrored)
|
2011-04-24 01:14:00 +00:00
|
|
|
unsigned inputFlags; // game input types
|
2011-07-31 02:37:31 +00:00
|
|
|
int mpegBoard; // MPEG music board type: 0 = none, 1 = DSB1 (Z80), 2 = DSB2 (68K).
|
2011-09-08 01:07:06 +00:00
|
|
|
bool driveBoard; // drive board (supported if true)
|
2011-08-03 03:18:51 +00:00
|
|
|
|
2011-04-24 01:14:00 +00:00
|
|
|
// ROM files
|
2011-07-31 02:37:31 +00:00
|
|
|
struct ROMInfo ROM[48];
|
2011-04-24 01:14:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
Model 3 Game List
|
2011-08-03 03:18:51 +00:00
|
|
|
|
2011-04-24 01:14:00 +00:00
|
|
|
All games supported by Supermodel. All ROMs are loaded according to their
|
|
|
|
native endianness. That is, the PowerPC ROMs are loaded just as a real
|
|
|
|
PowerPC would see them. The emulator may reorder the bytes on its own for
|
|
|
|
performance reasons (but the ROMs are not specified that way here).
|
|
|
|
******************************************************************************/
|
|
|
|
|
2011-08-19 23:47:33 +00:00
|
|
|
extern const struct GameInfo g_Model3GameList[];
|
2011-04-24 01:14:00 +00:00
|
|
|
|
|
|
|
|
2011-08-03 03:18:51 +00:00
|
|
|
#endif // INCLUDED_GAMES_H
|