├── .cirrus.yml ├── .gitignore ├── .gitmodules ├── 65c816.h ├── LICENSE ├── README.md ├── appveyor.yml ├── apu ├── apu.cpp ├── apu.h ├── bapu │ ├── dsp │ │ ├── SPC_DSP.cpp │ │ ├── SPC_DSP.h │ │ ├── blargg_common.h │ │ ├── blargg_config.h │ │ ├── blargg_endian.h │ │ ├── blargg_source.h │ │ ├── sdsp.cpp │ │ └── sdsp.hpp │ ├── smp │ │ ├── algorithms.cpp │ │ ├── core.cpp │ │ ├── core │ │ │ ├── oppseudo_misc.cpp │ │ │ ├── oppseudo_mov.cpp │ │ │ ├── oppseudo_pc.cpp │ │ │ ├── oppseudo_read.cpp │ │ │ └── oppseudo_rmw.cpp │ │ ├── debugger │ │ │ ├── debugger.cpp │ │ │ ├── debugger.hpp │ │ │ └── disassembler.cpp │ │ ├── iplrom.cpp │ │ ├── memory.cpp │ │ ├── smp.cpp │ │ ├── smp.hpp │ │ ├── smp_state.cpp │ │ └── timing.cpp │ └── snes │ │ └── snes.hpp └── resampler.h ├── bml.cpp ├── bml.h ├── bsx.cpp ├── bsx.h ├── c4.cpp ├── c4.h ├── c4emu.cpp ├── cheats.cpp ├── cheats.h ├── cheats2.cpp ├── clip.cpp ├── common ├── audio │ ├── s9x_sound_driver.hpp │ ├── s9x_sound_driver_alsa.cpp │ ├── s9x_sound_driver_alsa.hpp │ ├── s9x_sound_driver_cubeb.cpp │ ├── s9x_sound_driver_cubeb.hpp │ ├── s9x_sound_driver_oss.cpp │ ├── s9x_sound_driver_oss.hpp │ ├── s9x_sound_driver_portaudio.cpp │ ├── s9x_sound_driver_portaudio.hpp │ ├── s9x_sound_driver_pulse.cpp │ ├── s9x_sound_driver_pulse.hpp │ ├── s9x_sound_driver_sdl.cpp │ ├── s9x_sound_driver_sdl.hpp │ ├── s9x_sound_driver_sdl3.cpp │ └── s9x_sound_driver_sdl3.hpp └── video │ ├── opengl │ ├── glx_context.cpp │ ├── glx_context.hpp │ ├── opengl_context.hpp │ ├── shaders │ │ ├── glsl.cpp │ │ ├── glsl.h │ │ ├── shader_helpers.cpp │ │ ├── shader_helpers.h │ │ ├── shader_platform.h │ │ └── slang.cpp │ ├── wayland_egl_context.cpp │ ├── wayland_egl_context.hpp │ ├── wgl_context.cpp │ └── wgl_context.hpp │ ├── std_chrono_throttle.cpp │ ├── std_chrono_throttle.hpp │ ├── vulkan │ ├── slang_helpers.cpp │ ├── slang_helpers.hpp │ ├── slang_preset.cpp │ ├── slang_preset.hpp │ ├── slang_preset_ini.cpp │ ├── slang_preset_ini.hpp │ ├── slang_preset_test.cpp │ ├── slang_shader.cpp │ ├── slang_shader.hpp │ ├── vk_mem_alloc_implementation.cpp │ ├── vulkan_common.cpp │ ├── vulkan_common.hpp │ ├── vulkan_context.cpp │ ├── vulkan_context.hpp │ ├── vulkan_hpp_storage.cpp │ ├── vulkan_hpp_wrapper.hpp │ ├── vulkan_pipeline_image.cpp │ ├── vulkan_pipeline_image.hpp │ ├── vulkan_shader_chain.cpp │ ├── vulkan_shader_chain.hpp │ ├── vulkan_simple_output.cpp │ ├── vulkan_simple_output.hpp │ ├── vulkan_slang_pipeline.cpp │ ├── vulkan_slang_pipeline.hpp │ ├── vulkan_swapchain.cpp │ ├── vulkan_swapchain.hpp │ ├── vulkan_texture.cpp │ └── vulkan_texture.hpp │ └── wayland │ ├── fractional-scale-v1.c │ ├── fractional-scale-v1.h │ ├── viewporter-client-protocol.c │ ├── viewporter-client-protocol.h │ ├── wayland-idle-inhibit-unstable-v1.c │ ├── wayland-idle-inhibit-unstable-v1.h │ ├── wayland_surface.cpp │ └── wayland_surface.hpp ├── conffile.cpp ├── conffile.h ├── controls.cpp ├── controls.h ├── cpu.cpp ├── cpuaddr.h ├── cpuexec.cpp ├── cpuexec.h ├── cpumacro.h ├── cpuops.cpp ├── cpuops.h ├── crosshairs.cpp ├── crosshairs.h ├── data └── cheats.bml ├── debug.cpp ├── debug.h ├── display.h ├── dma.cpp ├── dma.h ├── docs ├── changes.txt ├── control-inputs.txt ├── controls.txt ├── porting.html ├── portsofsnes9x.txt └── snapshots.txt ├── dsp.cpp ├── dsp.h ├── dsp1.cpp ├── dsp2.cpp ├── dsp3.cpp ├── dsp4.cpp ├── external ├── VulkanMemoryAllocator-Hpp │ ├── LICENSE │ └── include │ │ ├── vk_mem_alloc.h │ │ ├── vk_mem_alloc.hpp │ │ ├── vk_mem_alloc_enums.hpp │ │ ├── vk_mem_alloc_funcs.hpp │ │ ├── vk_mem_alloc_handles.hpp │ │ ├── vk_mem_alloc_raii.hpp │ │ └── vk_mem_alloc_structs.hpp ├── fmt │ ├── .clang-format │ ├── LICENSE.rst │ ├── include │ │ └── fmt │ │ │ ├── args.h │ │ │ ├── base.h │ │ │ ├── chrono.h │ │ │ ├── color.h │ │ │ ├── compile.h │ │ │ ├── format-inl.h │ │ │ ├── format.h │ │ │ ├── locale.h │ │ │ ├── os.h │ │ │ ├── ostream.h │ │ │ ├── printf.h │ │ │ ├── ranges.h │ │ │ ├── std.h │ │ │ └── xchar.h │ └── src │ │ └── format.cc ├── glad │ ├── include │ │ ├── EGL │ │ │ └── eglplatform.h │ │ ├── KHR │ │ │ └── khrplatform.h │ │ └── glad │ │ │ ├── egl.h │ │ │ ├── gl.h │ │ │ ├── glx.h │ │ │ └── wgl.h │ └── src │ │ ├── egl.c │ │ ├── gl.c │ │ ├── glx.c │ │ └── wgl.c ├── imgui │ ├── LICENSE.txt │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_demo.cpp │ ├── imgui_draw.cpp │ ├── imgui_impl_dx9.cpp │ ├── imgui_impl_dx9.h │ ├── imgui_impl_opengl3.cpp │ ├── imgui_impl_opengl3.h │ ├── imgui_impl_opengl3_loader.h │ ├── imgui_impl_vulkan.cpp │ ├── imgui_impl_vulkan.h │ ├── imgui_internal.h │ ├── imgui_tables.cpp │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ ├── imstb_truetype.h │ ├── snes9x_imgui.cpp │ ├── snes9x_imgui.h │ └── snes9x_imgui_noto.h └── stb │ ├── stb_image.h │ └── stb_image_implementation.cpp ├── filter ├── 2xsai.cpp ├── 2xsai.h ├── blit.cpp ├── blit.h ├── epx.cpp ├── epx.h ├── hq2x.cpp ├── hq2x.h ├── snes_ntsc-license.txt ├── snes_ntsc.c ├── snes_ntsc.h ├── snes_ntsc_config.h ├── snes_ntsc_impl.h ├── xbrz-license.txt ├── xbrz.cpp ├── xbrz.h ├── xbrz_config.h └── xbrz_tools.h ├── font.h ├── fscompat.cpp ├── fscompat.h ├── fxdbg.cpp ├── fxemu.cpp ├── fxemu.h ├── fxinst.cpp ├── fxinst.h ├── getset.h ├── gfx.cpp ├── gfx.h ├── globals.cpp ├── gtk ├── AUTHORS ├── CMakeLists.txt ├── data │ ├── meson.build │ ├── mini_icon.png │ ├── snes9x-gtk.desktop │ ├── snes9x.svg │ ├── snes9x_128x128.png │ ├── snes9x_16x16.png │ ├── snes9x_24x24.png │ ├── snes9x_256x256.png │ ├── snes9x_32x32.png │ └── snes9x_64x64.png ├── po │ ├── POTFILES.in │ ├── README.md │ ├── de.po │ ├── es.po │ ├── fr_FR.po │ ├── ja.po │ ├── pl.po │ ├── pt_BR.po │ ├── ru.po │ ├── snes9x-gtk.pot │ ├── sr@latin.po │ ├── sv.po │ ├── uk.po │ ├── updatepot.sh │ └── zh_CN.po ├── scripts │ └── makeappimage.sh └── src │ ├── background_particles.cpp │ ├── background_particles.h │ ├── filter_epx_unsafe.cpp │ ├── filter_epx_unsafe.h │ ├── filter_xbrz.cpp │ ├── filter_xbrz.h │ ├── gtk_binding.cpp │ ├── gtk_binding.h │ ├── gtk_builder_window.cpp │ ├── gtk_builder_window.h │ ├── gtk_cheat.cpp │ ├── gtk_cheat.h │ ├── gtk_compat.h │ ├── gtk_config.cpp │ ├── gtk_config.h │ ├── gtk_control.cpp │ ├── gtk_control.h │ ├── gtk_display.cpp │ ├── gtk_display.h │ ├── gtk_display_driver.h │ ├── gtk_display_driver_gtk.cpp │ ├── gtk_display_driver_gtk.h │ ├── gtk_display_driver_opengl.cpp │ ├── gtk_display_driver_opengl.h │ ├── gtk_display_driver_vulkan.cpp │ ├── gtk_display_driver_vulkan.h │ ├── gtk_display_driver_xv.cpp │ ├── gtk_display_driver_xv.h │ ├── gtk_file.cpp │ ├── gtk_file.h │ ├── gtk_icon.h │ ├── gtk_netplay.cpp │ ├── gtk_netplay.h │ ├── gtk_netplay_dialog.cpp │ ├── gtk_netplay_dialog.h │ ├── gtk_preferences.cpp │ ├── gtk_preferences.h │ ├── gtk_s9x.cpp │ ├── gtk_s9x.h │ ├── gtk_s9xcore.h │ ├── gtk_s9xwindow.cpp │ ├── gtk_s9xwindow.h │ ├── gtk_shader_parameters.cpp │ ├── gtk_shader_parameters.h │ ├── gtk_sound.cpp │ ├── gtk_sound.h │ ├── gtk_splash.cpp │ ├── snes9x.ui │ ├── sourcify.c │ ├── splash.png │ ├── threadpool.cpp │ └── threadpool.h ├── jma ├── 7z.h ├── 7zlzma.cpp ├── aribitcd.h ├── ariconst.h ├── ariprice.h ├── btreecd.h ├── crc32.cpp ├── crc32.h ├── iiostrm.cpp ├── iiostrm.h ├── inbyte.cpp ├── inbyte.h ├── jma.cpp ├── jma.h ├── lencoder.h ├── license.txt ├── litcoder.h ├── lzma.cpp ├── lzma.h ├── lzmadec.cpp ├── lzmadec.h ├── portable.h ├── rcdefs.h ├── rngcoder.h ├── s9x-jma.cpp ├── s9x-jma.h ├── winout.cpp └── winout.h ├── language.h ├── libretro ├── Makefile ├── Makefile.common ├── Tupfile ├── control ├── jni │ ├── Android.mk │ └── Application.mk ├── libretro-common │ └── include │ │ ├── compat │ │ ├── msvc.h │ │ └── msvc │ │ │ └── stdint.h │ │ └── retro_inline.h ├── libretro-win32.vcxproj ├── libretro-win32.vcxproj.filters ├── libretro.cpp ├── libretro.def ├── libretro.h ├── libretro_core_options.h ├── libretro_core_options_intl.h ├── link.T └── msvc │ ├── msvc-2010.bat │ ├── msvc-2010.sln │ ├── msvc-2010 │ ├── libretro.def │ ├── msvc-2010.vcxproj │ └── msvc-2010.vcxproj.filters │ ├── msvc-2017.sln │ └── msvc-2017 │ ├── libretro.def │ ├── msvc-2017.vcxproj │ └── msvc-2017.vcxproj.filters ├── loadzip.cpp ├── macosx ├── .gitignore ├── APPL.icns ├── CART.icns ├── HID_Utilities_External.h ├── Info.plist ├── ReClassicfication │ ├── EndianStuff.h │ ├── FakeHandles.c │ ├── FakeHandles.h │ ├── FakeResources.c │ └── FakeResources.h ├── SAVE.icns ├── SRAM.icns ├── Snes9x │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── APPL-32.png │ │ │ ├── APPL.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── display.imageset │ │ │ ├── Contents.json │ │ │ ├── display.png │ │ │ └── display@2x.png │ │ ├── emulation.imageset │ │ │ ├── Contents.json │ │ │ ├── emulation.png │ │ │ └── emulation@2x.png │ │ ├── files.imageset │ │ │ ├── Contents.json │ │ │ ├── files.png │ │ │ └── files@2x.png │ │ ├── gamepad.imageset │ │ │ ├── Contents.json │ │ │ ├── gamepad.png │ │ │ └── gamepad@2x.png │ │ └── sound.imageset │ │ │ ├── Contents.json │ │ │ ├── sound.png │ │ │ └── sound@2x.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Cheats │ │ ├── S9xCheatEditViewController.h │ │ ├── S9xCheatEditViewController.m │ │ ├── S9xCheatEditViewController.xib │ │ ├── S9xCheatFinderViewController.h │ │ ├── S9xCheatFinderViewController.m │ │ ├── S9xCheatFinderViewController.xib │ │ ├── S9xCheatsViewController.h │ │ ├── S9xCheatsViewController.m │ │ ├── S9xCheatsViewController.xib │ │ ├── S9xHexNumberFormatter.h │ │ └── S9xHexNumberFormatter.m │ ├── Info.plist │ ├── S9xApplication.h │ ├── S9xApplication.m │ ├── S9xOpenMultipleViewController.h │ ├── S9xOpenMultipleViewController.m │ ├── S9xOpenMultipleViewController.xib │ ├── S9xPreferences │ │ ├── S9xButtonConfigTextField.h │ │ ├── S9xButtonConfigTextField.m │ │ ├── S9xControlsPreferencesViewController.h │ │ ├── S9xControlsPreferencesViewController.m │ │ ├── S9xControlsPreferencesViewController.xib │ │ ├── S9xDisplayPreferencesViewController.h │ │ ├── S9xDisplayPreferencesViewController.m │ │ ├── S9xDisplayPreferencesViewController.xib │ │ ├── S9xEmulationPreferencesViewController.h │ │ ├── S9xEmulationPreferencesViewController.m │ │ ├── S9xEmulationPreferencesViewController.xib │ │ ├── S9xFilesPreferencesViewController.h │ │ ├── S9xFilesPreferencesViewController.m │ │ ├── S9xFilesPreferencesViewController.xib │ │ ├── S9xGamepadPreferencesViewController.m │ │ ├── S9xPreferencesConstants.h │ │ ├── S9xPreferencesConstants.m │ │ ├── S9xPreferencesTabViewController.h │ │ ├── S9xPreferencesTabViewController.m │ │ ├── S9xPreferencesViewController.h │ │ ├── S9xPreferencesViewController.m │ │ ├── S9xPreferencesWindowController.h │ │ ├── S9xPreferencesWindowController.m │ │ ├── S9xPreferencesWindowController.xib │ │ ├── S9xSoundPreferencesViewController.h │ │ ├── S9xSoundPreferencesViewController.m │ │ └── S9xSoundPreferencesViewController.xib │ ├── S9xPrefsConstants.m │ ├── Snes9x.entitlements │ ├── Snes9xDebug.entitlements │ └── main.m ├── docs │ ├── FAQ.rtf │ └── readme-mac.txt ├── en.lproj │ ├── InfoPlist.strings │ ├── Localizable.strings │ ├── Snes9x Help │ │ ├── Snes9x Help.helpindex │ │ ├── gfx │ │ │ ├── s9xic128.png │ │ │ └── s9xic16.png │ │ ├── index.html │ │ ├── pgs │ │ │ ├── 01.html │ │ │ ├── 02.html │ │ │ ├── 03.html │ │ │ ├── 04.html │ │ │ ├── 05.html │ │ │ ├── 06.html │ │ │ ├── 07.html │ │ │ ├── 08.html │ │ │ ├── 09.html │ │ │ ├── 10.html │ │ │ ├── 11.html │ │ │ ├── 12.html │ │ │ ├── 13.html │ │ │ ├── 14.html │ │ │ └── 15.html │ │ └── sty │ │ │ ├── style.css │ │ │ └── top.css │ ├── Snes9x.xib │ └── musicbox.xib ├── folder_Freezes.icns ├── folder_SRAMs.icns ├── freeze_defrost.aiff ├── icons.png ├── libHIDUtilities_u.a ├── libz_u.a ├── logo_defrost.png ├── logo_freeze.png ├── mac-audio.h ├── mac-audio.mm ├── mac-cart.h ├── mac-cart.mm ├── mac-cheat.h ├── mac-cheat.mm ├── mac-client.h ├── mac-client.mm ├── mac-cocoatools.h ├── mac-cocoatools.mm ├── mac-controls.h ├── mac-controls.mm ├── mac-dialog.h ├── mac-dialog.mm ├── mac-file.h ├── mac-file.mm ├── mac-global_prefix.h ├── mac-gworld.h ├── mac-gworld.mm ├── mac-joypad.h ├── mac-joypad.mm ├── mac-keyboard.h ├── mac-keyboard.mm ├── mac-musicbox.h ├── mac-musicbox.mm ├── mac-netplay.h ├── mac-netplay.mm ├── mac-os.h ├── mac-os.mm ├── mac-prefix.h ├── mac-quicktime.h ├── mac-quicktime.mm ├── mac-render.h ├── mac-render.mm ├── mac-screenshot.h ├── mac-screenshot.mm ├── mac-server.h ├── mac-server.mm ├── mac-snes9x.h ├── mac-snes9x.mm ├── mac-stringtools.h ├── mac-stringtools.mm ├── musicbox_effect.png ├── musicbox_indicator.png ├── musicbox_ledoff.icns ├── musicbox_ledon.icns ├── musicbox_pause.png ├── musicbox_rewind.png ├── shaders.metal ├── snes9x framework │ ├── Info.plist │ ├── gamecontrollerdb.txt │ └── snes9x_framework.h ├── snes9x.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── buckley.xcuserdatad │ │ │ └── IDEFindNavigatorScopes.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── snes9x.xcscheme ├── zconf.h └── zlib.h ├── memmap.cpp ├── memmap.h ├── messages.h ├── missing.h ├── movie.cpp ├── movie.h ├── msu1.cpp ├── msu1.h ├── netplay.cpp ├── netplay.h ├── obc1.cpp ├── obc1.h ├── pixform.h ├── port.h ├── ppu.cpp ├── ppu.h ├── qt ├── CMakeLists.txt ├── scripts │ ├── cmake-qt-base.sh │ ├── cmake-qt-other.sh │ └── cmake-qt-tools.sh └── src │ ├── BindingPanel.cpp │ ├── BindingPanel.hpp │ ├── CheatsDialog.cpp │ ├── CheatsDialog.hpp │ ├── CheatsDialog.ui │ ├── ControllerPanel.cpp │ ├── ControllerPanel.hpp │ ├── ControllerPanel.ui │ ├── DisplayPanel.cpp │ ├── DisplayPanel.hpp │ ├── DisplayPanel.ui │ ├── EmuApplication.cpp │ ├── EmuApplication.hpp │ ├── EmuBinding.cpp │ ├── EmuBinding.hpp │ ├── EmuCanvas.cpp │ ├── EmuCanvas.hpp │ ├── EmuCanvasOpenGL.cpp │ ├── EmuCanvasOpenGL.hpp │ ├── EmuCanvasQt.cpp │ ├── EmuCanvasQt.hpp │ ├── EmuCanvasVulkan.cpp │ ├── EmuCanvasVulkan.hpp │ ├── EmuConfig.cpp │ ├── EmuConfig.hpp │ ├── EmuMainWindow.cpp │ ├── EmuMainWindow.hpp │ ├── EmuSettingsWindow.cpp │ ├── EmuSettingsWindow.hpp │ ├── EmuSettingsWindow.ui │ ├── EmulationPanel.cpp │ ├── EmulationPanel.hpp │ ├── EmulationPanel.ui │ ├── FoldersPanel.cpp │ ├── FoldersPanel.hpp │ ├── FoldersPanel.ui │ ├── GeneralPanel.cpp │ ├── GeneralPanel.hpp │ ├── GeneralPanel.ui │ ├── SDLInputManager.cpp │ ├── SDLInputManager.hpp │ ├── ShaderParametersDialog.cpp │ ├── ShaderParametersDialog.hpp │ ├── ShortcutsPanel.cpp │ ├── ShortcutsPanel.hpp │ ├── ShortcutsPanel.ui │ ├── Snes9xController.cpp │ ├── Snes9xController.hpp │ ├── SoftwareScalers.cpp │ ├── SoftwareScalers.hpp │ ├── SoundPanel.cpp │ ├── SoundPanel.hpp │ ├── SoundPanel.ui │ ├── main.cpp │ └── resources │ ├── blackicons │ ├── a.svg │ ├── b.svg │ ├── display.svg │ ├── down.svg │ ├── emulation.svg │ ├── exit.svg │ ├── folders.svg │ ├── fullscreen.svg │ ├── joypad.svg │ ├── key.svg │ ├── keyboard.svg │ ├── l.svg │ ├── left.svg │ ├── open.svg │ ├── pause.svg │ ├── play.svg │ ├── r.svg │ ├── refresh.svg │ ├── reset.svg │ ├── right.svg │ ├── save.svg │ ├── select.svg │ ├── settings.svg │ ├── shader.svg │ ├── sound.svg │ ├── start.svg │ ├── up.svg │ ├── x.svg │ └── y.svg │ ├── snes9x-qt.exe.manifest │ ├── snes9x.ico │ ├── snes9x.qrc │ ├── snes9x.svg │ ├── snes9x_win32.rc │ ├── untitled.ui │ └── whiteicons │ ├── a.svg │ ├── b.svg │ ├── display.svg │ ├── down.svg │ ├── emulation.svg │ ├── exit.svg │ ├── folders.svg │ ├── fullscreen.svg │ ├── joypad.svg │ ├── key.svg │ ├── keyboard.svg │ ├── l.svg │ ├── left.svg │ ├── open.svg │ ├── pause.svg │ ├── play.svg │ ├── r.svg │ ├── refresh.svg │ ├── reset.svg │ ├── right.svg │ ├── save.svg │ ├── select.svg │ ├── settings.svg │ ├── shader.svg │ ├── sound.svg │ ├── start.svg │ ├── up.svg │ ├── x.svg │ └── y.svg ├── sa1.cpp ├── sa1.h ├── sa1cpu.cpp ├── sar.h ├── screenshot.cpp ├── screenshot.h ├── sdd1.cpp ├── sdd1.h ├── sdd1emu.cpp ├── sdd1emu.h ├── server.cpp ├── seta.cpp ├── seta.h ├── seta010.cpp ├── seta011.cpp ├── seta018.cpp ├── sha256.cpp ├── sha256.h ├── snapshot.cpp ├── snapshot.h ├── snes9x.cpp ├── snes9x.h ├── spc7110.cpp ├── spc7110.h ├── spc7110dec.cpp ├── spc7110dec.h ├── spc7110emu.cpp ├── spc7110emu.h ├── srtc.cpp ├── srtc.h ├── srtcemu.cpp ├── srtcemu.h ├── statemanager.cpp ├── statemanager.h ├── stream.cpp ├── stream.h ├── tile.cpp ├── tile.h ├── tileimpl-h2x1.cpp ├── tileimpl-n1x1.cpp ├── tileimpl-n2x1.cpp ├── tileimpl.h ├── unix ├── Makefile.in ├── aclocal.m4 ├── config.guess ├── config.sub ├── configure ├── configure.ac ├── docs │ └── readme_unix.html ├── install-sh ├── snes9x.conf.default ├── unix.cpp └── x11.cpp ├── unzip ├── crypt.h ├── ioapi.c ├── ioapi.h ├── iowin32.c ├── iowin32.h ├── miniunz.c ├── minizip.c ├── mztools.c ├── mztools.h ├── skipset.h ├── unzip.c ├── unzip.h ├── zip.c └── zip.h ├── var8x10font.h └── win32 ├── AVIOutput.cpp ├── AVIOutput.h ├── CCGShader.cpp ├── CCGShader.h ├── CD3DCG.cpp ├── CD3DCG.h ├── CDirect3D.cpp ├── CDirect3D.h ├── CDirectDraw.cpp ├── CDirectDraw.h ├── CGLCG.cpp ├── CGLCG.h ├── COpenGL.cpp ├── COpenGL.h ├── CSaveLoadWithPreviewDlg.cpp ├── CSaveLoadWithPreviewDlg.h ├── CShaderParamDlg.cpp ├── CShaderParamDlg.h ├── CVulkan.cpp ├── CVulkan.h ├── CWaveOut.cpp ├── CWaveOut.h ├── CXAudio2.cpp ├── CXAudio2.h ├── DumpAtEnd.cpp ├── IS9xDisplayOutput.h ├── IS9xSoundOutput.h ├── InputCustom.cpp ├── InputCustom.h ├── _tfwopen.cpp ├── _tfwopen.h ├── cgFunctions.cpp ├── cgFunctions.h ├── cgMini.h ├── ddraw ├── ddraw_x64.lib └── ddraw_x86.lib ├── docs ├── faqs-windows.txt ├── how2compile.txt └── readme-windows.txt ├── dxerr.cpp ├── dxerr.h ├── gl_core_3_1.c ├── gl_core_3_1.h ├── glslang ├── SPIRV │ ├── SPIRV.vcxproj │ ├── SPIRV.vcxproj.filters │ ├── SPVRemapper.vcxproj │ └── SPVRemapper.vcxproj.filters ├── build_info.h ├── glslang │ ├── OSDependent │ │ └── Windows │ │ │ ├── OSDependent.vcxproj │ │ │ └── OSDependent.vcxproj.filters │ ├── glslang.vcxproj │ └── glslang.vcxproj.filters └── hlsl │ ├── HLSL.vcxproj │ └── HLSL.vcxproj.filters ├── image_functions.cpp ├── image_functions.h ├── libpng ├── libpng.sln ├── libpng.vcxproj └── libpng.vcxproj.filters ├── objfix.c ├── render.cpp ├── render.h ├── rsrc ├── bitmap2.bmp ├── cdd.bmp ├── closedfold.bmp ├── hd.bmp ├── hiddir.bmp ├── icon1.ico ├── icon2.ico ├── icon3.ico ├── icon4.ico ├── nd.bmp ├── nodrop.cur ├── openfold.bmp ├── pad.bmp ├── ram.bmp ├── rd.bmp ├── resource.h ├── rodir.bmp ├── snes9x.rc └── ud.bmp ├── s9x.props ├── snes9xw.sln ├── snes9xw.vcxproj ├── snes9xw.vcxproj.filters ├── wconfig.cpp ├── wglext.h ├── win32.cpp ├── win32_display.cpp ├── win32_display.h ├── win32_sound.cpp ├── win32_sound.h ├── wlanguage.h ├── wsnes9x.cpp ├── wsnes9x.h └── zlib ├── zlib.sln ├── zlib.vcxproj └── zlib.vcxproj.filters /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "win32/libpng/src"] 2 | path = win32/libpng/src 3 | url = https://git.code.sf.net/p/libpng/code 4 | [submodule "win32/zlib/src"] 5 | path = win32/zlib/src 6 | url = https://github.com/madler/zlib.git 7 | [submodule "shaders/SPIRV-Cross"] 8 | path = external/SPIRV-Cross 9 | url = https://github.com/KhronosGroup/SPIRV-Cross.git 10 | [submodule "shaders/glslang"] 11 | path = external/glslang 12 | url = https://github.com/KhronosGroup/glslang.git 13 | [submodule "external/vulkan-headers"] 14 | path = external/vulkan-headers 15 | url = https://github.com/KhronosGroup/Vulkan-Headers.git 16 | [submodule "external/cubeb"] 17 | path = external/cubeb 18 | url = https://github.com/mozilla/cubeb.git 19 | -------------------------------------------------------------------------------- /apu/bapu/dsp/blargg_config.h: -------------------------------------------------------------------------------- 1 | // snes_spc 0.9.0 user configuration file. Don't replace when updating library. 2 | 3 | // snes_spc 0.9.0 4 | #ifndef BLARGG_CONFIG_H 5 | #define BLARGG_CONFIG_H 6 | 7 | // Uncomment to disable debugging checks 8 | #if !defined(DEBUGGER) && !defined(_DEBUG) 9 | #define NDEBUG 1 10 | #endif 11 | 12 | // Uncomment to enable platform-specific (and possibly non-portable) optimizations 13 | #if !defined(__CELLOS_LV2__) 14 | #define BLARGG_NONPORTABLE 1 15 | #endif 16 | 17 | // Uncomment if automatic byte-order determination doesn't work 18 | //#define BLARGG_BIG_ENDIAN 1 19 | 20 | // Uncomment if you get errors in the bool section of blargg_common.h 21 | //#define BLARGG_COMPILER_HAS_BOOL 1 22 | 23 | // Use standard config.h if present 24 | #ifdef HAVE_CONFIG_H 25 | #include "config.h" 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /apu/bapu/dsp/sdsp.cpp: -------------------------------------------------------------------------------- 1 | #include "../snes/snes.hpp" 2 | 3 | #define DSP_CPP 4 | namespace SNES { 5 | 6 | DSP dsp; 7 | 8 | #include "SPC_DSP.cpp" 9 | 10 | void DSP::power() 11 | { 12 | spc_dsp.init(smp.apuram); 13 | spc_dsp.reset(); 14 | clock = 0; 15 | } 16 | 17 | void DSP::reset() 18 | { 19 | spc_dsp.soft_reset(); 20 | clock = 0; 21 | } 22 | 23 | static void from_dsp_to_state (uint8 **buf, void *var, size_t size) 24 | { 25 | memcpy(*buf, var, size); 26 | *buf += size; 27 | } 28 | 29 | static void to_dsp_from_state (uint8 **buf, void *var, size_t size) 30 | { 31 | memcpy(var, *buf, size); 32 | *buf += size; 33 | } 34 | 35 | void DSP::save_state (uint8 **ptr) 36 | { 37 | spc_dsp.copy_state(ptr, from_dsp_to_state); 38 | } 39 | 40 | void DSP::load_state (uint8 **ptr) 41 | { 42 | spc_dsp.copy_state(ptr, to_dsp_from_state); 43 | } 44 | 45 | DSP::DSP() 46 | { 47 | clock = 0; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /apu/bapu/dsp/sdsp.hpp: -------------------------------------------------------------------------------- 1 | #include "SPC_DSP.h" 2 | #include 3 | 4 | class DSP : public Processor { 5 | public: 6 | inline uint8 read(uint8 addr) { 7 | synchronize (); 8 | return spc_dsp.read(addr); 9 | } 10 | 11 | inline void synchronize (void) { 12 | if (clock) { 13 | spc_dsp.run (clock); 14 | clock = 0; 15 | } 16 | } 17 | 18 | inline void write(uint8 addr, uint8 data) { 19 | synchronize (); 20 | spc_dsp.write(addr, data); 21 | } 22 | 23 | void save_state(uint8 **); 24 | void load_state(uint8 **); 25 | 26 | void power(); 27 | void reset(); 28 | 29 | DSP(); 30 | 31 | SPC_DSP spc_dsp; 32 | }; 33 | 34 | extern DSP dsp; 35 | -------------------------------------------------------------------------------- /apu/bapu/smp/debugger/debugger.hpp: -------------------------------------------------------------------------------- 1 | class SMPDebugger : public SMP, public ChipDebugger { 2 | public: 3 | bool property(unsigned id, string &name, string &value); 4 | 5 | function step_event; 6 | 7 | enum Usage { 8 | UsageRead = 0x80, 9 | UsageWrite = 0x40, 10 | UsageExec = 0x20, 11 | }; 12 | uint8 *usage; 13 | uint16 opcode_pc; 14 | bool opcode_edge; 15 | 16 | void op_step(); 17 | uint8 op_read(uint16 addr); 18 | void op_write(uint16 addr, uint8 data); 19 | 20 | SMPDebugger(); 21 | ~SMPDebugger(); 22 | 23 | //disassembler 24 | void disassemble_opcode(char *output, uint16 addr); 25 | inline uint8 disassemble_read(uint16 addr); 26 | inline uint16 relb(int8 offset, int op_len); 27 | }; 28 | -------------------------------------------------------------------------------- /apu/bapu/smp/timing.cpp: -------------------------------------------------------------------------------- 1 | template 2 | void SMP::Timer::tick() { 3 | if(++stage1_ticks < cycle_frequency) return; 4 | 5 | stage1_ticks = 0; 6 | if(enable == false) return; 7 | 8 | if(++stage2_ticks != target) return; 9 | 10 | stage2_ticks = 0; 11 | stage3_ticks = (stage3_ticks + 1) & 15; 12 | } 13 | 14 | template 15 | void SMP::Timer::tick(unsigned clocks) { 16 | stage1_ticks += clocks; 17 | if(stage1_ticks < cycle_frequency) return; 18 | 19 | stage1_ticks -= cycle_frequency; 20 | if(enable == false) return; 21 | 22 | if(++stage2_ticks != target) return; 23 | 24 | stage2_ticks = 0; 25 | stage3_ticks = (stage3_ticks + 1) & 15; 26 | } 27 | -------------------------------------------------------------------------------- /apu/bapu/snes/snes.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __SNES_HPP 2 | #define __SNES_HPP 3 | 4 | #include "../../../snes9x.h" 5 | #include "../../resampler.h" 6 | #include "../../../msu1.h" 7 | 8 | #define debugvirtual 9 | 10 | namespace SNES 11 | { 12 | 13 | struct Processor 14 | { 15 | unsigned frequency; 16 | int32 clock; 17 | }; 18 | 19 | #include "../smp/smp.hpp" 20 | #include "../dsp/sdsp.hpp" 21 | 22 | class CPU 23 | { 24 | public: 25 | uint8 registers[4]; 26 | 27 | inline void reset () 28 | { 29 | registers[0] = registers[1] = registers[2] = registers[3] = 0; 30 | } 31 | 32 | alwaysinline void port_write (uint8 port, uint8 data) 33 | { 34 | registers[port & 3] = data; 35 | } 36 | 37 | alwaysinline uint8 port_read (uint8 port) 38 | { 39 | return registers[port & 3]; 40 | } 41 | }; 42 | 43 | extern CPU cpu; 44 | 45 | } // namespace SNES 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /bml.h: -------------------------------------------------------------------------------- 1 | #ifndef __BML_H 2 | #define __BML_H 3 | #include 4 | #include 5 | #include 6 | 7 | struct bml_node 8 | { 9 | enum node_type { 10 | CHILD, 11 | ATTRIBUTE 12 | }; 13 | 14 | bml_node(); 15 | bool parse_file(std::string filename); 16 | void parse(std::ifstream &fd); 17 | bml_node *find_subnode(std::string name); 18 | void print(); 19 | 20 | std::string name; 21 | std::string data; 22 | int depth; 23 | std::vector child; 24 | node_type type; 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /c4.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _C4_H_ 8 | #define _C4_H_ 9 | 10 | extern int16 C4WFXVal; 11 | extern int16 C4WFYVal; 12 | extern int16 C4WFZVal; 13 | extern int16 C4WFX2Val; 14 | extern int16 C4WFY2Val; 15 | extern int16 C4WFDist; 16 | extern int16 C4WFScale; 17 | extern int16 C41FXVal; 18 | extern int16 C41FYVal; 19 | extern int16 C41FAngleRes; 20 | extern int16 C41FDist; 21 | extern int16 C41FDistVal; 22 | 23 | void C4TransfWireFrame (void); 24 | void C4TransfWireFrame2 (void); 25 | void C4CalcWireFrame (void); 26 | void C4Op0D (void); 27 | void C4Op15 (void); 28 | void C4Op1F (void); 29 | void S9xInitC4 (void); 30 | void S9xSetC4 (uint8, uint16); 31 | uint8 S9xGetC4 (uint16); 32 | uint8 * S9xGetBasePointerC4 (uint16); 33 | uint8 * S9xGetMemPointerC4 (uint16); 34 | 35 | static inline uint8 * C4GetMemPointer (uint32 Address) 36 | { 37 | return (Memory.ROM + ((Address & 0xff0000) >> 1) + (Address & 0x7fff)); 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_HPP 8 | #define __S9X_SOUND_DRIVER_HPP 9 | 10 | #include 11 | #include 12 | 13 | class S9xSoundDriver 14 | { 15 | public: 16 | virtual ~S9xSoundDriver() 17 | { 18 | } 19 | virtual bool write_samples(int16_t *data, int samples) = 0; 20 | virtual int space_free() = 0; 21 | virtual std::pair buffer_level() = 0; 22 | virtual void init() = 0; 23 | virtual void deinit() = 0; 24 | virtual bool open_device(int playback_rate, int buffer_size) = 0; 25 | virtual void start() = 0; 26 | virtual void stop() = 0; 27 | }; 28 | 29 | #endif /* __S9X_SOUND_DRIVER_HPP */ 30 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_alsa.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_ALSA_HPP 8 | #define __S9X_SOUND_DRIVER_ALSA_HPP 9 | 10 | #include "s9x_sound_driver.hpp" 11 | #include "alsa/asoundlib.h" 12 | 13 | class S9xAlsaSoundDriver : public S9xSoundDriver 14 | { 15 | public: 16 | S9xAlsaSoundDriver(); 17 | void init() override; 18 | void deinit() override; 19 | bool open_device(int playback_rate, int buffer_size_ms) override; 20 | void start() override; 21 | void stop() override; 22 | bool write_samples(int16_t *data, int samples) override; 23 | int space_free() override; 24 | std::pair buffer_level() override; 25 | 26 | private: 27 | snd_pcm_t *pcm; 28 | int output_buffer_size_bytes; 29 | }; 30 | 31 | #endif /* __S9X_SOUND_DRIVER_ALSA_HPP */ 32 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_cubeb.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_CUBEB_HPP 8 | #define __S9X_SOUND_DRIVER_CUBEB_HPP 9 | 10 | #include "s9x_sound_driver.hpp" 11 | #include 12 | #include "cubeb/cubeb.h" 13 | #include "../../apu/resampler.h" 14 | 15 | class S9xCubebSoundDriver : public S9xSoundDriver 16 | { 17 | public: 18 | S9xCubebSoundDriver(); 19 | ~S9xCubebSoundDriver(); 20 | void init() override; 21 | void deinit() override; 22 | bool open_device(int playback_rate, int buffer_size) override; 23 | void start() override; 24 | void stop() override; 25 | long data_callback(cubeb_stream *stream, void const *input_buffer, void *output_buffer, long nframes); 26 | bool write_samples(int16_t *data, int samples) override; 27 | int space_free() override; 28 | std::pair buffer_level() override; 29 | 30 | private: 31 | Resampler buffer; 32 | cubeb *context = nullptr; 33 | cubeb_stream *stream = nullptr; 34 | }; 35 | 36 | #endif /* __S9X_SOUND_DRIVER_SDL_HPP */ 37 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_oss.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_OSS_HPP 8 | #define __S9X_SOUND_DRIVER_OSS_HPP 9 | 10 | #include "s9x_sound_driver.hpp" 11 | 12 | class S9xOSSSoundDriver : public S9xSoundDriver 13 | { 14 | public: 15 | S9xOSSSoundDriver(); 16 | void init() override; 17 | void deinit() override; 18 | bool open_device(int playback_rate, int buffer_size_ms) override; 19 | void start() override; 20 | void stop() override; 21 | bool write_samples(int16_t *data, int samples) override; 22 | int space_free() override; 23 | std::pair buffer_level() override; 24 | 25 | private: 26 | int filedes; 27 | int output_buffer_size_bytes; 28 | }; 29 | 30 | #endif /* __S9X_SOUND_DRIVER_OSS_HPP */ 31 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_portaudio.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_PORTAUDIO_HPP 8 | #define __S9X_SOUND_DRIVER_PORTAUDIO_HPP 9 | 10 | #include 11 | #include 12 | 13 | #include "s9x_sound_driver.hpp" 14 | 15 | class S9xPortAudioSoundDriver : public S9xSoundDriver 16 | { 17 | public: 18 | S9xPortAudioSoundDriver(); 19 | ~S9xPortAudioSoundDriver(); 20 | void init() override; 21 | void deinit() override; 22 | bool open_device(int playback_rate, int buffer_size) override; 23 | void start() override; 24 | void stop() override; 25 | bool write_samples(int16_t *data, int samples) override; 26 | int space_free() override; 27 | std::pair buffer_level() override; 28 | void samples_available(); 29 | bool tryHostAPI(int index); 30 | 31 | private: 32 | PaStream *audio_stream; 33 | int playback_rate; 34 | int buffer_size_ms; 35 | int output_buffer_size; 36 | }; 37 | 38 | #endif /* __S9X_SOUND_DRIVER_PORTAUDIO_HPP */ 39 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_pulse.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_PULSE_HPP 8 | #define __S9X_SOUND_DRIVER_PULSE_HPP 9 | 10 | #include "s9x_sound_driver.hpp" 11 | #include "pulse/pulseaudio.h" 12 | 13 | class S9xPulseSoundDriver : public S9xSoundDriver 14 | { 15 | public: 16 | S9xPulseSoundDriver(); 17 | void init() override; 18 | void deinit() override; 19 | bool write_samples(int16_t *data, int samples) override; 20 | bool open_device(int playback_rate, int buffer_size) override; 21 | void start() override; 22 | void stop() override; 23 | int space_free() override; 24 | std::pair buffer_level() override; 25 | pa_threaded_mainloop *mainloop; 26 | pa_context *context; 27 | pa_stream *stream; 28 | 29 | private: 30 | void lock(); 31 | void unlock(); 32 | void wait(); 33 | 34 | int buffer_size; 35 | bool draining = false; 36 | }; 37 | 38 | #endif /* __S9X_SOUND_DRIVER_PULSE_HPP */ 39 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_sdl.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_SDL_HPP 8 | #define __S9X_SOUND_DRIVER_SDL_HPP 9 | 10 | #include "SDL.h" 11 | // SDL.h may include altivec.h which redefines vector and bool 12 | #undef vector 13 | #undef bool 14 | 15 | #include "s9x_sound_driver.hpp" 16 | #include "../../apu/resampler.h" 17 | 18 | #include 19 | #include 20 | 21 | class S9xSDLSoundDriver : public S9xSoundDriver 22 | { 23 | public: 24 | S9xSDLSoundDriver(); 25 | ~S9xSDLSoundDriver(); 26 | void init() override; 27 | void deinit() override; 28 | bool open_device(int playback_rate, int buffer_size) override; 29 | void start() override; 30 | void stop() override; 31 | bool write_samples(int16_t *data, int samples) override; 32 | int space_free() override; 33 | std::pair buffer_level() override; 34 | 35 | private: 36 | void mix(unsigned char *output, int bytes); 37 | 38 | SDL_AudioSpec audiospec; 39 | Resampler buffer; 40 | std::mutex mutex; 41 | int16_t temp[512]; 42 | }; 43 | 44 | #endif /* __S9X_SOUND_DRIVER_SDL_HPP */ 45 | -------------------------------------------------------------------------------- /common/audio/s9x_sound_driver_sdl3.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __S9X_SOUND_DRIVER_SDL3_HPP 8 | #define __S9X_SOUND_DRIVER_SDL3_HPP 9 | 10 | #include "SDL3/SDL.h" 11 | // SDL.h may include altivec.h which redefines vector and bool 12 | #undef vector 13 | #undef bool 14 | 15 | #include "s9x_sound_driver.hpp" 16 | #include "../../apu/resampler.h" 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | class S9xSDL3SoundDriver : public S9xSoundDriver 23 | { 24 | public: 25 | S9xSDL3SoundDriver(); 26 | ~S9xSDL3SoundDriver(); 27 | void init() override; 28 | void deinit() override; 29 | bool open_device(int playback_rate, int buffer_size) override; 30 | void start() override; 31 | void stop() override; 32 | bool write_samples(int16_t *data, int samples) override; 33 | int space_free() override; 34 | std::pair buffer_level() override; 35 | 36 | private: 37 | void mix(int req, int total); 38 | 39 | SDL_AudioStream *stream; 40 | SDL_AudioSpec audiospec; 41 | Resampler buffer; 42 | std::mutex mutex; 43 | std::vector tmp; 44 | }; 45 | 46 | #endif /* __S9X_SOUND_DRIVER_SDL3_HPP */ 47 | -------------------------------------------------------------------------------- /common/video/opengl/glx_context.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GLX_CONTEXT_HPP 8 | #define __GLX_CONTEXT_HPP 9 | 10 | #include "opengl_context.hpp" 11 | 12 | #include 13 | 14 | class GTKGLXContext : public OpenGLContext 15 | { 16 | public: 17 | GTKGLXContext(); 18 | ~GTKGLXContext(); 19 | bool attach(Display *dpy, Window xid); 20 | bool create_context(); 21 | void resize(); 22 | void swap_buffers(); 23 | void swap_interval(int frames); 24 | void make_current(); 25 | bool ready(); 26 | 27 | GLXContext context; 28 | GLXFBConfig fbconfig; 29 | Display *display; 30 | int screen; 31 | Window xid; 32 | 33 | int version_major; 34 | int version_minor; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /common/video/opengl/opengl_context.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_OPENGL_CONTEXT_H 8 | #define __GTK_OPENGL_CONTEXT_H 9 | 10 | class OpenGLContext 11 | { 12 | public: 13 | virtual ~OpenGLContext(){}; 14 | virtual bool create_context() = 0; 15 | virtual void resize() = 0; 16 | virtual void swap_buffers() = 0; 17 | virtual void swap_interval(int frames) = 0; 18 | virtual void make_current() = 0; 19 | virtual bool ready() 20 | { 21 | return true; 22 | }; 23 | 24 | int x; 25 | int y; 26 | int width; 27 | int height; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /common/video/opengl/shaders/shader_helpers.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __SHADER_HELPERS_H 8 | #define __SHADER_HELPERS_H 9 | 10 | #include "shader_platform.h" 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct _STGA 16 | { 17 | _STGA() 18 | { 19 | data = (unsigned char *)0; 20 | width = 0; 21 | height = 0; 22 | byteCount = 0; 23 | } 24 | 25 | ~_STGA() 26 | { 27 | delete[] data; 28 | data = 0; 29 | } 30 | 31 | void destroy() 32 | { 33 | delete[] data; 34 | data = 0; 35 | } 36 | 37 | int width; 38 | int height; 39 | unsigned char byteCount; 40 | unsigned char *data; 41 | } STGA; 42 | 43 | bool loadPngImage(const char *name, int &outWidth, int &outHeight, 44 | bool &grayscale, bool &outHasAlpha, GLubyte **outData); 45 | bool loadTGA(const char *filename, STGA &tgaFile); 46 | void gl_log_errors(); 47 | bool gl_srgb_available(); 48 | int gl_version(); 49 | bool gl_float_texture_available(); 50 | void reduce_to_path(char* filename); 51 | 52 | #endif // __SHADER_HELPERS_H 53 | -------------------------------------------------------------------------------- /common/video/opengl/shaders/shader_platform.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __SHADER_PLATFORM_H 8 | #define __SHADER_PLATFORM_H 9 | 10 | #include "port.h" 11 | 12 | #if defined(SNES9X_QT) 13 | #include 14 | #if defined(_WIN32) 15 | #define realpath(src, resolved) _fullpath(resolved, src, PATH_MAX) 16 | #endif 17 | 18 | #elif defined(SNES9X_GTK) 19 | #include 20 | #elif defined(_WIN32) 21 | #include 22 | #include 23 | #include "gl_core_3_1.h" 24 | #include 25 | 26 | #ifdef UNICODE 27 | #define chdir(dir) _wchdir(Utf8ToWide(dir)) 28 | #define realpath(src, resolved) _twfullpath(resolved, src, PATH_MAX) 29 | #else 30 | #define chdir(dir) _chdir(dir) 31 | #define realpath(src, resolved) _fullpath(resolved, src, PATH_MAX) 32 | #endif 33 | #endif 34 | 35 | #endif /* __SHADER_PLATFORM_H */ 36 | -------------------------------------------------------------------------------- /common/video/opengl/wayland_egl_context.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __WAYLAND_EGL_CONTEXT_H 8 | #define __WAYLAND_EGL_CONTEXT_H 9 | 10 | #include "opengl_context.hpp" 11 | #include "common/video/wayland/wayland_surface.hpp" 12 | 13 | #include "glad/egl.h" 14 | #include 15 | #include 16 | 17 | class WaylandEGLContext : public OpenGLContext 18 | { 19 | public: 20 | WaylandEGLContext(); 21 | ~WaylandEGLContext(); 22 | bool attach(wl_display *display, wl_surface *surface, WaylandSurface::Metrics m); 23 | bool create_context(); 24 | void resize() {}; 25 | void resize(WaylandSurface::Metrics m); 26 | void swap_buffers(); 27 | void swap_interval(int frames); 28 | void make_current(); 29 | void shrink(); 30 | void regrow(); 31 | bool ready(); 32 | 33 | EGLDisplay egl_display; 34 | EGLSurface egl_surface; 35 | EGLContext egl_context; 36 | EGLConfig egl_config; 37 | 38 | wl_egl_window *egl_window; 39 | 40 | std::unique_ptr wayland_surface; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /common/video/opengl/wgl_context.hpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __WGL_CONTEXT_HPP 8 | #define __WGL_CONTEXT_HPP 9 | 10 | #include "opengl_context.hpp" 11 | 12 | #include 13 | 14 | class WGLContext : public OpenGLContext 15 | { 16 | public: 17 | WGLContext(); 18 | ~WGLContext(); 19 | bool attach(HWND xid); 20 | bool create_context() override; 21 | void resize() override; 22 | void swap_buffers() override; 23 | void swap_interval(int frames) override; 24 | void make_current() override; 25 | bool ready() override; 26 | void deinit(); 27 | 28 | HWND hwnd; 29 | HDC hdc; 30 | HGLRC hglrc; 31 | 32 | int version_major; 33 | int version_minor; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /common/video/std_chrono_throttle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct Throttle 6 | { 7 | void set_frame_rate(double frame_rate); 8 | void advance(); 9 | void reset(); 10 | void wait_for_frame(); 11 | void wait_for_frame_and_rebase_time(); 12 | std::chrono::microseconds remaining(); 13 | double max_frame_rate = 0.0; 14 | double frame_duration = 0.0; 15 | std::chrono::microseconds frame_duration_us; 16 | std::chrono::time_point then; 17 | }; -------------------------------------------------------------------------------- /common/video/vulkan/slang_helpers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | int get_significant_digits(const std::string_view &view); 7 | std::string trim(const std::string &str); 8 | void trim(std::string_view &view); 9 | std::vector split_string(const std::string_view &str, unsigned char delim); 10 | std::vector split_string_quotes(const std::string_view &view); 11 | bool ends_with(const std::string &str, const std::string &ext); 12 | void canonicalize(std::string &filename, const std::string &base); 13 | int mipmap_levels_for_size(int width, int height); -------------------------------------------------------------------------------- /common/video/vulkan/slang_preset.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "slang_shader.hpp" 4 | 5 | #include 6 | #include 7 | 8 | struct SlangPreset 9 | { 10 | void print(); 11 | bool load_preset_file(std::string filename); 12 | bool introspect(); 13 | bool introspect_shader(SlangShader &s, int index, SlangShader::Stage stage); 14 | bool match_buffer_semantic(const std::string &name, int pass, SlangShader::Uniform::Type &type, int &specifier); 15 | bool match_sampler_semantic(const std::string &name, int pass, SlangShader::Sampler::Type &type, int &specifier); 16 | void gather_parameters(); 17 | bool save_to_file(std::string filename); 18 | 19 | struct Texture 20 | { 21 | std::string id; 22 | std::string filename; 23 | std::string wrap_mode; 24 | bool mipmap; 25 | bool linear; 26 | }; 27 | 28 | std::vector passes; 29 | std::vector textures; 30 | std::vector parameters; 31 | int oldest_previous_frame; 32 | bool uses_feedback; 33 | bool last_pass_uses_feedback; 34 | }; -------------------------------------------------------------------------------- /common/video/vulkan/slang_preset_ini.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | struct IniFile 6 | { 7 | bool load_file(std::string filename); 8 | std::string get_string(std::string key, std::string default_string); 9 | int get_int(std::string key, int default_int); 10 | float get_float(std::string key, float default_float); 11 | bool get_bool(std::string key, bool default_bool); 12 | std::string get_source(std::string key); 13 | bool exists(std::string key); 14 | std::unordered_map> keys; 15 | }; -------------------------------------------------------------------------------- /common/video/vulkan/slang_preset_test.cpp: -------------------------------------------------------------------------------- 1 | #include "slang_preset.hpp" 2 | 3 | int main(int argc, char **argv) 4 | { 5 | SlangPreset preset; 6 | 7 | if (argc != 2) 8 | { 9 | printf("Usage %s shaderpreset\n", argv[0]); 10 | return -1; 11 | } 12 | 13 | bool success = preset.load_preset_file(argv[1]); 14 | if (!success) 15 | { 16 | printf("Failed to load %s\n", argv[1]); 17 | return -1; 18 | } 19 | 20 | preset.introspect(); 21 | 22 | preset.print(); 23 | 24 | return 0; 25 | } -------------------------------------------------------------------------------- /common/video/vulkan/vk_mem_alloc_implementation.cpp: -------------------------------------------------------------------------------- 1 | #define VMA_IMPLEMENTATION 2 | #define VMA_NULLABLE 3 | #define VMA_NOT_NULL 4 | #include "vulkan_context.hpp" -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_common.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "vulkan_hpp_wrapper.hpp" 4 | 5 | namespace Vulkan { 6 | 7 | vk::AccessFlags get_access_flags(vk::ImageLayout layout); 8 | vk::PipelineStageFlags get_pipeline_stage_flags(vk::ImageLayout layout); 9 | void image_layout_transition(vk::CommandBuffer command_buffer, 10 | vk::Image image, 11 | vk::PipelineStageFlags src_stage_mask, 12 | vk::PipelineStageFlags dst_stage_mask, 13 | vk::AccessFlags src_access_mask, 14 | vk::AccessFlags dst_access_mask, 15 | vk::ImageLayout old_layout, 16 | vk::ImageLayout new_layout, 17 | vk::ImageSubresourceRange const &subresource_range); 18 | void image_layout_transition(vk::CommandBuffer command_buffer, 19 | vk::Image image, 20 | vk::ImageLayout old_layout, 21 | vk::ImageLayout new_layout, 22 | vk::ImageSubresourceRange const &subresource_range); 23 | void image_layout_transition(vk::CommandBuffer command_buffer, 24 | vk::Image image, 25 | vk::ImageLayout old_layout, 26 | vk::ImageLayout new_layout); 27 | 28 | } // namespace Vulkan -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_hpp_storage.cpp: -------------------------------------------------------------------------------- 1 | #include "vulkan_hpp_wrapper.hpp" 2 | VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_hpp_wrapper.hpp: -------------------------------------------------------------------------------- 1 | #ifndef NOMINMAX 2 | #define NOMINMAX 3 | #endif 4 | #define VULKAN_HPP_ASSERT(x) 5 | #include "vulkan/vulkan.hpp" 6 | -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_pipeline_image.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "vulkan_context.hpp" 3 | 4 | namespace Vulkan 5 | { 6 | 7 | struct PipelineImage 8 | { 9 | PipelineImage() = default; 10 | void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator); 11 | void init(Vulkan::Context *context); 12 | ~PipelineImage(); 13 | 14 | void create(int width, int height, vk::Format fmt, vk::RenderPass renderpass, bool mipmap = false); 15 | void destroy(); 16 | void barrier(vk::CommandBuffer cmd); 17 | void generate_mipmaps(vk::CommandBuffer cmd); 18 | void clear(vk::CommandBuffer cmd); 19 | 20 | vk::ImageView image_view; 21 | vk::ImageView mipless_view; 22 | vk::Image image; 23 | vk::Format format; 24 | vk::UniqueFramebuffer framebuffer; 25 | vma::Allocation image_allocation; 26 | vk::ImageLayout current_layout; 27 | int image_width; 28 | int image_height; 29 | bool mipmap; 30 | 31 | vk::Device device; 32 | vk::Queue queue; 33 | vk::CommandPool command_pool; 34 | vma::Allocator allocator; 35 | }; 36 | 37 | } // namespace Vulkan -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_simple_output.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "vulkan_context.hpp" 3 | #include "vulkan_texture.hpp" 4 | 5 | namespace Vulkan 6 | { 7 | 8 | class SimpleOutput 9 | { 10 | public: 11 | SimpleOutput(Vulkan::Context *context, vk::Format format); 12 | ~SimpleOutput(); 13 | bool do_frame(uint8_t *buffer, int width, int height, int byte_stride, int viewport_x, int viewport_y, int viewport_width, int viewport_height); 14 | bool do_frame_without_swap(uint8_t *buffer, int width, int height, int byte_stride, int viewport_x, int viewport_y, int viewport_width, int viewport_height); 15 | void set_filter(bool on); 16 | 17 | private: 18 | const int queue_size = 3; 19 | int current_frame = 0; 20 | 21 | void create_pipeline(); 22 | void create_objects(); 23 | 24 | Context *context; 25 | vk::Device device; 26 | Vulkan::Swapchain *swapchain; 27 | 28 | vk::UniqueDescriptorPool descriptor_pool; 29 | vk::UniqueDescriptorSetLayout descriptor_set_layout; 30 | vk::UniquePipelineLayout pipeline_layout; 31 | vk::UniquePipeline pipeline; 32 | vk::Sampler linear_sampler; 33 | vk::Sampler nearest_sampler; 34 | vk::Format format; 35 | std::vector textures; 36 | std::vector descriptors; 37 | 38 | bool filter = true; 39 | }; 40 | 41 | } // namespace Vulkan -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_slang_pipeline.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "vulkan_hpp_wrapper.hpp" 3 | #include "slang_shader.hpp" 4 | #include "vulkan_context.hpp" 5 | #include "vulkan_pipeline_image.hpp" 6 | 7 | namespace Vulkan 8 | { 9 | 10 | class SlangPipeline 11 | { 12 | public: 13 | SlangPipeline() = default; 14 | void init(Context *context_, SlangShader *shader_); 15 | ~SlangPipeline(); 16 | 17 | bool generate_pipeline(bool lastpass = false); 18 | bool generate_frame_resources(vk::DescriptorPool pool); 19 | void update_framebuffer(vk::CommandBuffer, int frame_num, bool mipmap); 20 | 21 | Context *context; 22 | vk::Device device; 23 | vk::Format format; 24 | SlangShader *shader; 25 | vk::UniqueRenderPass render_pass; 26 | vk::UniqueDescriptorSetLayout descriptor_set_layout; 27 | vk::UniquePipelineLayout pipeline_layout; 28 | vk::UniquePipeline pipeline; 29 | vk::UniqueSemaphore semaphore; 30 | vk::UniqueSampler sampler; 31 | 32 | struct 33 | { 34 | vk::UniqueDescriptorSet descriptor_set; 35 | PipelineImage image; 36 | vk::UniqueFence fence; 37 | } frame[3]; 38 | 39 | vk::Buffer uniform_buffer; 40 | vma::Allocation uniform_buffer_allocation; 41 | std::vector push_constants; 42 | 43 | int source_width; 44 | int source_height; 45 | int destination_width; 46 | int destination_height; 47 | }; 48 | 49 | vk::SamplerAddressMode wrap_mode_from_string(std::string s); 50 | 51 | } // namespace Vulkan -------------------------------------------------------------------------------- /common/video/vulkan/vulkan_texture.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "vulkan_context.hpp" 4 | 5 | namespace Vulkan 6 | { 7 | 8 | struct Texture 9 | { 10 | Texture() = default; 11 | void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator); 12 | void init(Context *context); 13 | ~Texture(); 14 | 15 | void create(int width, int height, vk::Format fmt, vk::SamplerAddressMode wrap_mode, bool linear, bool mipmap); 16 | void destroy(); 17 | void from_buffer(vk::CommandBuffer cmd, uint8_t *buffer, int width, int height, int byte_stride = 0); 18 | void from_buffer(uint8_t *buffer, int width, int height, int byte_stride = 0); 19 | void discard_staging_buffer(); 20 | 21 | vk::Sampler sampler; 22 | vk::ImageView image_view; 23 | vk::Image image; 24 | vk::Format format; 25 | vk::SamplerAddressMode wrap_mode; 26 | vma::Allocation image_allocation; 27 | int image_width; 28 | int image_height; 29 | bool mipmap; 30 | bool linear; 31 | 32 | vk::Buffer buffer; 33 | vma::Allocation buffer_allocation; 34 | size_t buffer_size; 35 | 36 | vk::Device device; 37 | vk::Queue queue; 38 | vk::CommandPool command_pool; 39 | vma::Allocator allocator; 40 | }; 41 | 42 | } // namespace Vulkan -------------------------------------------------------------------------------- /cpuops.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _CPUOPS_H_ 8 | #define _CPUOPS_H_ 9 | 10 | void S9xOpcode_NMI (void); 11 | void S9xOpcode_IRQ (void); 12 | 13 | #ifndef SA1_OPCODES 14 | #define CHECK_FOR_IRQ() {} // if (CPU.IRQLine) S9xOpcode_IRQ(); } 15 | #else 16 | #define CHECK_FOR_IRQ() {} 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /debug.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifdef DEBUGGER 8 | 9 | #ifndef _DEBUG_H_ 10 | #define _DEBUG_H_ 11 | 12 | #include 13 | 14 | struct SBreakPoint 15 | { 16 | bool8 Enabled; 17 | uint8 Bank; 18 | uint16 Address; 19 | }; 20 | 21 | #define ENSURE_TRACE_OPEN(fp, file, mode) \ 22 | if (!fp) \ 23 | { \ 24 | std::string fn = S9xGetDirectory(LOG_DIR); \ 25 | fn += SLASH_STR file; \ 26 | fp = fopen(fn.c_str(), mode); \ 27 | } 28 | 29 | extern struct SBreakPoint S9xBreakpoint[6]; 30 | 31 | void S9xDoDebug (void); 32 | void S9xTrace (void); 33 | void S9xSA1Trace (void); 34 | void S9xTraceMessage (const char *); 35 | void S9xTraceFormattedMessage (const char *, ...); 36 | void S9xPrintHVPosition (char *); 37 | void S9xDebugProcessCommand(char *); 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /dma.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _DMA_H_ 8 | #define _DMA_H_ 9 | 10 | struct SDMA 11 | { 12 | bool8 ReverseTransfer; 13 | bool8 HDMAIndirectAddressing; 14 | bool8 UnusedBit43x0; 15 | bool8 AAddressFixed; 16 | bool8 AAddressDecrement; 17 | uint8 TransferMode; 18 | uint8 BAddress; 19 | uint16 AAddress; 20 | uint8 ABank; 21 | uint16 DMACount_Or_HDMAIndirectAddress; 22 | uint8 IndirectBank; 23 | uint16 Address; 24 | uint8 Repeat; 25 | uint8 LineCount; 26 | uint8 UnknownByte; 27 | uint8 DoTransfer; 28 | }; 29 | 30 | #define TransferBytes DMACount_Or_HDMAIndirectAddress 31 | #define IndirectAddress DMACount_Or_HDMAIndirectAddress 32 | 33 | extern struct SDMA DMA[8]; 34 | 35 | bool8 S9xDoDMA (uint8); 36 | void S9xStartHDMA (void); 37 | uint8 S9xDoHDMA (uint8); 38 | void S9xResetDMA (void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /external/VulkanMemoryAllocator-Hpp/include/vk_mem_alloc_raii.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/external/VulkanMemoryAllocator-Hpp/include/vk_mem_alloc_raii.hpp -------------------------------------------------------------------------------- /external/fmt/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | IndentPPDirectives: AfterHash 6 | IndentCaseLabels: false 7 | AlwaysBreakTemplateDeclarations: false 8 | DerivePointerAlignment: false 9 | -------------------------------------------------------------------------------- /external/fmt/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /external/fmt/include/fmt/locale.h: -------------------------------------------------------------------------------- 1 | #include "xchar.h" 2 | #warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead 3 | -------------------------------------------------------------------------------- /external/fmt/src/format.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ 2 | // 3 | // Copyright (c) 2012 - 2016, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include "fmt/format-inl.h" 9 | 10 | FMT_BEGIN_NAMESPACE 11 | namespace detail { 12 | 13 | template FMT_API auto dragonbox::to_decimal(float x) noexcept 14 | -> dragonbox::decimal_fp; 15 | template FMT_API auto dragonbox::to_decimal(double x) noexcept 16 | -> dragonbox::decimal_fp; 17 | 18 | #ifndef FMT_STATIC_THOUSANDS_SEPARATOR 19 | template FMT_API locale_ref::locale_ref(const std::locale& loc); 20 | template FMT_API auto locale_ref::get() const -> std::locale; 21 | #endif 22 | 23 | // Explicit instantiations for char. 24 | 25 | template FMT_API auto thousands_sep_impl(locale_ref) 26 | -> thousands_sep_result; 27 | template FMT_API auto decimal_point_impl(locale_ref) -> char; 28 | 29 | template FMT_API void buffer::append(const char*, const char*); 30 | 31 | template FMT_API void vformat_to(buffer&, string_view, 32 | typename vformat_args<>::type, locale_ref); 33 | 34 | // Explicit instantiations for wchar_t. 35 | 36 | template FMT_API auto thousands_sep_impl(locale_ref) 37 | -> thousands_sep_result; 38 | template FMT_API auto decimal_point_impl(locale_ref) -> wchar_t; 39 | 40 | template FMT_API void buffer::append(const wchar_t*, const wchar_t*); 41 | 42 | } // namespace detail 43 | FMT_END_NAMESPACE 44 | -------------------------------------------------------------------------------- /external/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2023 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /external/imgui/imgui_impl_dx9.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for DirectX9 2 | // This needs to be used along with a Platform Backend (e.g. Win32) 3 | 4 | // Implemented features: 5 | // [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID! 6 | // [X] Renderer: Large meshes support (64k+ vertices) with 16-bit indices. 7 | 8 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 9 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 10 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 11 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 12 | 13 | #pragma once 14 | #include "imgui.h" // IMGUI_IMPL_API 15 | 16 | struct IDirect3DDevice9; 17 | 18 | IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device); 19 | IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown(); 20 | IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame(); 21 | IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data); 22 | 23 | // Use if you want to reset your rendering device without losing Dear ImGui state. 24 | IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects(); 25 | IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects(); 26 | -------------------------------------------------------------------------------- /external/imgui/snes9x_imgui.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ImGui { 6 | enum DrawTextAlignment 7 | { 8 | BEGIN, 9 | END, 10 | CENTER 11 | }; 12 | } // namespace ImGui 13 | 14 | struct S9xImGuiInitInfo 15 | { 16 | int font_size; 17 | int spacing; 18 | uint32_t box_color; 19 | uint32_t text_color; 20 | uint32_t inactive_text_color; 21 | }; 22 | 23 | S9xImGuiInitInfo S9xImGuiGetDefaults(); 24 | void S9xImGuiInit(S9xImGuiInitInfo *init_info = nullptr); 25 | bool S9xImGuiDraw(int width, int height); 26 | bool S9xImGuiRunning(); 27 | void S9xImGuiDeinit(); -------------------------------------------------------------------------------- /external/stb/stb_image_implementation.cpp: -------------------------------------------------------------------------------- 1 | #define STB_IMAGE_IMPLEMENTATION 2 | #include "stb_image.h" 3 | -------------------------------------------------------------------------------- /filter/2xsai.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _2xsai_h_ 8 | #define _2xsai_h_ 9 | 10 | bool8 S9xBlit2xSaIFilterInit (void); 11 | void S9xBlit2xSaIFilterDeinit (void); 12 | void SuperEagle (uint8 *, int, uint8 *, int, int, int); 13 | void _2xSaI (uint8 *, int, uint8 *, int, int, int); 14 | void Super2xSaI (uint8 *, int, uint8 *, int, int, int); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /filter/epx.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _epx_h_ 8 | #define _epx_h_ 9 | 10 | void EPX_16 (uint8 *, int, uint8 *, int, int, int); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /filter/hq2x.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #include 8 | 9 | #ifndef _hq2x_h_ 10 | #define _hq2x_h_ 11 | 12 | bool S9xBlitHQ2xFilterInit(void); 13 | void S9xBlitHQ2xFilterDeinit(void); 14 | void HQ2X_16 (uint8_t *, int, uint8_t *, int, int, int); 15 | void HQ3X_16 (uint8_t *, int, uint8_t *, int, int, int); 16 | void HQ4X_16 (uint8_t *, int, uint8_t *, int, int, int); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /filter/snes_ntsc_config.h: -------------------------------------------------------------------------------- 1 | /* Configure library by modifying this file */ 2 | 3 | #ifndef SNES_NTSC_CONFIG_H 4 | #define SNES_NTSC_CONFIG_H 5 | 6 | #if !defined(SNES9X_GTK) && !defined(_WIN32) && !defined(__LIBRETRO__) 7 | /* Format of source pixels */ 8 | #define SNES_NTSC_IN_FORMAT SNES_NTSC_RGB15 9 | /* #define SNES_NTSC_IN_FORMAT SNES_NTSC_RGB16 */ 10 | /* #define SNES_NTSC_IN_FORMAT SNES_NTSC_BGR15 */ 11 | 12 | /* The following affect the built-in blitter only; a custom blitter can 13 | handle things however it wants. */ 14 | 15 | /* Bits per pixel of output. Can be 15, 16, 32, or 24 (same as 32). */ 16 | #define SNES_NTSC_OUT_DEPTH 15 17 | #else 18 | #define SNES_NTSC_IN_FORMAT SNES_NTSC_RGB16 19 | #define SNES_NTSC_OUT_DEPTH 16 20 | #endif 21 | 22 | /* Type of input pixel values */ 23 | #define SNES_NTSC_IN_T unsigned short 24 | 25 | /* Each raw pixel input value is passed through this. You might want to mask 26 | the pixel index if you use the high bits as flags, etc. */ 27 | #define SNES_NTSC_ADJ_IN( in ) in 28 | 29 | /* For each pixel, this is the basic operation: 30 | output_color = SNES_NTSC_ADJ_IN( SNES_NTSC_IN_T ) */ 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /fxemu.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _FXEMU_H_ 8 | #define _FXEMU_H_ 9 | 10 | #define FX_BREAKPOINT (-1) 11 | #define FX_ERROR_ILLEGAL_ADDRESS (-2) 12 | 13 | // The FxInfo_s structure, the link between the FxEmulator and the Snes Emulator 14 | struct FxInfo_s 15 | { 16 | uint32 vFlags; 17 | uint8 *pvRegisters; // 768 bytes located in the memory at address 0x3000 18 | uint32 nRamBanks; // Number of 64kb-banks in GSU-RAM/BackupRAM (banks 0x70-0x73) 19 | uint8 *pvRam; // Pointer to GSU-RAM 20 | uint32 nRomBanks; // Number of 32kb-banks in Cart-ROM 21 | uint8 *pvRom; // Pointer to Cart-ROM 22 | uint32 speedPerLine; 23 | bool8 oneLineDone; 24 | }; 25 | 26 | extern struct FxInfo_s SuperFX; 27 | 28 | void S9xInitSuperFX (void); 29 | void S9xResetSuperFX (void); 30 | void S9xSuperFXExec (void); 31 | void S9xSetSuperFX (uint8, uint16); 32 | uint8 S9xGetSuperFX (uint16); 33 | void fx_flushCache (void); 34 | void fx_computeScreenPointers (void); 35 | uint32 fx_run (uint32); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /gtk/AUTHORS: -------------------------------------------------------------------------------- 1 | Brandon Wright (bearoso@gmail.com) 2 | 3 | Translators: 4 | jristz (es_ES) 5 | Inukaze (es_VE) 6 | Tukuyomi (fr_FR) 7 | Jake Smarter (pl) 8 | Tibério Vítor (pt_BR) 9 | Sergey Basalaev (ru) 10 | Milan Kostić (sr@latin) 11 | StanleyKid-22 (uk) 12 | -------------------------------------------------------------------------------- /gtk/data/meson.build: -------------------------------------------------------------------------------- 1 | install_data('../../data/cheats.bml', install_dir: appdatadir) 2 | install_data('snes9x-gtk.desktop', install_dir: join_paths(datadir, 'applications')) 3 | 4 | hicolor = join_paths(datadir, 'icons', 'hicolor') 5 | install_data('snes9x_16x16.png', install_dir: hicolor, rename: '16x16/apps/snes9x.png') 6 | install_data('snes9x_24x24.png', install_dir: hicolor, rename: '24x24/apps/snes9x.png') 7 | install_data('snes9x_32x32.png', install_dir: hicolor, rename: '32x32/apps/snes9x.png') 8 | install_data('snes9x_64x64.png', install_dir: hicolor, rename: '64x64/apps/snes9x.png') 9 | install_data('snes9x_128x128.png', install_dir: hicolor, rename: '128x128/apps/snes9x.png') 10 | install_data('snes9x_256x256.png', install_dir: hicolor, rename: '256x256/apps/snes9x.png') 11 | -------------------------------------------------------------------------------- /gtk/data/mini_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/mini_icon.png -------------------------------------------------------------------------------- /gtk/data/snes9x-gtk.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Snes9x 3 | Comment=A Super Nintendo emulator 4 | Comment[de]=Ein Super Nintendo‑Emulator 5 | Comment[pl]=Emulator Super Nintendo 6 | Type=Application 7 | Categories=Game;Emulator; 8 | MimeType=application/vnd.nintendo.snes.rom;application/x-snes-rom; 9 | Exec=snes9x-gtk %F 10 | Icon=snes9x 11 | -------------------------------------------------------------------------------- /gtk/data/snes9x_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_128x128.png -------------------------------------------------------------------------------- /gtk/data/snes9x_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_16x16.png -------------------------------------------------------------------------------- /gtk/data/snes9x_24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_24x24.png -------------------------------------------------------------------------------- /gtk/data/snes9x_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_256x256.png -------------------------------------------------------------------------------- /gtk/data/snes9x_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_32x32.png -------------------------------------------------------------------------------- /gtk/data/snes9x_64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/data/snes9x_64x64.png -------------------------------------------------------------------------------- /gtk/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | src/gtk_binding.cpp 2 | src/gtk_cheat.cpp 3 | src/gtk_config.cpp 4 | src/gtk_display_driver_opengl.cpp 5 | src/gtk_netplay.cpp 6 | src/gtk_netplay_dialog.cpp 7 | src/gtk_preferences.cpp 8 | src/gtk_s9x.cpp 9 | src/gtk_s9xwindow.cpp 10 | src/gtk_shader_parameters.cpp 11 | src/gtk_file.cpp 12 | src/snes9x.ui 13 | -------------------------------------------------------------------------------- /gtk/po/updatepot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname "${0}")/.. 4 | xgettext -f po/POTFILES.in \ 5 | --from-code 'UTF-8' --package-name 'Snes9x' \ 6 | --copyright-holder 'Brandon Wright and Snes9x contributors' \ 7 | --msgid-bugs-address 'https://github.com/snes9xgit/snes9x/issues' \ 8 | -w 80 -o po/snes9x-gtk.pot -kmaybegettext -k_ 9 | cd - 10 | -------------------------------------------------------------------------------- /gtk/scripts/makeappimage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ ! -f appimagetool-x86_64.AppImage ]; then 4 | wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage 5 | chmod +x appimagetool-x86_64.AppImage 6 | fi 7 | 8 | if [ ! -f linuxdeploy-x86_64.AppImage ]; then 9 | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage 10 | chmod +x linuxdeploy-x86_64.AppImage 11 | fi 12 | 13 | DESTDIR=AppDir ninja install 14 | ./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=AppDir \ 15 | --exclude-library="libX*" \ 16 | --exclude-library="libglib*" \ 17 | --exclude-library="libgobject*" \ 18 | --exclude-library="libgdk_pixbuf*" \ 19 | --exclude-library="libwayland*" \ 20 | --exclude-library="libgmodule*" \ 21 | --exclude-library="libgio*" \ 22 | --exclude-library="libxcb*" \ 23 | --exclude-library="libxkbcommon*" \ 24 | --exclude-library="libdb*" 25 | 26 | rm AppDir/snes9x.png 27 | pushd AppDir 28 | ln -s usr/share/icons/hicolor/256x256/apps/snes9x.png 29 | chmod +x AppRun 30 | popd 31 | ./appimagetool-x86_64.AppImage --appimage-extract-and-run AppDir 32 | -------------------------------------------------------------------------------- /gtk/src/background_particles.h: -------------------------------------------------------------------------------- 1 | #ifndef __BACKGROUND_PARTICLES_H 2 | #define __BACKGROUND_PARTICLES_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Background 9 | { 10 | 11 | class Particles 12 | { 13 | public: 14 | double rate = 0.5; 15 | 16 | enum Mode 17 | { 18 | Stars, 19 | Snow, 20 | Invalid 21 | }; 22 | 23 | struct Particle 24 | { 25 | double x, y, dx, dy; 26 | unsigned int intensity; 27 | }; 28 | 29 | Particles(enum Mode = Stars); 30 | ~Particles(); 31 | void advance(); 32 | void copyto(uint16_t *dst, int pitch); 33 | enum Mode getmode(); 34 | void setmode(enum Mode); 35 | void set_game_image(uint16_t *src, int pitch); 36 | 37 | std::vector output; 38 | 39 | private: 40 | inline void setpixel(int x, int y, uint16_t l); 41 | void advance_snow(); 42 | void advance_starfield(); 43 | 44 | std::minstd_rand mt; 45 | std::uniform_real_distribution dis; 46 | std::vector gameimage; 47 | std::list particles; 48 | enum Mode mode; 49 | double wind; 50 | uint16_t color_table[32]; 51 | }; 52 | 53 | } // namespace Background 54 | #endif // __BACKGROUND_PARTICLES_H -------------------------------------------------------------------------------- /gtk/src/filter_epx_unsafe.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __FILTER_EPX_UNSAFE_H 8 | #define __FILTER_EPX_UNSAFE_H 9 | 10 | #include 11 | void EPX_16_unsafe(uint8_t *, int, uint8_t *, int, int, int); 12 | void EPX_16_smooth_unsafe(uint8_t *, int, uint8_t *, int, int, int); 13 | 14 | #endif /* __FILTER_EPX_UNSAFE_H */ 15 | -------------------------------------------------------------------------------- /gtk/src/filter_xbrz.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _filter_xbrz_h_ 8 | #define _filter_xbrz_h_ 9 | 10 | void filter_2xBRZ (uint8 *, int, uint8 *, int, int, int); 11 | void filter_3xBRZ (uint8 *, int, uint8 *, int, int, int); 12 | void filter_4xBRZ (uint8 *, int, uint8 *, int, int, int); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /gtk/src/gtk_compat.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_COMPAT_H 8 | #define __GTK_COMPAT_H 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | #ifndef USE_WAYLAND 18 | #undef GDK_WINDOWING_WAYLAND 19 | #endif 20 | 21 | #ifdef GDK_WINDOWING_WAYLAND 22 | #include 23 | inline bool is_wayland() 24 | { 25 | return GDK_IS_WAYLAND_DISPLAY(gdk_display_get_default()); 26 | } 27 | #endif 28 | 29 | #ifdef GDK_WINDOWING_X11 30 | #include 31 | inline bool is_x11() 32 | { 33 | return GDK_IS_X11_DISPLAY(gdk_display_get_default()); 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /gtk/src/gtk_display_driver.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_DISPLAY_DRIVER_H 8 | #define __GTK_DISPLAY_DRIVER_H 9 | 10 | #include "gtk_s9x.h" 11 | 12 | class S9xDisplayDriver 13 | { 14 | public: 15 | virtual ~S9xDisplayDriver() 16 | { 17 | } 18 | virtual void refresh() = 0; 19 | virtual int init() = 0; 20 | virtual void deinit() = 0; 21 | virtual void update(uint16_t *buffer, int width, int height, int stride_in_pixels) = 0; 22 | virtual void *get_parameters() = 0; 23 | virtual void save(const char *filename) = 0; 24 | virtual bool is_ready() = 0; 25 | virtual bool can_throttle() { return false; }; 26 | virtual int get_width() = 0; 27 | virtual int get_height() = 0; 28 | virtual void shrink() {}; 29 | virtual void regrow() {}; 30 | 31 | protected: 32 | Snes9xWindow *window; 33 | Snes9xConfig *config; 34 | Gtk::DrawingArea *drawing_area; 35 | }; 36 | 37 | #endif /* __GTK_DISPLAY_DRIVER_H*/ 38 | -------------------------------------------------------------------------------- /gtk/src/gtk_file.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_FILE_H 8 | #define __GTK_FILE_H 9 | #include 10 | 11 | std::string S9xBasenameNoExt(std::string); 12 | 13 | void S9xLoadState(std::string); 14 | void S9xSaveState(std::string); 15 | 16 | void S9xQuickSaveSlot(int slot); 17 | void S9xQuickLoadSlot(int slot); 18 | 19 | #endif /* __GTK_FILE_H */ 20 | -------------------------------------------------------------------------------- /gtk/src/gtk_netplay.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_NETPLAY_H 8 | #define __GTK_NETPLAY_H 9 | 10 | void S9xNetplayDialogOpen(); 11 | int S9xNetplayPush(); 12 | void S9xNetplayPop(); 13 | int S9xNetplaySyncSpeed(); 14 | void S9xNetplaySyncClients(); 15 | void S9xNetplayDisconnect(); 16 | 17 | #endif /* __GTK_NETPLAY_H */ 18 | -------------------------------------------------------------------------------- /gtk/src/gtk_netplay_dialog.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_NETPLAY_DIALOG_H 8 | #define __GTK_NETPLAY_DIALOG_H 9 | 10 | #include "gtk_builder_window.h" 11 | #include "gtk_config.h" 12 | 13 | class Snes9xNetplayDialog : public GtkBuilderWindow 14 | { 15 | public: 16 | Snes9xNetplayDialog(Snes9xConfig *config); 17 | ~Snes9xNetplayDialog(); 18 | bool show(); 19 | void update_state(); 20 | 21 | private: 22 | Snes9xConfig *config; 23 | void settings_to_dialog(); 24 | void settings_from_dialog(); 25 | }; 26 | 27 | #endif /* __GTK_NETPLAY_DIALOG_H */ 28 | -------------------------------------------------------------------------------- /gtk/src/gtk_s9x.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_S9X_H 8 | #define __GTK_S9X_H 9 | 10 | #include "gtk_config.h" 11 | #include "gtk_s9xwindow.h" 12 | 13 | #include 14 | 15 | #define SNES9X_GTK_AUTHORS "© 2007 - 2023 Brandon Wright (bearoso@gmail.com)" 16 | #define SNES9X_GTK_VERSION "87" 17 | 18 | extern Snes9xWindow *top_level; 19 | extern Snes9xConfig *gui_config; 20 | 21 | int S9xOpenROM(const char *filename); 22 | void S9xNoROMLoaded(); 23 | void S9xROMLoaded(); 24 | 25 | #endif /* __GTK_S9X_H */ 26 | -------------------------------------------------------------------------------- /gtk/src/gtk_s9xcore.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_S9XCORE_H 8 | #define __GTK_S9XCORE_H 9 | 10 | #include "snes9x.h" 11 | #include "memmap.h" 12 | #include "debug.h" 13 | #include "cpuexec.h" 14 | #include "ppu.h" 15 | #include "snapshot.h" 16 | #include "apu/apu.h" 17 | #include "display.h" 18 | #include "gfx.h" 19 | #include "spc7110.h" 20 | #include "controls.h" 21 | #include "cheats.h" 22 | #include "movie.h" 23 | #include "conffile.h" 24 | #include "netplay.h" 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* __GTK_S9XCORE_H */ 31 | -------------------------------------------------------------------------------- /gtk/src/gtk_shader_parameters.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_SHADER_PARAMETERS_H 8 | #define __GTK_SHADER_PARAMETERS_H 9 | 10 | #include "gtk_compat.h" 11 | 12 | bool gtk_shader_parameters_dialog(GtkWindow *parent); 13 | void gtk_shader_parameters_dialog_close(); 14 | 15 | #endif // __GTK_SHADER_PARAMETERS_H 16 | -------------------------------------------------------------------------------- /gtk/src/gtk_sound.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef __GTK_SOUND_H 8 | #define __GTK_SOUND_H 9 | 10 | #include 11 | #include 12 | 13 | void S9xPortSoundInit(); 14 | void S9xPortSoundDeinit(); 15 | void S9xPortSoundReinit(); 16 | void S9xSoundStart(); 17 | void S9xSoundStop(); 18 | 19 | int S9xSoundBase2log(int num); 20 | int S9xSoundPowerof2(int num); 21 | std::vector S9xGetSoundDriverNames(); 22 | 23 | #endif /* __GTK_SOUND_H */ 24 | -------------------------------------------------------------------------------- /gtk/src/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/gtk/src/splash.png -------------------------------------------------------------------------------- /gtk/src/threadpool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class threadpool 12 | { 13 | public: 14 | void start(int num_threads); 15 | void stop(); 16 | void queue(std::function func); 17 | void wait_idle(); 18 | 19 | private: 20 | void thread_func(); 21 | 22 | std::vector threads; 23 | std::queue> jobs; 24 | std::queue> futures; 25 | std::mutex mutex; 26 | std::condition_variable cond; 27 | bool die = false; 28 | bool started = false; 29 | }; -------------------------------------------------------------------------------- /jma/7z.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005-2006 NSRT Team ( http://nsrt.edgeemu.com ) 3 | Copyright (C) 2002 Andrea Mazzoleni ( http://advancemame.sf.net ) 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License version 2.1 as published by the Free Software Foundation. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef __7Z_H 20 | #define __7Z_H 21 | 22 | #include "iiostrm.h" 23 | 24 | bool decompress_lzma_7z(ISequentialInStream& in, unsigned in_size, ISequentialOutStream& out, unsigned out_size) throw (); 25 | bool decompress_lzma_7z(const unsigned char* in_data, unsigned in_size, unsigned char* out_data, unsigned out_size) throw (); 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /jma/ariconst.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2002 Andrea Mazzoleni ( http://advancemame.sf.net ) 3 | Copyright (C) 2001-4 Igor Pavlov ( http://www.7-zip.org ) 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License version 2.1 as published by the Free Software Foundation. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef __ARICONST_H 20 | #define __ARICONST_H 21 | 22 | #include "aribitcd.h" 23 | 24 | 25 | typedef NCompression::NArithmetic::CRangeDecoder CMyRangeDecoder; 26 | template class CMyBitDecoder: 27 | public NCompression::NArithmetic::CBitDecoder {}; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /jma/ariprice.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMPRESSION_ARIPRICE_H 2 | #define __COMPRESSION_ARIPRICE_H 3 | 4 | namespace NCompression { 5 | namespace NArithmetic { 6 | 7 | const UINT32 kNumBitPriceShiftBits = 6; 8 | const UINT32 kBitPrice = 1 << kNumBitPriceShiftBits; 9 | 10 | }} 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /jma/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2004-2006 NSRT Team ( http://nsrt.edgeemu.com ) 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | version 2 as published by the Free Software Foundation. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 | */ 17 | 18 | #ifndef CRC32_H 19 | #define CRC32_H 20 | 21 | namespace CRC32lib 22 | { 23 | unsigned int CRC32(const unsigned char *, size_t, unsigned int crc32 = 0xFFFFFFFF); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /jma/license.txt: -------------------------------------------------------------------------------- 1 | Some of the code in this directory is under the LGPL v2. 2 | 3 | Other bits of the code is under GPL v2. 4 | The authors of the GPL portions have granted an exception to Snes9x (but not to Snes9x derivitives) 5 | to use their code. 6 | 7 | s9x-jma.h and s9x-jma.cpp are under Snes9x license. 8 | -------------------------------------------------------------------------------- /jma/lzma.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2002 Andrea Mazzoleni ( http://advancemame.sf.net ) 3 | Copyright (C) 2001-4 Igor Pavlov ( http://www.7-zip.org ) 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License version 2.1 as published by the Free Software Foundation. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include "lzma.h" 20 | 21 | namespace NCompress { 22 | namespace NLZMA { 23 | 24 | UINT32 kDistStart[kDistTableSizeMax]; 25 | 26 | static class CConstInit 27 | { 28 | public: 29 | CConstInit() 30 | { 31 | UINT32 aStartValue = 0; 32 | int i; 33 | for (i = 0; i < kDistTableSizeMax; i++) 34 | { 35 | kDistStart[i] = aStartValue; 36 | aStartValue += (1 << kDistDirectBits[i]); 37 | } 38 | } 39 | } g_ConstInit; 40 | 41 | }} 42 | -------------------------------------------------------------------------------- /jma/s9x-jma.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | // JMA compressed file support 8 | // (c) Copyright 2004-2006 NSRT Team (http://nsrt.edgeemu.com) 9 | 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | size_t load_jma_file(const char *filename, unsigned char *buffer); 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /language.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _LANGUAGE_H_ 8 | #define _LANGUAGE_H_ 9 | 10 | // Movie Messages 11 | #define MOVIE_ERR_SNAPSHOT_WRONG_MOVIE "Snapshot not from this movie" 12 | #define MOVIE_ERR_SNAPSHOT_NOT_MOVIE "Not a movie snapshot" 13 | #define MOVIE_INFO_REPLAY "Movie replay" 14 | #define MOVIE_INFO_RECORD "Movie record" 15 | #define MOVIE_INFO_RERECORD "Movie re-record" 16 | #define MOVIE_INFO_REWIND "Movie rewind" 17 | #define MOVIE_INFO_STOP "Movie stop" 18 | #define MOVIE_INFO_END "Movie end" 19 | #define MOVIE_INFO_SNAPSHOT "Movie snapshot" 20 | #define MOVIE_ERR_SNAPSHOT_INCONSISTENT "Snapshot inconsistent with movie" 21 | 22 | // Snapshot Messages 23 | #define SAVE_INFO_SNAPSHOT "Saved" 24 | #define SAVE_INFO_LOAD "Loaded" 25 | #define SAVE_INFO_OOPS "Auto-saving 'oops' snapshot" 26 | #define SAVE_ERR_WRONG_FORMAT "File not in Snes9x snapshot format" 27 | #define SAVE_ERR_WRONG_VERSION "Incompatible snapshot version" 28 | #define SAVE_ERR_ROM_NOT_FOUND "ROM image \"%s\" for snapshot not found" 29 | #define SAVE_ERR_SAVE_NOT_FOUND "Snapshot %s does not exist" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /libretro/Tupfile: -------------------------------------------------------------------------------- 1 | TARGET_NAME=snes9x 2 | CORE_DIR=$(TUP_CWD)/.. 3 | include_rules 4 | -------------------------------------------------------------------------------- /libretro/control: -------------------------------------------------------------------------------- 1 | Package: com.libretro.snes9x 2 | Name: snes9x 3 | Depends: 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: Libretro iOS core of SNES9x 7 | Maintainer: libretro 8 | Author: libretro 9 | Section: System 10 | Tag: role::developer 11 | -------------------------------------------------------------------------------- /libretro/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | CORE_DIR := $(LOCAL_PATH)/../.. 4 | 5 | include $(CORE_DIR)/libretro/Makefile.common 6 | 7 | COREFLAGS := -DANDROID -D__LIBRETRO__ -DHAVE_STRINGS_H -DRIGHTSHIFT_IS_SAR $(INCFLAGS) 8 | 9 | GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" 10 | ifneq ($(GIT_VERSION)," unknown") 11 | COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" 12 | endif 13 | 14 | include $(CLEAR_VARS) 15 | LOCAL_MODULE := retro 16 | LOCAL_SRC_FILES := $(SOURCES_C) $(SOURCES_CXX) 17 | LOCAL_CXXFLAGS := $(COREFLAGS) 18 | LOCAL_CFLAGS := $(COREFLAGS) 19 | LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/libretro/link.T 20 | include $(BUILD_SHARED_LIBRARY) 21 | -------------------------------------------------------------------------------- /libretro/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := c++_static 2 | APP_ABI := all 3 | -------------------------------------------------------------------------------- /libretro/libretro.def: -------------------------------------------------------------------------------- 1 | LIBRARY libretro 2 | 3 | EXPORTS 4 | 5 | retro_api_version 6 | 7 | retro_get_system_info 8 | retro_get_system_av_info 9 | 10 | retro_set_video_refresh 11 | retro_set_audio_sample 12 | retro_set_audio_sample_batch 13 | retro_set_input_poll 14 | retro_set_input_state 15 | 16 | retro_set_environment 17 | 18 | retro_set_controller_port_device 19 | 20 | retro_init 21 | retro_deinit 22 | 23 | retro_reset 24 | retro_run 25 | 26 | retro_serialize_size 27 | retro_serialize 28 | retro_unserialize 29 | 30 | retro_cheat_reset 31 | retro_cheat_set 32 | 33 | retro_load_game 34 | retro_unload_game 35 | retro_load_game_special 36 | 37 | retro_get_region 38 | retro_get_memory_data 39 | retro_get_memory_size -------------------------------------------------------------------------------- /libretro/link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2010.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2010", "msvc-2010\msvc-2010.vcxproj", "{5BDB0E63-AD88-4547-BF48-169312DDD188}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Debug|x64 = Debug|x64 10 | Release|Win32 = Release|Win32 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|Win32.Build.0 = Debug|Win32 16 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|x64.ActiveCfg = Debug|x64 17 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|x64.Build.0 = Debug|x64 18 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|Win32.ActiveCfg = Release|Win32 19 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|Win32.Build.0 = Release|Win32 20 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|x64.ActiveCfg = Release|x64 21 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|x64.Build.0 = Release|x64 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2010/libretro.def: -------------------------------------------------------------------------------- 1 | LIBRARY "msvc-2010" 2 | EXPORTS 3 | retro_set_environment 4 | retro_set_video_refresh 5 | retro_set_audio_sample 6 | retro_set_audio_sample_batch 7 | retro_set_input_poll 8 | retro_set_input_state 9 | retro_init 10 | retro_deinit 11 | retro_api_version 12 | retro_get_system_info 13 | retro_get_system_av_info 14 | retro_set_controller_port_device 15 | retro_reset 16 | retro_run 17 | retro_serialize_size 18 | retro_serialize 19 | retro_unserialize 20 | retro_cheat_reset 21 | retro_cheat_set 22 | retro_load_game 23 | retro_load_game_special 24 | retro_unload_game 25 | retro_get_region 26 | retro_get_memory_data 27 | retro_get_memory_size 28 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2017.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "msvc-2017", "msvc-2017\msvc-2017.vcxproj", "{5BDB0E63-AD88-4547-BF48-169312DDD188}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Debug|x64 = Debug|x64 12 | Release|Win32 = Release|Win32 13 | Release|x64 = Release|x64 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|Win32.Build.0 = Debug|Win32 18 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|x64.ActiveCfg = Debug|x64 19 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Debug|x64.Build.0 = Debug|x64 20 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|Win32.ActiveCfg = Release|Win32 21 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|Win32.Build.0 = Release|Win32 22 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|x64.ActiveCfg = Release|x64 23 | {5BDB0E63-AD88-4547-BF48-169312DDD188}.Release|x64.Build.0 = Release|x64 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {13DC0902-73A8-4AE3-9731-56AC7B8F3ED6} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /libretro/msvc/msvc-2017/libretro.def: -------------------------------------------------------------------------------- 1 | LIBRARY "msvc-2017" 2 | EXPORTS 3 | retro_set_environment 4 | retro_set_video_refresh 5 | retro_set_audio_sample 6 | retro_set_audio_sample_batch 7 | retro_set_input_poll 8 | retro_set_input_state 9 | retro_init 10 | retro_deinit 11 | retro_api_version 12 | retro_get_system_info 13 | retro_get_system_av_info 14 | retro_set_controller_port_device 15 | retro_reset 16 | retro_run 17 | retro_serialize_size 18 | retro_serialize 19 | retro_unserialize 20 | retro_cheat_reset 21 | retro_cheat_set 22 | retro_load_game 23 | retro_load_game_special 24 | retro_unload_game 25 | retro_get_region 26 | retro_get_memory_data 27 | retro_get_memory_size 28 | -------------------------------------------------------------------------------- /macosx/.gitignore: -------------------------------------------------------------------------------- 1 | Build 2 | .DS_Store 3 | xcuserdata 4 | -------------------------------------------------------------------------------- /macosx/APPL.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/APPL.icns -------------------------------------------------------------------------------- /macosx/CART.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/CART.icns -------------------------------------------------------------------------------- /macosx/HID_Utilities_External.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/HID_Utilities_External.h -------------------------------------------------------------------------------- /macosx/ReClassicfication/EndianStuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EndianStuff.h 3 | * stackimport 4 | * 5 | * Created by Mr. Z. on 10/06/06. 6 | * Copyright 2006 Mr Z. All rights reserved. 7 | * 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | 15 | #if RECLASSIFICATION_BUILD_BIG_ENDIAN 16 | #define BIG_ENDIAN_16(value) (value) 17 | #define BIG_ENDIAN_32(value) (value) 18 | #else 19 | #define BIG_ENDIAN_16(value) \ 20 | (((((uint16_t)(value))<<8) & 0xFF00) | \ 21 | ((((uint16_t)(value))>>8) & 0x00FF)) 22 | 23 | #define BIG_ENDIAN_32(value) \ 24 | (((((uint32_t)(value))<<24) & 0xFF000000) | \ 25 | ((((uint32_t)(value))<< 8) & 0x00FF0000) | \ 26 | ((((uint32_t)(value))>> 8) & 0x0000FF00) | \ 27 | ((((uint32_t)(value))>>24) & 0x000000FF)) 28 | #endif 29 | -------------------------------------------------------------------------------- /macosx/SAVE.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/SAVE.icns -------------------------------------------------------------------------------- /macosx/SRAM.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/SRAM.icns -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/APPL-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/APPL-32.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/APPL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/APPL.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "size" : "32x32", 15 | "idiom" : "mac", 16 | "filename" : "APPL-32.png", 17 | "scale" : "1x" 18 | }, 19 | { 20 | "idiom" : "mac", 21 | "size" : "32x32", 22 | "scale" : "2x" 23 | }, 24 | { 25 | "size" : "128x128", 26 | "idiom" : "mac", 27 | "filename" : "APPL.png", 28 | "scale" : "1x" 29 | }, 30 | { 31 | "idiom" : "mac", 32 | "size" : "128x128", 33 | "scale" : "2x" 34 | }, 35 | { 36 | "idiom" : "mac", 37 | "size" : "256x256", 38 | "scale" : "1x" 39 | }, 40 | { 41 | "idiom" : "mac", 42 | "size" : "256x256", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "idiom" : "mac", 47 | "size" : "512x512", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "mac", 52 | "size" : "512x512", 53 | "scale" : "2x" 54 | } 55 | ], 56 | "info" : { 57 | "version" : 1, 58 | "author" : "xcode" 59 | } 60 | } -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/display.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "display.png", 5 | "idiom" : "mac", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "display@2x.png", 10 | "idiom" : "mac", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "author" : "xcode", 16 | "version" : 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/display.imageset/display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/display.imageset/display.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/display.imageset/display@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/display.imageset/display@2x.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/emulation.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "emulation.png", 5 | "idiom" : "mac", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "emulation@2x.png", 10 | "idiom" : "mac", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "author" : "xcode", 16 | "version" : 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/emulation.imageset/emulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/emulation.imageset/emulation.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/emulation.imageset/emulation@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/emulation.imageset/emulation@2x.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/files.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "files.png", 5 | "idiom" : "mac", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "files@2x.png", 10 | "idiom" : "mac", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "author" : "xcode", 16 | "version" : 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/files.imageset/files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/files.imageset/files.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/files.imageset/files@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/files.imageset/files@2x.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/gamepad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "gamepad.png", 5 | "idiom" : "mac", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "gamepad@2x.png", 10 | "idiom" : "mac", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "author" : "xcode", 16 | "version" : 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/gamepad.imageset/gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/gamepad.imageset/gamepad.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/gamepad.imageset/gamepad@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/gamepad.imageset/gamepad@2x.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/sound.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "sound.png", 5 | "idiom" : "mac", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "sound@2x.png", 10 | "idiom" : "mac", 11 | "scale" : "2x" 12 | } 13 | ], 14 | "info" : { 15 | "author" : "xcode", 16 | "version" : 1 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/sound.imageset/sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/sound.imageset/sound.png -------------------------------------------------------------------------------- /macosx/Snes9x/Assets.xcassets/sound.imageset/sound@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/Snes9x/Assets.xcassets/sound.imageset/sound@2x.png -------------------------------------------------------------------------------- /macosx/Snes9x/Cheats/S9xCheatFinderViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2023 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | #import 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | @protocol S9xCheatFinderDelegate 28 | - (void)addedCheat; 29 | @end 30 | 31 | @interface S9xCheatFinderViewController : NSViewController 32 | 33 | @property (nonatomic, strong) S9xEngine *engine; 34 | @property (nonatomic, weak) id delegate; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /macosx/Snes9x/Cheats/S9xCheatsViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2022 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xCheatsViewController : NSViewController 26 | - (void)deselectAll; 27 | - (void)reloadData; 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /macosx/Snes9x/Cheats/S9xHexNumberFormatter.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2023 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xHexNumberFormatter : NSNumberFormatter 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xApplication.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xApplication : NSApplication 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xApplication.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xApplication.h" 22 | #import "AppDelegate.h" 23 | 24 | @implementation S9xApplication 25 | 26 | - (void)sendEvent:(NSEvent *)event 27 | { 28 | if (event.modifierFlags * NSEventModifierFlagCommand && event.type == NSEventTypeKeyUp && ((AppDelegate *)self.delegate).isRunningEmulation) 29 | { 30 | [self.keyWindow sendEvent:event]; 31 | } 32 | else 33 | { 34 | [super sendEvent:event]; 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xOpenMultipleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // S9xOpenMultipleViewController.h 3 | // Snes9x 4 | // 5 | // Created by Buckley on 3/25/23. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface S9xOpenMultipleViewController : NSViewController 13 | 14 | @property (nonatomic, strong) NSURL *fileURL1; 15 | @property (nonatomic, strong) NSURL *fileURL2; 16 | 17 | @property (nonatomic, strong) void(^completionBlock)(NSArray *fileURLs); 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xButtonConfigTextField.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | @class S9xJoypadInput; 24 | 25 | NS_ASSUME_NONNULL_BEGIN 26 | 27 | @interface S9xButtonConfigTextField : NSSearchField 28 | 29 | @property (nonatomic, assign) CGKeyCode keyCode; 30 | @property (nonatomic, strong, nullable) S9xJoypadInput *joypadInput; 31 | @property (nonatomic, assign) BOOL disableKeyboardInput; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xControlsPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xControlsPreferencesViewController : S9xPreferencesViewController 26 | - (BOOL)handleInput:(S9xJoypadInput *)input fromJoypad:(S9xJoypad *)joypad; 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xDisplayPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xDisplayPreferencesViewController : S9xPreferencesViewController 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xEmulationPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xEmulationPreferencesViewController : S9xPreferencesViewController 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xFilesPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xFilesPreferencesViewController : S9xPreferencesViewController 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xFilesPreferencesViewController.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xFilesPreferencesViewController.h" 22 | 23 | @interface S9xFilesPreferencesViewController () 24 | 25 | @end 26 | 27 | @implementation S9xFilesPreferencesViewController 28 | 29 | - (instancetype)init 30 | { 31 | if (self = [super initWithNibName:@"S9xFilesPreferencesViewController" bundle:nil]) 32 | { 33 | self.title = NSLocalizedString(@"Files", nil); 34 | self.image = [NSImage imageNamed:@"files"]; 35 | } 36 | 37 | return self; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xPreferencesTabViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xPreferencesTabViewController : NSTabViewController 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xPreferencesViewController : NSViewController 26 | 27 | - (void)refresh; 28 | 29 | @property (nonatomic, strong) NSImage *image; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xPreferencesViewController.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | @interface S9xPreferencesViewController () 24 | 25 | @end 26 | 27 | @implementation S9xPreferencesViewController 28 | 29 | - (void)viewWillAppear 30 | { 31 | [super viewWillAppear]; 32 | [self refresh]; 33 | } 34 | 35 | - (void)refresh 36 | { 37 | // Implemented by subclasses. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xPreferencesWindowController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | #import "S9xButtonConfigTextField.h" 23 | 24 | NS_ASSUME_NONNULL_BEGIN 25 | 26 | @interface S9xPreferencesWindowController : NSWindowController 27 | - (BOOL)handleInput:(S9xJoypadInput *)input fromJoypad:(S9xJoypad *)joypad; 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xSoundPreferencesViewController.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPreferencesViewController.h" 22 | 23 | NS_ASSUME_NONNULL_BEGIN 24 | 25 | @interface S9xSoundPreferencesViewController : S9xPreferencesViewController 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPreferences/S9xSoundPreferencesViewController.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 - 2021 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xSoundPreferencesViewController.h" 22 | 23 | @interface S9xSoundPreferencesViewController () 24 | 25 | @end 26 | 27 | @implementation S9xSoundPreferencesViewController 28 | 29 | - (instancetype)init 30 | { 31 | if (self = [super initWithNibName:@"S9xSoundPreferencesViewController" bundle:nil]) 32 | { 33 | self.title = NSLocalizedString(@"Sound", nil); 34 | self.image = [NSImage imageNamed:@"sound"]; 35 | } 36 | 37 | return self; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /macosx/Snes9x/S9xPrefsConstants.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import "S9xPrefsConstants.h" 22 | 23 | NSString * const kKeyboardPrefs = @"KeyboardConfig"; 24 | NSString * const kJoypadInputPrefs = @"JoypadInputs"; 25 | NSString * const kJoypadPlayerPrefs = @"JoypadPlayers"; 26 | NSString * const kShowFPSPref = @"ShowFPS"; 27 | NSString * const kVideoModePref = @"VideoMode"; 28 | NSString * const kDeviceSettingPref = @"DeviceSetting"; 29 | -------------------------------------------------------------------------------- /macosx/Snes9x/Snes9x.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /macosx/Snes9x/Snes9xDebug.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /macosx/Snes9x/main.m: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | #import 22 | 23 | int main(int argc, const char * argv[]) { 24 | return NSApplicationMain(argc, argv); 25 | } 26 | -------------------------------------------------------------------------------- /macosx/docs/readme-mac.txt: -------------------------------------------------------------------------------- 1 | The manual is in 'Help' menu - 'Snes9x Help'. -------------------------------------------------------------------------------- /macosx/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | CFBundleName = "Snes9x"; 4 | CFBundleShortVersionString = "1.63"; 5 | CFBundleGetInfoString = "Snes9x 1.63, Copyright 1996-2023 Snes9x developers."; 6 | -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/Snes9x Help.helpindex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/en.lproj/Snes9x Help/Snes9x Help.helpindex -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/gfx/s9xic128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/en.lproj/Snes9x Help/gfx/s9xic128.png -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/gfx/s9xic16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/en.lproj/Snes9x Help/gfx/s9xic16.png -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/pgs/03.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Requirements 9 | 10 | 11 |

