mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-30 13:09:55 +02:00
Update to bsnes v107r4 beta release.
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.]
This commit is contained in:
18
nall/cd/crc16.hpp
Normal file
18
nall/cd/crc16.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user