2023-10-03 14:11:39 +02:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta http-equiv = "content-type" content = "text/html; charset=UTF-8" >
< title > Data Frog SF2000 Firmware Version Checker< / title >
< meta name = "viewport" content = "width=device-width" >
< link rel = "stylesheet" href = "tools.css" >
< / head >
< body >
< h1 > Data Frog SF2000 Firmware Version Checker< / h1 >
< p > This simple tool will just check an SF2000 firmware/BIOS file against a list of known versions, and tell you which version it is. You can < a href = "https://vonmillhausen.github.io/sf2000/#firmwarebios-bisrvasd" > learn more about firmware revisions for the SF2000 here< / a > .< / p >
< hr >
< div id = "steps" >
< section id = "bisrvSection" >
< h2 > Select Your < code > bisrv.asd< / code > < / h2 >
< p > Select the < code > bisrv.asd< / code > firmware file whose version you want to check. You can find the < code > bisrv.asd< / code > file in the < code > bios< / code > folder on your microSD card.< / p >
< div id = "bisrvMessages" > < / div >
< div class = "controlContainer" >
< label class = "control" > Open < code > bisrv.asd< / code > : < input id = "bisrvSelector" type = "file" accept = ".asd" onchange = "bisrvLoad(event.target.files[0])" > < / label >
< / div >
< / section >
< / div >
< script src = "tools.js" > < / script >
< script type = "text/javascript" >
// Global variables...
Tool updates...
This was just supposed to be a new feature for the generic image tool (dithering support), but while working on that things kind of snowballed 😅
* Added dithering support to the generic image tool and the boot logo changer, when converting images to RGB565 format. This uses a Bayer 8x8 matrix, and the overall "strength" of the dither can be controlled - it defaults to what I feel is a sane value. Dithering can help reduce banding effects due to the low colour depth in RGB565.
* Made "fix" scaling mode more flexible in the generic image tool - now there's checkboxes beside the width and height dimensions - if you un-check one, the other dimension will be calculated automatically to keep the input's aspect ratio intact
* Improved downscaling quality in the generic image tool. While working on the dithering feature, I discovered the previous "gaussian resampling" downscaling method I was using introduced distortion in certain situations. I had a lot of fun playing around with possible replacements (I tried 10 new downscaling functions!), and finally settled on a hybrid function that mixes powers-of-two downscaling (with some custom mipmap style cross-blending) with Hermite interpolation. This new method is reasonably quick, gives clean results with no great distortion, and works well with alpha channels (doesn't introduce any dark fringing)
* Generic image tool now shows the dimensions of the output image
* Added a max width on the main tool page bodies, so that they don't get so wide on full-screen desktop browsers
* Fixed a few edge-case logic bugs here and there (e.g., when upscaling only a single dimensions with the generic image tool, or places where I thought I was copying objects, but was only creating references to them, etc.)
* Switched from using "var" declarations across all tool codebases to "let" or "const" instead
* Switched out the SVG alert icons to just use emoji instead
* Various other nips and tucks (fixed up my arbitrary 80-column comment wrapping on the tools that had previously just been eye-balled, fixed a few comment typos, etc.)
2024-05-14 21:20:57 +02:00
let bisrvData; // Used to store the binary data from the bisrv.asd file
2023-10-03 14:11:39 +02:00
// This function is triggered when the person selects a file...
function bisrvLoad(file) {
// Read in the contents of the selected file as array buffer...
Tool updates...
This was just supposed to be a new feature for the generic image tool (dithering support), but while working on that things kind of snowballed 😅
* Added dithering support to the generic image tool and the boot logo changer, when converting images to RGB565 format. This uses a Bayer 8x8 matrix, and the overall "strength" of the dither can be controlled - it defaults to what I feel is a sane value. Dithering can help reduce banding effects due to the low colour depth in RGB565.
* Made "fix" scaling mode more flexible in the generic image tool - now there's checkboxes beside the width and height dimensions - if you un-check one, the other dimension will be calculated automatically to keep the input's aspect ratio intact
* Improved downscaling quality in the generic image tool. While working on the dithering feature, I discovered the previous "gaussian resampling" downscaling method I was using introduced distortion in certain situations. I had a lot of fun playing around with possible replacements (I tried 10 new downscaling functions!), and finally settled on a hybrid function that mixes powers-of-two downscaling (with some custom mipmap style cross-blending) with Hermite interpolation. This new method is reasonably quick, gives clean results with no great distortion, and works well with alpha channels (doesn't introduce any dark fringing)
* Generic image tool now shows the dimensions of the output image
* Added a max width on the main tool page bodies, so that they don't get so wide on full-screen desktop browsers
* Fixed a few edge-case logic bugs here and there (e.g., when upscaling only a single dimensions with the generic image tool, or places where I thought I was copying objects, but was only creating references to them, etc.)
* Switched from using "var" declarations across all tool codebases to "let" or "const" instead
* Switched out the SVG alert icons to just use emoji instead
* Various other nips and tucks (fixed up my arbitrary 80-column comment wrapping on the tools that had previously just been eye-balled, fixed a few comment typos, etc.)
2024-05-14 21:20:57 +02:00
const frBisrv = new FileReader();
2023-10-03 14:11:39 +02:00
frBisrv.readAsArrayBuffer(file);
frBisrv.onload = function(event) {
// Clear any old messages...
document.getElementById("bisrvMessages").innerHTML = "";
// Read the provided file's data into an array...
bisrvData = new Uint8Array(event.target.result);
// We'll do a hash-check against it...
Tool updates...
This was just supposed to be a new feature for the generic image tool (dithering support), but while working on that things kind of snowballed 😅
* Added dithering support to the generic image tool and the boot logo changer, when converting images to RGB565 format. This uses a Bayer 8x8 matrix, and the overall "strength" of the dither can be controlled - it defaults to what I feel is a sane value. Dithering can help reduce banding effects due to the low colour depth in RGB565.
* Made "fix" scaling mode more flexible in the generic image tool - now there's checkboxes beside the width and height dimensions - if you un-check one, the other dimension will be calculated automatically to keep the input's aspect ratio intact
* Improved downscaling quality in the generic image tool. While working on the dithering feature, I discovered the previous "gaussian resampling" downscaling method I was using introduced distortion in certain situations. I had a lot of fun playing around with possible replacements (I tried 10 new downscaling functions!), and finally settled on a hybrid function that mixes powers-of-two downscaling (with some custom mipmap style cross-blending) with Hermite interpolation. This new method is reasonably quick, gives clean results with no great distortion, and works well with alpha channels (doesn't introduce any dark fringing)
* Generic image tool now shows the dimensions of the output image
* Added a max width on the main tool page bodies, so that they don't get so wide on full-screen desktop browsers
* Fixed a few edge-case logic bugs here and there (e.g., when upscaling only a single dimensions with the generic image tool, or places where I thought I was copying objects, but was only creating references to them, etc.)
* Switched from using "var" declarations across all tool codebases to "let" or "const" instead
* Switched out the SVG alert icons to just use emoji instead
* Various other nips and tucks (fixed up my arbitrary 80-column comment wrapping on the tools that had previously just been eye-balled, fixed a few comment typos, etc.)
2024-05-14 21:20:57 +02:00
const hashResult = getFirmwareHash(bisrvData);
2023-10-03 14:11:39 +02:00
// The result could be either a Promise if it had a bisrv.asd-like structure and we got
// a hash, or false otherwise... let's check!
if (hashResult instanceof Promise) {
// We got a Promise! Wait for it to finish so we get our bisrv.asd hash...
hashResult.then(function(dataHash) {
// Check the hash against all the known good ones...
switch (knownHash(dataHash)) {
// Mid-March BIOS...
case "03.15":
2023-10-12 12:24:01 +02:00
setMessage("warning", "bisrvMessages", "Mid-March < code > bisrv.asd< / code > detected. Newer firmware is available, see the link above for more information.");
2023-10-03 14:11:39 +02:00
break;
// April 20th BIOS...
case "04.20":
2023-10-12 12:24:01 +02:00
setMessage("warning", "bisrvMessages", "April 20th < code > bisrv.asd< / code > detected. Newer firmware is available, see the link above for more information.");
2023-10-03 14:11:39 +02:00
break;
// May 15th BIOS...
case "05.15":
2023-10-12 12:24:01 +02:00
setMessage("warning", "bisrvMessages", "May 15th < code > bisrv.asd< / code > detected. Newer firmware is available, see the link above for more information.");
2023-10-03 14:11:39 +02:00
break;
// May 22nd BIOS...
case "05.22":
2023-10-19 15:31:40 +02:00
setMessage("warning", "bisrvMessages", "Version 1.5 < code > bisrv.asd< / code > detected. Newer firmware is available, see the link above for more information.");
2023-10-03 14:11:39 +02:00
break;
// August 3rd BIOS...
case "08.03":
2023-10-19 15:31:40 +02:00
setMessage("warning", "bisrvMessages", "Version 1.6 < code > bisrv.asd< / code > detected. Newer firmware is available, see the link above for more information.");
2023-10-12 12:24:01 +02:00
break;
// October 7th BIOS...
case "10.07":
2023-10-19 15:31:40 +02:00
setMessage("error", "bisrvMessages", "Version 1.7 < code > bisrv.asd< / code > detected. This firmware version has a critical issue with SNES save states, and is not recommended for use. See the link above for more information.");
break;
// October 13th BIOS...
case "10.13":
setMessage("info", "bisrvMessages", "Version 1.71 < code > bisrv.asd< / code > detected. This is the latest known official firmware version.");
2023-10-03 14:11:39 +02:00
break;
default:
// Huh... wasn't false so had bisrv.asd structure, but didn't return
// a known hash... a new BIOS version? Unknown anyway!
console.log(dataHash);
setMessage("error", "bisrvMessages", "While the file you've selected does appear to be generally structured like the SF2000's < code > bisrv.asd< / code > firmware file, the specifics of your file don't match any known SF2000 firmware version.");
return;
}
});
}
else {
// We got false, so whatever it was, it wasn't a bisrv.asd...
setMessage("error", "bisrvMessages", "The file you've selected doesn't appear to have the same data structure as expected for a < code > bisrv.asd< / code > file.");
return;
}
};
}
< / script >
< hr >
Tool updates...
This was just supposed to be a new feature for the generic image tool (dithering support), but while working on that things kind of snowballed 😅
* Added dithering support to the generic image tool and the boot logo changer, when converting images to RGB565 format. This uses a Bayer 8x8 matrix, and the overall "strength" of the dither can be controlled - it defaults to what I feel is a sane value. Dithering can help reduce banding effects due to the low colour depth in RGB565.
* Made "fix" scaling mode more flexible in the generic image tool - now there's checkboxes beside the width and height dimensions - if you un-check one, the other dimension will be calculated automatically to keep the input's aspect ratio intact
* Improved downscaling quality in the generic image tool. While working on the dithering feature, I discovered the previous "gaussian resampling" downscaling method I was using introduced distortion in certain situations. I had a lot of fun playing around with possible replacements (I tried 10 new downscaling functions!), and finally settled on a hybrid function that mixes powers-of-two downscaling (with some custom mipmap style cross-blending) with Hermite interpolation. This new method is reasonably quick, gives clean results with no great distortion, and works well with alpha channels (doesn't introduce any dark fringing)
* Generic image tool now shows the dimensions of the output image
* Added a max width on the main tool page bodies, so that they don't get so wide on full-screen desktop browsers
* Fixed a few edge-case logic bugs here and there (e.g., when upscaling only a single dimensions with the generic image tool, or places where I thought I was copying objects, but was only creating references to them, etc.)
* Switched from using "var" declarations across all tool codebases to "let" or "const" instead
* Switched out the SVG alert icons to just use emoji instead
* Various other nips and tucks (fixed up my arbitrary 80-column comment wrapping on the tools that had previously just been eye-balled, fixed a few comment typos, etc.)
2024-05-14 21:20:57 +02:00
< p > < a rel = "license" href = "https://creativecommons.org/publicdomain/zero/1.0/" > CC0< / a > : public domain. Version 1.3, 20240514.1< / p >
2023-10-03 14:11:39 +02:00
< / body >
< / html >