]> Shamusworld >> Repos - virtualjaguar/commitdiff
Minor fixes, hopefully fix Exit hotkey on Win32.
authorShamus Hammons <jlhamm@acm.org>
Mon, 17 Oct 2011 09:26:29 +0000 (09:26 +0000)
committerShamus Hammons <jlhamm@acm.org>
Mon, 17 Oct 2011 09:26:29 +0000 (09:26 +0000)
Makefile
src/dac.cpp
src/gui/mainwin.cpp
src/jerry.cpp
src/memory.h

index ac749dba8551d18ef7414cb4de0333d0c579c49e..0fcad72aae842d2d4465f13035487509e5447252 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,10 +23,10 @@ all: prepare virtualjaguar
 
 prepare:
        @echo -e "\033[01;33m***\033[00;32m Preparing to compile Virtual Jaguar...\033[00m"
-#      @echo "#define VJ_RELEASE_VERSION \"v2.0.0\"" > src/version.h
+#      @echo "#define VJ_RELEASE_VERSION \"v2.0.1\"" > src/version.h
 #      @echo "#define VJ_RELEASE_SUBVERSION \"Final\"" >> src/version.h
        @echo "#define VJ_RELEASE_VERSION \"SVN `svn info | grep -i revision`\"" > src/version.h
-       @echo "#define VJ_RELEASE_SUBVERSION \"2.0.0 Prerelease\"" >> src/version.h
+       @echo "#define VJ_RELEASE_SUBVERSION \"2.0.1 Prerelease\"" >> src/version.h
 
 virtualjaguar: sources libs makefile-qt
        @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar GUI...\033[00m"
index 990a7248b5a7c3fb4ec7152d94d0466d89e288a5..dbb1b5842caeef2469dce21d0c46589391a4f259 100644 (file)
@@ -190,7 +190,7 @@ if (numLeftSamplesReady == 0 || numRightSamplesReady == 0)
 }
 
 //
-// Calculate the freq9uency of SCLK * 32 using the divider
+// Calculate the frequency of SCLK * 32 using the divider
 //
 int GetCalculatedFrequency(void)
 {
index 739756ed1915251717f35168ebafb1e13689f1a2..37f9f242b2573061166b513d7f2a4fe7eb8291f6 100644 (file)
@@ -97,7 +97,9 @@ MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(
        // Create actions
 
        quitAppAct = new QAction(tr("E&xit"), this);
-       quitAppAct->setShortcuts(QKeySequence::Quit);
+//     quitAppAct->setShortcuts(QKeySequence::Quit);
+//     quitAppAct->setShortcut(QKeySequence(tr("Alt+x")));
+       quitAppAct->setShortcut(QKeySequence(tr("Ctrl+q")));
        quitAppAct->setStatusTip(tr("Quit Virtual Jaguar"));
        connect(quitAppAct, SIGNAL(triggered()), this, SLOT(close()));
 
index 4b052366efab2adafbc937d6023c2e2f5b50816e..484fe01558d612194157ff90803ed8c240aaee40 100644 (file)
@@ -455,13 +455,8 @@ void JERRYI2SCallback(void)
 
 void JERRYInit(void)
 {
-//     clock_init();
-//     anajoy_init();
        JoystickInit();
        DACInit();
-//This should be handled with the cart initialization...
-//     eeprom_init();
-//     memory_malloc_secure((void **)&jerry_ram_8, 0x10000, "JERRY RAM/ROM");
        memcpy(&jerry_ram_8[0xD000], waveTableROM, 0x1000);
 
        JERRYPIT1Prescaler = 0xFFFF;
@@ -474,8 +469,6 @@ void JERRYInit(void)
 
 void JERRYReset(void)
 {
-//     clock_reset();
-//     anajoy_reset();
        JoystickReset();
        EepromReset();
        JERRYResetI2S();
@@ -495,9 +488,6 @@ void JERRYReset(void)
 void JERRYDone(void)
 {
        WriteLog("JERRY: M68K Interrupt control ($F10020) = %04X\n", GET16(jerry_ram_8, 0x20));
-//     memory_free(jerry_ram_8);
-//     clock_done();
-//     anajoy_done();
        JoystickDone();
        DACDone();
        EepromDone();
index 7f451d645ab8d7957d8a98125dcc1d934b248cd8..e081550e104ffe1e505e0765fa44a26264731ced 100644 (file)
@@ -116,4 +116,98 @@ extern const char * whoName[9];
 #endif
 #endif
 
+#if 0
+Stuff ripped out of Hatari, that may be useful:
+
+/* Can the actual CPU access unaligned memory? */
+#ifndef CPU_CAN_ACCESS_UNALIGNED
+# if defined(__i386__) || defined(powerpc) || defined(__mc68020__)
+#  define CPU_CAN_ACCESS_UNALIGNED 1
+# else
+#  define CPU_CAN_ACCESS_UNALIGNED 0
+# endif
+#endif
+
+
+/* If the CPU can access unaligned memory, use these accelerated functions: */
+#if CPU_CAN_ACCESS_UNALIGNED
+
+#include <SDL_endian.h>
+
+
+static inline uae_u32 do_get_mem_long(void *a)
+{
+       return SDL_SwapBE32(*(uae_u32 *)a);
+}
+
+static inline uae_u16 do_get_mem_word(void *a)
+{
+       return SDL_SwapBE16(*(uae_u16 *)a);
+}
+
+
+static inline void do_put_mem_long(void *a, uae_u32 v)
+{
+       *(uae_u32 *)a = SDL_SwapBE32(v);
+}
+
+static inline void do_put_mem_word(void *a, uae_u16 v)
+{
+       *(uae_u16 *)a = SDL_SwapBE16(v);
+}
+
+
+#else  /* Cpu can not access unaligned memory: */
+
+
+static inline uae_u32 do_get_mem_long(void *a)
+{
+       uae_u8 *b = (uae_u8 *)a;
+
+       return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
+}
+
+static inline uae_u16 do_get_mem_word(void *a)
+{
+       uae_u8 *b = (uae_u8 *)a;
+
+       return (b[0] << 8) | b[1];
+}
+
+
+static inline void do_put_mem_long(void *a, uae_u32 v)
+{
+       uae_u8 *b = (uae_u8 *)a;
+
+       b[0] = v >> 24;
+       b[1] = v >> 16;    
+       b[2] = v >> 8;
+       b[3] = v;
+}
+
+static inline void do_put_mem_word(void *a, uae_u16 v)
+{
+       uae_u8 *b = (uae_u8 *)a;
+
+       b[0] = v >> 8;
+       b[1] = v;
+}
+
+
+#endif  /* CPU_CAN_ACCESS_UNALIGNED */
+
+
+/* These are same for all architectures: */
+
+static inline uae_u8 do_get_mem_byte(uae_u8 *a)
+{
+       return *a;
+}
+
+static inline void do_put_mem_byte(uae_u8 *a, uae_u8 v)
+{
+       *a = v;
+}
+#endif
+
 #endif // __MEMORY_H__