Add 60FPS overclock hack
Let's see, this should fix issues on platforms that do not support running the emu at 59.73 FPS. We run the emu at fake 60fps, which means we produce more audio samples than the original device. Instead of missing samples (which produce cracks in the audio) we should be producing some extra samples, which will result in a frame drop every now and then (like every minute or so, so it's not noticeable).
This commit is contained in:
parent
6a59c71d55
commit
8da094d7e0
2
Makefile
2
Makefile
|
@ -222,7 +222,7 @@ else ifeq ($(platform), vita)
|
|||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
CC = arm-vita-eabi-gcc$(EXE_EXT)
|
||||
AR = arm-vita-eabi-ar$(EXE_EXT)
|
||||
CFLAGS += -DVITA
|
||||
CFLAGS += -DVITA -DOVERCLOCK_60FPS
|
||||
CFLAGS += -marm -mcpu=cortex-a9 -mfloat-abi=hard
|
||||
CFLAGS += -Wall -mword-relocations
|
||||
CFLAGS += -fomit-frame-pointer -ffast-math
|
||||
|
|
|
@ -51,7 +51,7 @@ static int translation_caches_inited = 0;
|
|||
#define MAX_PATH (512)
|
||||
#endif
|
||||
|
||||
// 59.72750057 hz
|
||||
// Usually 59.72750057 Hz, unless GBC_RATE is overclocked (for 60FPS)
|
||||
#define GBA_FPS ((float) GBC_BASE_RATE) / (308 * 228 * 4)
|
||||
|
||||
/* Maximum number of consecutive frames that
|
||||
|
|
6
sound.h
6
sound.h
|
@ -25,7 +25,11 @@
|
|||
|
||||
#define GBA_SOUND_FREQUENCY (64 * 1024)
|
||||
|
||||
#define GBC_BASE_RATE ((float)(16 * 1024 * 1024))
|
||||
#ifdef OVERCLOCK_60FPS
|
||||
#define GBC_BASE_RATE ((float)(60 * 228 * (272+960)))
|
||||
#else
|
||||
#define GBC_BASE_RATE ((float)(16 * 1024 * 1024))
|
||||
#endif
|
||||
|
||||
#define DIRECT_SOUND_INACTIVE 0
|
||||
#define DIRECT_SOUND_RIGHT 1
|
||||
|
|
Loading…
Reference in New Issue