/* Chassis polysynth framework Copyright 2024 Gordon JC Pearce Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #pragma once #include class Assigner { public: void noteOn(uint8_t c); private: // 256 bytes of RAM from $ff00 to $ffff uint8_t ram[256]; // bitmask data is at $0008 and $0010 // eight padding bytes at the start uint8_t bitMask[24] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f}; uint16_t a = 0, b = 0, c = 0, eal = 0, eah = 0; uint32_t bc, de, hl, ea = 0; /* 23:31 < Alipha> gordonjcp: struct reg16 { uint16_t value; uint8_t hi() const { return value >> 8; } uint8_t lo() const { return value; } }; 23:31 < gordonjcp> Alipha */ };