From 84985785c86c349e9ead3615760cff2d5e75e98a Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Thu, 27 Jun 2024 09:52:57 +0200 Subject: [PATCH] Bump to 0.4.7, rename to 573in1 and update docs --- .github/scripts/buildRelease.sh | 4 +- .github/workflows/build.yml | 12 ++--- CMakeLists.txt | 6 +-- README.md | 86 ++++++++++++++++++++------------ assets/about.txt | 9 ++-- assets/cdreadme.txt | 4 +- assets/textures/font.png | Bin 2723 -> 2535 bytes doc/assets/logo.png | Bin 0 -> 4371 bytes src/common/defs.hpp | 2 +- src/common/util.hpp | 33 ++++-------- 10 files changed, 83 insertions(+), 73 deletions(-) create mode 100644 doc/assets/logo.png diff --git a/.github/scripts/buildRelease.sh b/.github/scripts/buildRelease.sh index da59a2c..e2ae905 100755 --- a/.github/scripts/buildRelease.sh +++ b/.github/scripts/buildRelease.sh @@ -1,7 +1,7 @@ #!/bin/bash ROOT_DIR="$(pwd)" -PROJECT_DIR="$ROOT_DIR/cart-tool" +PROJECT_DIR="$ROOT_DIR/573in1" OPENBIOS_DIR="$ROOT_DIR/nugget/openbios" TOOLCHAIN_DIR="$ROOT_DIR/gcc-mipsel-none-elf" @@ -14,7 +14,7 @@ cmake --build "$PROJECT_DIR/build" \ RELEASE_NAME="$( ls "$PROJECT_DIR/build" | - grep -E -o '^cart-tool-[0-9]+\.[0-9]+\.[0-9]+' | + grep -E -o '^573in1-[0-9]+\.[0-9]+\.[0-9]+' | head -n 1 )" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e567a0f..365a32a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - name: Fetch repo contents uses: actions/checkout@v4 with: - path: cart-tool + path: 573in1 - name: Fetch OpenBIOS repo contents uses: actions/checkout@v4 @@ -34,27 +34,27 @@ jobs: run: | sudo apt-get update -y sudo apt-get install -y --no-install-recommends ninja-build mame-tools - sudo pip3 install -r cart-tool/tools/requirements.txt + sudo pip3 install -r 573in1/tools/requirements.txt - name: Build GCC toolchain if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | - cart-tool/.github/scripts/buildToolchain.sh gcc-mipsel-none-elf mipsel-none-elf + 573in1/.github/scripts/buildToolchain.sh gcc-mipsel-none-elf mipsel-none-elf - name: Build project run: | - cart-tool/.github/scripts/buildRelease.sh + 573in1/.github/scripts/buildRelease.sh - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: build if-no-files-found: error - path: cart-tool-*.zip + path: 573in1-*.zip - name: Publish release if: ${{ github.ref_type == 'tag' }} uses: softprops/action-gh-release@v1 with: fail_on_unmatched_files: true - files: cart-tool-*.zip + files: 573in1-*.zip diff --git a/CMakeLists.txt b/CMakeLists.txt index 0535d3d..e9475c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,10 +4,10 @@ cmake_minimum_required(VERSION 3.25) set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/cmake/toolchain.cmake") project( - cart-tool + 573in1 LANGUAGES C CXX ASM - VERSION 0.4.6 - DESCRIPTION "Konami System 573 security cartridge tool" + VERSION 0.4.7 + DESCRIPTION "Konami System 573 maintenance tool" ) set( diff --git a/README.md b/README.md index 69d76e8..cf780e3 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,65 @@ -# Konami System 573 security cartridge tool +

+ 573in1 logo +

