# file GPL.TXT for details. ;-)
#
-# NOTE: zlib and OpenGL libs are a dependency, but are not checked for.
-# same goes for libcdio, Qt
+# NOTE: Qt and OpenGL libs are a dependency, but are not checked for.
# Figure out which system we're compiling for, and set the appropriate variables
SDLLIBTYPE := --libs
MSG := GNU/Linux
-else # *nix
+else # ???
$(error OS TYPE UNDETECTED)
# Targets for convenience sake, not "real" targets
.PHONY: clean
-all: checkenv message2 obj $(TARGET)$(EXESUFFIX)
+all: checkenv message obj $(TARGET)$(EXESUFFIX)
@echo
@echo -e "\033[01;33m***\033[00;32m Looks like it compiled OK... Give it a whirl!\033[00m"
+ @echo
# Check the compilation environment, barf if not appropriate
@echo -e "\033[01;33m***\033[00;32m Checking compilation environment: \033[00m"
@echo
-message2:
+message:
@echo
@echo -e "\033[01;33m***\033[00;32m Building Virtual Jaguar for $(MSG)...\033[00m"
@echo
----------------------------------------------
-Virtual Jaguar v1.1.0 GCC/SDL release INSTALL
----------------------------------------------
+----------------------------------------
+Virtual Jaguar v2.0.0 Qt release INSTALL
+----------------------------------------
REQUIREMENTS:
The minimum requirements for compiling Virtual Jaguar from source are:
- o GCC v4.3.x or higher
- o SDL v1.2.13 or higher
- o zlib v1.2.3
- o libcdio v0.80 or higher
+ o GCC v4.4.x or higher
+ o SDL v1.2.14 or higher
+ o zlib v1.2.5
+ o libcdio v0.82 or higher (optional, for Jaguar CD support)
o OpenGL libraries
+ o Qt 4.7.3 or higher
o supported OS (BeOS, Linux, FreeBSD and WIN32 through mingw, MacOS); other
OSs may work to but you may need to change some items in the Makefile.
upx in your path somewhere, you can uncomment the line in the makefile that
executes upx so that you'll end up with a somewhat smaller binary.
-That's it! You can now start the emulator with ./vj. See the output for more
-details (or stdout.txt on Win32) or consult the README file for more info.
+That's it! You can now start the emulator with ./virtualjaguar. See the output
+for more details (or stdout.txt on Win32) or consult the README file for more
+info.
For even more info, go to http://sdlemu.ngemu.com or send use an e-mail to the
following e-mail address: sdlemu AT ngemu DOT com.
After obtaining the Atari Jaguar boot ROM (and/or CD boot ROM) and several game
ROMs you can now use Virtual Jaguar using the following command:
-./vj [romfile] [-switches]
+./virtualjaguar [romfile] [-switches]
The context of ROMFILE is the filename of the an Atari Jaguar ROM dump (can be
either compressed or uncompressed). You can also use switches. By just typing
-./vj -? (or ./vj -help) you get an overview of the options you can use. WIN32
-users should look into the stdout.txt in the directory they ran Virtual Jaguar
-for that information.
+./virtualjaguar -? (or ./virtualjaguar -help) you get an overview of the
+options you can use. WIN32 users should look into the stdout.txt in the
+directory they ran Virtual Jaguar for that information. Also, WIN32 users
+should be aware that if their ROM filenames contain any spaces, you will have
+to enclose the ROMFILE in double quotes for Virtual Jaguar to function
+properly.
+
+Note that running Virtual Jaguar this way will cause the emulator to exit
+completely upon pressing the ESC key. If this is not what you want, then omit
+the ROMFILE and it will bring up a nice GUI instead.
If you prefer a nice GUI instead of typing in command lines, you can either
-type ./vj or double click on the Virtual Jaguar executable. If you have a
-directory full of ROM files, you can tell Virtual Jaguar where they are by
-editing the appropriate line in the vj.cfg file (it assumes a ROMs directory
+type ./virtualjaguar or double click on the Virtual Jaguar executable. If you
+have a directory full of ROM files, you can tell Virtual Jaguar where they are
+by editing the appropriate line in the vj.cfg file (it assumes a ROMs directory
under the directory where VJ lives) so that they show up when you pick the
"Load" option from the "File" menu.
SDLEMU
-Stuff to add in:
- - How to run ROMs from the command line with spaces in the names (quoting)
- - The behavior of the emulator when running from the command line (passed in ROM
- vs. non)
+*** Stuff to add in:
+
+ o Documentation needs a rewrite, more or less, as the GUI is now front and
+ center. Need to update the docs to reflect this change.
+ o Document the new "solid" zip file archive mechanism which allows putting
+ artwork into a "ROM".
* Switched GUI to Qt. And there was much rejoicing. ;-) [Shamus]
* Added detection code to fish out files from inside ZIP archives. What this
means is that now you can have other goodies inside of your ROM ZIP like
- labels, box art, and overlays. [Shamus]
+ labels, box art, and overlays. See README for details. [Shamus]
Virtual Jaguar v1.1.0 GCC/SDL (r299 - Never officially released)
{ 0x3C044941, "Skyhammer (World)", "skyhammer.jpg", FF_ROM },
{ 0x40E1A1D0, "Air Cars (World)", "air-cars.jpg", FF_ROM },
{ 0x42A13EC5, "Soccer Kid (World)", "soccer-kid.jpg", FF_ROM },
+ { 0x45AA46BA, "Space War 2000 (World)", "", FF_ROM },
{ 0x47EBC158, "Theme Park (World)", "theme-park.jpg", FF_ROM },
{ 0x4899628F, "Hover Strike (World)", "hover-strike.jpg", FF_ROM },
- { 0x53DF6440, "Space War 2000 (World)", "", FF_ROM },
+ { 0x53DF6440, "Space War 2000 (World) (OVERDUMP)", "", FF_ROM },
{ 0x55A0669C, "[BIOS] Atari Jaguar Developer CD (World)", "", FF_BIOS },
{ 0x58272540, "Syndicate (World)", "syndicate.jpg", FF_ROM },
{ 0x5A101212, "Sensible Soccer - International Edition (World)", "sensible-soccer.jpg", FF_ROM },
//could use Window as well...
//FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
-FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window)
+FilePickerWindow::FilePickerWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Window),
+ currentFile("")
{
setWindowTitle(tr("Insert Cartridge..."));
)));
data->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
dataLayout->addWidget(data);
+
+ insertCart = new QPushButton(QIcon(":/res/generic.png"), "", this);
+ insertCart->setDefault(true); // We want this button to be the default
+ insertCart->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+ dataLayout->addWidget(insertCart);
#else
QLabel * text2 = new QLabel(QString(tr(
"<table>"
// QItemSelectionModel * ism = fileList->selectionModel();
// connect(ism, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(UpdateSelection(const QModelIndex &, const QModelIndex &)));
connect(fileList->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(UpdateSelection(const QModelIndex &, const QModelIndex &)));
+
+ connect(insertCart, SIGNAL(clicked()), this, SLOT(LoadButtonPressed()));
}
//
model->AddData(index, str, QImage(), size);
}
+void FilePickerWindow::LoadButtonPressed(void)
+{
+ // TODO: Get the text of the current selection, call the MainWin slot for loading
+ emit(RequestLoad(currentFile));
+ this->hide();
+}
+
//
// This slot gets called when the QListView gets clicked on. Updates
// the cart graphic and accompanying text.
// printf("FPW: %s\n", s.toAscii().data());
unsigned long fileSize = current.model()->data(current, Qt::WhatsThisRole).toUInt();
#else
- QString s = current.model()->data(current, FLM_FILENAME).toString();
+// QString s = current.model()->data(current, FLM_FILENAME).toString();
+ currentFile = current.model()->data(current, FLM_FILENAME).toString();
unsigned long i = current.model()->data(current, FLM_INDEX).toUInt();
QImage label = current.model()->data(current, FLM_LABEL).value<QImage>();
unsigned long fileSize = current.model()->data(current, FLM_FILESIZE).toUInt();
// printf("FPW: %s\n", s.toAscii().data());
#endif
+
+//hm.
+//currentFile = s;
+
//373x172 is label size...
if (!label.isNull())
{
//Though this should probably be done when this is loaded, instead of every time here...
//QImage scaledImg = label.scaled(373, 172, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
//painter.drawPixmap(23, 87, QPixmap::fromImage(scaledImg));
+ // Now, looks like it is...
painter.drawPixmap(23, 87, QPixmap::fromImage(label));
// painter.drawPixmap(23, 87, 373, 172, QPixmap::fromImage(label));
painter.end();
cartImage->setPixmap(QPixmap::fromImage(cart));
}
+ else
+ {
+ // We should try to be intelligent with our updates here, and only redraw when
+ // we're going from a selection with a label to a selection without. Now, we
+ // redraw regardless.
+ QImage cart(":/res/cart-blank.png");
+ QPainter painter(&cart);
+ painter.drawPixmap(23, 87, QPixmap::fromImage(QImage(":/res/label-blank.png")));
+ painter.end();
+ cartImage->setPixmap(QPixmap::fromImage(cart));
+ }
//1048576
//2097152
void AddFileToList(unsigned long index);
void AddFileToList2(unsigned long index, QString, QImage *, unsigned long size);
void UpdateSelection(const QModelIndex &, const QModelIndex &);
+ void LoadButtonPressed(void);
+
+ signals:
+ void RequestLoad(QString);
protected:
// void PopulateList(void);
private:
+ QString currentFile;
QListWidget * fileList2;
FileThread * fileThread;
FileListModel * model;
QLabel * cartImage;
QLabel * title;
QLabel * data;
+ QPushButton * insertCart;
};
// We'll make the VJ core modular so that it doesn't matter what GUI is in
// use, we can drop it in anywhere and use it as-is.
-MainWin::MainWin()
+MainWin::MainWin(): showUntunedTankCircuit(true)
{
videoWidget = new GLWidget(this);
setCentralWidget(videoWidget);
filePickAct->setStatusTip(tr("Insert a cartridge into Virtual Jaguar"));
connect(filePickAct, SIGNAL(triggered()), this, SLOT(InsertCart()));
+ // Misc. connections...
+ connect(filePickWin, SIGNAL(RequestLoad(QString)), this, SLOT(LoadSoftware(QString)));
+
// Create menus & toolbars
fileMenu = menuBar()->addMenu(tr("&File"));
toolbar = addToolBar(tr("Stuff"));
toolbar->addAction(powerAct);
+ toolbar->addAction(filePickAct);
toolbar->addSeparator();
toolbar->addAction(x1Act);
toolbar->addAction(x2Act);
connect(timer, SIGNAL(timeout()), this, SLOT(Timer()));
timer->start(20);
+ // NOTE: Keyboards/joysticks will *not* work until SDL is brought back in, or
+ // the key handling is improved in Qt...
+ // Wait a minute... it seems they already are... So why no keyboard love?
+
#ifdef VJ_RELEASE_VERSION
WriteLog("Virtual Jaguar %s (Last full build was on %s %s)\n", VJ_RELEASE_VERSION, __DATE__, __TIME__);
#else
// JaguarLoadFile("./software/Rayman (World).j64");
// JaguarLoadFile("./software/I-War (World).j64");
// JaguarLoadFile("./software/Alien vs Predator (World).j64");
- JaguarLoadFile("./software/Rayman (USA, Europe).zip");
+//no JaguarLoadFile("./software/battlesphere.bin");
+// JaguarLoadFile("./software/Battle Sphere Gold (World).j64");
+// JaguarLoadFile("./software/Rayman (USA, Europe).zip");
//This is crappy!!! !!! FIX !!!
//Is this even needed any more? Hmm. Maybe. Dunno.
//Seems like it is... But then again, maybe not. Have to test it to see.
-WriteLog("GUI: Resetting Jaguar...\n");
- JaguarReset();
+//WriteLog("GUI: Resetting Jaguar...\n");
+// JaguarReset();
}
void MainWin::closeEvent(QCloseEvent * event)
if (!running)
return;
-#if 0
- // Random hash & trash
- // We try to simulate an untuned tank circuit here... :-)
- for(uint32_t x=0; x<videoWidget->rasterWidth; x++)
+ if (showUntunedTankCircuit)
{
- for(uint32_t y=0; y<videoWidget->rasterHeight; y++)
+ // Random hash & trash
+ // We try to simulate an untuned tank circuit here... :-)
+ for(uint32_t x=0; x<videoWidget->rasterWidth; x++)
{
- videoWidget->buffer[(y * videoWidget->textureWidth) + x] = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24;// | (rand() & 0xFF);//0x000000FF;
-// buffer[(y * textureWidth) + x] = x*y;
+ for(uint32_t y=0; y<videoWidget->rasterHeight; y++)
+ {
+ videoWidget->buffer[(y * videoWidget->textureWidth) + x] = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24;// | (rand() & 0xFF);//0x000000FF;
+ // buffer[(y * textureWidth) + x] = x*y;
+ }
}
}
-#else
- JaguarExecuteNew();
-// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
- memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
-// memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
-#endif
+ else
+ {
+ // Otherwise, run the Jaguar simulation
+ JaguarExecuteNew();
+// memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->rasterWidth);
+ memcpy(videoWidget->buffer, backbuffer, videoWidget->rasterHeight * videoWidget->textureWidth * sizeof(uint32_t));
+// memcpy(surface->pixels, backbuffer, TOMGetVideoModeWidth() * TOMGetVideoModeHeight() * 4);
+ }
videoWidget->updateGL();
}
filePickWin->show();
}
+void MainWin::LoadSoftware(QString file)
+{
+ running = false; // Prevent bad things(TM) from happening...
+ SET32(jaguarMainRAM, 0, 0x00200000); // Set top of stack...
+ showUntunedTankCircuit = (JaguarLoadFile(file.toAscii().data()) ? false : true);
+//This is crappy!!! !!! FIX !!!
+//Is this even needed any more? Hmm. Maybe. Dunno.
+//Seems like it is... But then again, maybe not. Have to test it to see.
+ WriteLog("GUI: Resetting Jaguar...\n");
+ JaguarReset();
+ running = true;
+}
+
void MainWin::ResizeMainWindow(void)
{
videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));
void ShowAboutWin(void);
void InsertCart(void);
+// public slots:
+ void LoadSoftware(QString);
+
private:
void ResizeMainWindow(void);
void ReadSettings(void);
QTimer * timer;
bool running;
int zoomLevel;
+ bool showUntunedTankCircuit;
QMenu * fileMenu;
QMenu * helpMenu;