Compare commits

...
23 Commits
Author SHA1 Message Date
Near dc1eef5c7a Update to ares v112 release.
- Nintendo 64: emulation core started
2020-04-28 13:57:00 +00:00
Near 90d2eb6fe8 Update to ares v111r22 release.
- PC Engine CD: fixed Arcade Card emulation bug in register I/O
    address decoding
  - PC Engine CD: fixed a bug with ADPCM DMA
  - Super Famicom: implemented more of the HG51B disassembler (still
    very incomplete)
2020-04-27 17:09:00 +00:00
Near 5e480a8a57 Update to ares v111r21 release.
- PC Engine: added support for Populous save RAM
  - PC Engine: attached debugging Node::Memory objects to HuCards with
    RAM
  - PC Engine: split System Card and Super System Card emulation into
    separate classes
  - PC Engine: added Arcade Card Duo and Arcade Card Pro emulation
    (though it isn't working yet)
  - PC Engine Duo: added emulation support (as a separate interface;
    requires SSC 3.0 BIOS)
  - lucia: display warning message when loading games if the save
    directory is unwritable
  - lucia: display error status message when capturing a screenshot to
    an unwritable directory
2020-04-25 15:34:00 +00:00
Near d3a07b8e2e Update to ares v111r20 release.
- nall: added nall/encode/png.hpp (uses optipng or pngcrush for
    optional compression)
  - luna: capture screenshots in PNG format instead of in BMP format
  - lucia: capture screenshots in PNG format instead of in BMP format
  - PC Engine CD: emulated drive seek delays
  - PC Engine CD: emulated CD-DA and ADPCM audio volume fader
2020-04-24 14:45:00 +00:00
Near 8390e4f8d5 Update to ares v111r19 release.
- PC Engine CD: corrected ADPCM $180d flags (fixes many ADPCM playback
    issues)
  - PC Engine CD: use live playing flag for $180d.d5 (fixes Popful Mail
    hanging bug)
  - PC Engine CD: supported SCSI command 0xd9 CDDA playback mode (loop,
    notify, stop)
2020-04-23 15:11:00 +00:00
Near b44f399eec Update to ares v111r18 release.
- mia: use nall/vfs/cdrom to convert images on import (more complete;
    shares code)
  - mia: added identify(filename) function to detect what system a given
    game image is for
  - mia: added medium(name) to locate a Media object to use
  - lucia: replaced Emulator::extensions with Emulator::medium
2020-04-22 15:38:00 +00:00
Near 9bccec6786 Update to ares v111r17 release.
This WIP has started on a stream manager, which for now only allows you
to mute individual streams, but in the future it could be nice to expand
this tool to selectively configure bandpass filters and more.

  - ares: added Node::Stream::setMuted(bool) function
  - lucia: added audio stream manager to selectively mute individual
    streams (for debugging purposes)
  - lucia: include system name in recent games entries, to disambiguate
    Mega CD and PC Engine CD games
2020-04-21 14:11:00 +00:00
Near a2dc37726e Update to ares v111r16 release.
- PC Engine CD: working ADPCM playback support
  - PC Engine CD: added CD-DA playback support
  - PC Engine CD: various restructuring and code cleanups
2020-04-20 16:14:00 +00:00
Near 88323fbe83 Update to ares v111r15 release.
The first officially licensed PC Engine CD games are now playable:
Bomberman '94 Taikenban and Deden no Den.

  - ares: emulated the OKI MSM5025 ADPCM chip
  - PC Engine CD: added ADPCM playback support (incomplete)
  - PC Engine CD: various emulation improvements
2020-04-18 14:14:00 +00:00
Near 038bc2f56a Update to ares v111r14 release.
- nall/vfs/cdrom: build image in-memory (required to support the below
    features more easily)
  - nall/vfs/cdrom: support multiple files per CUE sheet
  - nall/vfs/cdrom: support WAV audio files
2020-04-17 12:04:00 +00:00
Near 52e0d49be4 Update to ares v111r13 release.
This release implements enough of the PC Engine CD to boot its first
software title, Chris Covell's Screen Dimension Test. There's a large
amount of work that remains before commercial titles will be playable,
however.

  - PC Engine CD: started implementing SCSI commands
  - nall/decode/cue: new decoder for parsing CD-ROM CUE sheets
  - nall/vfs/cdrom: support ISO images
2020-04-15 12:30:00 +00:00
Near 587f9442fc Update to ares v111r12 release.
Peripheral unserialization has been completed. Things are looking up!

  - ares: simplified peripheral serialization for all cores
2020-04-11 10:49:00 +00:00
Near 384c99bc32 Update to ares v111r11 release.
The base tree initialization rewrite is completed, however there remains
work to be done with attaching peripherals not unserializing properly.
But it's a solid start.

  - ares: ported all cores to the new simplified tree construction
2020-04-10 06:38:00 +00:00
Near cd96bf2595 Update to ares v111r10 release.
This WIP marks the start of an effort to simplify the process of
initializing system trees in ares. Before, all load functions had to
take both a parent Object, and a shadow source Object. During the
construction of every Object, the attributes and values of the shadow
Object would be copied in.

The goal here is to instead construct system trees only from parent
Objects, and then once the system tree has been constructed, copy a
serialized tree into the actual system tree. What makes this difficult
is that the serialized tree will have peripherals connected to ports,
resulting in a much larger tree. So the copy function has to specialize
on ports to create and attach said peripherals to the actual system
tree, and then continue unserializing the shadow tree to the actual
system tree.

In any case, so far this new approach is working, thankfully. This
reduces a substantial amount of boilerplate that was previously needed
inside every single emulation cores in ares. But it will take many WIPs
to slowly convert all twelve emulation cores to the new design. I made
this change in a way that the other cores will continue to function as
expected, so both designs are currently fully functional. Once every
core has been ported, I will start removing the boilerplate
functionality that was needed for the old design.

  - ares: created Object::copy(Node::Object)
  - Famicom: started simplifying tree construction
2020-04-09 04:13:00 +00:00
Near 5474da1450 Update to ares v111r09 release.
- Famicom: renamed NES-* boards to HVC-*
  - Famicom, Super Famicom, Mega Drive, PC Engine: restructured
    cartridge slot and expansion port handling
  - hiro/Qt: fix crash on exit by destructing all UI objects first
    [baraclese]
2020-04-08 04:58:00 +00:00
Near e895549b76 Update to ares v111r08 release.
- Famicom: refactored every cartridge board (merging all chip classes
    into board classes)
  - Famicom: modernized every cartridge board (code cleanups and
    improvements)
  - Famicom: emulated MMC5 audio channels and MMC5A timer IRQs
  - Famicom: merged fc/memory class into fc/cpu
  - hiro/Qt: fix issue with removing window modality [baraclese]
2020-04-07 13:07:00 +00:00
Near 8166d6e100 Update to ares v111r07 release.
- ruby: removed Input::onHotplug(); luna and lucia handle hot-plugging
    automatically
  - Famicom: refactored SxROM and MMC1 into a single class
  - Famicom: converted generic class variable types (bool, uint) to
    uint# types
  - Game Boy Advance: fixed a bug with keypad interrupt handling (keypad
    array was erroneously marked static)
  - all: moved inline designators from function designators to function
    declarations
2020-04-05 01:19:00 +00:00
Near 810a18bb8c Update to ares v111r06 release.
- ares: added new Node::Properties debugger type
  - lucia: added new properties viewer tool
  - all: removed extraneous inline designators from member functions
    declared inside header files
2020-04-04 04:14:00 +00:00
Near b42d18c3e2 Update to ares v111r05 release.
- ColecoVision: added memory editing support (CPU only; no VDP support
    yet)
  - Famicom: added memory editing support
  - Game Boy + Game Boy Color: added memory editing support
  - Game Boy Advance: added memory editing support
  - Master System + Game Gear: added memory editing support
  - MSX: added memory editing support (CPU only; no VDP support yet)
  - SG-1000 + SC-3000: added memory editing support (CPU only; no VDP
    support yet)
  - SG-1000 + SC-3000: $c000-ffff maps to system RAM, not cartridge RAM
  - Neo Geo Pocket + Neo Geo Pocket Color: added memory editing support
  - WonderSwan + WonderSwan Color: added memory editing support
2020-04-01 02:48:00 +00:00
Near 479fe1259e Update to ares v111r04 release.
- ares: restructured debugging nodes into ares/node/debug
  - PC Engine: added memory editing support
  - WonderSwan: added interrupt tracing support
2020-03-29 21:58:00 +00:00
Near 15b9b7435b Update to ares v111r03 release.
- ruby: added joypad hotplugging support to the SDL 2.0 driver
  - ruby: added workaround for FreeBSD's SDL 2.0 port not supporting
    SDL_JOYDEVICE(ADDED|REMOVED)
  - lucia: support new ruby::Input::onHotplug() callback to
    automatically refresh input mappings
  - Mega Drive + Mega CD: added memory editing support
  - lucia: implemented graphics viewer and export tool
  - Super Famicom: added graphics viewing support to the accurate
    renderer
2020-03-28 23:27:00 +00:00
Near 6b8ff55111 Update to ares v111r02 release.
- all: Makefile improvements (obj and out paths are no longer hard-
    coded)
  - all: renamed Screen::Region<String> to Screen::Overscan<Boolean>
  - lucia: implemented bsnes' multiple-mappings per input system
  - lucia: implemented memory editor and export tool
  - Super Famicom: added memory editing support
  - PC Engine: added overscan setting to the dot-based renderer (256 ->
    272 width)
2020-03-27 22:21:00 +00:00
Near 11f5af18ff Update to ares v111r01 release.
- restructured project layout by moving targets (luna and lucia) out
    of ares
  - added ares logo to lucia, luna, and mia's about dialog
  - lucia: added screenshot capture tool (captures the *next* frame
    rendered)
2020-03-26 18:26:00 +00:00
992 changed files with 17404 additions and 11076 deletions

No files matched your search

+20 -48
View File
@@ -1,19 +1,3 @@
#target := luna
target := lucia
build := performance
openmp := false
local := true
flags += -I. -I..
$(info Targeting $(target) ...)
nall.path := ../nall
include $(nall.path)/GNUmakefile
ifeq ($(platform),local)
flags += -march=native
endif
ifeq ($(platform),windows)
options += -luuid -lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32
options += -Wl,-enable-auto-import
@@ -26,20 +10,9 @@ else
$(error "unsupported platform")
endif
objects := libco emulator
ares.objects := ares
obj/libco.o: ../libco/libco.c
obj/emulator.o: emulator/emulator.cpp
ifeq ($(target),luna)
profile := accuracy
cores := fc sfc sg ms md pce msx cv gb gba ws ngp
endif
ifeq ($(target),lucia)
profile := performance
cores := fc sfc sg ms md pce msx gb gba ws ngp
endif
$(object.path)/ares.o: $(ares.path)/ares/ares.cpp
ifeq ($(profile),accuracy)
flags += -DPROFILE_ACCURACY
@@ -50,60 +23,59 @@ ifeq ($(profile),performance)
endif
ifneq ($(filter $(cores),fc),)
include fc/GNUmakefile
include $(ares.path)/fc/GNUmakefile
endif
ifneq ($(filter $(cores),sfc),)
include sfc/GNUmakefile
include $(ares.path)/sfc/GNUmakefile
endif
ifneq ($(filter $(cores),n64),)
include $(ares.path)/n64/GNUmakefile
endif
ifneq ($(filter $(cores),sg),)
include sg/GNUmakefile
include $(ares.path)/sg/GNUmakefile
endif
ifneq ($(filter $(cores),ms),)
include ms/GNUmakefile
include $(ares.path)/ms/GNUmakefile
endif
ifneq ($(filter $(cores),md),)
include md/GNUmakefile
include $(ares.path)/md/GNUmakefile
endif
ifneq ($(filter $(cores),pce),)
include pce/GNUmakefile
include $(ares.path)/pce/GNUmakefile
endif
ifneq ($(filter $(cores),msx),)
include msx/GNUmakefile
include $(ares.path)/msx/GNUmakefile
endif
ifneq ($(filter $(cores),cv),)
include cv/GNUmakefile
include $(ares.path)/cv/GNUmakefile
endif
ifneq ($(filter $(cores),gb),)
include gb/GNUmakefile
include $(ares.path)/gb/GNUmakefile
endif
ifneq ($(filter $(cores),gba),)
include gba/GNUmakefile
include $(ares.path)/gba/GNUmakefile
endif
ifneq ($(filter $(cores),ws),)
include ws/GNUmakefile
include $(ares.path)/ws/GNUmakefile
endif
ifneq ($(filter $(cores),ngp),)
include ngp/GNUmakefile
include $(ares.path)/ngp/GNUmakefile
endif
include component/GNUmakefile
include $(ares.path)/component/GNUmakefile
flags += $(foreach c,$(call strupper,$(cores)),-DCORE_$c)
ui := target-$(target)
include $(ui)/GNUmakefile
-include obj/*.d
clean:
$(call delete,obj/*)
$(call delete,out/*)
ares.objects := $(ares.objects:%=$(object.path)/%.o)
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
+10
View File
@@ -0,0 +1,10 @@
#include <ares/ares.hpp>
#include <ares/node/node.cpp>
#include <ares/resource/resource.cpp>
namespace ares {
Platform* platform = nullptr;
bool _runAhead = false;
}
@@ -31,29 +31,6 @@
using namespace nall;
namespace ares {
extern bool _runAhead;
inline auto runAhead() -> bool { return _runAhead; }
inline auto setRunAhead(bool runAhead) -> void { _runAhead = runAhead; }
}
#include <emulator/types.hpp>
#include <emulator/random.hpp>
#include <emulator/node/node.hpp>
#include <emulator/platform.hpp>
#include <emulator/interface.hpp>
#include <emulator/memory/readable.hpp>
#include <emulator/memory/writable.hpp>
#include <emulator/resource/resource.hpp>
namespace ares {
static const string Name = "ares";
static const string Version = "111";
static const string License = "GPLv3+";
static const string Website = "https://ares.dev";
//incremented only when serialization format changes
static const string SerializerVersion = "111";
namespace Constants {
namespace Colorburst {
static constexpr double NTSC = 315.0 / 88.0 * 1'000'000.0;
@@ -72,4 +49,18 @@ namespace ares {
namespace Shared {
using File = shared_pointer<vfs::file>;
}
extern bool _runAhead;
inline auto runAhead() -> bool { return _runAhead; }
inline auto setRunAhead(bool runAhead) -> void { _runAhead = runAhead; }
}
#include <ares/information.hpp>
#include <ares/types.hpp>
#include <ares/random.hpp>
#include <ares/node/node.hpp>
#include <ares/platform.hpp>
#include <ares/interface.hpp>
#include <ares/memory/readable.hpp>
#include <ares/memory/writable.hpp>
#include <ares/resource/resource.hpp>
+11
View File
@@ -0,0 +1,11 @@
#pragma once
namespace ares {
static const string Name = "ares";
static const string Version = "112";
static const string License = "GPLv3+";
static const string Website = "https://ares.dev";
//incremented only when serialization format changes
static const string SerializerVersion = "112";
}
+4
View File
@@ -0,0 +1,4 @@
#include <ares/scheduler/thread.hpp>
#include <ares/scheduler/scheduler.hpp>
#include <ares/scheduler/thread.cpp>
#include <ares/scheduler/scheduler.cpp>
@@ -11,7 +11,7 @@ struct Interface {
//system interface
virtual auto root() -> Node::Object { return {}; }
virtual auto load(Node::Object&, string tree = {}) -> void {}
virtual auto load(Node::Object&) -> void {}
virtual auto power() -> void {}
virtual auto run() -> void {}
virtual auto save() -> void {}
File renamed without changes.
@@ -1,6 +1,6 @@
#pragma once
#include <emulator/memory/memory.hpp>
#include <ares/memory/memory.hpp>
namespace ares::Memory {
@@ -8,14 +8,14 @@ template<typename T>
struct Readable {
~Readable() { reset(); }
inline auto reset() -> void {
auto reset() -> void {
delete[] self.data;
self.data = nullptr;
self.size = 0;
self.mask = 0;
}
inline auto allocate(uint size, T fill = ~0ull) -> void {
auto allocate(uint size, T fill = ~0ull) -> void {
if(!size) return reset();
delete[] self.data;
self.size = size;
@@ -24,13 +24,13 @@ struct Readable {
memory::fill<T>(self.data, self.mask + 1, fill);
}
inline auto fill(T fill = ~0ull) -> void {
auto fill(T fill = ~0ull) -> void {
for(uint address : range(self.size)) {
self.data[address] = fill;
}
}
inline auto load(shared_pointer<vfs::file> fp) -> void {
auto load(shared_pointer<vfs::file> fp) -> void {
if(!self.size) return;
fp->read(self.data, min(fp->size(), self.size * sizeof(T)));
for(uint address = self.size; address <= self.mask; address++) {
@@ -38,20 +38,20 @@ struct Readable {
}
}
inline auto save(shared_pointer<vfs::file> fp) -> void {
auto save(shared_pointer<vfs::file> fp) -> void {
if(!self.size) return;
fp->write(self.data, self.size * sizeof(T));
}
explicit operator bool() const { return (bool)self.data; }
inline auto data() const -> const T* { return self.data; }
inline auto size() const -> uint { return self.size; }
inline auto mask() const -> uint { return self.mask; }
auto data() const -> const T* { return self.data; }
auto size() const -> uint { return self.size; }
auto mask() const -> uint { return self.mask; }
inline auto operator[](uint address) const -> T { return self.data[address & self.mask]; }
inline auto read(uint address) const -> T { return self.data[address & self.mask]; }
inline auto write(uint address, T data) const -> void {}
inline auto program(uint address, T data) const -> void { self.data[address & self.mask] = data; }
auto operator[](uint address) const -> T { return self.data[address & self.mask]; }
auto read(uint address) const -> T { return self.data[address & self.mask]; }
auto write(uint address, T data) const -> void {}
auto program(uint address, T data) const -> void { self.data[address & self.mask] = data; }
auto begin() -> T* { return &self.data[0]; }
auto end() -> T* { return &self.data[self.size]; }
@@ -1,6 +1,6 @@
#pragma once
#include <emulator/memory/memory.hpp>
#include <ares/memory/memory.hpp>
namespace ares::Memory {
@@ -8,14 +8,14 @@ template<typename T>
struct Writable {
~Writable() { reset(); }
inline auto reset() -> void {
auto reset() -> void {
delete[] self.data;
self.data = nullptr;
self.size = 0;
self.mask = 0;
}
inline auto allocate(uint size, T fill = ~0ull) -> void {
auto allocate(uint size, T fill = ~0ull) -> void {
if(!size) return reset();
delete[] self.data;
self.size = size;
@@ -24,13 +24,13 @@ struct Writable {
memory::fill<T>(self.data, self.mask + 1, fill);
}
inline auto fill(T fill = ~0ull) -> void {
auto fill(T fill = ~0ull) -> void {
for(uint address : range(self.size)) {
self.data[address] = fill;
}
}
inline auto load(shared_pointer<vfs::file> fp) -> void {
auto load(shared_pointer<vfs::file> fp) -> void {
if(!self.size) return;
fp->read(self.data, min(fp->size(), self.size * sizeof(T)));
for(uint address = self.size; address <= self.mask; address++) {
@@ -38,22 +38,22 @@ struct Writable {
}
}
inline auto save(shared_pointer<vfs::file> fp) -> void {
auto save(shared_pointer<vfs::file> fp) -> void {
if(!self.size) return;
fp->write(self.data, self.size * sizeof(T));
}
explicit operator bool() const { return (bool)self.data; }
inline auto data() -> T* { return self.data; }
inline auto data() const -> const T* { return self.data; }
inline auto size() const -> uint { return self.size; }
inline auto mask() const -> uint { return self.mask; }
auto data() -> T* { return self.data; }
auto data() const -> const T* { return self.data; }
auto size() const -> uint { return self.size; }
auto mask() const -> uint { return self.mask; }
inline auto operator[](uint address) -> T& { return self.data[address & self.mask]; }
inline auto operator[](uint address) const -> T { return self.data[address & self.mask]; }
inline auto read(uint address) const -> T { return self.data[address & self.mask]; }
inline auto write(uint address, T data) -> void { self.data[address & self.mask] = data; }
inline auto program(uint address, T data) -> void { self.data[address & self.mask] = data; }
auto operator[](uint address) -> T& { return self.data[address & self.mask]; }
auto operator[](uint address) const -> T { return self.data[address & self.mask]; }
auto read(uint address) const -> T { return self.data[address & self.mask]; }
auto write(uint address, T data) -> void { self.data[address & self.mask] = data; }
auto program(uint address, T data) -> void { self.data[address & self.mask] = data; }
auto begin() -> T* { return &self.data[0]; }
auto end() -> T* { return &self.data[self.size]; }
File renamed without changes.
@@ -31,6 +31,10 @@ auto Stream::setResamplerFrequency(double resamplerFrequency) -> void {
}
}
auto Stream::setMuted(bool muted) -> void {
_muted = muted;
}
auto Stream::resetFilters() -> void {
for(auto& channel : _channels) {
channel.filters.reset();
@@ -100,7 +104,7 @@ auto Stream::pending() const -> bool {
}
auto Stream::read(double samples[]) -> uint {
for(uint c : range(_channels.size())) samples[c] = _channels[c].resampler.read();
for(uint c : range(_channels.size())) samples[c] = _channels[c].resampler.read() * !muted();
return _channels.size();
}
@@ -2,13 +2,15 @@ struct Stream : Object {
DeclareClass(Stream, "Stream")
using Object::Object;
inline auto channels() const -> uint { return _channels.size(); }
inline auto frequency() const -> double { return _frequency; }
inline auto resamplerFrequency() const -> double { return _resamplerFrequency; }
auto channels() const -> uint { return _channels.size(); }
auto frequency() const -> double { return _frequency; }
auto resamplerFrequency() const -> double { return _resamplerFrequency; }
auto muted() const -> bool { return _muted; }
auto setChannels(uint channels) -> void;
auto setFrequency(double frequency) -> void;
auto setResamplerFrequency(double resamplerFrequency) -> void;
auto setMuted(bool muted) -> void;
auto resetFilters() -> void;
auto addLowPassFilter(double cutoffFrequency, uint order, uint passes = 1) -> void;
@@ -21,7 +23,7 @@ struct Stream : Object {
auto write(const double samples[]) -> void;
template<typename... P>
inline auto sample(P&&... p) -> void {
auto sample(P&&... p) -> void {
if(runAhead()) return;
double samples[sizeof...(p)] = {forward<P>(p)...};
write(samples);
@@ -43,4 +45,5 @@ protected:
vector<Channel> _channels;
double _frequency = 48000.0;
double _resamplerFrequency = 48000.0;
bool _muted = false;
};
File renamed without changes.
File renamed without changes.
+26
View File
@@ -0,0 +1,26 @@
struct Graphics : Object {
DeclareClass(Graphics, "Graphics")
Graphics(string name = {}) : Object(name) {
}
auto width() const -> uint { return _width; }
auto height() const -> uint { return _height; }
auto capture() const -> vector<uint32_t> { if(_capture) return _capture(); return {}; }
auto setSize(uint width, uint height) -> void { _width = width, _height = height; }
auto setCapture(function<vector<uint32_t> ()> capture) -> void { _capture = capture; }
auto serialize(string& output, string depth) -> void override {
Object::serialize(output, depth);
}
auto unserialize(Markup::Node node) -> void override {
Object::unserialize(node);
}
protected:
uint _width = 0;
uint _height = 0;
function<vector<uint32_t> ()> _capture;
};
@@ -1,12 +1,12 @@
struct Instruction : Event {
struct Instruction : Tracer {
DeclareClass(Instruction, "Instruction")
Instruction(string name = {}, string component = {}) : Event(name, component) {
Instruction(string name = {}, string component = {}) : Tracer(name, component) {
setDepth(_depth);
}
inline auto depth() const -> uint { return _depth; }
inline auto addressBits() const -> uint { return _addressBits; }
auto depth() const -> uint { return _depth; }
auto addressBits() const -> uint { return _addressBits; }
auto setDepth(uint depth) -> void {
_depth = depth;
@@ -60,13 +60,13 @@ struct Instruction : Event {
}
auto serialize(string& output, string depth) -> void override {
Event::serialize(output, depth);
Tracer::serialize(output, depth);
output.append(depth, " depth: ", _depth, "\n");
output.append(depth, " addressBits: ", _addressBits, "\n");
}
auto unserialize(Markup::Node node) -> void override {
Event::unserialize(node);
Tracer::unserialize(node);
_depth = node["depth"].natural();
_addressBits = node["addressBits"].natural();
+27
View File
@@ -0,0 +1,27 @@
struct Memory : Object {
DeclareClass(Memory, "Memory")
Memory(string name = {}) : Object(name) {
}
auto size() const -> uint { return _size; }
auto read(uint32 address) const -> uint8 { if(_read) return _read(address); return 0; }
auto write(uint32 address, uint8 data) const -> void { if(_write) return _write(address, data); }
auto setSize(uint size) -> void { _size = size; }
auto setRead(function<uint8 (uint32)> read) -> void { _read = read; }
auto setWrite(function<void (uint32, uint8)> write) -> void { _write = write; }
auto serialize(string& output, string depth) -> void override {
Object::serialize(output, depth);
}
auto unserialize(Markup::Node node) -> void override {
Object::unserialize(node);
}
protected:
uint _size = 0;
function<uint8 (uint32)> _read;
function<void (uint32, uint8)> _write;
};
@@ -1,7 +1,7 @@
struct Notification : Event {
struct Notification : Tracer {
DeclareClass(Notification, "Notification")
Notification(string name = {}, string component = {}) : Event(name, component) {
Notification(string name = {}, string component = {}) : Tracer(name, component) {
}
auto notify(string_view message = {}) -> void {
+21
View File
@@ -0,0 +1,21 @@
struct Properties : Object {
DeclareClass(Properties, "Properties")
Properties(string name = {}) : Object(name) {
}
auto query() const -> string { if(_query) return _query(); return {}; }
auto setQuery(function<string ()> query) -> void { _query = query; }
auto serialize(string& output, string depth) -> void override {
Object::serialize(output, depth);
}
auto unserialize(Markup::Node node) -> void override {
Object::unserialize(node);
}
protected:
function<string ()> _query;
};
@@ -1,12 +1,12 @@
struct Event : Object {
DeclareClass(Event, "Event")
struct Tracer : Object {
DeclareClass(Tracer, "Tracer")
Event(string name = {}, string component = {}) : Object(name) {
Tracer(string name = {}, string component = {}) : Object(name) {
_component = component;
}
inline auto component() const -> string { return _component; }
inline auto enabled() const -> bool { return _enabled; }
auto component() const -> string { return _component; }
auto enabled() const -> bool { return _enabled; }
auto setComponent(string component) -> void { _component = component; }
auto setEnabled(bool enabled) -> void { _enabled = enabled; }
@@ -7,8 +7,8 @@ struct Button : Input {
DeclareClass(Button, "Button")
using Input::Input;
inline auto value() const -> boolean { return _value; }
inline auto setValue(boolean value) -> void { _value = value; }
auto value() const -> boolean { return _value; }
auto setValue(boolean value) -> void { _value = value; }
protected:
boolean _value;
@@ -18,8 +18,8 @@ struct Axis : Input {
DeclareClass(Axis, "Axis")
using Input::Input;
inline auto value() const -> integer { return _value; }
inline auto setValue(integer value) -> void { _value = value; }
auto value() const -> integer { return _value; }
auto setValue(integer value) -> void { _value = value; }
protected:
integer _value;
@@ -31,8 +31,8 @@ struct Trigger : Input {
DeclareClass(Trigger, "Trigger")
using Input::Input;
inline auto value() const -> integer { return _value; }
inline auto setValue(integer value) -> void { _value = value; }
auto value() const -> integer { return _value; }
auto setValue(integer value) -> void { _value = value; }
protected:
integer _value;
@@ -44,8 +44,8 @@ struct Rumble : Input {
DeclareClass(Rumble, "Rumble")
using Input::Input;
inline auto enable() const -> boolean { return _enable; }
inline auto setEnable(boolean enable) -> void { _enable = enable; }
auto enable() const -> boolean { return _enable; }
auto setEnable(boolean enable) -> void { _enable = enable; }
protected:
boolean _enable;
+5
View File
@@ -0,0 +1,5 @@
namespace ares::Core {
#include <ares/node/video/sprite.cpp>
#include <ares/node/video/screen.cpp>
#include <ares/node/audio/stream.cpp>
}
+133
View File
@@ -0,0 +1,133 @@
namespace ares::Core {
struct Object;
struct System;
struct Component;
struct RealTimeClock;
struct Peripheral;
struct Port;
struct Input;
struct Button;
struct Axis;
struct Trigger;
struct Rumble;
struct Settings;
struct Setting;
struct Boolean;
struct Natural;
struct Integer;
struct Real;
struct String;
//struct Video;
struct Sprite;
struct Screen;
//struct Audio;
struct Stream;
//struct Debug;
struct Memory;
struct Graphics;
struct Properties;
struct Tracer;
struct Notification;
struct Instruction;
}
namespace ares::Node {
using Object = shared_pointer<Core::Object>;
using System = shared_pointer<Core::System>;
using Component = shared_pointer<Core::Component>;
using RealTimeClock = shared_pointer<Core::RealTimeClock>;
using Peripheral = shared_pointer<Core::Peripheral>;
using Port = shared_pointer<Core::Port>;
using Input = shared_pointer<Core::Input>;
using Button = shared_pointer<Core::Button>;
using Axis = shared_pointer<Core::Axis>;
using Trigger = shared_pointer<Core::Trigger>;
using Rumble = shared_pointer<Core::Rumble>;
using Settings = shared_pointer<Core::Settings>;
using Setting = shared_pointer<Core::Setting>;
using Boolean = shared_pointer<Core::Boolean>;
using Natural = shared_pointer<Core::Natural>;
using Integer = shared_pointer<Core::Integer>;
using Real = shared_pointer<Core::Real>;
using String = shared_pointer<Core::String>;
//using Video;
using Sprite = shared_pointer<Core::Sprite>;
using Screen = shared_pointer<Core::Screen>;
//using Audio;
using Stream = shared_pointer<Core::Stream>;
//using Debug;
using Memory = shared_pointer<Core::Memory>;
using Graphics = shared_pointer<Core::Graphics>;
using Properties = shared_pointer<Core::Properties>;
using Tracer = shared_pointer<Core::Tracer>;
using Notification = shared_pointer<Core::Notification>;
using Instruction = shared_pointer<Core::Instruction>;
}
namespace ares::Core {
// <emulator/platform.hpp> forward declarations (dependent on <emulator/node.hpp>)
static auto PlatformAttach(Node::Object) -> void;
static auto PlatformDetach(Node::Object) -> void;
static auto PlatformLog(string_view) -> void;
#include <ares/node/attribute.hpp>
#include <ares/node/class.hpp>
#include <ares/node/object.hpp>
#include <ares/node/system.hpp>
#include <ares/node/component.hpp>
#include <ares/node/real-time-clock.hpp>
#include <ares/node/peripheral.hpp>
#include <ares/node/port.hpp>
#include <ares/node/input.hpp>
#include <ares/node/setting.hpp>
#include <ares/node/video/sprite.hpp>
#include <ares/node/video/screen.hpp>
#include <ares/node/audio/stream.hpp>
#include <ares/node/debug/memory.hpp>
#include <ares/node/debug/graphics.hpp>
#include <ares/node/debug/properties.hpp>
#include <ares/node/debug/tracer.hpp>
#include <ares/node/debug/notification.hpp>
#include <ares/node/debug/instruction.hpp>
}
namespace ares::Node {
static inline auto create(string identifier) -> Object {
return Core::Class::create(identifier);
}
static inline auto serialize(Object node) -> string {
if(!node) return {};
string result;
node->serialize(result, {});
return result;
}
static inline auto unserialize(string markup) -> Object {
auto document = BML::unserialize(markup);
if(!document) return {};
auto node = Core::Class::create(document["node"].text());
node->unserialize(document["node"]);
return node;
}
static inline auto parent(Object child) -> Object {
if(!child || !child->parent()) return {};
if(auto parent = child->parent().acquire()) return parent;
return {};
}
template<typename T>
static inline auto find(Object from, string name) -> Object {
if(!from) return {};
if(auto object = from->find<T>(name)) return object;
return {};
}
template<typename T>
static inline auto enumerate(Object from) -> vector<T> {
vector<T> objects;
if(from) from->enumerate<T>(objects);
return objects;
}
}
@@ -13,8 +13,8 @@ struct Object : shared_pointer_this<Object> {
Object(string name = {}) : _name(name) {}
virtual ~Object() = default;
inline auto name() const -> string { return _name; }
inline auto parent() const -> shared_pointer_weak<Object> { return _parent; }
auto name() const -> string { return _name; }
auto parent() const -> shared_pointer_weak<Object> { return _parent; }
auto setName(string_view name) -> void { _name = name; }
@@ -190,6 +190,18 @@ struct Object : shared_pointer_this<Object> {
}
}
virtual auto copy(Node::Object source) -> void {
_attributes = source->_attributes;
for(auto& from : source->_nodes) {
for(auto& to : _nodes) {
if(from->identity() != to->identity()) continue;
if(from->name() != to->name()) continue;
to->copy(from);
break;
}
}
}
auto begin() { return _nodes.begin(); }
auto end() { return _nodes.end(); }
@@ -2,7 +2,7 @@ struct Peripheral : Object {
DeclareClass(Peripheral, "Peripheral")
using Object::Object;
inline auto manifest() -> string { if(_manifest) return _manifest(); return {}; }
auto manifest() -> string { if(_manifest) return _manifest(); return {}; }
auto setManifest(function<string()> manifest) -> void { _manifest = manifest; }
+71
View File
@@ -0,0 +1,71 @@
struct Port : Object {
DeclareClass(Port, "Port")
using Object::Object;
auto type() const -> string { return _type; }
auto family() const -> string { return _family; }
auto hotSwappable() const -> bool { return _hotSwappable; }
auto setAllocate(function<Node::Peripheral (string)> allocate) -> void { _allocate = allocate; }
auto setConnect(function<void ()> connect) -> void { _connect = connect; }
auto setDisconnect(function<void ()> disconnect) -> void { _disconnect = disconnect; }
auto setType(string type) -> void { _type = type; }
auto setFamily(string family) -> void { _family = family; }
auto setHotSwappable(bool hotSwappable) -> void { _hotSwappable = hotSwappable; }
auto connected() -> Node::Peripheral {
return find<Node::Peripheral>(0);
}
auto allocate(string name = {}) -> Node::Peripheral {
disconnect();
if(_allocate) return _allocate(name);
return {};
}
auto connect() -> void {
if(_connect) _connect();
}
auto disconnect() -> void {
if(auto peripheral = connected()) {
if(_disconnect) _disconnect();
remove(peripheral);
}
}
auto serialize(string& output, string depth) -> void override {
Object::serialize(output, depth);
output.append(depth, " type: ", _type, "\n");
output.append(depth, " family: ", _family, "\n");
output.append(depth, " hotSwappable: ", _hotSwappable, "\n");
}
auto unserialize(Markup::Node node) -> void override {
Object::unserialize(node);
_type = node["type"].string();
_family = node["family"].string();
_hotSwappable = node["hotSwappable"].boolean();
}
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::Port>()) {
Object::copy(source);
if(auto peripheral = source->find<Node::Peripheral>(0)) {
if(auto node = allocate(peripheral->name())) {
node->copy(peripheral);
connect();
node->copy(peripheral);
}
}
}
}
protected:
function<Node::Peripheral (string)> _allocate;
function<void ()> _connect;
function<void ()> _disconnect;
string _type;
string _family;
bool _hotSwappable = false;
};
@@ -2,8 +2,8 @@ struct RealTimeClock : Object {
DeclareClass(RealTimeClock, "Real Time Clock")
using Object::Object;
inline auto update() -> void { if(_update) return _update(); }
inline auto timestamp() const -> uint64 { return _timestamp; }
auto update() -> void { if(_update) return _update(); }
auto timestamp() const -> uint64 { return _timestamp; }
auto setUpdate(function<void ()> update) { _update = update; }
auto setTimestamp(uint64 timestamp) -> void { _timestamp = timestamp; }
@@ -7,7 +7,7 @@ struct Setting : Object {
DeclareClass(Setting, "Setting")
using Object::Object;
inline auto dynamic() const -> bool { return _dynamic; }
auto dynamic() const -> bool { return _dynamic; }
auto setDynamic(bool dynamic) -> void {
_dynamic = dynamic;
@@ -44,9 +44,9 @@ template<typename Cast, typename Type> struct Abstract : Setting {
_modify = modify;
}
inline auto modify(Type value) const -> void { if(_modify) return _modify(value); }
inline auto value() const -> Type { return _currentValue; }
inline auto latch() const -> Type { return _latchedValue; }
auto modify(Type value) const -> void { if(_modify) return _modify(value); }
auto value() const -> Type { return _currentValue; }
auto latch() const -> Type { return _latchedValue; }
auto setModify(function<void (Type)> modify) {
_modify = modify;
@@ -129,24 +129,64 @@ protected:
struct Boolean : Abstract<Boolean, boolean> {
DeclareClass(Boolean, "Boolean")
using Abstract::Abstract;
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::Boolean>()) {
Object::copy(source);
setValue(source->value());
setLatch();
}
}
};
struct Natural : Abstract<Natural, natural> {
DeclareClass(Natural, "Natural")
using Abstract::Abstract;
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::Natural>()) {
Object::copy(source);
setValue(source->value());
setLatch();
}
}
};
struct Integer : Abstract<Integer, integer> {
DeclareClass(Integer, "Integer")
using Abstract::Abstract;
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::Integer>()) {
Object::copy(source);
setValue(source->value());
setLatch();
}
}
};
struct Real : Abstract<Real, real> {
DeclareClass(Real, "Real")
using Abstract::Abstract;
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::Real>()) {
Object::copy(source);
setValue(source->value());
setLatch();
}
}
};
struct String : Abstract<String, string> {
DeclareClass(String, "String")
using Abstract::Abstract;
auto copy(Node::Object object) -> void override {
if(auto source = object->cast<Node::String>()) {
Object::copy(source);
setValue(source->value());
setLatch();
}
}
};
File renamed without changes.
File renamed without changes.
@@ -2,21 +2,21 @@ struct Screen : Object {
DeclareClass(Screen, "Screen")
using Object::Object;
inline auto width() const -> uint { return _width; }
inline auto height() const -> uint { return _height; }
inline auto scaleX() const -> double { return _scaleX; }
inline auto scaleY() const -> double { return _scaleY; }
inline auto aspectX() const -> double { return _aspectX; }
inline auto aspectY() const -> double { return _aspectY; }
inline auto colors() const -> uint { return _colors; }
auto width() const -> uint { return _width; }
auto height() const -> uint { return _height; }
auto scaleX() const -> double { return _scaleX; }
auto scaleY() const -> double { return _scaleY; }
auto aspectX() const -> double { return _aspectX; }
auto aspectY() const -> double { return _aspectY; }
auto colors() const -> uint { return _colors; }
inline auto saturation() const -> double { return _saturation; }
inline auto gamma() const -> double { return _gamma; }
inline auto luminance() const -> double { return _luminance; }
auto saturation() const -> double { return _saturation; }
auto gamma() const -> double { return _gamma; }
auto luminance() const -> double { return _luminance; }
inline auto colorBleed() const -> bool { return _colorBleed; }
inline auto interframeBlending() const -> bool { return _interframeBlending; }
inline auto rotation() const -> uint { return _rotation; }
auto colorBleed() const -> bool { return _colorBleed; }
auto interframeBlending() const -> bool { return _interframeBlending; }
auto rotation() const -> uint { return _rotation; }
auto resetPalette() -> void;
auto resetSprites() -> void;
File renamed without changes.
@@ -2,12 +2,12 @@ struct Sprite : Object {
DeclareClass(Sprite, "Sprite")
using Object::Object;
inline auto visible() const -> bool { return _visible; }
inline auto x() const -> uint { return _x; }
inline auto y() const -> uint { return _y; }
inline auto width() const -> uint { return _width; }
inline auto height() const -> uint { return _height; }
inline auto image() const -> const uint32* { return _pixels.data(); }
auto visible() const -> bool { return _visible; }
auto x() const -> uint { return _x; }
auto y() const -> uint { return _y; }
auto width() const -> uint { return _width; }
auto height() const -> uint { return _height; }
auto image() const -> const uint32* { return _pixels.data(); }
auto setVisible(bool visible) -> void;
auto setPosition(uint x, uint y) -> void;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -1,4 +1,7 @@
namespace name=Resource
namespace name=Ares
binary name=Icon file=icon.png
binary name=Logo file=logo.png
namespace name=Sprite
namespace name=SuperFamicom
binary name=CrosshairBlue file=sprite/sfc/crosshair-blue.png
+808
View File
@@ -0,0 +1,808 @@
#include "resource.hpp"
namespace Resource {
namespace Ares {
const unsigned char Icon[6562] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,0,0,195,62,97,
203,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,
132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0,
6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,0,96,0,0,0,96,0,
240,107,66,207,0,0,0,7,116,73,77,69,7,228,3,25,12,0,21,79,119,140,126,0,0,24,145,73,68,65,84,120,
218,237,157,121,116,85,199,157,231,63,117,151,183,191,39,61,45,32,33,132,22,4,72,236,251,106,22,35,28,176,143,77,
66,156,100,156,196,91,210,233,57,246,36,221,227,142,51,137,167,113,220,238,196,113,22,187,211,238,100,38,238,201,44,113,
60,167,51,157,105,143,103,226,156,147,165,19,239,110,27,219,128,1,177,25,132,132,192,32,208,246,164,247,244,246,119,111,
205,31,87,74,220,182,65,79,210,91,132,185,159,131,14,7,206,189,87,181,124,235,87,85,191,170,250,21,216,216,216,216,
216,216,216,216,216,216,216,92,93,136,98,39,96,10,229,91,22,59,81,197,224,106,20,128,120,215,207,40,38,176,5,88,
1,164,128,40,208,3,156,31,249,59,50,242,127,233,98,39,62,215,104,197,78,64,17,144,124,112,107,111,6,238,23,32,
220,110,45,237,243,234,26,144,25,142,165,195,241,184,209,37,165,108,7,78,0,135,129,99,64,47,150,40,174,104,174,70,
11,112,41,124,64,43,240,5,135,174,172,219,184,174,90,189,121,103,131,195,231,213,221,157,93,97,113,170,51,76,123,103,
216,60,125,38,18,29,28,74,245,198,226,153,54,96,15,240,26,150,40,66,88,150,228,138,194,22,192,251,41,1,118,10,
193,23,155,26,75,154,239,253,226,98,121,243,77,13,94,77,19,250,80,56,205,133,158,24,71,223,14,177,255,96,31,123,
15,244,154,237,167,194,67,161,161,228,113,195,144,207,2,191,7,222,2,194,197,206,68,182,216,2,184,52,117,192,93,46,
167,122,251,206,235,235,60,187,239,93,174,55,214,251,61,82,34,20,1,25,67,18,26,74,210,222,17,230,229,87,187,121,
241,213,110,121,248,88,40,52,16,74,188,41,37,191,0,126,11,116,1,70,177,51,114,57,212,98,39,96,10,51,4,188,
156,49,228,145,35,199,67,205,47,191,214,93,81,95,231,79,214,215,250,29,114,164,225,120,220,26,181,53,62,214,175,174,
226,134,235,106,197,166,245,213,238,96,137,163,41,60,156,254,72,56,146,186,193,48,100,21,208,7,12,48,69,187,7,91,
0,151,199,0,78,2,47,244,246,37,42,159,125,241,220,92,175,71,75,45,108,41,83,53,77,81,165,132,209,31,151,75,
165,174,214,199,230,13,213,108,223,90,171,214,213,250,43,162,209,244,134,190,129,228,141,153,140,89,3,92,192,18,195,148,
154,110,218,2,200,142,16,240,92,44,158,73,191,178,231,194,170,88,60,147,94,189,172,82,115,58,85,85,190,171,58,165,
4,33,4,193,82,39,43,151,86,178,125,235,76,49,187,33,80,50,56,148,90,219,219,31,223,145,201,200,82,224,52,48,
88,236,12,141,98,11,32,123,82,192,27,233,140,121,97,239,129,222,245,125,3,73,177,126,245,116,213,237,210,254,149,8,
224,143,86,193,235,209,89,186,176,156,235,182,206,20,51,103,248,130,221,23,99,27,251,7,18,155,77,73,18,232,24,249,
102,81,177,5,48,62,12,224,144,105,210,117,232,200,192,250,158,222,184,118,205,218,170,15,20,193,40,163,66,88,177,184,
130,173,155,106,20,183,91,171,238,236,138,92,55,28,77,207,1,58,129,139,197,204,144,45,128,137,241,182,148,116,30,62,
22,218,20,26,76,106,215,172,173,82,157,14,245,178,101,41,129,96,169,147,13,107,170,88,190,164,194,209,215,159,88,244,
78,119,180,213,48,100,18,120,155,34,89,3,91,0,19,231,164,148,156,107,59,58,176,197,148,176,126,213,116,93,211,196,
229,69,48,50,70,104,152,229,167,117,115,13,30,143,86,118,162,125,232,218,225,104,186,6,203,153,52,88,232,76,216,2,
152,28,199,165,100,240,224,225,254,173,229,65,167,185,108,113,133,131,44,124,43,82,130,199,173,179,102,197,52,22,182,148,
57,58,187,194,203,206,95,136,173,196,154,113,156,45,100,6,108,1,76,158,35,233,140,169,189,213,214,183,126,209,252,178,
244,236,250,128,83,202,236,28,108,66,8,154,26,2,108,88,83,37,66,131,169,89,167,58,195,91,50,134,236,197,90,107,
40,136,223,192,22,192,228,49,129,67,177,88,166,254,200,177,129,150,173,155,106,140,178,160,211,33,179,156,237,75,9,229,
101,46,54,173,175,66,8,17,108,59,26,218,156,76,25,41,224,16,5,88,125,180,5,144,27,146,192,225,158,190,196,166,
161,112,42,216,186,185,70,213,117,37,235,178,149,18,220,46,141,213,43,166,81,90,234,240,28,56,220,191,33,26,203,168,
192,94,242,60,56,180,5,144,59,66,192,197,147,29,67,59,234,102,250,88,178,176,60,235,174,0,172,89,130,166,9,150,
45,170,160,166,218,235,216,119,160,111,117,100,56,237,2,222,192,18,88,94,176,5,144,91,58,13,67,86,158,236,24,90,
217,186,169,198,40,47,115,101,221,21,140,162,40,208,50,55,200,172,90,159,190,239,64,223,202,161,112,202,129,181,236,156,
23,75,96,11,32,183,152,192,201,254,129,228,22,32,184,117,227,12,93,8,161,76,228,67,205,115,74,153,57,195,171,189,
177,175,119,121,100,56,13,240,58,144,201,117,130,109,1,228,158,65,32,211,217,21,185,110,221,170,233,70,221,76,159,115,
188,86,96,148,121,77,165,76,159,230,209,247,236,237,89,17,141,101,34,88,99,130,156,206,14,108,1,228,135,211,241,132,
177,42,30,207,204,218,190,173,86,29,203,65,116,41,132,128,230,185,165,120,220,154,99,207,222,158,21,201,148,113,6,56,
146,203,132,218,2,200,15,9,32,126,174,59,122,253,218,149,211,105,168,243,79,216,10,40,138,96,97,115,144,68,202,240,
236,61,208,183,204,48,228,62,224,76,174,18,106,11,32,127,156,79,166,204,181,166,41,103,109,111,157,169,41,202,196,198,
2,0,186,166,178,100,97,57,103,207,69,131,71,142,135,230,0,47,144,35,183,177,45,128,252,145,4,196,133,158,248,246,
214,77,53,178,122,186,103,194,86,64,2,110,183,198,252,230,32,251,15,245,205,58,223,29,243,0,207,147,3,71,145,45,
128,252,210,27,139,103,90,43,203,93,21,27,215,85,101,181,78,112,41,70,61,134,53,213,94,241,210,171,221,205,195,209,
244,121,172,13,168,147,194,22,64,126,25,6,102,134,35,233,117,31,189,161,94,241,120,180,73,157,195,144,18,234,106,125,
164,210,166,227,181,55,47,54,155,166,124,5,107,171,217,132,177,5,144,127,226,145,72,122,215,154,149,211,196,220,217,37,
238,137,118,3,163,168,138,194,188,166,82,142,28,11,149,159,58,29,246,1,255,204,36,156,68,182,0,242,79,56,147,49,
55,150,5,157,245,173,155,107,52,96,194,131,65,176,198,3,62,175,78,213,116,15,207,191,114,190,105,120,56,221,9,28,
156,232,247,108,1,228,159,20,80,151,72,24,107,63,126,99,131,238,113,107,147,46,115,41,97,230,12,47,131,131,41,253,
245,125,61,51,165,228,159,177,182,177,143,155,73,169,209,38,107,246,188,115,62,154,110,239,8,199,133,200,205,89,28,77,
83,184,253,150,57,44,108,9,46,7,238,100,130,117,105,91,128,194,144,72,38,141,27,23,52,151,149,173,89,81,233,50,
115,112,50,64,74,40,43,117,97,154,136,23,94,233,174,53,12,249,28,214,73,230,113,97,91,128,194,16,2,142,183,29,
237,87,83,105,51,103,155,60,36,176,243,250,58,86,44,173,152,13,220,198,4,26,180,45,128,194,144,4,142,182,29,29,
136,15,71,211,102,142,122,1,164,148,76,171,116,243,217,79,54,225,114,170,159,4,22,140,247,27,182,0,10,199,201,190,
129,164,54,20,78,41,185,26,7,128,213,21,108,223,90,203,210,69,229,245,192,39,24,167,179,201,22,64,225,232,140,68,
82,241,179,231,162,145,92,30,201,30,181,2,187,110,108,64,215,148,143,3,245,227,121,223,22,64,225,184,24,141,101,134,
206,158,27,206,228,227,80,254,142,214,90,102,55,6,230,1,59,198,243,158,45,128,194,17,51,77,217,223,219,151,112,229,
178,11,0,48,77,201,172,153,94,90,55,213,104,192,78,32,144,237,187,182,0,10,71,10,8,15,71,211,222,124,124,92,
211,20,174,223,86,75,89,208,185,26,88,150,237,123,182,0,10,71,6,24,14,71,82,166,105,202,156,71,13,49,77,201,
226,5,101,44,158,95,86,134,21,235,40,43,108,1,20,14,3,72,12,71,51,105,195,144,57,63,245,35,37,148,150,56,
217,184,190,26,44,1,148,103,243,158,45,128,194,97,2,233,84,202,48,164,156,236,154,224,7,35,4,108,92,87,77,121,
153,171,133,44,125,2,182,0,62,68,152,166,100,78,99,128,57,141,129,32,176,46,155,119,108,1,20,14,5,208,29,14,
85,21,185,158,6,140,32,37,148,150,58,89,177,180,18,96,45,48,230,128,211,22,64,225,80,1,151,207,171,57,84,117,
226,27,68,199,66,87,5,203,151,84,224,118,107,139,129,202,177,158,183,5,80,56,116,192,95,18,112,8,69,153,216,57,
129,108,48,37,44,104,14,18,44,113,84,98,133,191,189,44,182,0,10,135,14,248,189,30,61,175,241,133,165,148,84,77,
243,80,87,235,247,3,139,198,122,222,22,64,225,240,40,138,40,175,172,112,37,242,52,9,0,172,113,128,207,167,211,212,
24,0,152,195,24,1,193,109,1,20,142,233,94,143,86,82,91,227,211,242,29,42,210,229,80,104,172,15,0,52,97,5,
193,190,36,182,0,10,71,99,192,239,112,215,214,248,252,249,14,21,42,129,250,89,126,60,110,173,14,91,0,83,134,166,
138,50,87,166,36,160,155,249,236,2,0,144,48,163,202,131,219,165,249,129,105,151,123,212,22,64,97,112,2,243,23,45,
40,115,251,188,186,82,128,250,103,122,165,27,183,91,117,3,51,46,247,172,45,128,194,16,4,154,23,205,47,51,28,186,
162,231,251,151,73,9,94,175,78,176,212,233,100,12,95,128,45,128,194,208,82,18,112,204,92,190,164,130,92,236,8,30,
27,137,174,43,4,252,14,29,75,124,151,100,44,1,216,23,74,228,134,117,181,53,94,189,169,33,224,206,123,255,63,130,
174,41,248,125,58,76,98,16,248,222,155,181,108,38,70,0,184,102,195,154,42,45,88,234,84,11,84,255,104,170,192,227,
209,192,114,64,93,18,219,2,228,159,22,183,91,91,180,109,115,141,161,170,249,115,1,191,23,161,8,28,186,2,99,212,
225,88,199,149,109,1,76,158,237,77,13,1,223,138,165,149,110,179,48,3,0,164,4,69,88,219,196,24,163,14,199,178,
0,83,234,122,147,43,144,42,96,199,245,219,106,69,121,153,75,47,148,249,31,15,246,44,32,191,180,86,148,187,230,222,
180,163,78,17,162,112,101,45,132,181,42,152,206,152,48,70,35,190,92,162,36,176,9,184,155,49,70,146,54,31,72,0,
184,101,219,230,26,173,101,94,176,96,230,127,20,105,74,210,233,201,9,0,172,187,116,191,13,108,43,104,234,63,28,108,
11,248,29,107,110,253,212,28,225,116,40,5,191,162,55,99,72,98,177,12,140,17,72,106,44,1,164,70,54,47,253,9,
80,90,232,76,92,193,148,2,159,255,200,181,53,142,213,43,166,21,188,245,3,164,211,38,35,33,102,35,151,123,110,44,
1,68,221,46,205,112,58,213,117,192,199,10,158,139,43,151,93,101,65,231,218,63,189,163,69,184,157,106,17,6,127,130,
116,198,36,28,73,165,25,35,158,224,88,2,232,241,251,116,117,243,250,106,85,8,238,2,26,10,157,149,43,144,70,224,
174,79,125,108,182,186,106,89,165,215,40,66,235,23,2,162,209,52,161,193,100,146,49,130,70,140,37,128,243,82,146,222,
117,99,131,99,222,156,210,102,224,46,174,206,43,231,179,69,7,238,158,215,84,50,239,174,207,181,232,154,150,253,165,17,
185,68,0,23,123,227,196,227,153,56,208,125,185,103,199,180,0,195,177,116,196,235,209,60,95,190,123,145,116,58,212,91,
25,231,233,211,171,140,29,78,167,250,153,123,238,94,44,27,235,3,158,98,244,253,0,8,56,223,29,35,158,48,34,76,
210,2,68,98,177,76,87,71,87,152,143,223,212,224,249,248,77,13,30,224,47,129,217,197,201,217,148,166,9,216,125,243,
77,13,238,93,55,214,123,164,148,69,243,162,10,224,244,153,8,177,120,166,139,73,14,2,135,129,246,142,211,17,84,85,
56,254,227,95,44,213,23,182,4,231,3,247,3,37,197,202,224,20,164,4,216,189,176,165,172,249,107,255,126,169,195,227,
214,198,125,83,72,46,73,164,12,58,186,194,0,237,192,101,119,33,143,37,128,12,112,162,189,99,136,161,112,154,134,58,
191,231,161,221,171,168,172,112,125,20,248,34,99,172,52,93,37,232,192,151,42,43,220,31,125,104,247,74,26,234,252,197,
51,253,88,3,192,225,225,12,237,29,97,128,19,140,113,203,72,54,238,201,182,211,103,34,145,11,61,49,164,68,108,185,
102,134,255,190,123,150,10,143,91,251,115,224,86,174,238,5,35,1,220,234,113,107,127,126,223,61,75,196,150,107,102,248,
77,179,120,166,31,172,187,8,187,47,198,56,125,38,18,6,218,198,122,62,27,1,28,15,13,165,122,143,190,29,66,17,
32,4,202,237,183,204,245,222,245,185,22,77,85,197,3,192,46,174,78,17,8,96,151,166,42,15,220,253,249,249,234,237,
183,204,245,22,210,223,127,41,20,1,71,143,135,24,28,74,245,2,199,199,124,62,139,111,246,198,227,153,182,183,14,246,
145,49,36,82,130,67,87,245,175,124,105,137,255,142,79,207,245,43,138,248,46,112,35,87,151,8,4,112,163,162,136,239,
220,241,233,57,254,123,191,180,216,239,208,139,225,240,121,63,233,140,100,255,161,62,226,137,204,33,160,119,172,231,179,17,
64,20,216,179,247,64,31,131,67,73,132,176,142,31,249,124,186,227,175,239,91,233,255,236,39,155,202,20,69,252,13,87,
143,37,80,128,93,138,34,254,230,51,159,104,42,127,240,190,149,126,159,71,119,20,106,171,215,229,16,2,6,135,146,236,
59,208,11,214,45,99,177,177,222,201,214,81,161,38,146,198,71,175,221,88,227,174,157,225,67,202,63,220,118,169,94,179,
182,74,29,10,167,212,182,163,3,91,76,83,14,1,71,177,162,97,124,24,113,0,183,106,154,242,240,29,159,158,91,250,
208,238,85,254,146,128,195,97,78,129,202,7,80,85,193,193,35,3,252,248,167,199,67,241,120,230,81,160,107,204,119,178,
252,246,112,60,145,185,174,190,214,95,187,126,77,21,163,249,125,151,8,52,195,148,28,58,210,223,154,78,155,58,86,248,
242,188,221,118,89,36,2,192,61,94,143,182,251,75,95,88,224,190,255,43,203,253,1,223,212,169,124,176,6,128,63,123,
170,157,223,62,123,118,63,240,3,32,62,214,59,217,10,32,14,52,8,69,108,186,126,91,45,46,215,31,95,147,18,28,
14,69,93,191,122,186,94,22,116,154,251,15,246,173,139,197,51,13,88,215,155,13,20,187,80,114,196,108,224,59,149,229,
174,59,31,248,218,10,253,139,95,88,224,119,187,180,41,97,246,71,177,204,127,138,199,30,111,163,235,236,240,79,129,95,
101,243,222,120,124,213,102,56,146,218,185,97,77,149,187,126,150,159,247,230,93,83,133,186,108,113,133,99,201,194,242,244,
225,99,161,150,222,254,248,102,224,34,112,154,43,183,75,112,0,215,3,127,187,176,165,108,227,99,15,175,83,118,221,216,
16,208,84,161,77,161,186,7,44,243,255,250,254,94,254,203,79,142,13,36,18,198,183,201,194,252,195,248,4,16,138,39,
140,245,193,82,103,211,150,107,170,185,68,148,19,209,88,31,112,182,110,174,49,194,145,84,105,123,71,120,71,38,99,78,
199,114,72,12,22,187,144,198,73,3,240,85,151,75,221,125,243,206,198,25,143,61,188,94,95,190,164,194,39,101,241,167,
122,31,132,97,74,254,235,19,199,121,233,181,238,23,128,255,68,150,93,240,120,4,144,4,252,195,195,233,29,215,93,91,
171,148,5,157,124,80,43,144,18,17,44,117,58,90,55,213,104,179,106,253,180,119,132,151,15,132,18,91,177,182,38,157,
198,186,84,113,42,83,10,220,34,4,223,109,106,44,217,254,224,215,86,232,95,254,119,139,189,211,42,220,174,98,59,121,
46,133,162,8,186,206,14,243,189,31,30,204,244,245,39,30,3,254,37,219,119,199,187,92,57,48,52,148,250,200,172,90,
223,180,85,203,42,185,148,25,148,18,116,93,81,23,47,40,119,110,219,92,99,42,66,4,59,186,34,219,226,241,204,42,
44,33,157,103,234,13,18,3,88,43,157,223,42,11,58,63,127,219,191,153,91,241,189,191,94,163,111,217,48,195,175,105,
162,96,7,58,38,130,16,130,127,124,250,20,255,231,23,157,71,77,83,62,196,56,172,237,120,5,48,104,154,178,122,120,
56,189,105,251,214,90,188,222,203,47,5,72,137,40,11,186,28,91,54,206,208,215,173,154,110,196,227,153,89,231,186,99,
215,39,83,198,26,172,249,116,15,89,204,85,243,89,118,192,116,172,221,78,127,85,18,112,220,117,211,246,89,13,15,63,
176,90,187,227,150,185,254,138,50,151,115,170,182,250,63,100,64,8,122,250,226,60,252,253,183,56,243,206,240,223,3,255,
111,60,239,79,100,195,194,64,223,64,98,71,83,99,73,233,146,133,229,140,213,50,164,4,33,132,82,55,211,231,220,190,
173,86,93,187,114,154,52,77,57,235,66,79,124,123,60,145,185,14,168,193,154,101,68,152,196,245,103,227,41,51,172,214,
190,4,248,130,16,220,95,81,238,250,236,206,235,235,26,190,113,223,74,253,223,222,57,223,211,56,203,239,1,242,126,140,
59,23,40,138,224,233,95,118,242,228,63,158,236,204,24,242,1,172,129,247,184,10,99,188,168,192,119,214,175,158,254,149,
39,31,191,150,202,10,55,217,78,135,132,176,18,156,76,25,153,99,111,15,198,127,249,155,46,243,87,191,63,75,71,103,
56,18,139,103,218,128,151,129,215,128,183,177,174,89,201,213,120,193,201,200,17,109,96,61,112,141,203,165,46,106,106,40,
241,223,240,145,90,110,218,94,167,180,204,11,186,157,14,69,51,77,57,166,168,167,10,66,8,122,122,227,220,126,247,243,
188,246,230,197,239,97,237,213,24,215,140,107,162,230,109,177,211,161,62,253,237,7,86,207,254,147,219,154,179,22,192,187,
81,20,129,148,152,253,3,137,204,254,131,125,177,223,189,240,142,242,202,158,11,153,119,206,71,211,225,72,234,156,148,156,
0,14,99,205,32,58,177,148,29,195,178,18,105,172,208,171,163,49,119,21,44,97,106,88,83,55,15,150,105,111,192,10,
148,212,34,4,205,1,191,163,182,182,198,171,175,95,83,165,183,110,156,97,172,90,62,205,93,94,230,210,133,64,41,230,
18,238,68,17,66,240,223,158,60,198,95,126,243,205,83,201,148,177,139,44,86,255,222,247,141,9,254,110,5,184,127,241,
130,178,191,122,242,241,107,149,198,250,0,19,45,192,81,171,96,24,210,8,13,38,141,246,142,112,124,223,193,62,218,142,
246,171,109,71,7,18,253,3,73,53,28,73,197,99,177,204,144,97,202,126,32,140,213,93,36,249,227,158,119,29,112,97,
29,96,9,168,138,40,247,120,180,146,128,223,225,46,47,115,26,139,230,151,187,23,207,47,203,44,95,90,65,83,99,192,
29,44,113,170,170,42,212,43,169,181,191,175,2,20,65,199,233,48,183,221,245,188,209,118,116,224,27,192,67,252,177,65,
100,95,254,147,72,67,189,162,136,167,254,226,238,69,43,118,223,187,12,69,153,252,88,73,8,75,213,138,128,84,218,76,
15,71,211,230,80,56,165,156,61,23,141,156,61,55,156,233,237,75,184,162,177,180,119,112,40,101,70,99,153,116,42,101,
24,0,14,135,170,250,188,154,94,18,112,40,94,143,30,173,172,112,37,106,107,124,90,109,141,215,95,18,112,152,62,175,
174,56,116,69,55,165,181,144,117,165,86,250,187,49,76,201,67,143,238,231,239,254,254,240,155,166,41,63,73,150,142,159,
247,149,249,36,211,113,231,140,42,207,127,254,241,99,155,60,155,215,87,147,235,45,208,163,130,16,35,41,29,117,62,153,
166,52,12,67,154,163,81,183,133,16,66,85,133,50,26,129,83,74,9,214,159,15,77,133,191,27,85,17,188,240,47,221,
252,233,61,47,197,46,92,140,221,13,60,57,225,111,77,50,45,237,145,225,116,83,111,127,98,241,214,77,53,120,61,122,
206,143,19,143,174,60,74,105,69,195,30,49,219,138,16,168,66,136,145,31,84,41,173,126,124,212,172,143,254,124,216,80,
132,160,111,32,193,215,191,181,151,67,71,250,255,55,240,8,69,188,60,58,5,156,126,231,220,240,86,175,87,47,95,179,
98,26,121,10,132,109,51,130,97,74,126,244,63,142,242,15,255,116,242,132,105,202,47,3,103,38,243,189,92,28,92,184,
96,152,50,121,162,125,104,235,252,230,160,99,78,67,201,135,178,229,77,5,20,69,240,220,75,231,249,230,163,251,163,225,
112,234,1,178,92,241,187,28,185,58,185,114,124,56,154,174,57,221,21,89,190,97,77,149,40,47,115,217,34,200,49,138,
34,56,217,49,196,125,15,190,46,79,180,15,253,4,120,148,49,78,254,102,67,174,4,144,6,218,206,117,199,150,13,132,
146,245,155,214,87,227,113,229,61,36,238,85,131,162,8,66,131,73,30,120,120,47,191,123,225,220,203,192,127,32,139,253,
126,217,144,203,179,107,131,64,123,123,231,208,102,69,136,178,53,43,166,161,105,246,120,96,178,8,1,137,164,193,247,127,
212,198,147,63,63,113,202,48,228,159,1,135,114,245,253,92,31,94,60,107,24,178,231,240,177,208,230,210,18,135,119,233,
162,242,156,248,7,174,86,132,0,195,144,60,241,15,111,243,183,143,183,245,198,226,198,215,128,95,231,242,119,228,227,244,
234,177,100,202,72,30,56,220,127,77,117,149,199,49,127,94,240,170,216,42,156,107,4,150,31,227,169,103,58,249,230,35,
111,69,6,6,147,15,2,63,97,2,222,190,203,145,15,1,72,224,80,52,150,81,246,29,236,91,83,91,227,211,155,231,
150,218,34,24,7,163,142,175,103,126,221,197,253,223,218,27,191,208,19,123,4,248,33,121,88,45,205,215,249,245,12,176,
55,50,156,118,238,61,208,183,178,166,218,171,205,155,83,138,237,34,24,27,33,172,22,244,204,111,186,216,253,208,155,201,
115,231,163,127,7,124,151,60,237,155,200,103,0,131,20,240,70,56,146,210,95,223,223,187,124,90,165,91,111,158,83,106,
143,9,46,195,104,159,255,212,51,157,220,255,208,155,241,115,221,209,31,0,15,51,198,17,239,201,144,239,8,22,73,96,
79,100,56,45,247,236,189,184,210,227,210,28,11,90,202,112,232,170,237,39,120,15,138,34,72,38,77,126,242,179,19,124,
227,145,253,195,23,123,226,143,2,223,33,143,149,15,249,23,0,88,62,130,55,98,177,204,208,158,189,61,43,19,9,195,
179,100,97,57,30,183,102,139,96,132,209,121,254,99,143,183,241,253,31,181,245,133,172,1,223,15,40,192,118,185,66,197,
176,201,0,251,82,41,179,107,255,193,190,229,157,103,34,193,133,205,65,42,108,143,33,138,34,104,239,24,226,235,223,218,
203,255,252,249,201,83,177,120,230,171,192,19,20,102,123,92,193,4,0,214,244,229,136,97,200,125,199,79,12,206,222,127,
176,175,174,186,202,35,234,103,249,81,21,229,170,243,26,42,66,96,152,146,231,94,58,207,87,31,124,93,62,251,210,185,
151,51,150,147,231,215,228,120,170,119,57,138,17,197,234,12,240,194,249,11,49,239,139,175,118,207,75,167,77,199,188,166,
82,124,94,253,170,177,6,170,42,232,235,79,240,163,255,126,132,111,60,178,63,122,242,212,208,19,192,189,76,96,75,215,
164,211,82,164,50,24,4,158,139,70,51,239,188,190,183,167,229,208,209,254,242,234,233,30,102,206,240,162,170,202,135,86,
8,138,34,200,24,146,151,95,187,192,215,31,222,203,255,122,234,212,201,161,72,234,1,172,133,157,156,248,246,199,75,177,
4,0,214,224,240,128,97,200,87,58,78,71,188,207,191,124,126,118,127,40,233,152,53,211,71,121,153,139,15,83,168,1,
33,4,66,8,58,187,194,252,240,199,135,121,248,251,7,162,135,142,244,255,147,97,200,47,99,45,233,22,164,191,255,192,
180,21,187,112,70,240,1,55,43,138,248,179,249,205,193,37,159,251,204,60,109,231,142,58,166,79,115,143,236,236,185,50,
77,130,85,241,86,208,198,95,252,234,52,79,252,236,132,113,236,68,232,45,195,144,63,0,254,47,86,20,182,226,166,177,
216,9,120,79,90,106,129,59,92,78,245,206,165,139,202,235,111,253,212,28,101,123,107,45,211,43,221,0,19,222,121,92,
104,70,157,93,61,189,113,126,243,236,89,126,246,84,187,220,127,176,175,51,145,52,158,196,26,225,79,104,3,103,62,152,
74,2,24,69,5,230,1,183,185,93,234,45,139,22,148,207,250,216,13,245,202,13,215,213,82,87,235,67,211,20,166,226,
118,238,209,237,237,153,140,201,217,119,162,252,230,185,179,60,253,203,211,230,193,195,253,103,227,137,204,83,192,79,153,130,
209,83,166,162,0,70,209,128,22,224,19,186,174,220,220,88,31,152,219,186,169,70,223,209,58,147,37,11,203,9,150,58,
173,155,49,138,40,134,209,74,151,18,66,131,73,218,142,14,240,235,223,159,229,217,23,207,165,59,186,194,237,169,148,249,
52,240,115,172,104,93,147,222,189,147,151,60,20,59,1,89,160,0,117,192,14,33,216,89,90,226,92,189,120,126,89,112,
211,134,106,177,105,93,53,77,141,1,130,165,78,52,85,144,239,125,255,239,62,183,144,206,72,6,135,146,156,236,8,243,
242,171,221,188,248,106,183,60,124,108,32,20,26,76,190,46,37,207,0,191,197,154,242,78,169,22,255,190,60,21,59,1,
227,36,0,44,5,182,169,170,104,13,150,56,91,154,26,3,37,43,150,86,42,203,151,84,176,96,94,144,170,233,30,124,
62,29,151,99,196,185,244,135,243,1,35,255,120,23,163,66,121,255,42,165,53,120,251,195,121,4,172,240,171,195,195,25,
186,47,198,56,122,60,196,254,67,125,236,61,208,107,182,119,132,135,6,135,146,71,13,67,62,7,252,14,43,62,82,184,
216,5,149,45,87,154,0,70,81,176,14,123,46,0,214,1,107,221,110,109,113,176,196,81,89,87,235,247,54,53,6,148,
198,250,0,245,179,252,204,168,242,48,189,210,141,207,171,163,105,10,186,174,160,169,2,161,88,45,25,172,11,150,164,41,
201,24,214,61,59,233,140,73,52,154,230,98,111,156,243,221,49,78,159,137,208,209,21,166,189,35,108,158,62,19,137,14,
134,83,61,113,235,48,235,107,192,30,172,120,72,33,10,232,193,203,21,87,170,0,222,139,23,168,192,26,51,44,4,230,
10,65,147,219,165,213,185,92,106,192,227,214,92,193,82,167,51,224,119,104,126,191,46,60,110,13,93,83,70,47,86,36,
53,82,233,177,88,134,200,112,90,134,35,169,76,104,48,153,140,197,51,137,68,194,8,199,19,153,46,41,105,199,58,168,
218,134,213,167,247,82,220,216,6,57,225,195,34,128,247,162,97,137,194,15,76,195,186,66,125,26,86,248,23,31,214,97,
210,119,95,141,43,71,126,210,88,115,243,16,86,240,138,238,145,191,35,88,1,51,51,217,38,192,198,198,198,198,198,198,
198,198,198,198,198,198,198,102,10,242,255,1,73,55,77,63,249,154,219,213,0,0,0,37,116,69,88,116,100,97,116,101,
58,99,114,101,97,116,101,0,50,48,50,48,45,48,51,45,50,53,84,48,51,58,48,48,58,50,49,43,48,57,58,48,
48,37,63,130,7,0,0,0,37,116,69,88,116,100,97,116,101,58,109,111,100,105,102,121,0,50,48,50,48,45,48,51,
45,50,53,84,48,51,58,48,48,58,50,49,43,48,57,58,48,48,84,98,58,187,0,0,0,0,73,69,78,68,174,66,
96,130,
};
const unsigned char Logo[13719] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,61,0,0,0,85,8,6,0,0,0,59,75,51,
30,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,
132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0,
9,112,72,89,115,0,0,0,96,0,0,0,96,0,240,107,66,207,0,0,0,7,116,73,77,69,7,228,3,26,14,47,
13,95,54,87,197,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,52,134,73,68,65,84,120,
218,237,93,7,84,20,87,23,158,237,203,86,150,222,123,7,165,55,81,236,13,17,27,162,32,40,168,136,191,177,247,150,
216,123,143,93,163,49,137,105,198,222,162,198,104,76,76,52,61,198,30,11,177,198,2,130,130,96,129,125,255,187,51,179,
184,16,17,216,153,69,48,115,207,121,7,17,216,41,239,190,239,125,183,62,130,224,132,19,78,56,225,132,19,78,56,225,
132,19,78,56,225,132,19,78,56,225,132,19,78,56,97,87,120,120,240,233,33,196,195,22,15,123,60,44,240,144,210,63,
231,132,19,78,56,121,227,128,15,196,4,143,53,60,30,241,167,198,84,114,194,213,89,185,223,84,45,94,135,191,31,137,
255,191,61,30,110,52,16,114,194,9,39,156,188,49,226,142,199,84,27,107,217,197,183,250,251,63,253,104,77,115,237,162,
153,81,168,127,154,79,81,147,104,155,108,59,27,217,30,129,128,55,22,255,78,4,30,114,238,117,113,194,9,39,111,130,
128,169,27,164,84,136,54,165,38,121,222,63,245,93,226,211,71,215,51,80,246,169,100,244,245,206,120,52,111,106,164,54,
161,157,115,142,147,131,226,32,159,207,251,31,254,93,87,250,111,56,225,132,19,78,234,181,0,147,203,12,12,48,63,191,
253,195,214,197,24,248,180,5,55,50,16,140,127,46,164,162,163,123,58,162,9,195,131,74,66,3,45,46,74,37,130,89,
248,119,253,56,240,227,132,19,78,234,187,128,191,47,6,155,181,223,188,59,183,81,225,131,171,125,74,31,94,75,71,48,
0,252,30,94,203,64,103,79,116,71,11,167,71,105,163,194,172,178,197,98,193,52,252,251,206,220,107,227,132,19,78,234,
187,120,154,170,197,59,102,191,29,81,144,123,133,2,190,252,191,169,1,166,111,1,30,231,127,76,66,211,39,132,149,250,
122,107,254,192,191,159,134,135,140,123,109,156,112,194,73,125,22,71,165,82,180,101,206,59,17,5,121,217,125,74,117,160,
167,15,126,192,252,126,56,216,9,245,238,225,249,24,131,228,135,248,111,188,185,215,198,9,39,156,212,103,113,54,211,72,
246,172,93,210,228,49,6,56,109,69,224,131,1,172,239,206,197,52,180,114,65,12,242,245,50,253,19,255,77,2,30,2,
238,213,113,194,9,39,245,85,252,156,29,21,39,246,111,105,95,12,0,247,50,224,3,243,23,152,223,209,221,241,168,77,
115,135,251,2,1,111,4,65,229,1,114,194,9,39,156,212,47,161,51,153,219,68,135,91,95,57,127,50,233,217,163,74,
128,143,100,125,55,40,95,95,239,158,94,69,82,169,96,1,254,59,21,247,6,57,225,132,147,250,138,125,99,6,245,243,
203,131,192,70,101,160,167,243,245,221,56,211,11,13,27,24,240,76,33,23,173,194,127,167,225,94,31,39,156,112,82,31,
197,204,92,35,217,181,117,83,235,98,96,116,175,4,190,107,84,110,223,232,193,13,75,228,20,240,169,185,215,199,9,39,
156,212,71,105,217,170,169,253,245,235,167,83,158,235,167,177,188,220,207,71,1,223,208,172,128,231,82,137,96,62,193,249,
248,56,225,132,147,122,40,34,137,68,176,122,237,146,38,69,85,177,61,29,227,187,126,186,23,74,235,225,89,196,231,241,
134,19,92,5,7,39,156,112,82,15,37,186,121,19,187,236,27,103,122,149,84,197,246,116,62,190,243,39,147,80,235,230,
14,247,240,223,198,243,249,92,247,42,78,56,225,164,126,137,88,46,23,109,250,108,67,203,226,234,176,61,93,84,247,200,
174,120,200,227,251,29,255,189,23,247,10,57,225,132,147,250,38,93,122,247,240,188,15,181,185,213,1,61,29,227,91,62,
63,6,169,85,226,247,9,206,191,199,9,39,156,212,51,177,241,116,87,159,56,245,93,226,43,243,246,42,38,48,223,185,
144,134,82,147,60,31,227,191,239,37,22,113,238,61,78,56,225,164,254,8,79,36,226,47,217,184,188,105,181,77,92,93,
201,218,241,47,19,144,183,167,233,47,248,51,28,185,215,200,9,39,156,212,39,233,62,48,195,55,23,51,56,109,117,65,
79,199,248,166,142,15,213,10,5,188,183,185,87,200,9,39,156,212,39,241,139,109,100,123,233,230,217,234,69,113,245,125,
123,208,147,47,60,196,242,50,193,117,101,225,132,19,78,234,145,152,58,59,42,143,252,126,172,91,73,117,253,122,250,192,
55,111,106,36,18,9,249,83,241,215,186,254,156,208,49,6,2,47,112,106,156,15,30,129,120,52,199,163,27,30,233,120,
100,226,49,16,15,104,165,159,69,127,223,23,143,222,244,239,180,194,35,20,143,0,130,138,92,195,9,116,50,226,205,233,
68,99,138,71,56,188,11,30,143,55,134,47,20,205,195,99,33,143,207,159,68,191,143,102,120,216,25,249,121,193,65,44,
165,231,200,23,143,16,60,218,225,209,131,158,7,152,143,62,120,164,224,209,21,143,166,244,60,250,210,127,99,66,212,253,
28,82,120,127,10,130,106,218,235,71,191,243,14,120,244,194,163,63,173,127,131,240,120,139,214,71,208,195,12,60,82,241,
232,132,71,12,173,131,158,120,152,227,33,34,184,211,15,107,44,66,181,74,252,225,222,207,218,61,169,137,95,79,7,122,
167,191,79,68,65,13,204,207,18,117,171,243,50,40,190,134,94,16,201,120,225,190,35,146,202,63,85,88,57,28,49,115,
245,63,103,19,16,253,143,75,163,14,15,60,91,39,23,250,197,247,123,218,160,219,224,210,192,30,35,80,112,242,104,20,
156,50,134,252,10,223,55,236,62,84,219,160,235,91,37,240,59,94,109,122,61,118,111,214,45,223,49,162,109,174,181,111,
196,45,51,87,191,51,74,27,231,163,98,153,242,11,30,95,48,3,95,167,31,65,29,188,100,206,162,18,54,193,99,24,
30,67,24,142,161,52,80,72,42,124,62,220,167,39,126,63,19,21,86,142,63,56,69,180,125,208,48,113,104,105,163,65,
243,81,179,49,107,81,243,113,235,81,227,161,75,224,157,104,221,154,118,45,208,56,251,158,19,74,76,214,211,139,84,205,
18,0,216,210,224,53,68,32,150,174,151,91,216,29,134,57,178,11,108,114,215,181,73,167,124,239,182,105,69,254,9,3,
158,227,121,40,197,243,4,243,81,26,208,121,96,137,111,135,190,79,61,91,37,23,186,196,116,204,179,109,16,115,199,204,
45,224,60,204,175,80,34,251,0,64,155,6,75,23,26,20,94,167,200,232,77,54,17,244,16,235,203,22,165,173,203,183,
22,30,129,151,237,131,155,221,199,239,53,223,167,125,159,226,128,206,255,43,9,76,26,174,5,253,11,77,155,128,66,210,
198,147,186,24,4,122,152,56,84,27,208,229,127,37,190,113,25,79,60,90,36,61,114,140,104,147,107,229,19,126,195,212,
209,235,23,169,202,124,15,95,32,132,74,169,100,26,8,69,28,164,85,33,230,102,82,2,43,201,172,245,203,98,11,11,
107,8,122,58,223,222,216,161,129,37,176,35,9,4,188,215,13,116,14,120,116,199,139,103,141,202,214,245,39,135,176,150,
57,254,157,178,158,199,188,181,16,181,155,185,21,117,89,249,45,74,249,248,28,234,179,253,58,202,216,125,7,245,219,159,
139,50,15,62,68,3,190,42,192,163,176,146,81,64,254,78,255,253,15,80,223,189,247,81,198,174,127,80,239,109,215,80,
242,71,103,81,183,213,223,163,184,57,59,81,147,225,239,2,72,150,58,71,181,207,195,215,253,153,47,16,205,195,247,17,
141,135,152,201,243,136,76,20,159,250,196,165,163,136,190,83,81,120,198,59,6,13,248,91,248,12,12,86,223,208,12,67,
39,106,60,239,195,53,46,126,151,240,34,211,194,187,201,216,117,27,13,56,132,223,197,225,199,40,139,30,240,111,120,15,
240,236,61,63,248,147,4,66,188,80,31,155,104,172,190,198,159,209,147,168,121,7,30,152,39,8,126,37,11,165,178,141,
26,103,159,51,174,77,58,23,132,246,158,168,109,245,246,71,168,243,242,111,80,202,102,60,71,59,110,162,190,123,238,161,
254,95,62,168,48,71,248,235,161,71,40,243,64,62,57,127,125,247,220,197,243,121,3,207,235,121,114,126,219,76,251,12,
69,246,159,129,48,32,22,89,120,6,93,17,203,84,159,211,76,201,169,22,89,32,108,46,193,248,253,142,53,49,181,60,
136,55,217,91,190,241,253,158,53,122,107,1,106,63,123,7,234,182,246,4,74,253,236,18,74,223,121,11,191,87,120,198,
60,242,153,42,215,193,66,114,94,250,195,51,239,203,161,116,112,107,54,234,177,241,55,212,113,225,151,40,118,228,10,4,
27,131,149,79,216,117,172,51,155,241,181,227,9,238,212,195,202,133,71,225,212,200,69,51,163,158,23,222,236,91,99,208,
3,118,248,213,142,14,200,222,86,190,143,120,61,173,230,129,45,4,129,57,134,23,208,121,188,107,62,109,62,254,61,148,
184,238,71,82,169,200,5,163,91,192,180,242,100,194,162,57,248,136,252,89,205,199,35,242,239,73,112,128,207,211,125,54,
254,30,128,52,113,237,73,4,76,201,46,168,105,14,44,106,184,55,3,153,159,133,218,222,253,183,30,155,254,64,89,95,
23,189,122,65,188,98,12,60,242,4,181,156,244,1,18,138,165,43,219,207,218,174,251,108,55,96,28,24,12,159,117,127,
239,231,178,5,71,189,151,202,159,29,158,17,158,21,128,166,195,252,189,200,182,97,227,39,248,179,102,86,19,76,0,8,
162,5,34,241,18,141,139,239,5,223,248,190,207,224,190,122,110,58,69,46,124,184,190,97,115,84,126,62,116,159,1,128,
152,242,201,5,212,118,250,22,4,27,31,232,6,102,68,112,22,140,187,17,117,17,128,166,3,126,183,159,227,119,115,55,
172,207,100,109,199,197,7,81,239,47,178,73,144,30,80,182,137,208,192,125,136,161,14,194,231,28,166,158,57,243,96,62,
6,210,191,80,171,201,31,32,215,198,9,133,98,133,122,59,189,241,114,166,111,37,146,57,117,92,40,212,225,106,13,97,
122,183,207,165,162,14,109,156,238,209,62,175,218,20,119,0,59,188,195,221,140,202,154,141,122,188,255,59,185,107,102,209,
138,101,184,82,61,52,88,25,117,140,164,247,214,191,81,147,97,203,16,54,187,178,105,211,183,166,172,47,192,62,164,249,
221,62,59,110,48,122,14,184,31,48,151,72,31,17,181,195,249,97,150,118,12,222,23,128,23,9,118,6,124,38,44,100,
135,144,22,121,36,171,224,189,114,93,129,185,213,4,51,144,143,176,57,151,19,51,120,17,2,32,239,127,32,175,108,179,
48,214,124,232,88,43,0,78,18,102,69,161,189,39,105,177,73,120,30,223,207,128,10,172,151,177,139,8,124,158,18,133,
233,14,0,28,96,172,105,248,253,232,116,161,182,244,144,220,188,240,243,2,19,108,129,55,126,75,175,224,155,180,95,80,
194,65,220,191,165,247,248,225,65,15,11,174,215,28,244,116,108,111,214,228,112,88,88,35,69,181,147,172,12,14,235,222,
106,123,143,179,216,132,211,130,57,164,111,138,214,133,161,99,79,221,214,252,128,156,162,218,23,242,120,252,137,53,84,190,
174,190,29,250,62,135,29,156,201,125,0,227,113,111,218,237,49,237,55,115,147,153,89,127,7,230,16,0,1,147,197,24,
158,49,5,225,13,103,9,189,224,43,19,111,1,102,152,118,65,177,57,205,198,174,35,55,130,215,53,79,186,77,176,235,
234,227,200,163,69,143,39,152,133,111,162,77,94,166,98,141,25,228,108,204,236,238,183,196,44,11,0,7,216,87,237,111,
184,122,131,214,189,238,235,127,70,206,209,113,143,177,238,77,96,232,106,121,35,165,207,132,17,65,143,12,97,122,58,208,
59,180,45,14,217,88,201,118,212,194,174,226,32,148,152,172,117,109,210,249,49,248,127,116,166,77,93,1,187,127,47,182,
66,210,223,228,18,19,255,152,142,200,85,105,110,96,37,133,47,147,163,255,55,143,90,64,12,128,23,124,71,86,62,225,
144,86,20,45,81,106,246,2,211,98,2,120,240,60,157,150,30,70,42,91,87,168,191,118,125,133,243,62,3,179,170,11,
192,40,211,182,92,169,85,198,83,213,253,167,239,188,141,194,251,78,69,38,166,150,95,211,145,95,67,37,80,170,50,63,
20,152,52,188,180,215,167,23,235,204,51,86,212,61,103,188,233,210,81,96,78,244,100,224,140,137,225,79,10,13,4,61,
48,113,175,252,158,140,26,69,90,95,54,114,20,215,71,170,54,255,10,204,20,112,94,27,98,154,189,46,229,3,223,153,
133,71,208,53,58,13,163,74,103,191,88,174,254,180,253,172,109,148,121,198,224,186,224,220,199,236,238,39,204,202,54,135,
164,142,215,146,193,27,67,23,38,254,187,244,29,183,144,91,108,23,178,4,81,32,122,41,121,112,192,236,110,45,254,157,
162,174,43,191,163,24,111,29,2,2,221,102,0,230,53,4,160,76,52,214,199,106,234,231,195,204,14,190,52,197,192,255,
103,179,49,107,200,32,87,93,221,120,65,7,18,215,157,68,230,30,129,127,227,123,14,227,160,14,38,144,106,17,53,118,
233,236,70,79,13,9,100,232,198,131,171,125,80,122,138,55,236,40,173,140,5,120,50,51,155,227,224,39,131,136,94,93,
91,72,213,81,190,198,67,151,34,129,88,178,154,168,58,215,141,12,98,128,31,138,137,41,8,62,179,150,147,54,33,188,
72,115,61,90,246,40,134,136,40,147,247,6,11,27,158,1,155,134,31,18,47,111,54,17,98,98,106,245,13,56,240,235,
252,166,68,71,128,129,77,139,229,170,173,68,53,143,67,224,81,254,203,38,166,142,158,23,219,205,248,130,6,187,71,117,
94,247,154,142,90,133,68,82,249,199,4,149,7,249,223,150,6,254,102,132,80,200,95,176,105,85,51,131,82,86,244,77,
220,57,239,68,128,95,111,8,143,253,120,145,173,84,101,118,0,22,92,153,194,214,35,192,211,1,70,175,79,46,32,75,
239,80,216,113,171,106,203,21,96,31,210,236,14,0,7,211,32,6,228,122,153,185,250,147,65,30,38,0,10,127,155,184,
254,71,248,44,96,243,13,95,114,207,45,49,80,159,5,7,58,176,168,122,177,41,225,123,132,200,177,127,66,38,164,92,
77,160,92,15,85,42,175,143,194,218,233,87,72,141,97,207,55,73,71,114,25,101,21,188,250,57,65,151,28,35,218,64,
224,169,57,71,245,8,66,108,110,38,253,252,240,142,14,207,10,24,128,30,0,230,103,27,90,34,133,66,180,114,254,52,
86,171,51,196,124,161,120,89,72,175,177,84,206,86,61,4,60,253,1,201,206,4,85,93,80,69,16,35,227,25,211,32,
6,12,200,171,35,205,100,70,11,244,17,153,167,231,19,151,241,12,54,53,153,198,186,236,70,53,78,100,5,98,7,12,
134,87,33,103,177,62,48,159,138,96,14,249,135,120,51,186,81,13,243,79,37,146,41,183,52,30,178,152,177,30,234,34,
187,160,211,25,187,255,33,131,60,105,95,92,37,211,172,72,115,153,229,128,15,248,134,129,237,209,150,198,127,190,53,146,
165,151,187,250,251,51,63,116,127,14,109,225,13,102,122,215,51,208,177,189,29,145,131,157,124,55,91,145,34,30,159,156,
155,174,78,145,237,30,146,41,0,172,250,77,202,231,57,193,87,93,126,24,252,255,139,255,99,111,1,195,103,182,24,191,
1,9,68,226,85,13,19,135,86,17,196,152,203,40,136,193,182,121,4,102,50,4,66,8,170,92,141,158,31,210,74,111,
13,105,57,241,11,247,179,187,72,191,42,120,145,215,118,168,128,78,199,40,124,145,142,196,242,243,129,219,4,3,194,218,
202,92,15,2,17,25,159,203,242,110,155,250,20,82,125,152,248,69,225,107,247,13,191,144,249,156,222,237,210,158,56,132,
180,200,181,246,143,186,97,237,27,241,183,93,96,236,61,207,86,201,197,240,179,238,239,253,194,154,101,3,239,176,231,135,
167,33,133,234,2,193,117,70,34,66,219,182,116,188,118,247,98,90,169,161,128,167,95,146,230,231,173,57,73,176,119,92,
164,173,194,202,225,100,252,130,125,172,249,135,116,169,36,160,184,160,120,109,103,108,65,16,209,12,237,61,137,172,170,104,
152,56,164,36,168,231,168,210,200,204,153,168,45,54,97,200,168,28,75,192,7,215,237,252,238,17,36,55,183,61,240,10,
223,10,43,65,12,54,205,242,228,205,103,145,181,127,228,63,4,85,22,167,47,97,106,7,143,115,113,115,119,177,55,63,
36,251,201,195,230,248,31,168,245,219,31,161,136,126,211,200,121,129,8,105,120,250,59,168,197,196,247,201,156,59,202,132,
46,96,77,39,32,202,109,227,31,125,155,32,75,23,95,106,226,58,97,243,253,84,215,85,223,25,254,172,135,40,198,12,
76,81,227,228,115,145,39,16,204,38,168,114,185,96,130,106,218,225,65,187,14,218,192,207,76,157,188,47,68,15,156,163,
133,164,119,54,128,15,88,165,119,219,52,72,40,239,244,95,7,189,126,99,134,4,230,63,50,48,71,79,63,130,123,249,
183,158,40,42,204,234,34,65,213,83,50,179,105,229,100,117,211,40,168,139,5,5,103,139,61,0,99,4,154,239,218,56,
161,0,130,5,34,19,197,135,152,81,78,193,215,130,3,143,116,133,221,253,177,226,143,135,146,30,43,223,240,91,144,229,
14,37,64,172,0,8,222,109,77,29,189,206,224,107,216,24,51,136,193,214,0,0,194,160,163,197,20,116,90,5,179,200,
9,155,185,223,2,8,177,2,62,116,96,161,211,178,175,145,95,199,204,103,120,193,159,21,74,101,239,225,235,64,29,45,
52,26,72,135,60,80,129,88,186,10,191,191,179,129,221,135,149,36,127,116,134,181,119,4,159,3,101,123,248,26,19,105,
221,211,99,121,164,225,50,164,97,247,161,165,153,12,244,0,244,56,106,192,44,8,156,236,162,83,101,94,229,64,36,235,
162,241,59,248,60,188,239,20,109,205,214,64,197,170,33,170,114,104,224,209,39,168,201,240,229,8,91,19,115,196,138,170,
75,167,223,212,82,14,161,92,38,220,184,117,83,235,39,76,252,121,58,208,187,126,58,5,181,108,106,127,141,165,164,79,
23,80,124,8,183,179,161,216,160,0,9,75,191,66,142,97,173,242,132,98,233,6,112,188,19,84,115,128,87,37,215,194,
207,162,148,54,206,167,18,150,124,197,156,205,96,69,4,191,13,54,99,174,191,34,181,39,192,62,152,121,16,163,250,73,
172,5,229,234,59,245,253,113,240,127,113,115,118,1,51,61,94,97,35,51,193,224,179,14,64,130,173,205,0,158,23,18,
205,149,214,78,191,81,155,14,217,53,229,101,166,38,85,99,205,227,189,109,23,220,52,23,130,43,172,232,7,228,31,46,
59,130,100,230,182,71,8,168,214,40,31,141,83,201,204,109,142,48,209,1,50,125,104,197,55,72,105,227,2,141,119,93,
106,176,14,156,85,118,110,191,67,157,55,53,71,122,115,70,155,251,186,210,187,76,93,109,238,238,127,200,220,72,168,124,
233,186,234,56,138,95,176,31,65,149,8,164,232,96,243,28,241,69,226,157,68,53,26,19,240,223,80,224,115,15,106,96,
126,250,210,47,61,159,215,164,151,94,101,160,119,235,92,42,138,107,237,116,189,134,147,250,111,164,145,144,217,16,195,130,
147,71,107,201,93,74,231,212,53,48,186,5,127,11,38,178,153,139,223,21,130,106,19,85,237,78,20,116,78,214,91,193,
41,99,181,140,205,92,136,162,109,187,14,117,185,55,95,241,142,88,11,98,188,178,60,11,191,19,72,210,77,194,38,62,
152,220,157,151,31,197,139,228,20,89,63,172,171,97,5,86,236,24,222,58,31,223,83,71,218,191,74,136,76,200,58,246,
12,200,195,35,211,82,88,112,232,131,105,233,213,166,215,83,200,239,171,65,158,39,0,98,38,48,118,104,32,145,201,214,
220,4,54,185,3,73,13,21,174,21,233,24,222,230,1,89,203,109,104,82,55,214,227,168,1,51,129,73,78,22,201,148,
213,94,11,10,75,7,112,244,206,129,212,26,152,155,94,159,92,36,125,125,48,95,208,188,0,234,204,225,103,33,169,227,
180,254,9,3,158,186,55,75,44,180,15,105,145,107,229,19,150,173,113,241,253,69,110,105,255,173,88,174,222,133,215,212,
74,30,95,0,22,205,104,60,226,254,147,160,71,231,231,245,31,54,176,65,126,77,187,38,87,54,254,57,159,138,58,182,
115,190,193,20,244,192,196,195,147,116,50,168,231,40,4,254,162,46,43,142,145,41,23,176,123,149,117,71,161,235,12,245,
59,129,148,21,114,151,99,43,5,164,15,200,218,47,2,124,82,113,124,145,65,49,150,230,158,45,123,22,235,58,126,48,
77,29,176,15,105,126,139,120,73,53,67,109,4,49,224,125,64,167,25,240,21,97,64,123,160,118,240,248,89,170,182,248,
10,186,166,104,156,125,78,57,71,199,61,140,204,156,169,133,242,57,108,86,65,208,101,69,133,5,226,101,234,232,121,182,
203,202,99,140,153,47,128,47,0,171,71,139,164,98,12,170,208,158,171,166,13,43,36,216,252,251,8,210,100,216,241,41,
230,35,223,248,126,207,241,231,118,214,49,61,158,128,36,155,131,32,123,128,89,202,79,33,10,233,53,14,64,111,40,61,
207,53,145,238,106,123,143,60,219,192,38,119,45,60,131,46,168,29,60,79,194,124,137,100,138,207,4,98,201,2,30,143,
7,61,15,7,227,209,133,160,154,12,4,211,9,215,166,244,59,21,27,130,95,66,58,25,243,77,2,62,149,149,133,201,
222,67,219,59,48,54,109,217,102,122,88,172,176,210,13,199,59,255,60,152,88,153,153,205,17,141,147,207,207,176,123,57,
132,181,124,224,217,170,231,227,6,221,6,63,135,69,25,59,98,5,106,59,253,115,178,52,170,251,250,159,200,192,3,236,
200,253,246,221,39,149,141,76,181,104,223,231,41,237,179,51,116,254,154,67,114,47,27,160,7,133,250,54,254,209,149,109,
12,100,16,163,157,17,131,24,208,117,196,218,47,242,31,204,96,23,130,233,78,47,12,41,61,44,241,104,140,25,193,84,
108,102,254,33,85,155,255,74,80,61,218,202,216,21,95,40,90,10,173,155,216,48,189,97,243,130,32,5,190,151,197,132,
225,39,235,37,120,181,78,41,214,181,9,99,154,214,1,101,115,248,51,39,209,12,159,194,61,145,100,45,116,132,201,98,
88,29,3,243,106,98,106,121,172,26,254,188,138,162,166,211,105,26,16,84,251,52,5,253,190,132,198,4,8,240,103,172,
34,140,219,150,166,182,165,83,98,39,183,59,247,46,245,46,101,131,229,25,193,167,87,113,195,81,211,239,63,152,142,34,
66,167,217,81,88,57,167,11,165,242,247,49,91,57,168,182,119,255,1,239,132,23,237,130,98,161,57,99,129,127,167,129,
207,124,226,50,144,68,101,182,143,96,214,244,50,57,160,203,160,231,108,152,149,80,11,137,205,108,8,246,216,213,118,16,
3,74,166,176,185,3,62,165,102,85,228,106,241,104,157,247,170,176,56,163,109,27,196,220,133,22,70,76,131,23,36,8,
204,252,2,97,198,2,62,52,107,38,190,95,75,239,208,236,212,207,47,51,54,181,203,82,138,196,210,101,120,30,116,159,
47,194,247,184,143,13,159,46,0,115,227,161,75,180,152,81,255,133,55,143,197,52,51,131,6,163,42,99,3,152,33,226,
128,41,228,159,152,241,78,121,67,216,158,218,76,35,217,177,115,115,155,98,54,88,94,89,244,246,87,50,122,123,129,141,
232,109,13,69,64,51,21,5,157,131,212,144,102,49,208,82,28,58,7,7,213,52,69,144,102,61,237,160,255,155,202,206,
237,18,25,165,100,106,206,145,206,236,99,0,60,135,42,49,229,140,18,196,0,0,133,146,41,133,149,195,175,196,203,171,
41,170,181,249,64,215,100,232,208,194,70,64,39,125,199,77,228,220,168,195,35,2,186,48,51,43,225,49,83,218,56,255,
68,246,5,100,184,81,0,211,107,63,107,59,146,40,76,55,233,173,115,169,202,214,245,107,48,247,153,111,68,212,156,194,
166,6,81,84,159,184,244,167,54,1,209,55,85,182,46,39,197,50,229,39,120,3,7,19,31,154,82,180,161,153,157,27,
30,74,226,53,117,72,177,208,152,74,78,218,217,200,46,210,76,163,222,10,125,78,109,159,212,36,207,251,247,47,245,46,
97,3,240,140,152,167,87,171,175,134,118,162,119,226,11,73,160,251,213,189,89,183,199,177,35,150,163,164,13,191,34,54,
204,39,96,18,16,69,195,76,226,61,132,208,203,238,161,139,111,135,140,231,108,6,49,96,161,130,63,20,179,161,155,52,
195,51,84,66,109,26,52,186,195,6,163,2,112,129,50,46,186,209,37,211,3,227,77,228,22,118,7,160,227,14,27,155,
18,116,34,198,102,253,118,61,160,97,17,244,202,39,94,67,58,16,84,98,64,195,91,0,219,38,195,151,145,1,9,159,
246,125,158,56,70,180,205,183,242,9,191,138,245,240,71,12,194,59,49,51,156,75,80,189,241,98,105,215,136,212,216,4,
76,234,234,172,252,242,173,254,254,79,85,74,241,251,68,253,110,197,236,225,230,162,250,241,248,151,9,79,106,122,16,80,
85,21,25,223,176,92,145,97,68,225,209,76,11,108,152,182,208,235,14,43,214,118,56,183,192,171,77,234,19,240,19,130,
34,130,63,144,138,30,23,176,150,120,27,150,254,54,89,159,92,145,221,208,209,81,214,131,24,253,49,88,99,211,28,74,
223,198,86,2,180,85,231,76,68,181,135,40,203,76,200,49,99,227,93,128,111,148,246,179,118,231,49,47,212,150,202,205,
109,247,65,4,154,13,208,3,223,176,137,169,229,62,61,48,22,193,247,9,75,14,25,167,129,66,133,14,200,186,228,108,
72,158,135,192,29,48,88,200,60,104,58,106,37,212,81,151,186,197,118,41,180,244,10,190,140,239,233,0,143,98,134,237,
105,203,138,253,210,50,83,181,100,221,71,107,155,35,204,144,160,67,112,127,111,15,117,125,4,60,19,137,88,176,106,238,
148,200,130,135,215,50,180,108,1,94,89,237,237,123,45,145,66,46,90,49,125,66,88,93,3,56,19,218,207,216,24,143,
1,2,145,100,25,94,40,71,173,124,195,255,134,146,31,168,190,128,40,49,248,219,200,14,46,135,141,211,232,18,0,200,
179,101,207,34,130,202,194,55,122,16,131,100,46,139,190,68,114,11,50,207,206,146,193,59,180,81,219,187,255,14,27,1,
99,19,146,102,158,166,142,94,217,180,111,214,141,222,124,12,29,13,229,150,246,39,217,96,98,212,251,58,128,153,158,5,
228,177,149,245,133,196,44,107,57,212,48,103,213,118,133,140,94,78,158,174,252,14,242,240,122,125,250,23,74,88,124,8,
193,153,27,30,45,122,20,153,58,121,159,1,157,38,168,70,177,38,172,172,26,58,189,99,212,226,89,209,232,143,111,187,
61,13,12,48,63,135,191,111,84,207,0,15,30,34,43,169,179,219,189,91,231,82,75,152,230,229,213,114,151,149,154,50,
56,103,122,65,13,196,202,176,84,102,102,125,24,239,142,151,92,155,116,42,8,78,30,93,10,10,12,190,181,180,207,175,
188,40,238,102,185,206,182,210,196,100,191,200,27,149,4,196,88,15,98,244,219,159,163,99,84,125,244,162,145,6,69,72,
61,91,245,44,134,207,99,3,136,59,204,219,131,172,124,194,138,240,248,27,155,112,217,76,6,54,219,175,57,70,180,121,
2,29,108,216,8,174,196,205,221,13,53,198,31,211,126,98,93,26,81,138,95,66,230,243,204,3,249,175,189,66,70,191,
148,18,116,22,230,4,54,17,48,141,29,195,91,231,137,229,170,207,8,234,152,72,86,142,234,108,159,217,219,167,8,76,
194,47,54,181,46,182,181,145,29,37,168,90,185,58,47,244,41,101,237,35,66,172,46,3,104,179,105,214,150,239,167,231,
101,204,126,122,47,19,17,77,237,97,146,179,4,98,201,187,144,222,98,233,21,114,217,45,182,115,97,112,202,88,18,224,
192,244,129,84,22,210,92,165,15,183,169,237,46,183,112,189,174,171,191,71,10,43,199,111,137,151,159,32,198,106,16,67,
23,52,81,90,59,157,100,200,242,128,233,44,131,210,61,182,24,40,228,90,166,109,185,138,82,241,166,195,198,0,191,24,
27,165,138,160,23,173,223,217,140,68,50,229,74,12,32,229,44,124,56,204,168,174,148,6,150,7,64,124,223,100,131,140,
66,148,186,237,6,138,24,185,30,169,252,26,223,225,9,68,195,217,96,125,110,77,27,217,102,255,125,42,5,129,105,184,
116,78,163,2,181,74,188,141,206,155,169,235,210,200,203,93,253,219,161,237,113,197,5,70,0,60,178,115,242,111,61,81,
163,8,163,119,78,38,104,38,23,132,183,224,65,16,241,194,202,120,214,37,166,227,35,138,193,189,71,30,33,8,244,31,
204,0,125,128,123,221,253,221,116,65,12,161,196,100,67,37,207,197,106,16,3,158,55,36,117,60,48,239,177,21,107,73,
107,40,26,149,173,235,143,112,202,27,171,11,254,208,35,118,7,75,115,20,59,114,37,226,241,5,11,164,42,243,178,23,
224,27,15,231,58,241,166,64,114,241,107,5,56,189,1,223,167,127,249,16,245,220,147,143,226,183,229,161,216,79,31,160,
160,15,114,145,231,198,60,100,63,251,119,36,111,156,86,204,19,155,44,36,106,126,68,103,121,135,169,189,173,124,239,145,
93,241,164,41,135,153,77,233,140,73,225,143,148,10,209,103,68,221,110,213,210,200,197,73,249,227,182,15,91,23,49,109,
42,240,42,211,246,32,121,70,134,201,118,194,56,103,100,0,85,181,195,202,216,79,98,110,191,223,170,97,236,189,32,12,
114,237,102,108,65,201,31,254,137,250,193,17,130,117,8,224,94,123,16,3,76,233,45,87,144,141,127,20,84,126,4,48,
124,247,161,152,245,228,66,201,90,125,239,101,88,157,57,130,132,119,252,204,35,94,146,70,227,132,89,250,207,29,230,237,
174,149,150,95,21,1,174,239,129,135,40,117,95,62,234,182,43,31,181,249,226,1,138,254,56,23,5,188,159,131,220,215,
231,32,167,53,247,145,3,61,28,97,172,205,69,14,75,179,145,178,213,255,158,241,68,146,57,6,175,73,19,169,16,222,
195,184,249,211,34,201,69,14,236,38,231,74,159,210,217,111,71,60,210,152,74,116,93,19,234,154,15,175,157,167,155,250,
55,99,2,94,133,211,208,70,176,124,26,26,60,131,11,166,234,19,69,14,254,167,84,109,134,60,179,29,179,23,121,175,
184,130,162,63,201,67,173,183,62,66,157,119,62,68,201,123,243,201,93,175,255,1,90,81,14,149,87,24,70,190,19,150,
218,23,213,102,16,3,22,37,36,254,138,21,234,173,76,34,233,180,63,43,131,236,46,242,134,3,158,110,128,239,14,124,
152,149,108,76,113,214,126,145,119,224,176,110,54,129,79,95,103,251,131,249,143,117,185,215,94,0,184,60,212,110,107,30,
106,252,9,197,226,188,223,203,65,46,107,41,96,115,88,173,7,114,47,27,24,248,236,151,92,65,178,136,110,5,248,190,
147,121,66,145,193,139,48,178,83,156,75,238,157,11,105,36,232,193,0,198,183,106,97,227,66,71,123,197,247,4,213,185,
163,46,116,37,5,91,62,51,34,196,242,18,152,180,198,4,60,189,242,51,136,106,135,176,248,12,74,172,105,3,68,14,
1,103,76,187,188,83,106,59,227,39,106,50,215,61,192,147,157,83,54,225,206,88,9,60,240,110,231,143,119,189,240,143,
114,81,211,207,30,160,56,76,247,19,241,142,216,11,239,140,25,250,96,120,176,106,48,212,49,70,48,51,193,15,8,17,
221,122,23,196,192,215,107,216,125,152,22,116,192,128,58,207,50,81,217,185,65,195,133,185,96,242,101,213,129,222,126,198,
30,125,247,220,131,35,19,243,95,17,164,132,151,153,110,19,208,232,62,153,194,66,54,55,45,168,25,115,211,3,55,96,
111,105,251,243,81,210,238,124,212,113,123,30,106,241,249,3,20,181,57,23,53,220,148,131,188,244,1,174,34,147,171,238,
192,107,197,102,242,81,36,178,245,250,153,120,121,5,80,181,68,225,228,160,56,116,116,79,71,164,95,201,0,5,251,123,
63,107,87,28,25,106,117,25,111,16,163,94,115,114,174,171,68,44,88,145,152,224,118,23,130,22,198,240,225,85,100,121,
95,237,232,128,236,108,229,251,136,154,23,140,87,234,63,229,203,53,31,43,154,245,123,98,59,237,4,222,181,114,200,157,
235,85,19,236,160,183,251,1,221,119,89,119,159,84,156,6,58,48,252,244,1,106,143,119,205,174,59,243,80,242,158,124,
212,27,43,27,40,93,166,126,36,108,95,14,217,58,28,124,111,254,157,7,62,51,119,107,240,164,241,176,165,172,228,127,
213,90,16,3,234,123,183,254,141,108,27,198,64,131,133,6,76,19,182,37,74,205,110,104,77,84,87,186,56,27,51,34,
10,17,96,11,175,224,191,72,128,168,60,5,1,128,175,139,218,222,227,92,228,128,153,72,23,53,46,107,251,84,193,202,
232,119,128,242,189,165,96,230,6,27,49,248,223,72,112,195,230,105,224,166,92,228,179,33,7,185,97,93,117,90,91,94,
135,107,12,112,175,24,170,184,145,144,167,153,197,51,36,130,47,18,146,187,230,160,137,35,131,75,31,86,104,173,14,224,
114,246,68,247,103,89,233,190,15,204,76,37,112,254,107,115,162,6,45,140,88,97,70,4,145,234,226,164,60,129,77,238,
2,72,75,121,100,100,192,211,49,189,49,67,2,225,165,102,210,81,98,134,214,44,209,80,104,225,124,220,44,117,49,114,
88,113,171,74,176,171,18,8,43,152,2,46,235,114,144,199,134,7,200,119,83,30,10,124,255,62,10,95,125,17,53,154,
117,0,53,26,190,66,235,221,174,247,35,51,23,191,51,244,65,208,125,69,50,229,215,144,41,15,145,49,38,102,243,139,
32,134,212,232,65,12,88,124,80,39,42,51,179,62,200,194,38,164,130,142,30,208,126,170,174,69,45,141,225,207,131,126,
119,208,55,143,160,202,25,171,18,111,200,141,179,242,9,187,17,154,54,161,52,97,233,97,148,180,229,26,234,134,55,213,
248,157,143,80,171,47,30,162,24,108,150,134,124,152,139,252,55,230,32,79,188,1,187,174,187,255,194,255,102,4,112,171,
140,237,89,143,59,128,4,26,187,189,76,162,185,110,97,65,150,23,49,192,161,138,160,2,223,131,159,111,203,198,86,197,
205,155,216,93,147,72,4,43,241,239,71,24,185,66,1,192,174,131,198,84,178,45,185,155,199,253,111,247,37,60,1,230,
201,118,30,94,101,165,103,127,30,79,68,65,13,204,207,178,20,181,245,17,90,186,252,96,145,245,62,197,238,214,228,176,
51,241,240,89,120,242,225,171,253,82,108,102,78,58,130,52,105,75,145,60,54,189,72,228,22,113,145,175,178,218,138,119,
65,96,232,80,226,99,67,239,230,42,19,7,223,31,130,23,253,140,154,111,201,39,125,43,157,118,228,161,238,216,20,129,
93,27,152,34,152,206,176,147,87,116,60,235,131,35,140,172,23,65,140,161,198,14,98,192,103,196,188,181,16,225,235,204,
192,44,141,177,213,96,233,29,122,5,74,207,88,241,233,233,88,117,29,28,3,143,60,65,45,39,190,15,37,130,43,253,
187,12,172,238,251,1,234,228,207,227,241,7,203,45,29,182,169,253,99,179,77,91,13,124,98,209,111,45,178,126,251,24,
178,91,124,25,131,219,61,74,247,72,253,203,101,79,167,107,160,251,224,219,147,250,54,131,238,71,158,134,115,126,49,127,
246,162,153,209,168,50,211,17,76,190,107,127,166,60,95,185,160,241,227,38,209,54,87,229,50,33,236,240,29,233,124,41,
54,82,119,225,101,67,63,182,12,11,115,233,238,174,29,93,239,236,248,168,77,49,116,76,169,13,118,167,15,122,115,167,
68,34,161,144,63,117,88,22,211,32,33,97,33,80,89,237,50,207,88,69,3,30,27,19,158,75,42,27,76,186,213,168,
221,72,221,113,108,137,212,191,197,45,161,185,227,65,158,64,52,149,14,42,56,86,194,200,189,164,126,205,175,219,45,185,
74,250,16,225,243,192,4,129,221,218,115,125,14,105,150,128,233,28,138,119,114,48,85,32,101,160,213,150,7,40,142,6,
71,48,101,32,157,32,117,223,67,212,123,111,46,242,120,117,16,227,19,56,19,99,32,68,159,15,50,11,194,80,231,32,
164,194,57,8,241,44,232,89,160,93,80,108,78,250,174,219,140,79,56,3,19,16,58,249,66,116,52,172,207,228,215,55,
240,230,19,14,35,227,29,109,100,255,233,90,232,29,72,125,157,161,117,141,237,82,202,23,138,178,106,210,228,83,79,36,
116,117,73,103,158,72,58,15,91,43,135,37,222,77,178,21,77,251,22,105,146,231,107,173,70,108,71,182,51,126,198,155,
110,54,114,172,8,132,107,141,13,132,247,144,34,54,157,113,14,173,127,116,184,117,246,133,31,147,80,101,32,3,76,139,
6,191,146,143,215,181,40,78,73,244,184,231,238,162,250,94,36,226,207,39,202,183,148,169,78,230,52,44,74,115,130,234,
22,210,71,102,34,92,223,208,207,236,207,33,3,2,242,14,108,141,123,114,239,175,222,165,108,117,75,169,9,224,157,253,
161,59,10,15,182,188,68,80,135,154,48,202,127,197,32,52,69,213,97,116,169,227,170,187,236,236,134,88,153,236,230,158,
70,154,228,121,90,12,116,183,5,42,203,173,152,253,64,27,114,191,106,154,125,157,148,45,7,62,173,210,116,174,96,62,
59,209,224,8,62,69,72,39,240,222,144,139,188,222,253,11,41,125,98,46,17,47,111,185,101,166,112,240,254,169,213,170,
95,81,226,158,71,168,7,102,146,16,141,134,244,4,96,147,224,15,2,70,9,254,71,96,149,253,95,146,210,80,198,40,
33,96,130,89,25,148,215,17,236,180,65,11,117,138,106,159,15,117,160,53,73,3,122,233,189,129,137,63,249,67,56,120,
252,27,130,234,124,51,132,100,190,181,59,160,209,230,255,240,24,128,71,63,124,47,253,48,179,235,135,129,14,18,241,250,
97,198,150,142,255,207,142,97,245,138,126,101,144,27,185,209,241,5,99,248,114,205,7,34,59,159,31,176,46,222,84,52,
235,87,100,154,52,75,107,57,228,115,100,51,245,7,114,83,46,15,132,44,131,32,94,11,170,184,81,224,130,234,193,132,
115,241,48,120,77,159,57,41,28,61,172,226,216,68,29,248,229,98,179,247,247,99,221,158,173,91,26,91,212,63,205,39,
167,81,164,245,95,142,246,138,195,74,165,104,35,143,58,116,5,38,5,14,166,129,62,113,244,225,52,196,40,161,128,55,
23,155,174,159,186,187,170,190,107,221,204,33,123,228,160,134,249,159,99,243,249,226,79,61,160,197,187,182,182,193,78,255,
185,166,140,11,213,10,4,188,183,89,88,92,145,82,223,166,183,237,230,159,99,228,195,211,223,217,44,254,247,17,146,120,
68,93,227,9,197,51,9,242,132,171,234,231,42,185,124,134,173,67,145,100,129,121,223,53,148,18,50,84,56,235,201,223,
32,129,185,211,129,74,124,42,30,192,40,29,151,94,33,253,141,110,235,169,104,52,4,97,128,77,250,109,204,33,163,121,
193,31,228,162,48,204,42,35,55,231,146,57,90,144,198,0,193,153,230,159,83,12,179,237,23,152,101,110,127,136,98,23,
126,131,228,150,142,95,17,236,52,197,8,115,142,73,120,152,186,235,30,9,190,250,163,207,254,138,131,2,233,180,125,212,
0,208,134,232,57,164,94,128,59,32,101,127,1,138,30,181,14,9,165,178,217,230,30,65,196,127,80,192,143,1,5,251,
94,36,16,242,248,195,248,38,202,117,66,107,247,99,82,159,216,191,1,8,53,189,22,34,235,241,7,41,16,100,147,1,
174,203,197,86,206,56,45,133,45,204,12,77,23,63,111,205,169,19,135,58,163,234,70,72,129,29,21,82,32,165,189,113,
186,215,243,95,142,118,125,190,235,227,182,79,86,47,106,82,56,127,106,228,179,201,163,67,30,143,30,220,48,127,204,144,
192,135,83,199,133,62,89,52,35,234,233,134,229,77,11,15,110,139,123,246,231,241,196,231,119,46,164,129,249,170,165,242,
4,95,15,216,233,130,54,223,237,79,64,222,30,166,191,176,144,152,45,194,147,255,158,121,255,245,204,1,134,30,102,216,
68,22,104,236,161,76,48,204,64,119,130,181,200,222,239,23,48,71,24,131,240,186,60,100,145,181,9,241,196,38,75,228,
81,73,47,187,86,27,108,122,60,38,119,250,202,152,100,69,86,185,250,229,142,112,167,245,121,8,220,3,24,232,103,137,
108,60,217,88,168,1,202,224,184,187,222,107,110,34,95,12,190,229,198,134,242,195,135,30,222,244,0,208,134,225,169,27,
27,243,144,77,230,26,36,16,155,76,149,90,56,16,156,148,49,66,5,205,202,219,99,70,56,65,160,177,219,35,245,109,
118,83,147,52,171,212,126,209,95,236,0,31,214,97,101,219,33,112,80,123,87,102,137,112,38,36,5,78,79,79,241,42,
186,123,145,202,219,171,41,83,2,16,4,0,43,188,217,151,28,248,223,90,0,53,26,216,180,228,255,223,160,126,167,54,
125,117,85,221,247,63,23,210,80,175,238,158,224,35,72,97,33,25,57,88,234,223,242,182,253,226,203,204,39,24,239,104,
86,99,246,35,161,149,219,73,122,71,173,185,22,10,201,152,83,42,54,109,159,56,174,190,203,74,244,76,221,121,18,236,
178,253,254,149,6,65,229,208,13,195,166,14,59,128,143,223,159,170,221,48,72,174,77,98,105,81,122,224,5,152,13,126,
40,93,110,164,161,131,4,255,65,155,1,252,151,121,159,70,255,5,64,19,16,134,117,67,6,139,196,143,39,16,205,151,
55,74,41,96,101,93,172,186,131,228,81,61,94,149,127,88,35,145,155,170,37,155,49,83,171,51,160,84,27,190,188,229,
243,98,144,74,41,222,72,48,44,104,230,75,149,144,246,63,65,211,99,14,43,139,30,82,92,64,81,192,153,76,24,238,
151,177,22,90,186,124,11,102,6,43,64,180,234,31,36,143,238,249,144,160,218,90,253,11,99,249,50,245,122,240,237,176,
242,252,203,111,34,147,224,120,72,18,103,171,209,173,181,216,37,228,79,187,249,103,89,216,144,30,32,235,9,95,33,129,
153,195,94,106,97,51,50,179,248,196,235,105,175,14,215,149,210,190,120,43,130,106,56,18,74,167,167,193,41,123,3,9,
190,112,50,214,235,101,120,94,63,197,204,109,60,131,251,20,227,13,98,5,25,216,99,162,27,16,189,93,120,1,92,61,
127,17,44,150,203,250,250,251,104,78,31,219,91,62,97,249,77,28,240,124,95,239,140,71,62,94,166,191,51,10,127,235,
109,26,66,115,167,67,54,147,142,178,226,59,179,157,254,35,100,159,159,96,144,28,46,130,198,140,234,142,227,75,42,154,
155,134,43,220,197,87,41,156,74,104,237,241,173,237,180,147,204,205,104,124,45,187,57,167,144,216,41,240,20,193,176,171,
138,190,65,35,180,112,62,100,243,246,49,146,69,51,126,23,216,92,147,120,55,249,155,97,224,75,136,129,37,131,47,215,
124,142,129,101,53,102,230,211,233,160,72,79,60,90,211,41,98,222,116,234,145,154,222,152,5,213,250,92,42,88,232,74,
7,12,155,146,155,39,248,214,121,252,9,60,137,124,17,95,97,254,1,152,159,34,91,239,239,197,110,97,231,164,126,205,
175,201,66,59,221,87,196,246,41,82,181,31,94,98,154,56,93,107,214,231,93,210,159,108,158,185,30,225,185,253,145,96,
86,168,144,4,1,8,70,186,129,215,149,213,152,125,72,160,182,222,198,90,234,156,80,64,154,40,157,219,181,116,204,185,
248,83,143,55,150,241,193,115,157,59,153,132,90,53,179,7,38,17,207,99,167,105,158,183,212,191,197,13,200,157,99,131,
73,192,228,242,21,102,31,27,184,187,138,225,4,54,89,68,183,71,246,139,46,178,227,75,193,64,97,51,249,27,132,129,
253,96,229,65,140,102,215,41,199,53,11,207,63,118,63,86,110,171,173,108,38,197,227,197,190,28,22,49,152,167,108,108,
2,166,221,166,106,49,3,122,199,64,95,171,20,230,200,36,184,67,158,229,176,173,200,114,240,167,200,60,99,53,2,75,
1,34,255,80,193,35,11,239,250,64,26,208,234,134,196,61,242,130,200,222,247,164,192,204,126,31,95,105,254,17,79,170,
88,130,175,59,17,146,232,233,236,137,166,52,184,1,200,193,137,112,254,124,165,197,9,8,42,152,132,116,188,39,111,156,
86,168,108,59,228,185,105,215,41,90,179,180,165,8,114,71,173,70,236,36,231,19,124,189,192,126,161,168,223,97,229,109,
42,242,170,203,5,93,159,71,14,176,58,100,33,9,57,16,164,51,240,189,195,151,225,166,221,103,50,100,122,185,72,157,
48,161,20,127,214,32,252,252,236,218,239,2,62,111,116,70,47,239,226,155,103,123,161,71,215,50,222,56,192,131,147,206,
210,122,120,22,97,176,27,78,176,87,95,28,167,104,222,191,136,189,204,243,131,72,160,178,50,164,200,222,18,51,134,57,
242,168,164,2,187,185,127,178,20,65,46,31,196,80,52,78,171,44,136,81,196,10,171,196,215,50,75,95,129,120,2,209,
52,129,41,59,231,50,225,207,34,253,214,234,248,177,37,172,188,19,72,35,154,119,26,97,134,4,7,106,119,224,155,212,
40,31,206,150,12,6,197,164,60,134,84,36,18,92,200,20,143,60,106,144,247,119,143,116,39,56,44,187,134,236,22,156,
71,182,51,127,69,192,82,173,70,237,66,22,3,63,64,102,189,151,145,160,171,106,59,180,4,64,13,131,231,61,12,116,
112,122,31,128,97,67,12,150,247,72,48,35,129,236,110,121,32,91,167,187,94,174,94,100,53,231,149,250,168,233,181,8,
130,74,115,12,4,120,91,161,165,235,113,235,137,135,13,103,217,228,251,62,131,36,238,17,151,89,178,204,254,37,50,19,
169,96,209,136,65,13,159,223,33,3,27,111,6,240,193,115,192,33,222,67,179,2,158,73,36,130,185,180,79,131,133,21,
69,226,102,22,86,66,214,156,248,144,242,34,241,140,190,74,231,226,85,203,124,131,197,39,208,216,127,173,238,56,174,196,
126,241,37,246,0,175,170,32,6,191,206,7,49,202,114,82,165,254,45,111,217,47,185,202,90,36,17,124,123,98,183,240,
108,58,53,75,94,69,116,19,76,245,20,161,133,203,247,208,120,130,178,10,114,171,87,133,67,38,167,231,190,0,71,29,
80,146,63,203,65,22,111,125,2,81,254,31,104,182,231,40,241,138,185,194,74,224,160,76,31,207,34,169,111,83,104,239,
213,2,155,228,53,121,231,14,124,169,242,67,211,110,211,74,25,5,211,240,179,107,82,22,32,158,72,50,143,48,226,33,
66,166,74,133,104,237,184,97,65,37,0,124,245,157,241,193,253,255,115,33,21,141,30,220,176,68,46,19,173,36,24,54,
36,44,207,34,132,16,196,24,7,166,3,43,166,19,173,104,102,125,86,96,19,215,124,39,13,124,130,74,18,189,193,191,
150,36,80,89,110,151,133,119,123,104,53,114,215,139,157,157,205,164,208,250,29,196,40,139,38,98,246,188,205,106,228,78,
214,82,138,0,140,108,166,28,135,160,83,161,64,109,189,155,54,57,33,178,232,67,251,227,32,213,168,43,79,36,157,47,
178,243,249,89,217,98,192,19,50,176,180,230,30,75,110,135,7,100,41,162,216,37,248,178,94,68,83,41,180,241,100,199,
191,170,247,156,86,163,247,32,177,99,131,11,180,207,81,85,5,192,67,112,36,25,51,188,19,154,30,179,181,48,167,6,
63,47,248,184,103,254,130,159,49,228,47,250,189,26,85,204,0,248,70,12,106,240,252,230,153,94,245,214,199,71,153,180,
189,72,134,39,151,139,86,17,44,119,142,33,77,39,30,127,130,89,239,119,217,3,61,72,171,88,249,15,152,121,90,137,
123,228,85,190,220,116,19,190,6,68,208,32,11,127,40,228,175,225,5,188,5,179,140,139,144,146,98,57,124,59,114,120,
247,58,123,139,249,101,142,123,207,104,88,88,78,245,48,136,161,111,226,38,43,48,240,176,146,194,163,223,232,18,47,106,
171,81,123,144,186,211,196,82,121,100,82,190,73,131,54,183,240,184,41,11,235,156,171,108,51,248,25,36,135,67,112,138,
188,46,91,115,132,63,7,62,83,234,19,11,93,104,58,241,21,102,47,54,33,169,114,53,164,213,176,167,143,212,220,64,
123,39,121,76,106,161,208,194,249,40,157,44,15,190,142,14,4,117,146,25,228,206,13,230,75,21,171,68,246,126,191,42,
154,247,47,182,30,127,232,5,91,53,120,29,220,70,88,199,33,55,111,40,102,234,181,18,218,86,155,72,133,139,210,147,
189,138,47,252,148,84,239,162,186,112,191,231,79,38,161,222,61,60,139,164,82,193,124,54,25,94,5,243,118,144,105,247,
25,236,131,14,109,90,88,14,251,2,153,165,45,65,166,73,51,145,166,231,92,4,139,200,106,204,94,210,12,38,89,3,
121,93,35,213,61,146,108,230,123,200,25,60,82,137,9,87,231,131,24,122,98,241,194,191,196,242,92,233,234,79,87,221,
33,55,32,135,119,175,33,71,188,113,189,104,18,193,174,187,1,130,16,38,13,90,67,128,161,119,57,147,143,114,55,164,
168,218,14,125,110,12,93,0,16,2,255,162,89,198,74,8,44,104,149,173,6,61,87,182,204,122,170,106,55,172,4,130,
21,0,182,192,204,40,128,207,101,124,61,72,117,193,128,190,133,142,96,215,154,200,4,2,222,232,182,45,28,114,224,60,
88,96,78,181,209,249,132,105,226,49,220,39,180,196,135,40,45,190,127,86,14,23,169,156,205,67,32,35,179,216,88,221,
37,202,59,161,43,248,116,170,250,91,22,22,24,48,73,190,92,179,169,18,127,138,17,130,24,66,214,130,24,229,102,74,
68,186,113,83,21,177,125,138,201,118,95,181,221,41,132,45,192,155,118,66,7,120,125,43,9,198,57,97,115,240,156,221,
156,63,216,5,219,114,13,48,242,202,127,182,78,79,217,2,120,216,0,71,237,70,34,91,111,72,43,123,45,221,220,193,
167,212,217,207,91,115,122,245,162,198,8,42,55,10,234,168,185,11,247,5,126,200,21,243,99,144,175,151,41,152,73,241,
4,75,199,200,189,66,92,193,252,131,228,73,227,119,154,168,1,75,156,123,26,155,94,55,152,125,14,148,132,245,95,143,
8,129,112,22,207,164,2,81,166,82,7,234,67,16,67,95,148,152,57,124,97,158,185,193,56,238,0,163,2,30,21,60,
145,120,55,190,69,7,79,4,175,168,200,153,65,206,139,49,64,175,54,122,231,65,144,200,53,244,42,153,48,253,26,207,
98,5,241,209,168,37,155,251,36,123,21,157,56,216,185,140,81,213,21,223,29,220,207,241,47,59,161,180,36,207,199,106,
149,248,3,194,192,18,46,67,210,28,249,50,245,70,72,39,120,237,11,9,64,23,155,22,230,153,239,33,89,72,71,50,
181,130,17,16,67,202,66,202,2,168,183,26,249,146,252,168,250,18,196,168,40,193,98,231,192,139,84,178,114,61,0,62,
114,78,161,249,196,135,72,68,5,19,226,171,17,197,116,23,57,248,159,182,121,251,219,122,4,238,84,164,26,82,115,104,
192,235,64,212,17,145,99,224,237,3,44,106,198,196,240,210,243,63,38,145,236,234,117,129,31,89,247,75,39,28,79,29,
31,90,234,227,73,86,89,192,46,40,171,189,87,66,234,95,115,147,160,184,28,86,124,91,12,0,10,82,21,212,157,38,
150,240,229,102,39,197,78,129,247,236,22,156,99,14,122,61,231,80,141,67,255,13,122,245,34,136,241,175,26,44,138,177,
38,74,3,90,221,183,157,245,107,221,6,5,221,156,118,158,84,42,208,216,65,215,153,106,157,223,66,155,242,201,178,176,
206,143,160,154,166,206,51,62,240,23,174,184,141,204,250,44,71,34,27,207,223,240,189,55,35,234,160,56,75,196,130,233,
81,97,86,87,23,206,136,210,66,7,102,200,133,211,157,176,102,108,159,157,238,58,208,11,111,254,180,72,109,100,168,213,
85,177,152,63,181,146,8,99,109,136,8,146,78,201,124,61,8,46,212,166,191,136,86,104,235,177,95,2,83,202,195,247,
1,249,76,129,18,247,200,179,246,11,206,51,4,189,60,82,17,49,167,155,68,71,64,203,7,49,124,217,14,98,88,27,
43,136,241,50,151,77,166,73,195,182,185,228,249,37,117,13,248,96,78,49,187,179,26,189,23,65,229,6,164,189,208,37,
105,53,44,71,20,189,173,136,77,127,66,118,58,169,139,224,190,150,74,146,134,141,19,42,81,248,114,205,167,4,243,190,
150,70,21,112,162,250,74,36,130,89,33,129,22,23,39,140,8,42,129,224,1,116,47,41,184,193,46,0,234,128,14,6,
36,25,127,141,175,51,126,120,80,9,92,23,95,127,38,237,236,124,221,39,184,217,9,76,109,15,146,253,235,214,228,24,
159,241,209,29,149,193,119,167,238,60,185,84,104,229,6,245,186,29,233,242,53,51,108,194,253,1,236,137,41,232,129,249,
138,217,209,186,250,86,137,81,77,224,75,149,120,68,94,179,28,186,133,46,195,202,125,237,204,14,116,7,128,88,213,110,
248,115,161,185,211,49,218,204,51,116,35,144,241,132,226,169,178,136,196,2,50,109,198,24,205,61,13,214,93,170,178,5,
26,145,138,29,27,156,195,27,107,22,65,29,27,81,47,4,236,59,87,30,143,247,150,131,157,252,80,66,123,231,92,96,
95,0,128,127,159,74,70,121,217,20,96,21,210,173,165,32,89,88,119,244,228,67,61,80,211,13,248,185,174,103,31,252,
29,252,125,246,31,201,232,240,206,14,104,238,148,8,109,199,118,206,57,248,58,7,240,245,6,210,89,232,252,58,244,46,
124,5,102,14,71,33,181,132,76,91,96,59,157,68,47,5,130,236,168,156,178,16,225,69,251,55,86,236,41,248,218,246,
229,146,113,53,118,187,193,33,204,180,230,145,78,89,129,190,126,138,127,7,49,102,179,84,207,154,75,46,114,35,7,49,
42,211,221,24,129,198,254,48,4,81,72,83,189,44,5,37,167,118,252,88,116,181,133,195,138,155,8,210,105,84,113,35,
159,139,236,253,254,192,32,48,132,78,244,101,156,152,77,240,120,253,196,46,33,151,33,137,158,12,184,233,42,60,214,214,
178,69,2,186,178,250,46,178,157,126,18,153,118,159,161,149,184,71,92,229,137,36,179,8,170,211,11,143,168,167,2,11,
35,82,32,224,141,179,183,149,239,141,109,100,155,157,217,219,167,104,225,244,40,180,117,83,107,116,252,203,4,210,255,118,
21,131,24,212,247,66,165,4,68,91,129,189,193,247,87,127,79,70,231,78,36,145,205,61,191,216,212,10,76,87,212,47,
205,167,168,113,148,77,182,173,141,108,183,128,207,27,131,63,63,156,96,167,163,174,209,76,127,232,38,11,7,20,195,153,
2,101,224,87,99,37,203,209,75,5,200,163,18,133,23,95,38,27,18,192,57,25,18,183,240,75,112,142,1,190,94,64,
69,224,23,154,57,0,48,77,134,46,182,208,148,83,87,178,84,243,145,75,158,135,32,245,107,113,163,130,217,193,195,236,
239,61,178,136,31,234,68,151,223,52,124,224,197,14,38,178,73,80,135,251,4,187,103,14,215,40,135,15,191,175,97,0,
54,0,126,80,129,80,86,202,165,171,87,101,116,32,78,142,94,73,25,61,159,107,168,3,158,160,248,31,78,205,147,133,
117,201,195,204,238,107,12,80,192,120,28,140,0,238,254,60,137,124,153,196,43,230,186,105,215,41,165,176,33,146,174,9,
154,105,151,63,235,34,135,217,198,172,175,183,235,114,201,198,5,144,191,103,49,96,35,82,52,205,40,22,217,249,252,202,
19,8,39,209,85,22,124,226,13,18,240,166,66,127,253,246,60,30,49,82,173,18,175,115,114,80,124,217,192,207,236,151,
152,40,155,203,109,91,56,220,196,172,240,118,151,120,151,219,9,237,156,111,195,247,49,145,54,151,225,231,248,247,246,171,
148,226,181,248,239,70,16,212,65,52,174,4,91,245,178,181,247,236,9,2,149,213,78,188,152,115,128,249,193,17,118,144,
80,12,139,92,23,169,42,3,67,253,65,251,115,32,201,21,146,147,173,39,126,141,204,251,175,35,187,198,74,125,155,94,
23,168,173,119,210,11,195,189,10,133,105,36,118,9,190,171,108,51,248,169,178,205,144,39,134,143,193,79,69,118,190,208,
108,181,155,254,230,134,1,119,183,212,39,54,79,22,218,41,7,58,113,48,25,38,129,237,30,8,84,150,223,145,224,243,
122,5,216,114,6,126,199,59,224,93,67,146,175,121,191,53,8,170,11,192,85,64,214,204,66,210,241,171,230,175,226,97,
57,152,217,192,198,7,12,11,152,36,148,194,1,227,82,182,250,223,83,168,7,198,64,247,21,125,192,83,99,163,36,208,
87,200,52,32,160,180,145,47,24,129,217,237,126,240,201,194,125,64,43,41,184,47,56,140,30,238,147,220,168,87,223,173,
217,115,66,4,126,229,109,18,72,161,225,5,176,86,232,234,2,221,81,48,160,63,128,46,222,208,237,6,214,5,205,96,
121,196,127,64,120,52,24,152,211,59,153,43,189,112,61,232,175,174,244,255,155,215,51,128,123,149,64,82,116,36,52,98,
20,152,218,238,20,187,134,158,3,144,128,174,44,170,248,49,165,16,248,48,237,49,155,172,180,128,170,14,117,167,137,8,
22,154,162,113,90,129,73,96,251,59,216,36,57,131,205,229,125,180,35,59,137,102,91,210,26,92,187,37,173,100,29,25,
142,4,162,252,33,61,66,122,151,14,102,113,120,214,66,78,101,77,54,45,120,215,73,208,97,68,160,177,219,37,114,108,
240,27,6,169,155,178,200,196,7,138,230,153,69,170,246,35,74,212,157,39,33,211,196,233,72,163,155,195,164,89,248,251,
105,16,109,69,240,115,101,139,172,98,121,116,207,124,12,234,119,36,30,145,23,133,214,238,223,240,149,230,155,129,133,19,
84,159,59,223,215,104,181,152,208,239,188,11,180,201,226,43,45,54,139,108,60,191,131,251,4,221,147,55,74,126,168,36,
159,115,248,115,208,75,82,87,187,207,36,91,96,149,61,43,254,63,56,183,2,235,236,51,56,169,76,22,222,53,23,42,
116,68,142,1,191,10,204,236,119,243,196,38,139,9,42,137,58,146,94,215,255,9,160,227,68,223,183,66,16,182,244,2,
7,246,154,76,80,69,234,131,9,234,64,37,168,173,237,67,80,117,140,16,178,247,199,195,250,13,218,0,234,179,136,105,
22,234,65,47,96,168,55,237,142,71,58,1,157,134,95,204,225,91,120,100,209,255,15,63,143,3,159,33,13,110,118,180,
163,190,174,154,115,124,154,105,218,209,247,219,152,126,206,68,90,47,51,105,29,213,157,0,55,136,254,191,94,180,206,194,
209,140,161,180,117,103,65,212,224,16,43,78,56,225,132,19,78,56,225,132,19,78,56,225,132,19,78,56,225,164,76,254,
15,59,211,107,111,127,84,85,213,0,0,0,37,116,69,88,116,100,97,116,101,58,99,114,101,97,116,101,0,50,48,50,
48,45,48,51,45,50,54,84,48,53,58,52,55,58,49,51,43,48,57,58,48,48,231,7,151,25,0,0,0,37,116,69,
88,116,100,97,116,101,58,109,111,100,105,102,121,0,50,48,50,48,45,48,51,45,50,54,84,48,53,58,52,55,58,49,
51,43,48,57,58,48,48,150,90,47,165,0,0,0,0,73,69,78,68,174,66,96,130,
};
}
namespace Sprite {
namespace SuperFamicom {
const unsigned char CrosshairBlue[332] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,238,73,68,65,84,88,133,213,87,91,18,195,32,8,196,78,15,232,81,189,161,253,9,
25,52,98,121,57,76,246,43,137,44,11,24,69,11,232,209,55,99,69,235,76,74,184,69,107,229,245,91,27,220,137,124,
75,140,58,21,165,34,181,246,199,251,100,167,174,200,32,124,137,119,124,134,177,252,116,108,224,44,120,44,190,156,56,102,
163,204,228,182,107,173,80,31,93,225,67,30,189,112,124,85,41,145,120,36,88,191,159,96,33,23,78,101,47,242,127,90,
156,213,73,159,2,111,0,33,21,179,150,63,132,151,62,5,243,78,136,217,236,118,173,85,198,86,30,20,152,154,13,192,
118,251,125,216,90,121,212,118,215,112,86,224,26,142,133,247,152,2,73,195,64,155,190,248,166,229,229,255,132,8,243,146,
242,234,120,43,224,58,241,68,4,16,138,212,110,120,58,136,119,28,72,16,169,103,194,33,136,63,68,209,184,103,74,83,
239,5,0,215,26,167,231,123,124,103,130,53,221,140,94,113,55,100,131,9,242,151,139,31,79,50,234,237,105,206,30,22,
0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char CrosshairGreen[329] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,235,73,68,65,84,88,133,213,87,65,18,195,32,8,196,78,31,230,211,253,153,61,180,
52,18,145,1,193,97,178,39,141,44,139,24,69,11,216,209,133,177,98,117,166,37,92,162,77,176,170,118,223,26,163,78,
68,71,145,198,244,169,157,57,35,84,248,43,222,255,109,154,254,113,140,114,102,222,18,239,165,120,251,181,42,0,232,103,
114,217,85,226,163,27,124,232,163,87,142,115,153,82,137,71,98,233,247,21,44,228,194,169,217,171,252,159,22,95,234,164,
47,129,55,128,144,140,237,166,63,132,151,190,4,247,147,16,103,35,157,90,220,140,119,121,80,224,94,108,0,164,227,119,
182,221,229,13,182,82,193,225,176,42,56,59,188,105,9,52,5,3,109,58,243,205,202,203,255,9,17,251,91,202,169,227,
205,128,235,198,19,17,64,40,82,171,225,233,32,158,113,33,65,164,222,9,105,16,50,81,55,238,88,210,212,119,1,0,
238,241,241,126,143,125,62,216,173,151,209,35,222,134,235,96,98,252,229,226,3,112,72,179,236,202,138,114,18,0,0,0,
0,73,69,78,68,174,66,96,130,
};
const unsigned char CrosshairRed[342] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,248,73,68,65,84,88,133,205,87,65,14,196,32,8,132,102,255,255,101,246,176,177,139,
148,81,80,27,229,212,70,102,6,212,0,50,229,77,26,107,156,37,139,2,228,241,209,39,11,113,71,156,68,139,106,128,
56,255,198,175,203,223,114,16,79,68,253,138,90,99,141,113,112,80,231,131,196,11,83,52,19,43,196,53,135,147,7,38,
150,104,244,212,32,86,235,228,236,20,6,200,207,191,117,215,70,12,242,94,139,133,166,236,173,236,67,252,111,139,67,157,
237,71,48,27,192,244,142,93,228,23,148,144,184,228,131,96,254,3,164,4,176,213,108,37,52,5,208,53,47,227,81,28,
49,153,102,163,88,96,149,68,150,193,21,223,59,128,68,43,69,13,103,4,199,246,8,34,151,240,209,249,38,112,251,47,
97,177,209,74,152,246,95,93,9,211,51,160,181,99,142,128,104,115,55,124,59,136,115,7,146,237,51,33,2,71,166,226,
94,23,13,77,214,104,44,103,174,163,143,86,189,244,187,224,232,151,81,21,132,39,210,33,91,246,54,132,193,44,226,219,
107,95,57,136,120,253,172,254,16,23,0,0,0,0,73,69,78,68,174,66,96,130,
};
}
namespace WonderSwan {
const unsigned char Auxiliary0[117] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,39,73,68,65,84,40,145,
99,96,24,5,12,12,12,12,12,140,216,4,255,255,255,255,31,174,128,145,17,67,13,19,57,54,145,165,105,20,64,1,
0,79,229,4,6,25,160,104,81,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char Auxiliary1[134] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,56,73,68,65,84,40,145,
99,96,24,212,128,17,155,224,255,255,255,255,195,21,48,50,98,168,193,16,64,214,128,75,35,10,7,155,6,108,26,153,
112,41,194,7,200,210,68,185,159,176,105,196,22,122,131,28,0,0,93,187,20,10,151,47,54,180,0,0,0,0,73,69,
78,68,174,66,96,130,
};
const unsigned char Auxiliary2[136] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,58,73,68,65,84,40,145,
99,96,160,23,96,196,38,248,255,255,255,255,112,5,140,140,24,106,24,113,41,198,80,136,164,153,137,34,231,225,179,5,
221,54,178,108,162,204,121,12,12,244,10,8,92,54,98,139,39,250,1,0,103,1,20,14,22,78,11,159,0,0,0,0,
73,69,78,68,174,66,96,130,
};
const unsigned char Headphones[167] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,89,73,68,65,84,40,145,
157,145,65,14,0,33,8,3,29,255,255,231,122,210,176,217,130,196,222,44,3,82,29,227,65,56,83,146,14,0,150,249,
192,177,33,243,90,69,91,139,102,213,120,86,206,64,151,69,146,0,166,3,110,225,231,239,234,208,144,62,64,6,40,200,
102,170,6,0,236,243,222,194,134,117,131,90,159,28,87,44,225,174,22,199,17,111,189,73,184,252,1,0,0,0,0,73,
69,78,68,174,66,96,130,
};
const unsigned char Initialized[136] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,58,73,68,65,84,40,145,
99,96,160,23,96,132,49,254,255,255,255,159,160,98,70,70,70,184,38,98,52,32,107,100,193,102,18,54,128,108,48,19,
177,54,32,3,178,52,161,56,143,88,191,209,207,121,100,197,19,253,0,0,19,184,20,16,97,125,73,73,0,0,0,0,
73,69,78,68,174,66,96,130,
};
const unsigned char LowBattery[144] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,66,73,68,65,84,40,145,
99,96,32,3,48,98,19,252,255,255,255,127,184,2,70,70,12,53,76,184,52,192,20,35,27,128,19,160,43,194,166,9,
195,38,98,192,80,212,68,40,196,112,218,132,79,35,11,54,65,108,17,74,80,19,81,17,74,42,0,0,182,121,32,4,
246,65,53,182,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char Orientation0[148] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,70,73,68,65,84,40,145,
99,96,32,3,48,98,19,252,255,255,255,127,184,2,70,70,12,53,24,2,200,26,112,105,100,34,199,121,100,105,162,220,
79,216,252,131,77,51,156,129,79,3,186,70,242,3,2,102,11,54,247,35,139,195,212,81,39,244,136,137,92,178,0,0,
81,131,32,17,104,219,146,91,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char Orientation1[150] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,72,73,68,65,84,40,145,
173,145,49,14,0,32,8,196,172,241,255,95,214,197,1,1,3,81,186,114,69,192,214,126,152,155,76,22,41,29,5,192,
198,149,228,201,55,113,120,175,68,77,136,36,51,26,208,179,97,73,189,164,15,113,236,36,201,92,239,233,159,70,52,82,
25,11,152,51,36,20,92,248,53,240,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char PoweredOn[155] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,77,73,68,65,84,40,145,
165,146,73,14,0,32,8,3,173,255,255,115,189,40,33,202,98,96,142,77,109,65,29,163,0,44,145,36,197,0,60,158,
233,29,56,102,29,96,194,77,166,61,77,63,200,188,119,26,0,88,90,216,20,237,210,27,47,75,215,87,223,111,242,218,
238,7,46,253,136,18,11,199,234,51,248,48,4,102,223,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char Sleeping[154] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,76,73,68,65,84,40,145,
189,145,193,10,0,32,8,67,155,244,255,191,188,46,17,166,44,242,80,59,137,250,112,195,214,94,136,36,75,139,30,72,
48,167,98,173,0,40,11,0,160,156,172,65,5,220,154,42,116,132,187,178,112,117,41,133,61,100,50,53,56,253,199,252,
2,166,180,225,223,26,147,225,59,237,75,250,15,99,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeA0[129] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,51,73,68,65,84,40,145,
99,96,24,80,240,255,255,255,255,248,228,153,72,213,128,161,137,24,13,40,154,136,213,128,97,19,125,52,49,50,50,50,
146,101,19,41,26,49,0,41,129,66,91,0,0,145,89,20,3,20,239,9,131,0,0,0,0,73,69,78,68,174,66,96,
130,
};
const unsigned char VolumeA1[142] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,64,73,68,65,84,40,145,
197,142,49,14,0,32,8,196,60,254,255,231,186,56,9,18,209,24,59,222,81,160,181,175,0,100,189,85,5,39,205,194,
106,129,101,3,146,20,229,238,189,29,238,36,73,154,75,128,40,119,48,40,159,63,146,158,208,1,54,254,39,241,163,168,
22,227,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeA2[146] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,68,73,68,65,84,40,145,
197,144,193,10,0,32,8,67,157,255,255,207,235,20,132,77,49,34,218,201,185,61,4,205,190,138,36,213,92,2,177,24,
189,87,225,244,0,176,102,158,1,170,44,47,117,117,7,1,64,12,73,82,237,55,117,190,151,130,71,192,51,13,184,33,
63,219,60,97,21,237,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeB0[125] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,47,73,68,65,84,40,145,
99,96,24,5,67,1,48,194,24,255,255,255,255,79,80,49,35,35,35,138,38,66,26,97,26,48,52,225,210,136,172,1,
171,38,116,141,232,26,200,6,0,148,173,16,5,30,219,32,189,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeB1[137] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,59,73,68,65,84,40,145,
99,96,24,212,128,17,155,224,255,255,255,255,195,21,48,50,98,85,131,83,3,54,254,16,0,112,79,18,227,118,88,160,
160,132,12,62,141,200,161,136,17,156,216,52,162,7,59,117,226,137,24,0,0,139,197,27,254,82,191,68,170,0,0,0,
0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeB2[148] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,70,73,68,65,84,40,145,
99,96,32,3,48,162,11,252,255,255,255,63,134,34,70,70,12,117,120,53,224,19,199,45,65,164,60,249,128,100,147,97,
26,168,234,36,120,80,18,99,42,44,232,81,194,31,159,70,228,184,34,43,114,177,198,52,178,70,188,169,129,20,0,0,
40,67,47,234,31,247,182,170,0,0,0,0,73,69,78,68,174,66,96,130,
};
const unsigned char VolumeB3[153] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,13,0,0,0,13,8,6,0,0,0,114,235,228,
124,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,75,73,68,65,84,40,145,
157,146,73,14,0,48,8,2,245,255,143,166,167,54,90,13,46,28,149,105,26,80,100,33,253,7,0,16,76,170,193,71,
1,54,119,11,24,149,96,182,164,230,246,151,42,96,12,50,189,40,59,175,222,232,93,254,12,180,93,173,202,77,155,182,
32,189,134,137,14,178,192,67,214,248,1,222,76,0,0,0,0,73,69,78,68,174,66,96,130,
};
}
}
}
@@ -1,4 +1,8 @@
namespace Resource {
namespace Ares {
extern const unsigned char Icon[6562];
extern const unsigned char Logo[13719];
}
namespace Sprite {
namespace SuperFamicom {
extern const unsigned char CrosshairBlue[332];
File renamed without changes.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 332 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 117 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 134 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 150 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 155 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 154 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 129 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 125 B

After

Width:  |  Height:  |  Size: 125 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 153 B

After

Width:  |  Height:  |  Size: 153 B

@@ -1,12 +1,12 @@
auto Scheduler::reset() -> void {
inline auto Scheduler::reset() -> void {
_threads.reset();
}
auto Scheduler::threads() const -> uint {
inline auto Scheduler::threads() const -> uint {
return _threads.size();
}
auto Scheduler::thread(uint uniqueID) const -> maybe<Thread&> {
inline auto Scheduler::thread(uint uniqueID) const -> maybe<Thread&> {
for(auto& thread : _threads) {
if(thread->_uniqueID == uniqueID) return *thread;
}
@@ -16,14 +16,14 @@ auto Scheduler::thread(uint uniqueID) const -> maybe<Thread&> {
//if threads A and B both have a clock value of 0, it is ambiguous which should run first.
//to resolve this, a uniqueID is assigned to each thread when appended to the scheduler.
//the first unused ID is selected, to avoid the uniqueID growing in an unbounded fashion.
auto Scheduler::uniqueID() const -> uint {
inline auto Scheduler::uniqueID() const -> uint {
uint uniqueID = 0;
while(thread(uniqueID)) uniqueID++;
return uniqueID;
}
//find the clock time of the furthest behind thread.
auto Scheduler::minimum() const -> uintmax {
inline auto Scheduler::minimum() const -> uintmax {
uintmax minimum = (uintmax)-1;
for(auto& thread : _threads) {
minimum = min(minimum, thread->_clock - thread->_uniqueID);
@@ -32,7 +32,7 @@ auto Scheduler::minimum() const -> uintmax {
}
//find the clock time of the furthest ahead thread.
auto Scheduler::maximum() const -> uintmax {
inline auto Scheduler::maximum() const -> uintmax {
uintmax maximum = 0;
for(auto& thread : _threads) {
maximum = max(maximum, thread->_clock - thread->_uniqueID);
@@ -40,7 +40,7 @@ auto Scheduler::maximum() const -> uintmax {
return maximum;
}
auto Scheduler::append(Thread& thread) -> bool {
inline auto Scheduler::append(Thread& thread) -> bool {
if(_threads.find(&thread)) return false;
thread._uniqueID = uniqueID();
thread._clock = maximum() + thread._uniqueID;
@@ -48,19 +48,19 @@ auto Scheduler::append(Thread& thread) -> bool {
return true;
}
auto Scheduler::remove(Thread& thread) -> void {
inline auto Scheduler::remove(Thread& thread) -> void {
_threads.removeByValue(&thread);
}
//power cycle and soft reset events: assigns the primary thread and resets all thread clocks.
auto Scheduler::power(Thread& thread) -> void {
inline auto Scheduler::power(Thread& thread) -> void {
_primary = _resume = thread.handle();
for(auto& thread : _threads) {
thread->_clock = thread->_uniqueID;
}
}
auto Scheduler::enter(Mode mode) -> Event {
inline auto Scheduler::enter(Mode mode) -> Event {
if(mode == Mode::Run) {
_mode = mode;
_host = co_active();
@@ -98,7 +98,7 @@ auto Scheduler::enter(Mode mode) -> Event {
return Event::None;
}
auto Scheduler::exit(Event event) -> void {
inline auto Scheduler::exit(Event event) -> void {
//subtract the minimum time from all threads to prevent clock overflow.
auto reduce = minimum();
for(auto& thread : _threads) {
@@ -114,13 +114,13 @@ auto Scheduler::exit(Event event) -> void {
//used to prevent auxiliary threads from blocking during synchronization.
//for instance, a secondary CPU waiting on an interrupt from the primary CPU.
//as other threads are not run during synchronization, this would otherwise cause a deadlock.
auto Scheduler::synchronizing() const -> bool {
inline auto Scheduler::synchronizing() const -> bool {
return _mode == Mode::SynchronizeAuxiliary;
}
//marks a safe point (typically the beginning of the entry point) of a thread.
//the scheduler may exit at these points for the purpose of synchronization.
auto Scheduler::synchronize() -> void {
inline auto Scheduler::synchronize() -> void {
if(co_active() == _primary) {
if(_mode == Mode::SynchronizePrimary) return exit(Event::Synchronize);
} else {
@@ -128,10 +128,10 @@ auto Scheduler::synchronize() -> void {
}
}
auto Scheduler::getSynchronize() -> bool {
inline auto Scheduler::getSynchronize() -> bool {
return _synchronize;
}
auto Scheduler::setSynchronize(bool synchronize) -> void {
inline auto Scheduler::setSynchronize(bool synchronize) -> void {
_synchronize = synchronize;
}
@@ -12,25 +12,25 @@ struct Scheduler {
Scheduler(const Scheduler&) = delete;
auto operator=(const Scheduler&) = delete;
inline auto reset() -> void;
inline auto threads() const -> uint;
inline auto thread(uint threadID) const -> maybe<Thread&>;
inline auto uniqueID() const -> uint;
inline auto minimum() const -> uintmax;
inline auto maximum() const -> uintmax;
auto reset() -> void;
auto threads() const -> uint;
auto thread(uint threadID) const -> maybe<Thread&>;
auto uniqueID() const -> uint;
auto minimum() const -> uintmax;
auto maximum() const -> uintmax;
inline auto append(Thread& thread) -> bool;
inline auto remove(Thread& thread) -> void;
auto append(Thread& thread) -> bool;
auto remove(Thread& thread) -> void;
inline auto power(Thread& thread) -> void;
inline auto enter(Mode mode = Mode::Run) -> Event;
inline auto exit(Event event) -> void;
auto power(Thread& thread) -> void;
auto enter(Mode mode = Mode::Run) -> Event;
auto exit(Event event) -> void;
inline auto synchronizing() const -> bool;
inline auto synchronize() -> void;
auto synchronizing() const -> bool;
auto synchronize() -> void;
inline auto getSynchronize() -> bool;
inline auto setSynchronize(bool) -> void;
auto getSynchronize() -> bool;
auto setSynchronize(bool) -> void;
private:
cothread_t _host = nullptr; //program thread (used to exit scheduler)
@@ -1,9 +1,9 @@
auto Thread::EntryPoints() -> vector<EntryPoint>& {
inline auto Thread::EntryPoints() -> vector<EntryPoint>& {
static vector<EntryPoint> entryPoints;
return entryPoints;
}
auto Thread::Enter() -> void {
inline auto Thread::Enter() -> void {
for(uint64_t index : range(EntryPoints().size())) {
if(co_active() == EntryPoints()[index].handle) {
auto entryPoint = EntryPoints()[index].entryPoint;
@@ -18,34 +18,34 @@ auto Thread::Enter() -> void {
throw ThreadNotFound{};
}
Thread::~Thread() {
inline Thread::~Thread() {
destroy();
}
auto Thread::active() const -> bool { return co_active() == _handle; }
auto Thread::handle() const -> cothread_t { return _handle; }
auto Thread::frequency() const -> uintmax { return _frequency; }
auto Thread::scalar() const -> uintmax { return _scalar; }
auto Thread::clock() const -> uintmax { return _clock; }
inline auto Thread::active() const -> bool { return co_active() == _handle; }
inline auto Thread::handle() const -> cothread_t { return _handle; }
inline auto Thread::frequency() const -> uintmax { return _frequency; }
inline auto Thread::scalar() const -> uintmax { return _scalar; }
inline auto Thread::clock() const -> uintmax { return _clock; }
auto Thread::setHandle(cothread_t handle) -> void {
inline auto Thread::setHandle(cothread_t handle) -> void {
_handle = handle;
}
auto Thread::setFrequency(double frequency) -> void {
inline auto Thread::setFrequency(double frequency) -> void {
_frequency = frequency + 0.5;
_scalar = Second / _frequency;
}
auto Thread::setScalar(uintmax scalar) -> void {
inline auto Thread::setScalar(uintmax scalar) -> void {
_scalar = scalar;
}
auto Thread::setClock(uintmax clock) -> void {
inline auto Thread::setClock(uintmax clock) -> void {
_clock = clock;
}
auto Thread::create(double frequency, function<void ()> entryPoint) -> void {
inline auto Thread::create(double frequency, function<void ()> entryPoint) -> void {
if(!_handle) {
_handle = co_create(Thread::Size, &Thread::Enter);
} else {
@@ -57,18 +57,18 @@ auto Thread::create(double frequency, function<void ()> entryPoint) -> void {
scheduler.append(*this);
}
auto Thread::destroy() -> void {
inline auto Thread::destroy() -> void {
scheduler.remove(*this);
if(_handle) co_delete(_handle);
_handle = nullptr;
}
auto Thread::step(uint clocks) -> void {
inline auto Thread::step(uint clocks) -> void {
_clock += _scalar * clocks;
}
//ensure all threads are caught up to the current thread before proceeding.
auto Thread::synchronize() -> void {
inline auto Thread::synchronize() -> void {
//note: this will call Thread::synchronize(*this) at some point, but this is safe:
//the comparison will always fail as the current thread can never be behind itself.
for(auto thread : scheduler._threads) synchronize(*thread);
@@ -76,7 +76,7 @@ auto Thread::synchronize() -> void {
//ensure the specified thread(s) are caught up the current thread before proceeding.
template<typename... P>
auto Thread::synchronize(Thread& thread, P&&... p) -> void {
inline auto Thread::synchronize(Thread& thread, P&&... p) -> void {
//switching to another thread does not guarantee it will catch up before switching back.
while(thread.clock() < clock()) {
//disable synchronization for auxiliary threads during scheduler synchronization.
@@ -88,7 +88,7 @@ auto Thread::synchronize(Thread& thread, P&&... p) -> void {
if constexpr(sizeof...(p) > 0) synchronize(forward<P>(p)...);
}
auto Thread::serialize(serializer& s) -> void {
inline auto Thread::serialize(serializer& s) -> void {
s.integer(_frequency);
s.integer(_scalar);
s.integer(_clock);
+49
View File
@@ -0,0 +1,49 @@
struct Scheduler;
struct Thread {
enum : uintmax { Second = (uintmax)-1 >> 1 };
enum : uintmax { Size = 8_KiB * sizeof(void*) };
struct EntryPoint {
cothread_t handle = nullptr;
function<void ()> entryPoint;
};
static auto EntryPoints() -> vector<EntryPoint>&;
static auto Enter() -> void;
Thread() = default;
Thread(const Thread&) = delete;
auto operator=(const Thread&) = delete;
virtual ~Thread();
explicit operator bool() const { return _handle; }
auto active() const -> bool;
auto handle() const -> cothread_t;
auto frequency() const -> uintmax;
auto scalar() const -> uintmax;
auto clock() const -> uintmax;
auto setHandle(cothread_t handle) -> void;
auto setFrequency(double frequency) -> void;
auto setScalar(uintmax scalar) -> void;
auto setClock(uintmax clock) -> void;
auto create(double frequency, function<void ()> entryPoint) -> void;
auto destroy() -> void;
auto step(uint clocks) -> void;
auto synchronize() -> void;
template<typename... P> auto synchronize(Thread&, P&&...) -> void;
auto serialize(serializer& s) -> void;
protected:
cothread_t _handle = nullptr;
uint _uniqueID = 0;
uintmax _frequency = 0;
uintmax _scalar = 0;
uintmax _clock = 0;
friend class Scheduler;
};
File renamed without changes.
+49 -45
View File
@@ -1,53 +1,57 @@
components := $(call unique,$(components))
ares.components := $(call unique,$(ares.components))
objects += $(if $(findstring ay38910,$(components)),audio-ay38910)
objects += $(if $(findstring sn76489,$(components)),audio-sn76489)
objects += $(if $(findstring t6w28,$(components)),audio-t6w28)
objects += $(if $(findstring ym2149,$(components)),audio-ym2149)
objects += $(if $(findstring ym2413,$(components)),audio-ym2413)
ares.objects += $(if $(findstring ay38910,$(ares.components)),ares-audio-ay38910)
ares.objects += $(if $(findstring msm5205,$(ares.components)),ares-audio-msm5205)
ares.objects += $(if $(findstring sn76489,$(ares.components)),ares-audio-sn76489)
ares.objects += $(if $(findstring t6w28,$(ares.components)),ares-audio-t6w28)
ares.objects += $(if $(findstring ym2149,$(ares.components)),ares-audio-ym2149)
ares.objects += $(if $(findstring ym2413,$(ares.components)),ares-audio-ym2413)
objects += $(if $(findstring m93lcx6,$(components)),eeprom-m93lcx6)
objects += $(if $(findstring x24c01,$(components)),eeprom-x24c01)
ares.objects += $(if $(findstring m93lcx6,$(ares.components)),ares-eeprom-m93lcx6)
ares.objects += $(if $(findstring x24c01,$(ares.components)),ares-eeprom-x24c01)
objects += $(if $(findstring arm7tdmi,$(components)),processor-arm7tdmi)
objects += $(if $(findstring gsu,$(components)),processor-gsu)
objects += $(if $(findstring hg51b,$(components)),processor-hg51b)
objects += $(if $(findstring huc6280,$(components)),processor-huc6280)
objects += $(if $(findstring m68k,$(components)),processor-m68k)
objects += $(if $(findstring mos6502,$(components)),processor-mos6502)
objects += $(if $(findstring sm83,$(components)),processor-sm83)
objects += $(if $(findstring spc700,$(components)),processor-spc700)
objects += $(if $(findstring tlcs900h,$(components)),processor-tlcs900h)
objects += $(if $(findstring upd96050,$(components)),processor-upd96050)
objects += $(if $(findstring v30mz,$(components)),processor-v30mz)
objects += $(if $(findstring wdc65816,$(components)),processor-wdc65816)
objects += $(if $(findstring z80,$(components)),processor-z80)
ares.objects += $(if $(findstring arm7tdmi,$(ares.components)),ares-processor-arm7tdmi)
ares.objects += $(if $(findstring gsu,$(ares.components)),ares-processor-gsu)
ares.objects += $(if $(findstring hg51b,$(ares.components)),ares-processor-hg51b)
ares.objects += $(if $(findstring huc6280,$(ares.components)),ares-processor-huc6280)
ares.objects += $(if $(findstring m68k,$(ares.components)),ares-processor-m68k)
ares.objects += $(if $(findstring mos6502,$(ares.components)),ares-processor-mos6502)
ares.objects += $(if $(findstring sm83,$(ares.components)),ares-processor-sm83)
ares.objects += $(if $(findstring spc700,$(ares.components)),ares-processor-spc700)
ares.objects += $(if $(findstring tlcs900h,$(ares.components)),ares-processor-tlcs900h)
ares.objects += $(if $(findstring upd96050,$(ares.components)),ares-processor-upd96050)
ares.objects += $(if $(findstring v30mz,$(ares.components)),ares-processor-v30mz)
ares.objects += $(if $(findstring vr4300,$(ares.components)),ares-processor-vr4300)
ares.objects += $(if $(findstring wdc65816,$(ares.components)),ares-processor-wdc65816)
ares.objects += $(if $(findstring z80,$(ares.components)),ares-processor-z80)
objects += $(if $(findstring tms9918,$(components)),video-tms9918)
objects += $(if $(findstring v9938,$(components)),video-v9938)
ares.objects += $(if $(findstring tms9918,$(ares.components)),ares-video-tms9918)
ares.objects += $(if $(findstring v9938,$(ares.components)),ares-video-v9938)
obj/audio-ay38910.o: component/audio/ay38910/ay38910.cpp
obj/audio-sn76489.o: component/audio/sn76489/sn76489.cpp
obj/audio-t6w28.o: component/audio/t6w28/t6w28.cpp
obj/audio-ym2149.o: component/audio/ym2149/ym2149.cpp
obj/audio-ym2413.o: component/audio/ym2413/ym2413.cpp
$(object.path)/ares-audio-ay38910.o: $(ares.path)/component/audio/ay38910/ay38910.cpp
$(object.path)/ares-audio-msm5205.o: $(ares.path)/component/audio/msm5205/msm5205.cpp
$(object.path)/ares-audio-sn76489.o: $(ares.path)/component/audio/sn76489/sn76489.cpp
$(object.path)/ares-audio-t6w28.o: $(ares.path)/component/audio/t6w28/t6w28.cpp
$(object.path)/ares-audio-ym2149.o: $(ares.path)/component/audio/ym2149/ym2149.cpp
$(object.path)/ares-audio-ym2413.o: $(ares.path)/component/audio/ym2413/ym2413.cpp
obj/eeprom-m93lcx6.o: component/eeprom/m93lcx6/m93lcx6.cpp
obj/eeprom-x24c01.o: component/eeprom/x24c01/x24c01.cpp
$(object.path)/ares-eeprom-m93lcx6.o: $(ares.path)/component/eeprom/m93lcx6/m93lcx6.cpp
$(object.path)/ares-eeprom-x24c01.o: $(ares.path)/component/eeprom/x24c01/x24c01.cpp
obj/processor-arm7tdmi.o: component/processor/arm7tdmi/arm7tdmi.cpp
obj/processor-gsu.o: component/processor/gsu/gsu.cpp
obj/processor-hg51b.o: component/processor/hg51b/hg51b.cpp
obj/processor-huc6280.o: component/processor/huc6280/huc6280.cpp
obj/processor-m68k.o: component/processor/m68k/m68k.cpp
obj/processor-mos6502.o: component/processor/mos6502/mos6502.cpp
obj/processor-sm83.o: component/processor/sm83/sm83.cpp
obj/processor-spc700.o: component/processor/spc700/spc700.cpp
obj/processor-tlcs900h.o: component/processor/tlcs900h/tlcs900h.cpp
obj/processor-upd96050.o: component/processor/upd96050/upd96050.cpp
obj/processor-v30mz.o: component/processor/v30mz/v30mz.cpp
obj/processor-wdc65816.o: component/processor/wdc65816/wdc65816.cpp
obj/processor-z80.o: component/processor/z80/z80.cpp
$(object.path)/ares-processor-arm7tdmi.o: $(ares.path)/component/processor/arm7tdmi/arm7tdmi.cpp
$(object.path)/ares-processor-gsu.o: $(ares.path)/component/processor/gsu/gsu.cpp
$(object.path)/ares-processor-hg51b.o: $(ares.path)/component/processor/hg51b/hg51b.cpp
$(object.path)/ares-processor-huc6280.o: $(ares.path)/component/processor/huc6280/huc6280.cpp
$(object.path)/ares-processor-m68k.o: $(ares.path)/component/processor/m68k/m68k.cpp
$(object.path)/ares-processor-mos6502.o: $(ares.path)/component/processor/mos6502/mos6502.cpp
$(object.path)/ares-processor-sm83.o: $(ares.path)/component/processor/sm83/sm83.cpp
$(object.path)/ares-processor-spc700.o: $(ares.path)/component/processor/spc700/spc700.cpp
$(object.path)/ares-processor-tlcs900h.o: $(ares.path)/component/processor/tlcs900h/tlcs900h.cpp
$(object.path)/ares-processor-upd96050.o: $(ares.path)/component/processor/upd96050/upd96050.cpp
$(object.path)/ares-processor-v30mz.o: $(ares.path)/component/processor/v30mz/v30mz.cpp
$(object.path)/ares-processor-vr4300.o: $(ares.path)/component/processor/vr4300/vr4300.cpp
$(object.path)/ares-processor-wdc65816.o: $(ares.path)/component/processor/wdc65816/wdc65816.cpp
$(object.path)/ares-processor-z80.o: $(ares.path)/component/processor/z80/z80.cpp
obj/video-tms9918.o: component/video/tms9918/tms9918.cpp
obj/video-v9938.o: component/video/v9938/v9938.cpp
$(object.path)/ares-video-tms9918.o: $(ares.path)/component/video/tms9918/tms9918.cpp
$(object.path)/ares-video-v9938.o: $(ares.path)/component/video/v9938/v9938.cpp
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "ay38910.hpp"
namespace ares {
+81
View File
@@ -0,0 +1,81 @@
#include <ares/ares.hpp>
#include "msm5205.hpp"
namespace ares {
#include "serialization.cpp"
auto MSM5205::sample() const -> int12 {
//note: technically this should return io.sample & ~3;
//the DAC output is only 10-bits
return io.sample;
}
auto MSM5205::scaler() const -> uint {
//0 = 4khz (384khz / 96); 8khz (768khz / 96)
//1 = 6khz (384khz / 64); 12khz (768khz / 64)
//2 = 8khz (384khz / 48); 16khz (768khz / 48)
//3 = prohibited (unknown behavior: treat as 8khz)
static const uint scaler[4] = {96, 64, 48, 48};
return scaler[io.scaler];
}
auto MSM5205::setReset(uint1 reset) -> void {
io.reset = reset;
}
auto MSM5205::setWidth(uint1 width) -> void {
io.width = width;
}
auto MSM5205::setScaler(uint2 scaler) -> void {
io.scaler = scaler;
}
auto MSM5205::setData(uint4 data) -> void {
if(io.width == 0) io.data = (uint3)data << 1;
if(io.width == 1) io.data = (uint4)data << 0;
}
auto MSM5205::clock() -> void {
if(io.reset) {
io.sample = 0;
io.step = 0;
return;
}
int sample = io.sample + lookup[io.step * 16 + io.data];
if(sample > 2047) sample = 2047;
if(sample < -2048) sample = -2048;
io.sample = sample;
static const int shift[8] = {-1, -1, -1, -1, 2, 4, 6, 8};
io.step += shift[(uint3)io.data];
if(io.step > 48) io.step = 48;
if(io.step < 0) io.step = 0;
}
auto MSM5205::power() -> void {
io = {};
static const int map[16][4] = {
{ 1,0,0,0}, { 1,0,0,1}, { 1,0,1,0}, { 1,0,1,1},
{ 1,1,0,0}, { 1,1,0,1}, { 1,1,1,0}, { 1,1,1,1},
{-1,0,0,0}, {-1,0,0,1}, {-1,0,1,0}, {-1,0,1,1},
{-1,1,0,0}, {-1,1,0,1}, {-1,1,1,0}, {-1,1,1,1},
};
for(int step : range(49)) {
int scale = floor(16.0 * pow(11.0 / 10.0, (double)step));
for(int nibble : range(16)) {
int a = map[nibble][0];
int b = map[nibble][1] * scale / 1;
int c = map[nibble][2] * scale / 2;
int d = map[nibble][3] * scale / 4;
int e = scale / 8;
lookup[step * 16 + nibble] = a * (b + c + d + e);
}
}
}
}
+36
View File
@@ -0,0 +1,36 @@
#pragma once
namespace ares {
//OKI Semiconductor MSM5205
struct MSM5205 {
//msm5205.cpp
auto sample() const -> int12;
auto scaler() const -> uint;
auto setReset(uint1 reset) -> void;
auto setWidth(uint1 width) -> void;
auto setScaler(uint2 frequency) -> void;
auto setData(uint4 data) -> void;
auto clock() -> void;
auto power() -> void;
//serialization.cpp
auto serialize(serializer&) -> void;
struct IO {
uint1 reset; //RESET
uint1 width; //4B
uint2 scaler; //S0-S1
uint4 data; //D0-D7
int12 sample; //DAOUT
int8 step;
} io;
//unserialized:
int lookup[49 * 16];
};
}
@@ -0,0 +1,8 @@
auto MSM5205::serialize(serializer& s) -> void {
s.integer(io.reset);
s.integer(io.width);
s.integer(io.scaler);
s.integer(io.data);
s.integer(io.sample);
s.integer(io.step);
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "sn76489.hpp"
namespace ares {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "t6w28.hpp"
namespace ares {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "ym2149.hpp"
namespace ares {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "ym2413.hpp"
namespace ares {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "m93lcx6.hpp"
namespace ares {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "x24c01.hpp"
namespace ares {
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "arm7tdmi.hpp"
namespace ares {
+10 -10
View File
@@ -29,11 +29,11 @@ struct ARM7TDMI {
//registers.cpp
struct GPR;
struct PSR;
inline auto r(uint4) -> GPR&;
inline auto cpsr() -> PSR&;
inline auto spsr() -> PSR&;
inline auto privileged() const -> bool;
inline auto exception() const -> bool;
auto r(uint4) -> GPR&;
auto cpsr() -> PSR&;
auto spsr() -> PSR&;
auto privileged() const -> bool;
auto exception() const -> bool;
//memory.cpp
auto idle() -> void;
@@ -119,10 +119,10 @@ struct ARM7TDMI {
auto disassembleContext() -> string;
struct GPR {
inline operator uint32_t() const { return data; }
inline auto operator=(const GPR& value) -> GPR& { return operator=(value.data); }
operator uint32_t() const { return data; }
auto operator=(const GPR& value) -> GPR& { return operator=(value.data); }
inline auto operator=(uint32 value) -> GPR& {
auto operator=(uint32 value) -> GPR& {
data = value;
if(modify) modify();
return *this;
@@ -143,11 +143,11 @@ struct ARM7TDMI {
SYS = 0x1f, //system
};
inline operator uint32_t() const {
operator uint32_t() const {
return m << 0 | t << 5 | f << 6 | i << 7 | v << 28 | c << 29 | z << 30 | n << 31;
}
inline auto operator=(uint32 data) -> PSR& {
auto operator=(uint32 data) -> PSR& {
m = data.bit(0,4);
t = data.bit(5);
f = data.bit(6);
@@ -1,4 +1,4 @@
auto ARM7TDMI::r(uint4 index) -> GPR& {
inline auto ARM7TDMI::r(uint4 index) -> GPR& {
switch(index) {
case 0: return processor.r0;
case 1: return processor.r1;
@@ -34,11 +34,11 @@ auto ARM7TDMI::r(uint4 index) -> GPR& {
unreachable;
}
auto ARM7TDMI::cpsr() -> PSR& {
inline auto ARM7TDMI::cpsr() -> PSR& {
return processor.cpsr;
}
auto ARM7TDMI::spsr() -> PSR& {
inline auto ARM7TDMI::spsr() -> PSR& {
switch(processor.cpsr.m) {
case PSR::FIQ: return processor.fiq.spsr;
case PSR::IRQ: return processor.irq.spsr;
@@ -49,10 +49,10 @@ auto ARM7TDMI::spsr() -> PSR& {
throw;
}
auto ARM7TDMI::privileged() const -> bool {
inline auto ARM7TDMI::privileged() const -> bool {
return processor.cpsr.m != PSR::USR;
}
auto ARM7TDMI::exception() const -> bool {
inline auto ARM7TDMI::exception() const -> bool {
return privileged() && processor.cpsr.m != PSR::SYS;
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "gsu.hpp"
//note: multiplication results *may* sometimes be invalid when both CLSR and MS0 are set
+20 -20
View File
@@ -2,32 +2,32 @@ struct Register {
uint16 data = 0;
bool modified = false;
inline operator uint() const {
operator uint() const {
return data;
}
inline auto assign(uint value) -> uint16 {
auto assign(uint value) -> uint16 {
modified = true;
return data = value;
}
inline auto operator++() { return assign(data + 1); }
inline auto operator--() { return assign(data - 1); }
inline auto operator++(int) { uint r = data; assign(data + 1); return r; }
inline auto operator--(int) { uint r = data; assign(data - 1); return r; }
inline auto operator = (uint i) { return assign(i); }
inline auto operator |= (uint i) { return assign(data | i); }
inline auto operator ^= (uint i) { return assign(data ^ i); }
inline auto operator &= (uint i) { return assign(data & i); }
inline auto operator <<= (uint i) { return assign(data << i); }
inline auto operator >>= (uint i) { return assign(data >> i); }
inline auto operator += (uint i) { return assign(data + i); }
inline auto operator -= (uint i) { return assign(data - i); }
inline auto operator *= (uint i) { return assign(data * i); }
inline auto operator /= (uint i) { return assign(data / i); }
inline auto operator %= (uint i) { return assign(data % i); }
auto operator++() { return assign(data + 1); }
auto operator--() { return assign(data - 1); }
auto operator++(int) { uint r = data; assign(data + 1); return r; }
auto operator--(int) { uint r = data; assign(data - 1); return r; }
auto operator = (uint i) { return assign(i); }
auto operator |= (uint i) { return assign(data | i); }
auto operator ^= (uint i) { return assign(data ^ i); }
auto operator &= (uint i) { return assign(data & i); }
auto operator <<= (uint i) { return assign(data << i); }
auto operator >>= (uint i) { return assign(data >> i); }
auto operator += (uint i) { return assign(data + i); }
auto operator -= (uint i) { return assign(data - i); }
auto operator *= (uint i) { return assign(data * i); }
auto operator /= (uint i) { return assign(data / i); }
auto operator %= (uint i) { return assign(data % i); }
inline auto operator = (const Register& value) { return assign(value); }
auto operator = (const Register& value) { return assign(value); }
Register() = default;
Register(const Register&) = delete;
@@ -54,8 +54,8 @@ struct SFR {
SFR(const SFR&) = delete;
auto operator=(const SFR&) = delete;
inline operator uint() const { return data & 0x9f7e; }
inline auto& operator=(const uint value) { return data = value, *this; }
operator uint() const { return data & 0x9f7e; }
auto& operator=(const uint value) { return data = value, *this; }
};
struct SCMR {
@@ -0,0 +1,236 @@
auto HG51B::disassembleInstruction(maybe<uint15> _pb, maybe<uint8> _pc) -> string {
uint15 pb = _pb ? *_pb : (uint15)r.pb;
uint8 pc = _pc ? *_pc : (uint8)r.pc;
return {}; //todo
}
auto HG51B::disassembleADD(uint7 reg, uint5 shift) -> string {
return {"add "};
}
auto HG51B::disassembleADD(uint8 imm, uint5 shift) -> string {
return {"add "};
}
auto HG51B::disassembleAND(uint7 reg, uint5 shift) -> string {
return {"and "};
}
auto HG51B::disassembleAND(uint8 imm, uint5 shift) -> string {
return {"and "};
}
auto HG51B::disassembleASR(uint7 reg) -> string {
return {"asr "};
}
auto HG51B::disassembleASR(uint5 imm) -> string {
return {"imm "};
}
auto HG51B::disassembleCLEAR() -> string {
return {"clear "};
}
auto HG51B::disassembleCMP(uint7 reg, uint5 shift) -> string {
return {"cmp "};
}
auto HG51B::disassembleCMP(uint8 imm, uint5 shift) -> string {
return {"cmp "};
}
auto HG51B::disassembleCMPR(uint7 reg, uint5 shift) -> string {
return {"cmpr "};
}
auto HG51B::disassembleCMPR(uint8 imm, uint5 shift) -> string {
return {"cmpr "};
}
auto HG51B::disassembleHALT() -> string {
return {"halt "};
}
auto HG51B::disassembleINC(uint24& reg) -> string {
return {"inc "};
}
auto HG51B::disassembleJMP(uint8 data, uint1 far, const uint1& take) -> string {
return {"jmp "};
}
auto HG51B::disassembleJSR(uint8 data, uint1 far, const uint1& take) -> string {
return {"jsr "};
}
auto HG51B::disassembleLD(uint24& out, uint7 reg) -> string {
return {"ld "};
}
auto HG51B::disassembleLD(uint15& out, uint4 reg) -> string {
return {"ld "};
}
auto HG51B::disassembleLD(uint24& out, uint8 imm) -> string {
return {"ld "};
}
auto HG51B::disassembleLD(uint15& out, uint8 imm) -> string {
return {"ld "};
}
auto HG51B::disassembleLDL(uint15& out, uint8 imm) -> string {
return {"ldl "};
}
auto HG51B::disassembleLDH(uint15& out, uint7 imm) -> string {
return {"ldh "};
}
auto HG51B::disassembleMUL(uint7 reg) -> string {
return {"mul "};
}
auto HG51B::disassembleMUL(uint8 imm) -> string {
return {"mul "};
}
auto HG51B::disassembleNOP() -> string {
return {"nop "};
}
auto HG51B::disassembleOR(uint7 reg, uint5 shift) -> string {
return {"or "};
}
auto HG51B::disassembleOR(uint8 imm, uint5 shift) -> string {
return {"or "};
}
auto HG51B::disassembleRDRAM(uint2 byte, uint24& a) -> string {
return {"rdram "};
}
auto HG51B::disassembleRDRAM(uint2 byte, uint8 imm) -> string {
return {"rdram "};
}
auto HG51B::disassembleRDROM(uint24& reg) -> string {
return {"rdrom "};
}
auto HG51B::disassembleRDROM(uint10 imm) -> string {
return {"rdrom "};
}
auto HG51B::disassembleROR(uint7 reg) -> string {
return {"ror "};
}
auto HG51B::disassembleROR(uint5 imm) -> string {
return {"ror "};
}
auto HG51B::disassembleRTS() -> string {
return {"rts "};
}
auto HG51B::disassembleSHL(uint7 reg) -> string {
return {"shl "};
}
auto HG51B::disassembleSHL(uint5 imm) -> string {
return {"shl "};
}
auto HG51B::disassembleSHR(uint7 reg) -> string {
return {"shr "};
}
auto HG51B::disassembleSHR(uint5 imm) -> string {
return {"shr "};
}
auto HG51B::disassembleSKIP(uint1 take, const uint1& flag) -> string {
return {"skip "};
}
auto HG51B::disassembleST(uint7 reg, uint24& in) -> string {
return {"st "};
}
auto HG51B::disassembleSUB(uint7 reg, uint5 shift) -> string {
return {"sub "};
}
auto HG51B::disassembleSUB(uint8 imm, uint5 shift) -> string {
return {"sub "};
}
auto HG51B::disassembleSUBR(uint7 reg, uint5 shift) -> string {
return {"subr "};
}
auto HG51B::disassembleSUBR(uint8 imm, uint5 shift) -> string {
return {"subr "};
}
auto HG51B::disassembleSWAP(uint24& a, uint4 reg) -> string {
return {"swap "};
}
auto HG51B::disassembleSXB() -> string {
return {"sxb "};
}
auto HG51B::disassembleSXW() -> string {
return {"sxw "};
}
auto HG51B::disassembleWAIT() -> string {
return {"wait "};
}
auto HG51B::disassembleWRRAM(uint2 byte, uint24& a) -> string {
return {"wrram "};
}
auto HG51B::disassembleWRRAM(uint2 byte, uint8 imm) -> string {
return {"wrram "};
}
auto HG51B::disassembleXNOR(uint7 reg, uint5 shift) -> string {
return {"xnor "};
}
auto HG51B::disassembleXNOR(uint8 imm, uint5 shift) -> string {
return {"xnor "};
}
auto HG51B::disassembleXOR(uint7 reg, uint5 shift) -> string {
return {"xor "};
}
auto HG51B::disassembleXOR(uint8 imm, uint5 shift) -> string {
return {"xor "};
}
auto HG51B::disassembleContext() -> string {
string output;
output.append("a:", hex(r.a, 6L), " ");
output.append("p:", hex(r.p, 4L), " ");
for(uint n : range(16)) {
output.append("r", n, ":", hex(r.gpr[n], 6L), " ");
}
output.append(r.n ? "N" : "n");
output.append(r.z ? "Z" : "z");
output.append(r.c ? "C" : "c");
output.append(r.v ? "V" : "v");
output.append(r.i ? "I" : "i");
return output;
}
+2 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "hg51b.hpp"
namespace ares {
@@ -7,6 +7,7 @@ namespace ares {
#include "instruction.cpp"
#include "instructions.cpp"
#include "serialization.cpp"
#include "disassembler.cpp"
auto HG51B::lock() -> void {
io.lock = 1;
+59
View File
@@ -110,6 +110,10 @@ struct HG51B {
auto readRegister(uint7 address) -> uint24;
auto writeRegister(uint7 address, uint24 data) -> void;
//disassembler.cpp
noinline auto disassembleInstruction(maybe<uint15> pb = {}, maybe<uint8> pc = {}) -> string;
noinline auto disassembleContext() -> string;
protected:
struct Registers {
uint15 pb; //program bank
@@ -177,6 +181,61 @@ protected:
uint23 stack[8];
function<void ()> instructionTable[65536];
function<string ()> disassembleTable[65536];
auto disassembleADD(uint7 reg, uint5 shift) -> string;
auto disassembleADD(uint8 imm, uint5 shift) -> string;
auto disassembleAND(uint7 reg, uint5 shift) -> string;
auto disassembleAND(uint8 imm, uint5 shift) -> string;
auto disassembleASR(uint7 reg) -> string;
auto disassembleASR(uint5 imm) -> string;
auto disassembleCLEAR() -> string;
auto disassembleCMP(uint7 reg, uint5 shift) -> string;
auto disassembleCMP(uint8 imm, uint5 shift) -> string;
auto disassembleCMPR(uint7 reg, uint5 shift) -> string;
auto disassembleCMPR(uint8 imm, uint5 shift) -> string;
auto disassembleHALT() -> string;
auto disassembleINC(uint24& reg) -> string;
auto disassembleJMP(uint8 data, uint1 far, const uint1& take) -> string;
auto disassembleJSR(uint8 data, uint1 far, const uint1& take) -> string;
auto disassembleLD(uint24& out, uint7 reg) -> string;
auto disassembleLD(uint15& out, uint4 reg) -> string;
auto disassembleLD(uint24& out, uint8 imm) -> string;
auto disassembleLD(uint15& out, uint8 imm) -> string;
auto disassembleLDL(uint15& out, uint8 imm) -> string;
auto disassembleLDH(uint15& out, uint7 imm) -> string;
auto disassembleMUL(uint7 reg) -> string;
auto disassembleMUL(uint8 imm) -> string;
auto disassembleNOP() -> string;
auto disassembleOR(uint7 reg, uint5 shift) -> string;
auto disassembleOR(uint8 imm, uint5 shift) -> string;
auto disassembleRDRAM(uint2 byte, uint24& a) -> string;
auto disassembleRDRAM(uint2 byte, uint8 imm) -> string;
auto disassembleRDROM(uint24& reg) -> string;
auto disassembleRDROM(uint10 imm) -> string;
auto disassembleROR(uint7 reg) -> string;
auto disassembleROR(uint5 imm) -> string;
auto disassembleRTS() -> string;
auto disassembleSHL(uint7 reg) -> string;
auto disassembleSHL(uint5 imm) -> string;
auto disassembleSHR(uint7 reg) -> string;
auto disassembleSHR(uint5 imm) -> string;
auto disassembleSKIP(uint1 take, const uint1& flag) -> string;
auto disassembleST(uint7 reg, uint24& in) -> string;
auto disassembleSUB(uint7 reg, uint5 shift) -> string;
auto disassembleSUB(uint8 imm, uint5 shift) -> string;
auto disassembleSUBR(uint7 reg, uint5 shift) -> string;
auto disassembleSUBR(uint8 imm, uint5 shift) -> string;
auto disassembleSWAP(uint24& a, uint4 reg) -> string;
auto disassembleSXB() -> string;
auto disassembleSXW() -> string;
auto disassembleWAIT() -> string;
auto disassembleWRRAM(uint2 byte, uint24& a) -> string;
auto disassembleWRRAM(uint2 byte, uint8 imm) -> string;
auto disassembleXNOR(uint7 reg, uint5 shift) -> string;
auto disassembleXNOR(uint8 imm, uint5 shift) -> string;
auto disassembleXOR(uint7 reg, uint5 shift) -> string;
auto disassembleXOR(uint8 imm, uint5 shift) -> string;
};
}
@@ -2,6 +2,7 @@ HG51B::HG51B() {
#define bind(id, name, ...) { \
if(instructionTable[id]) throw; \
instructionTable[id] = [=] { return instruction##name(__VA_ARGS__); }; \
disassembleTable[id] = [=] { return disassemble##name(__VA_ARGS__); }; \
}
#define pattern(s) \
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "huc6280.hpp"
namespace ares {
+7 -7
View File
@@ -15,10 +15,10 @@ struct HuC6280 {
auto power() -> void;
//memory.cpp
inline auto load8(uint8) -> uint8;
inline auto load16(uint16) -> uint8;
inline auto store8(uint8, uint8) -> void;
inline auto store16(uint16, uint8) -> void;
auto load8(uint8) -> uint8;
auto load16(uint16) -> uint8;
auto store8(uint8, uint8) -> void;
auto store16(uint16, uint8) -> void;
auto idle() -> void;
auto opcode() -> uint8;
@@ -125,15 +125,15 @@ struct HuC6280 {
bool v; //overflow
bool n; //negative
inline operator uint8() const {
operator uint8() const {
return c << 0 | z << 1 | i << 2 | d << 3 | b << 4 | t << 5 | v << 6 | n << 7;
}
inline auto operator()() const -> uint8 {
auto operator()() const -> uint8 {
return operator uint8();
}
inline auto& operator=(uint8 data) {
auto& operator=(uint8 data) {
c = data.bit(0);
z = data.bit(1);
i = data.bit(2);
+8 -8
View File
@@ -1,19 +1,19 @@
auto HuC6280::load8(uint8 address) -> uint8 {
inline auto HuC6280::load8(uint8 address) -> uint8 {
step(CS);
return read(MPR[1], address);
}
auto HuC6280::load16(uint16 address) -> uint8 {
inline auto HuC6280::load16(uint16 address) -> uint8 {
step(CS);
return read(MPR[address >> 13], (uint13)address);
}
auto HuC6280::store8(uint8 address, uint8 data) -> void {
inline auto HuC6280::store8(uint8 address, uint8 data) -> void {
step(CS);
return write(MPR[1], address, data);
}
auto HuC6280::store16(uint16 address, uint8 data) -> void {
inline auto HuC6280::store16(uint16 address, uint8 data) -> void {
step(CS);
return write(MPR[address >> 13], (uint13)address, data);
}
@@ -24,22 +24,22 @@ auto HuC6280::idle() -> void {
step(CS);
}
auto HuC6280::opcode() -> uint8 {
inline auto HuC6280::opcode() -> uint8 {
return load16(PC++);
}
auto HuC6280::operand() -> uint8 {
inline auto HuC6280::operand() -> uint8 {
return load16(PC++);
}
//
auto HuC6280::push(uint8 data) -> void {
inline auto HuC6280::push(uint8 data) -> void {
step(CS);
write(MPR[1], 0x0100 | S--, data);
}
auto HuC6280::pull() -> uint8 {
inline auto HuC6280::pull() -> uint8 {
step(CS);
return read(MPR[1], 0x0100 | ++S);
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "m68k.hpp"
namespace ares {
+1 -1
View File
@@ -10,7 +10,7 @@ struct M68K {
virtual auto read(uint1 upper, uint1 lower, uint24 address, uint16 data = 0) -> uint16 = 0;
virtual auto write(uint1 upper, uint1 lower, uint24 address, uint16 data) -> void = 0;
inline auto ird() const -> uint16 { return r.ird; }
auto ird() const -> uint16 { return r.ird; }
enum : bool { User, Supervisor };
enum : uint { Byte, Word, Long };
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "mos6502.hpp"
namespace ares {
+2 -2
View File
@@ -102,11 +102,11 @@ struct MOS6502 {
bool v; //overflow
bool n; //negative
inline operator uint() const {
operator uint() const {
return c << 0 | z << 1 | i << 2 | d << 3 | v << 6 | n << 7;
}
inline auto& operator=(uint8 data) {
auto& operator=(uint8 data) {
c = data.bit(0);
z = data.bit(1);
i = data.bit(2);
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "sm83.hpp"
namespace ares {
+5 -5
View File
@@ -1,19 +1,19 @@
auto SPC700::fetch() -> uint8 {
inline auto SPC700::fetch() -> uint8 {
return read(PC++);
}
auto SPC700::load(uint8 address) -> uint8 {
inline auto SPC700::load(uint8 address) -> uint8 {
return read(PF << 8 | address);
}
auto SPC700::store(uint8 address, uint8 data) -> void {
inline auto SPC700::store(uint8 address, uint8 data) -> void {
return write(PF << 8 | address, data);
}
auto SPC700::pull() -> uint8 {
inline auto SPC700::pull() -> uint8 {
return read(1 << 8 | ++S);
}
auto SPC700::push(uint8 data) -> void {
inline auto SPC700::push(uint8 data) -> void {
return write(1 << 8 | S--, data);
}
+1 -1
View File
@@ -1,4 +1,4 @@
#include <emulator/emulator.hpp>
#include <ares/ares.hpp>
#include "spc700.hpp"
namespace ares {
+7 -7
View File
@@ -14,11 +14,11 @@ struct SPC700 {
auto power() -> void;
//memory.cpp
inline auto fetch() -> uint8;
inline auto load(uint8 address) -> uint8;
inline auto store(uint8 address, uint8 data) -> void;
inline auto pull() -> uint8;
inline auto push(uint8 data) -> void;
auto fetch() -> uint8;
auto load(uint8 address) -> uint8;
auto store(uint8 address, uint8 data) -> void;
auto pull() -> uint8;
auto push(uint8 data) -> void;
//instruction.cpp
auto instruction() -> void;
@@ -131,11 +131,11 @@ struct SPC700 {
bool v; //overflow
bool n; //negative
inline operator uint() const {
operator uint() const {
return c << 0 | z << 1 | i << 2 | h << 3 | b << 4 | p << 5 | v << 6 | n << 7;
}
inline auto& operator=(uint8 data) {
auto& operator=(uint8 data) {
c = data.bit(0);
z = data.bit(1);
i = data.bit(2);
Loaded 100 of 992 files, more files were not shown because too many files have changed in this diff. Show more