Update to v106r58 release.

byuu says:

The main thing I worked on today was emulating the MBC7 EEPROM.

And... I have many things to say about that, but not here, and not now...

The missing EEPROM support is why the accelerometer was broken. Although
it's not evidently clear that I'm emulating the actual values
incorrectly. I'll think about it and get it fixed, though.

bsnes went from ~308fps to ~328fps, and I don't even know why. Probably
something somewhere in the 140KB of changes to other things made in this
WIP.
This commit is contained in:
Tim Allen
2018-08-21 13:17:12 +10:00
parent 9a6ae6dacb
commit f9adb4d2c6
98 changed files with 3422 additions and 1539 deletions

View File

@@ -5,17 +5,19 @@ namespace nall {
string::string() : _data(nullptr), _refs(nullptr), _capacity(0), _size(0) {
}
auto string::get() -> char* {
template<typename T>
auto string::get() -> T* {
static char _null[] = "";
if(!_data) return _null;
if(!_data) return (T*)_null;
if(*_refs > 1) _data = _copy(); //make unique for write operations
return _data;
return (T*)_data;
}
auto string::data() const -> const char* {
template<typename T>
auto string::data() const -> const T* {
static const char _null[] = "";
if(!_data) return _null;
return _data;
if(!_data) return (const T*)_null;
return (const T*)_data;
}
auto string::reset() -> type& {

View File

@@ -26,14 +26,16 @@ string::string() {
_size = 0;
}
auto string::get() -> char* {
if(_capacity < SSO) return _text;
return _data;
template<typename T>
auto string::get() -> T* {
if(_capacity < SSO) return (T*)_text;
return (T*)_data;
}
auto string::data() const -> const char* {
if(_capacity < SSO) return _text;
return _data;
template<typename T>
auto string::data() const -> const T* {
if(_capacity < SSO) return (const T*)_text;
return (const T*)_data;
}
auto string::reset() -> type& {

View File

@@ -19,14 +19,16 @@ cons:
namespace nall {
auto string::get() -> char* {
template<typename T>
auto string::get() -> T* {
if(_capacity == 0) reserve(1);
return _data;
return (T*)_data;
}
auto string::data() const -> const char* {
if(_capacity == 0) return "";
return _data;
template<typename T>
auto string::data() const -> const T* {
if(_capacity == 0) return (const T*)"";
return (const T*)_data;
}
auto string::reset() -> type& {