Requirements

12 |

System Requirements

13 |

14 | Mac OS X 10.12 or later
15 |

16 |

Software

17 |

18 | You will need access to SNES ROM images otherwise you will have nothing to run! Some home-brewed ROM images can be downloaded from http://www.zophar.com/.
19 | Please note, it is illegal in most countries to have commercial ROM images without also owning the actual SNES ROM cartridges, and even then you may be liable under various EULAs. 20 |

21 |

22 | <Prev  Top  Next> 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/pgs/11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Compatibility 9 | 10 | 11 |

Compatibility

12 |

Compatibility with Other Ports

13 |

14 | All the files generated by Snes9x are compatible between platforms, except for the extension of the freeze files. The only one difference is that Mac port puts the thumbnail screenshot into the resource fork of freeze and movie files, but the resource fork is usually deleted or separated when you send the file to your friends who use a PC. 15 |

16 |

Compatibility with Other SNES Emulators

17 |

18 | Cheat files (.cht) are common between Snes9x and ZSNES. RTC files (.rtc) are common between Snes9x and bsnes. SRAM files (.srm) should be common among all SNES emulators. 19 |

20 |

21 | <Prev  Top  Next> 22 |

23 | 24 | 25 | -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/pgs/14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | References 9 | 10 | 11 |