-## Building +573in1 is a full-featured homebrew maintenance and troubleshooting tool, game +installer and BIOS ROM replacement for arcade games based on Konami's System 573 +PCB, such as earlier versions of Dance Dance Revolution and other Bemani rhythm +games from the same era. It currently allows for: -The following dependencies are required in order to build the project: +- dumping, erasing and writing images to the onboard flash memory, PCMCIA flash + cards and RTC RAM; +- dumping security cartridge EEPROMs and editing the serial number stored in + them in order to reinstall a game on a different system; +- repurposing cartridges for use with any game that uses the same cartridge + type; +- browsing the CD-ROM, or any attached IDE hard drive or CF card, and launching + System 573 and PS1 executables. -- CMake 3.25 or later; -- Python 3.10 or later; -- [Ninja](https://ninja-build.org/); -- a recent version of the GCC toolchain that targets the `mipsel-none-elf` - architecture; -- optionally, `xorriso` and `chdman` (in order to build the CD-ROM image). +## Download and usage -The toolchain can be installed on Windows, Linux or macOS by following the -instructions [here](https://github.com/grumpycoders/pcsx-redux/blob/main/src/mips/psyqo/GETTING_STARTED.md#the-toolchain) -and should be added to `PATH`. The other dependencies can be installed through a -package manager. +The latest version of 573in1 can be found on the releases page, accessible +through the GitHub sidebar. The tool is available in three different formats: -The Python script used to convert images at build time requires additional -dependencies which can be installed by running: +- as a CD-ROM image, usable on any 573 equipped with a CD-ROM drive (including + ones fitted with BIOS mod boards); +- as a BIOS ROM image, allowing the system to boot directly into the 573in1 main + menu (even with no IDE drives connected) and optionally launch a game or + custom executable automatically; +- as a standalone 573 executable for advanced users. -``` -py -m pip install -r tools/requirements.txt (Windows) -sudo pip install -r tools/requirements.txt (Linux/macOS) -``` +See the [documentation](doc/index.md) for more information and usage +instructions. Reading the documentation before proceeding is highly recommended. -Once all prerequisites are installed, the tool can be built in debug mode (with -command-line argument parsing disabled and serial port logging enabled by -default) by running: +## Contributing -``` -cmake --preset debug -cmake --build ./build -``` +Pull requests are welcome. If you wish to add functionality (e.g. game-specific +menus to manipulate user data, extract assets and so on) feel free to do so, +however please stick to the following guidelines: -Replace `debug` with `release` to build in release mode or `min-size-release` to -optimize the executable for size. If `xorriso` is installed and listed in the -`PATH` environment variable, a bootable CD-ROM image will be generated alongside -the executable. A copy of the image in CHD format will additionally be generated -if MAME's `chdman` tool is also present. +- Do not include any code lifted as-is or minimally modified from a game + disassembly. Rewritten and properly explained/commented code is fine. +- Do not include any Konami game files or excerpts thereof. If necessary, only + include metadata about the files such as hashes, offsets, sizes and so on. +- Store any such metadata as a file in the resource archive (see + `resources.json`) rather than hardcoding it. If possible, provide a copy of + the scripts used to gather the data from the original files in the `tools` + directory. +- Adding a section to the documentation covering usage of the newly added + functionality is not required, but would be highly appreciated. + +## License + +The tool is licensed under the [GNU GPLv3](LICENSE). You may freely distribute +modified versions as long as you also provide the full source code, attribution +and a link back to this repository. + +## See also + +- Naoki Saito's 573 resources: + - [Konami's System 573 - Everything you wanted to know about it!](https://youtube.com/watch?v=Cm6ycmTbwIU) + - [System 573 repo](https://github.com/NaokiS28/KSystem-573) +- [System 573 specifications](https://psx-spx.consoledev.net/konamisystem573) +- [ps1-bare-metal](https://github.com/spicyjpeg/ps1-bare-metal) +- [PSX.Dev Discord server](https://discord.gg/QByKPpH) diff --git a/assets/about.txt b/assets/about.txt index 462079a..50c956b 100644 --- a/assets/about.txt +++ b/assets/about.txt @@ -1,4 +1,4 @@ -- Konami System 573 tool - +- 573in1: Konami System 573 maintenance tool - Version ${PROJECT_VERSION} (C) 2022-2024 spicyjpeg @@ -25,6 +25,7 @@ Testing: Special thanks: 987123879113 Gabrimax + Hyphen/4434 Martin Korth (nocash) Nicolas Noble Everyone on the Rhythm Game Cabs and PSX.Dev Discord servers @@ -182,7 +183,5 @@ Software. - - -Several security cartridges were killed during the development of this tool. May -they rest in peace. +A System 573, a flash chip and several security cartridges were killed during +the development of this tool. May they all rest in peace. diff --git a/assets/cdreadme.txt b/assets/cdreadme.txt index 121edbb..b39b289 100644 --- a/assets/cdreadme.txt +++ b/assets/cdreadme.txt @@ -1,6 +1,6 @@ -Konami System 573 tool -====================== +573in1: Konami System 573 maintenance tool +========================================== Version ${PROJECT_VERSION} (C) 2022-2024 spicyjpeg diff --git a/assets/textures/font.png b/assets/textures/font.png index af24f1d8c576e3795ccb24372d00a7070f6dec52..9379489d53e9c3dc9cc2eaf07f7f059b77e7a3f5 100644 GIT binary patch delta 2526 zcmV<42_g2Q73UL>BYz35Nkl%y`PEW5&E%{TCb z9dy~jgM|)TxE~>~tb%1VEc1bjvx+?bB-`nxUA>o=uB<NE>>019RYC=+%q0dRg} z#%K+T3CZk(%zxx4jE{_y!osL&vO_H#2bZE}4$pthvGJMFJsQWQ8kB~6L)gY?T>MNL zCmoB@TIyM8dkZ}!yFnXAYD3Ypjyj;gBqW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dwZy(ly(k)#h){RdrQ=j>|w!v zdMixtsMiLwX!~ten0dsMw^2au2&uxEG%ow;x+^B7QK_G6Z&qw{Ui?m70rM!K3EiK! zYEtv)cEzlCYw#w$Uv5Sc5xTo3TxWAO8?R7l-`=)|DaSr%+!UjJNgqG}+k8-~i9AY} zAt3%}+1KE2x}K-|nLL}V`|XqAZvr^%G|Ah`mvybA(UR1+cwO|F{*t;eRU}rvLm%At zq2`AgFr!{mH|Zil_-C5giC&ALF;ToS>f_*{8HG;66H0}@9MJ@8A!*3U@YqooxAZH# z)DJdir;0R+AXoj3^)Dmg@6DUBwgzGAb^UlD65OHb`{zGP|NY=!1y|iS^TU~kd(+CP zMkNmqv&=8PvdJ96J5DMgS8FP$`5M(RxW2lp(V2W-MPyJ4XE|1s=sha9CABhC0fT7| xPPd-vkoN1_Jp&GqO?e%D>NL5&ZT|VR4(N`;mDiAqO{Vo*K3@Lc@wP=D|1Zq|d-?zX literal 0 HcmV?d00001 diff --git a/src/common/defs.hpp b/src/common/defs.hpp index ee408bc..549357f 100644 --- a/src/common/defs.hpp +++ b/src/common/defs.hpp @@ -11,7 +11,7 @@ #define VERSION_STRING VERSION "-debug" #endif -#define EXTERNAL_DATA_DIR "hdd:/cartdata" +#define EXTERNAL_DATA_DIR "hdd:/573in1" enum Character : char { CH_UP_ARROW = '\x80', diff --git a/src/common/util.hpp b/src/common/util.hpp index 721fdcb..c577e91 100644 --- a/src/common/util.hpp +++ b/src/common/util.hpp @@ -431,56 +431,43 @@ static constexpr inline util::Hash operator""_h( /* Logging macros */ -#ifdef ENABLE_APP_LOGGING -#define LOG_APP(fmt, ...) \ +#define LOG(type, fmt, ...) \ util::logger.log( \ - "app,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ + type ",%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ ) + +#ifdef ENABLE_APP_LOGGING +#define LOG_APP(fmt, ...) LOG("app", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_APP(fmt, ...) #endif #ifdef ENABLE_CART_IO_LOGGING -#define LOG_CART_IO(fmt, ...) \ - util::logger.log( \ - "cart,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ - ) +#define LOG_CART_IO(fmt, ...) LOG("cart", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_CART_IO(fmt, ...) #endif #ifdef ENABLE_CART_DATA_LOGGING -#define LOG_CART_DATA(fmt, ...) \ - util::logger.log( \ - "data,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ - ) +#define LOG_CART_DATA(fmt, ...) LOG("data", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_CART_DATA(fmt, ...) #endif #ifdef ENABLE_ROM_LOGGING -#define LOG_ROM(fmt, ...) \ - util::logger.log( \ - "rom,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ - ) +#define LOG_ROM(fmt, ...) LOG("rom", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_ROM(fmt, ...) #endif #ifdef ENABLE_IDE_LOGGING -#define LOG_IDE(fmt, ...) \ - util::logger.log( \ - "ide,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ - ) +#define LOG_IDE(fmt, ...) LOG("ide", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_IDE(fmt, ...) #endif #ifdef ENABLE_FS_LOGGING -#define LOG_FS(fmt, ...) \ - util::logger.log( \ - "fs,%s(%d): " fmt, __func__, __LINE__ __VA_OPT__(,) __VA_ARGS__ \ - ) +#define LOG_FS(fmt, ...) LOG("fs", fmt __VA_OPT__(,) __VA_ARGS__) #else #define LOG_FS(fmt, ...) #endif