1 | //============================================================================ |
2 | // |
3 | // SSSS tt lll lll |
4 | // SS SS tt ll ll |
5 | // SS tttttt eeee ll ll aaaa |
6 | // SSSS tt ee ee ll ll aa |
7 | // SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" |
8 | // SS SS tt ee ll ll aa aa |
9 | // SSSS ttt eeeee llll llll aaaaa |
10 | // |
11 | // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony |
12 | // and the Stella Team |
13 | // |
14 | // See the file "License.txt" for information on usage and redistribution of |
15 | // this file, and for a DISCLAIMER OF ALL WARRANTIES. |
16 | //============================================================================ |
17 | |
18 | #ifndef CARTRIDGEE7_HXX |
19 | #define CARTRIDGEE7_HXX |
20 | |
21 | class System; |
22 | |
23 | #include "bspf.hxx" |
24 | #include "Cart.hxx" |
25 | #ifdef DEBUGGER_SUPPORT |
26 | #include "CartE7Widget.hxx" |
27 | #endif |
28 | #include "CartMNetwork.hxx" |
29 | |
30 | /** |
31 | This is the cartridge class for 16K M-Network bankswitched games. |
32 | |
33 | @author Bradford W. Mott, Thomas Jentzsch |
34 | */ |
35 | class CartridgeE7 : public CartridgeMNetwork |
36 | { |
37 | public: |
38 | /** |
39 | Create a new cartridge using the specified image |
40 | |
41 | @param image Pointer to the ROM image |
42 | @param size The size of the ROM image |
43 | @param md5 The md5sum of the ROM image |
44 | @param settings A reference to the various settings (read-only) |
45 | */ |
46 | CartridgeE7(const ByteBuffer& image, size_t size, const string& md5, |
47 | const Settings& settings); |
48 | virtual ~CartridgeE7() = default; |
49 | |
50 | public: |
51 | /** |
52 | Get a descriptor for the device name (used in error checking). |
53 | |
54 | @return The name of the object |
55 | */ |
56 | string name() const override { return "CartridgeE7" ; } |
57 | |
58 | #ifdef DEBUGGER_SUPPORT |
59 | /** |
60 | Get debugger widget responsible for accessing the inner workings |
61 | of the cart. |
62 | */ |
63 | CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, |
64 | const GUI::Font& nfont, int x, int y, int w, int h) override |
65 | { |
66 | return new CartridgeE7Widget(boss, lfont, nfont, x, y, w, h, *this); |
67 | } |
68 | #endif |
69 | |
70 | private: |
71 | /** |
72 | Check hotspots and switch bank if triggered. |
73 | */ |
74 | void checkSwitchBank(uInt16 address) override; |
75 | |
76 | private: |
77 | // Following constructors and assignment operators not supported |
78 | CartridgeE7() = delete; |
79 | CartridgeE7(const CartridgeE7&) = delete; |
80 | CartridgeE7(CartridgeE7&&) = delete; |
81 | CartridgeE7& operator=(const CartridgeE7&) = delete; |
82 | CartridgeE7& operator=(CartridgeE7&&) = delete; |
83 | }; |
84 | |
85 | #endif |
86 | |