Preferences

12 |

Many preferences have not yet been ported to the Cocoa version of Snes9x. If there is a preference you want to see added, please upvote an existing issue if it exists, or create a new one of no issue exists, at https://github.com/snes9xgit/snes9x/issues.

13 |
14 |
Video Mode
15 |
Choose the image scaling filter which is applied to the raw SNES image.
16 |
Show Frame Rate
17 |
Toggles display of the frame rate on/off.
18 |
19 |

20 | <Prev  Top  Next> 21 |

22 | 23 | 24 | -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/sty/style.css: -------------------------------------------------------------------------------- 1 | /* */ 2 | 3 | a:hover 4 | { 5 | text-decoration: underline; 6 | } 7 | 8 | h1 9 | { 10 | font-size: 14pt; 11 | font-family: "Lucida Grande", Helvetica, Arial; 12 | } 13 | 14 | h2 15 | { 16 | font-size: 12pt; 17 | font-family: "Lucida Grande", Helvetica, Arial; 18 | } 19 | 20 | h3 21 | { 22 | font-size: 10pt; 23 | font-family: "Lucida Grande", Helvetica, Arial; 24 | margin-top: 3em; 25 | } 26 | 27 | h4 28 | { 29 | font-size: 9pt; 30 | font-family: "Lucida Grande", Helvetica, Arial; 31 | } 32 | 33 | p 34 | { 35 | font-size: 9pt; 36 | font-family: "Lucida Grande", Helvetica, Arial; 37 | } 38 | 39 | table 40 | { 41 | font-size: 9pt; 42 | font-family: "Lucida Grande", Helvetica, Arial; 43 | } 44 | 45 | ul 46 | { 47 | font-size: 9pt; 48 | font-family: "Lucida Grande", Helvetica, Arial; 49 | padding-left: 3em; 50 | } 51 | 52 | dl 53 | { 54 | font-size: 9pt; 55 | font-family: "Lucida Grande", Helvetica, Arial; 56 | padding-left: 3em; 57 | } 58 | 59 | dd 60 | { 61 | margin-bottom: 0.5em; 62 | } 63 | -------------------------------------------------------------------------------- /macosx/en.lproj/Snes9x Help/sty/top.css: -------------------------------------------------------------------------------- 1 | /* */ 2 | 3 | a 4 | { 5 | color: gray; 6 | font-family: "Lucida Grande", Helvetica, Arial; 7 | text-decoration: none; 8 | } 9 | 10 | a:hover 11 | { 12 | text-decoration: underline; 13 | } 14 | 15 | h1 16 | { 17 | color: gray; 18 | font-size: 20pt; 19 | font-family: "Lucida Grande", Helvetica, Arial; 20 | margin: 0px 10px 10px 10px; 21 | letter-spacing: -1pt; 22 | padding-top: 20px; 23 | } 24 | 25 | h2 26 | { 27 | color: gray; 28 | font-weight: 300; 29 | font-size: 8pt; 30 | font-family: "Lucida Grande", Helvetica, Arial; 31 | margin-bottom: -12px; 32 | padding-left: 6px; 33 | } 34 | 35 | ul 36 | { 37 | color: gray; 38 | font-size: 12pt; 39 | font-family: "Lucida Grande", Helvetica, Arial; 40 | margin-left: -8px; 41 | padding-top: 18px; 42 | padding-bottom: 18px; 43 | border-left: 1px solid gray; 44 | list-style-type: none; 45 | } 46 | 47 | #contentleft 48 | { 49 | float: left; 50 | margin-top: 76px; 51 | width: 230px; 52 | } 53 | 54 | #contentright 55 | { 56 | float: left; 57 | margin-top: 14px; 58 | width: 230px; 59 | } 60 | 61 | #frame 62 | { 63 | text-align: left; 64 | margin-top: 10px; 65 | margin-right: auto; 66 | margin-left: auto; 67 | width: 460px; 68 | } 69 | -------------------------------------------------------------------------------- /macosx/folder_Freezes.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/folder_Freezes.icns -------------------------------------------------------------------------------- /macosx/folder_SRAMs.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/folder_SRAMs.icns -------------------------------------------------------------------------------- /macosx/freeze_defrost.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/freeze_defrost.aiff -------------------------------------------------------------------------------- /macosx/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/icons.png -------------------------------------------------------------------------------- /macosx/libHIDUtilities_u.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/libHIDUtilities_u.a -------------------------------------------------------------------------------- /macosx/libz_u.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/libz_u.a -------------------------------------------------------------------------------- /macosx/logo_defrost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/logo_defrost.png -------------------------------------------------------------------------------- /macosx/logo_freeze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/logo_freeze.png -------------------------------------------------------------------------------- /macosx/mac-audio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_audio_h_ 23 | #define _mac_audio_h_ 24 | 25 | extern int cureffect; 26 | 27 | void InitMacSound (void); 28 | void DeinitMacSound (void); 29 | void MacStartSound (void); 30 | void MacStopSound (void); 31 | void ConfigureSoundEffects (void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /macosx/mac-cart.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_cart_h_ 23 | #define _mac_cart_h_ 24 | 25 | #import 26 | 27 | NSURL *NavOpenROMImage (); 28 | NSURL *NavChooseFolderSheet (NSWindow *); 29 | NSURL *NavFreezeTo (); 30 | NSURL *NavDefrostFrom (); 31 | NSURL *NavRecordMovieTo (); 32 | NSURL *NavPlayMovieFrom (); 33 | NSURL *NavQTMovieRecordTo (); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /macosx/mac-client.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | ***********************************************************************************/ 19 | 20 | 21 | #ifndef _mac_client_h_ 22 | #define _mac_client_h_ 23 | 24 | void NPClientInit (void); 25 | void NPClientDisconnect (void); 26 | void NPClientStoreConfig (void); 27 | void NPClientRestoreConfig (void); 28 | void NPClientDetachNetPlayThread (void); 29 | void NPClientStopNetPlayThread (void); 30 | void NPClientProcessInput (void); 31 | bool8 NPClientNetPlayWaitStart (void); 32 | bool8 NPClientDialog (void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /macosx/mac-file.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_file_h_ 23 | #define _mac_file_h_ 24 | 25 | void CheckSaveFolder (NSURL *); 26 | void ChangeTypeAndCreator (const char *, OSType, OSType); 27 | const char * S9xGetSPCFilename (void); 28 | const char * S9xGetPNGFilename (void); 29 | const char * S9xGetFreezeFilename (int); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /macosx/mac-global_prefix.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #undef READ_WORD 23 | #undef READ_3WORD 24 | #undef READ_DWORD 25 | #undef WRITE_WORD 26 | #undef WRITE_3WORD 27 | #undef WRITE_DWORD 28 | 29 | #define ZLIB 30 | #define UNZIP_SUPPORT 31 | #define JMA_SUPPORT 32 | #define USE_OPENGL 33 | #define RIGHTSHIFT_IS_SAR 34 | #define HAVE_STDINT_H 35 | //#define DEBUGGER 36 | 37 | #define __MACOSX__ 38 | -------------------------------------------------------------------------------- /macosx/mac-gworld.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_gworld_h_ 23 | #define _mac_gworld_h_ 24 | 25 | void DrawSubCGImage (CGContextRef, CGImageRef, CGRect, CGRect); 26 | void CreateIconImages (void); 27 | void ReleaseIconImages (void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /macosx/mac-prefix.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_prefix_h_ 23 | #define _mac_prefix_h_ 24 | 25 | #define MAC_PATH_SEPARATOR "/" 26 | #define MAC_PATH_SEP_CHAR '/' 27 | 28 | #define kMacS9XCFString CFSTR("Snes9x") 29 | 30 | #define MAC_VERSION "113" 31 | 32 | #include 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /macosx/mac-quicktime.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | ***********************************************************************************/ 19 | 20 | 21 | #ifndef _mac_quicktime_h_ 22 | #define _mac_quicktime_h_ 23 | 24 | void MacQTStartRecording (char *); 25 | void MacQTStopRecording (void); 26 | void MacQTRecordFrame (int, int); 27 | void MacQTVideoConfig (void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /macosx/mac-render.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_render_h_ 23 | #define _mac_render_h_ 24 | 25 | void InitGraphics (void); 26 | void DeinitGraphics (void); 27 | void DrawFreezeDefrostScreen (uint8 *); 28 | void GetGameDisplay (int *, int *); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /macosx/mac-screenshot.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_scheenshot_h_ 23 | #define _mac_scheenshot_h_ 24 | 25 | void WriteThumbnailToExtendedAttribute (const char *path, int destWidth, int destHeight); 26 | void DrawThumbnailFromExtendedAttribute(const char *path, CGContextRef, CGRect); 27 | CGImageRef CreateGameScreenCGImage (void); 28 | CGImageRef CreateBlitScreenCGImage (int, int, int, uint8 *); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /macosx/mac-server.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | ***********************************************************************************/ 19 | 20 | 21 | #ifndef _mac_server_h_ 22 | #define _mac_server_h_ 23 | 24 | void NPServerInit (void); 25 | void NPServerStopServer (void); 26 | void NPServerDetachNetPlayThread (void); 27 | void NPServerStopNetPlayThread (void); 28 | void NPServerStartClients (void); 29 | void NPServerProcessInput (void); 30 | bool8 NPServerStartServer (int); 31 | bool8 NPServerDialog (void); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /macosx/mac-stringtools.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | /*********************************************************************************** 8 | SNES9X for Mac OS (c) Copyright John Stiles 9 | 10 | Snes9x for Mac OS X 11 | 12 | (c) Copyright 2001 - 2011 zones 13 | (c) Copyright 2002 - 2005 107 14 | (c) Copyright 2002 PB1400c 15 | (c) Copyright 2004 Alexander and Sander 16 | (c) Copyright 2004 - 2005 Steven Seeger 17 | (c) Copyright 2005 Ryan Vogt 18 | (c) Copyright 2019 Michael Donald Buckley 19 | ***********************************************************************************/ 20 | 21 | 22 | #ifndef _mac_stringtools_h_ 23 | #define _mac_stringtools_h_ 24 | 25 | CFStringRef CopyFixNameStrings (const char *, uint8); 26 | const char * GetMultiByteCharacters (CFStringRef, int); 27 | #ifdef MAC_TIGER_PANTHER_SUPPORT 28 | OSStatus CreateATSUIStyleFromFontFullNameAndSize (const char *, int, ATSUStyle *); 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /macosx/musicbox_effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_effect.png -------------------------------------------------------------------------------- /macosx/musicbox_indicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_indicator.png -------------------------------------------------------------------------------- /macosx/musicbox_ledoff.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_ledoff.icns -------------------------------------------------------------------------------- /macosx/musicbox_ledon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_ledon.icns -------------------------------------------------------------------------------- /macosx/musicbox_pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_pause.png -------------------------------------------------------------------------------- /macosx/musicbox_rewind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/macosx/musicbox_rewind.png -------------------------------------------------------------------------------- /macosx/snes9x framework/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /macosx/snes9x framework/snes9x_framework.h: -------------------------------------------------------------------------------- 1 | // 2 | // snes9x_framework.h 3 | // snes9x framework 4 | // 5 | // Created by Buckley on 7/4/19. 6 | // 7 | 8 | #import 9 | 10 | 11 | //! Project version number for snes9x_framework. 12 | FOUNDATION_EXPORT double snes9x_frameworkVersionNumber; 13 | 14 | //! Project version string for snes9x_framework. 15 | FOUNDATION_EXPORT const unsigned char snes9x_frameworkVersionString[]; 16 | 17 | #import 18 | #import 19 | #import 20 | 21 | -------------------------------------------------------------------------------- /macosx/snes9x.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macosx/snes9x.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macosx/snes9x.xcodeproj/project.xcworkspace/xcuserdata/buckley.xcuserdatad/IDEFindNavigatorScopes.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /obc1.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _OBC1_H_ 8 | #define _OBC1_H_ 9 | 10 | struct SOBC1 11 | { 12 | uint16 address; 13 | uint16 basePtr; 14 | uint16 shift; 15 | }; 16 | 17 | extern struct SOBC1 OBC1; 18 | 19 | void S9xSetOBC1 (uint8, uint16); 20 | uint8 S9xGetOBC1 (uint16); 21 | void S9xResetOBC1 (void); 22 | uint8 * S9xGetBasePointerOBC1 (uint16); 23 | uint8 * S9xGetMemPointerOBC1 (uint16); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /qt/scripts/cmake-qt-base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PARAMS="-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/Qt -DFEATURE_androiddeployqt=OFF -DFEATURE_brotli=OFF -DFEATURE_dbus=OFF -DFEATURE_freetype=OFF -DFEATURE_harfbuzz=OFF -DFEATURE_imageformat_ppm=OFF -DFEATURE_islamiccivilcalendar=OFF -DFEATURE_jalalicalendar=OFF -DFEATURE_lcdnumber=OFF -DFEATURE_movie=OFF -DFEATURE_openssl_linked=OFF -DFEATURE_openssl_runtime=OFF -DFEATURE_optimize_size=ON -DFEATURE_pdf=ON -DFEATURE_printsupport=ON -DFEATURE_printer=ON -DFEATURE_shani=OFF -DFEATURE_sql=OFF -DFEATURE_static=ON -DFEATURE_system_doubleconversion=OFF -DFEATURE_system_freetype=OFF -DFEATURE_system_harfbuzz=OFF -DFEATURE_system_jpeg=OFF -DFEATURE_system_libb2=OFF -DFEATURE_system_pcre2=OFF -DFEATURE_system_png=OFF -DFEATURE_system_proxies=OFF -DFEATURE_system_textmarkdownreader=OFF -DFEATURE_system_zlib=OFF -DFEATURE_testlib=OFF -DFEATURE_textodfwriter=OFF -DFEATURE_vkgen=OFF -DFEATURE_vulkan=OFF -DFEATURE_zstd=OFF -DQT_BUILD_EXAMPLES_BY_DEFAULT=OFF -DQT_BUILD_TESTS_BY_DEFAULT=OFF" 3 | cmake .. -G Ninja $PARAMS 4 | -------------------------------------------------------------------------------- /qt/scripts/cmake-qt-other.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | CMAKE_PREFIX_PATH=../../../qt/lib/cmake cmake .. -G Ninja $PARAMS 3 | -------------------------------------------------------------------------------- /qt/scripts/cmake-qt-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PARAMS="-DFEATURE_clang=OFF -DFEATURE_clangcpp=OFF -DFEATURE_designer=off -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF -DFEATURE_qdoc=OFF" 3 | 4 | CMAKE_PREFIX_PATH=../../../qt/lib/cmake cmake .. -G Ninja $PARAMS 5 | -------------------------------------------------------------------------------- /qt/src/BindingPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "EmuBinding.hpp" 6 | 7 | class EmuApplication; 8 | 9 | class BindingPanel : public QWidget 10 | { 11 | public: 12 | BindingPanel(EmuApplication *app); 13 | ~BindingPanel(); 14 | void setTableWidget(QTableWidget *bindingTableWidget, EmuBinding *binding, int width, int height); 15 | void cellActivated(int row, int column); 16 | void handleKeyPressEvent(QKeyEvent *event); 17 | void updateCellFromBinding(int row, int column); 18 | void showEvent(QShowEvent *event) override; 19 | void hideEvent(QHideEvent *event) override; 20 | void fillTable(); 21 | void checkJoypadInput(); 22 | void finalizeCurrentBinding(EmuBinding b); 23 | void setRedirectInput(bool redirect); 24 | void onJoypadsChanged(std::function func); 25 | 26 | bool awaiting_binding; 27 | bool accept_return; 28 | int table_width; 29 | int table_height; 30 | int cell_row; 31 | int cell_column; 32 | QIcon keyboard_icon; 33 | QIcon joypad_icon; 34 | std::unique_ptr timer; 35 | EmuApplication *app; 36 | QTableWidget *binding_table_widget; 37 | EmuBinding *binding; 38 | std::function joypads_changed; 39 | }; -------------------------------------------------------------------------------- /qt/src/CheatsDialog.hpp: -------------------------------------------------------------------------------- 1 | #include "ui_CheatsDialog.h" 2 | 3 | class EmuApplication; 4 | 5 | class CheatsDialog : public QDialog, public Ui_Dialog 6 | { 7 | public: 8 | CheatsDialog(QWidget *parent, EmuApplication *app); 9 | void addCode(); 10 | void removeCode(); 11 | void updateCurrent(); 12 | void disableAll(); 13 | void removeAll(); 14 | void searchDatabase(); 15 | void refreshList(); 16 | void showEvent(QShowEvent *) override; 17 | EmuApplication *app; 18 | void resizeEvent(QResizeEvent *event) override; 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /qt/src/ControllerPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_ControllerPanel.h" 3 | #include "BindingPanel.hpp" 4 | #include 5 | 6 | class EmuApplication; 7 | 8 | class ControllerPanel : 9 | public Ui::ControllerPanel, 10 | public BindingPanel 11 | { 12 | public: 13 | ControllerPanel(EmuApplication *app); 14 | ~ControllerPanel(); 15 | void showEvent(QShowEvent *event) override; 16 | void clearAllControllers(); 17 | void clearCurrentController(); 18 | void autoPopulateWithKeyboard(int slot); 19 | void autoPopulateWithJoystick(int joystick_id, int slot); 20 | void swapControllers(int first, int second); 21 | void recreateAutoAssignMenu(); 22 | 23 | QMenu edit_menu; 24 | QMenu auto_assign_menu; 25 | }; -------------------------------------------------------------------------------- /qt/src/DisplayPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_DisplayPanel.h" 3 | #include "EmuApplication.hpp" 4 | 5 | class DisplayPanel : 6 | public Ui::DisplayPanel, 7 | public QWidget 8 | { 9 | public: 10 | DisplayPanel(EmuApplication *app); 11 | ~DisplayPanel(); 12 | void showEvent(QShowEvent *event) override; 13 | void populateDevices(); 14 | void selectShaderDialog(); 15 | 16 | std::vector> driver_list; 17 | bool updating = true; 18 | 19 | EmuApplication *app; 20 | }; -------------------------------------------------------------------------------- /qt/src/EmuCanvasQt.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __EMU_CANVAS_QT_HPP 2 | #define __EMU_CANVAS_QT_HPP 3 | 4 | #include "EmuCanvas.hpp" 5 | 6 | #include 7 | #include 8 | 9 | class EmuCanvasQt : public EmuCanvas 10 | { 11 | public: 12 | EmuCanvasQt(EmuConfig *config, QWidget *main_window); 13 | ~EmuCanvasQt(); 14 | 15 | virtual void deinit() override; 16 | virtual void draw() override; 17 | 18 | void paintEvent(QPaintEvent *event) override; 19 | void resizeEvent(QResizeEvent *event) override; 20 | 21 | std::mutex qimage_mutex; 22 | QImage qimage; 23 | }; 24 | 25 | #endif -------------------------------------------------------------------------------- /qt/src/EmuSettingsWindow.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ui_EmuSettingsWindow.h" 4 | #include "EmuApplication.hpp" 5 | #include "GeneralPanel.hpp" 6 | #include "DisplayPanel.hpp" 7 | #include "SoundPanel.hpp" 8 | #include "EmulationPanel.hpp" 9 | #include "ControllerPanel.hpp" 10 | #include "FoldersPanel.hpp" 11 | #include "ShortcutsPanel.hpp" 12 | 13 | class EmuSettingsWindow 14 | : public QDialog, 15 | public Ui::EmuSettingsWindow 16 | { 17 | public: 18 | EmuSettingsWindow(QWidget *parent, EmuApplication *app); 19 | ~EmuSettingsWindow(); 20 | void show(int page); 21 | 22 | EmuApplication *app; 23 | GeneralPanel *general_panel; 24 | DisplayPanel *display_panel; 25 | SoundPanel *sound_panel; 26 | EmulationPanel *emulation_panel; 27 | ControllerPanel *controller_panel; 28 | ShortcutsPanel *shortcuts_panel; 29 | FoldersPanel *folders_panel; 30 | }; -------------------------------------------------------------------------------- /qt/src/EmulationPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_EmulationPanel.h" 3 | 4 | class EmuApplication; 5 | 6 | class EmulationPanel : 7 | public Ui::EmulationPanel, 8 | public QWidget 9 | { 10 | public: 11 | EmulationPanel(EmuApplication *app); 12 | ~EmulationPanel(); 13 | void showEvent(QShowEvent *event) override; 14 | 15 | EmuApplication *app; 16 | }; -------------------------------------------------------------------------------- /qt/src/FoldersPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_FoldersPanel.h" 3 | #include "EmuApplication.hpp" 4 | 5 | class FoldersPanel : 6 | public Ui::FoldersPanel, 7 | public QWidget 8 | { 9 | public: 10 | FoldersPanel(EmuApplication *app); 11 | ~FoldersPanel(); 12 | void showEvent(QShowEvent *event) override; 13 | void connectEntry(QComboBox *combo, QLineEdit *lineEdit, QPushButton *browse, int *location, std::string *folder); 14 | void refreshEntry(QComboBox *combo, QLineEdit *lineEdit, QPushButton *browse, int *location, std::string *folder); 15 | void refreshData(); 16 | EmuApplication *app; 17 | }; -------------------------------------------------------------------------------- /qt/src/GeneralPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_GeneralPanel.h" 3 | #include "EmuApplication.hpp" 4 | 5 | class GeneralPanel : 6 | public Ui::GeneralPanel, 7 | public QWidget 8 | { 9 | public: 10 | GeneralPanel(EmuApplication *app); 11 | ~GeneralPanel(); 12 | void showEvent(QShowEvent *event) override; 13 | 14 | EmuApplication *app; 15 | }; -------------------------------------------------------------------------------- /qt/src/ShaderParametersDialog.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "EmuCanvas.hpp" 8 | #include "EmuConfig.hpp" 9 | 10 | class ShaderParametersDialog : public QDialog 11 | { 12 | public: 13 | ShaderParametersDialog(EmuCanvas *parent, std::vector *parameters); 14 | ~ShaderParametersDialog(); 15 | 16 | void refreshWidgets(); 17 | void showEvent(QShowEvent *event) override; 18 | void closeEvent(QCloseEvent *event) override; 19 | void resizeEvent(QResizeEvent *event) override; 20 | void save(); 21 | void saveAs(); 22 | 23 | std::vector> widgets; 24 | std::vector saved_parameters; 25 | std::vector *parameters; 26 | 27 | EmuCanvas *canvas = nullptr; 28 | EmuConfig *config = nullptr; 29 | }; -------------------------------------------------------------------------------- /qt/src/ShortcutsPanel.cpp: -------------------------------------------------------------------------------- 1 | #include "ShortcutsPanel.hpp" 2 | #include "EmuConfig.hpp" 3 | 4 | ShortcutsPanel::ShortcutsPanel(EmuApplication *app_) 5 | : BindingPanel(app_) 6 | { 7 | setupUi(this); 8 | setTableWidget(tableWidget_shortcuts, 9 | app->config->binding.shortcuts, 10 | app->config->allowed_bindings, 11 | app->config->num_shortcuts); 12 | 13 | toolButton_reset_to_default->setPopupMode(QToolButton::InstantPopup); 14 | 15 | for (auto slot = 0; slot < app->config->allowed_bindings; slot++) 16 | { 17 | auto action = reset_to_default_menu.addAction(tr("Slot %1").arg(slot)); 18 | QObject::connect(action, &QAction::triggered, [&, slot](bool checked) { 19 | setDefaultKeys(slot); 20 | }); 21 | } 22 | toolButton_reset_to_default->setMenu(&reset_to_default_menu); 23 | 24 | connect(pushButton_clear_all, &QAbstractButton::clicked, [&](bool) { 25 | for (auto &b : app->config->binding.shortcuts) 26 | b = {}; 27 | fillTable(); 28 | }); 29 | 30 | fillTable(); 31 | } 32 | 33 | ShortcutsPanel::~ShortcutsPanel() 34 | { 35 | } 36 | 37 | void ShortcutsPanel::setDefaultKeys(int slot) 38 | { 39 | for (int i = 0; i < app->config->num_shortcuts; i++) 40 | { 41 | std::string str = EmuConfig::getDefaultShortcutKeys()[i]; 42 | if (!str.empty()) 43 | app->config->binding.shortcuts[i * 4 + slot] = EmuBinding::from_config_string(str); 44 | } 45 | 46 | fillTable(); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /qt/src/ShortcutsPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_ShortcutsPanel.h" 3 | #include "EmuApplication.hpp" 4 | #include "BindingPanel.hpp" 5 | #include 6 | 7 | class ShortcutsPanel : 8 | public Ui::ShortcutsPanel, 9 | public BindingPanel 10 | { 11 | public: 12 | ShortcutsPanel(EmuApplication *app); 13 | ~ShortcutsPanel(); 14 | 15 | void setDefaultKeys(int slot); 16 | QMenu reset_to_default_menu; 17 | }; -------------------------------------------------------------------------------- /qt/src/SoftwareScalers.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void S9xForceHires(void *buffer, int pitch, int &width, int &height) 4 | { 5 | if (width <= 256) 6 | { 7 | for (int y = (height)-1; y >= 0; y--) 8 | { 9 | uint16_t *line = (uint16_t *)((uint8_t *)buffer + y * pitch); 10 | 11 | for (int x = (width * 2) - 1; x >= 0; x--) 12 | { 13 | *(line + x) = *(line + (x >> 1)); 14 | } 15 | } 16 | 17 | width *= 2; 18 | } 19 | } 20 | 21 | static inline uint16_t average_565(uint16_t colora, uint16_t colorb) 22 | { 23 | return (((colora) & (colorb)) + ((((colora) ^ (colorb)) & 0xF7DE) >> 1)); 24 | } 25 | void S9xMergeHires(void *buffer, int pitch, int &width, int &height) 26 | { 27 | if (width < 512) 28 | return; 29 | 30 | for (int y = 0; y < height; y++) 31 | { 32 | uint16_t *input = (uint16_t *)((uint8_t *)buffer + y * pitch); 33 | uint16_t *output = input; 34 | 35 | for (int x = 0; x < (width >> 1); x++) 36 | { 37 | *output++ = average_565(input[0], input[1]); 38 | input += 2; 39 | } 40 | } 41 | 42 | width >>= 1; 43 | } 44 | -------------------------------------------------------------------------------- /qt/src/SoftwareScalers.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | void S9xForceHires(void *buffer, int pitch, int &width, int &height); 4 | void S9xMergeHires(void *buffer, int pitch, int &width, int &height); -------------------------------------------------------------------------------- /qt/src/SoundPanel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ui_SoundPanel.h" 3 | #include "EmuApplication.hpp" 4 | #include 5 | 6 | class SoundPanel : 7 | public Ui::SoundPanel, 8 | public QWidget 9 | { 10 | public: 11 | SoundPanel(EmuApplication *app); 12 | ~SoundPanel(); 13 | EmuApplication *app; 14 | void showEvent(QShowEvent *event) override; 15 | void updateInputRate(); 16 | 17 | std::vector driver_list; 18 | }; -------------------------------------------------------------------------------- /qt/src/resources/blackicons/display.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/emulation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/exit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/folders.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/fullscreen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/keyboard.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/pause.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/reset.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/shader.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/blackicons/sound.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/snes9x-qt.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UTF-8 6 | PerMonitorV2 7 | true 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /qt/src/resources/snes9x.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/qt/src/resources/snes9x.ico -------------------------------------------------------------------------------- /qt/src/resources/snes9x_win32.rc: -------------------------------------------------------------------------------- 1 | 1 24 snes9x-qt.exe.manifest 2 | IDI_ICON1 ICON "snes9x.ico" 3 | 4 | #include 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION 1,62,3,0 7 | PRODUCTVERSION 1,62,3,0 8 | FILEFLAGSMASK 0x3fL 9 | BEGIN 10 | BLOCK "StringFileInfo" 11 | BEGIN 12 | BLOCK "040904E4" 13 | BEGIN 14 | VALUE "CompanyName", "http://www.snes9x.com" 15 | VALUE "FileDescription", "Snes9x" 16 | VALUE "FileVersion", "1.63" 17 | VALUE "InternalName", "Snes9x" 18 | VALUE "LegalCopyright", "Copyright (C) 1996-2023" 19 | VALUE "OriginalFilename", "snes9x-qt.exe" 20 | VALUE "ProductName", "Snes9x Qt Interface" 21 | VALUE "ProductVersion", "1.63" 22 | END 23 | END 24 | 25 | BLOCK "VarFileInfo" 26 | BEGIN 27 | VALUE "Translation", 0x409, 65001 28 | END 29 | END 30 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/display.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/emulation.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/exit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/folders.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/fullscreen.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/keyboard.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/pause.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/reset.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/settings.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/shader.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /qt/src/resources/whiteicons/sound.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sar.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SAR_H_ 8 | #define _SAR_H_ 9 | 10 | #ifdef RIGHTSHIFT_IS_SAR 11 | #define SAR(b, n) ((b) >> (n)) 12 | #else 13 | 14 | static inline int8 SAR (const int8 b, const int n) 15 | { 16 | #ifndef RIGHTSHIFT_int8_IS_SAR 17 | if (b < 0) 18 | return ((b >> n) | (-1 << (8 - n))); 19 | #endif 20 | return (b >> n); 21 | } 22 | 23 | static inline int16 SAR (const int16 b, const int n) 24 | { 25 | #ifndef RIGHTSHIFT_int16_IS_SAR 26 | if (b < 0) 27 | return ((b >> n) | (-1 << (16 - n))); 28 | #endif 29 | return (b >> n); 30 | } 31 | 32 | static inline int32 SAR (const int32 b, const int n) 33 | { 34 | #ifndef RIGHTSHIFT_int32_IS_SAR 35 | if (b < 0) 36 | return ((b >> n) | (-1 << (32 - n))); 37 | #endif 38 | return (b >> n); 39 | } 40 | 41 | static inline int64 SAR (const int64 b, const int n) 42 | { 43 | #ifndef RIGHTSHIFT_int64_IS_SAR 44 | if (b < 0) 45 | return ((b >> n) | (-1 << (64 - n))); 46 | #endif 47 | return (b >> n); 48 | } 49 | 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /screenshot.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SCREENSHOT_H_ 8 | #define _SCREENSHOT_H_ 9 | 10 | bool8 S9xDoScreenshot (int, int); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /sdd1.cpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #include "snes9x.h" 8 | #include "memmap.h" 9 | #include "sdd1.h" 10 | #include "display.h" 11 | 12 | 13 | void S9xSetSDD1MemoryMap (uint32 bank, uint32 value) 14 | { 15 | bank = 0xc00 + bank * 0x100; 16 | value = value * 1024 * 1024; 17 | 18 | for (int c = 0; c < 0x100; c += 16) 19 | { 20 | uint8 *block = &Memory.ROM[value + (c << 12)]; 21 | for (int i = c; i < c + 16; i++) 22 | Memory.Map[i + bank] = block; 23 | } 24 | } 25 | 26 | void S9xResetSDD1 (void) 27 | { 28 | memset(&Memory.FillRAM[0x4800], 0, 4); 29 | for (int i = 0; i < 4; i++) 30 | { 31 | Memory.FillRAM[0x4804 + i] = i; 32 | S9xSetSDD1MemoryMap(i, i); 33 | } 34 | } 35 | 36 | void S9xSDD1PostLoadState (void) 37 | { 38 | for (int i = 0; i < 4; i++) 39 | S9xSetSDD1MemoryMap(i, Memory.FillRAM[0x4804 + i]); 40 | } 41 | -------------------------------------------------------------------------------- /sdd1.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SDD1_H_ 8 | #define _SDD1_H_ 9 | 10 | void S9xSetSDD1MemoryMap (uint32, uint32); 11 | void S9xResetSDD1 (void); 12 | void S9xSDD1PostLoadState (void); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /sdd1emu.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SDD1EMU_H_ 8 | #define _SDD1EMU_H_ 9 | 10 | void SDD1_decompress (uint8 *, uint8 *, int); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /seta.cpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #include "snes9x.h" 8 | #include "seta.h" 9 | 10 | uint8 (*GetSETA) (uint32) = &S9xGetST010; 11 | void (*SetSETA) (uint32, uint8) = &S9xSetST010; 12 | 13 | 14 | uint8 S9xGetSetaDSP (uint32 Address) 15 | { 16 | return (GetSETA(Address)); 17 | } 18 | 19 | void S9xSetSetaDSP (uint8 Byte, uint32 Address) 20 | { 21 | SetSETA (Address, Byte); 22 | } 23 | -------------------------------------------------------------------------------- /sha256.h: -------------------------------------------------------------------------------- 1 | #ifndef __SHA256_H 2 | #define __SHA256_H 3 | 4 | void sha256sum (unsigned char *data, unsigned int length, unsigned char *hash); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /snapshot.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SNAPSHOT_H_ 8 | #define _SNAPSHOT_H_ 9 | 10 | #include "snes9x.h" 11 | 12 | #define SNAPSHOT_MAGIC "#!s9xsnp" 13 | #define SNAPSHOT_VERSION_IRQ 7 14 | #define SNAPSHOT_VERSION_BAPU 8 15 | #define SNAPSHOT_VERSION_IRQ_2018 11 // irq changes were introduced earlier, since this we store NextIRQTimer directly 16 | #define SNAPSHOT_VERSION 12 17 | 18 | #define SUCCESS 1 19 | #define WRONG_FORMAT (-1) 20 | #define WRONG_VERSION (-2) 21 | #define FILE_NOT_FOUND (-3) 22 | #define WRONG_MOVIE_SNAPSHOT (-4) 23 | #define NOT_A_MOVIE_SNAPSHOT (-5) 24 | #define SNAPSHOT_INCONSISTENT (-6) 25 | 26 | void S9xResetSaveTimer (bool8); 27 | bool8 S9xFreezeGame (const char *); 28 | uint32 S9xFreezeSize (void); 29 | bool8 S9xFreezeGameMem (uint8 *,uint32); 30 | bool8 S9xUnfreezeGame (const char *); 31 | int S9xUnfreezeGameMem (const uint8 *,uint32); 32 | void S9xFreezeToStream (STREAM); 33 | int S9xUnfreezeFromStream (STREAM); 34 | bool8 S9xUnfreezeScreenshot(const char *filename, uint16 **image_buffer, int &width, int &height); 35 | int S9xUnfreezeScreenshotFromStream(STREAM stream, uint16 **image_buffer, int &width, int &height); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /srtc.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _SRTC_H_ 8 | #define _SRTC_H_ 9 | 10 | struct SRTCData 11 | { 12 | uint8 reg[20]; 13 | }; 14 | 15 | // for snapshot only 16 | struct SSRTCSnapshot 17 | { 18 | int32 rtc_mode; // enum RTC_Mode 19 | int32 rtc_index; // signed 20 | }; 21 | 22 | extern struct SRTCData RTCData; 23 | extern struct SSRTCSnapshot srtcsnap; 24 | 25 | void S9xInitSRTC (void); 26 | void S9xResetSRTC (void); 27 | void S9xSRTCPreSaveState (void); 28 | void S9xSRTCPostLoadState (int); 29 | void S9xSetSRTC (uint8, uint16); 30 | uint8 S9xGetSRTC (uint16); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /srtcemu.h: -------------------------------------------------------------------------------- 1 | /***** 2 | * S-RTC emulation code 3 | * Copyright (c) byuu 4 | *****/ 5 | 6 | 7 | #ifndef _SRTCEMU_H_ 8 | #define _SRTCEMU_H_ 9 | 10 | class SRTC { 11 | public: 12 | void update_time(); 13 | unsigned weekday(unsigned year, unsigned month, unsigned day); 14 | 15 | void init(); 16 | void enable(); 17 | void power(); 18 | void reset(); 19 | 20 | uint8 mmio_read (unsigned addr); 21 | void mmio_write(unsigned addr, uint8 data); 22 | 23 | SRTC(); 24 | 25 | static const unsigned months[12]; 26 | enum RTC_Mode { RTCM_Ready, RTCM_Command, RTCM_Read, RTCM_Write } rtc_mode; 27 | signed rtc_index; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /statemanager.h: -------------------------------------------------------------------------------- 1 | #ifndef STATEMANAGER_H 2 | #define STATEMANAGER_H 3 | 4 | /* State Manager Class that records snapshot data for rewinding 5 | mostly based on SSNES's rewind code by Themaister 6 | */ 7 | 8 | #include "snes9x.h" 9 | 10 | class StateManager { 11 | private: 12 | uint64_t *buffer; 13 | size_t buf_size; 14 | size_t buf_size_mask; 15 | uint32_t *tmp_state; 16 | uint32_t *in_state; 17 | size_t top_ptr; 18 | size_t bottom_ptr; 19 | size_t state_size; 20 | size_t real_state_size; 21 | bool init_done; 22 | bool first_pop; 23 | 24 | void reassign_bottom(); 25 | void generate_delta(const void *data); 26 | void deallocate(); 27 | public: 28 | StateManager(); 29 | ~StateManager(); 30 | bool init(size_t buffer_size); 31 | int pop(); 32 | bool push(); 33 | }; 34 | 35 | #endif // STATEMANAGER_H 36 | -------------------------------------------------------------------------------- /tile.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef _TILE_H_ 8 | #define _TILE_H_ 9 | 10 | void S9xInitTileRenderer (void); 11 | void S9xSelectTileRenderers (int, bool8, bool8); 12 | void S9xSelectTileConverter (int, bool8, bool8, bool8); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /tileimpl-n1x1.cpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #define _TILEIMPL_CPP_ 8 | #include "tileimpl.h" 9 | 10 | namespace TileImpl { 11 | 12 | template 13 | void Normal1x1Base::Draw(int N, int M, uint32 Offset, uint32 OffsetInLine, uint8 Pix, uint8 Z1, uint8 Z2) 14 | { 15 | (void) OffsetInLine; 16 | if (Z1 > GFX.DB[Offset + N] && (M)) 17 | { 18 | GFX.S[Offset + N] = MATH::Calc(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + N], GFX.SubZBuffer[Offset + N]); 19 | GFX.DB[Offset + N] = Z2; 20 | } 21 | } 22 | 23 | 24 | // normal width 25 | template struct Renderers; 26 | template struct Renderers; 27 | template struct Renderers; 28 | template struct Renderers; 29 | template struct Renderers; 30 | template struct Renderers; 31 | template struct Renderers; 32 | template struct Renderers; 33 | 34 | } // namespace TileImpl 35 | -------------------------------------------------------------------------------- /unzip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def); 22 | void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def); 23 | void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def); 24 | void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /unzip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /win32/CSaveLoadWithPreviewDlg.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #pragma once 8 | #include "windows.h" 9 | 10 | #define NUM_DIALOG_SLOTS 10 11 | 12 | #define PREVIEW_IMAGE_WIDTH SNES_WIDTH 13 | #define PREVIEW_IMAGE_HEIGHT SNES_HEIGHT 14 | #define PREVIEW_WIDHT (PREVIEW_IMAGE_WIDTH + 10) 15 | #define PREVIEW_HEIGHT (PREVIEW_IMAGE_HEIGHT + 10) 16 | #define PREVIEW_TEXT_STATIC_HEIGHT 50 17 | 18 | class CSaveLoadWithPreviewDlg 19 | { 20 | private: 21 | static INT_PTR CALLBACK DlgLoadWithPreview(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); 22 | 23 | HBITMAP previewHbmps[NUM_DIALOG_SLOTS]; 24 | bool is_save_dialog; 25 | 26 | void delete_preview_bmps(); 27 | bool init_preview_bmps(); 28 | void load_current_bank(HWND hDlg); 29 | void load_slot_image_text(int slot, int bank, HWND hDlg); 30 | void init_window(HWND hDlg); 31 | 32 | public: 33 | CSaveLoadWithPreviewDlg(bool is_save_dialog = false); 34 | virtual ~CSaveLoadWithPreviewDlg(); 35 | 36 | int show(); 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /win32/CVulkan.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "IS9xDisplayOutput.h" 4 | #include "common/video/vulkan/vulkan_context.hpp" 5 | #include "common/video/vulkan/vulkan_shader_chain.hpp" 6 | #include "common/video/vulkan/vulkan_simple_output.hpp" 7 | #include 8 | 9 | class CVulkan : public IS9xDisplayOutput 10 | { 11 | private: 12 | HWND hWnd; 13 | std::unique_ptr context; 14 | std::vector filtered_image; 15 | std::unique_ptr shaderchain; 16 | std::string current_shadername; 17 | std::unique_ptr simple_output; 18 | 19 | vk::UniqueDescriptorPool imgui_descriptor_pool; 20 | 21 | int current_width; 22 | int current_height; 23 | 24 | public: 25 | bool InitImGui(); 26 | bool Initialize(HWND hWnd) override; 27 | void DeInitialize() override; 28 | void Render(SSurface Src) override; 29 | bool ChangeRenderSize(unsigned int newWidth, unsigned int newHeight) override; 30 | bool ApplyDisplayChanges(void) override; 31 | bool SetFullscreen(bool fullscreen) override; 32 | void SetSnes9xColorFormat() override; 33 | void EnumModes(std::vector* modeVector) override; 34 | std::vector *GetShaderParameters(void) override; 35 | std::function GetShaderParametersSaveFunction() override; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /win32/DumpAtEnd.cpp: -------------------------------------------------------------------------------- 1 | // uncomment to find memory leaks at end 2 | // #define CHECK_MEMORY_LEAKS 3 | 4 | // to also display file locations in some cases define _CRTDBG_MAP_ALLOC in the project properties 5 | 6 | #ifdef CHECK_MEMORY_LEAKS 7 | // hack to make sure this object is destructed last 8 | // msvc merges .CRT$XC in alphabetic order 9 | // might not work in other versions of MSVC 10 | #pragma init_seg(".CRT$XCB") 11 | struct CallDumpMemLeaksLast { 12 | ~CallDumpMemLeaksLast() { 13 | _CrtDumpMemoryLeaks(); 14 | } 15 | }; 16 | static CallDumpMemLeaksLast dump_last; 17 | #endif -------------------------------------------------------------------------------- /win32/IS9xDisplayOutput.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef IS9XDISPLAYOUTPUT_H 8 | #define IS9XDISPLAYOUTPUT_H 9 | #include "../port.h" 10 | #include "render.h" 11 | #include "wsnes9x.h" 12 | #include 13 | #include 14 | 15 | /* IS9xDisplayOutput 16 | Interface for display driver. 17 | */ 18 | class IS9xDisplayOutput 19 | { 20 | private: 21 | 22 | public: 23 | virtual bool Initialize(HWND hWnd)=0; 24 | virtual void DeInitialize()=0; 25 | virtual void Render(SSurface Src)=0; 26 | virtual bool ChangeRenderSize(unsigned int newWidth, unsigned int newHeight)=0; 27 | virtual bool ApplyDisplayChanges(void)=0; 28 | virtual bool SetFullscreen(bool fullscreen)=0; 29 | virtual void SetSnes9xColorFormat()=0; 30 | virtual void EnumModes(std::vector *modeVector)=0; 31 | virtual std::vector* GetShaderParameters(void) { return nullptr; } 32 | virtual std::function GetShaderParametersSaveFunction() { return std::function(); } 33 | }; 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /win32/InputCustom.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef CUSTCTRL_INCLUDED 8 | #define CUSTCTRL_INCLUDED 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | void InitInputCustomControl(void); 15 | HWND CreateInputCustom(HWND hwndParent); 16 | void InitKeyCustomControl(void); 17 | HWND CreateKeyCustom(HWND hwndParent); 18 | 19 | typedef struct 20 | { 21 | COLORREF crForeGnd; // Foreground text colour 22 | COLORREF crBackGnd; // Background text colour 23 | HFONT hFont; // The font 24 | HWND hwnd; // The control's window handle 25 | } InputCust; 26 | COLORREF CheckButtonKey( WORD Key); 27 | COLORREF CheckHotKey( WORD Key, int modifiers); 28 | InputCust * GetInputCustom(HWND hwnd); 29 | 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /win32/ddraw/ddraw_x64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/ddraw/ddraw_x64.lib -------------------------------------------------------------------------------- /win32/ddraw/ddraw_x86.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/ddraw/ddraw_x86.lib -------------------------------------------------------------------------------- /win32/glslang/SPIRV/SPVRemapper.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Source 6 | 7 | 8 | Source 9 | 10 | 11 | 12 | 13 | Source 14 | 15 | 16 | Source 17 | 18 | 19 | 20 | 21 | {4C2A0BE9-8B7C-3570-80FB-29A3780DFB5C} 22 | 23 | 24 | -------------------------------------------------------------------------------- /win32/glslang/glslang/OSDependent/Windows/OSDependent.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {4C2A0BE9-8B7C-3570-80FB-29A3780DFB5C} 12 | 13 | 14 | -------------------------------------------------------------------------------- /win32/image_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | typedef struct _STGA { 6 | _STGA() { 7 | data = (unsigned char*)0; 8 | width = 0; 9 | height = 0; 10 | byteCount = 0; 11 | } 12 | 13 | ~_STGA() { destroy(); } 14 | 15 | void destroy() { if (data) { delete[] data; data = 0; } } 16 | 17 | int width; 18 | int height; 19 | unsigned char byteCount; 20 | unsigned char* data; 21 | } STGA; 22 | 23 | bool loadPngImage(const TCHAR *name, int &outWidth, int &outHeight, bool &outHasAlpha, unsigned char **outData); 24 | bool loadTGA(const TCHAR *filename, STGA& tgaFile); 25 | bool d3d_create_texture_from_file(LPDIRECT3DDEVICE9 pDevice, LPCTSTR pSrcFile, LPDIRECT3DTEXTURE9 *ppTexture); 26 | -------------------------------------------------------------------------------- /win32/render.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef RENDER_H 8 | #define RENDER_H 9 | 10 | 11 | /* Render.h 12 | * ---------- 13 | * This file contains all the prototypes, structers and variables used and defined by render.cpp 14 | */ 15 | 16 | struct SSurface { 17 | unsigned char *Surface; 18 | 19 | unsigned int Pitch; 20 | unsigned int Width, Height; 21 | }; 22 | 23 | void RenderMethod(SSurface Src, SSurface Dst, RECT *); 24 | 25 | void SelectRenderMethod(); 26 | void InitRenderFilters(); 27 | void DeInitRenderFilters(); 28 | 29 | RECT GetFilterOutputSize(SSurface Src); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /win32/rsrc/bitmap2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/bitmap2.bmp -------------------------------------------------------------------------------- /win32/rsrc/cdd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/cdd.bmp -------------------------------------------------------------------------------- /win32/rsrc/closedfold.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/closedfold.bmp -------------------------------------------------------------------------------- /win32/rsrc/hd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/hd.bmp -------------------------------------------------------------------------------- /win32/rsrc/hiddir.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/hiddir.bmp -------------------------------------------------------------------------------- /win32/rsrc/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/icon1.ico -------------------------------------------------------------------------------- /win32/rsrc/icon2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/icon2.ico -------------------------------------------------------------------------------- /win32/rsrc/icon3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/icon3.ico -------------------------------------------------------------------------------- /win32/rsrc/icon4.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/icon4.ico -------------------------------------------------------------------------------- /win32/rsrc/nd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/nd.bmp -------------------------------------------------------------------------------- /win32/rsrc/nodrop.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/nodrop.cur -------------------------------------------------------------------------------- /win32/rsrc/openfold.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/openfold.bmp -------------------------------------------------------------------------------- /win32/rsrc/pad.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/pad.bmp -------------------------------------------------------------------------------- /win32/rsrc/ram.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/ram.bmp -------------------------------------------------------------------------------- /win32/rsrc/rd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/rd.bmp -------------------------------------------------------------------------------- /win32/rsrc/rodir.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/rodir.bmp -------------------------------------------------------------------------------- /win32/rsrc/ud.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snes9xgit/snes9x/97bc6b08b1da511fa449ecb412ca74fa54f4a3fb/win32/rsrc/ud.bmp -------------------------------------------------------------------------------- /win32/s9x.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | False 6 | 7 | 8 | 9 | 10 | 11 | $(XPDeprecationWarning) 12 | 13 | 14 | -------------------------------------------------------------------------------- /win32/win32_sound.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************\ 2 | Snes9x - Portable Super Nintendo Entertainment System (TM) emulator. 3 | This file is licensed under the Snes9x License. 4 | For further information, consult the LICENSE file in the root directory. 5 | \*****************************************************************************/ 6 | 7 | #ifndef WIN32_SOUND_H 8 | #define WIN32_SOUND_H 9 | 10 | #include 11 | #include 12 | 13 | bool ReInitSound(); 14 | void S9xSoundCallback(void *data); 15 | void CloseSoundDevice(); 16 | std::vector GetAvailableSoundDevices(); 17 | int FindAudioDeviceIndex(TCHAR *audio_device); 18 | 19 | #endif 20 | --------------------------------------------------------------------------------