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