From: Shamus Hammons Date: Mon, 17 Oct 2011 09:26:29 +0000 (+0000) Subject: Minor fixes, hopefully fix Exit hotkey on Win32. X-Git-Tag: 2.0.1~1 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae593a9f2f6557d271d8b2eacc5d4a825cf4b0a;p=virtualjaguar Minor fixes, hopefully fix Exit hotkey on Win32. --- diff --git a/Makefile b/Makefile index ac749db..0fcad72 100644 --- 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" diff --git a/src/dac.cpp b/src/dac.cpp index 990a724..dbb1b58 100644 --- a/src/dac.cpp +++ b/src/dac.cpp @@ -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) { diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 739756e..37f9f24 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -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())); diff --git a/src/jerry.cpp b/src/jerry.cpp index 4b05236..484fe01 100644 --- a/src/jerry.cpp +++ b/src/jerry.cpp @@ -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(); diff --git a/src/memory.h b/src/memory.h index 7f451d6..e081550 100644 --- a/src/memory.h +++ b/src/memory.h @@ -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 + + +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__