2009-04-05 20:18:41 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2019-12-31 17:18:56 +00:00
|
|
|
// Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2009-04-05 20:18:41 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2009-04-05 20:18:41 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef CARTRIDGEEFSC_HXX
|
|
|
|
#define CARTRIDGEEFSC_HXX
|
|
|
|
|
|
|
|
class System;
|
|
|
|
|
|
|
|
#include "bspf.hxx"
|
2020-04-04 08:53:14 +00:00
|
|
|
#include "CartEF.hxx"
|
2013-04-06 21:04:11 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
|
|
|
#include "CartEFSCWidget.hxx"
|
|
|
|
#endif
|
2009-04-05 20:18:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Cartridge class used for Homestar Runner by Paul Slocum.
|
|
|
|
There are 16 4K banks (total of 64K ROM) with 128 bytes of RAM.
|
|
|
|
Accessing $1FE0 - $1FEF switches to each bank.
|
2017-08-31 15:31:45 +00:00
|
|
|
RAM read port is $1080 - $10FF, write port is $1000 - $107F.
|
2009-04-05 20:18:41 +00:00
|
|
|
|
2020-04-04 08:53:14 +00:00
|
|
|
@author Stephen Anthony, Thomas Jentzsch
|
2009-04-05 20:18:41 +00:00
|
|
|
*/
|
2020-04-04 08:53:14 +00:00
|
|
|
class CartridgeEFSC : public CartridgeEF
|
2009-04-05 20:18:41 +00:00
|
|
|
{
|
2013-04-06 21:04:11 +00:00
|
|
|
friend class CartridgeEFSCWidget;
|
|
|
|
|
2009-04-05 20:18:41 +00:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Create a new cartridge using the specified image
|
|
|
|
|
2010-08-19 21:48:28 +00:00
|
|
|
@param image Pointer to the ROM image
|
2012-01-02 20:31:42 +00:00
|
|
|
@param size The size of the ROM image
|
2018-12-18 13:54:40 +00:00
|
|
|
@param md5 The md5sum of the ROM image
|
2010-08-19 21:48:28 +00:00
|
|
|
@param settings A reference to the various settings (read-only)
|
2009-04-05 20:18:41 +00:00
|
|
|
*/
|
2019-09-16 23:59:08 +00:00
|
|
|
CartridgeEFSC(const ByteBuffer& image, size_t size, const string& md5,
|
2018-12-18 13:54:40 +00:00
|
|
|
const Settings& settings);
|
2015-12-29 21:28:10 +00:00
|
|
|
virtual ~CartridgeEFSC() = default;
|
2009-04-05 20:18:41 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Get a descriptor for the device name (used in error checking).
|
|
|
|
|
|
|
|
@return The name of the object
|
|
|
|
*/
|
2015-07-10 18:59:03 +00:00
|
|
|
string name() const override { return "CartridgeEFSC"; }
|
2009-04-05 20:18:41 +00:00
|
|
|
|
2013-04-06 21:04:11 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
|
|
|
/**
|
|
|
|
Get debugger widget responsible for accessing the inner workings
|
|
|
|
of the cart.
|
|
|
|
*/
|
2013-08-26 13:01:29 +00:00
|
|
|
CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont,
|
2015-07-10 18:59:03 +00:00
|
|
|
const GUI::Font& nfont, int x, int y, int w, int h) override
|
2013-04-06 21:04:11 +00:00
|
|
|
{
|
2013-08-26 13:01:29 +00:00
|
|
|
return new CartridgeEFSCWidget(boss, lfont, nfont, x, y, w, h, *this);
|
2013-04-06 21:04:11 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-04-05 20:18:41 +00:00
|
|
|
private:
|
2020-04-04 08:53:14 +00:00
|
|
|
uInt16 getStartBank() const override { return 15; }
|
2009-04-05 20:18:41 +00:00
|
|
|
|
2020-04-04 08:53:14 +00:00
|
|
|
private:
|
|
|
|
// RAM size
|
|
|
|
static constexpr uInt16 RAM_SIZE = 0x80;
|
2015-12-05 01:30:17 +00:00
|
|
|
|
2015-04-26 19:02:42 +00:00
|
|
|
private:
|
|
|
|
// Following constructors and assignment operators not supported
|
|
|
|
CartridgeEFSC() = delete;
|
|
|
|
CartridgeEFSC(const CartridgeEFSC&) = delete;
|
|
|
|
CartridgeEFSC(CartridgeEFSC&&) = delete;
|
|
|
|
CartridgeEFSC& operator=(const CartridgeEFSC&) = delete;
|
|
|
|
CartridgeEFSC& operator=(CartridgeEFSC&&) = delete;
|
2009-04-05 20:18:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|