From ad173835112503bd168fa6371be9dcc8f89fb003 Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Sun, 9 Nov 2025 12:34:13 -0500 Subject: [PATCH] Add some READMEs and a LICENSE --- LICENSE.md | 19 +++++++++++++++++++ README.md | 8 ++++++++ cmd/README.md | 31 +++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 cmd/README.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0e10624 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (C) 2025 Zorchenhimer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6f2d13f --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# go-studybox + +A library to work with `.studybox` ROM files and the data within. The StudyBox +is a tape drive addon for the Famicom. More info here: +[https://zorchenhimer.com/studybox/](https://zorchenhimer.com/studybox/). + +This library is considered "alpha" and the API should not be considered stable. +Large breaking changes are expected and unannounced. diff --git a/cmd/README.md b/cmd/README.md new file mode 100644 index 0000000..77fd726 --- /dev/null +++ b/cmd/README.md @@ -0,0 +1,31 @@ +# extract-imgs + +Extract images from an unpacked `.studybox` ROM file. Requires the tile +packets as well as the CHR packets to build an image. Handles both nametable +and sprite data. + +# just-stats + +Decodes scripts similar to `script-decode`, but does not save the output. +Instead, scripts are decoded in bulk and instruction usage is recorded to an +output file. + +# sbutil + +Pack and unpack `.studybox` ROM files. Unpacking extracts all of the data from +the ROM into a subdirectory and writes a `.json` file with metadata. Packing +does the reverse using the `.json` metadata file. + +# script-decode + +Decode script segments from an unpacked `.studybox` ROM file. Labels and a +CDL file are supported. Two modes are available: dumb and `--smart` decoding. + +Dumb decoding is the default and will attempt to decode every byte in the file +as script data. This will try and decode variable data as script data which is +usually undesired. + +`--smart` decoding starts at given entry points and decodes scripts by +following the logic of the script and recording branches as new entry points. +By default the only entry point is the top of the script (third byte in the +file), but additional entry points can be given in the CDL file.