Moved more GBA specific code to the gba folder.

This commit is contained in:
bgk 2009-01-01 16:11:02 +00:00
parent a9370648df
commit db8ec308dd
47 changed files with 129 additions and 130 deletions

View File

@ -118,21 +118,6 @@ SET( CMAKE_CXX_FLAGS "-O3 -Wall")
# Source files definition
SET(SRC_MAIN
src/bios.cpp
src/Cheats.cpp
src/CheatSearch.cpp
src/EEprom.cpp
src/Flash.cpp
src/Globals.cpp
src/Mode0.cpp
src/Mode1.cpp
src/Mode2.cpp
src/Mode3.cpp
src/Mode4.cpp
src/Mode5.cpp
src/RTC.cpp
src/Sound.cpp
src/Sram.cpp
src/Util.cpp
src/common/Patch.cpp
src/common/memgzio.c
@ -140,10 +125,24 @@ SET(SRC_MAIN
SET(SRC_GBA
src/gba/agbprint.cpp
src/gba/bios.cpp
src/gba/Cheats.cpp
src/gba/EEprom.cpp
src/gba/Flash.cpp
src/gba/GBA.cpp
src/gba/GBAGfx.cpp
src/gba/GBA-thumb.cpp
src/gba/GBA-arm.cpp
src/gba/Globals.cpp
src/gba/Mode0.cpp
src/gba/Mode1.cpp
src/gba/Mode2.cpp
src/gba/Mode3.cpp
src/gba/Mode4.cpp
src/gba/Mode5.cpp
src/gba/RTC.cpp
src/gba/Sound.cpp
src/gba/Sram.cpp
)
SET(SRC_GB
@ -228,9 +227,9 @@ SET(SRC_GTK
IF( NOT NO_DEBUGGER )
SET(SRC_DEBUGGER
src/armdis.cpp
src/elf.cpp
src/remote.cpp
src/gba/armdis.cpp
src/gba/elf.cpp
src/gba/remote.cpp
)
ENDIF( NOT NO_DEBUGGER )

View File

@ -12,10 +12,10 @@ extern "C" {
#include "System.h"
#include "NLS.h"
#include "Util.h"
#include "Flash.h"
#include "gba/Flash.h"
#include "gba/GBA.h"
#include "Globals.h"
#include "RTC.h"
#include "gba/Globals.h"
#include "gba/RTC.h"
#include "common/Port.h"
#include "common/fex.h"

View File

@ -1,6 +1,6 @@
#include <string.h>
#include "../Sound.h"
#include "../gba/Sound.h"
#include "../Util.h"
#include "gbGlobals.h"
#include "gbSound.h"

View File

@ -1,7 +1,7 @@
#ifndef CHEATSEARCH_H
#define CHEATSEARCH_H
#include "System.h"
#include "../System.h"
struct CheatSearchBlock {
int size;

View File

@ -3,12 +3,12 @@
#include <stdio.h>
#include <ctype.h>
#include "gba/GBA.h"
#include "gba/GBAinline.h"
#include "GBA.h"
#include "GBAinline.h"
#include "Cheats.h"
#include "Globals.h"
#include "NLS.h"
#include "Util.h"
#include "../NLS.h"
#include "../Util.h"
/**
* Gameshark code types: (based on AR v1.0)

View File

@ -1,7 +1,7 @@
#include <memory.h>
#include "gba/GBA.h"
#include "GBA.h"
#include "EEprom.h"
#include "Util.h"
#include "../Util.h"
extern int cpuDmaCount;

View File

@ -1,10 +1,10 @@
#include <stdio.h>
#include <memory.h>
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "Flash.h"
#include "Sram.h"
#include "Util.h"
#include "../Util.h"
#define FLASH_READ_ARRAY 0
#define FLASH_CMD_1 1

View File

@ -7,15 +7,15 @@
#include "GBA.h"
#include "GBAcpu.h"
#include "GBAinline.h"
#include "../Globals.h"
#include "../EEprom.h"
#include "../Flash.h"
#include "../Sound.h"
#include "../Sram.h"
#include "../bios.h"
#include "../Cheats.h"
#include "Globals.h"
#include "EEprom.h"
#include "Flash.h"
#include "Sound.h"
#include "Sram.h"
#include "bios.h"
#include "Cheats.h"
#include "../NLS.h"
#include "../elf.h"
#include "elf.h"
#include "../Util.h"
#include "../System.h"
#include "agbprint.h"

View File

@ -7,15 +7,15 @@
#include "GBA.h"
#include "GBAcpu.h"
#include "GBAinline.h"
#include "../Globals.h"
#include "../EEprom.h"
#include "../Flash.h"
#include "../Sound.h"
#include "../Sram.h"
#include "../bios.h"
#include "../Cheats.h"
#include "Globals.h"
#include "EEprom.h"
#include "Flash.h"
#include "Sound.h"
#include "Sram.h"
#include "bios.h"
#include "Cheats.h"
#include "../NLS.h"
#include "../elf.h"
#include "elf.h"
#include "../Util.h"
#include "../System.h"
#include "agbprint.h"

View File

@ -6,16 +6,16 @@
#include "GBA.h"
#include "GBAcpu.h"
#include "GBAinline.h"
#include "../Globals.h"
#include "Globals.h"
#include "GBAGfx.h"
#include "../EEprom.h"
#include "../Flash.h"
#include "../Sound.h"
#include "../Sram.h"
#include "../bios.h"
#include "../Cheats.h"
#include "EEprom.h"
#include "Flash.h"
#include "Sound.h"
#include "Sram.h"
#include "bios.h"
#include "Cheats.h"
#include "../NLS.h"
#include "../elf.h"
#include "elf.h"
#include "../Util.h"
#include "../common/Port.h"
#include "../System.h"

View File

@ -133,9 +133,9 @@ extern struct EmulatedSystem GBASystem;
#define R14_FIQ 43
#define SPSR_FIQ 44
#include "../Cheats.h"
#include "../Globals.h"
#include "../EEprom.h"
#include "../Flash.h"
#include "Cheats.h"
#include "Globals.h"
#include "EEprom.h"
#include "Flash.h"
#endif // GBA_H

View File

@ -2,7 +2,7 @@
#define GFX_H
#include "GBA.h"
#include "../Globals.h"
#include "Globals.h"
#include "../common/Port.h"

View File

@ -3,8 +3,8 @@
#include "../System.h"
#include "../common/Port.h"
#include "../RTC.h"
#include "../Sound.h"
#include "RTC.h"
#include "Sound.h"
#include "agbprint.h"
extern const u32 objTilesAddress[3];

View File

@ -1,4 +1,4 @@
#include "gba/GBA.h"
#include "GBA.h"
#ifdef BKPT_SUPPORT
int oldreg[17];

View File

@ -1,7 +1,7 @@
#ifndef GLOBALS_H
#define GLOBALS_H
#include "common/Types.h"
#include "../common/Types.h"
#define VERBOSE_SWI 1
#define VERBOSE_UNALIGNED_MEMORY 2

View File

@ -1,6 +1,6 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "gba/GBAGfx.h"
#include "GBAGfx.h"
void mode0RenderLine()
{

View File

@ -1,6 +1,6 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "gba/GBAGfx.h"
#include "GBAGfx.h"
void mode1RenderLine()
{

View File

@ -1,6 +1,6 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "gba/GBAGfx.h"
#include "GBAGfx.h"
void mode2RenderLine()
{

View File

@ -1,6 +1,6 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "gba/GBAGfx.h"
#include "GBAGfx.h"
void mode3RenderLine()
{

View File

@ -1,5 +1,5 @@
#include "gba/GBA.h"
#include "gba/GBAGfx.h"
#include "GBA.h"
#include "GBAGfx.h"
#include "Globals.h"
void mode4RenderLine()

View File

@ -1,6 +1,6 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "gba/GBAGfx.h"
#include "GBAGfx.h"
void mode5RenderLine()
{

View File

@ -1,9 +1,9 @@
#include "System.h"
#include "gba/GBA.h"
#include "../System.h"
#include "GBA.h"
#include "Globals.h"
#include "common/Port.h"
#include "Util.h"
#include "NLS.h"
#include "../common/Port.h"
#include "../Util.h"
#include "../NLS.h"
#include <time.h>
#include <memory.h>

View File

@ -2,15 +2,15 @@
#include "Sound.h"
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "Util.h"
#include "common/Port.h"
#include "../Util.h"
#include "../common/Port.h"
#include "apu/Gb_Apu.h"
#include "apu/Multi_Buffer.h"
#include "../apu/Gb_Apu.h"
#include "../apu/Multi_Buffer.h"
#include "common/SoundDriver.h"
#include "../common/SoundDriver.h"
#define NR10 0x60
#define NR11 0x62

View File

@ -3,7 +3,7 @@
// Sound emulation setup/options and GBA sound emulation
#include "System.h"
#include "../System.h"
//// Setup/options (these affect GBA and GB sound)

View File

@ -1,4 +1,4 @@
#include "gba/GBA.h"
#include "GBA.h"
#include "Globals.h"
#include "Flash.h"
#include "Sram.h"

View File

@ -2,7 +2,7 @@
#include <string.h>
#include "GBA.h"
#include "../Globals.h"
#include "Globals.h"
#include "../common/Port.h"
#include "../System.h"

View File

@ -3,9 +3,9 @@
/************************************************************************/
#include <stdio.h>
#include "System.h"
#include "common/Port.h"
#include "gba/GBA.h"
#include "../System.h"
#include "../common/Port.h"
#include "GBA.h"
#include "armdis.h"
#include "elf.h"

View File

@ -2,9 +2,9 @@
#include <memory.h>
#include <stdlib.h>
#include "gba/GBA.h"
#include "GBA.h"
#include "bios.h"
#include "gba/GBAinline.h"
#include "GBAinline.h"
#include "Globals.h"
s16 sineTable[256] = {

View File

@ -2,10 +2,10 @@
#include <stdlib.h>
#include <string.h>
#include "gba/GBA.h"
#include "common/Port.h"
#include "GBA.h"
#include "../common/Port.h"
#include "elf.h"
#include "NLS.h"
#include "../NLS.h"
#define elfReadMemory(addr) \
READ32LE((&map[(addr)>>24].address[(addr) & map[(addr)>>24].mask]))

View File

@ -24,7 +24,7 @@
# define write _write
#endif // _WIN32
#include "gba/GBA.h"
#include "GBA.h"
extern bool debugger;
extern void CPUUpdateCPSR();

View File

@ -17,7 +17,7 @@
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../sdl/inputSDL.h"
#include "../Sound.h"
#include "../gba/Sound.h"
#include "../common/SoundSDL.h"
#include "window.h"

View File

@ -27,10 +27,10 @@
#include <SDL.h>
#include "../gba/GBA.h"
#include "../gba/Sound.h"
#include "../gb/gb.h"
#include "../gb/gbGlobals.h"
#include "../gb/gbSound.h"
#include "../Sound.h"
#include "../Util.h"
#include "tools.h"

View File

@ -26,10 +26,10 @@
#include <SDL.h>
#include "../gba/GBA.h"
#include "../gba/Sound.h"
#include "../gb/gb.h"
#include "../gb/gbGlobals.h"
#include "../gb/gbPrinter.h"
#include "../Sound.h"
#include "../Util.h"
#include "../sdl/inputSDL.h"

View File

@ -37,18 +37,18 @@
#include <SDL.h>
#include "../common/Patch.h"
#include "../gba/GBA.h"
#include "../gba/agbprint.h"
#include "../Flash.h"
#include "../common/Patch.h"
#include "../RTC.h"
#include "../Sound.h"
#include "../Util.h"
#include "../gba/Flash.h"
#include "../gba/Cheats.h"
#include "../gba/RTC.h"
#include "../gba/Sound.h"
#include "../gb/gb.h"
#include "../gb/gbGlobals.h"
#include "../gb/gbCheats.h"
#include "../gb/gbSound.h"
#include "../Cheats.h"
#include "../Util.h"
#include "debugger.h"
#include "filters.h"

View File

@ -24,10 +24,10 @@
#include <ctype.h>
#include "../gba/GBA.h"
#include "../gba/Sound.h"
#include "../gba/armdis.h"
#include "../gba/elf.h"
#include "../common/Port.h"
#include "../Sound.h"
#include "../armdis.h"
#include "../elf.h"
#include "exprNode.h"
extern bool debugger;

View File

@ -88,7 +88,7 @@
/* Copy the first part of user declarations. */
#line 1 "expr.y"
#line 1 "expr.ypp"
namespace std {
#include <stdio.h>
@ -100,7 +100,7 @@ namespace std {
using namespace std;
#include "../System.h"
#include "../elf.h"
#include "../gba/elf.h"
#include "exprNode.h"
extern int yyerror(const char *);
@ -145,7 +145,7 @@ typedef int YYSTYPE;
/* Line 216 of yacc.c. */
#line 149 "expr.tab.c"
#line 149 "expr.tab.cpp"
#ifdef short
# undef short
@ -1345,68 +1345,68 @@ yyreduce:
switch (yyn)
{
case 2:
#line 32 "expr.y"
#line 32 "expr.ypp"
{ result = (yyvsp[(1) - (1)]); ;}
break;
case 3:
#line 36 "expr.y"
#line 36 "expr.ypp"
{ (yyval) = (yyvsp[(1) - (1)]); ;}
break;
case 4:
#line 37 "expr.y"
#line 37 "expr.ypp"
{ (yyval) = (yyvsp[(2) - (3)]); ;}
break;
case 5:
#line 38 "expr.y"
#line 38 "expr.ypp"
{ (yyval) = exprNodeDot((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); ;}
break;
case 6:
#line 39 "expr.y"
#line 39 "expr.ypp"
{ (yyval) = exprNodeArrow((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); ;}
break;
case 7:
#line 40 "expr.y"
#line 40 "expr.ypp"
{ (yyval) = exprNodeArray((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); ;}
break;
case 8:
#line 43 "expr.y"
#line 43 "expr.ypp"
{ (yyval) = (yyvsp[(1) - (1)]); ;}
break;
case 9:
#line 44 "expr.y"
#line 44 "expr.ypp"
{ (yyval) = exprNodeStar((yyvsp[(2) - (2)])); ;}
break;
case 10:
#line 45 "expr.y"
#line 45 "expr.ypp"
{ (yyval) = exprNodeAddr((yyvsp[(2) - (2)])); ;}
break;
case 11:
#line 46 "expr.y"
#line 46 "expr.ypp"
{ (yyval) = exprNodeSizeof((yyvsp[(3) - (4)])); ;}
break;
case 12:
#line 50 "expr.y"
#line 50 "expr.ypp"
{ (yyval) = exprNodeNumber(); ;}
break;
case 13:
#line 54 "expr.y"
#line 54 "expr.ypp"
{(yyval) = exprNodeIdentifier(); ;}
break;
/* Line 1267 of yacc.c. */
#line 1410 "expr.tab.c"
#line 1410 "expr.tab.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@ -1620,7 +1620,7 @@ yyreturn:
}
#line 57 "expr.y"
#line 57 "expr.ypp"
int yyerror(const char *s)

View File

@ -9,7 +9,7 @@ namespace std {
using namespace std;
#include "../System.h"
#include "../elf.h"
#include "../gba/elf.h"
#include "exprNode.h"
extern int yyerror(const char *);

View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include "../gba/GBA.h"
#include "../gba/elf.h"
#include "../common/Port.h"
#include "../elf.h"
#include "exprNode.h"
#ifndef __GNUC__