Added support for Commavid extra RAM cart and for the Megaboy.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@36 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
estolberg 2002-01-18 16:04:46 +00:00
parent 351469d1a1
commit 72d209a88d
2 changed files with 26 additions and 10 deletions

View File

@ -13,7 +13,7 @@
## See the file "license" for information on usage and redistribution of ## See the file "license" for information on usage and redistribution of
## this file, and for a DISCLAIMER OF ALL WARRANTIES. ## this file, and for a DISCLAIMER OF ALL WARRANTIES.
## ##
## $Id: makefile,v 1.5 2002-01-16 15:09:21 stephena Exp $ ## $Id: makefile,v 1.6 2002-01-18 16:04:46 estolberg Exp $
##============================================================================ ##============================================================================
##============================================================================ ##============================================================================
@ -24,11 +24,11 @@
##============================================================================ ##============================================================================
### for normal optimization, full warnings ### for normal optimization, full warnings
OPTIMIZATIONS = -O -Wall # OPTIMIZATIONS = -O -Wall
### for common optimizations, full warnings except unused vars ### for common optimizations, full warnings except unused vars
# OPTIMIZATIONS = -O2 -Wall -Wno-unused # OPTIMIZATIONS = -O2 -Wall -Wno-unused
### this should work with all compilers ### this should work with all compilers
# OPTIMIZATIONS = OPTIMIZATIONS =
### to get full optimization under gcc/x Intel based OS's.. ### to get full optimization under gcc/x Intel based OS's..
# OPTIMIZATIONS = -O3 -mcpu=pentiumpro -march=pentiumpro -Wall -Wno-unused \ # OPTIMIZATIONS = -O3 -mcpu=pentiumpro -march=pentiumpro -Wall -Wno-unused \
# -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math \ # -funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math \
@ -209,8 +209,8 @@ M6502_OBJS = D6502.o Device.o M6502.o M6502Low.o M6502Hi.o NullDev.o System.o
CORE_OBJS = Booster.o Cart.o Cart2K.o Cart3F.o Cart4K.o CartAR.o CartDPC.o \ CORE_OBJS = Booster.o Cart.o Cart2K.o Cart3F.o Cart4K.o CartAR.o CartDPC.o \
CartE0.o CartE7.o CartF4SC.o CartF6.o CartF6SC.o CartF8.o \ CartE0.o CartE7.o CartF4SC.o CartF6.o CartF6SC.o CartF8.o \
CartF8SC.o CartFASC.o CartFE.o CartMC.o Console.o \ CartF8SC.o CartFASC.o CartFE.o CartMC.o CartCV.o CartMB.o \
Control.o Driving.o \ Console.o Control.o Driving.o \
Event.o Joystick.o Keyboard.o M6532.o MD5.o MediaSrc.o Paddles.o \ Event.o Joystick.o Keyboard.o M6532.o MD5.o MediaSrc.o Paddles.o \
Props.o PropsSet.o Random.o Sound.o Switches.o TIA.o \ Props.o PropsSet.o Random.o Sound.o Switches.o TIA.o \
$(M6502_OBJS) $(M6502_OBJS)
@ -319,6 +319,12 @@ CartFE.o: $(CORE)/CartFE.cxx
CartMC.o: $(CORE)/CartMC.cxx CartMC.o: $(CORE)/CartMC.cxx
$(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/CartMC.cxx $(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/CartMC.cxx
CartMB.o: $(CORE)/CartMB.cxx
$(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/CartMB.cxx
CartCV.o: $(CORE)/CartCV.cxx
$(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/CartCV.cxx
M6532.o: $(CORE)/M6532.cxx M6532.o: $(CORE)/M6532.cxx
$(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/M6532.cxx $(CXX) -c $(CXXFLAGS) $(OPTIONS) $(CORE)/M6532.cxx

View File

@ -1,8 +1,8 @@
//============================================================================ //============================================================================
// //
// SSSS tt lll lll // SSSS tt lll lll
// SS SS tt ll ll // SS SS tt ll ll
// SS tttttt eeee ll ll aaaa // SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa // SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" // SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa // SS SS tt ee ll ll aa aa
@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Cart.cxx,v 1.2 2001-12-30 18:43:30 bwmott Exp $ // $Id: Cart.cxx,v 1.3 2002-01-18 16:03:48 estolberg Exp $
//============================================================================ //============================================================================
#include <assert.h> #include <assert.h>
@ -34,11 +34,13 @@
#include "CartFASC.hxx" #include "CartFASC.hxx"
#include "CartFE.hxx" #include "CartFE.hxx"
#include "CartMC.hxx" #include "CartMC.hxx"
#include "CartMB.hxx"
#include "CartCV.hxx"
#include "MD5.hxx" #include "MD5.hxx"
#include "Props.hxx" #include "Props.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge* Cartridge::create(const uInt8* image, uInt32 size, Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
const Properties& properties) const Properties& properties)
{ {
Cartridge* cartridge = 0; Cartridge* cartridge = 0;
@ -83,6 +85,10 @@ Cartridge* Cartridge::create(const uInt8* image, uInt32 size,
cartridge = new CartridgeFE(image); cartridge = new CartridgeFE(image);
else if(type == "MC") else if(type == "MC")
cartridge = new CartridgeMC(image, size); cartridge = new CartridgeMC(image, size);
else if(type == "MB")
cartridge = new CartridgeMB(image);
else if(type == "CV")
cartridge = new CartridgeCV(image, size);
else else
{ {
// TODO: At some point this should be handled in a better way... // TODO: At some point this should be handled in a better way...
@ -179,6 +185,10 @@ string Cartridge::autodetectType(const uInt8* image, uInt32 size)
{ {
type = "F4SC"; type = "F4SC";
} }
else if(size == 65536)
{
type = "MB";
}
else if(size == 131072) else if(size == 131072)
{ {
type = "MC"; type = "MC";