Mercurial > vba-clojure
view src/gba/GBA.h @ 458:abcf1c8bb74c
going to work on another song.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 04 May 2012 02:26:28 -0500 |
parents | 1ff2c546f5ad |
children |
line wrap: on
line source
1 #ifndef VBA_GBA_H2 #define VBA_GBA_H4 #if _MSC_VER > 10005 #pragma once6 #endif // _MSC_VER > 10008 #include "zlib.h"9 #include "../Port.h"11 #if (defined(WIN32) && !defined(SDL))12 #include "../win32/stdafx.h" // for HANDLE13 //#include <windows.h> // for HANDLE14 // NOTE: if you get this error:15 // #error WINDOWS.H already included. MFC apps must not #include <windows.h>16 // it is probably because stdafx.h is getting included at the wrong place17 // (i.e. after anything else) in a file, or your precompiled headers are otherwise wrong18 #endif20 #define SAVE_GAME_VERSION_1 121 #define SAVE_GAME_VERSION_2 222 #define SAVE_GAME_VERSION_3 323 #define SAVE_GAME_VERSION_4 424 #define SAVE_GAME_VERSION_5 525 #define SAVE_GAME_VERSION_6 626 #define SAVE_GAME_VERSION_7 727 #define SAVE_GAME_VERSION_8 828 #define SAVE_GAME_VERSION_9 929 #define SAVE_GAME_VERSION_10 1030 #define SAVE_GAME_VERSION_11 1131 #define SAVE_GAME_VERSION_12 1232 #define SAVE_GAME_VERSION_13 1333 #define SAVE_GAME_VERSION SAVE_GAME_VERSION_1335 #if (defined(WIN32) && !defined(SDL))36 extern HANDLE mapROM; // shared memory handles37 extern HANDLE mapWORKRAM;38 extern HANDLE mapBIOS;39 extern HANDLE mapIRAM;40 extern HANDLE mapPALETTERAM;41 extern HANDLE mapVRAM;42 extern HANDLE mapOAM;43 extern HANDLE mapPIX;44 extern HANDLE mapIOMEM;45 #endif47 /*48 extern reg_pair reg[45];49 extern u8 biosProtected[4];51 extern bool8 N_FLAG;52 extern bool8 Z_FLAG;53 extern bool8 C_FLAG;54 extern bool8 V_FLAG;55 extern bool8 armIrqEnable;56 extern bool8 armState;57 extern int32 armMode;58 */59 extern void (*cpuSaveGameFunc)(u32, u8);61 extern bool8 freezeWorkRAM[0x40000];62 extern bool8 freezeInternalRAM[0x8000];63 extern bool CPUReadGSASnapshot(const char *);64 extern bool CPUWriteGSASnapshot(const char *, const char *, const char *, const char *);65 extern bool CPUWriteBatteryFile(const char *);66 extern bool CPUReadBatteryFile(const char *);67 extern bool CPUWriteBatteryToStream(gzFile);68 extern bool CPUReadBatteryFromStream(gzFile);69 extern bool CPUExportEepromFile(const char *);70 extern bool CPUImportEepromFile(const char *);71 extern bool CPUWritePNGFile(const char *);72 extern bool CPUWriteBMPFile(const char *);73 extern void CPUCleanUp();74 extern void CPUUpdateRender();75 extern void CPUUpdateRenderBuffers(bool force);76 extern bool CPUReadMemState(char *, int);77 extern bool CPUReadState(const char *);78 extern bool CPUWriteMemState(char *, int);79 extern bool CPUWriteState(const char *);80 extern bool CPUReadStateFromStream(gzFile);81 extern bool CPUWriteStateToStream(gzFile);82 extern int CPULoadRom(const char *);83 extern void CPUUpdateRegister(u32, u16);84 extern void CPUWriteHalfWord(u32, u16);85 extern void CPUWriteByte(u32, u8);86 extern bool CPULoadBios(const char *, bool);87 extern void CPUInit();88 extern void CPUReset(bool userReset = false);89 extern int CPULoop(int);90 extern void CPUCheckDMA(int, int);91 #ifdef PROFILING92 extern void cpuProfil(char *buffer, int, u32, int);93 extern void cpuEnableProfiling(int hz);94 #endif96 extern struct EmulatedSystem GBASystem;97 extern struct EmulatedSystemCounters &GBASystemCounters;99 #define R13_IRQ 18100 #define R14_IRQ 19101 #define SPSR_IRQ 20102 #define R13_USR 26103 #define R14_USR 27104 #define R13_SVC 28105 #define R14_SVC 29106 #define SPSR_SVC 30107 #define R13_ABT 31108 #define R14_ABT 32109 #define SPSR_ABT 33110 #define R13_UND 34111 #define R14_UND 35112 #define SPSR_UND 36113 #define R8_FIQ 37114 #define R9_FIQ 38115 #define R10_FIQ 39116 #define R11_FIQ 40117 #define R12_FIQ 41118 #define R13_FIQ 42119 #define R14_FIQ 43120 #define SPSR_FIQ 44122 #endif // VBA_GBA_H