aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTwinaphex2018-02-08 13:29:05 +0100
committerGitHub2018-02-08 13:29:05 +0100
commit8e71246886c0957e047571743ec524ff4c83a53e (patch)
tree98fc390a7c4f2205bf896a9e5f685856790e4775 /source
parente2ad3dfa3500e39f5aab98c6070cf206702d4d40 (diff)
parent5a20ff0dc7c6a2fcde0b1e382f3d5a92aefa4ab9 (diff)
downloadsnes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.tar.gz
snes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.tar.bz2
snes9x2005-8e71246886c0957e047571743ec524ff4c83a53e.zip
Merge pull request #49 from Tatsuya79/master
Overclock by reducing cycles.
Diffstat (limited to 'source')
-rw-r--r--source/snes9x.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/snes9x.h b/source/snes9x.h
index 9e7d91d..4a4364c 100644
--- a/source/snes9x.h
+++ b/source/snes9x.h
@@ -46,9 +46,9 @@
#define SNES_CYCLES_PER_SCANLINE ((uint32_t) ((SNES_SCANLINE_TIME / SNES_CLOCK_LEN) * 6 + 0.5))
-#define ONE_CYCLE 6u
-#define SLOW_ONE_CYCLE 8u
-#define TWO_CYCLES 12u
+#define ONE_CYCLE (overclock_cycles ? 4u : 6u)
+#define SLOW_ONE_CYCLE (overclock_cycles ? 4u : 8u)
+#define TWO_CYCLES (overclock_cycles ? 6u : 12u)
#define SNES_TR_MASK (1u << 4)
#define SNES_TL_MASK (1u << 5)
@@ -63,6 +63,8 @@
#define SNES_Y_MASK (1u << 14)
#define SNES_B_MASK (1u << 15)
+extern bool overclock_cycles;
+
enum
{
SNES_MULTIPLAYER5,