-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathRoms.cpp
More file actions
223 lines (209 loc) · 7.25 KB
/
Roms.cpp
File metadata and controls
223 lines (209 loc) · 7.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/* *****************************************************************************
* A.L.E (Arcade Learning Environment)
* Copyright (c) 2009-2013 by Yavar Naddaf, Joel Veness, Marc G. Bellemare and
* the Reinforcement Learning and Artificial Intelligence Laboratory
* Released under the GNU General Public License; see License.txt for details.
*
* Based on: Stella -- "An Atari 2600 VCS Emulator"
* Copyright (c) 1995-2007 by Bradford W. Mott and the Stella team
*
* *****************************************************************************
*/
#include "Roms.hpp"
#include "RomSettings.hpp"
#include "RomUtils.hpp"
// include the game implementations
/// snes games
#include "supported/AtariCollection.hpp"
#include "supported/ClassicKong.hpp"
#include "supported/FinalFight.hpp"
#include "supported/FZero.hpp"
#include "supported/FZeroNoSpeed.hpp"
#include "supported/GradiusIII.hpp"
#include "supported/MortalKombat2Players.hpp"
#include "supported/NBAGiveNGo.hpp"
#include "supported/SuperMarioWorld.hpp"
#include "supported/SuperMarioAllStars.hpp"
#include "supported/SuperMarioAllStarsNoRight.hpp"
#include "supported/TetrisAndDrMario.hpp"
#include "supported/Boxing.hpp"
#include "supported/Wolfenstein.hpp"
#include "supported/Aladdin.hpp"
#include "supported/StreetFighterII.hpp"
#include "supported/BustAMove.hpp"
#include "supported/SuperMarioKart.hpp"
#include "supported/SuperDoubleDragon.hpp"
#include "supported/ContraIII.hpp"
#include "supported/ArkanoidDohItAgain.hpp"
// genesis games
#include "supported/SonicTheHedgehog.hpp"
#include "supported/StreetsOfRage.hpp"
#include "supported/StreetsOfRage2Players.hpp"
#include "supported/StreetsOfRageII.hpp"
#include "supported/StreetsOfRageII2Players.hpp"
#include "supported/StreetsOfRageIII.hpp"
#include "supported/StreetsOfRageIII2Players.hpp"
// Atari Games
//#include "supported/Breakout.hpp"
//#include "supported/Carnival.hpp"
//#include "supported/Centipede.hpp"
//#include "supported/ChopperCommand.hpp"
//#include "supported/CrazyClimber.hpp"
//#include "supported/Defender.hpp"
//#include "supported/DemonAttack.hpp"
//#include "supported/DoubleDunk.hpp"
//#include "supported/ElevatorAction.hpp"
//#include "supported/Enduro.hpp"
//#include "supported/FishingDerby.hpp"
//#include "supported/Freeway.hpp"
//#include "supported/Frostbite.hpp"
//#include "supported/Gopher.hpp"
//#include "supported/Gravitar.hpp"
//#include "supported/Hero.hpp"
//#include "supported/IceHockey.hpp"
//#include "supported/JamesBond.hpp"
//#include "supported/JourneyEscape.hpp"
//#include "supported/Kangaroo.hpp"
//#include "supported/Krull.hpp"
//#include "supported/KungFuMaster.hpp"
//#include "supported/MontezumaRevenge.hpp"
//#include "supported/MsPacman.hpp"
//#include "supported/NameThisGame.hpp"
//#include "supported/Phoenix.hpp"
//#include "supported/Pitfall.hpp"
//#include "supported/Pong.hpp"
//#include "supported/Pooyan.hpp"
//#include "supported/PrivateEye.hpp"
//#include "supported/QBert.hpp"
//#include "supported/RiverRaid.hpp"
//#include "supported/RoadRunner.hpp"
//#include "supported/RoboTank.hpp"
#include "supported/Seaquest.hpp"
//#include "supported/Skiing.hpp"
//#include "supported/Solaris.hpp"
//#include "supported/SpaceInvaders.hpp"
//#include "supported/StarGunner.hpp"
//#include "supported/Tennis.hpp"
//#include "supported/Tetris.hpp"
//#include "supported/TimePilot.hpp"
//#include "supported/Tutankham.hpp"
//#include "supported/UpNDown.hpp"
//#include "supported/Venture.hpp"
//#include "supported/VideoPinball.hpp"
//#include "supported/WizardOfWor.hpp"
//#include "supported/YarsRevenge.hpp"
//#include "supported/Zaxxon.hpp"
using namespace rle;
/* list of supported games */
static const RomSettings *roms[] = {
// Atari Games
// new AirRaidSettings(),
// new AlienSettings(),
// new AmidarSettings(),
// new AssaultSettings(),
// new AsterixSettings(),
// new AsteroidsSettings(),
// new AtlantisSettings(),
// new BankHeistSettings(),
// new BattleZoneSettings(),
// new BeamRiderSettings(),
// new BerzerkSettings(),
// new BowlingSettings(),
new BoxingSettings(),
// new BreakoutSettings(),
// new CarnivalSettings(),
// new CentipedeSettings(),
// new ChopperCommandSettings(),
// new CrazyClimberSettings(),
// new DefenderSettings(),
// new DemonAttackSettings(),
// new DoubleDunkSettings(),
// new ElevatorActionSettings(),
// new EnduroSettings(),
// new FishingDerbySettings(),
// new FreewaySettings(),
// new FrostbiteSettings(),
// new GopherSettings(),
// new GravitarSettings(),
// new HeroSettings(),
// new IceHockeySettings(),
// new JamesBondSettings(),
// new JourneyEscapeSettings(),
// new KangarooSettings(),
// new KrullSettings(),
// new KungFuMasterSettings(),
// new MontezumaRevengeSettings(),
// new MsPacmanSettings(),
// new NameThisGameSettings(),
// new PhoenixSettings(),
// new PitfallSettings(),
// new PongSettings(),
// new PooyanSettings(),
// new PrivateEyeSettings(),
// new QBertSettings(),
// new RiverRaidSettings(),
// new RoadRunnerSettings(),
// new RoboTankSettings(),
new SeaquestSettings(),
// new SkiingSettings(),
// new SolarisSettings(),
// new SpaceInvadersSettings(),
// new StarGunnerSettings(),
// new TennisSettings(),
// new TetrisSettings(),
// new TimePilotSettings(),
// new TutankhamSettings(),
// new UpNDownSettings(),
// new VentureSettings(),
// new VideoPinballSettings(),
// new WizardOfWorSettings(),
// new YarsRevengeSettings(),
// new ZaxxonSettings(),
// SNES games
new AtariCollectionSettings(),
new ArkanoidDohItAgainSettings(),
new ClassicKongSettings(),
new ContraIIISettings(),
new FinalFightSettings(),
new FZeroSettings(),
new FZeroNoSpeedSettings(),
new GradiusIIISettings(),
new MortalKombatSettings(),
new MortalKombat2PlayersSettings(),
new NBAGiveNGoSettings(),
new SuperDoubleDragonSettings(),
new SuperMarioAllStarsSettings(),
new SuperMarioAllStarsNoRightSettings(),
new SuperMarioKartSettings(),
new SuperMarioWorldSettings(),
new TetrisAndDrMarioSettings(),
new WolfensteinSettings(),
new AladdinSettings(),
new StreetFighterIISettings(),
new BustAMoveSettings(),
//Genesis games
new SonicTheHedgehogSettings(),
new StreetsOfRageSettings(),
new StreetsOfRage2PlayersSettings(),
new StreetsOfRageIISettings(),
new StreetsOfRageII2PlayersSettings(),
new StreetsOfRageIIISettings(),
new StreetsOfRageIII2PlayersSettings(),
};
/* looks for the RL wrapper corresponding to a particular rom title */
RomSettings *rle::buildRomRLWrapper(const std::string &rom, bool twoPlayers) {
size_t slash_ind = rom.find_last_of("/\\");
std::string rom_str = rom.substr(slash_ind + 1);
size_t dot_idx = rom_str.find_first_of(".");
rom_str = rom_str.substr(0, dot_idx);
std::transform(rom_str.begin(), rom_str.end(), rom_str.begin(), ::tolower);
if(twoPlayers){
rom_str += "_2_players";
}
for (size_t i=0; i < sizeof(roms)/sizeof(roms[0]); i++) {
if (rom_str == roms[i]->rom()) return roms[i]->clone();
}
std::cerr << COLOR_RED << "ERROR: " << rom << " ROM file name is invalid." << endl;
std:: cerr << "Rename the ROM so it is underscore separated. For example: super_mario_world.sfc" << COLOR_RESET << endl;
exit(1);
}