mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-12 15:54:13 +02:00
byuu says: - bsnes: added video filters from bsnes v082 - bsnes: added ZSNES snow effect option when games paused or unloaded (no, I'm not joking) - bsnes: added 7-zip support (LZMA 19.00 SDK) [Recent higan WIPs have also mentioned bsnes changes, although the higan code no longer includes the bsnes code. These changes include: - higan, bsnes: added EXLOROM, EXLOROM-RAM, EXHIROM mappings - higan, bsnes: focus the viewport after leaving fullscreen exclusive mode - bsnes: re-added mightymo's cheat code database - bsnes: improved make install rules for the game and cheat code databases - bsnes: delayed construction of hiro::Window objects to properly show bsnes window icons - Ed.]
19 lines
285 B
C++
19 lines
285 B
C++
#pragma once
|
|
|
|
//CRC-16/KERMIT
|
|
|
|
namespace nall::CD {
|
|
|
|
inline auto CRC16(array_view<uint8_t> data) -> uint16_t {
|
|
uint16_t crc = 0;
|
|
while(data) {
|
|
crc ^= *data++ << 8;
|
|
for(uint bit : range(8)) {
|
|
crc = crc << 1 ^ (crc & 0x8000 ? 0x1021 : 0);
|
|
}
|
|
}
|
|
return ~crc;
|
|
}
|
|
|
|
}
|