Added config option for RAMBOard = 0/1

Displays parsed options on startup
This commit is contained in:
penfold42 2018-05-28 23:17:22 +10:00
parent e81960a295
commit 89ff0d4771
3 changed files with 33 additions and 4 deletions

View file

@ -90,6 +90,7 @@ u8 deviceID = 8;
IEC_Commands m_IEC_Commands; IEC_Commands m_IEC_Commands;
bool onResetChangeToStartingFolder = false; bool onResetChangeToStartingFolder = false;
bool extraRAM = false; bool extraRAM = false;
bool enableRAMBOard = false;
bool disableSD2IECCommands = false; bool disableSD2IECCommands = false;
bool supportUARTInput = false; bool supportUARTInput = false;
bool graphIEC = false; bool graphIEC = false;
@ -202,7 +203,7 @@ DWORD get_fattime() { return 0; } // If you have hardware RTC return a correct v
// 1c00 !cs2 on pin 7 // 1c00 !cs2 on pin 7
u8 read6502(u16 address) u8 read6502(u16 address)
{ {
u8 value; u8 value = 0;
if (address & 0x8000) if (address & 0x8000)
{ {
switch (address & 0xe000) // keep bits 15,14,13 switch (address & 0xe000) // keep bits 15,14,13
@ -1011,6 +1012,9 @@ static void CheckOptions()
extraRAM = options.GetExtraRAM() != 0; extraRAM = options.GetExtraRAM() != 0;
DEBUG_LOG("extraRAM = %d\r\n", extraRAM); DEBUG_LOG("extraRAM = %d\r\n", extraRAM);
enableRAMBOard = options.GetRAMBOard() != 0;
DEBUG_LOG("RAMBOard = %d\r\n", enableRAMBOard);
disableSD2IECCommands = options.GetDisableSD2IECCommands(); disableSD2IECCommands = options.GetDisableSD2IECCommands();
//supportUARTInput = options.GetSupportUARTInput() != 0; //supportUARTInput = options.GetSupportUARTInput() != 0;
graphIEC = options.GraphIEC(); graphIEC = options.GraphIEC();
@ -1026,6 +1030,20 @@ static void CheckOptions()
invertIECInputs = false; invertIECInputs = false;
ignoreReset = options.IgnoreReset(); ignoreReset = options.IgnoreReset();
screen.Clear(COLOUR_BLACK);
int y_pos = 200;
snprintf(tempBuffer, tempBufferSize, "ignoreReset = %d\r\n", ignoreReset);
screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "RAMBOard = %d\r\n", enableRAMBOard);
screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "splitIECLines = %d\r\n", splitIECLines);
screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "invertIECInputs = %d\r\n", invertIECInputs);
screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "invertIECOutputs = %d\r\n", invertIECOutputs);
screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
IEC_Bus::WaitMicroSeconds(3 * 1000000);
ROMName = options.GetRomFontName(); ROMName = options.GetRomFontName();
if (ROMName) if (ROMName)
{ {
@ -1125,12 +1143,14 @@ extern "C"
write32(ARM_GPIO_GPCLR0, 0xFFFFFFFF); write32(ARM_GPIO_GPCLR0, 0xFFFFFFFF);
DisplayLogo(); DisplayLogo();
int y_pos = 184;
snprintf(tempBuffer, tempBufferSize, "Copyright(C) 2018 Stephen White"); snprintf(tempBuffer, tempBufferSize, "Copyright(C) 2018 Stephen White");
screen.PrintText(false, 0, 200, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "This program comes with ABSOLUTELY NO WARRANTY."); snprintf(tempBuffer, tempBufferSize, "This program comes with ABSOLUTELY NO WARRANTY.");
screen.PrintText(false, 0, 216, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
snprintf(tempBuffer, tempBufferSize, "This is free software, and you are welcome to redistribute it."); snprintf(tempBuffer, tempBufferSize, "This is free software, and you are welcome to redistribute it.");
screen.PrintText(false, 0, 232, tempBuffer, COLOUR_WHITE, COLOUR_BLACK); screen.PrintText(false, 0, y_pos+=16, tempBuffer, COLOUR_WHITE, COLOUR_BLACK);
if (!quickBoot) if (!quickBoot)
IEC_Bus::WaitMicroSeconds(3 * 1000000); IEC_Bus::WaitMicroSeconds(3 * 1000000);

View file

@ -122,6 +122,7 @@ Options::Options(void)
, deviceID(8) , deviceID(8)
, onResetChangeToStartingFolder(0) , onResetChangeToStartingFolder(0)
, extraRAM(0) , extraRAM(0)
, enableRAMBOard(0)
, disableSD2IECCommands(0) , disableSD2IECCommands(0)
, supportUARTInput(0) , supportUARTInput(0)
, graphIEC(0) , graphIEC(0)
@ -174,6 +175,12 @@ void Options::Process(char* buffer)
if ((nValue = GetDecimal(pValue)) != INVALID_VALUE) if ((nValue = GetDecimal(pValue)) != INVALID_VALUE)
extraRAM = nValue; extraRAM = nValue;
} }
else if (strcasecmp(pOption, "RAMBOard") == 0)
{
unsigned nValue = 0;
if ((nValue = GetDecimal(pValue)) != INVALID_VALUE)
enableRAMBOard = nValue;
}
else if (strcasecmp(pOption, "DisableSD2IECCommands") == 0) else if (strcasecmp(pOption, "DisableSD2IECCommands") == 0)
{ {
unsigned nValue = 0; unsigned nValue = 0;

View file

@ -49,6 +49,7 @@ public:
const char* GetRomFontName() const { return ROMFontName; } const char* GetRomFontName() const { return ROMFontName; }
const char* GetRomName(int index) const; const char* GetRomName(int index) const;
unsigned int GetExtraRAM() const { return extraRAM; } unsigned int GetExtraRAM() const { return extraRAM; }
unsigned int GetRAMBOard() const { return enableRAMBOard; }
unsigned int GetDisableSD2IECCommands() const { return disableSD2IECCommands; } unsigned int GetDisableSD2IECCommands() const { return disableSD2IECCommands; }
unsigned int GetSupportUARTInput() const { return supportUARTInput; } unsigned int GetSupportUARTInput() const { return supportUARTInput; }
@ -70,6 +71,7 @@ private:
unsigned int deviceID; unsigned int deviceID;
unsigned int onResetChangeToStartingFolder; unsigned int onResetChangeToStartingFolder;
unsigned int extraRAM; unsigned int extraRAM;
unsigned int enableRAMBOard;
unsigned int disableSD2IECCommands; unsigned int disableSD2IECCommands;
unsigned int supportUARTInput; unsigned int supportUARTInput;
unsigned int graphIEC; unsigned int graphIEC;