Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function(add_mmx_variant TARGET GEN_DIR CFG_INCLUDE_DIR)
src/mmx_spc_player.c
src/mods/mmx_widescreen_plugin.c
src/mods/mmx_msu1_plugin.c
src/mods/mmx_sram_plugin.c

# OpenGL function loader
third_party/gl_core/gl_core_3_1.c
Expand Down Expand Up @@ -170,6 +169,8 @@ add_mmx_variant(MegaManXSNESRecomp
set(MMX_PRELOADED_MODS "${CMAKE_CURRENT_SOURCE_DIR}/mods/preloaded")
if(TARGET MegaManXSNESRecomp AND EXISTS "${MMX_PRELOADED_MODS}/packages")
add_custom_command(TARGET MegaManXSNESRecomp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory
"$<TARGET_FILE_DIR:MegaManXSNESRecomp>/mods"
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${MMX_PRELOADED_MODS}"
"$<TARGET_FILE_DIR:MegaManXSNESRecomp>/mods"
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion recomp-ui
53 changes: 31 additions & 22 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,17 +912,33 @@ static const struct RendererFuncs kSdlRendererFuncs = {
};


void MkDir(const char *s) {
#if defined(_WIN32)
_mkdir(s);
#else
mkdir(s, 0755);
#endif
}

#include <signal.h>
#include "cpu_state.h"
#include "cpu_trace.h"
void MkDir(const char *s) {
#if defined(_WIN32)
_mkdir(s);
#else
mkdir(s, 0755);
#endif
}

static void RmDirIfEmpty(const char *s) {
#if defined(_WIN32)
_rmdir(s);
#else
rmdir(s);
#endif
}

static void RetireMmxSramModPackage(void) {
#if SNESRECOMP_ENABLE_MODS && !MMX_VARIANT_JP
remove("mods/packages/megaman-x.enhancement.sram/1.0.0/manifest.toml");
RmDirIfEmpty("mods/packages/megaman-x.enhancement.sram/1.0.0");
RmDirIfEmpty("mods/packages/megaman-x.enhancement.sram");
#endif
}

#include <signal.h>
#include "cpu_state.h"
#include "cpu_trace.h"
#include "post_mortem.h"
extern uint8_t g_ram[0x20000];
static void dump_sprite_state(void) {
Expand Down Expand Up @@ -1190,7 +1206,7 @@ int main(int argc, char** argv) {
* so headered and unheadered dumps both verify against the same hash. */
static char rom_path_buf[512];
int mods_ready = 0;
{
{
/* 1.5 MiB LoROM, Rev 1 (v1.1). SHA-256 over the unheadered payload (the
* launcher strips a 512-byte SMC copier header before hashing).
* USA "Mega Man X (USA) (Rev 1)" crc32 DED53C64
Expand All @@ -1212,6 +1228,7 @@ int main(int argc, char** argv) {
};
#endif
#if SNESRECOMP_ENABLE_MODS && !MMX_VARIANT_JP
RetireMmxSramModPackage();
mods_ready = snes_mod_runtime_initialize_c(
"mods", "megaman-x-us",
"b8f70a6e7fb93819f79693578887e2c11e196bdf1ac6ddc7cb924b1ad0be2d32");
Expand Down Expand Up @@ -1308,16 +1325,8 @@ int main(int argc, char** argv) {
SnesLauncherCGameInfo gi;
memset(&gi, 0, sizeof(gi));
#endif
gi.name = MMX_GAME_NAME;
gi.region = MMX_GAME_REGION;
gi.sram_path = "saves/save.srm"; /* The SRAM Saves mod allocates this
for password-save enhancements.
With the mod disabled, stock MMX
still has no guest-visible SRAM. */
gi.password_sram_path = "saves/save.srm";
gi.password_sram_label = "Last Password";
gi.password_sram_size = 2048;
gi.password_sram_offset = 0x100;
gi.name = MMX_GAME_NAME;
gi.region = MMX_GAME_REGION;
gi.expected_crc = MMX_ROM_CRC32;
gi.has_expected_crc = 1;
gi.known_sha256 = &kMmxRomSha256; /* single accepted digest */
Expand Down
194 changes: 0 additions & 194 deletions src/mods/mmx_sram_plugin.c

This file was deleted.

2 changes: 1 addition & 1 deletion tools/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ BOXART="recomp/launcher/boxart.tga" # AppImage icon source (optional)
REQUIRED_MOD_MANIFESTS=(
"packages/megaman-x.enhancement.widescreen/1.0.0/manifest.toml"
"packages/megaman-x.enhancement.msu1/1.0.0/manifest.toml"
"packages/megaman-x.enhancement.sram/1.0.0/manifest.toml"
)
PROD_CMAKE_FLAGS=( -DSNESRECOMP_ENABLE_TRACE=OFF )
DEBUG_CMAKE_FLAGS=( -DSNESRECOMP_ENABLE_TRACE=ON )
Expand Down Expand Up @@ -302,6 +301,7 @@ ROMDIR="\$(dirname "\$(readlink -f "\$SELF")")"
# never a dir where a file belongs); user files are left alone entirely.
if [ -d "\$HERE/usr/bin/mods" ] && [ -w "\$ROMDIR" ]; then
mkdir -p "\$ROMDIR/mods" 2>/dev/null || true
rm -rf "\$ROMDIR/mods/packages/megaman-x.enhancement.sram" 2>/dev/null || true
cp -a "\$HERE/usr/bin/mods/." "\$ROMDIR/mods/" 2>/dev/null || true
chmod -R u+rwX "\$ROMDIR/mods" 2>/dev/null || true
fi
Expand Down
2 changes: 0 additions & 2 deletions tools/test_appimage_layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ test -f "$state1/mods/packages/megaman-x.enhancement.widescreen/1.0.0/manifest.t
echo "FAIL: release mod catalog not seeded beside the AppImage" >&2; exit 1; }
test -f "$state1/mods/packages/megaman-x.enhancement.msu1/1.0.0/manifest.toml" || {
echo "FAIL: MSU-1 mod package not seeded beside the AppImage" >&2; exit 1; }
test -f "$state1/mods/packages/megaman-x.enhancement.sram/1.0.0/manifest.toml" || {
echo "FAIL: SRAM mod package not seeded beside the AppImage" >&2; exit 1; }

# 2. User state survives a relaunch: an edited config line and a
# user-installed third-party mod package.
Expand Down