Fixed bug with the LCD corrupting/flipping
Also zak_mckracken_boot[activision_1988] now works. Added option to specify the default type of new disk image ad D64 or G64.
This commit is contained in:
parent
79c4d83bdb
commit
1921f5755d
4 changed files with 42 additions and 30 deletions
|
@ -276,11 +276,11 @@ void DiskCaddy::Display()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (screenLCD)
|
//if (screenLCD)
|
||||||
{
|
//{
|
||||||
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
// RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
||||||
screenLCD->Clear(BkColour);
|
// screenLCD->Clear(BkColour);
|
||||||
}
|
//}
|
||||||
ShowSelectedImage(0);
|
ShowSelectedImage(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
35
src/main.cpp
35
src/main.cpp
|
@ -703,7 +703,9 @@ EXIT_TYPE Emulate1541(FileBrowser* fileBrowser)
|
||||||
if (numberOfImagesMax > 10)
|
if (numberOfImagesMax > 10)
|
||||||
numberOfImagesMax = 10;
|
numberOfImagesMax = 10;
|
||||||
|
|
||||||
|
core0RefreshingScreen.Acquire();
|
||||||
diskCaddy.Display();
|
diskCaddy.Display();
|
||||||
|
core0RefreshingScreen.Release();
|
||||||
|
|
||||||
inputMappings->directDiskSwapRequest = 0;
|
inputMappings->directDiskSwapRequest = 0;
|
||||||
// Force an update on all the buttons now before we start emulation mode.
|
// Force an update on all the buttons now before we start emulation mode.
|
||||||
|
@ -728,7 +730,8 @@ EXIT_TYPE Emulate1541(FileBrowser* fileBrowser)
|
||||||
u32 hash = pi1541.drive.GetDiskImage()->GetHash();
|
u32 hash = pi1541.drive.GetDiskImage()->GetHash();
|
||||||
// 0x42c02586 = maniac_mansion_s1[lucasfilm_1989](ntsc).g64
|
// 0x42c02586 = maniac_mansion_s1[lucasfilm_1989](ntsc).g64
|
||||||
// 0x18651422 = aliens[electric_dreams_1987].g64
|
// 0x18651422 = aliens[electric_dreams_1987].g64
|
||||||
if (hash == 0x42c02586 || hash == 0x18651422)
|
// 0x2a7f4b77 = zak_mckracken_boot[activision_1988](manual)(!).g64
|
||||||
|
if (hash == 0x42c02586 || hash == 0x18651422 || hash == 0x2a7f4b77)
|
||||||
{
|
{
|
||||||
refreshOutsAfterCPUStep = false;
|
refreshOutsAfterCPUStep = false;
|
||||||
}
|
}
|
||||||
|
@ -742,8 +745,6 @@ EXIT_TYPE Emulate1541(FileBrowser* fileBrowser)
|
||||||
// See if the emulated cpu is executing CD:_ (ie back out of emulated image)
|
// See if the emulated cpu is executing CD:_ (ie back out of emulated image)
|
||||||
if (snoopIndex == 0 && (pc == SNOOP_CD_CBM || pc == SNOOP_CD_JIFFY_BOTH || pc == SNOOP_CD_JIFFY_DRIVEONLY)) snoopPC = pc;
|
if (snoopIndex == 0 && (pc == SNOOP_CD_CBM || pc == SNOOP_CD_JIFFY_BOTH || pc == SNOOP_CD_JIFFY_DRIVEONLY)) snoopPC = pc;
|
||||||
|
|
||||||
if (pc == snoopPC)
|
|
||||||
{
|
|
||||||
if (pc == snoopPC)
|
if (pc == snoopPC)
|
||||||
{
|
{
|
||||||
if (Snoop(pi1541.m6502.GetA()))
|
if (Snoop(pi1541.m6502.GetA()))
|
||||||
|
@ -753,7 +754,6 @@ EXIT_TYPE Emulate1541(FileBrowser* fileBrowser)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pi1541.m6502.Step(); // If the CPU reads or writes to the VIA then clk and data can change
|
pi1541.m6502.Step(); // If the CPU reads or writes to the VIA then clk and data can change
|
||||||
|
|
||||||
|
@ -910,7 +910,9 @@ EXIT_TYPE Emulate1581(FileBrowser* fileBrowser)
|
||||||
if (numberOfImagesMax > 10)
|
if (numberOfImagesMax > 10)
|
||||||
numberOfImagesMax = 10;
|
numberOfImagesMax = 10;
|
||||||
|
|
||||||
|
core0RefreshingScreen.Acquire();
|
||||||
diskCaddy.Display();
|
diskCaddy.Display();
|
||||||
|
core0RefreshingScreen.Release();
|
||||||
|
|
||||||
inputMappings->directDiskSwapRequest = 0;
|
inputMappings->directDiskSwapRequest = 0;
|
||||||
// Force an update on all the buttons now before we start emulation mode.
|
// Force an update on all the buttons now before we start emulation mode.
|
||||||
|
@ -1089,6 +1091,7 @@ void emulator()
|
||||||
m_IEC_Commands.SetAutoBootFB128(options.AutoBootFB128());
|
m_IEC_Commands.SetAutoBootFB128(options.AutoBootFB128());
|
||||||
m_IEC_Commands.Set128BootSectorName(options.Get128BootSectorName());
|
m_IEC_Commands.Set128BootSectorName(options.Get128BootSectorName());
|
||||||
m_IEC_Commands.SetLowercaseBrowseModeFilenames(options.LowercaseBrowseModeFilenames());
|
m_IEC_Commands.SetLowercaseBrowseModeFilenames(options.LowercaseBrowseModeFilenames());
|
||||||
|
m_IEC_Commands.SetNewDiskType(options.GetNewDiskType());
|
||||||
|
|
||||||
emulating = IEC_COMMANDS;
|
emulating = IEC_COMMANDS;
|
||||||
|
|
||||||
|
@ -1107,25 +1110,16 @@ void emulator()
|
||||||
core0RefreshingScreen.Acquire();
|
core0RefreshingScreen.Acquire();
|
||||||
IEC_Bus::WaitMicroSeconds(100);
|
IEC_Bus::WaitMicroSeconds(100);
|
||||||
|
|
||||||
// workaround for occasional oled curruption
|
|
||||||
if (screenLCD)
|
|
||||||
screenLCD->ClearInit(0);
|
|
||||||
|
|
||||||
roms.ResetCurrentROMIndex();
|
roms.ResetCurrentROMIndex();
|
||||||
fileBrowser->ClearScreen();
|
fileBrowser->ClearScreen();
|
||||||
|
|
||||||
fileBrowserSelectedName = 0;
|
fileBrowserSelectedName = 0;
|
||||||
fileBrowser->ClearSelections();
|
fileBrowser->ClearSelections();
|
||||||
|
|
||||||
// Go back to the root folder so you can load fb* again?
|
|
||||||
// if ((resetWhileEmulating && options.GetOnResetChangeToStartingFolder()) || selectedViaIECCommands)
|
|
||||||
// fileBrowser->DisplayRoot(); // Go back to the root folder and display it.
|
|
||||||
// else
|
|
||||||
fileBrowser->RefeshDisplay(); // Just redisplay the current folder.
|
fileBrowser->RefeshDisplay(); // Just redisplay the current folder.
|
||||||
|
|
||||||
core0RefreshingScreen.Release();
|
core0RefreshingScreen.Release();
|
||||||
|
|
||||||
// resetWhileEmulating = false;
|
|
||||||
selectedViaIECCommands = false;
|
selectedViaIECCommands = false;
|
||||||
|
|
||||||
inputMappings->Reset();
|
inputMappings->Reset();
|
||||||
|
@ -1251,11 +1245,6 @@ void emulator()
|
||||||
if (diskCaddy.Empty())
|
if (diskCaddy.Empty())
|
||||||
IEC_Bus::WaitMicroSeconds(2 * 1000000);
|
IEC_Bus::WaitMicroSeconds(2 * 1000000);
|
||||||
|
|
||||||
// workaround for occasional oled curruption
|
|
||||||
// if (screenLCD)
|
|
||||||
// screenLCD->ClearInit(0);
|
|
||||||
|
|
||||||
|
|
||||||
IEC_Bus::WaitUntilReset();
|
IEC_Bus::WaitUntilReset();
|
||||||
//DEBUG_LOG("6502 resetting\r\n");
|
//DEBUG_LOG("6502 resetting\r\n");
|
||||||
emulating = IEC_COMMANDS;
|
emulating = IEC_COMMANDS;
|
||||||
|
@ -1682,9 +1671,15 @@ void DisplayMessage(int x, int y, bool LCD, const char* message, u32 textColour,
|
||||||
else if (screenLCD)
|
else if (screenLCD)
|
||||||
{
|
{
|
||||||
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
RGBA BkColour = RGBA(0, 0, 0, 0xFF);
|
||||||
|
|
||||||
|
core0RefreshingScreen.Acquire();
|
||||||
|
|
||||||
screenLCD->Clear(BkColour);
|
screenLCD->Clear(BkColour);
|
||||||
screenLCD->PrintText(false, x, y, (char*)message, textColour, backgroundColour);
|
screenLCD->PrintText(false, x, y, (char*)message, textColour, backgroundColour);
|
||||||
screenLCD->SwapBuffers();
|
screenLCD->SwapBuffers();
|
||||||
|
|
||||||
|
core0RefreshingScreen.Release();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1729,8 +1724,8 @@ extern "C"
|
||||||
if (options.ShowOptions())
|
if (options.ShowOptions())
|
||||||
DisplayOptions(y_pos+=32);
|
DisplayOptions(y_pos+=32);
|
||||||
|
|
||||||
if (!options.QuickBoot())
|
//if (!options.QuickBoot())
|
||||||
IEC_Bus::WaitMicroSeconds(3 * 1000000);
|
// IEC_Bus::WaitMicroSeconds(3 * 1000000);
|
||||||
|
|
||||||
InterruptSystemInitialize();
|
InterruptSystemInitialize();
|
||||||
TimerSystemInitialize();
|
TimerSystemInitialize();
|
||||||
|
|
|
@ -173,6 +173,7 @@ Options::Options(void)
|
||||||
ROMNameSlot7[0] = 0;
|
ROMNameSlot7[0] = 0;
|
||||||
ROMNameSlot8[0] = 0;
|
ROMNameSlot8[0] = 0;
|
||||||
ROMName1581[0] = 0;
|
ROMName1581[0] = 0;
|
||||||
|
newDiskType[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ELSE_CHECK_DECIMAL_OPTION(Name) \
|
#define ELSE_CHECK_DECIMAL_OPTION(Name) \
|
||||||
|
@ -306,6 +307,10 @@ void Options::Process(char* buffer)
|
||||||
{
|
{
|
||||||
strncpy(ROMNameSlot8, pValue, 255);
|
strncpy(ROMNameSlot8, pValue, 255);
|
||||||
}
|
}
|
||||||
|
else if ((strcasecmp(pOption, "NewDiskType") == 0))
|
||||||
|
{
|
||||||
|
strncpy(newDiskType, pValue, 31);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SplitIECLines())
|
if (!SplitIECLines())
|
||||||
|
@ -359,3 +364,11 @@ const char* Options::GetRomName1581() const
|
||||||
return ROMName1581;
|
return ROMName1581;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DiskImage::DiskType Options::GetNewDiskType() const
|
||||||
|
{
|
||||||
|
if (strcasecmp(newDiskType, "g64") == 0)
|
||||||
|
return DiskImage::G64;
|
||||||
|
|
||||||
|
return DiskImage::D64;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define OPTIONS_H
|
#define OPTIONS_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "DiskImage.h"
|
||||||
|
|
||||||
class TextParser
|
class TextParser
|
||||||
{
|
{
|
||||||
|
@ -74,6 +75,7 @@ public:
|
||||||
inline const char* Get128BootSectorName() const { return C128BootSectorName; }
|
inline const char* Get128BootSectorName() const { return C128BootSectorName; }
|
||||||
|
|
||||||
inline unsigned int LowercaseBrowseModeFilenames() const { return lowercaseBrowseModeFilenames; }
|
inline unsigned int LowercaseBrowseModeFilenames() const { return lowercaseBrowseModeFilenames; }
|
||||||
|
DiskImage::DiskType GetNewDiskType() const;
|
||||||
|
|
||||||
inline unsigned int ScreenWidth() const { return screenWidth; }
|
inline unsigned int ScreenWidth() const { return screenWidth; }
|
||||||
inline unsigned int ScreenHeight() const { return screenHeight; }
|
inline unsigned int ScreenHeight() const { return screenHeight; }
|
||||||
|
@ -171,5 +173,7 @@ private:
|
||||||
char ROMNameSlot7[256];
|
char ROMNameSlot7[256];
|
||||||
char ROMNameSlot8[256];
|
char ROMNameSlot8[256];
|
||||||
char ROMName1581[256];
|
char ROMName1581[256];
|
||||||
|
|
||||||
|
char newDiskType[32];
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue