summaryrefslogtreecommitdiff
path: root/plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h')
-rw-r--r--plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h b/plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h
new file mode 100644
index 00000000..ef59194c
--- /dev/null
+++ b/plugins/gme/game-music-emu-0.6pre/gme/Sgc_Core.h
@@ -0,0 +1,44 @@
+// Sega/Game Gear/Coleco SGC music file emulator core
+
+// Game_Music_Emu 0.6-pre
+#ifndef SGC_CORE_H
+#define SGC_CORE_H
+
+#include "Sgc_Impl.h"
+#include "Sms_Fm_Apu.h"
+#include "Sms_Apu.h"
+
+class Sgc_Core : public Sgc_Impl {
+public:
+
+ // Adjusts music tempo, where 1.0 is normal. Can be changed while playing.
+ // Resets to 1.0 when loading file.
+ void set_tempo( double );
+
+ // Starts track, where 0 is the first.
+ blargg_err_t start_track( int );
+
+ // Ends time frame at time t
+ blargg_err_t end_frame( time_t t );
+
+ // SN76489 sound chip
+ Sms_Apu& apu() { return apu_; }
+ Sms_Fm_Apu& fm_apu() { return fm_apu_; }
+
+protected:
+ // Overrides
+ virtual void cpu_out( time_t, addr_t, int data );
+ virtual blargg_err_t load_( Data_Reader& );
+
+// Implementation
+public:
+ Sgc_Core();
+ ~Sgc_Core();
+
+private:
+ bool fm_accessed;
+ Sms_Apu apu_;
+ Sms_Fm_Apu fm_apu_;
+};
+
+#endif