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#include "CartMNetwork.hxx"
19#include "CartE7Widget.hxx"
20
21// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22CartridgeE7Widget::CartridgeE7Widget(
23 GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
24 int x, int y, int w, int h,
25 CartridgeMNetwork& cart)
26 : CartridgeMNetworkWidget(boss, lfont, nfont, x, y, w, h, cart)
27{
28 ostringstream info;
29 info << "E7 cartridge, 8 2K slices ROM + 2 1K RAM\n"
30 << "Lower 2K accessible @ $F000 - $F7FF\n"
31 << " Slice 0 - 6 of ROM (hotspots $FE0 to $FE6)\n"
32 << " Slice 7 (1K) of RAM (hotspot $FE7)\n"
33 << " $F400 - $F7FF (R), $F000 - $F3FF (W)\n"
34 << "256B RAM accessible @ $F800 - $F9FF\n"
35 << " Hotspots $FE8 - $FEB (256B of RAM slice 1)\n"
36 << " $F900 - $F9FF (R), $F800 - $F8FF (W)\n"
37 << "Upper 1.5K ROM accessible @ $FA00 - $FFFF\n"
38 << " Always points to last 1.5K of ROM\n"
39 << "Startup slices = 0 / 0 or undetermined\n";
40
41#if 0
42 // Eventually, we should query this from the debugger/disassembler
43 uInt16 start = (cart.myImage[size-3] << 8) | cart.myImage[size-4];
44 start -= start % 0x1000;
45 info << "Bank RORG" << " = $" << HEX4 << start << "\n";
46#endif
47
48 initialize(boss, cart, info);
49}
50
51// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52const char* CartridgeE7Widget::getSpotLower(int idx)
53{
54 static const char* const spot_lower[] = {
55 "0 - ROM ($FFE0)", "1 - ROM ($FFE1)", "2 - ROM ($FFE2)", "3 - ROM ($FFE3)",
56 "4 - ROM ($FFE4)", "5 - ROM ($FFE5)", "6 - ROM ($FFE6)", "7 - RAM ($FFE7)"
57 };
58
59 return spot_lower[idx];
60}
61
62// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
63const char* CartridgeE7Widget::getSpotUpper(int idx)
64{
65 static const char* const spot_upper[] = {
66 "0 - RAM ($FFE8)", "1 - RAM ($FFE9)", "2 - RAM ($FFEA)", "3 - RAM ($FFEB)"
67 };
68
69 return spot_upper[idx];
70}
71