loveemu / snsfopt Goto Github PK
View Code? Open in Web Editor NEWSNSF (SNES Sound Format) Optimizer Tool
License: GNU General Public License v2.0
SNSF (SNES Sound Format) Optimizer Tool
License: GNU General Public License v2.0
When exporting a large number of SNSF files to an SPC file, as in snsfopt -x *.minisnsf
, it may produce different results than running the command one by one in a separate process. I experienced that during the creation of the SNSF for Shin Megami Tensei II.
This is a bug which is originally found in gsfopt. However, unlike GBA, it should be considered as a very rare case that the glitch actually erases necessary ROM content, because SNES hardware reads ROM data once and transfer it to audio RAM.
Snsfopt is possible to write wrong value to ROM coverage in snsflib optimization (mode -l
for instance). Theoretically it might wipe the ROM data quite slightly without being noticed.
How to fix : If you worry about snsflibs that you have optimized by old snsfopt, redo the snsflib optimization with unoptimized ROM, then replace your snsflib to new one.
The mechanism of the glitch is simple. It's too stupid.
u8 * rom_coverage;
u8 * another_rom_coverage;
for (u32 offset = 0; offset < size; offset++) {
if (rom_coverage[offset] + another_rom_coverage[offset] <= 0xff) {
rom_coverage[offset] += another_rom_coverage[offset];
} else {
rom_coverage[offset] += 0xff; // wait, why += is placed here
}
}
In words: the glitch occurs when the song A refers to a certain address once, and another song B refers to the same address at least 255 times.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.