annotate src/gb/GB.h @ 156:20dfcfcc49d9

filled out more of the pokemon map by extrapolating from pokemon 2 and testing.
author Robert McIntyre <rlm@mit.edu>
date Tue, 20 Mar 2012 03:12:49 -0500
parents 2090bcb78f44
children 893c753f8088
rev   line source
rlm@1 1 #ifndef VBA_GB_H
rlm@1 2 #define VBA_GB_H
rlm@1 3
rlm@1 4 #if _MSC_VER > 1000
rlm@1 5 #pragma once
rlm@1 6 #endif // _MSC_VER > 1000
rlm@1 7
rlm@1 8 #include "zlib.h"
rlm@1 9 #include "../Port.h"
rlm@1 10
rlm@1 11 typedef union
rlm@1 12 {
rlm@1 13 struct
rlm@1 14 {
rlm@1 15 #ifdef WORDS_BIGENDIAN
rlm@1 16 u8 B1, B0;
rlm@1 17 #else
rlm@1 18 u8 B0, B1;
rlm@1 19 #endif
rlm@1 20 } B;
rlm@1 21 u16 W;
rlm@1 22 } gbRegister;
rlm@1 23
rlm@1 24 extern bool gbLoadRom(const char *);
rlm@92 25 extern int gbEmulate(int);
rlm@1 26 extern bool gbIsGameboyRom(const char *);
rlm@1 27 extern void gbSoundReset();
rlm@1 28 extern void gbSoundSetQuality(int);
rlm@1 29 extern void gbReset(bool userReset = false);
rlm@1 30 extern void gbCleanUp();
rlm@1 31 extern bool gbWriteBatteryFile(const char *);
rlm@1 32 extern bool gbWriteBatteryFile(const char *, bool);
rlm@1 33 extern bool gbWriteBatteryToStream(gzFile);
rlm@1 34 extern bool gbReadBatteryFile(const char *);
rlm@1 35 extern bool gbReadBatteryFromStream(gzFile);
rlm@1 36 extern bool gbWriteSaveState(const char *);
rlm@1 37 extern bool gbWriteMemSaveState(char *, int);
rlm@1 38 extern bool gbReadSaveState(const char *);
rlm@1 39 extern bool gbReadMemSaveState(char *, int);
rlm@1 40 extern bool gbReadSaveStateFromStream(gzFile);
rlm@1 41 extern bool gbWriteSaveStateToStream(gzFile);
rlm@1 42 extern void gbSgbRenderBorder();
rlm@1 43 extern bool gbWritePNGFile(const char *);
rlm@1 44 extern bool gbWriteBMPFile(const char *);
rlm@1 45 extern bool gbReadGSASnapshot(const char *);
rlm@1 46
rlm@59 47 extern int getRamSize();
rlm@59 48 extern int getRomSize();
rlm@93 49
rlm@93 50 extern void storeMemory(int32 *);
rlm@96 51 extern void writeMemory(int32 *);
rlm@96 52
rlm@60 53 extern void storeRam(int32 *);
rlm@61 54 extern void storeRom(int32 *);
rlm@61 55 extern void storeWRam(int32 *);
rlm@61 56 extern void storeVRam(int32 *);
rlm@62 57 extern void storeRegisters(int32 *);
rlm@100 58 extern void setRegisters(int32 *);
rlm@100 59
rlm@76 60 extern long gbWriteMemSaveStatePos(char *, int);
rlm@59 61
rlm@1 62 extern struct EmulatedSystem GBSystem;
rlm@1 63 extern struct EmulatedSystemCounters &GBSystemCounters;
rlm@1 64
rlm@1 65 #endif // VBA_GB_H