//
// STILL TO BE DONE:
//
+// - Autoscan/autoload all available BIOS from 'software' folder
+// - Controller configuration
+// - Remove SDL dependencies (sound, mainly) from Jaguar core lib
+// - Add 1 key jumping in cartridge list (press 'R', jumps to carts starting with 'R', etc)
+// - Add dbl click/enter to select in cart list, ESC to dimiss
//
+/*
+For BIOS autoscan, infrastructure is already there in filethread.cpp; just need to figure out
+if we want to scan every time, or stuff filenames found into the config file, or what.
+Should filethread emit signal that's intercepted here? Maybe...
+*/
+
// Uncomment this for debugging...
//#define DEBUG
//#define DEBUGFOO // Various tool debugging...
// Uncomment this to use built-in BIOS/CD-ROM BIOS
// You'll need a copy of jagboot.h & jagcd.h for this to work...!
+// Creating those is left as an exercise for the reader. ;-)
//#define USE_BUILT_IN_BIOS
#ifdef USE_BUILT_IN_BIOS
// use, we can drop it in anywhere and use it as-is.
MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit(true),
- cartridgeLoaded(false)
+ cartridgeLoaded(false), CDActive(false)
{
videoWidget = new GLWidget(this);
setCentralWidget(videoWidget);
configAct->setShortcut(QKeySequence(tr("Ctrl+c")));
connect(configAct, SIGNAL(triggered()), this, SLOT(Configure()));
+ useCDAct = new QAction(QIcon(":/res/generic.png"), tr("&Use CD Unit"), this);
+ useCDAct->setStatusTip(tr("Use Jaguar Virtual CD unit"));
+// useCDAct->setShortcut(QKeySequence(tr("Ctrl+c")));
+ useCDAct->setCheckable(true);
+ connect(useCDAct, SIGNAL(triggered()), this, SLOT(ToggleCDUsage()));
+
// Misc. connections...
connect(filePickWin, SIGNAL(RequestLoad(QString)), this, SLOT(LoadSoftware(QString)));
fileMenu = menuBar()->addMenu(tr("&File"));
fileMenu->addAction(filePickAct);
+ fileMenu->addAction(useCDAct);
fileMenu->addAction(powerAct);
fileMenu->addAction(pauseAct);
fileMenu->addAction(configAct);
toolbar->addAction(powerAct);
toolbar->addAction(pauseAct);
toolbar->addAction(filePickAct);
+ toolbar->addAction(useCDAct);
toolbar->addSeparator();
toolbar->addAction(x1Act);
toolbar->addAction(x2Act);
}
else
{
- showUntunedTankCircuit = (cartridgeLoaded ? false : true);
- pauseAct->setChecked(false);
- pauseAct->setDisabled(!cartridgeLoaded);
+ if (!CDActive)
+ {
+ showUntunedTankCircuit = (cartridgeLoaded ? false : true);
+ pauseAct->setChecked(false);
+ pauseAct->setDisabled(!cartridgeLoaded);
+ }
+ else
+ {
+ showUntunedTankCircuit = false;
+ pauseAct->setChecked(false);
+ pauseAct->setDisabled(false);
+ memcpy(jagMemSpace + 0x800000, jaguarCDBootROM, 0x40000);
+ }
//(Err, what's so crappy about this? It seems to do what it's supposed to...)
//This is crappy!!! !!! FIX !!!
setWindowTitle(newTitle);
}
+void MainWin::ToggleCDUsage(void)
+{
+ CDActive = !CDActive;
+
+ if (CDActive)
+ {
+ powerAct->setDisabled(false);
+ }
+ else
+ {
+ powerAct->setDisabled(true);
+ }
+}
+
void MainWin::ResizeMainWindow(void)
{
videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));
uint8 jaguarBootROM[0x040000]; // 68K CPU BIOS ROM--uses only half of this!
uint8 jaguarCDBootROM[0x040000]; // 68K CPU CD BIOS ROM (256K)
+uint8 jaguarDevBootROM1[0x040000]; // 68K CPU Stubulator 1 ROM--uses only half of this!
+uint8 jaguarDevBootROM2[0x040000]; // 68K CPU Stubulator 2 ROM--uses only half of this!
+uint8 jaguarDevCDBootROM[0x040000]; // 68K CPU Dev CD BIOS ROM (256K)
#if 0
//this isn't endian safe...
#define BSWAP64(x) ((htonl(x & 0xFFFFFFFF) << 32) | htonl(x >> 32))
// Actually, we use ESAFExx() macros instead of this, and we use GCC to check the endianness...
-// Acutally, considering that "byteswap.h" doesn't exist elsewhere, the above
+// Actually, considering that "byteswap.h" doesn't exist elsewhere, the above
// is probably our best bet here. Just need to rename them to ESAFExx().
uint16 & memcon1 = *((uint16 *)&jagMemSpace[0xF00000]);