]> Shamusworld >> Repos - virtualjaguar/commitdiff
Moved Jaguar core to library, fixes for Mac OSX compilation.
authorShamus Hammons <jlhamm@acm.org>
Fri, 1 Jul 2011 02:03:14 +0000 (02:03 +0000)
committerShamus Hammons <jlhamm@acm.org>
Fri, 1 Jul 2011 02:03:14 +0000 (02:03 +0000)
Makefile
docs/README
docs/TODO
docs/WHATSNEW
musashi.mak
src/filedb.cpp
src/unzip.c
virtualjaguar.pro

index 54dcca69753fa07381cdada03cd1f57d0c2d4408..4b6b4ea024bcf1b381258ddf6d575aed8616e49c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,27 +29,31 @@ prepare:
        @echo "#define VJ_RELEASE_SUBVERSION \"2.0.0 Prerelease\"" >> src/version.h
 
 virtualjaguar: sources libs makefile-qt
-       @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar...\033[00m"
+       @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar GUI...\033[00m"
        $(MAKE) -f makefile-qt
 
 makefile-qt: virtualjaguar.pro
        @echo -e "\033[01;33m***\033[00;32m Creating Qt makefile...\033[00m"
        qmake $(QMAKE_EXTRA) virtualjaguar.pro -o makefile-qt
 
-libs: obj/libmusashi.a
+libs: obj/libmusashi.a obj/libjaguarcore.a
        @echo -e "\033[01;33m***\033[00;32m Libraries successfully made.\033[00m"
 
-obj/libmusashi.a:
+obj/libmusashi.a: musashi.mak
        @echo -e "\033[01;33m***\033[00;32m Making Musashi...\033[00m"
        $(MAKE) -f musashi.mak
 
+obj/libjaguarcore.a: jaguarcore.mak
+       @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar core...\033[00m"
+       $(MAKE) -f jaguarcore.mak
+
 sources: src/*.h src/*.cpp src/*.c
 
 clean:
        @echo -ne "\033[01;33m***\033[00;32m Cleaning out the garbage...\033[00m"
        @-rm -rf ./obj
-       @-rm makefile-qt
-       @-rm virtualjaguar
+       @-rm -rf makefile-qt
+       @-rm -rf virtualjaguar
        @-$(FIND) . -name "*~" -exec rm -f {} \;
        @echo "done!"
 
index ae1e595e9f4c094c4c72dda3995b5d34d0339fb7..30c8477d385658ac094cd9cc19d129b4de9bc84d 100644 (file)
@@ -1,6 +1,6 @@
---------------------------------------------
-Virtual Jaguar v2.0.0 GCC/SDL release README
---------------------------------------------
+-------------------------------------------
+Virtual Jaguar v2.0.0 GCC/Qt release README
+-------------------------------------------
 
 --------------
 - DISCLAIMER -
@@ -78,21 +78,20 @@ There is a fifth type of file that is supported by Virtual Jaguar, the .j64
 file, which is simply a 1, 2, or 4 Meg dump of a Jaguar cartridge ROM which
 loads at $800000 in the Jaguar memory space.
 
------------------------------------
-- What is Virtual Jaguar GCC/SDL? -
------------------------------------
+----------------------------------
+- What is Virtual Jaguar GCC/Qt? -
+----------------------------------
 
 Virtual Jaguar is software dedicated to emulating the Atari Jaguar hardware on
 a standard PC. The software was originally developed by David Raingeard of
 Potato Emulation [http://potato.emu-france.com] and was released under the GPL
 on 25 June 2003.
 
-Virtual Jaguar GCC/SDL is not just a port of the MS Visual C++/SDL sourcecode
+Virtual Jaguar GCC/Qt is not just a port of the MS Visual C++/SDL sourcecode
 but has also been extended and rewritten so that we can enjoy Atari Jaguar
-emulation on every platform that has a GCC compiler and a port of the Simple
-Directmedia Layer library (SDL).
+emulation on every platform that has a GCC compiler and a port of Qt.
 
-Currently Virtual Jaguar GCC/SDL compiles on WIN32 using mingw, and several
+Currently Virtual Jaguar GCC/Qt compiles on WIN32 using mingw, and several
 UN*X based systems (BeOS, Linux, FreeBSD and MacOS). It may run on other
 systems as well but we can not guarantee that.
 
@@ -105,15 +104,15 @@ are particularly welcome! :)
 More information about the incredible SDL libraries can be found at
 http://www.libsdl.org. Thanks Sam--you rock! :)
 
---------------------------------
-- Using Virtual Jaguar GCC/SDL -
---------------------------------
+-------------------------------
+- Using Virtual Jaguar GCC/Qt -
+-------------------------------
 
 After compiling the binary (see INSTALL) you can now run original Atari Jaguar
 games. These games are distributed on cartridges and can therefore cannot be
 used on a PC (we're still waiting for that Jaguar-on-a-PCI-card that you plug
 into your late model PC, complete with cartridge slot and controller connectors
-;-). To use these games on Virtual Jaguar GCC/SDL you need to get ROM images.
+;-). To use these games on Virtual Jaguar GCC/Qt you need to get ROM images.
 Besides the ROM images from commercial games, you may also need to obtain the
 Atari Jaguar boot ROM (and/or CD boot ROM) which you must copy to the BIOS
 directory. For legal issues concerning ROM images please consult the DISCLAIMER
@@ -160,7 +159,7 @@ Atari RIGHT          : RIGHT or joystick RIGHT
 Atari #              : Keypad /
 Atari *              : Keypad *
 
-With ESC you can easily stop Virtual Jaguar GCC/SDL which will get you back to
+With ESC you can easily stop Virtual Jaguar GCC/Qt which will get you back to
 the GUI (pressing ESC again will take you back to the game). To exit VJ, you
 can either select File|Quit or press the "Q" key on your keyboard. If you want
 to change the key layout, simply edit the vj.cfg file and change the keys. :)
index d5491e6eda70a33de3709c2f9a12fd152f2ffc0f..04d0a4e30759833b10ed7313c5f8c37e283ecfbb 100644 (file)
--- a/docs/TODO
+++ b/docs/TODO
@@ -13,7 +13,7 @@ Stuff to add/fix for the next release of Virtual Jaguar
 - It would be nice to have "save states" for instant save/load capability.
   [Shamus]
 - Cycle accuracy for GPU/DSP/OP/Blitter. [Shamus]
-- Need to propogate blitter fixes in the A1 <- A2 direction to the A1 -> A2
+- Need to propagate blitter fixes in the A1 <- A2 direction to the A1 -> A2
   direction and the GPU fixes to various instructions to the DSP. [Shamus]
 - Need to fix PAL mode to work with the virtual screen code. [Shamus]
 - There are a few ROMs that use some "quasi-illegal" 68K instructions. Need
index 080ab8b749bdcce66a0ab25460ea43cc351f6776..e77cad095c4dbffed0258f0d85df7499faf22682 100644 (file)
@@ -1,10 +1,11 @@
-Virtual Jaguar v2.0.0 GCC/SDL
------------------------------
+Virtual Jaguar v2.0.0 GCC/Qt
+----------------------------
 
 * 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. See README for details. [Shamus]
+* Various usability improvements, too many to list here. ;-) [Shamus]
 
 
 Virtual Jaguar v1.1.0 GCC/SDL (r299 - Never officially released)
index 7aaa771bad2fd1fbe0b246ffae4a8bcd535741a0..1e0d3eb1c0fddcbae88155995a58014c7b13f773 100644 (file)
@@ -4,7 +4,7 @@
 # by James L. Hammons
 #
 # This software is licensed under the GPL v3 or any later version. See the
-# file GPL.TXT for details. ;-)
+# file GPLv3 for details. ;-)
 #
 
 CC         := gcc
@@ -23,12 +23,10 @@ OBJS := \
        obj/m68kopnz.o \
        obj/m68kdasm.o
 
-TARGET     := $(OBJS)
-
 # Targets for convenience sake, not "real" targets
 .PHONY: clean
 
-all: obj $(TARGET) obj/libmusashi.a
+all: obj obj/libmusashi.a
        @echo "Done!"
 
 obj:
index 8dc4fa2aa1c0efbe25047ea0494427580754aae0..47c31efe8ad9ef76c8af8a0aea26bcec14f73d71 100644 (file)
@@ -105,7 +105,7 @@ RomIdentifier romList[] = {
        { 0xC654681B, "Total Carnage (World)", FF_ROM | FF_VERIFIED },
        { 0xC6C7BA62, "Fight for Life (World) (alt)", FF_ROM | FF_BAD_DUMP },
        { 0xC9608717, "Val d'Isere Skiing and Snowboarding (World)", FF_ROM | FF_VERIFIED },
-       { 0xCBFD822A, "Air Cars (World) (alt)", FF_ROM },
+       { 0xCBFD822A, "Air Cars (World) (alt)", FF_ROM | FF_BAD_DUMP },
        { 0xCD5BF827, "Attack of the Mutant Penguins (World)", FF_ROM | FF_VERIFIED | FF_REQ_DSP },
        { 0xD6C19E34, "Iron Soldier 2 (World)", FF_ROM | FF_VERIFIED },
        { 0xD8696F23, "Breakout 2000 (alt)", FF_ALPINE },
index 509da18e1a1730ca01201a22b99d8c9fecad9867..0aa231f0128ef92a5f0beb3c18cde1a7b044bab2 100644 (file)
 // JLH  02/28/2010  Removed unnecessary cruft
 //
 
+#include "unzip.h"
+
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 #include <assert.h>
 #include <zlib.h>
-
-#include "unzip.h"
 #include "log.h"
 
 /* public globals */
 int    gUnzipQuiet = 0;                /* flag controls error messages */
 
 
-#define ERROR_CORRUPT "The zipfile seems to be corrupt, please check it"
-#define ERROR_FILESYSTEM "Your filesystem seems to be corrupt, please check it"
+#define ERROR_CORRUPT     "The zipfile seems to be corrupt, please check it"
+#define ERROR_FILESYSTEM  "Your filesystem seems to be corrupt, please check it"
 #define ERROR_UNSUPPORTED "The format of this zipfile is not supported, please recompress it"
 
 #define INFLATE_INPUT_BUFFER_MAX 16384
@@ -120,7 +120,7 @@ static int ecd_read(ZIP * zip)
                        return -1;
                }
 
-               if (fread(buf, 1, buf_length, zip->fp) != buf_length)
+               if (fread(buf, 1, buf_length, zip->fp) != (unsigned int)buf_length)
                {
                        free(buf);
                        return -1;
index ecaf4d4c9e475e48e13c2177505dbeffce13fb5c..15fc2073df04eeb372312f878ff905a28e00c3d8 100644 (file)
@@ -9,13 +9,13 @@
 # NOTE: Musashi is built and linked in as a library, so there should be no more
 #       problems with using the qmake build system as-is. :-)
 #       Other than on the Mac, where it stupidly defaults to making XCode binaries. >:-(
+#       Well, we fixed it in the Makefile, by doing platfrom detection there. :-/
 #
 
 TARGET     = virtualjaguar
 CONFIG    += qt warn_on release debug
 RESOURCES += virtualjaguar.qrc
-#LIBS      += `sdl-config --libs` -lz -Lobj -lmusashi
-LIBS      += -lz -Lobj -lmusashi
+LIBS      += -lz -Lobj -ljaguarcore -lmusashi
 QT        += opengl
 
 # We stuff all the intermediate crap into obj/ so it won't confuse us mere mortals ;-)
@@ -29,17 +29,13 @@ win32 { DEFINES += __GCCWIN32__ }
 macx  { DEFINES += __GCCUNIX__ _OSX_ }
 unix  { DEFINES += __GCCUNIX__ }
 
-# SDL
+# SDL (to link statically on Mac)
 macx       { LIBS += `sdl-config --static-libs` }
 win32|unix { LIBS += `sdl-config --libs` }
 
-#CFLAGS   := -MMD -Wall -Wno-switch -O2 -D$(SYSTYPE) -ffast-math -fomit-frame-pointer `sdl-config --cflags`
-#CPPFLAGS := -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D$(SYSTYPE) -Wno-trigraphs \
-#              $(HAVECDIO) -ffast-math -fomit-frame-pointer `sdl-config --cflags` -g
-
 # C/C++ flags...
 # NOTE: May have to put -Wall back in, but only on non-release cycles. It can
-#       cause problems if you're not careful.
+#       cause problems if you're not careful. (Can do this via command line in qmake)
 QMAKE_CFLAGS += `sdl-config --cflags` -O2 -ffast-math -fomit-frame-pointer
 QMAKE_CXXFLAGS += `sdl-config --cflags` -O2 -ffast-math -fomit-frame-pointer
 
@@ -83,56 +79,56 @@ SOURCES = \
 
 # The core (soon to be made into a library of its own)
 
-HEADERS += \
-       src/blitter.h       \
-       src/cdintf.h        \
-       src/cdrom.h         \
-       src/crc32.h         \
-       src/dac.h           \
-       src/dsp.h           \
-       src/eeprom.h        \
-       src/event.h         \
-       src/file.h          \
-       src/filedb.h        \
-       src/gpu.h           \
-       src/jagdasm.h       \
-       src/jaguar.h        \
-       src/jerry.h         \
-       src/joystick.h      \
-       src/log.h           \
-       src/memory.h        \
-       src/mmu.h           \
-       src/objectp.h       \
-       src/settings.h      \
-       src/state.h         \
-       src/tom.h           \
-       src/unzip.h         \
-       src/universalhdr.h  \
-       src/wavetable.h
+#HEADERS += \
+#      src/blitter.h       \
+#      src/cdintf.h        \
+#      src/cdrom.h         \
+#      src/crc32.h         \
+#      src/dac.h           \
+#      src/dsp.h           \
+#      src/eeprom.h        \
+#      src/event.h         \
+#      src/file.h          \
+#      src/filedb.h        \
+#      src/gpu.h           \
+#      src/jagdasm.h       \
+#      src/jaguar.h        \
+#      src/jerry.h         \
+#      src/joystick.h      \
+#      src/log.h           \
+#      src/memory.h        \
+#      src/mmu.h           \
+#      src/objectp.h       \
+#      src/settings.h      \
+#      src/state.h         \
+#      src/tom.h           \
+#      src/unzip.h         \
+#      src/universalhdr.h  \
+#      src/wavetable.h
 
-SOURCES += \
-       src/blitter.cpp       \
-       src/cdintf.cpp        \
-       src/cdrom.cpp         \
-       src/crc32.cpp         \
-       src/dac.cpp           \
-       src/dsp.cpp           \
-       src/eeprom.cpp        \
-       src/event.cpp         \
-       src/file.cpp          \
-       src/filedb.cpp        \
-       src/gpu.cpp           \
-       src/jagdasm.cpp       \
-       src/jaguar.cpp        \
-       src/jerry.cpp         \
-       src/joystick.cpp      \
-       src/log.cpp           \
-       src/memory.cpp        \
-       src/mmu.cpp           \
-       src/objectp.cpp       \
-       src/settings.cpp      \
-       src/state.cpp         \
-       src/tom.cpp           \
-       src/universalhdr.cpp  \
-       src/unzip.c           \
-       src/wavetable.cpp
+#SOURCES += \
+#      src/blitter.cpp       \
+#      src/cdintf.cpp        \
+#      src/cdrom.cpp         \
+#      src/crc32.cpp         \
+#      src/dac.cpp           \
+#      src/dsp.cpp           \
+#      src/eeprom.cpp        \
+#      src/event.cpp         \
+#      src/file.cpp          \
+#      src/filedb.cpp        \
+#      src/gpu.cpp           \
+#      src/jagdasm.cpp       \
+#      src/jaguar.cpp        \
+#      src/jerry.cpp         \
+#      src/joystick.cpp      \
+#      src/log.cpp           \
+#      src/memory.cpp        \
+#      src/mmu.cpp           \
+#      src/objectp.cpp       \
+#      src/settings.cpp      \
+#      src/state.cpp         \
+#      src/tom.cpp           \
+#      src/universalhdr.cpp  \
+#      src/unzip.c           \
+#      src/wavetable.cpp