From 49b8d466dd990f1da4ed8092c7c509f2c9131db2 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Aug 2017 10:38:21 -0700 Subject: [PATCH] Add switch for NTSC/PAL artifacting. (TODO: Get NTSC Filter working!) --- libretro/libretro-core.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/libretro/libretro-core.c b/libretro/libretro-core.c index 7479cda..1ff3ea9 100644 --- a/libretro/libretro-core.c +++ b/libretro/libretro-core.c @@ -6,6 +6,7 @@ #include "esc.h" #include "memory.h" #include "cassette.h" +#include "artifact.h" cothread_t mainThread; cothread_t emuThread; @@ -100,6 +101,10 @@ void retro_set_environment(retro_environment_t cb) { "atari800_cassboot", "Boot from Cassette; disabled|enabled", + }, + { + "atari800_artifacting", + "Hi-Res Artifacting; disabled|enabled", }, { "atari800_opt1", @@ -289,6 +294,39 @@ static void update_variables(void) Atari800_InitialiseMachine(); } } + + var.key = "atari800_artifacting"; + var.value = NULL; + + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) + { + if (strcmp(var.value, "enabled") == 0) + { + if (Atari800_tv_mode == Atari800_TV_NTSC) + { + ARTIFACT_Set(ARTIFACT_NTSC_NEW); + ARTIFACT_SetTVMode(Atari800_TV_NTSC); + } + else if (Atari800_tv_mode == Atari800_TV_PAL) + { + ARTIFACT_Set(ARTIFACT_PAL_BLEND); + ARTIFACT_SetTVMode(Atari800_TV_PAL); + } + } + else if (strcmp(var.value, "disabled") == 0) + { + if (Atari800_tv_mode == Atari800_TV_NTSC) + { + ARTIFACT_Set(ARTIFACT_NONE); + ARTIFACT_SetTVMode(Atari800_TV_NTSC); + } + else if (Atari800_tv_mode == Atari800_TV_PAL) + { + ARTIFACT_Set(ARTIFACT_NONE); + ARTIFACT_SetTVMode(Atari800_TV_PAL); + } + } + } }