mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-29 13:29:49 +02:00
Update to v101r19 release.
byuu says: Changelog: - added \~130 new PAL games to icarus (courtesy of Smarthuman and aquaman) - added all three Korean-localized games to icarus - sfc: removed SuperDisc emulation (it was going nowhere) - sfc: fixed MSU1 regression where the play/repeat flags were not being cleared on track select - nall: cryptography support added; will be used to sign future databases (validation will always be optional) - minor shims to fix compilation issues due to nall changes The real magic is that we now have 25-30% of the PAL SNES library in icarus! Signing will be tricky. Obviously if I put the public key inside the higan archive, then all anyone has to do is change that public key for their own releases. And if you download from my site (which is now over HTTPS), then you don't need the signing to verify integrity. I may just put the public key on my site on my site and leave it at that, we'll see.
This commit is contained in:
19
nall/encode/base57.hpp
Normal file
19
nall/encode/base57.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <nall/arithmetic.hpp>
|
||||
|
||||
namespace nall { namespace Encode {
|
||||
|
||||
template<typename T> inline auto Base57(T value) -> string {
|
||||
static const char lookup[] = "23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
||||
static const uint size = ceil(sizeof(T) * 8 / log2(57));
|
||||
|
||||
string result;
|
||||
for(auto n : range(size)) {
|
||||
result.append(lookup[value % 57]);
|
||||
value /= 57;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}}
|
@@ -5,13 +5,18 @@ namespace nall { namespace Encode {
|
||||
inline auto URL(const string& input) -> string {
|
||||
string output;
|
||||
for(auto c : input) {
|
||||
//unreserved characters
|
||||
if(c >= 'A' && c <= 'Z') { output.append(c); continue; }
|
||||
if(c >= 'a' && c <= 'z') { output.append(c); continue; }
|
||||
if(c >= '0' && c <= '9') { output.append(c); continue; }
|
||||
if(c == '-' || c == '_' || c == '.' || c == '~') { output.append(c); continue; }
|
||||
|
||||
//special characters
|
||||
if(c == ' ') { output.append('+'); continue; }
|
||||
unsigned hi = (c >> 4) & 15;
|
||||
unsigned lo = (c >> 0) & 15;
|
||||
|
||||
//reserved characters
|
||||
uint hi = (c >> 4) & 15;
|
||||
uint lo = (c >> 0) & 15;
|
||||
output.append('%');
|
||||
output.append((char)(hi < 10 ? ('0' + hi) : ('a' + hi - 10)));
|
||||
output.append((char)(lo < 10 ? ('0' + lo) : ('a' + lo - 10)));
|
||||
|
@@ -20,7 +20,7 @@ struct ZIP {
|
||||
//append file: append("path/file", data, size);
|
||||
auto append(string filename, const uint8_t* data = nullptr, unsigned size = 0u) -> void {
|
||||
filename.transform("\\", "/");
|
||||
uint32_t checksum = Hash::CRC32(data, size).value();
|
||||
uint32_t checksum = Hash::CRC32(data, size).digest().hex();
|
||||
directory.append({filename, checksum, size, fp.offset()});
|
||||
|
||||
fp.writel(0x04034b50, 4); //signature
|
||||
|
Reference in New Issue
Block a user