Merge pull request #71 from penfold42/128bootsector
128BootSectorName = bootsect.128
This commit is contained in:
commit
e09301c3db
8 changed files with 35 additions and 2 deletions
|
@ -39,6 +39,10 @@ OnResetChangeToStartingFolder = 1
|
||||||
// If you are using a FB128 in 128 mode you can get FB128 to auto boot using this option
|
// If you are using a FB128 in 128 mode you can get FB128 to auto boot using this option
|
||||||
//AutoBootFB128 = 1
|
//AutoBootFB128 = 1
|
||||||
|
|
||||||
|
// If you are using a 128 you can auto boot anything using this option
|
||||||
|
// This over-rides AutoBootFB128
|
||||||
|
//128BootSectorName = bootsect.128
|
||||||
|
|
||||||
// If you would ever like to disable browse mode completely ypu can do so here
|
// If you would ever like to disable browse mode completely ypu can do so here
|
||||||
//DisableSD2IECCommands = 1
|
//DisableSD2IECCommands = 1
|
||||||
|
|
||||||
|
|
5
resources/3rdPartyFiles.txt
Normal file
5
resources/3rdPartyFiles.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
buzbard's c128 bootsect.7z
|
||||||
|
http://www.lemon64.com/forum/viewtopic.php?t=54219
|
||||||
|
modified by penfold42 to include a sleep for 2 secs while cpm.d64 loads
|
||||||
|
bootcpm.128
|
||||||
|
|
BIN
resources/bootcpm.128
Normal file
BIN
resources/bootcpm.128
Normal file
Binary file not shown.
|
@ -238,6 +238,7 @@ IEC_Commands::IEC_Commands()
|
||||||
autoBootFB128 = false;
|
autoBootFB128 = false;
|
||||||
Reset();
|
Reset();
|
||||||
starFileName = 0;
|
starFileName = 0;
|
||||||
|
C128BootSectorName = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IEC_Commands::Reset(void)
|
void IEC_Commands::Reset(void)
|
||||||
|
@ -1775,6 +1776,15 @@ void IEC_Commands::OpenFile()
|
||||||
channel.buffer[index++] = '8';
|
channel.buffer[index++] = '8';
|
||||||
channel.buffer[index++] = '\"';
|
channel.buffer[index++] = '\"';
|
||||||
}
|
}
|
||||||
|
if (C128BootSectorName)
|
||||||
|
{
|
||||||
|
FIL fpBS;
|
||||||
|
u32 bytes;
|
||||||
|
if (FR_OK == f_open(&fpBS, C128BootSectorName, FA_READ))
|
||||||
|
f_read(&fpBS, channel.buffer, 256, &bytes);
|
||||||
|
else
|
||||||
|
memset(channel.buffer, 0, 256);
|
||||||
|
}
|
||||||
|
|
||||||
if (SendBuffer(channel, true))
|
if (SendBuffer(channel, true))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -72,6 +72,13 @@ public:
|
||||||
u8 GetDeviceId() { return deviceID; }
|
u8 GetDeviceId() { return deviceID; }
|
||||||
|
|
||||||
void SetAutoBootFB128(bool autoBootFB128) { this->autoBootFB128 = autoBootFB128; }
|
void SetAutoBootFB128(bool autoBootFB128) { this->autoBootFB128 = autoBootFB128; }
|
||||||
|
void Set128BootSectorName(const char* SectorName)
|
||||||
|
{
|
||||||
|
if (SectorName && SectorName[0])
|
||||||
|
this->C128BootSectorName = SectorName;
|
||||||
|
else
|
||||||
|
this->C128BootSectorName = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void Reset(void);
|
void Reset(void);
|
||||||
void SimulateIECBegin(void);
|
void SimulateIECBegin(void);
|
||||||
|
@ -174,6 +181,7 @@ protected:
|
||||||
FILINFO filInfoSelectedImage;
|
FILINFO filInfoSelectedImage;
|
||||||
|
|
||||||
const char* starFileName;
|
const char* starFileName;
|
||||||
|
const char* C128BootSectorName;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -686,6 +686,7 @@ void emulator()
|
||||||
pi1541.Initialise();
|
pi1541.Initialise();
|
||||||
|
|
||||||
m_IEC_Commands.SetAutoBootFB128(options.AutoBootFB128());
|
m_IEC_Commands.SetAutoBootFB128(options.AutoBootFB128());
|
||||||
|
m_IEC_Commands.Set128BootSectorName(options.Get128BootSectorName());
|
||||||
|
|
||||||
emulating = false;
|
emulating = false;
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ Options::Options(void)
|
||||||
strcpy(ROMFontName, "chargen");
|
strcpy(ROMFontName, "chargen");
|
||||||
strcpy(LcdLogoName, "1541ii");
|
strcpy(LcdLogoName, "1541ii");
|
||||||
strcpy(autoBaseName, "autoname");
|
strcpy(autoBaseName, "autoname");
|
||||||
|
C128BootSectorName[0] = 0;
|
||||||
starFileName[0] = 0;
|
starFileName[0] = 0;
|
||||||
ROMName[0] = 0;
|
ROMName[0] = 0;
|
||||||
ROMNameSlot2[0] = 0;
|
ROMNameSlot2[0] = 0;
|
||||||
|
@ -231,6 +232,10 @@ void Options::Process(char* buffer)
|
||||||
{
|
{
|
||||||
strncpy(autoBaseName, pValue, 255);
|
strncpy(autoBaseName, pValue, 255);
|
||||||
}
|
}
|
||||||
|
else if ((strcasecmp(pOption, "128BootSectorName") == 0))
|
||||||
|
{
|
||||||
|
strncpy(C128BootSectorName, pValue, 255);
|
||||||
|
}
|
||||||
else if ((strcasecmp(pOption, "StarFileName") == 0))
|
else if ((strcasecmp(pOption, "StarFileName") == 0))
|
||||||
{
|
{
|
||||||
strncpy(starFileName, pValue, 255);
|
strncpy(starFileName, pValue, 255);
|
||||||
|
@ -248,7 +253,6 @@ void Options::Process(char* buffer)
|
||||||
i2cLcdModel = LCD_1306_128x32;
|
i2cLcdModel = LCD_1306_128x32;
|
||||||
else if (strcasecmp(pValue, "sh1106_128x64") == 0)
|
else if (strcasecmp(pValue, "sh1106_128x64") == 0)
|
||||||
i2cLcdModel = LCD_1106_128x64;
|
i2cLcdModel = LCD_1106_128x64;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ((strcasecmp(pOption, "ROM") == 0) || (strcasecmp(pOption, "ROM1") == 0))
|
else if ((strcasecmp(pOption, "ROM") == 0) || (strcasecmp(pOption, "ROM1") == 0))
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,6 +70,7 @@ public:
|
||||||
inline unsigned int IgnoreReset() const { return ignoreReset; }
|
inline unsigned int IgnoreReset() const { return ignoreReset; }
|
||||||
|
|
||||||
inline unsigned int AutoBootFB128() const { return autoBootFB128; }
|
inline unsigned int AutoBootFB128() const { return autoBootFB128; }
|
||||||
|
inline const char* Get128BootSectorName() const { return C128BootSectorName; }
|
||||||
|
|
||||||
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; }
|
||||||
|
@ -128,7 +129,6 @@ private:
|
||||||
unsigned int i2cLcdOnContrast;
|
unsigned int i2cLcdOnContrast;
|
||||||
unsigned int i2cLcdDimContrast;
|
unsigned int i2cLcdDimContrast;
|
||||||
unsigned int i2cLcdDimTime;
|
unsigned int i2cLcdDimTime;
|
||||||
// unsigned int i2cLcdModel;
|
|
||||||
LCD_MODEL i2cLcdModel = LCD_UNKNOWN;
|
LCD_MODEL i2cLcdModel = LCD_UNKNOWN;
|
||||||
|
|
||||||
float scrollHighlightRate;
|
float scrollHighlightRate;
|
||||||
|
@ -136,6 +136,7 @@ private:
|
||||||
unsigned int keyboardBrowseLCDScreen;
|
unsigned int keyboardBrowseLCDScreen;
|
||||||
|
|
||||||
char starFileName[256];
|
char starFileName[256];
|
||||||
|
char C128BootSectorName[256];
|
||||||
char autoBaseName[256];
|
char autoBaseName[256];
|
||||||
char LCDName[256];
|
char LCDName[256];
|
||||||
char LcdLogoName[256];
|
char LcdLogoName[256];
|
||||||
|
|
Loading…
Reference in a new issue