Skip to content

Commit

Permalink
mia: identify FDS bios by copyright string rather than digest
Browse files Browse the repository at this point in the history
A file is regarded as a Famicom Disk System Bios when

1. It is 8KiB in size, AND
2. it contains the Famicom License DRM/Trademark security string at offset 0xd37
  • Loading branch information
LukeUsher committed Oct 18, 2023
1 parent bfa1eea commit dd01cf7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mia/medium/famicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ auto Famicom::analyze(vector<u8>& data) -> string {
string manifest = Medium::manifestDatabase(digest);
if(manifest) return manifest;

if(digest == "99c18490ed9002d9c6d999b9d8d15be5c051bdfa7cc7e73318053c9a994b0178" //Nintendo Famicom Disk System (Japan)
|| digest == "a0a9d57cbace21bf9c85c2b85e86656317f0768d7772acc90c7411ab1dbff2bf" //Sharp Twin Famicom (Japan)
) {
//Check for Famicom Disk System copyright string (identifies BIOS)
if(data.size() == 8_KiB && Hash::SHA256({data.data() + 0xd37, 224}).digest() == "0ff60f81f193b001ecccc6a280cddba4b99830755aa658c089d566046adfb034") {
return analyzeFDS(data);
}

Expand Down

0 comments on commit dd01cf7

Please sign in to comment.