startup bank randomization info added to widgets

This commit is contained in:
thrust26 2017-11-29 20:48:19 +01:00
parent 30cb1fe14d
commit 2a4db8e11e
18 changed files with 24 additions and 27 deletions

View File

@ -34,7 +34,7 @@ CartridgeDPCWidget::CartridgeDPCWidget(
<< "DPC registers accessible @ $F000 - $F07F\n" << "DPC registers accessible @ $F000 - $F07F\n"
<< " $F000 - $F03F (R), $F040 - $F07F (W)\n" << " $F000 - $F03F (R), $F040 - $F07F (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000)

View File

@ -30,14 +30,14 @@ CartridgeE78KWidget::CartridgeE78KWidget(
info << "E78K cartridge, 4 2K slices ROM + 2 1K RAM\n" info << "E78K cartridge, 4 2K slices ROM + 2 1K RAM\n"
<< "Lower 2K accessible @ $F000 - $F7FF\n" << "Lower 2K accessible @ $F000 - $F7FF\n"
<< " Slice 0 - 2 of ROM (hotspots $FE4 to $FE6)\n" << " Slice 0 - 2 of ROM (hotspots $FE4 to $FE6)\n"
<< " Slice 0 (1K) of RAM (hotspot $FE7)\n" << " Slice 3 (1K) of RAM (hotspot $FE7)\n"
<< " $F400 - $F7FF (R), $F000 - $F3FF (W)\n" << " $F400 - $F7FF (R), $F000 - $F3FF (W)\n"
<< "256B RAM accessible @ $F800 - $F9FF\n" << "256B RAM accessible @ $F800 - $F9FF\n"
<< " Hotspots $FE8 - $FEB (256B of RAM slice 1)\n" << " Hotspots $FE8 - $FEB (256B of RAM slice 1)\n"
<< " $F900 - $F9FF (R), $F800 - $F8FF (W)\n" << " $F900 - $F9FF (R), $F800 - $F8FF (W)\n"
<< "Upper 1.5K ROM accessible @ $FA00 - $FFFF\n" << "Upper 1.5K ROM accessible @ $FA00 - $FFFF\n"
<< " Always points to last 1.5K of ROM\n" << " Always points to last 1.5K of ROM\n"
<< "Startup slices = " << cart.myStartBank << " / 0\n"; << "Startup slices = 0 / 0 or undetermined\n";
#if 0 #if 0
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler

View File

@ -29,14 +29,14 @@ CartridgeE7Widget::CartridgeE7Widget(
info << "E7 cartridge, 8 2K slices ROM + 2 1K RAM\n" info << "E7 cartridge, 8 2K slices ROM + 2 1K RAM\n"
<< "Lower 2K accessible @ $F000 - $F7FF\n" << "Lower 2K accessible @ $F000 - $F7FF\n"
<< " Slice 0 - 6 of ROM (hotspots $FE0 to $FE6)\n" << " Slice 0 - 6 of ROM (hotspots $FE0 to $FE6)\n"
<< " Slice 0 (1K) of RAM (hotspot $FE7)\n" << " Slice 7 (1K) of RAM (hotspot $FE7)\n"
<< " $F400 - $F7FF (R), $F000 - $F3FF (W)\n" << " $F400 - $F7FF (R), $F000 - $F3FF (W)\n"
<< "256B RAM accessible @ $F800 - $F9FF\n" << "256B RAM accessible @ $F800 - $F9FF\n"
<< " Hotspots $FE8 - $FEB (256B of RAM slice 1)\n" << " Hotspots $FE8 - $FEB (256B of RAM slice 1)\n"
<< " $F900 - $F9FF (R), $F800 - $F8FF (W)\n" << " $F900 - $F9FF (R), $F800 - $F8FF (W)\n"
<< "Upper 1.5K ROM accessible @ $FA00 - $FFFF\n" << "Upper 1.5K ROM accessible @ $FA00 - $FFFF\n"
<< " Always points to last 1.5K of ROM\n" << " Always points to last 1.5K of ROM\n"
<< "Startup slices = " << cart.myStartBank << " / 0\n"; << "Startup slices = 0 / 0 or undetermined\n";
#if 0 #if 0
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler

View File

@ -30,7 +30,7 @@ CartridgeF0Widget::CartridgeF0Widget(
ostringstream info; ostringstream info;
info << "64K Megaboy F0 cartridge, 16 4K banks\n" info << "64K Megaboy F0 cartridge, 16 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n" << "Startup bank = " << cart.myStartBank << "or undetermined\n"
<< "Bankswitch triggered by accessing $1FF0\n"; << "Bankswitch triggered by accessing $1FF0\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler

View File

@ -34,7 +34,7 @@ CartridgeF4SCWidget::CartridgeF4SCWidget(
info << "Standard F4SC cartridge, eight 4K banks\n" info << "Standard F4SC cartridge, eight 4K banks\n"
<< "128 bytes RAM @ $F000 - $F0FF\n" << "128 bytes RAM @ $F000 - $F0FF\n"
<< " $F080 - $F0FF (R), $F000 - $F07F (W)\n" << " $F080 - $F0FF (R), $F000 - $F07F (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF4; i < 8; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF4; i < 8; ++i, offset += 0x1000)

View File

@ -30,7 +30,7 @@ CartridgeF4Widget::CartridgeF4Widget(
ostringstream info; ostringstream info;
info << "Standard F4 cartridge, eight 4K banks\n" info << "Standard F4 cartridge, eight 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF4; i < 8; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF4; i < 8; ++i, offset += 0x1000)

View File

@ -34,7 +34,7 @@ CartridgeF6SCWidget::CartridgeF6SCWidget(
info << "Standard F6SC cartridge, four 4K banks\n" info << "Standard F6SC cartridge, four 4K banks\n"
<< "128 bytes RAM @ $F000 - $F0FF\n" << "128 bytes RAM @ $F000 - $F0FF\n"
<< " $F080 - $F0FF (R), $F000 - $F07F (W)\n" << " $F080 - $F0FF (R), $F000 - $F07F (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF6; i < 4; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF6; i < 4; ++i, offset += 0x1000)

View File

@ -30,7 +30,7 @@ CartridgeF6Widget::CartridgeF6Widget(
ostringstream info; ostringstream info;
info << "Standard F6 cartridge, four 4K banks\n" info << "Standard F6 cartridge, four 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF6; i < 4; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF6; i < 4; ++i, offset += 0x1000)

View File

@ -34,7 +34,7 @@ CartridgeF8SCWidget::CartridgeF8SCWidget(
info << "Standard F8SC cartridge, two 4K banks\n" info << "Standard F8SC cartridge, two 4K banks\n"
<< "128 bytes RAM @ $F000 - $F0FF\n" << "128 bytes RAM @ $F000 - $F0FF\n"
<< " $F080 - $F0FF (R), $F000 - $F07F (W)\n" << " $F080 - $F0FF (R), $F000 - $F07F (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000)

View File

@ -30,7 +30,7 @@ CartridgeF8Widget::CartridgeF8Widget(
ostringstream info; ostringstream info;
info << "Standard F8 cartridge, two 4K banks\n" info << "Standard F8 cartridge, two 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 2; ++i, offset += 0x1000)

View File

@ -35,7 +35,7 @@ CartridgeFA2Widget::CartridgeFA2Widget(
<< "256 bytes RAM @ $F000 - $F1FF\n" << "256 bytes RAM @ $F000 - $F1FF\n"
<< " $F100 - $F1FF (R), $F000 - $F0FF (W)\n" << " $F100 - $F1FF (R), $F000 - $F0FF (W)\n"
<< "RAM can be loaded/saved to Harmony flash by accessing $FFF4\n" << "RAM can be loaded/saved to Harmony flash by accessing $FFF4\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF5; i < cart.bankCount(); for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF5; i < cart.bankCount();

View File

@ -34,7 +34,7 @@ CartridgeFAWidget::CartridgeFAWidget(
info << "CBS RAM+ FA cartridge, three 4K banks\n" info << "CBS RAM+ FA cartridge, three 4K banks\n"
<< "256 bytes RAM @ $F000 - $F1FF\n" << "256 bytes RAM @ $F000 - $F1FF\n"
<< " $F100 - $F1FF (R), $F000 - $F0FF (W)\n" << " $F100 - $F1FF (R), $F000 - $F0FF (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 3; ++i, offset += 0x1000) for(uInt32 i = 0, offset = 0xFFC, spot = 0xFF8; i < 3; ++i, offset += 0x1000)

View File

@ -30,7 +30,7 @@ CartridgeUAWidget::CartridgeUAWidget(
ostringstream info; ostringstream info;
info << "8K UA cartridge, two 4K banks\n" info << "8K UA cartridge, two 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n"; << "Startup bank = " << cart.myStartBank << "or undetermined\n";
// Eventually, we should query this from the debugger/disassembler // Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0x220; i < 2; for(uInt32 i = 0, offset = 0xFFC, spot = 0x220; i < 2;

View File

@ -83,8 +83,6 @@ class CartridgeE7 : public CartridgeMNetwork
// Number of banks // Number of banks
static const uInt32 BANK_COUNT = 8; static const uInt32 BANK_COUNT = 8;
// Size of ROM
static const uInt32 ROM_SIZE = BANK_COUNT * BANK_SIZE;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported

View File

@ -80,8 +80,6 @@ class CartridgeE78K : public CartridgeMNetwork
// Number of banks // Number of banks
static const uInt32 BANK_COUNT = 4; static const uInt32 BANK_COUNT = 4;
// Size of ROM
static const uInt32 ROM_SIZE = BANK_COUNT * BANK_SIZE;
private: private:
// Following constructors and assignment operators not supported // Following constructors and assignment operators not supported

View File

@ -37,6 +37,9 @@ void CartridgeF4SC::reset()
{ {
initializeRAM(myRAM, 128); initializeRAM(myRAM, 128);
// define random startup bank
randomizeStartBank();
// Upon reset we switch to the startup bank // Upon reset we switch to the startup bank
bank(myStartBank); bank(myStartBank);
} }

View File

@ -41,12 +41,13 @@ void CartridgeMNetwork::reset()
{ {
initializeRAM(myRAM, RAM_SIZE); initializeRAM(myRAM, RAM_SIZE);
// Install some default banks for the RAM and first segment // define random startup banks
bankRAM(0);
// define random startup bank
randomizeStartBank(); randomizeStartBank();
uInt32 ramBank = mySettings.getBool(mySettings.getBool("dev.settings") ? "dev.bankrandom" : "plr.bankrandom") ?
mySystem->randGenerator().next() % 4 : 0;
// Install some default banks for the RAM and first segment
bankRAM(ramBank);
bank(myStartBank); bank(myStartBank);
myBankChanged = true; myBankChanged = true;

View File

@ -19,10 +19,7 @@
#ifndef CARTRIDGE_MNETWORK_HXX #ifndef CARTRIDGE_MNETWORK_HXX
#define CARTRIDGE_MNETWORK_HXX #define CARTRIDGE_MNETWORK_HXX
class System;
#include "System.hxx" #include "System.hxx"
#include "bspf.hxx" #include "bspf.hxx"
#include "Cart.hxx" #include "Cart.hxx"
@ -57,7 +54,7 @@ class System;
slices in the lower 2K area, and the last for RAM in the lower slices in the lower 2K area, and the last for RAM in the lower
2K area." 2K area."
There are 8K and 16K variations. There are 8K, 12K and 16K variations, with or without RAM.
@author Bradford W. Mott, Thomas Jentzsch @author Bradford W. Mott, Thomas Jentzsch
*/ */