annotate src/gb/GB.h @ 68:86093f2ce7d1

got the speedrun to play
author Robert McIntyre <rlm@mit.edu>
date Thu, 08 Mar 2012 02:10:03 -0600
parents 4699c7bab77d
children d7c38ce83421
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@1 25 extern void 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@60 49 extern void storeRam(int32 *);
rlm@61 50 extern void storeRom(int32 *);
rlm@61 51 extern void storeWRam(int32 *);
rlm@61 52 extern void storeVRam(int32 *);
rlm@62 53 extern void storeRegisters(int32 *);
rlm@59 54
rlm@1 55 extern struct EmulatedSystem GBSystem;
rlm@1 56 extern struct EmulatedSystemCounters &GBSystemCounters;
rlm@1 57
rlm@1 58 #endif // VBA_GB_H