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 CARTRIDGE_E78K_HXX |
19 | #define CARTRIDGE_E78K_HXX |
20 | |
21 | #include "bspf.hxx" |
22 | #include "Cart.hxx" |
23 | #ifdef DEBUGGER_SUPPORT |
24 | #include "CartE78KWidget.hxx" |
25 | #endif |
26 | #include "CartMNetwork.hxx" |
27 | |
28 | /** |
29 | This is the cartridge class for 8K M-Network bankswitched games. |
30 | |
31 | @author Bradford W. Mott, Thomas Jentzsch |
32 | */ |
33 | class CartridgeE78K : public CartridgeMNetwork |
34 | { |
35 | public: |
36 | /** |
37 | Create a new cartridge using the specified image |
38 | |
39 | @param image Pointer to the ROM image |
40 | @param size The size of the ROM image |
41 | @param md5 The md5sum of the ROM image |
42 | @param settings A reference to the various settings (read-only) |
43 | */ |
44 | CartridgeE78K(const ByteBuffer& image, size_t size, const string& md5, |
45 | const Settings& settings); |
46 | virtual ~CartridgeE78K() = default; |
47 | |
48 | public: |
49 | /** |
50 | Get a descriptor for the device name (used in error checking). |
51 | |
52 | @return The name of the object |
53 | */ |
54 | string name() const override { return "CartridgeE78K" ; } |
55 | |
56 | #ifdef DEBUGGER_SUPPORT |
57 | /** |
58 | Get debugger widget responsible for accessing the inner workings |
59 | of the cart. |
60 | */ |
61 | CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, |
62 | const GUI::Font& nfont, int x, int y, int w, int h) override |
63 | { |
64 | return new CartridgeE78KWidget(boss, lfont, nfont, x, y, w, h, *this); |
65 | } |
66 | #endif |
67 | |
68 | private: |
69 | /** |
70 | Check hotspots and switch bank if triggered. |
71 | */ |
72 | void checkSwitchBank(uInt16 address) override; |
73 | |
74 | private: |
75 | // Following constructors and assignment operators not supported |
76 | CartridgeE78K() = delete; |
77 | CartridgeE78K(const CartridgeE78K&) = delete; |
78 | CartridgeE78K(CartridgeE78K&&) = delete; |
79 | CartridgeE78K& operator=(const CartridgeE78K&) = delete; |
80 | CartridgeE78K& operator=(CartridgeE78K&&) = delete; |
81 | }; |
82 | |
83 | #endif |
84 | |