Port to CMake

This commit is contained in:
LaserEyess 2024-05-19 16:20:40 -04:00
parent a41c2d8f00
commit 232906aac4
22 changed files with 272 additions and 1074 deletions

3
.gitattributes vendored
View File

@ -7,9 +7,6 @@
*.h text
*.cpp text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

13
.gitignore vendored
View File

@ -1,13 +1,10 @@
.DS_Store
*.dSYM
/.vs/
/packages/
/.vscode
/.cache
/saves/
*.o
/sm
/build/
/build*
/sm.smc
SDL2.dll
/sm.exe
/glsl-shaders/
/msu/
CMakeUserPresets.json
/vcpkg_installed

View File

@ -1,97 +1,98 @@
# Requirements
* A Super Metroid rom (Make sure to rename it to `sm.smc`)
* cmake (and also ninja, for better compiling speed)
* A Super Metroid rom (Make sure to rename it to `sm.smc`) which **must be in
the same folder as `sm`/`sm.exe`**
* libsdl2-dev
* Super Metroid repo `git clone --recursive https://github.com/snesrev/sm`
* Super Metroid repo `git clone --recursive https://github.com/testyourmine/sm_rewrite.git`
For Linux/MacOS you must install these for your desired OS:
* Ubuntu/Debian: `sudo apt install libsdl2-dev`
* Fedora Linux: `sudo dnf in sdl2-devel`
* Arch Linux: `sudo pacman -S sdl2`
* macOS: `brew install sdl2`
* Ubuntu/Debian: `sudo apt install libsdl2-dev cmake ninja-build`
* Fedora Linux: `sudo dnf in sdl2-devel cmake ninja-build`
* Arch Linux: `sudo pacman -S sdl2 cmake ninja`
* macOS: `brew install sdl2 cmake ninja`
# Windows
## Building with MSYS2
First, install [MSYS2](https://www.msys2.org/). After following the instructions,
install the following packages.
Dependencies and requirements:
* The `libsdl2-dev` library
* [MSYS2](https://www.msys2.org)
Note: *Make sure you're using MINGW64 and you're in `sm` folder in the terminal.*
1. Install MSYS2 on your machine.
2. Place the copy of your rom in the main directory.
3. Install the necessary dependencies by inputting this command in the terminal.
```sh
pacman -S mingw-w64-x86_64-SDL2 && pacman -S make && pacman -S mingw-w64-x86_64-gcc
```
4. Type `sdl2-config --cflags`, it should output:
```sh
-IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main
```
5. After that type `sdl2-config --libs`, should output:
```sh
-LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main -lSDL2
pacman -S mingw-w64-x86_64-{gcc,cmake,SDL2,ninja}
```
After you've done installing everything, cd to `sm` folder. Type `make`
In order to speed up the compilation, type `make -j16`
Once installed, building can be done with:
```sh
cmake -B build -G Ninja && cmake --build build
```
`sm.exe` will be at `./build/sm.exe`.
## Building with Visual Studio
Dependencies and requirements:
* The `libsdl2-dev` library, which is automatically installed with NuGet.
* The `libsdl2-dev` library, which is automatically installed with vcpkg
* [Visual Studio Community 2022](https://visualstudio.microsoft.com)
Download VS installer. On installer prompt, make sure you're on "Workloads" and check `Desktop Development with C++` this will install the necessary deps for compilation.
Download VS installer. On installer prompt, make sure you're on "Workloads"
and check `Desktop Development with C++`, `C++ CMake Tools for Windows` **and**
`vcpkg package manager`. You **must** have all three for building and developing.
1. Open `sm.sln` solution.
2. Change the build target from `Debug` to `Release`
3. Build the solution.
Visual Studio should automatically detect the CMake project and let you configure and build it. If not,
follow the [general instructions](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170)
from Microsoft.
### CMake Presets
There are two cmake presets for Windows that will automatically be detected by cmake and visual
studio and should be used when building:
1. `windows-relwithdebinfo`: release mode (with debug info)
2. `windows-debug`: debug mode
Each of them also sets up the proper `vcpkg` path so that the dependency libraries are
automatically downloaded and installed.
## Building with Tiny C Compiler
Dependencies and requirements:
* You'll need [TCC](https://github.com/FitzRoyX/tinycc/releases/download/tcc_20221020/tcc_20221020.zip) and [SDL2](https://github.com/libsdl-org/SDL/releases/download/release-2.24.1/SDL2-devel-2.24.1-VC.zip) in order to compile using TCC.
* You'll need [TCC](https://github.com/FitzRoyX/tinycc/releases/download/tcc_20221020/tcc_20221020.zip) and
[SDL2](https://github.com/libsdl-org/SDL/releases/download/release-2.24.1/SDL2-devel-2.24.1-VC.zip) in order to compile using TCC.
1. Unzip both TCC and SDL and place them in `third_party` folder.
2. Double click `run_with_tcc.bat`
3. Wait for it to compile and the game will automatically boot-up.
# Linux/MacOS
Note: TCC compiles without any optimizations or hardware features, which *may* cause `sm` to
run slowly. It's recommended to use the other methods.
# Linux/MacOS
CD to your SM root folder and open the terminal and type:
```sh
make
cmake -G Ninja -B build && cmake --build build --parallel
```
For more advanced usage:
```sh
make -j$(nproc) # run on all core
make clean all # clear gen+obj and rebuild
CC=clang make # specify compiler
```
The resulting binary will be `build/sm`.
# Nintendo Switch
Dependencies and requirements:
* The `switch-sdl2` library
## Getting Dependencies
You will need:
* [DevKitPro](https://github.com/devkitPro/installer)
* [Atmosphere](https://github.com/Atmosphere-NX/Atmosphere)
1. Make sure you've installed Atmosphere on your Switch.
2. Please download the DevKitPro version of MSYS2 through their installer, as the default MSYS2 causes issues with windows compiling.
3. Now that you've installed DevKitPro, open up the location you've installed DevKitPro to, then find `mingw64.exe` inside `msys2` located in `devkitPro` folder.
4. Type `pacman -S git switch-dev switch-sdl2 switch-tools` in the terminal to install the `switch-sdl2` library.
5. CD to `switch` folder by typing `cd src/platfrom/switch` in the terminal on the `sm` root folder.
6. type `make` to compile the Switch Port.
7. Transfer the `.ini`, `nro`, `ncap` and your rom file to the Switch.
**OPTIONAL STEP**
First, follow the [installation instructions on devkitPro's website](https://devkitpro.org/wiki/Getting_Started).
```sh
make -j$(nproc) # To build using all cores
Second, once you have pacman set up and synced, do:
```shell
pacman -S switch-dev switch-tools switch-sdl2
```
## Building
In the top level directory, you can use the cmake preset for running a build for the switch:
```shell
cmake --preset nintendo-switch
cmake --build build-switch --parallel
```
## Getting SM on to your Switch
First, make sure you've installed [Atmosphere](https://github.com/Atmosphere-NX/Atmosphere) on your Switch.
Next, go into the `build-switch` directory and copy `sm.ini`, `sm.nro`, and `sm.ncap` and the sm rom
file to your Switch.

83
CMakeLists.txt Normal file
View File

@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.21)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "You are compiling in the source tree, you should not do that. Use -B to set the build directory")
endif()
project(sm
VERSION 0.0.1
DESCRIPTION "Super Metroid PC Port"
HOMEPAGE_URL "https://github.com/snesrev/sm"
LANGUAGES C)
include(GNUInstallDirs)
# Compiler Warnings
list(APPEND c_warnings
"-fno-strict-aliasing")
list(APPEND msvc_warnings
"/W3"
"/wd4996")
# For installation later
set(ini_name "${PROJECT_SOURCE_DIR}/sm.ini")
# Dependencies
# ------------
# SDL
if (NINTENDO_SWITCH)
# Force static on Switch, just because it's easier
find_package(SDL2 REQUIRED COMPONENTS SDL2-static)
else()
find_package(SDL2 REQUIRED COMPONENTS SDL2)
endif()
# Main Executable
# ---------------
add_executable(sm)
add_subdirectory(src)
add_subdirectory(third_party)
# Math library
find_library(MATHLIB m)
# Target properties
target_link_libraries(sm PRIVATE
$<$<BOOL:${MATHLIB}>:m> SDL2::SDL2)
# This is for third_party
target_include_directories(sm PRIVATE ".")
set_target_properties(sm PROPERTIES C_STANDARD 11)
target_compile_options(sm PRIVATE $<IF:$<C_COMPILER_ID:MSVC>,${msvc_warnings},${c_warnings}>)
target_compile_definitions(sm PRIVATE
$<$<NOT:$<C_COMPILER_ID:MSVC>>:SYSTEM_VOLUME_MIXER_AVAILABLE=0>
$<$<BOOL:${NINTENDO_SWITCH}>:__SWITCH__>)
# Nintendo Switch extra setup
if (NINTENDO_SWITCH)
# needs to be linked with C++ linker for C++ stdlib
enable_language(CXX)
set_target_properties(sm PROPERTIES
CXX_STANDARD 11
LINKER_LANGUAGE CXX)
nx_generate_nacp(sm.nacp
NAME "Super Metroid"
AUTHOR "snesrev & Lywx"
VERSION "${PROJECT_VERSION}")
nx_create_nro(sm
NACP sm.nacp
ICON "${PROJECT_SOURCE_DIR}/src/platform/switch/icon.jpg")
set(ini_name "${PROJECT_SOURCE_DIR}/src/platform/switch/sm.ini")
endif()
# Installation
# ------------
install(TARGETS sm RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(FILES "${ini_name}" DESTINATION "${CMAKE_INSTALL_BINDIR}")

42
CMakePresets.json Normal file
View File

@ -0,0 +1,42 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "nintendo-switch",
"binaryDir": "${sourceDir}/build-switch",
"toolchainFile": "$env{DEVKITPRO}/cmake/Switch.cmake",
"condition": {
"type": "notEquals",
"lhs": "$env{DEVKITPRO}",
"rhs": ""
}
},
{
"name": "visual-studio",
"hidden": true,
"generator": "Ninja",
"binaryDir": "build-${presetName}",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "windows-relwithdebinfo",
"inherits": "visual-studio",
"cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" }
},
{
"name": "windows-debug",
"inherits": "visual-studio",
"cacheVariables": {"CMAKE_BUILD_TYPE": "Debug"}
}
]
}

View File

@ -1,33 +0,0 @@
TARGET_EXEC:=sm
SRCS:=$(wildcard src/*.c src/snes/*.c) third_party/gl_core/gl_core_3_1.c
OBJS:=$(SRCS:%.c=%.o)
PYTHON:=/usr/bin/env python3
CFLAGS:=$(if $(CFLAGS),$(CFLAGS),-O2 -fno-strict-aliasing -Werror )
CFLAGS:=${CFLAGS} $(shell sdl2-config --cflags) -DSYSTEM_VOLUME_MIXER_AVAILABLE=0 -I.
ifeq (${OS},Windows_NT)
WINDRES:=windres
# RES:=sm.res
SDLFLAGS:=-Wl,-Bstatic $(shell sdl2-config --static-libs)
else
SDLFLAGS:=$(shell sdl2-config --libs) -lm
endif
.PHONY: all clean clean_obj
all: $(TARGET_EXEC)
$(TARGET_EXEC): $(OBJS) $(RES)
$(CC) $^ -o $@ $(LDFLAGS) $(SDLFLAGS)
%.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
#$(RES): src/platform/win32/sm.rc
# @echo "Generating Windows resources"
# @$(WINDRES) $< -O coff -o $@
clean: clean_obj
clean_obj:
@$(RM) $(OBJS) $(TARGET_EXEC)

View File

@ -1,6 +1,6 @@
# sm
The building instructions are the same as the original port. For more information about the original port, see: https://github.com/snesrev/sm.
For build instructions see [BUILDING](./BUILDING.md). For more information about the original port, see: https://github.com/snesrev/sm.
This is a fork of the Super Metroid PC Port meant to continue the work and add more features. There are various goals intended for this project, including:
1. Giving all functions and variables proper names. (work has been made on functions, but not on variables as of yet)
@ -12,6 +12,6 @@ The fork is still very early in development and there is much to be done. Outsid
Any contributions, even as simple as giving a function or a variable a proper name, is welcome. The bank logs are a great resource for this: https://patrickjohnston.org/bank/.
Note about Port_Extraction folder:
Port_Extraction is currently a scratchpad to manually extract assets from the rom and insert them into the port.
Port_Extraction is currently a scratchpad to manually extract assets from the rom and insert them into the port.
In the long run, this will be used to automatically extract all necessary assets from the game.

31
sm.sln
View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sm", "src/sm.vcxproj", "{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Debug|x64.ActiveCfg = Debug|x64
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Debug|x64.Build.0 = Debug|x64
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Debug|x86.ActiveCfg = Debug|Win32
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Debug|x86.Build.0 = Debug|Win32
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Release|x64.ActiveCfg = Release|x64
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Release|x64.Build.0 = Release|x64
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Release|x86.ActiveCfg = Release|Win32
{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8F47385F-600A-41BA-AEF8-C47A2C0D15E6}
EndGlobalSection
EndGlobal

1
src/.gitignore vendored
View File

@ -1 +0,0 @@
/sm.vcxproj.user

67
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,67 @@
target_sources(sm PRIVATE
"config.c"
"glsl_shader.c"
"main.c"
"opengl.c"
"sm_80.c"
"sm_81.c"
"sm_82.c"
"sm_83.c"
"sm_84.c"
"sm_85.c"
"sm_86.c"
"sm_87.c"
"sm_88.c"
"sm_89.c"
"sm_8b.c"
"sm_8d.c"
"sm_8f.c"
"sm_90.c"
"sm_91.c"
"sm_92.c"
"sm_93.c"
"sm_94.c"
"sm_9b.c"
"sm_a0.c"
"sm_a2.c"
"sm_a3.c"
"sm_a4.c"
"sm_a5.c"
"sm_a6.c"
"sm_a7.c"
"sm_a8.c"
"sm_a9.c"
"sm_aa.c"
"sm_ad.c"
"sm_b2.c"
"sm_b3.c"
"sm_b4.c"
"sm_cpu_infra.c"
"sm_rtl.c"
"spc_player.c"
"tracing.c"
"util.c"
"snes/apu.c"
"snes/cart.c"
"snes/cpu.c"
"snes/dma.c"
"snes/dsp.c"
"snes/input.c"
"snes/ppu.c"
"snes/snes.c"
"snes/snes_other.c"
"snes/spc.c"
)
target_include_directories(sm PRIVATE "." "snes")
if (MSVC)
target_include_directories(sm PRIVATE "platform/win32")
target_sources(sm PRIVATE "platform/win32/volume_control.c")
endif()
if (NINTENDO_SWITCH)
target_include_directories(sm PRIVATE "platform/switch/src")
target_sources(sm PRIVATE "platform/switch/src/switch_impl.c")
endif()

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="sdl2.nuget" version="2.26.3" targetFramework="native" />
<package id="sdl2.nuget.redist" version="2.26.3" targetFramework="native" />
</packages>

View File

@ -1,5 +0,0 @@
/bin
/*.nacp
/*.nro
/*.elf
/*.smc

View File

@ -1,224 +0,0 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
endif
TOPDIR ?= $(CURDIR)
include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
#
# NO_ICON: if set to anything, do not use icon.
# NO_NACP: if set to anything, no .nacp file is generated.
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
# ICON is the filename of the icon (.jpg), relative to the project folder.
# If not set, it attempts to use one of the following (in this order):
# - <Project name>.jpg
# - icon.jpg
# - <libnx folder>/default_icon.jpg
#
# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder.
# If not set, it attempts to use one of the following (in this order):
# - <Project name>.json
# - config.json
# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead
# of a homebrew executable (.nro). This is intended to be used for sysmodules.
# NACP building is skipped as well.
#---------------------------------------------------------------------------------
SRC_DIR := ../../
TARGET := sm
BUILD := bin
SOURCES := $(SRC_DIR) $(SRC_DIR)/snes $(SRC_DIR)/platform/switch/src $(SRC_DIR)/../third_party/gl_core
CFILES := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/snes/*.c $(SRC_DIR)/platform/switch/src/*.c) $(SRC_DIR)/../third_party/gl_core/gl_core_3_1.c
INCLUDES := include $(SRC_DIR)/../ ./src/
APP_TITLE := Super Metroid
APP_AUTHOR := snesrev & Lywx
APP_VERSION := $(shell git rev-parse --short HEAD) $(shell git rev-parse --abbrev-ref HEAD)
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
CFLAGS := -g -Wall -O2 -ffunction-sections -Wno-parentheses \
$(ARCH) $(DEFINES)
CFLAGS += -D__SWITCH__ $(INCLUDE) -DSTBI_NO_THREAD_LOCALS `sdl2-config --cflags`
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
CFLAGS += -std=gnu11
ASFLAGS := -g $(ARCH)
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
LIBS := `$(PREFIX)pkg-config --libs sdl2` -lnx -lm
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS) $(LIBNX)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export TOPDIR := $(CURDIR)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
export DEPSDIR := $(CURDIR)/$(BUILD)
#CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
#CFILES := $(wildcard ../../*.c ../../snes/*.c) ../../third_party/gl_core/gl_core_3_1.c ../../third_party/opus-1.3.1-stripped/opus_decoder_amalgam.c
#CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
#SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
export LD := $(CXX)
#---------------------------------------------------------------------------------
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(notdir $(CFILES:.c=.o)) $(SFILES:.s=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD)
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
$(info $(OFILES))
ifeq ($(strip $(CONFIG_JSON)),)
jsons := $(wildcard *.json)
ifneq (,$(findstring $(TARGET).json,$(jsons)))
export APP_JSON := $(TOPDIR)/$(TARGET).json
else
ifneq (,$(findstring config.json,$(jsons)))
export APP_JSON := $(TOPDIR)/config.json
endif
endif
else
export APP_JSON := $(TOPDIR)/$(CONFIG_JSON)
endif
ifeq ($(strip $(ICON)),)
icons := $(wildcard *.jpg)
ifneq (,$(findstring $(TARGET).jpg,$(icons)))
export APP_ICON := $(TOPDIR)/$(TARGET).jpg
else
ifneq (,$(findstring icon.jpg,$(icons)))
export APP_ICON := $(TOPDIR)/icon.jpg
endif
endif
else
export APP_ICON := $(TOPDIR)/$(ICON)
endif
ifeq ($(strip $(NO_ICON)),)
export NROFLAGS += --icon=$(APP_ICON)
endif
ifeq ($(strip $(NO_NACP)),)
export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp
endif
ifneq ($(APP_TITLEID),)
export NACPFLAGS += --titleid=$(APP_TITLEID)
endif
ifneq ($(ROMFS),)
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
endif
.PHONY: $(BUILD) clean all
#---------------------------------------------------------------------------------
all: $(BUILD)
$(BUILD):
@echo $(CFILES) ...
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
ifeq ($(strip $(APP_JSON)),)
@rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf
else
@rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf
endif
#---------------------------------------------------------------------------------
else
.PHONY: all
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
ifeq ($(strip $(APP_JSON)),)
all : $(OUTPUT).nro
ifeq ($(strip $(NO_NACP)),)
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp
else
$(OUTPUT).nro : $(OUTPUT).elf
endif
else
all : $(OUTPUT).nsp
$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm
$(OUTPUT).nso : $(OUTPUT).elf
endif
$(OUTPUT).elf : $(OFILES)
$(OFILES_SRC) : $(HFILES_BIN)
#---------------------------------------------------------------------------------
# you need a rule like this for each extension you use as binary data
#---------------------------------------------------------------------------------
%.bin.o %_bin.h : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------

View File

@ -1,14 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by sm.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

Binary file not shown.

BIN
src/sm.rc

Binary file not shown.

View File

@ -1,312 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{1F8AB1B4-DAFB-4D6E-BF1E-F802FF5A52EE}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)build\bin-$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\obj-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)build\bin-$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\obj-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)build\bin-$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\obj-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)build\bin-$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\obj-$(Platform)-$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<Link>
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)</AdditionalIncludeDirectories>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>;_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\third_party\gl_core\gl_core_3_1.c" />
<ClCompile Include="config.c" />
<ClCompile Include="glsl_shader.c" />
<ClCompile Include="main.c" />
<ClCompile Include="opengl.c" />
<ClCompile Include="platform\win32\volume_control.c" />
<ClCompile Include="sm_80.c" />
<ClCompile Include="sm_81.c" />
<ClCompile Include="sm_82.c" />
<ClCompile Include="sm_83.c" />
<ClCompile Include="sm_84.c" />
<ClCompile Include="sm_85.c" />
<ClCompile Include="sm_86.c" />
<ClCompile Include="sm_87.c" />
<ClCompile Include="sm_88.c" />
<ClCompile Include="sm_89.c" />
<ClCompile Include="sm_8b.c">
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdc17</LanguageStandard_C>
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">stdc17</LanguageStandard_C>
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdc17</LanguageStandard_C>
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdc17</LanguageStandard_C>
</ClCompile>
<ClCompile Include="sm_8d.c" />
<ClCompile Include="sm_8f.c" />
<ClCompile Include="sm_90.c" />
<ClCompile Include="sm_91.c" />
<ClCompile Include="sm_92.c" />
<ClCompile Include="sm_93.c" />
<ClCompile Include="sm_94.c" />
<ClCompile Include="sm_9b.c" />
<ClCompile Include="sm_a0.c" />
<ClCompile Include="sm_a2.c" />
<ClCompile Include="sm_a3.c" />
<ClCompile Include="sm_a4.c" />
<ClCompile Include="sm_a5.c" />
<ClCompile Include="sm_a6.c" />
<ClCompile Include="sm_a7.c" />
<ClCompile Include="sm_a8.c" />
<ClCompile Include="sm_a9.c" />
<ClCompile Include="sm_aa.c" />
<ClCompile Include="sm_ad.c" />
<ClCompile Include="sm_b2.c" />
<ClCompile Include="sm_b3.c" />
<ClCompile Include="sm_b4.c" />
<ClCompile Include="sm_cpu_infra.c" />
<ClCompile Include="sm_rtl.c" />
<ClCompile Include="snes\apu.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="snes\cart.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MinSpace</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MinSpace</Optimization>
</ClCompile>
<ClCompile Include="snes\cpu.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="snes\dma.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="snes\dsp.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="snes\input.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MinSpace</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MinSpace</Optimization>
</ClCompile>
<ClCompile Include="snes\ppu.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="snes\snes.c" />
<ClCompile Include="snes\snes_other.c" />
<ClCompile Include="snes\spc.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MinSpace</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MinSpace</Optimization>
</ClCompile>
<ClCompile Include="spc_player.c" />
<ClCompile Include="tracing.c" />
<ClCompile Include="util.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\third_party\gl_core\gl_core_3_1.h" />
<ClInclude Include="config.h" />
<ClInclude Include="enemy_defs.h" />
<ClInclude Include="enemy_types.h" />
<ClInclude Include="funcs.h" />
<ClInclude Include="glsl_shader.h" />
<ClInclude Include="ida_types.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="sm_80.h" />
<ClInclude Include="sm_81.h" />
<ClInclude Include="sm_82.h" />
<ClInclude Include="sm_83.h" />
<ClInclude Include="sm_84.h" />
<ClInclude Include="sm_85.h" />
<ClInclude Include="sm_86.h" />
<ClInclude Include="sm_87.h" />
<ClInclude Include="sm_88.h" />
<ClInclude Include="sm_89.h" />
<ClInclude Include="sm_8b.h" />
<ClInclude Include="sm_8f.h" />
<ClInclude Include="sm_90.h" />
<ClInclude Include="sm_91.h" />
<ClInclude Include="sm_92.h" />
<ClInclude Include="sm_93.h" />
<ClInclude Include="sm_94.h" />
<ClInclude Include="sm_9b.h" />
<ClInclude Include="sm_a0.h" />
<ClInclude Include="sm_a2.h" />
<ClInclude Include="sm_a3.h" />
<ClInclude Include="sm_a4.h" />
<ClInclude Include="sm_a5.h" />
<ClInclude Include="sm_a6.h" />
<ClInclude Include="sm_a7.h" />
<ClInclude Include="sm_a8.h" />
<ClInclude Include="sm_a9.h" />
<ClInclude Include="sm_aa.h" />
<ClInclude Include="sm_ad.h" />
<ClInclude Include="sm_b2.h" />
<ClInclude Include="sm_b3.h" />
<ClInclude Include="sm_b4.h" />
<ClInclude Include="sm_cpu_infra.h" />
<ClInclude Include="sm_rtl.h" />
<ClInclude Include="snes\apu.h" />
<ClInclude Include="snes\cart.h" />
<ClInclude Include="snes\cpu.h" />
<ClInclude Include="snes\dma.h" />
<ClInclude Include="snes\dsp.h" />
<ClInclude Include="snes\dsp_regs.h" />
<ClInclude Include="snes\input.h" />
<ClInclude Include="snes\ppu.h" />
<ClInclude Include="snes\saveload.h" />
<ClInclude Include="snes\snes.h" />
<ClInclude Include="snes\spc.h" />
<ClInclude Include="spc_player.h" />
<ClInclude Include="tracing.h" />
<ClInclude Include="types.h" />
<ClInclude Include="util.h" />
<ClInclude Include="variables.h" />
<ClInclude Include="variables_extra.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="sm.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\sdl2.nuget.redist.2.26.3\build\native\sdl2.nuget.redist.targets" Condition="Exists('..\packages\sdl2.nuget.redist.2.26.3\build\native\sdl2.nuget.redist.targets')" />
<Import Project="..\packages\sdl2.nuget.2.26.3\build\native\sdl2.nuget.targets" Condition="Exists('..\packages\sdl2.nuget.2.26.3\build\native\sdl2.nuget.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\sdl2.nuget.redist.2.26.3\build\native\sdl2.nuget.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.nuget.redist.2.26.3\build\native\sdl2.nuget.redist.targets'))" />
<Error Condition="!Exists('..\packages\sdl2.nuget.2.26.3\build\native\sdl2.nuget.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\sdl2.nuget.2.26.3\build\native\sdl2.nuget.targets'))" />
</Target>
</Project>

View File

@ -1,374 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
<Filter Include="Snes">
<UniqueIdentifier>{e1763dbc-4fb3-417f-ad1a-8436411c3b7a}</UniqueIdentifier>
</Filter>
<Filter Include="Shader">
<UniqueIdentifier>{2b72ed96-9194-4c2c-b1e5-15445f0a9550}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_cpu_infra.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_rtl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_80.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_81.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_82.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_84.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_86.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_87.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_88.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_89.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_8b.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_8d.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_8f.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_90.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_91.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_92.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_93.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_94.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_9b.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a0.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a4.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a5.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a6.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a7.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a8.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_a9.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_aa.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_ad.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_b2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_b3.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_b4.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="spc_player.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="platform\win32\volume_control.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="snes\apu.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\cart.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\cpu.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\dma.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\dsp.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\input.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\ppu.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\snes.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\snes_other.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="snes\spc.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="tracing.c">
<Filter>Snes</Filter>
</ClCompile>
<ClCompile Include="glsl_shader.c">
<Filter>Shader</Filter>
</ClCompile>
<ClCompile Include="opengl.c">
<Filter>Shader</Filter>
</ClCompile>
<ClCompile Include="..\third_party\gl_core\gl_core_3_1.c">
<Filter>Shader</Filter>
</ClCompile>
<ClCompile Include="sm_83.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sm_85.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="sm_cpu_infra.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="types.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="funcs.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="variables.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="ida_types.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="variables_extra.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_rtl.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="spc_player.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="config.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="enemy_defs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="enemy_types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="snes\apu.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\cart.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\cpu.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\dma.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\dsp.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\dsp_regs.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\input.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\ppu.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\snes.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\spc.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="tracing.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="snes\saveload.h">
<Filter>Snes</Filter>
</ClInclude>
<ClInclude Include="glsl_shader.h">
<Filter>Shader</Filter>
</ClInclude>
<ClInclude Include="..\third_party\gl_core\gl_core_3_1.h">
<Filter>Shader</Filter>
</ClInclude>
<ClInclude Include="sm_92.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_8b.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_80.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_81.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_82.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sm_84.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_85.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_86.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_88.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_89.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_9b.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_90.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_91.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_93.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_94.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a0.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a2.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a3.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a4.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a5.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a6.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a7.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a8.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_a9.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_aa.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_b2.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_b3.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_b4.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_ad.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_87.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_8f.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="sm_83.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="sm.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@ -1,3 +0,0 @@
/tcc/
/SDL2-2.24.1/
/gl_core/*.o

1
third_party/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1 @@
target_sources(sm PRIVATE "gl_core/gl_core_3_1.c")

7
vcpkg-configuration.json Normal file
View File

@ -0,0 +1,7 @@
{
"default-registry": {
"kind": "git",
"baseline": "7f9f0e44db287e8e67c0e888141bfa200ab45121",
"repository": "https://github.com/microsoft/vcpkg"
}
}

5
vcpkg.json Normal file
View File

@ -0,0 +1,5 @@
{
"dependencies": [
"sdl2"
]
}