diff --git a/CMakeLists.txt b/CMakeLists.txt index 10497b7f..bb01db62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,12 +138,12 @@ SET(SRC_MAIN src/common/memgzio.c ) -SET(SRC_AGB - src/agb/agbprint.cpp - src/agb/GBA.cpp - src/agb/GBAGfx.cpp - src/agb/GBA-thumb.cpp - src/agb/GBA-arm.cpp +SET(SRC_GBA + src/gba/agbprint.cpp + src/gba/GBA.cpp + src/gba/GBAGfx.cpp + src/gba/GBA-thumb.cpp + src/gba/GBA-arm.cpp ) SET(SRC_GB @@ -268,7 +268,7 @@ ADD_LIBRARY ( vbamcore ${PROJECT_SRCS} ${SRC_MAIN} - ${SRC_AGB} + ${SRC_GBA} ${SRC_GB} ${SRC_APU} ${SRC_FEX_MINI} diff --git a/src/Cheats.cpp b/src/Cheats.cpp index ba8a6dcd..036168ef 100644 --- a/src/Cheats.cpp +++ b/src/Cheats.cpp @@ -3,8 +3,8 @@ #include #include -#include "agb/GBA.h" -#include "agb/GBAinline.h" +#include "gba/GBA.h" +#include "gba/GBAinline.h" #include "Cheats.h" #include "Globals.h" #include "NLS.h" diff --git a/src/EEprom.cpp b/src/EEprom.cpp index 0bc581d9..512cebb9 100644 --- a/src/EEprom.cpp +++ b/src/EEprom.cpp @@ -1,5 +1,5 @@ #include -#include "agb/GBA.h" +#include "gba/GBA.h" #include "EEprom.h" #include "Util.h" diff --git a/src/Flash.cpp b/src/Flash.cpp index 080b7751..019bfc45 100644 --- a/src/Flash.cpp +++ b/src/Flash.cpp @@ -1,6 +1,6 @@ #include #include -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" #include "Flash.h" #include "Sram.h" diff --git a/src/Globals.cpp b/src/Globals.cpp index f455df55..f7a9d6d1 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -1,4 +1,4 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #ifdef BKPT_SUPPORT int oldreg[17]; diff --git a/src/Globals.h b/src/Globals.h index c7f54ea2..be96b36c 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -1,7 +1,7 @@ #ifndef GLOBALS_H #define GLOBALS_H -#include "agb/GBA.h" +#include "common/Types.h" #define VERBOSE_SWI 1 #define VERBOSE_UNALIGNED_MEMORY 2 diff --git a/src/Mode0.cpp b/src/Mode0.cpp index c6b648a9..d0ea46ac 100644 --- a/src/Mode0.cpp +++ b/src/Mode0.cpp @@ -1,6 +1,6 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" -#include "agb/GBAGfx.h" +#include "gba/GBAGfx.h" void mode0RenderLine() { diff --git a/src/Mode1.cpp b/src/Mode1.cpp index 6c0b1fd1..7907ccf2 100644 --- a/src/Mode1.cpp +++ b/src/Mode1.cpp @@ -1,6 +1,6 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" -#include "agb/GBAGfx.h" +#include "gba/GBAGfx.h" void mode1RenderLine() { diff --git a/src/Mode2.cpp b/src/Mode2.cpp index d7fac2aa..51391936 100644 --- a/src/Mode2.cpp +++ b/src/Mode2.cpp @@ -1,6 +1,6 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" -#include "agb/GBAGfx.h" +#include "gba/GBAGfx.h" void mode2RenderLine() { diff --git a/src/Mode3.cpp b/src/Mode3.cpp index 330635f7..6b98d9da 100644 --- a/src/Mode3.cpp +++ b/src/Mode3.cpp @@ -1,6 +1,6 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" -#include "agb/GBAGfx.h" +#include "gba/GBAGfx.h" void mode3RenderLine() { diff --git a/src/Mode4.cpp b/src/Mode4.cpp index 170e7267..5a233180 100644 --- a/src/Mode4.cpp +++ b/src/Mode4.cpp @@ -1,5 +1,5 @@ -#include "agb/GBA.h" -#include "agb/GBAGfx.h" +#include "gba/GBA.h" +#include "gba/GBAGfx.h" #include "Globals.h" void mode4RenderLine() diff --git a/src/Mode5.cpp b/src/Mode5.cpp index efc3f170..febe3fdd 100644 --- a/src/Mode5.cpp +++ b/src/Mode5.cpp @@ -1,6 +1,6 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" -#include "agb/GBAGfx.h" +#include "gba/GBAGfx.h" void mode5RenderLine() { diff --git a/src/RTC.cpp b/src/RTC.cpp index a49e8d77..2be3a457 100644 --- a/src/RTC.cpp +++ b/src/RTC.cpp @@ -1,5 +1,5 @@ #include "System.h" -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" #include "common/Port.h" #include "Util.h" diff --git a/src/Sound.cpp b/src/Sound.cpp index 53a27349..31dff3ed 100644 --- a/src/Sound.cpp +++ b/src/Sound.cpp @@ -2,7 +2,7 @@ #include "Sound.h" -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" #include "Util.h" #include "common/Port.h" diff --git a/src/Sram.cpp b/src/Sram.cpp index 9b9c0de9..9a8a7f04 100644 --- a/src/Sram.cpp +++ b/src/Sram.cpp @@ -1,4 +1,4 @@ -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" #include "Flash.h" #include "Sram.h" diff --git a/src/Util.cpp b/src/Util.cpp index e5c1b42c..3c8fcf30 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -13,7 +13,7 @@ extern "C" { #include "NLS.h" #include "Util.h" #include "Flash.h" -#include "agb/GBA.h" +#include "gba/GBA.h" #include "Globals.h" #include "RTC.h" #include "common/Port.h" diff --git a/src/armdis.cpp b/src/armdis.cpp index 9d354a80..17766684 100644 --- a/src/armdis.cpp +++ b/src/armdis.cpp @@ -5,7 +5,7 @@ #include "System.h" #include "common/Port.h" -#include "agb/GBA.h" +#include "gba/GBA.h" #include "armdis.h" #include "elf.h" diff --git a/src/bios.cpp b/src/bios.cpp index 50f330c1..b7622155 100644 --- a/src/bios.cpp +++ b/src/bios.cpp @@ -2,9 +2,9 @@ #include #include -#include "agb/GBA.h" +#include "gba/GBA.h" #include "bios.h" -#include "agb/GBAinline.h" +#include "gba/GBAinline.h" #include "Globals.h" s16 sineTable[256] = { diff --git a/src/common/SoundSDL.cpp b/src/common/SoundSDL.cpp index 4c28a6a4..6417f397 100644 --- a/src/common/SoundSDL.cpp +++ b/src/common/SoundSDL.cpp @@ -17,9 +17,8 @@ #include "SoundSDL.h" -#include "../Globals.h" - extern int emulating; +extern bool speedup; SoundSDL::SoundSDL(): _rbuf(0) @@ -64,7 +63,7 @@ void SoundSDL::write(u16 * finalWave, int length) // If emulating and not in speed up mode, synchronize to audio // by waiting till there is enough room in the buffer - if (emulating && !speedup && !systemThrottle) + if (emulating && !speedup) { SDL_CondWait(_cond, _mutex); } diff --git a/src/elf.cpp b/src/elf.cpp index 8ed7c861..d4824504 100644 --- a/src/elf.cpp +++ b/src/elf.cpp @@ -2,7 +2,7 @@ #include #include -#include "agb/GBA.h" +#include "gba/GBA.h" #include "common/Port.h" #include "elf.h" #include "NLS.h" diff --git a/src/gb/gbGfx.cpp b/src/gb/gbGfx.cpp index a220a13f..cf97800f 100644 --- a/src/gb/gbGfx.cpp +++ b/src/gb/gbGfx.cpp @@ -1,6 +1,7 @@ #include -#include "../Globals.h" +#include "../common/Types.h" +#include "../Util.h" #include "gbGlobals.h" #include "gbSGB.h" @@ -42,6 +43,7 @@ u8 gbInvertTab[256] = { u16 gbLineMix[160]; u16 gbWindowColor[160]; extern int inUseRegister_WY; +extern int layerSettings; void gbRenderLine() { diff --git a/src/agb/GBA-arm.cpp b/src/gba/GBA-arm.cpp similarity index 100% rename from src/agb/GBA-arm.cpp rename to src/gba/GBA-arm.cpp diff --git a/src/agb/GBA-thumb.cpp b/src/gba/GBA-thumb.cpp similarity index 100% rename from src/agb/GBA-thumb.cpp rename to src/gba/GBA-thumb.cpp diff --git a/src/agb/GBA.cpp b/src/gba/GBA.cpp similarity index 100% rename from src/agb/GBA.cpp rename to src/gba/GBA.cpp diff --git a/src/agb/GBA.h b/src/gba/GBA.h similarity index 100% rename from src/agb/GBA.h rename to src/gba/GBA.h diff --git a/src/agb/GBAGfx.cpp b/src/gba/GBAGfx.cpp similarity index 100% rename from src/agb/GBAGfx.cpp rename to src/gba/GBAGfx.cpp diff --git a/src/agb/GBAGfx.h b/src/gba/GBAGfx.h similarity index 100% rename from src/agb/GBAGfx.h rename to src/gba/GBAGfx.h diff --git a/src/agb/GBALink.cpp b/src/gba/GBALink.cpp similarity index 100% rename from src/agb/GBALink.cpp rename to src/gba/GBALink.cpp diff --git a/src/agb/GBALink.h b/src/gba/GBALink.h similarity index 100% rename from src/agb/GBALink.h rename to src/gba/GBALink.h diff --git a/src/agb/GBAcpu.h b/src/gba/GBAcpu.h similarity index 100% rename from src/agb/GBAcpu.h rename to src/gba/GBAcpu.h diff --git a/src/agb/GBAinline.h b/src/gba/GBAinline.h similarity index 100% rename from src/agb/GBAinline.h rename to src/gba/GBAinline.h diff --git a/src/agb/agbprint.cpp b/src/gba/agbprint.cpp similarity index 100% rename from src/agb/agbprint.cpp rename to src/gba/agbprint.cpp diff --git a/src/agb/agbprint.h b/src/gba/agbprint.h similarity index 100% rename from src/agb/agbprint.h rename to src/gba/agbprint.h diff --git a/src/gtk/system.cpp b/src/gtk/system.cpp index 1c9b1558..5b4cb228 100644 --- a/src/gtk/system.cpp +++ b/src/gtk/system.cpp @@ -16,8 +16,6 @@ // along with this program; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include "../agb/GBA.h" -#include "../Util.h" #include "../sdl/inputSDL.h" #include "../Sound.h" #include "../common/SoundSDL.h" diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index faa0d58e..f602d986 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -26,7 +26,7 @@ #include -#include "../agb/GBA.h" +#include "../gba/GBA.h" #include "../gb/gb.h" #include "../gb/gbGlobals.h" #include "../gb/gbSound.h" diff --git a/src/gtk/windowcallbacks.cpp b/src/gtk/windowcallbacks.cpp index 0fd07f34..13b0e27a 100644 --- a/src/gtk/windowcallbacks.cpp +++ b/src/gtk/windowcallbacks.cpp @@ -25,7 +25,7 @@ #include -#include "../agb/GBA.h" +#include "../gba/GBA.h" #include "../gb/gb.h" #include "../gb/gbGlobals.h" #include "../gb/gbPrinter.h" diff --git a/src/remote.cpp b/src/remote.cpp index 08b01a1e..8bce2ff3 100644 --- a/src/remote.cpp +++ b/src/remote.cpp @@ -24,7 +24,7 @@ # define write _write #endif // _WIN32 -#include "agb/GBA.h" +#include "gba/GBA.h" extern bool debugger; extern void CPUUpdateCPSR(); diff --git a/src/sdl/SDL.cpp b/src/sdl/SDL.cpp index e210debe..6717f253 100644 --- a/src/sdl/SDL.cpp +++ b/src/sdl/SDL.cpp @@ -37,8 +37,8 @@ #include -#include "../agb/GBA.h" -#include "../agb/agbprint.h" +#include "../gba/GBA.h" +#include "../gba/agbprint.h" #include "../Flash.h" #include "../common/Patch.h" #include "../RTC.h" diff --git a/src/sdl/debugger.cpp b/src/sdl/debugger.cpp index b660a32b..59a397bb 100644 --- a/src/sdl/debugger.cpp +++ b/src/sdl/debugger.cpp @@ -23,7 +23,7 @@ #include #include -#include "../agb/GBA.h" +#include "../gba/GBA.h" #include "../common/Port.h" #include "../Sound.h" #include "../armdis.h" diff --git a/src/sdl/exprNode.cpp b/src/sdl/exprNode.cpp index c400501c..acfd6b2d 100644 --- a/src/sdl/exprNode.cpp +++ b/src/sdl/exprNode.cpp @@ -20,7 +20,7 @@ #include #include -#include "../agb/GBA.h" +#include "../gba/GBA.h" #include "../common/Port.h" #include "../elf.h" #include "exprNode.h"