Unverified Commit ae16176a authored by LibretroAdmin's avatar LibretroAdmin Committed by GitHub
Browse files

Merge pull request #283 from ds22x/master

Fix hi-res mode crashing + sync to upstream
parents bc65c09c a4151951
Pipeline #129167 passed with stages
in 44 minutes and 55 seconds
......@@ -13,7 +13,6 @@
#include "srtc.h"
#include "snapshot.h"
#include "cheats.h"
#include "logger.h"
#ifdef DEBUGGER
#include "debug.h"
#endif
......@@ -99,7 +98,6 @@ static void S9xSoftResetCPU (void)
void S9xReset (void)
{
S9xResetSaveTimer(FALSE);
S9xResetLogger();
memset(Memory.RAM, 0x55, 0x20000);
memset(Memory.VRAM, 0x00, 0x10000);
......
......@@ -123,7 +123,7 @@ void S9xGraphicsScreenResize (void)
IPPU.InterlaceOBJ = Memory.FillRAM[0x2133] & 2;
IPPU.PseudoHires = Memory.FillRAM[0x2133] & 8;
if (Settings.SupportHiRes && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.PseudoHires))
if (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.PseudoHires)
{
IPPU.DoubleWidthPixels = TRUE;
IPPU.RenderedScreenWidth = SNES_WIDTH << 1;
......@@ -134,7 +134,7 @@ void S9xGraphicsScreenResize (void)
IPPU.RenderedScreenWidth = SNES_WIDTH;
}
if (Settings.SupportHiRes && IPPU.Interlace)
if (IPPU.Interlace)
{
GFX.PPL = GFX.RealPPL << 1;
IPPU.DoubleHeightPixels = TRUE;
......@@ -472,34 +472,31 @@ void S9xUpdateScreen (void)
PPU.RecomputeClipWindows = FALSE;
}
if (Settings.SupportHiRes)
if (!IPPU.DoubleWidthPixels && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.PseudoHires))
{
if (!IPPU.DoubleWidthPixels && (PPU.BGMode == 5 || PPU.BGMode == 6 || IPPU.PseudoHires))
// Have to back out of the regular speed hack
for (uint32 y = 0; y < GFX.StartY; y++)
{
// Have to back out of the regular speed hack
for (uint32 y = 0; y < GFX.StartY; y++)
{
uint16 *p = GFX.Screen + y * GFX.PPL + 255;
uint16 *q = GFX.Screen + y * GFX.PPL + 510;
for (int x = 255; x >= 0; x--, p--, q -= 2)
*q = *(q + 1) = *p;
}
uint16 *p = GFX.Screen + y * GFX.PPL + 255;
uint16 *q = GFX.Screen + y * GFX.PPL + 510;
IPPU.DoubleWidthPixels = TRUE;
IPPU.RenderedScreenWidth = 512;
for (int x = 255; x >= 0; x--, p--, q -= 2)
*q = *(q + 1) = *p;
}
if (!IPPU.DoubleHeightPixels && IPPU.Interlace && (PPU.BGMode == 5 || PPU.BGMode == 6))
{
IPPU.DoubleHeightPixels = TRUE;
IPPU.RenderedScreenHeight = PPU.ScreenHeight << 1;
GFX.PPL = GFX.RealPPL << 1;
GFX.DoInterlace = 2;
IPPU.DoubleWidthPixels = TRUE;
IPPU.RenderedScreenWidth = 512;
}
for (int32 y = (int32) GFX.StartY - 2; y >= 0; y--)
memmove(GFX.Screen + (y + 1) * GFX.PPL, GFX.Screen + y * GFX.RealPPL, GFX.PPL * sizeof(uint16));
}
if (!IPPU.DoubleHeightPixels && IPPU.Interlace && (PPU.BGMode == 5 || PPU.BGMode == 6))
{
IPPU.DoubleHeightPixels = TRUE;
IPPU.RenderedScreenHeight = PPU.ScreenHeight << 1;
GFX.PPL = GFX.RealPPL << 1;
GFX.DoInterlace = 2;
for (int32 y = (int32) GFX.StartY - 2; y >= 0; y--)
memmove(GFX.Screen + (y + 1) * GFX.PPL, GFX.Screen + y * GFX.RealPPL, GFX.PPL * sizeof(uint16));
}
if ((Memory.FillRAM[0x2130] & 0x30) != 0x30 && (Memory.FillRAM[0x2131] & 0x3f))
......
......@@ -15,8 +15,8 @@ struct SGFX
const uint32 Pitch = sizeof(uint16) * MAX_SNES_WIDTH;
const uint32 RealPPL = MAX_SNES_WIDTH; // true PPL of Screen buffer
const uint32 ScreenSize = MAX_SNES_WIDTH * SNES_HEIGHT_EXTENDED;
uint16 ScreenBuffer[512 * (478 + 64)];
const uint32 ScreenSize = MAX_SNES_WIDTH * MAX_SNES_HEIGHT;
uint16 ScreenBuffer[MAX_SNES_WIDTH * (MAX_SNES_HEIGHT + 64)];
uint16 *Screen;
uint16 *SubScreen;
uint8 *ZBuffer;
......
cmake_minimum_required(VERSION 3.20)
project(snes9x-gtk VERSION 1.61)
option(USE_OPENGL "Build support for OpenGL" ON)
option(USE_SLANG "Build support for slang-type shaders" ON)
option(USE_XV "Build support for XVideo output" ON)
option(USE_PORTAUDIO "Build PortAudio sound driver" ON)
......@@ -56,17 +55,14 @@ find_library(DL dl REQUIRED)
list(APPEND ARGS ${SDL2_CFLAGS} ${GTK_CFLAGS} ${XRANDR_CFLAGS})
list(APPEND LIBS ${X11} ${XEXT} ${DL} ${SDL2_LIBRARIES} ${GTK_LIBRARIES} ${XRANDR_LIBRARIES})
if(USE_OPENGL)
pkg_check_modules(EPOXY REQUIRED epoxy)
list(APPEND ARGS ${EPOXY_CFLAGS})
list(APPEND LIBS ${EPOXY_LIBRARIES})
list(APPEND SOURCES src/gtk_display_driver_opengl.cpp
src/gtk_glx_context.cpp
../shaders/glsl.cpp
../shaders/shader_helpers.cpp
src/gtk_shader_parameters.cpp)
list(APPEND DEFINES "USE_OPENGL")
endif()
pkg_check_modules(EPOXY REQUIRED epoxy)
list(APPEND ARGS ${EPOXY_CFLAGS})
list(APPEND LIBS ${EPOXY_LIBRARIES})
list(APPEND SOURCES src/gtk_display_driver_opengl.cpp
src/gtk_glx_context.cpp
../shaders/glsl.cpp
../shaders/shader_helpers.cpp
src/gtk_shader_parameters.cpp)
if(USE_SLANG)
list(APPEND SOURCES ../shaders/slang.cpp)
......@@ -259,7 +255,6 @@ list(APPEND SOURCES
../stream.cpp
../conffile.cpp
../bsx.cpp
../logger.cpp
../snapshot.cpp
../screenshot.cpp
../movie.cpp
......@@ -325,4 +320,4 @@ install(FILES data/snes9x_32x32.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ico
install(FILES data/snes9x_64x64.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps RENAME snes9x.png)
install(FILES data/snes9x_128x128.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps RENAME snes9x.png)
install(FILES data/snes9x_256x256.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps RENAME snes9x.png)
install(FILES data/snes9x.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
\ No newline at end of file
install(FILES data/snes9x.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
......@@ -52,28 +52,18 @@ deps += dl_dep
xrandr_dep = dependency('xrandr')
deps += xrandr_dep
opengl = get_option('opengl')
if opengl
opengl_dep = dependency('epoxy', required: false)
if opengl_dep.found()
args += '-DUSE_OPENGL'
srcs += [ 'src/gtk_display_driver_opengl.cpp',
'src/gtk_display_driver_opengl.h',
'src/gtk_glx_context.cpp',
'src/gtk_glx_context.h',
'../shaders/glsl.cpp',
'../shaders/shader_helpers.cpp',
'src/gtk_shader_parameters.cpp' ]
deps += opengl_dep
else
opengl = false
warns += 'libepoxy not found. OpenGL will disabled.'
endif
endif
opengl_dep = dependency('epoxy', required: true)
srcs += [ 'src/gtk_display_driver_opengl.cpp',
'src/gtk_display_driver_opengl.h',
'src/gtk_glx_context.cpp',
'src/gtk_glx_context.h',
'../shaders/glsl.cpp',
'../shaders/shader_helpers.cpp',
'src/gtk_shader_parameters.cpp' ]
deps += opengl_dep
slang = get_option('slang')
if slang and opengl
if slang
cmake = import('cmake')
......@@ -323,7 +313,6 @@ srcs += [
'../stream.cpp',
'../conffile.cpp',
'../bsx.cpp',
'../logger.cpp',
'../snapshot.cpp',
'../screenshot.cpp',
'../movie.cpp',
......@@ -397,8 +386,7 @@ summary = [
' localedir: ' + localedir,
'[Options] Build type: ' + get_option('buildtype'),
' Wayland: ' + wayland.to_string(),
' OpenGL: ' + opengl.to_string(),
' slang shaders: ' + slang.to_string(),
' slang shaders: ' + slang.to_string(),
' XVideo: ' + xv.to_string(),
' ALSA: ' + alsa.to_string(),
' Open Sound System: ' + oss.to_string(),
......
option('opengl', type: 'boolean', value: true, description: 'Build support for OpenGL')
option('slang', type: 'boolean', value: true, description: 'Build support for slang-type shaders')
option('xv', type: 'boolean', value: true, description: 'Build support for XV')
option('portaudio', type: 'boolean', value: true, description: 'Build PortAudio sound driver')
......
......@@ -148,7 +148,6 @@ int Snes9xConfig::load_defaults()
rewind_buffer_size = 0;
Settings.Rewinding = false;
#ifdef USE_OPENGL
sync_to_vblank = true;
use_pbos = true;
pbo_format = 0;
......@@ -157,7 +156,6 @@ int Snes9xConfig::load_defaults()
shader_filename.clear();
use_glfinish = false;
use_sync_control = false;
#endif
/* Snes9x Variables */
Settings.MouseMaster = true;
......@@ -177,7 +175,6 @@ int Snes9xConfig::load_defaults()
Settings.StopEmulation = true;
Settings.FrameTimeNTSC = 16639;
Settings.FrameTimePAL = 20000;
Settings.SupportHiRes = true;
Settings.FrameTime = Settings.FrameTimeNTSC;
Settings.BlockInvalidVRAMAccessMaster = true;
Settings.SoundSync = false;
......@@ -256,7 +253,6 @@ int Snes9xConfig::save_config_file()
outbool("MergeFields", ntsc_setup.merge_fields);
outint("ScanlineIntensity", ntsc_scanline_intensity);
#ifdef USE_OPENGL
section = "OpenGL";
outbool("VSync", sync_to_vblank);
outbool("glFinish", use_glfinish);
......@@ -266,7 +262,6 @@ int Snes9xConfig::save_config_file()
outbool("UsePixelBufferObjects", use_pbos);
outint("PixelBufferObjectBitDepth", pbo_format);
outstring("ShaderFile", shader_filename);
#endif
section = "Sound";
outbool("MuteSound", mute_sound);
......@@ -490,7 +485,6 @@ int Snes9xConfig::load_config_file()
inbool("MergeFields", ntsc_setup.merge_fields);
inint("ScanlineIntensity", ntsc_scanline_intensity);
#ifdef USE_OPENGL
section = "OpenGL";
inbool("VSync", sync_to_vblank);
inbool("glFinish", use_glfinish);
......@@ -500,7 +494,6 @@ int Snes9xConfig::load_config_file()
inbool("UseNonPowerOfTwoTextures", npot_textures);
inbool("EnableCustomShaders", use_shaders);
instr("ShaderFile", shader_filename);
#endif
section = "Sound";
inbool("MuteSound", mute_sound);
......@@ -664,10 +657,8 @@ int Snes9xConfig::load_config_file()
scale_method = 0;
#endif /* USE_XBRZ */
#ifdef USE_OPENGL
if (pbo_format != 32)
pbo_format = 16;
#endif
if (Settings.SkipFrames == THROTTLE_SOUND_SYNC)
Settings.SoundSync = true;
......
......@@ -154,7 +154,6 @@ class Snes9xConfig
XRRScreenResources *xrr_screen_resources;
XRRCrtcInfo *xrr_crtc_info;
#ifdef USE_OPENGL
bool sync_to_vblank;
bool use_pbos;
int pbo_format;
......@@ -163,8 +162,6 @@ class Snes9xConfig
std::string shader_filename;
bool use_glfinish;
bool use_sync_control;
#endif
JoyDevices joysticks;
int joystick_threshold;
......
......@@ -23,9 +23,7 @@
#include "gtk_display_driver_xv.h"
#endif
#ifdef USE_OPENGL
#include "gtk_display_driver_opengl.h"
#endif
static S9xDisplayDriver *driver;
static snes_ntsc_t snes_ntsc;
......@@ -1299,11 +1297,7 @@ void S9xQueryDrivers()
gui_config->allow_xv = S9xXVDisplayDriver::query_availability();
#endif
#ifdef USE_OPENGL
gui_config->allow_opengl = S9xOpenGLDisplayDriver::query_availability();
#else
gui_config->allow_opengl = false;
#endif
gui_config->allow_xrandr = false;
#ifdef GDK_WINDOWING_X11
......@@ -1414,11 +1408,9 @@ static void S9xInitDriver()
switch (gui_config->hw_accel)
{
#ifdef USE_OPENGL
case HWA_OPENGL:
driver = new S9xOpenGLDisplayDriver(top_level, gui_config);
break;
#endif
#if defined(USE_XV) && defined(GDK_WINDOWING_X11)
case HWA_XV:
......@@ -1624,7 +1616,6 @@ static void S9xGTKDisplayString(const char *string, int linesFromBottom,
void S9xInitDisplay(int argc, char **argv)
{
Settings.SupportHiRes = true;
S9xBlit2xSaIFilterInit();
#ifdef USE_HQ2X
S9xBlitHQ2xFilterInit();
......
......@@ -28,7 +28,7 @@ const char *S9xGetFilenameInc(const char *e, enum s9x_getdirtype dirtype)
fs::path rom_filename(Memory.ROMFilename);
fs::path filename_base(S9xGetDirectory(dirtype));
filename_base.replace_filename(rom_filename.filename());
filename_base /= rom_filename.filename();
fs::path new_filename;
......@@ -120,7 +120,7 @@ const char *S9xGetFilename(const char *ex, enum s9x_getdirtype dirtype)
{
static std::string filename;
fs::path path(S9xGetDirectory(dirtype));
path.replace_filename(fs::path(Memory.ROMFilename));
path /= fs::path(Memory.ROMFilename).filename();
path.replace_extension(ex);
filename = path.string();
return filename.c_str();
......@@ -243,7 +243,7 @@ static fs::path save_slot_path(int slot)
while (extension.length() < 3)
extension = "0"s + extension;
fs::path path(S9xGetDirectory(SNAPSHOT_DIR));
path.replace_filename(fs::path(Memory.ROMFilename).filename());
path /= fs::path(Memory.ROMFilename).filename();
path.replace_extension(extension);
return path;
}
......
......@@ -333,7 +333,6 @@ bool Snes9xPreferences::key_pressed(GdkEventKey *event)
void Snes9xPreferences::shader_select()
{
#ifdef USE_OPENGL
auto entry = get_object<Gtk::Entry>("fragment_shader");
auto dialog = Gtk::FileChooserDialog(*window.get(), _("Select Shader File"));
......@@ -357,7 +356,6 @@ void Snes9xPreferences::shader_select()
if (!filename.empty())
entry->set_text(filename);
}
#endif
}
void Snes9xPreferences::load_ntsc_settings()
......@@ -467,7 +465,6 @@ void Snes9xPreferences::move_settings_to_dialog()
set_combo ("frameskip_combo", Settings.SkipFrames);
set_check ("bilinear_filter", Settings.BilinearFilter);
#ifdef USE_OPENGL
set_check ("sync_to_vblank", config->sync_to_vblank);
set_check ("use_glfinish", config->use_glfinish);
set_check ("use_sync_control", config->use_sync_control);
......@@ -476,7 +473,7 @@ void Snes9xPreferences::move_settings_to_dialog()
set_check ("npot_textures", config->npot_textures);
set_check ("use_shaders", config->use_shaders);
set_entry_text ("fragment_shader", config->shader_filename.c_str ());
#endif
set_spin ("joystick_threshold", config->joystick_threshold);
/* Control bindings */
......@@ -631,7 +628,6 @@ void Snes9xPreferences::get_settings_from_dialog()
Settings.InterpolationMethod = get_combo("sound_filter");
#endif
#ifdef USE_OPENGL
int pbo_format = get_combo("pixel_format") == 1 ? 32 : 16;
if (config->sync_to_vblank != get_check("sync_to_vblank") ||
......@@ -653,7 +649,6 @@ void Snes9xPreferences::get_settings_from_dialog()
config->use_sync_control = get_check("use_sync_control");
config->shader_filename = get_entry_text ("fragment_shader");
config->pbo_format = pbo_format;
#endif
std::string new_sram_directory = get_entry_text("sram_directory");
config->savestate_directory = get_entry_text("savestate_directory");
......
......@@ -18,7 +18,6 @@
#include "gfx.h"
#include "spc7110.h"
#include "controls.h"
#include "logger.h"
#include "cheats.h"
#include "movie.h"
#include "conffile.h"
......
......@@ -16,9 +16,7 @@
#include <X11/extensions/Xvlib.h>
#endif
#ifdef USE_OPENGL
#include "gtk_shader_parameters.h"
#endif
#include "gtk_s9x.h"
#include "gtk_preferences.h"
......@@ -99,13 +97,7 @@ Snes9xWindow::Snes9xWindow(Snes9xConfig *config)
gtk_widget_realize(GTK_WIDGET(window->gobj()));
gtk_widget_realize(GTK_WIDGET(drawing_area->gobj()));
#ifndef USE_OPENGL
get_object<Gtk::Widget>("shader_parameters_separator")->hide();
get_object<Gtk::Widget>("shader_parameters_item")->hide();
#else
enable_widget("shader_parameters_item", false);
#endif
connect_signals();
......@@ -180,11 +172,9 @@ void Snes9xWindow::connect_signals()
S9xReset();
});
#ifdef USE_OPENGL
get_object<Gtk::MenuItem>("shader_parameters_item")->signal_activate().connect([&] {
gtk_shader_parameters_dialog(get_window());
});
#endif
const std::vector<const char *> port_items = { "joypad1", "mouse1", "superscope1", "joypad2", "mouse2", "multitap2", "superscope2", "nothingpluggedin2" };
for (auto &name : port_items)
......
......@@ -36,7 +36,6 @@ SOURCES_CXX := $(CORE_DIR)/apu/apu.cpp \
$(CORE_DIR)/gfx.cpp \
$(CORE_DIR)/globals.cpp \
$(CORE_DIR)/loadzip.cpp \
$(CORE_DIR)/logger.cpp \
$(CORE_DIR)/memmap.cpp \
$(CORE_DIR)/obc1.cpp \
$(CORE_DIR)/msu1.cpp \
......
......@@ -221,7 +221,6 @@
<ClInclude Include="..\getset.h" />
<ClInclude Include="..\gfx.h" />
<ClInclude Include="..\language.h" />
<ClInclude Include="..\logger.h" />
<ClInclude Include="..\memmap.h" />
<ClInclude Include="..\messages.h" />
<ClInclude Include="..\missing.h" />
......@@ -285,7 +284,6 @@
<ClCompile Include="..\gfx.cpp" />
<ClCompile Include="..\globals.cpp" />
<ClCompile Include="..\loadzip.cpp" />
<ClCompile Include="..\logger.cpp" />
<ClCompile Include="..\memmap.cpp" />
<ClCompile Include="..\movie.cpp" />
<ClCompile Include="..\msu1.cpp" />
......
......@@ -81,9 +81,6 @@
<ClInclude Include="..\language.h">
<Filter>s9x-source</Filter>
</ClInclude>
<ClInclude Include="..\logger.h">
<Filter>s9x-source</Filter>
</ClInclude>
<ClInclude Include="..\memmap.h">
<Filter>s9x-source</Filter>
</ClInclude>
......@@ -266,9 +263,6 @@
<ClCompile Include="..\loadzip.cpp">
<Filter>s9x-source</Filter>
</ClCompile>
<ClCompile Include="..\logger.cpp">
<Filter>s9x-source</Filter>
</ClCompile>
<ClCompile Include="..\memmap.cpp">
<Filter>s9x-source</Filter>
</ClCompile>
......
......@@ -11,7 +11,6 @@
#include "controls.h"
#include "cheats.h"
#include "movie.h"
#include "logger.h"
#include "display.h"
#include "conffile.h"
#include "crosshairs.h"
......@@ -405,10 +404,6 @@ static void update_variables(void)
var.value=NULL;
Settings.Transparency=!(environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && !strcmp("disabled", var.value));
var.key="snes9x_gfx_hires";
var.value=NULL;
Settings.SupportHiRes=!(environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && !strcmp("disabled", var.value));
var.key="snes9x_audio_interpolation";
var.value=NULL;
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
......@@ -1435,7 +1430,6 @@ void retro_init(void)
Settings.Stereo = TRUE;
Settings.SoundPlaybackRate = 32040;
Settings.SoundInputRate = 32040;
Settings.SupportHiRes = TRUE;
Settings.Transparency = TRUE;
Settings.AutoDisplayMessages = TRUE;
Settings.InitialInfoStringTimeout = 120;
......
......@@ -124,20 +124,6 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"enabled"
},
{
"snes9x_gfx_hires",
"Enable Hi-Res Mode",
NULL,
"Allow games to switch to hi-res mode (512x448) or force all content to output at 256x224 (with crushed pixels).",
NULL,
NULL,
{
{ "enabled", NULL },
{ "disabled", NULL },
{ NULL, NULL },
},
"enabled"
},
{
"snes9x_hires_blend",
"Hi-Res Blending",
......
......@@ -144,18 +144,6 @@ struct retro_core_option_v2_definition option_defs_tr[] = {
},
NULL
},
{
"snes9x_gfx_hires",
"Hi-Res Modunu Etkinleştir",
NULL,
"Oyunların hi-res moduna (512x448) geçmesine izin verir veya tüm içeriği 256x224'te (ezilmiş piksellerle) çıkmaya zorlar.",
NULL,
NULL,
{
{ NULL, NULL },
},
NULL
},
{
"snes9x_hires_blend",
"Hi-Res Karışımı",
......
/*****************************************************************************\
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
This file is licensed under the Snes9x License.
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/
#include "snes9x.h"
#include "movie.h"
#include "logger.h"
static int resetno = 0;
static int framecounter = 0;
static FILE *video = NULL;
static FILE *audio = NULL;
void S9xResetLogger (void)
{
if (!Settings.DumpStreams)
return;
char buffer[128];
S9xCloseLogger();
framecounter = 0;
sprintf(buffer, "videostream%d.dat", resetno);
video = fopen(buffer, "wb");
if (!video)
{
printf("Opening %s failed. Logging cancelled.\n", buffer);
return;
}
sprintf(buffer, "audiostream%d.dat", resetno);
audio = fopen(buffer, "wb");
if (!audio)
{
printf("Opening %s failed. Logging cancelled.\n", buffer);
fclose(video);
return;
}
resetno++;
}
void S9xCloseLogger (void)
{
if (video)
{
fclose(video);
video = NULL;
}
if (audio)
{
fclose(audio);
audio = NULL;
}
}
void S9xVideoLogger (void *pixels, int width, int height, int depth, int bytes_per_line)