Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <nall/iterator.hpp>
|
2018-09-02 23:06:41 +09:00
|
|
|
#include <nall/range.hpp>
|
|
|
|
#include <nall/traits.hpp>
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
|
|
|
namespace nall {
|
|
|
|
|
|
|
|
template<typename T> struct array_view {
|
|
|
|
using type = array_view;
|
|
|
|
|
2020-04-04 13:14:00 +09:00
|
|
|
array_view() {
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
_data = nullptr;
|
|
|
|
_size = 0;
|
|
|
|
}
|
|
|
|
|
2020-04-04 13:14:00 +09:00
|
|
|
array_view(nullptr_t) {
|
2018-09-02 23:06:41 +09:00
|
|
|
_data = nullptr;
|
|
|
|
_size = 0;
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
array_view(const void* data, u64 size) {
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
_data = (const T*)data;
|
2021-02-08 18:11:00 +09:00
|
|
|
_size = (s32)size;
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
}
|
|
|
|
|
2021-03-08 04:05:00 +09:00
|
|
|
template<s32 size> array_view(const T (&data)[size]) {
|
|
|
|
_data = data;
|
|
|
|
_size = size;
|
|
|
|
}
|
|
|
|
|
Update to ares v118 release.
I'm excited to launch ares v118 today, the first release featuring playable,
full-speed Nintendo 64 emulation!
The new Nintendo 64 emulation is made possible thanks to [Themaister] very
graciously porting his Vulkan-based ParaLLEl-RDP graphics renderer to ares. With
its default settings, it is nearly pixel-perfect to real hardware, and it
optionally supports upscaling to 2x or 4x the original Nintendo 64 resolution,
plus optional supersampling back down to the original resolution (for enhanced
anti-aliasing) if desired. The Vulkan support requires an appropriate graphics
card, and either Windows or Linux. At this time, Vulkan is not available for
macOS nor the BSDs.
Also new for the Nintendo 64 core in this release is Rumble Pak, Cartridge Pak,
SRAM, EEPROM, and Flash save support. Note that for right now, the Rumble Pak
will only be enabled for games which use internal saves (SRAM, EEPROM, and
Flash.) That does not cover all Rumble Pak-capable games. The option to choose
between Rumble Paks and Cartridge Paks will be added to a future release.
For the PlayStation core, [Luke Usher] provided two rendering fixes that allow
Final Fantasy VII and Tony Hawk's Pro Skater to be fully playable!
Right now, approximately 33% of the Nintendo 64 library is fully playable, and
about 67% of the PlayStation library is fully playable. Each core has only been
under active development for about one month each, so they both have a long way
to go. Please treat these early releases as tech samples, rather than finished
emulation cores.
Further, note that the Nintendo 64 and PlayStation cores employ cached
interpreters. This is a middle-ground between the accuracy of interpreters and
the performance of dynamic recompilers. As such, ares' system requirements will
be a bit higher than traditional emulators for these systems. Presuming no
background task interference or CPU throttling, generally speaking, a Ryzen 5
2600 or better CPU should get you to around ~120fps in the average case, and
~60fps in the worst case.
The source code has also been released under the terms of the Creative Commons
BY-NC-ND 4.0 license.
[Themaister]: http://github.com/Themaister/
[Luke Usher]: https://twitter.com/LukeUsher1
2021-02-21 08:51:00 +09:00
|
|
|
explicit operator bool() const {
|
|
|
|
return _data && _size > 0;
|
|
|
|
}
|
2018-09-02 23:06:41 +09:00
|
|
|
|
Update to ares v118 release.
I'm excited to launch ares v118 today, the first release featuring playable,
full-speed Nintendo 64 emulation!
The new Nintendo 64 emulation is made possible thanks to [Themaister] very
graciously porting his Vulkan-based ParaLLEl-RDP graphics renderer to ares. With
its default settings, it is nearly pixel-perfect to real hardware, and it
optionally supports upscaling to 2x or 4x the original Nintendo 64 resolution,
plus optional supersampling back down to the original resolution (for enhanced
anti-aliasing) if desired. The Vulkan support requires an appropriate graphics
card, and either Windows or Linux. At this time, Vulkan is not available for
macOS nor the BSDs.
Also new for the Nintendo 64 core in this release is Rumble Pak, Cartridge Pak,
SRAM, EEPROM, and Flash save support. Note that for right now, the Rumble Pak
will only be enabled for games which use internal saves (SRAM, EEPROM, and
Flash.) That does not cover all Rumble Pak-capable games. The option to choose
between Rumble Paks and Cartridge Paks will be added to a future release.
For the PlayStation core, [Luke Usher] provided two rendering fixes that allow
Final Fantasy VII and Tony Hawk's Pro Skater to be fully playable!
Right now, approximately 33% of the Nintendo 64 library is fully playable, and
about 67% of the PlayStation library is fully playable. Each core has only been
under active development for about one month each, so they both have a long way
to go. Please treat these early releases as tech samples, rather than finished
emulation cores.
Further, note that the Nintendo 64 and PlayStation cores employ cached
interpreters. This is a middle-ground between the accuracy of interpreters and
the performance of dynamic recompilers. As such, ares' system requirements will
be a bit higher than traditional emulators for these systems. Presuming no
background task interference or CPU throttling, generally speaking, a Ryzen 5
2600 or better CPU should get you to around ~120fps in the average case, and
~60fps in the worst case.
The source code has also been released under the terms of the Creative Commons
BY-NC-ND 4.0 license.
[Themaister]: http://github.com/Themaister/
[Luke Usher]: https://twitter.com/LukeUsher1
2021-02-21 08:51:00 +09:00
|
|
|
explicit operator const T*() const {
|
2018-09-02 23:06:41 +09:00
|
|
|
return _data;
|
|
|
|
}
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
Update to ares v118 release.
I'm excited to launch ares v118 today, the first release featuring playable,
full-speed Nintendo 64 emulation!
The new Nintendo 64 emulation is made possible thanks to [Themaister] very
graciously porting his Vulkan-based ParaLLEl-RDP graphics renderer to ares. With
its default settings, it is nearly pixel-perfect to real hardware, and it
optionally supports upscaling to 2x or 4x the original Nintendo 64 resolution,
plus optional supersampling back down to the original resolution (for enhanced
anti-aliasing) if desired. The Vulkan support requires an appropriate graphics
card, and either Windows or Linux. At this time, Vulkan is not available for
macOS nor the BSDs.
Also new for the Nintendo 64 core in this release is Rumble Pak, Cartridge Pak,
SRAM, EEPROM, and Flash save support. Note that for right now, the Rumble Pak
will only be enabled for games which use internal saves (SRAM, EEPROM, and
Flash.) That does not cover all Rumble Pak-capable games. The option to choose
between Rumble Paks and Cartridge Paks will be added to a future release.
For the PlayStation core, [Luke Usher] provided two rendering fixes that allow
Final Fantasy VII and Tony Hawk's Pro Skater to be fully playable!
Right now, approximately 33% of the Nintendo 64 library is fully playable, and
about 67% of the PlayStation library is fully playable. Each core has only been
under active development for about one month each, so they both have a long way
to go. Please treat these early releases as tech samples, rather than finished
emulation cores.
Further, note that the Nintendo 64 and PlayStation cores employ cached
interpreters. This is a middle-ground between the accuracy of interpreters and
the performance of dynamic recompilers. As such, ares' system requirements will
be a bit higher than traditional emulators for these systems. Presuming no
background task interference or CPU throttling, generally speaking, a Ryzen 5
2600 or better CPU should get you to around ~120fps in the average case, and
~60fps in the worst case.
The source code has also been released under the terms of the Creative Commons
BY-NC-ND 4.0 license.
[Themaister]: http://github.com/Themaister/
[Luke Usher]: https://twitter.com/LukeUsher1
2021-02-21 08:51:00 +09:00
|
|
|
const T& operator*() const {
|
|
|
|
return *_data;
|
|
|
|
}
|
|
|
|
|
2020-04-04 13:14:00 +09:00
|
|
|
auto operator++() -> type& { _data++; _size--; return *this; }
|
|
|
|
auto operator--() -> type& { _data--; _size++; return *this; }
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto operator++(s32) -> type { auto copy = *this; ++(*this); return copy; }
|
|
|
|
auto operator--(s32) -> type { auto copy = *this; --(*this); return copy; }
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto operator-=(s32 distance) -> type& { _data -= distance; _size += distance; return *this; }
|
|
|
|
auto operator+=(s32 distance) -> type& { _data += distance; _size -= distance; return *this; }
|
2018-09-02 23:06:41 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto operator[](u32 index) const -> const T& {
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
#ifdef DEBUG
|
|
|
|
struct out_of_bounds {};
|
|
|
|
if(index >= _size) throw out_of_bounds{};
|
|
|
|
#endif
|
|
|
|
return _data[index];
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto operator()(u32 index, const T& fallback = {}) const -> T {
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
if(index >= _size) return fallback;
|
|
|
|
return _data[index];
|
|
|
|
}
|
|
|
|
|
2020-04-04 13:14:00 +09:00
|
|
|
template<typename U = T> auto data() const -> const U* { return (const U*)_data; }
|
2021-02-08 18:11:00 +09:00
|
|
|
template<typename U = T> auto size() const -> u64 { return _size * sizeof(T) / sizeof(U); }
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto begin() const -> iterator_const<T> { return {_data, (u32)0}; }
|
|
|
|
auto end() const -> iterator_const<T> { return {_data, (u32)_size}; }
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto rbegin() const -> reverse_iterator_const<T> { return {_data, (u32)_size - 1}; }
|
|
|
|
auto rend() const -> reverse_iterator_const<T> { return {_data, (u32)-1}; }
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
|
2018-09-02 23:06:41 +09:00
|
|
|
auto read() -> T {
|
|
|
|
auto value = operator[](0);
|
|
|
|
_data++;
|
|
|
|
_size--;
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
auto view(u32 offset, u32 length) const -> type {
|
2018-10-04 19:11:23 +09:00
|
|
|
#ifdef DEBUG
|
|
|
|
struct out_of_bounds {};
|
|
|
|
if(offset + length >= _size) throw out_of_bounds{};
|
|
|
|
#endif
|
|
|
|
return {_data + offset, length};
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
//array_view<u8> specializations
|
|
|
|
template<typename U> auto readl(U& value, u32 size) -> U;
|
|
|
|
template<typename U> auto readm(U& value, u32 size) -> U;
|
|
|
|
template<typename U> auto readvn(U& value, u32 size) -> U;
|
|
|
|
template<typename U> auto readvi(U& value, u32 size) -> U;
|
2018-09-02 23:06:41 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<typename U> auto readl(U& value, u32 offset, u32 size) -> U { return view(offset, size).readl(value, size); }
|
2018-10-04 19:11:23 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<typename U = u64> auto readl(u32 size) -> U { U value; return readl(value, size); }
|
|
|
|
template<typename U = u64> auto readm(u32 size) -> U { U value; return readm(value, size); }
|
|
|
|
template<typename U = u64> auto readvn(u32 size) -> U { U value; return readvn(value, size); }
|
|
|
|
template<typename U = s64> auto readvi(u32 size) -> U { U value; return readvi(value, size); }
|
2018-09-02 23:06:41 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<typename U = u64> auto readl(u32 offset, u32 size) -> U { U value; return readl(value, offset, size); }
|
2018-10-04 19:11:23 +09:00
|
|
|
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
protected:
|
|
|
|
const T* _data;
|
2021-02-08 18:11:00 +09:00
|
|
|
s32 _size;
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
};
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
//array_view<u8>
|
2018-09-02 23:06:41 +09:00
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<> template<typename U> inline auto array_view<u8>::readl(U& value, u32 size) -> U {
|
2018-09-02 23:06:41 +09:00
|
|
|
value = 0;
|
2021-02-08 18:11:00 +09:00
|
|
|
for(u32 byte : range(size)) value |= (U)read() << byte * 8;
|
2018-09-02 23:06:41 +09:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<> template<typename U> inline auto array_view<u8>::readm(U& value, u32 size) -> U {
|
2018-09-02 23:06:41 +09:00
|
|
|
value = 0;
|
2021-02-08 18:11:00 +09:00
|
|
|
for(u32 byte : reverse(range(size))) value |= (U)read() << byte * 8;
|
2018-09-02 23:06:41 +09:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<> template<typename U> inline auto array_view<u8>::readvn(U& value, u32 size) -> U {
|
2018-09-02 23:06:41 +09:00
|
|
|
value = 0;
|
2021-02-08 18:11:00 +09:00
|
|
|
u32 shift = 1;
|
2018-09-02 23:06:41 +09:00
|
|
|
while(true) {
|
|
|
|
auto byte = read();
|
|
|
|
value += (byte & 0x7f) * shift;
|
|
|
|
if(byte & 0x80) break;
|
|
|
|
shift <<= 7;
|
|
|
|
value += shift;
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2021-02-08 18:11:00 +09:00
|
|
|
template<> template<typename U> inline auto array_view<u8>::readvi(U& value, u32 size) -> U {
|
2018-09-02 23:06:41 +09:00
|
|
|
value = readvn<U>();
|
|
|
|
bool negate = value & 1;
|
|
|
|
value >>= 1;
|
|
|
|
if(negate) value = ~value;
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 15:49:54 +09:00
|
|
|
}
|