diff --git a/CMakeLists.txt b/CMakeLists.txt index d19a2d3ab..11bf00be7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -552,6 +552,7 @@ src/engine/platform/sound/nes/fds.c src/engine/platform/sound/nes/mmc5.c src/engine/platform/sound/vera_psg.c src/engine/platform/sound/vera_pcm.c +src/engine/platform/sound/ymf278b/ymf278.cpp src/engine/platform/sound/atomicssg/ssg.c @@ -669,6 +670,8 @@ src/engine/platform/sound/sid2/wave8580_P_T.cc src/engine/platform/sound/sid2/wave8580__ST.cc src/engine/platform/sound/sid2/wave.cc +src/engine/platform/sound/sid3.c + src/engine/platform/oplAInterface.cpp src/engine/platform/ym2608Interface.cpp src/engine/platform/ym2610Interface.cpp @@ -795,6 +798,7 @@ src/engine/platform/gbaminmod.cpp src/engine/platform/nds.cpp src/engine/platform/bifurcator.cpp src/engine/platform/sid2.cpp +src/engine/platform/sid3.cpp src/engine/platform/pcmdac.cpp src/engine/platform/dummy.cpp diff --git a/TODO.md b/TODO.md index 37f473d9e..d08d0ea17 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,7 @@ +# to-do for 0.6.8 + +- OPL3 mute fix + # to-do long term - CSM macros diff --git a/demos/genesis/yky.fur b/demos/genesis/yky.fur index cb8732a6b..0074ed545 100644 Binary files a/demos/genesis/yky.fur and b/demos/genesis/yky.fur differ diff --git a/demos/opl/Time_Is_Lost_OPL4.fur b/demos/opl/Time_Is_Lost_OPL4.fur new file mode 100644 index 000000000..b157ac485 Binary files /dev/null and b/demos/opl/Time_Is_Lost_OPL4.fur differ diff --git a/doc/3-pattern/effects.md b/doc/3-pattern/effects.md index 98c2cd77f..4edcbbc0d 100644 --- a/doc/3-pattern/effects.md +++ b/doc/3-pattern/effects.md @@ -197,22 +197,22 @@ additionally, [each chip has its own effects](../7-systems/README.md). the interpretation of duty, wave and extra macros depends on chip/instrument type: -ex | FM | OPM | OPZ | OPLL | AY-3-8910 | AY8930 | Lynx | C64 | ----|--------|-----------|-----------|-------|------------|------------|----------|------------| - D | NoiseF | NoiseFreq | | | NoiseFreq | NoiseFreq | Duty/Int | Duty | - W | | LFO Shape | LFO Shape | Patch | Waveform | Waveform | | Waveform | - 1 | | AMD | AMD | | | Duty | | FilterMode | - 2 | | PMD | PMD | | Envelope | Envelope | | Resonance | - 3 | LFOSpd | LFO Speed | LFO Speed | | AutoEnvNum | AutoEnvNum | | | - A | ALG | ALG | ALG | | AutoEnvDen | AutoEnvDen | | Cutoff | - B | FB | FB | FB | | | Noise AND | | | - C | FMS | FMS | FMS | | | Noise OR | | | - D | AMS | AMS | AMS | | | | | | - 4 | OpMask | OpMask | | | | | | Special | - 5 | | | AMD2 | | | | | Attack | - 6 | | | PMD2 | | | | | Decay | - 7 | | | LFO2Speed | | | | | Sustain | - 8 | | | LFO2Shape | | | | | Release | +ex | FM | OPM | OPZ | OPLL | AY-3-8910 | AY8930 | Lynx | C64 | +---|--------|-----------|-----------|-------|------------|------------|----------|---------------| + D | NoiseF | NoiseFreq | | | NoiseFreq | NoiseFreq | Duty/Int | Duty | + W | | LFO Shape | LFO Shape | Patch | Waveform | Waveform | | Waveform | + 1 | | AMD | AMD | | | Duty | | FilterMode | + 2 | | PMD | PMD | | Envelope | Envelope | | Resonance | + 3 | LFOSpd | LFO Speed | LFO Speed | | AutoEnvNum | AutoEnvNum | | Filter Toggle | + A | ALG | ALG | ALG | | AutoEnvDen | AutoEnvDen | | Cutoff | + B | FB | FB | FB | | | Noise AND | | | + C | FMS | FMS | FMS | | | Noise OR | | | + D | AMS | AMS | AMS | | | | | | + 4 | OpMask | OpMask | | | | | | Special | + 5 | | | AMD2 | | | | | Attack | + 6 | | | PMD2 | | | | | Decay | + 7 | | | LFO2Speed | | | | | Sustain | + 8 | | | LFO2Shape | | | | | Release | ex | SAA1099 | X1-010 | Namco 163 | FDS | Sound Unit | ES5506 | MSM6258 | ---|----------|------------|------------|-----------|------------|-----------|----------| @@ -231,19 +231,61 @@ ex | SAA1099 | X1-010 | Namco 163 | FDS | Sound Unit | ES5506 | M 7 | | | | | | EnvRampK2 | | 8 | | | | | | Env Mode | | -ex | QSound | SNES | MSM5232 | ----|--------------|-----------|-----------| - D | Echo Level | NoiseFreq | GroupCtrl | - W | | Waveform | | - 1 | EchoFeedback | Special | GroupAtk | - 2 | Echo Length | Gain | GroupDec | - 3 | | | Noise | - A | | | | - B | | | | - C | | | | - D | | | | - 4 | | | | - 5 | | | | - 6 | | | | - 7 | | | | - 8 | | | | +ex | QSound | SNES | MSM5232 | SID2 | +---|--------------|-----------|-----------|---------------| + D | Echo Level | NoiseFreq | GroupCtrl | Duty | + W | | Waveform | | Waveform | + 1 | EchoFeedback | Special | GroupAtk | Filter mode | + 2 | Echo Length | Gain | GroupDec | Resonance | + 3 | | | Noise | Filter toggle | + A | | | | Filter cutoff | + B | | | | | + C | | | | Noise mode | + D | | | | Wave mix mode | + 4 | | | | Special | + 5 | | | | Attack | + 6 | | | | Decay | + 7 | | | | Sustain | + 8 | | | | Release | + + +SID3 instrument also uses some of the FM operators macros in main macros list: + +ex | SID3 | +------|-------------------------------| + D | Duty | + W | Waveform | + 1 | Special | + 2 | Attack | + 3 | Decay | + A | Special wave | + B | Phase Mod source | + C | Ring Mod source | + D | Hard sync source | + 4 | Sustain | + 5 | Sustain rate | + 6 | Release | + 7 | LFSR feedback bits | + 8 | Wave mix mode | +OP1 AM| Key On/Off | +OP2 AM| Noise phase reset | +OP3 AM| Envelope reset | +OP4 AM| Noise Arpeggio | +OP1 AR| Noise Pitch | +OP2 AR| 1-bit noise/PCM mode | +OP3 AR| Channel signal inversion | +OP4 AR| Feedback | + +SID3 instrument uses FM operators macros for filters: + +ex | SID3 | +-----|-------------------------------| +D2R | Cutoff | +DAM | Resonance | +DR | Filter toggle | +DT2 | Distortion level | +DT | Output volume | +DVB | Connect to channel input | +EGT | Connect to channel output | +KSL | Connection matrix row | +KSR | Filter mode | diff --git a/doc/4-instrument/README.md b/doc/4-instrument/README.md index 49314e831..8d585d79e 100644 --- a/doc/4-instrument/README.md +++ b/doc/4-instrument/README.md @@ -67,6 +67,7 @@ the following instrument types are available: - [SegaPCM](segapcm.md) - for use with SegaPCM sample chip. - [Seta/Allumer X1-010](x1_010.md) - for use with Wavetable portion in Seta/Allumer X1-010. - [SID2](sid2.md) - for use with SID2 fantasy chip. +- [SID3](sid3.md) - for use with SID3 fantasy chip. - [SM8521](sm8521.md) - for use with SM8521 chip, used in Tiger Game.com. - [SN76489/Sega PSG](psg.md) - for use with TI SN76489 and derivatives like Sega Master System's PSG. - [SNES](snes.md) - for use with SNES. diff --git a/doc/4-instrument/c64.md b/doc/4-instrument/c64.md index 8442560bf..e87f2842c 100644 --- a/doc/4-instrument/c64.md +++ b/doc/4-instrument/c64.md @@ -13,6 +13,8 @@ the C64 instrument editor consists of two tabs: "C64" to control various paramet - **Sustain**: sets the volume level at which the sound stops decaying and holds steady (0 to 15). - **Release**: determines the rate at which the sound fades out after note off. the higher the value, the longer the release (0 to 15). - **Duty**: specifies the width of a pulse wave (0 to 4095). +- **Reset duty on new note**: overwrite current duty value with the one that is specified in the instrument on new note. + - only useful when using relative duty macro. - **Ring Modulation**: when enabled, the channel's output will be multiplied with the previous channel's. - **Oscillator Sync**: enables oscillator hard sync. as the previous channel's oscillator finishes a cycle, it resets the period of the channel's oscillator, forcing the latter to have the same base frequency. this can produce a harmonically rich sound, the timbre of which can be altered by varying the synchronized oscillator's frequency. diff --git a/doc/4-instrument/sid2.md b/doc/4-instrument/sid2.md index 33f67a1b2..cd8901ed4 100644 --- a/doc/4-instrument/sid2.md +++ b/doc/4-instrument/sid2.md @@ -14,6 +14,8 @@ the SID2 instrument editor consists of two tabs: "SID2" to control various param - **Sustain**: sets the volume level at which the sound stops decaying and holds steady (0 to 15). - **Release**: determines the rate at which the sound fades out after note off. the higher the value, the longer the release (0 to 15). - **Duty**: specifies the width of a pulse wave (0 to 4095). +- **Reset duty on new note**: overwrite current duty value with the one that is specified in the instrument on new note. + - only useful when using relative duty macro. - **Ring Modulation**: when enabled, the channel's output will be multiplied with the previous channel's. - **Oscillator Sync**: enables oscillator hard sync. as the previous channel's oscillator finishes a cycle, it resets the period of the channel's oscillator, forcing the latter to have the same base frequency. this can produce a harmonically rich sound, the timbre of which can be altered by varying the synchronized oscillator's frequency. diff --git a/doc/4-instrument/sid3.md b/doc/4-instrument/sid3.md new file mode 100644 index 000000000..a414177fb --- /dev/null +++ b/doc/4-instrument/sid3.md @@ -0,0 +1,142 @@ +# SID3 instrument editor + +the SID3 editor is divided into 8 tabs: + +- **SID3**: for controlling the basic parameters of SID3 sound source. +- **Wavetable**: for controlling the wavetable synth. +- **Sample**: for various sample settings. +- **Macros (Filter 1)**: for macros controlling parameters of filter 1. +- **Macros (Filter 2)**: for macros controlling parameters of filter 2. +- **Macros (Filter 3)**: for macros controlling parameters of filter 3. +- **Macros (Filter 4)**: for macros controlling parameters of filter 4. +- **Macros**: for other macros. + +## Wavetable + +this allows you to enable and configure the Furnace wavetable synthesizer. see [this page](wavesynth.md) for more information. + +## Sample + +for sample settings, see [the Sample instrument editor](sample.md). + +the only differences are the lack of an "Use wavetable" option, and the presence of a "Use sample" one. + +## SID3 + +- **Waveform**: allows selecting a waveform. + - more than one waveform can be selected at once. in that case a logical AND mix of waves will occur... + - although with default mix mode it does occur a bit wrong (like on 8580 SID chip). see below what happens when other modes are in use. +- **Special wave**: allows selecting a special wave. the wave preview is to the right. +- **Wavetable channel**: replaces and hides some macros and UI elements, and makes instrument operate with last wavetable/sample channel: + - **Waveform** macro now selects a wavetable + - **Duty**, **Special Wave**, **Feedback**, **Noise Phase Reset**, **Noise LFSR bits** and **Wave Mix** macros are hidden + - **1-Bit Noise** macro now controls wavetable/PCM mode (it becomes **Sample Mode** macro) +- **Inv. left** and **Inv. right**: invert the signal of corresponding stereo channels. +- **Attack**: determines the rising time for the sound. the bigger the value, the slower the attack. (0 to 255). +- **Decay**: determines the diminishing time for the sound. the higher the value, the longer the decay (0 to 255). +- **Sustain**: sets the volume level at which the sound stops decaying and holds or also decays, but with different speed (0 to 255). +- **Sustain rate**: sets the speed at which the sound decays after reaching sustain volume level. (0 to 255). +- **Release**: determines the rate at which the sound fades out after note off. the higher the value, the longer the release (0 to 255). +- **Wave Mix Mode**: dictates how different waves on the same channel are mixed together. +- **Duty**: specifies the width of a pulse wave (0 to 65535). +- **Feedback**: specifies the feedback level (0 to 255). +- **Reset duty on new note**: overwrite current duty value with the one that is specified in the instrument on new note. + - only useful when using relative duty macro. +- **Absolute Duty Macro**: when enabled, the duty macro will go from 0 to 65535 (in other words, control the duty directly rather than being relative). +- **Ring Modulation**: when enabled, the channel's output will be multiplied with the source channel's. +- **Oscillator Sync**: enables oscillator hard sync. as the source channel's oscillator finishes a cycle, it resets the period of the channel's oscillator, forcing the latter to have the same base frequency. this can produce a harmonically rich sound, the timbre of which can be altered by varying the synchronized oscillator's frequency. +- **Phase Modulation**: when enabled, the channel's phase will be modified with the source channel's signal (signal is taken from filtered channel's output if filters are enabled). +- **Separate noise pitch**: when enabled, the noise frequency/pitch will be controllable via special macros: **Noise Arpeggio** and **Noise Pitch**. + +Then follow controls for each of the 4 filters: + +- **Enable filter**: when enabled, this instrument will go through the filter. +- **Initialize filter**: initializes the filter with the specified parameters: + - **Cutoff**: the filter's point in where frequencies are cut off (0 to 65535). + - **Resonance**: amplifies or focuses on the cutoff frequency, creating a secondary peak forms and colors the original pitch (0 to 255). + - **Filter mode**: sets the filter mode. you may pick one or more of the following: + - **low**: a low-pass filter. the lower the cutoff, the darker the sound. + - **high**: a high-pass filter. higher cutoff values result in a less "bassy" sound. + - **band**: a band-pass filter. cutoff determines which part of the sound is heard (from bass to treble). + - multiple filter modes can be selected simultaneously. for example, selecting both "low" and "high" results in a bandstop (notch) filter. + - **Output volume**: sets the filter output volume (0 to 255). + - **Distortion level**: dictates how hard the signal is distorted (soft clipping). distortion is slightly asymmetrical (0 to 255). +- **Absolute Cutoff Macro**: when enabled, the cutoff macro will go from 0 to 65535, and it will be absolute. +- **Change cutoff with pitch**: when enabled, the cutoff will be scaled according to the frequency offset from specified note. + - **Decrease cutoff when pitch increases**: if this is enabled, filter cutoff will decrease if you increase the pitch. if this is disabled, filter cutoff will increase if you increase the pitch. + - **Cutoff change center note**: this note marks the center frequency at which no cutoff scaling is happening. the further you go from it in each direction, the more the cutoff scaling will be. + - **Cutoff change strength**: how much cutoff will be scaled. +- **Change resonance with pitch**: when enabled, the resonance will be scaled according to the frequency offset from specified note. + - **Decrease resonance when pitch increases**: if this is enabled, filter resonance will decrease if you increase the pitch. if this is disabled, filter resonance will increase if you increase the pitch. + - **Resonance change center note**: this note marks the center frequency at which no resonance scaling is happening. the further you go from it in each direction, the more the resonance scaling will be. + - **Resonance change strength**: how much resonance will be scaled. +- **Filters connection matrix**: controls routing of the filters' signals. + - **In**: this column connects the filters to ADSR sound output. + - next 4 columns make up the inter-filters connection matrix. + - **Out**: this column connects the filters' output to final channel output. + + +### special noise LFSR configurations + +this table contains a list of LFSR configurations that are automatically detected and brought to tune by Furnace. a short description is given. number needs to be pasted into **Noise LFSR bits** macro. it is recommended to place a single bar in **Noise Phase Reset** macro for the consistency of the wave. + +| LFSR config | Description | +|--------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------:| +| 524288 | wave very close to [SID2](sid2.md) noise mode 1 wave. tonal, without very harsh overtones. | +| 541065280 | wave resembling vocals, has two main tones at least 2 octaves apart | +| 2068 | wave very close to SID2 noise mode 3 wave. tonal but with harsh timbre. | +| 66 | wave very close to SID2 noise mode 2 wave. timbre is somewhere in-between SID2's noise mode 1 and noise mode 3 waves. | + +if you find more interesting waves, please contact LTVA or tildearrow, so they can be added to Furnace frequency correction routine and to this table. + +## Filter `x` macros + +- **Cutoff**: filter `x` cutoff sequence. +- **Resonance**: filter `x` resonance sequence. +- **Filter toggle**: turns filter `x` on and off. +- **Filter mode**: select filter `x` mode. +- **Distortion level**: filter `x` distortion level sequence. +- **Output Volume**: filter `x` output volume sequence. +- **Channel Input Connection**: connect filter `x` to channel ADSR output. +- **Channel Output Connection**: connect filter `x` output to final channel output. +- **Connection Matrix Row**: connect other filters' outputs to filter `x` input. + +## Macros + +- **Volume**: volume sequence. +- **Arpeggio**: pitch sequence. +- **Pitch**: fine pitch. +- **Duty**: pulse width sequence. +- **Waveform**: select the waveform used by instrument. + - in wavetable channel mode controls the wavetable index. +- **Special Wave**: select the special wave used by instrument. +- **Noise Arpeggio**: noise pitch sequence. + - this macro is visible only if **Separate noise pitch** option is enabled. otherwise noise pitch is controlled by **Arpeggio** and **Pitch** macros. +- **Noise Pitch**: fine pitch. + - this macro is visible only if **Separate noise pitch** option is enabled. +- **Panning (left)**: output level for left channel. +- **Panning (right)**: output level for right channel. +- **Channel Inversion**: invert signal of left and right channels. +- **Key On/Off**: envelope release/start again control. +- **Special**: ring, oscillator sync and phase modulation selector. +- **Ring Mod Source**: ring modulation source channel. +- **Hard Sync Source**: oscillator sync source channel. +- **Phase Mod Source**: phase modulation source channel. +- **Feedback**: feedback sequence +- **Phase Reset**: trigger restart of waveform. +- **Noise Phase Reset**: trigger restart of noise accumulator and LFSR. +- **Envelope Reset**: trigger restart of envelope (unlike key on/off, envelope is forced to restart from 0 volume level no matter which volume it is outputting now). +- **Attack**: sets envelope attack speed. + - if you modify attack speed when the envelope is in attack phase it immediately changes. +- **Decay**: sets envelope decay speed. + - if you modify decay speed when envelope is in decay phase it immediately changes. +- **Sustain**: sets envelope sustain level. + - if you modify sustain level when envelope is in sustain phase it immediately changes. +- **Sustain Rate**: sets envelope sustain rate. + - if you modify sustain rate when envelope is in sustain phase it immediately changes. +- **Release**: sets envelope release speed. + - if you modify release speed when envelope is in release phase it immediately changes. +- **Noise LFSR bits**: sets feedback bits of noise LFSR. +- **1-Bit Noise**: controls noise mode. + - in wavetable channel mode it's called **Sample Mode**, and macro controls wave/PCM mode of the last channel. +- **Wave Mix**: select the waveform mix mode. diff --git a/doc/7-systems/README.md b/doc/7-systems/README.md index a77c10588..b89472683 100644 --- a/doc/7-systems/README.md +++ b/doc/7-systems/README.md @@ -102,6 +102,7 @@ this is the full list of chips that Furnace supports. - [SAA1099](saa1099.md) - [SegaPCM](segapcm.md) - [SID2](sid2.md) +- [SID3](sid3.md) - [SM8521](sm8521.md) - [SN76489/Sega PSG](sms.md) - [SNES](snes.md) diff --git a/doc/7-systems/c64.md b/doc/7-systems/c64.md index eb66d4027..06fc55796 100644 --- a/doc/7-systems/c64.md +++ b/doc/7-systems/c64.md @@ -62,6 +62,14 @@ two versions of aforementioned chip exist - 6581 (original chip) and 8580 (impro - `21xy`: **set sustain/release.** - `x` is the sustain. - `y` is the release. +- `22xx`: **pulse width slide up.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `23xx`: **pulse width slide down.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `24xx`: **filter cutoff slide up.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `25xx`: **filter cutoff slide down.** + - `xx` is speed. if it is `00`, the slide is stopped. - `3xxx`: **set duty cycle.** `xxx` range is `000` to `FFF`. - `4xxx`: **set cutoff.** `xxx` range is `000` to `7FF`. diff --git a/doc/7-systems/sid2.md b/doc/7-systems/sid2.md index 0e84200af..6f5a370dd 100644 --- a/doc/7-systems/sid2.md +++ b/doc/7-systems/sid2.md @@ -1,10 +1,10 @@ # SID2 -a fictional chip created by LTVA. the idea is to fix SID flaws and add more features, but not too much. +a fictional chip created by LTVA. the idea is to fix [SID](c64.md) flaws and add more features, but not too much. unlike SID, it has per-channel volume control, better ADSR envelope which doesn't have bugs, more waveform mixing modes and the ability to play tonal noise waves. -filter cutoff and resonance ranges were extended, as well as the frequency - finally the chip can hit B-7 note with default clock speed! +each channel now has its own independent filter. filter cutoff and resonance ranges were extended, as well as the frequency - finally the chip can hit B-7 note with default clock speed! ## effects @@ -46,6 +46,14 @@ filter cutoff and resonance ranges were extended, as well as the frequency - fin - `9`: phase reset (`y` is a discarded parameter and does not matter) - `A`: envelope key on/key off (`y` is `0` (trigger envelope release) or `1` (restart envelope again)) - `B`: filter on/off (`y` is `0` (disable filter) or `1` (enable filter)) +- `17xx`: **pulse width slide up.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `18xx`: **pulse width slide down.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `19xx`: **filter cutoff slide up.** + - `xx` is speed. if it is `00`, the slide is stopped. +- `1Axx`: **filter cutoff slide down.** + - `xx` is speed. if it is `00`, the slide is stopped. - `3xxx`: **set duty cycle.** `xxx` range is `000` to `FFF`. - `4xxx`: **set cutoff.** `xxx` range is `000` to `FFF`. diff --git a/doc/7-systems/sid3.md b/doc/7-systems/sid3.md new file mode 100644 index 000000000..c00671295 --- /dev/null +++ b/doc/7-systems/sid3.md @@ -0,0 +1,123 @@ +# SID3 + +a fictional chip created by LTVA. the idea is to stay vaguely in [SID](c64.md)-like category of chips, but add a lot of features and more channels. + +chip has 6 synth channels and one channel capable of playing wavetable or streamed samples. + +each of synth channels has the following: + +- two phase accumulator based oscillators, one for tone and one for noise LFSR clocking; frequency range is from 0.001Hz to around 15kHz at default clock speed. +- 5 waveform types which can be enabled in any combination: pulse (with 16-bit pulse width control), triangle, sawtooth, noise and so called special wave. + - there are 58 different special waves, including all [OPL3](opl.md) and [OPZ](opz.md) waveforms, their clipped versions, cubed sawtooth and triangle variations, and more... + - noise is generated from 30-bit LFSR. like in C64, eight of the bits are used to form 8-bit noise signal. user can adjust feedback freely, any bit can be feedback bit. some feedback bits configurations produce very short looped noise which is perceived as tone. see SID3 instrument description for notable feedback bits configurations which are automatically detected by Furnace: upon detection noise frequency is adjusted in such a way that fundamental frequency of such tonal noise becomes the note frequency the channel is currently playing (noise stays in tune). + - 1-bit noise mode is available for [AY](ay8910.md) fans. it this mode the highest LFSR bit is read as output. by rapidly switching between usual and 1-bit noise modes one can produce interesting rattling-like percussive sound. +- 5 waveform mixing modes: 8580 SID (C64's combined waves; mode does bitwise AND with noise and special wave), bitwise AND, bitwise OR, bitwise XOR and sum of oscillators' signals. +- hard sync between channels. each channel can have any other channel as sync source, even itself. +- ring modulation between channels. each channel can have any other channel as modulation source, even itself. when you self-modulate, you effectively square the signal, but the behavior is a bit different. +- phase modulation between channels. each channel can have any other channel as modulation source, even itself. when you self-modulate, you have an effect similar to enabling strong feedback. channel output after filters is used as modulation source. +- ADSR envelope with sustain rate setting (how fast sound decays when envelope is in sustain phase). +- 4 independent filters. each filter has its own cutoff, resonance, output volume, mode, on/off and distortion setting. each filter can be connected to channel's ADSR output. each filter's output can be routed to the final channel output. each filter output can be connected to each filter's input (full connection matrix). + - distortion is a simple asymmetrical distortion with hyperbolic tangent function for positive half of the wave and exponential function for negative half. + - several filters can be chained for flexible subtractive synth or to increase filter's slope (which is 12 dB/octave for a single filter). + - multiple filter modes can be selected simultaneously. for example, selecting both "low" and "high" results in a bandstop (notch) filter. +- adjustable feedback. feedback saves two previous channel's outputs and adds them to accumulator on the next step before computing waveform signal. +- fine control over left and right channel panning. +- left and right channels' signals can be inverted to create simple "surround" sound. + +ADSR can be reset to the start of attack phase. phase of tone and noise oscillators can also be reset, and with noise oscillator reset noise LFSR is also reset to initial state. + +wave channel has all these features, except, obviously, waveform generation stage, as well as feedback and noise generator. + +## effects + +- `1xxx`: **set filter 1 cutoff.** `xxx` range is `000` to `FFF`. +- `2xxx`: **set filter 2 cutoff.** `xxx` range is `000` to `FFF`. +- `3xxx`: **set filter 3 cutoff.** `xxx` range is `000` to `FFF`. +- `4xxx`: **set filter 4 cutoff.** `xxx` range is `000` to `FFF`. +- `5xxx`: **set duty cycle.** `xxx` range is `000` to `FFF`. +- `60xx`: **change wave.** lower 5 bits specify the wave: + - `bit 0`: triangle + - `bit 1`: saw + - `bit 2`: pulse + - `bit 3`: noise + - `bit 4`: special wave +- `61xx`: **change special wave.** `xx` range is `00` to `39`. +- `62xx`: **modulation control.** lower 3 bits control the modulation: + - `bit 0`: ring modulation + - `bit 1`: oscillator sync + - `bit 2`: phase modulation +- `63xy`: **reset duty cycle**: + - if `x` is not 0: on new note + - if `y` is not 0: now +- `64xx`: **set ring modulation source channel.** `xx` range is `00` to `07` where `07` means self-modulation and lower values specify a source channel. +- `65xx`: **set hard sync source channel.** `xx` is `00` to `06`. +- `66xx`: **set phase modulation source channel.** `xx` is `00` to `06`. +- `67xx`: **set attack.** `xx` range is `00` to `FF`. +- `68xx`: **set decay.** `xx` range is `00` to `FF`. +- `69xx`: **set sustain level.** `xx` range is `00` to `FF`. +- `6Axx`: **set sustain rate.** `xx` range is `00` to `FF`. +- `6Bxx`: **set release.** `xx` range is `00` to `FF`. +- `6Cxx`: **set waveform mix mode.** `xx` range is `00` to `04`. +- `6Dxx`: **set noise LFSR feedback bits (lower byte).** `xx` range is `00` to `FF`. +- `6Exx`: **set noise LFSR feedback bits (medium byte).** `xx` range is `00` to `FF`. +- `6Fxx`: **set noise LFSR feedback bits (higher byte).** `xx` range is `00` to `FF`. +- `70xx`: **set noise LFSR feedback bits (highest bits).** `xx` range is `00` to `3F`. +- `71xx`: **set filter 1 resonance.** `xx` range is `00` to `FF`. +- `72xx`: **set filter 2 resonance.** `xx` range is `00` to `FF`. +- `73xx`: **set filter 3 resonance.** `xx` range is `00` to `FF`. +- `74xx`: **set filter 4 resonance.** `xx` range is `00` to `FF`. +- `75xx`: **set noise/wave channel mode.** `xx` range is `00` to `01`. on synth channels `00` sets usual noise mode and `01` sets 1-bit noise mode. on wave channel `00` sets wavetable mode and `01` sets streamed PCM sample playback mode. +- `76xx`: **set filter 1 output volume.** `xx` range is `00` to `FF`. +- `77xx`: **set filter 2 output volume.** `xx` range is `00` to `FF`. +- `78xx`: **set filter 3 output volume.** `xx` range is `00` to `FF`. +- `79xx`: **set filter 4 output volume.** `xx` range is `00` to `FF`. +- `7Axx`: **set filter 1 distortion.** `xx` range is `00` to `FF`. +- `7Bxx`: **set filter 2 distortion.** `xx` range is `00` to `FF`. +- `7Cxx`: **set filter 3 distortion.** `xx` range is `00` to `FF`. +- `7Dxx`: **set filter 4 distortion.** `xx` range is `00` to `FF`. +- `7Exx`: **set feedback.** `xx` range is `00` to `FF`. +- `7Fxx`: **channel inversion control.** lower 2 bits control the channel signal inversion: + - `bit 0`: invert right channel + - `bit 1`: invert left channel +- `A0xy`: **set filter mode.** `x` is the filter (`0-3`), and lower 3 bits of `y` control the mode: + - `bit 0`: low pass + - `bit 1`: band pass + - `bit 2`: high pass +- `A1xy`: **set filter connection.** `x` is the filter (`0-3`), and lower 2 bits of `y` control the connection: + - `bit 0`: connect filter input to channel's ADSR output + - `bit 1`: connect filter's output to final channel output +- `A2xy`: **set filter connection matrix row.** `x` is the filter (`0-3`), and lower 4 bits of `y` control the inter-filter connections: + - `bit 0`: connect filter input to filter 1 output + - `bit 1`: connect filter input to filter 2 output + - `bit 2`: connect filter input to filter 3 output + - `bit 3`: connect filter input to filter 4 output +- `A3xy`: **enable filter.** `x` is the filter (`0-3`), `y` is either `0` (filter disabled) or `1` (filter enabled). +- `A4xx`: **pulse width slide up.** `xx` is speed. `A400` stops the slide. +- `A5xx`: **pulse width slide down.** `xx` is speed. `A500` stops the slide. +- `A6xx`: **filter 1 cutoff slide up.** `xx` is speed. `A600` stops the slide. +- `A7xx`: **filter 1 cutoff slide down.** `xx` is speed. `A700` stops the slide. +- `A8xx`: **filter 2 cutoff slide up.** `xx` is speed. `A800` stops the slide. +- `A9xx`: **filter 2 cutoff slide down.** `xx` is speed. `A900` stops the slide. +- `AAxx`: **filter 3 cutoff slide up.** `xx` is speed. `AA00` stops the slide. +- `ABxx`: **filter 3 cutoff slide down.** `xx` is speed. `AB00` stops the slide. +- `ACxx`: **filter 4 cutoff slide up.** `xx` is speed. `AC00` stops the slide. +- `ADxx`: **filter 4 cutoff slide down.** `xx` is speed. `AD00` stops the slide. +- `AExx`: **tone phase reset.** `xx` is the tick on which the phase reset happens. +- `AFxx`: **noise phase reset.** `xx` is the tick on which the phase reset happens. +- `B0xx`: **envelope reset.** `xx` is the tick on which the envelope reset happens. +- `B1xy`: **filter cutoff scaling control.** `x` is the filter (`0-3`), and lower 2 bits of `y` control the scaling: + - `bit 0`: enable cutoff scaling + - `bit 1`: inverse cutoff scaling +- `B2xy`: **filter resonance scaling control.** `x` is the filter (`0-3`), and lower 2 bits of `y` control the scaling: + - `bit 0`: enable resonance scaling + - `bit 1`: inverse resonance scaling + +## info + +this chip uses the [SID3](../4-instrument/sid3.md) instrument editor. + +## chip config + +the following options are available in the Chip Manager window: + +- **Quarter clock speed**: make chip run on quarter the default clock rate (1MHz is default). this lowers CPU load almost 4 times at the cost of filters becoming unstable or having different timbre at high cutoff and resonance settings. option affects the chip only in playback mode. when you render module into audio file, option is not applied. diff --git a/doc/9-guides/emulation-cores.md b/doc/9-guides/emulation-cores.md index 52473adcc..b636927eb 100644 --- a/doc/9-guides/emulation-cores.md +++ b/doc/9-guides/emulation-cores.md @@ -3,13 +3,13 @@ Furnace achieves the authentic sound of videogame hardware by emulating sound chips as accurately as possible, using **emulator cores**. in some cases there are multiple cores to choose from, each with different strengths and weaknesses. here are the major differences between them all. - **YM2151 core**: - - **ymfm**: default playback core. much less CPU usage than Nuked-OPM, but less accurate. recommended for users with last-gen or earlier hardware. + - **ymfm**: default playback core. much less CPU usage than Nuked-OPM, but less accurate. recommended for users with mobile, last-gen or earlier hardware. - **Nuked-OPM**: default render core. much more accurate than ymfm, due to the emulator being based on an image of the die map taken from a real YM2151. very CPU heavy, only recommended for users with recent hardware. - **YM2612 core**: - - **Nuked-OPN2**: default core. a little lighter on the CPU than Nuked-OPM. + - **Nuked-OPN2**: default core. lighter on the CPU than Nuked-OPM, can be used to simulate any variant of YM2612. - **ymfm**: same as ymfm above. - - **YMF276-LLE**: a new core written by the author of the Nuked cores, specifically focused on YMF276 emulation. it is very slow and not useful for real-time playback. + - **YMF276-LLE**: a new core written by the author of the Nuked cores, specifically focused on YMF276 emulation. it is very slow and not useful for real-time playback. Produces audio comparable to output of Sega Mega Drive model 2 and later Fujitsu FM Towns computers, doesn't emulate DAC distortion of the original YM2612. - **SN76489 core**: - **MAME**: default core. less accurate than Nuked, but with lower CPU usage. comes from the MAME emulator project. @@ -25,7 +25,7 @@ Furnace achieves the authentic sound of videogame hardware by emulating sound ch - **SID core**: - **reSID**: default playback core. a high quality emulation core. somewhat CPU heavy. - - **reSIDfp**: default render core. improved version of reSID. the most accurate choice. _extremely_ CPU heavy. + - **reSIDfp**: default render core. improved version of reSID. the most accurate choice. _very_ CPU heavy. - **dSID**: a lightweight open-source core used in DefleMask. not so accurate but it's very CPU light. - **POKEY core**: @@ -35,20 +35,24 @@ Furnace achieves the authentic sound of videogame hardware by emulating sound ch - **OPN/OPNA/OPNB cores**: - **ymfm only**: lower CPU usage, less accurate FM. - **Nuked-OPN2 (FM) + ymfm (SSG/ADPCM)**: default cores. more accurate FM at the cost of more CPU load. - - **YM2608-LLE**: a new core written by the author of the Nuked cores. high accuracy, but extremely high CPU usage. + - **YM2608-LLE**: a new core written by the author of the Nuked cores. high accuracy, but _extremely_ high CPU usage, far beyond any other emulation core. (over 500% CPU time on 10th gen Intel Core i5!) - **OPL/OPL2/Y8950 core**: - **Nuked-OPL3**: high quality OPL emulation core. slightly off due to tiny differences between OPL and OPL3, but otherwise it is good. - **ymfm**: this core is supposed to use less CPU than Nuked-OPL3, but for some reason it actually doesn't. - - **YM3812-LLE**: a new core written by the author of the Nuked cores. it features extremely accurate emulation. + - **YM3812-LLE**: a new core written by the author of the Nuked cores. it features _extremely_ accurate emulation. - this core uses a *lot* of CPU time. may not be suitable for playback! - **OPL3 core**: - **Nuked-OPL3**: high quality OPL emulation core. - **ymfm**: this core is supposed to use less CPU than Nuked-OPL3, but for some reason it actually doesn't. - - **YMF262-LLE**: a new core written by the author of the Nuked cores. it features extremely accurate emulation. + - **YMF262-LLE**: a new core written by the author of the Nuked cores. it features _extremely_ accurate emulation. - this core uses even more CPU than YM3812-LLE. not suitable for playback or even rendering if you're impatient! +- **OPL4 core**: + - **Nuked-OPL3 (FM) + openMSX (PCM)**: high quality OPL4 emulation core. + - **ymfm**: this core is supposed to use less CPU than Nuked-OPL3, but for some reason it actually doesn't. + - **ESFM core**: - **ESFMu**: the ESFM emulator. best choice but CPU intensive. - **ESFMu (fast)**: this is a modification of ESFMu to reduce CPU usage at the cost of less accuracy. diff --git a/papers/format.md b/papers/format.md index 5acb926c6..a36016c8b 100644 --- a/papers/format.md +++ b/papers/format.md @@ -191,7 +191,7 @@ size | description | - 0x9c: Virtual Boy - 6 channels | - 0x9d: VRC7 - 6 channels | - 0x9e: YM2610B - 16 channels - | - 0x9f: ZX Spectrum (beeper, tildearrow engine) - 6 channels + | - 0x9f: ZX Spectrum (beeper, SFX-like tildearrow engine) - 6 channels | - 0xa0: YM2612 extended - 9 channels | - 0xa1: Konami SCC - 5 channels | - 0xa2: OPL drums (YM3526) - 11 channels @@ -206,8 +206,8 @@ size | description | - 0xab: MSM6258 - 1 channel | - 0xac: Commander X16 (VERA) - 17 channels | - 0xad: Bubble System WSG - 2 channels - | - 0xae: OPL4 (YMF278B) - 42 channels (UNAVAILABLE) - | - 0xaf: OPL4 drums (YMF278B) - 44 channels (UNAVAILABLE) + | - 0xae: OPL4 (YMF278B) - 42 channels + | - 0xaf: OPL4 drums (YMF278B) - 44 channels | - 0xb0: Seta/Allumer X1-010 - 16 channels | - 0xb1: Ensoniq ES5506 - 32 channels | - 0xb2: Yamaha Y8950 - 10 channels @@ -258,8 +258,8 @@ size | description | - 0xe0: QSound - 19 channels | - 0xe1: PS1 - 24 channels (UNAVAILABLE) | - 0xe2: C64 (6581) with PCM - 4 channels (UNAVAILABLE) - | - 0xe3: Watara Supervision - 4 channels (UNAVAILABLE) - | - 0xe4: µPD1771C - 1 channel (UNAVAILABLE) + | - 0xe3: Watara Supervision - 4 channels + | - 0xe4: µPD1771C - 1 channel | - 0xf0: SID2 - 3 channels | - 0xf1: 5E01 - 5 channels | - 0xf5: SID3 - 7 channels @@ -391,7 +391,7 @@ size | description 1 | reset arp effect phase on new note (>=184) 1 | linear volume scaling rounds up (>=188) 1 | legacy "always set volume" behavior (>=191) - 1 | reserved + 1 | legacy sample offset effect (>=200) --- | **speed pattern of first song** (>=139) 1 | length of speed pattern (fail if this is lower than 0 or higher than 16) 16 | speed pattern (this overrides speed 1 and speed 2 settings) @@ -590,6 +590,7 @@ size | description | - 11: 8-bit μ-law PCM | - 12: C219 PCM | - 13: IMA ADPCM + | - 14: 12-bit PCM (MultiPCM) | - 16: 16-bit PCM 1 | loop direction (>=123) or reserved | - 0: forward diff --git a/papers/newIns.md b/papers/newIns.md index 7ca9c349e..d983a3d2e 100644 --- a/papers/newIns.md +++ b/papers/newIns.md @@ -158,9 +158,10 @@ the following feature codes are recognized: - `EF`: ESFM ins data - `PN`: PowerNoise ins data - `S2`: SID2 ins data +- `S3`: SID3 ins data - `EN`: end of features - if you find this feature code, stop reading the instrument. - - it will usually appear only when there sample/wave lists. + - it will usually appear only when there are sample/wave lists. - instruments in a .fur shall end with this feature code. # instrument name (NA) @@ -335,6 +336,8 @@ size | description | - bit 12-15: resonance | - bit 0-10: cutoff (0-11 on SID2) 1 | upper nibble of resonance (for SID2) (>=199) + | - bits 0-3 hold this upper nibble + | - bit 4: reset duty on new note (>=222) ``` ## C64 compatibility note (>=187) @@ -582,6 +585,11 @@ size | description 1 | LFO rate 1 | vibrato depth 1 | AM depth + 1 | flags (>=221) + | - bit 0: damp + | - bit 1: pseudo-reverb + | - bit 2: LFO reset + | - bit 3: level direct ``` # Sound Unit data (SU) @@ -686,3 +694,78 @@ size | description | - bit 4-5: wave mix mode | - bit 0-3: volume ``` + +# SID3 data (S3) + +``` +size | description +-----|------------------------------------ + 1 | flags 1 + | - bit 7: dutyIsAbs + | - bit 3: noise on + | - bit 2: pulse on + | - bit 1: saw on + | - bit 0: triangle on + 1 | attack + 1 | decay + 1 | sustain + 1 | sustain rate + 1 | release + 1 | wave mix mode + 2 | duty + 1 | flags 2 + | - bit 7: phase modulation + | - bit 6: enable special wave + | - bit 5: 1-bit noise + | - bit 4: separate noise pitch + | - bit 3: do wavetable + | - bit 2: reset duty on new note + | - bit 1: osc sync + | - bit 0: ring mod + 1 | phase modulation source channel + 1 | ring modulation source channel + 1 | hard sync source channel + 1 | special wave + 1 | flags 3 + | - bit 1: left channel signal inversion + | - bit 0: right channel signal inversion + 1 | feedback + 1 | number of filters +``` + +then, `number of filters` times, come settings for each filter: + +``` +size | description +-----|------------------------------------ + 1 | parameters + | - bit 7: enable filter + | - bit 6: initialize filter + | - bit 5: absolute cutoff macro + | - bit 4: enable cutoff scaling + | - bit 3: decrease cutoff when pitch increases (for cutoff scaling) + | - bit 2: scale cutoff only once, on new note + | - bit 1: enable resonance scaling + | - bit 0: decrease resonance when pitch increases (for resonance scaling) + 1 | parameters + | - bit 7: scale resonance only once, on new note + 2 | filter cutoff + 1 | filter resonance + 1 | filter output volume + 1 | filter distortion level + 1 | filter mode: + | - bit 5: connect filter output to channel master output + | - bit 4: connect filter input to channel ADSR output + | - bit 2: band pass + | - bit 1: high pass + | - bit 0: low pass + 1 | matrix connection: + | - bit 3: connect output of filter 4 to input + | - bit 2: connect output of filter 3 to input + | - bit 1: connect output of filter 2 to input + | - bit 0: connect output of filter 1 to input + 1 | cutoff scaling level + 1 | cutoff scaling center note: `0` is `c_5`, `1` is `c+5`, ..., `179` is `B-9` + 1 | resonance scaling level + 1 | resonance scaling center note: `0` is `c_5`, `1` is `c+5`, ..., `179` is `B-9` +``` diff --git a/res/icons.sfd b/res/icons.sfd index d8f194a85..5d3c5e292 100644 --- a/res/icons.sfd +++ b/res/icons.sfd @@ -21,7 +21,7 @@ OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 0 CreationTime: 1691897631 -ModificationTime: 1714372595 +ModificationTime: 1726291788 PfmFamily: 81 TTFWeight: 400 TTFWidth: 5 @@ -53,7 +53,7 @@ FitToEm: 0 WinInfo: 57540 21 12 BeginPrivate: 0 EndPrivate -BeginChars: 65536 104 +BeginChars: 65536 107 StartChar: space Encoding: 32 32 0 @@ -7381,7 +7381,7 @@ EndChar StartChar: uniE161 Encoding: 57697 57697 103 Width: 1792 -Flags: HWO +Flags: HW LayerCount: 2 Fore SplineSet @@ -7483,5 +7483,239 @@ SplineSet 1289.22949219 805.58984375 1332.14550781 805.58984375 1375.0625 805.58984375 c 1 EndSplineSet EndChar + +StartChar: uniE162 +Encoding: 57698 57698 104 +Width: 1792 +Flags: HW +LayerCount: 2 +Fore +SplineSet +509.96484375 84.8447265625 m 0 + 439.5546875 84.8447265625 379.7890625 97.6376953125 330.5703125 123.223632812 c 128 + 281.3515625 148.809570312 239.1640625 183.184570312 204.0078125 226.446289062 c 1 + 235.192382812 255.645507812 266.377929688 284.844726562 297.5625 314.043945312 c 1 + 327.15234375 278.008789062 359.76953125 250.762695312 395.31640625 232.403320312 c 128 + 430.9609375 214.043945312 471.5859375 204.766601562 517.19140625 204.766601562 c 0 + 570.8046875 204.766601562 611.13671875 216.778320312 638.3828125 240.801757812 c 128 + 665.53125 264.825195312 679.203125 297.247070312 679.203125 337.969726562 c 0 + 679.203125 370.782226562 669.53515625 396.758789062 650.39453125 415.997070312 c 128 + 631.15625 435.235351562 597.171875 449.590820312 548.34375 459.161132812 c 1 + 523.5390625 463.587890625 498.734375 468.014648438 473.9296875 472.442382812 c 1 + 392.38671875 487.579101562 331.15625 514.434570312 290.3359375 552.813476562 c 128 + 249.515625 591.192382812 229.203125 644.024414062 229.203125 711.211914062 c 0 + 229.203125 748.028320312 236.13671875 781.426757812 250.19921875 811.407226562 c 128 + 264.1640625 841.387695312 283.79296875 866.583007812 308.98828125 886.993164062 c 128 + 334.18359375 907.403320312 364.75 923.223632812 400.78515625 934.356445312 c 128 + 436.72265625 945.586914062 477.15234375 951.153320312 521.9765625 951.153320312 c 0 + 585.16015625 951.153320312 639.9453125 940.215820312 686.33203125 918.243164062 c 128 + 732.71875 896.172851562 772.3671875 864.434570312 805.1796875 822.833007812 c 1 + 773.571289062 794.837890625 741.963867188 766.842773438 710.35546875 738.848632812 c 1 + 688.7734375 766.778320312 662.40625 789.239257812 631.15625 806.036132812 c 128 + 600.00390625 822.833007812 561.13671875 831.231445312 514.75 831.231445312 c 0 + 466.80078125 831.231445312 429.59375 821.563476562 403.12890625 802.422851562 c 128 + 376.76171875 783.184570312 363.578125 755.157226562 363.578125 718.438476562 c 0 + 363.578125 683.184570312 374.3203125 657.012695312 396 639.825195312 c 128 + 417.58203125 622.637695312 451.17578125 609.551757812 496.78125 600.762695312 c 1 + 521.5859375 595.586914062 546.390625 590.411132812 571.1953125 585.235351562 c 1 + 655.1796875 569.219726562 716.60546875 541.973632812 755.375 503.594726562 c 128 + 794.14453125 465.215820312 813.578125 412.383789062 813.578125 345.196289062 c 0 + 813.578125 306.036132812 806.7421875 270.391601562 793.16796875 238.360351562 c 128 + 779.59375 206.426757812 759.76953125 178.985351562 733.79296875 156.231445312 c 128 + 707.71875 133.379882812 675.98046875 115.801757812 638.3828125 103.399414062 c 128 + 600.78515625 90.9970703125 557.9140625 84.8447265625 509.96484375 84.8447265625 c 0 +1152.34765625 99.2001953125 m 1 + 1060.74609375 378.399414062 969.14453125 657.598632812 877.54296875 936.797851562 c 1 + 924.352539062 936.797851562 971.163085938 936.797851562 1017.97265625 936.797851562 c 1 + 1062.37402344 798.809570312 1106.77441406 660.821289062 1151.17578125 522.833007812 c 1 + 1177.96582031 425.631835938 1204.75683594 328.431640625 1231.546875 231.231445312 c 1 + 1233.14160156 231.231445312 1234.73730469 231.231445312 1236.33203125 231.231445312 c 1 + 1263.54589844 328.431640625 1290.75878906 425.631835938 1317.97265625 522.833007812 c 1 + 1362.37402344 660.821289062 1406.77441406 798.809570312 1451.17578125 936.797851562 c 1 + 1496.78125 936.797851562 1542.38671875 936.797851562 1587.9921875 936.797851562 c 1 + 1495.18652344 657.598632812 1402.37988281 378.399414062 1309.57421875 99.2001953125 c 1 + 1257.16503906 99.2001953125 1204.75683594 99.2001953125 1152.34765625 99.2001953125 c 1 +EndSplineSet +EndChar + +StartChar: uniE163 +Encoding: 57699 57699 105 +Width: 1792 +Flags: HW +LayerCount: 2 +Fore +SplineSet +232.71875 -140.838867188 m 1 + 232.71875 147.181640625 232.71875 435.202148438 232.71875 723.223632812 c 1 + 276.338867188 723.223632812 319.958007812 723.223632812 363.578125 723.223632812 c 1 + 363.578125 596.400390625 363.578125 469.577148438 363.578125 342.754882812 c 1 + 363.578125 245.977539062 403.6171875 197.637695312 483.6953125 197.637695312 c 0 + 500.4921875 197.637695312 516.8984375 199.786132812 532.71875 204.180664062 c 128 + 548.734375 208.575195312 562.9921875 215.215820312 575.4921875 224.004882812 c 128 + 587.796875 232.793945312 597.7578125 244.024414062 605.375 257.598632812 c 128 + 612.9921875 271.172851562 616.8984375 287.188476562 616.8984375 305.645507812 c 1 + 616.8984375 444.837890625 616.8984375 584.030273438 616.8984375 723.223632812 c 1 + 660.453125 723.223632812 704.0078125 723.223632812 747.5625 723.223632812 c 1 + 747.5625 515.215820312 747.5625 307.208007812 747.5625 99.2001953125 c 1 + 704.0078125 99.2001953125 660.453125 99.2001953125 616.8984375 99.2001953125 c 1 + 616.8984375 133.607421875 616.8984375 168.014648438 616.8984375 202.422851562 c 1 + 615.270507812 202.422851562 613.643554688 202.422851562 612.015625 202.422851562 c 1 + 606.3515625 187.188476562 599.125 172.442382812 590.3359375 157.989257812 c 128 + 581.546875 143.633789062 570.8046875 131.036132812 558.109375 120.196289062 c 128 + 545.21875 109.356445312 530.1796875 100.762695312 512.9921875 94.4150390625 c 128 + 495.8046875 87.9697265625 476.46875 84.8447265625 454.7890625 84.8447265625 c 0 + 402.8359375 84.8447265625 367.6796875 103.985351562 349.125 142.364257812 c 1 + 347.5625 142.364257812 346 142.364257812 344.4375 142.364257812 c 1 + 350.817382812 99.5908203125 357.198242188 56.8173828125 363.578125 14.0439453125 c 1 + 363.578125 -37.583984375 363.578125 -89.2119140625 363.578125 -140.838867188 c 1 + 319.958007812 -140.838867188 276.338867188 -140.838867188 232.71875 -140.838867188 c 1 +1256.7421875 84.8447265625 m 0 + 1147.171875 84.8447265625 1061.234375 121.758789062 998.734375 195.782226562 c 128 + 936.4296875 269.805664062 905.1796875 377.227539062 905.1796875 518.047851562 c 0 + 905.1796875 588.360351562 913.1875 650.372070312 929.203125 703.985351562 c 128 + 945.21875 757.598632812 968.4609375 802.813476562 998.734375 839.629882812 c 128 + 1029.203125 876.446289062 1066.1171875 904.180664062 1109.8671875 923.028320312 c 128 + 1153.421875 941.778320312 1202.4453125 951.153320312 1256.7421875 951.153320312 c 0 + 1329.59375 951.153320312 1390.53125 935.235351562 1439.75 903.204101562 c 128 + 1488.96875 871.172851562 1527.640625 824.004882812 1555.5703125 761.602539062 c 1 + 1517.61425781 740.801757812 1479.65917969 720.000976562 1441.703125 699.200195312 c 1 + 1427.25 739.239257812 1404.984375 770.977539062 1375.1015625 794.610351562 c 128 + 1345.0234375 818.243164062 1305.5703125 829.961914062 1256.7421875 829.961914062 c 0 + 1192.09375 829.961914062 1141.1171875 807.989257812 1104.3984375 764.043945312 c 128 + 1067.6796875 720.000976562 1049.125 659.161132812 1049.125 581.622070312 c 1 + 1049.125 539.206054688 1049.125 496.791015625 1049.125 454.375976562 c 1 + 1049.125 376.836914062 1067.6796875 315.997070312 1104.3984375 271.954101562 c 128 + 1141.1171875 228.008789062 1192.09375 206.036132812 1256.7421875 206.036132812 c 0 + 1307.1328125 206.036132812 1348.1484375 219.024414062 1379.7890625 245.000976562 c 128 + 1411.4296875 270.977539062 1434.8671875 304.375976562 1450.1015625 345.196289062 c 1 + 1486.49511719 323.190429688 1522.88769531 301.185546875 1559.28125 279.180664062 c 1 + 1531.15625 218.438476562 1492.09375 170.782226562 1441.703125 136.407226562 c 128 + 1391.1171875 102.032226562 1329.59375 84.8447265625 1256.7421875 84.8447265625 c 0 +EndSplineSet +EndChar + +StartChar: uniE164 +Encoding: 57700 57700 106 +Width: 1792 +Flags: HW +LayerCount: 2 +Fore +SplineSet +876.9375 252.015625 m 1 + 918.578125 252.015625 949.28125 260.84375 969.125 278.421875 c 128 + 988.96875 296.078125 998.890625 318.578125 998.890625 346.15625 c 1 + 998.890625 348.395507812 998.890625 350.635742188 998.890625 352.875 c 1 + 998.890625 383.578125 989.28125 407.09375 970.0625 423.421875 c 128 + 950.921875 439.75 924.984375 447.875 892.328125 447.875 c 0 + 860.296875 447.875 833.109375 440.6875 810.765625 426.3125 c 128 + 788.34375 411.859375 769.4375 391.859375 754.125 366.3125 c 1 + 730.114257812 387.09375 706.104492188 407.875 682.09375 428.65625 c 1 + 692.328125 443.421875 703.890625 457.484375 716.625 470.921875 c 128 + 729.4375 484.359375 744.515625 496.078125 761.78125 506 c 128 + 779.046875 515.921875 798.578125 523.890625 820.296875 529.984375 c 128 + 842.09375 536.078125 867.015625 539.046875 895.21875 539.046875 c 0 + 926.546875 539.046875 955.6875 535.21875 982.5625 527.5625 c 128 + 1009.4375 519.90625 1032.484375 508.5 1051.703125 493.5 c 128 + 1070.921875 478.421875 1085.921875 460.21875 1096.78125 438.734375 c 128 + 1107.71875 417.328125 1113.109375 393.1875 1113.109375 366.3125 c 0 + 1113.109375 345.140625 1109.75 326 1103.03125 308.65625 c 128 + 1096.3125 291.390625 1087.015625 276.234375 1075.21875 263.109375 c 128 + 1063.34375 249.984375 1049.59375 239.28125 1033.96875 230.921875 c 128 + 1018.265625 222.640625 1001.78125 216.546875 984.515625 212.71875 c 1 + 984.515625 211.104492188 984.515625 209.489257812 984.515625 207.875 c 1 + 1003.65625 204.046875 1021.78125 197.796875 1038.734375 189.203125 c 128 + 1055.6875 180.53125 1070.609375 169.359375 1083.34375 155.53125 c 128 + 1096.15625 141.78125 1106.234375 125.453125 1113.578125 106.625 c 128 + 1121 87.71875 1124.671875 66.15625 1124.671875 41.78125 c 0 + 1124.671875 12.328125 1118.890625 -14.390625 1107.40625 -38.375 c 128 + 1095.84375 -62.359375 1079.671875 -82.984375 1058.890625 -100.25 c 128 + 1038.109375 -117.59375 1012.953125 -130.796875 983.5 -140.09375 c 128 + 954.125 -149.390625 921.46875 -154 885.609375 -154 c 0 + 854.28125 -154 826.703125 -150.640625 803.03125 -143.921875 c 128 + 779.359375 -137.203125 758.421875 -128.296875 740.140625 -117.046875 c 128 + 721.9375 -105.875 705.921875 -93.0625 692.171875 -78.6875 c 128 + 678.421875 -64.3125 666.390625 -49.390625 656.15625 -34 c 1 + 682.71875 -13.21875 709.28125 7.5625 735.84375 28.34375 c 1 + 744.203125 14.90625 752.953125 2.640625 762.25 -8.609375 c 128 + 771.546875 -19.78125 782.09375 -29.390625 793.96875 -37.359375 c 128 + 805.765625 -45.40625 819.203125 -51.65625 834.28125 -56.109375 c 128 + 849.28125 -60.5625 866.390625 -62.828125 885.609375 -62.828125 c 0 + 926.546875 -62.828125 957.953125 -53.0625 979.671875 -33.53125 c 128 + 1001.46875 -14 1012.328125 13.03125 1012.328125 47.5625 c 1 + 1012.328125 49.8017578125 1012.328125 52.0419921875 1012.328125 54.28125 c 1 + 1012.328125 88.8125 1000.84375 115.0625 977.796875 133.03125 c 128 + 954.75 150.921875 922.09375 159.90625 879.828125 159.90625 c 1 + 856.15625 159.90625 832.484375 159.90625 808.8125 159.90625 c 1 + 808.8125 190.609375 808.8125 221.3125 808.8125 252.015625 c 1 + 831.520507812 252.015625 854.229492188 252.015625 876.9375 252.015625 c 1 +378.5 712.015625 m 0 + 322.25 712.015625 274.4375 722.25 235.0625 742.71875 c 128 + 195.6875 763.1875 161.9375 790.6875 133.8125 825.296875 c 1 + 158.760742188 848.65625 183.708007812 872.015625 208.65625 895.375 c 1 + 232.25 866.546875 258.34375 844.75 286.78125 830.0625 c 128 + 315.375 815.375 347.875 807.953125 384.28125 807.953125 c 0 + 427.25 807.953125 459.4375 817.5625 481.3125 836.78125 c 128 + 503.03125 856 513.96875 881.9375 513.96875 914.515625 c 0 + 513.96875 940.765625 506.15625 961.546875 490.84375 976.9375 c 128 + 475.53125 992.328125 448.34375 1003.8125 409.28125 1011.46875 c 1 + 389.4375 1015.01074219 369.59375 1018.55175781 349.75 1022.09375 c 1 + 284.4375 1034.203125 235.53125 1055.6875 202.875 1086.390625 c 128 + 170.21875 1117.09375 153.96875 1159.359375 153.96875 1213.109375 c 0 + 153.96875 1242.5625 159.4375 1269.28125 170.6875 1293.265625 c 128 + 181.9375 1317.25 197.5625 1337.40625 217.71875 1353.734375 c 128 + 237.875 1370.0625 262.40625 1382.71875 291.15625 1391.625 c 128 + 319.90625 1400.609375 352.25 1405.0625 388.1875 1405.0625 c 0 + 438.65625 1405.0625 482.5625 1396.3125 519.59375 1378.734375 c 128 + 556.78125 1361.078125 588.5 1335.6875 614.75 1302.40625 c 1 + 589.4375 1280.01074219 564.125 1257.61425781 538.8125 1235.21875 c 1 + 521.625 1257.5625 500.53125 1275.53125 475.53125 1288.96875 c 128 + 450.53125 1302.40625 419.4375 1309.125 382.40625 1309.125 c 0 + 343.96875 1309.125 314.28125 1301.390625 293.03125 1286.078125 c 128 + 271.9375 1270.6875 261.46875 1248.265625 261.46875 1218.890625 c 0 + 261.46875 1190.6875 270.0625 1169.75 287.40625 1156 c 128 + 304.59375 1142.25 331.46875 1131.78125 368.03125 1124.75 c 1 + 387.875 1120.609375 407.71875 1116.46875 427.5625 1112.328125 c 1 + 494.75 1099.515625 543.8125 1077.71875 574.90625 1047.015625 c 128 + 605.84375 1016.3125 621.46875 974.046875 621.46875 920.296875 c 0 + 621.46875 888.96875 616 860.453125 605.0625 834.828125 c 128 + 594.28125 809.28125 578.34375 787.328125 557.5625 769.125 c 128 + 536.78125 750.84375 511.3125 736.78125 481.3125 726.859375 c 128 + 451.15625 716.9375 416.9375 712.015625 378.5 712.015625 c 0 +709.125 723.5 m 1 + 709.125 752.926757812 709.125 782.354492188 709.125 811.78125 c 1 + 739.489257812 811.78125 769.854492188 811.78125 800.21875 811.78125 c 1 + 800.21875 976.286132812 800.21875 1140.79199219 800.21875 1305.296875 c 1 + 769.854492188 1305.296875 739.489257812 1305.296875 709.125 1305.296875 c 1 + 709.125 1334.72363281 709.125 1364.15136719 709.125 1393.578125 c 1 + 806.416992188 1393.578125 903.708007812 1393.578125 1001 1393.578125 c 1 + 1001 1364.15136719 1001 1334.72363281 1001 1305.296875 c 1 + 970.270507812 1305.296875 939.541992188 1305.296875 908.8125 1305.296875 c 1 + 908.8125 1140.79199219 908.8125 976.286132812 908.8125 811.78125 c 1 + 939.541992188 811.78125 970.270507812 811.78125 1001 811.78125 c 1 + 1001 782.354492188 1001 752.926757812 1001 723.5 c 1 + 903.708007812 723.5 806.416992188 723.5 709.125 723.5 c 1 +1137.875 1393.578125 m 1 + 1216.9375 1393.578125 1296 1393.578125 1375.0625 1393.578125 c 1 + 1417.875 1393.578125 1456.78125 1386.546875 1491.625 1372.484375 c 128 + 1526.46875 1358.34375 1556.3125 1337.40625 1581 1309.59375 c 128 + 1605.53125 1281.703125 1624.59375 1246.859375 1638.03125 1204.90625 c 128 + 1651.46875 1163.03125 1658.1875 1114.203125 1658.1875 1058.578125 c 256 + 1658.1875 1002.875 1651.46875 954.046875 1638.03125 912.171875 c 128 + 1624.59375 870.21875 1605.53125 835.375 1581 807.484375 c 128 + 1556.3125 779.671875 1526.46875 758.734375 1491.625 744.59375 c 128 + 1456.78125 730.53125 1417.875 723.5 1375.0625 723.5 c 1 + 1296 723.5 1216.9375 723.5 1137.875 723.5 c 1 + 1137.875 946.859375 1137.875 1170.21875 1137.875 1393.578125 c 1 +1375.0625 819.515625 m 1 + 1424.90625 819.515625 1465.21875 835.21875 1496 866.546875 c 128 + 1526.625 897.875 1542.09375 943.96875 1542.09375 1004.75 c 1 + 1542.09375 1040.609375 1542.09375 1076.46875 1542.09375 1112.328125 c 1 + 1542.09375 1173.109375 1526.625 1219.203125 1496 1250.53125 c 128 + 1465.21875 1281.9375 1424.90625 1297.5625 1375.0625 1297.5625 c 1 + 1332.14550781 1297.5625 1289.22949219 1297.5625 1246.3125 1297.5625 c 1 + 1246.3125 1138.21386719 1246.3125 978.864257812 1246.3125 819.515625 c 1 + 1289.22949219 819.515625 1332.14550781 819.515625 1375.0625 819.515625 c 1 +EndSplineSet +EndChar EndChars EndSplineFont diff --git a/res/icons.ttf b/res/icons.ttf index feaad8727..75c9a1a6f 100644 Binary files a/res/icons.ttf and b/res/icons.ttf differ diff --git a/res/releaseReadme/stable-linux.txt b/res/releaseReadme/stable-linux.txt index c3e9bf6ca..f6f584355 100644 --- a/res/releaseReadme/stable-linux.txt +++ b/res/releaseReadme/stable-linux.txt @@ -17,6 +17,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - issues: https://github.com/tildearrow/furnace/issues - discussion: https://github.com/tildearrow/furnace/discussions - online manual: https://tildearrow.org/furnace/doc/v0.6.7/ +- Furnace on Discord: https://discord.gg/QhA26dXD23 # notes diff --git a/res/releaseReadme/stable-mac.txt b/res/releaseReadme/stable-mac.txt index 0f98a4ec8..8888ac150 100644 --- a/res/releaseReadme/stable-mac.txt +++ b/res/releaseReadme/stable-mac.txt @@ -27,6 +27,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - issues: https://github.com/tildearrow/furnace/issues - discussion: https://github.com/tildearrow/furnace/discussions - online manual: https://tildearrow.org/furnace/doc/v0.6.7/ +- Furnace on Discord: https://discord.gg/QhA26dXD23 # notes diff --git a/res/releaseReadme/stable-win.txt b/res/releaseReadme/stable-win.txt index 41e8c1508..0f7038d9f 100644 --- a/res/releaseReadme/stable-win.txt +++ b/res/releaseReadme/stable-win.txt @@ -17,6 +17,7 @@ if you find issues (e.g. bugs or annoyances), report them. links below. - issues: https://github.com/tildearrow/furnace/issues - discussion: https://github.com/tildearrow/furnace/discussions - online manual: https://tildearrow.org/furnace/doc/v0.6.7/ +- Furnace on Discord: https://discord.gg/QhA26dXD23 # notes diff --git a/src/engine/cmdStream.cpp b/src/engine/cmdStream.cpp index 40542ef98..f1b267869 100644 --- a/src/engine/cmdStream.cpp +++ b/src/engine/cmdStream.cpp @@ -364,6 +364,7 @@ bool DivCSPlayer::tick() { } if (sendVolume || chan[i].volSpeed!=0) { + int preSpeedVol=chan[i].volume; chan[i].volume+=chan[i].volSpeed; if (chan[i].volSpeedTarget!=-1) { bool atTarget=false; @@ -377,7 +378,11 @@ bool DivCSPlayer::tick() { } if (atTarget) { - chan[i].volume=chan[i].volSpeedTarget; + if (chan[i].volSpeed>0) { + chan[i].volume=MAX(preSpeedVol,chan[i].volSpeedTarget); + } else if (chan[i].volSpeed<0) { + chan[i].volume=MIN(preSpeedVol,chan[i].volSpeedTarget); + } chan[i].volSpeed=0; chan[i].volSpeedTarget=-1; } diff --git a/src/engine/dispatch.h b/src/engine/dispatch.h index f207ae359..273c58957 100644 --- a/src/engine/dispatch.h +++ b/src/engine/dispatch.h @@ -268,6 +268,46 @@ enum DivDispatchCmds { DIV_CMD_FM_OPMASK, // (mask) + DIV_CMD_MULTIPCM_MIX_FM, // (value) + DIV_CMD_MULTIPCM_MIX_PCM, // (value) + DIV_CMD_MULTIPCM_LFO, // (value) + DIV_CMD_MULTIPCM_VIB, // (value) + DIV_CMD_MULTIPCM_AM, // (value) + DIV_CMD_MULTIPCM_AR, // (value) + DIV_CMD_MULTIPCM_D1R, // (value) + DIV_CMD_MULTIPCM_DL, // (value) + DIV_CMD_MULTIPCM_D2R, // (value) + DIV_CMD_MULTIPCM_RC, // (value) + DIV_CMD_MULTIPCM_RR, // (value) + DIV_CMD_MULTIPCM_DAMP, // (value) + DIV_CMD_MULTIPCM_PSEUDO_REVERB, // (value) + DIV_CMD_MULTIPCM_LFO_RESET, // (value) + DIV_CMD_MULTIPCM_LEVEL_DIRECT, // (value) + + DIV_CMD_SID3_SPECIAL_WAVE, + DIV_CMD_SID3_RING_MOD_SRC, + DIV_CMD_SID3_HARD_SYNC_SRC, + DIV_CMD_SID3_PHASE_MOD_SRC, + DIV_CMD_SID3_WAVE_MIX, + DIV_CMD_SID3_LFSR_FEEDBACK_BITS, + DIV_CMD_SID3_1_BIT_NOISE, + DIV_CMD_SID3_FILTER_DISTORTION, + DIV_CMD_SID3_FILTER_OUTPUT_VOLUME, + DIV_CMD_SID3_CHANNEL_INVERSION, + DIV_CMD_SID3_FILTER_CONNECTION, + DIV_CMD_SID3_FILTER_MATRIX, + DIV_CMD_SID3_FILTER_ENABLE, + + DIV_CMD_C64_PW_SLIDE, + DIV_CMD_C64_CUTOFF_SLIDE, + + DIV_CMD_SID3_PHASE_RESET, + DIV_CMD_SID3_NOISE_PHASE_RESET, + DIV_CMD_SID3_ENVELOPE_RESET, + + DIV_CMD_SID3_CUTOFF_SCALING, + DIV_CMD_SID3_RESONANCE_SCALING, + DIV_CMD_MAX }; @@ -585,10 +625,10 @@ class DivDispatch { /** * get "paired" channels. - * @param chan the channel to query. - * @return a DivChannelPair. + * @param ch the channel to query. + * @param ret the DivChannelPair vector of pairs. */ - virtual DivChannelPair getPaired(int chan); + virtual void getPaired(int ch, std::vector& ret); /** * get channel mode hints. diff --git a/src/engine/dispatchContainer.cpp b/src/engine/dispatchContainer.cpp index 5353c77d1..af472a268 100644 --- a/src/engine/dispatchContainer.cpp +++ b/src/engine/dispatchContainer.cpp @@ -92,6 +92,7 @@ #include "platform/nds.h" #include "platform/bifurcator.h" #include "platform/sid2.h" +#include "platform/sid3.h" #include "platform/dummy.h" #include "../ta-log.h" #include "song.h" @@ -768,6 +769,27 @@ void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, do case DIV_SYSTEM_SID2: dispatch=new DivPlatformSID2; break; + case DIV_SYSTEM_SID3: + dispatch=new DivPlatformSID3; + break; + case DIV_SYSTEM_OPL4: + dispatch=new DivPlatformOPL; + ((DivPlatformOPL*)dispatch)->setOPLType(4,false); + if (isRender) { + ((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl4CoreRender",0)); + } else { + ((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl4Core",0)); + } + break; + case DIV_SYSTEM_OPL4_DRUMS: + dispatch=new DivPlatformOPL; + ((DivPlatformOPL*)dispatch)->setOPLType(4,true); + if (isRender) { + ((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl4CoreRender",0)); + } else { + ((DivPlatformOPL*)dispatch)->setCore(eng->getConfInt("opl4Core",0)); + } + break; case DIV_SYSTEM_DUMMY: dispatch=new DivPlatformDummy; break; diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index ea9ead3cd..fc6723502 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -1575,9 +1575,9 @@ void* DivEngine::getDispatchChanState(int ch) { return disCont[dispatchOfChan[ch]].dispatch->getChanState(dispatchChanOfChan[ch]); } -DivChannelPair DivEngine::getChanPaired(int ch) { - if (ch<0 || ch>=chans) return DivChannelPair(); - return disCont[dispatchOfChan[ch]].dispatch->getPaired(dispatchChanOfChan[ch]); +void DivEngine::getChanPaired(int ch, std::vector& ret) { + if (ch<0 || ch>=chans) return; + disCont[dispatchOfChan[ch]].dispatch->getPaired(dispatchChanOfChan[ch],ret); } DivChannelModeHints DivEngine::getChanModeHints(int ch) { diff --git a/src/engine/engine.h b/src/engine/engine.h index 3dacd0730..2b033be5d 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -54,8 +54,8 @@ class DivWorkPool; #define DIV_UNSTABLE -#define DIV_VERSION "dev220" -#define DIV_ENGINE_VERSION 220 +#define DIV_VERSION "dev222" +#define DIV_ENGINE_VERSION 222 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 @@ -1151,7 +1151,7 @@ class DivEngine { void* getDispatchChanState(int chan); // get channel pairs - DivChannelPair getChanPaired(int chan); + void getChanPaired(int chan, std::vector& ret); // get channel mode hints DivChannelModeHints getChanModeHints(int chan); diff --git a/src/engine/instrument.cpp b/src/engine/instrument.cpp index 5caaa7f56..3bb00e9ac 100644 --- a/src/engine/instrument.cpp +++ b/src/engine/instrument.cpp @@ -106,6 +106,7 @@ bool DivInstrumentC64::operator==(const DivInstrumentC64& other) { _C(dutyIsAbs) && _C(filterIsAbs) && _C(noTest) && + _C(resetDuty) && _C(res) && _C(cut) && _C(hp) && @@ -174,7 +175,11 @@ bool DivInstrumentMultiPCM::operator==(const DivInstrumentMultiPCM& other) { _C(rc) && _C(lfo) && _C(vib) && - _C(am) + _C(am) && + _C(damp) && + _C(pseudoReverb) && + _C(lfoReset) && + _C(levelDirect) ); } @@ -254,6 +259,65 @@ bool DivInstrumentESFM::Operator::operator==(const DivInstrumentESFM::Operator& ); } +bool DivInstrumentSID3::operator==(const DivInstrumentSID3& other) { + return ( + _C(triOn) && + _C(sawOn) && + _C(pulseOn) && + _C(noiseOn) && + _C(a) && + _C(d) && + _C(s) && + _C(r) && + _C(sr) && + _C(duty) && + _C(ringMod) && + _C(oscSync) && + _C(phase_mod) && + _C(phase_mod_source) && + _C(ring_mod_source) && + _C(sync_source) && + _C(specialWaveOn) && + _C(oneBitNoise) && + _C(separateNoisePitch) && + _C(special_wave) && + _C(doWavetable) && + _C(dutyIsAbs) && + _C(resetDuty) && + _C(phaseInv) && + _C(feedback) && + _C(mixMode) && + _C(filt[0]) && + _C(filt[1]) && + _C(filt[2]) && + _C(filt[3]) + ); +} + +bool DivInstrumentSID3::Filter::operator==(const DivInstrumentSID3::Filter& other) { + return ( + _C(cutoff) && + _C(resonance) && + _C(output_volume) && + _C(distortion_level) && + _C(mode) && + _C(enabled) && + _C(init) && + _C(filter_matrix) && + _C(absoluteCutoff) && + _C(bindCutoffToNote) && + _C(bindCutoffToNoteStrength) && + _C(bindCutoffToNoteCenter) && + _C(bindCutoffToNoteDir) && + _C(bindCutoffOnNote) && + _C(bindResonanceToNote) && + _C(bindResonanceToNoteStrength) && + _C(bindResonanceToNoteCenter) && + _C(bindResonanceToNoteDir) && + _C(bindResonanceOnNote) + ); +} + bool DivInstrumentPowerNoise::operator==(const DivInstrumentPowerNoise& other) { return _C(octave); } @@ -618,7 +682,7 @@ void DivInstrument::writeFeature64(SafeWriter* w) { w->writeS(c64.duty); w->writeS((unsigned short)((c64.cut&4095)|((c64.res&15)<<12))); - w->writeC((c64.res>>4)&15); + w->writeC(((c64.res>>4)&15)|(c64.resetDuty?0x10:0)); FEATURE_END; } @@ -892,6 +956,14 @@ void DivInstrument::writeFeatureMP(SafeWriter* w) { w->writeC(multipcm.vib); w->writeC(multipcm.am); + unsigned char next=( + (multipcm.damp?1:0)& + (multipcm.pseudoReverb?2:0)& + (multipcm.lfoReset?4:0)& + (multipcm.levelDirect?8:0) + ); + w->writeC(next); + FEATURE_END; } @@ -983,6 +1055,80 @@ void DivInstrument::writeFeatureS2(SafeWriter* w) { FEATURE_END; } +void DivInstrument::writeFeatureS3(SafeWriter* w) { + FEATURE_BEGIN("S3"); + + w->writeC( + (sid3.dutyIsAbs?0x80:0)| + (sid3.noiseOn?8:0)| + (sid3.pulseOn?4:0)| + (sid3.sawOn?2:0)| + (sid3.triOn?1:0) + ); + + w->writeC(sid3.a); + w->writeC(sid3.d); + w->writeC(sid3.s); + w->writeC(sid3.sr); + w->writeC(sid3.r); + + w->writeC(sid3.mixMode); + + w->writeS(sid3.duty); + + w->writeC( + (sid3.phase_mod?0x80:0)| + (sid3.specialWaveOn?0x40:0)| + (sid3.oneBitNoise?0x20:0)| + (sid3.separateNoisePitch?0x10:0)| + (sid3.doWavetable?8:0)| + (sid3.resetDuty?4:0)| + (sid3.oscSync?2:0)| + (sid3.ringMod?1:0) + ); + + w->writeC(sid3.phase_mod_source); + w->writeC(sid3.ring_mod_source); + w->writeC(sid3.sync_source); + w->writeC(sid3.special_wave); + w->writeC(sid3.phaseInv); + w->writeC(sid3.feedback); + + w->writeC(4); // number of filters + + for (int i=0; i<4; i++) { + w->writeC( + (sid3.filt[i].enabled?0x80:0)| + (sid3.filt[i].init?0x40:0)| + (sid3.filt[i].absoluteCutoff?0x20:0)| + (sid3.filt[i].bindCutoffToNote?0x10:0)| + (sid3.filt[i].bindCutoffToNoteDir?8:0)| + (sid3.filt[i].bindCutoffOnNote?4:0)| + (sid3.filt[i].bindResonanceToNote?2:0)| + (sid3.filt[i].bindResonanceToNoteDir?1:0) + ); + + w->writeC( + (sid3.filt[i].bindResonanceOnNote?0x80:0) + ); + + w->writeS(sid3.filt[i].cutoff); + + w->writeC(sid3.filt[i].resonance); + w->writeC(sid3.filt[i].output_volume); + w->writeC(sid3.filt[i].distortion_level); + w->writeC(sid3.filt[i].mode); + w->writeC(sid3.filt[i].filter_matrix); + + w->writeC(sid3.filt[i].bindCutoffToNoteStrength); + w->writeC(sid3.filt[i].bindCutoffToNoteCenter); + w->writeC(sid3.filt[i].bindResonanceToNoteStrength); + w->writeC(sid3.filt[i].bindResonanceToNoteCenter); + } + + FEATURE_END; +} + void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bool insName) { size_t blockStartSeek=0; size_t blockEndSeek=0; @@ -1029,6 +1175,7 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo bool featureEF=false; bool featurePN=false; bool featureS2=false; + bool featureS3=false; bool checkForWL=false; @@ -1272,6 +1419,11 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo feature64=true; featureS2=true; break; + case DIV_INS_SID3: + feature64=true; + featureS2=true; + featureS3=true; + break; case DIV_INS_SUPERVISION: featureSM=true; if (amiga.useSample) featureSL=true; @@ -1334,6 +1486,9 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo if (sid2!=defaultIns.sid2) { featureS2=true; } + if (sid3!=defaultIns.sid3) { + featureS3=true; + } } // check ins name @@ -1485,6 +1640,9 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song, bo if (featureS2) { writeFeatureS2(w); } + if (featureS3) { + writeFeatureS3(w); + } if (fui && (featureSL || featureWL)) { w->write("EN",2); @@ -1800,7 +1958,12 @@ void DivInstrument::readFeature64(SafeReader& reader, bool& volIsCutoff, short v c64.res=cr>>12; if (version>=199) { - c64.res|=((unsigned char)reader.readC())<<4; + next=(unsigned char)reader.readC(); + c64.res|=(next&15)<<4; + + if (version>=222) { + c64.resetDuty=next&0x10; + } } READ_FEAT_END; @@ -2218,6 +2381,14 @@ void DivInstrument::readFeatureMP(SafeReader& reader, short version) { multipcm.vib=reader.readC(); multipcm.am=reader.readC(); + if (version>=221) { + unsigned char next=reader.readC(); + multipcm.damp=next&1; + multipcm.pseudoReverb=next&2; + multipcm.lfoReset=next&4; + multipcm.levelDirect=next&8; + } + READ_FEAT_END; } @@ -2325,6 +2496,82 @@ void DivInstrument::readFeatureS2(SafeReader& reader, short version) { READ_FEAT_END; } +void DivInstrument::readFeatureS3(SafeReader& reader, short version) { + READ_FEAT_BEGIN; + + unsigned char next=reader.readC(); + + sid3.dutyIsAbs=next&0x80; + sid3.noiseOn=next&8; + sid3.pulseOn=next&4; + sid3.sawOn=next&2; + sid3.triOn=next&1; + + sid3.a=reader.readC(); + sid3.d=reader.readC(); + sid3.s=reader.readC(); + sid3.sr=reader.readC(); + sid3.r=reader.readC(); + + sid3.mixMode=reader.readC(); + + sid3.duty=reader.readS(); + + next=reader.readC(); + + sid3.phase_mod=next&0x80; + sid3.specialWaveOn=next&0x40; + sid3.oneBitNoise=next&0x20; + sid3.separateNoisePitch=next&0x10; + sid3.doWavetable=next&8; + sid3.resetDuty=next&4; + sid3.oscSync=next&2; + sid3.ringMod=next&1; + + sid3.phase_mod_source=reader.readC(); + sid3.ring_mod_source=reader.readC(); + sid3.sync_source=reader.readC(); + sid3.special_wave=reader.readC(); + sid3.phaseInv=reader.readC(); + sid3.feedback=reader.readC(); + + unsigned char numFilters=reader.readC(); + + for (int i=0; i=4) break; + + next=reader.readC(); + + sid3.filt[i].enabled=next&0x80; + sid3.filt[i].init=next&0x40; + sid3.filt[i].absoluteCutoff=next&0x20; + sid3.filt[i].bindCutoffToNote=next&0x10; + sid3.filt[i].bindCutoffToNoteDir=next&8; + sid3.filt[i].bindCutoffOnNote=next&4; + sid3.filt[i].bindResonanceToNote=next&2; + sid3.filt[i].bindResonanceToNoteDir=next&1; + + next=reader.readC(); + + sid3.filt[i].bindResonanceOnNote=next&0x80; + + sid3.filt[i].cutoff=reader.readS(); + + sid3.filt[i].resonance=reader.readC(); + sid3.filt[i].output_volume=reader.readC(); + sid3.filt[i].distortion_level=reader.readC(); + sid3.filt[i].mode=reader.readC(); + sid3.filt[i].filter_matrix=reader.readC(); + + sid3.filt[i].bindCutoffToNoteStrength=reader.readC(); + sid3.filt[i].bindCutoffToNoteCenter=reader.readC(); + sid3.filt[i].bindResonanceToNoteStrength=reader.readC(); + sid3.filt[i].bindResonanceToNoteCenter=reader.readC(); + } + + READ_FEAT_END; +} + DivDataErrors DivInstrument::readInsDataNew(SafeReader& reader, short version, bool fui, DivSong* song) { unsigned char featCode[2]; bool volIsCutoff=false; @@ -2399,6 +2646,8 @@ DivDataErrors DivInstrument::readInsDataNew(SafeReader& reader, short version, b readFeaturePN(reader,version); } else if (memcmp(featCode,"S2",2)==0) { // SID2 readFeatureS2(reader,version); + } else if (memcmp(featCode,"S3",2)==0) { // SID3 + readFeatureS3(reader,version); } else { if (song==NULL && (memcmp(featCode,"SL",2)==0 || (memcmp(featCode,"WL",2)==0))) { // nothing @@ -3492,4 +3741,4 @@ DivInstrument& DivInstrument::operator=( const DivInstrument& ins ) { *(DivInstrumentPOD*)this=ins; name=ins.name; return *this; -} \ No newline at end of file +} diff --git a/src/engine/instrument.h b/src/engine/instrument.h index f19f0e456..a1aec2cae 100644 --- a/src/engine/instrument.h +++ b/src/engine/instrument.h @@ -98,6 +98,7 @@ enum DivInstrumentType: unsigned short { DIV_INS_SID2=63, // coincidence! DIV_INS_SUPERVISION=64, DIV_INS_UPD1771C=65, + DIV_INS_SID3=66, DIV_INS_MAX, DIV_INS_NULL }; @@ -429,7 +430,7 @@ struct DivInstrumentC64 { unsigned char a, d, s, r; unsigned short duty; unsigned char ringMod, oscSync; - bool toFilter, initFilter, dutyIsAbs, filterIsAbs, noTest; + bool toFilter, initFilter, dutyIsAbs, filterIsAbs, noTest, resetDuty; unsigned char res; unsigned short cut; bool hp, lp, bp, ch3off; @@ -456,6 +457,7 @@ struct DivInstrumentC64 { dutyIsAbs(false), filterIsAbs(false), noTest(false), + resetDuty(true), res(0), cut(0), hp(false), @@ -612,6 +614,7 @@ struct DivInstrumentFDS { struct DivInstrumentMultiPCM { unsigned char ar, d1r, dl, d2r, rr, rc; unsigned char lfo, vib, am; + bool damp, pseudoReverb, lfoReset, levelDirect; bool operator==(const DivInstrumentMultiPCM& other); bool operator!=(const DivInstrumentMultiPCM& other) { @@ -620,7 +623,11 @@ struct DivInstrumentMultiPCM { DivInstrumentMultiPCM(): ar(15), d1r(15), dl(0), d2r(0), rr(15), rc(15), - lfo(0), vib(0), am(0) { + lfo(0), vib(0), am(0), + damp(false), + pseudoReverb(false), + lfoReset(false), + levelDirect(true) { } }; @@ -864,6 +871,111 @@ struct DivInstrumentSID2 { noiseMode(0) {} }; +struct DivInstrumentSID3 { + bool triOn, sawOn, pulseOn, noiseOn; + unsigned char a, d, s, r; + unsigned char sr; + unsigned short duty; + unsigned char ringMod, oscSync; + bool phase_mod; + unsigned char phase_mod_source, ring_mod_source, sync_source; + bool specialWaveOn; + bool oneBitNoise; + bool separateNoisePitch; + unsigned char special_wave; + bool doWavetable; + bool dutyIsAbs; + bool resetDuty; + unsigned char phaseInv; + unsigned char feedback; + unsigned char mixMode; + + struct Filter { + unsigned short cutoff; + unsigned char resonance; + unsigned char output_volume; + unsigned char distortion_level; + unsigned char mode; + bool enabled; + bool init; + unsigned char filter_matrix; + + // this is done purely in software + bool absoluteCutoff; + bool bindCutoffToNote; + unsigned char bindCutoffToNoteStrength; // how much cutoff changes over e.g. 1 semitone + unsigned char bindCutoffToNoteCenter; // central note of the cutoff change + bool bindCutoffToNoteDir; // if we decrease or increase cutoff if e.g. we go upper in note space + bool bindCutoffOnNote; // only do cutoff scaling once, on new note + + bool bindResonanceToNote; + unsigned char bindResonanceToNoteStrength; // how much resonance changes over e.g. 1 semitone + unsigned char bindResonanceToNoteCenter; // central note of the resonance change + bool bindResonanceToNoteDir; // if we decrease or increase resonance if e.g. we go upper in note space + bool bindResonanceOnNote; // only do resonance scaling once, on new note + + bool operator==(const Filter& other); + bool operator!=(const Filter& other) { + return !(*this==other); + } + Filter(): + cutoff(0), + resonance(0), + output_volume(0), + distortion_level(0), + mode(0), + enabled(false), + init(false), + filter_matrix(0), + absoluteCutoff(false), + bindCutoffToNote(false), + bindCutoffToNoteStrength(0), + bindCutoffToNoteCenter(0), + bindCutoffToNoteDir(false), + bindCutoffOnNote(false), + bindResonanceToNote(false), + bindResonanceToNoteStrength(0), + bindResonanceToNoteCenter(0), + bindResonanceToNoteDir(false), + bindResonanceOnNote(false) {} + } filt[4]; + + bool operator==(const DivInstrumentSID3& other); + bool operator!=(const DivInstrumentSID3& other) { + return !(*this==other); + } + DivInstrumentSID3(): + triOn(false), + sawOn(true), + pulseOn(false), + noiseOn(false), + a(0), + d(64), + s(0), + r(0), + sr(0), + duty(32768), + ringMod(0), + oscSync(0), + phase_mod(false), + phase_mod_source(0), + ring_mod_source(0), + sync_source(0), + specialWaveOn(false), + oneBitNoise(false), + separateNoisePitch(false), + special_wave(0), + doWavetable(false), + dutyIsAbs(true), + resetDuty(false), + phaseInv(0), + feedback(0), + mixMode(0) { + filt[0].mode=16|32; // default settings so filter just works, connect to input and channel output + filt[0].output_volume=0xff; + } +}; + struct DivInstrumentPOD { DivInstrumentType type; DivInstrumentFM fm; @@ -882,6 +994,7 @@ struct DivInstrumentPOD { DivInstrumentESFM esfm; DivInstrumentPowerNoise powernoise; DivInstrumentSID2 sid2; + DivInstrumentSID3 sid3; DivInstrumentPOD() : type(DIV_INS_FM) { @@ -980,6 +1093,7 @@ struct DivInstrument : DivInstrumentPOD { void writeFeatureEF(SafeWriter* w); void writeFeaturePN(SafeWriter* w); void writeFeatureS2(SafeWriter* w); + void writeFeatureS3(SafeWriter* w); void readFeatureNA(SafeReader& reader, short version); void readFeatureFM(SafeReader& reader, short version); @@ -1003,6 +1117,7 @@ struct DivInstrument : DivInstrumentPOD { void readFeatureEF(SafeReader& reader, short version); void readFeaturePN(SafeReader& reader, short version); void readFeatureS2(SafeReader& reader, short version); + void readFeatureS3(SafeReader& reader, short version); DivDataErrors readInsDataOld(SafeReader& reader, short version); DivDataErrors readInsDataNew(SafeReader& reader, short version, bool fui, DivSong* song); diff --git a/src/engine/platform/abstract.cpp b/src/engine/platform/abstract.cpp index 441ec1bff..2bf00580f 100644 --- a/src/engine/platform/abstract.cpp +++ b/src/engine/platform/abstract.cpp @@ -37,8 +37,7 @@ unsigned short DivDispatch::getPan(int chan) { return 0; } -DivChannelPair DivDispatch::getPaired(int chan) { - return DivChannelPair(); +void DivDispatch::getPaired(int ch, std::vector& ret) { } DivChannelModeHints DivDispatch::getModeHints(int chan) { diff --git a/src/engine/platform/c140.cpp b/src/engine/platform/c140.cpp index bde3e1fe7..24ffc6f14 100644 --- a/src/engine/platform/c140.cpp +++ b/src/engine/platform/c140.cpp @@ -561,12 +561,11 @@ float DivPlatformC140::getPostAmp() { return 3.0f; } -DivChannelPair DivPlatformC140::getPaired(int ch) { - if (!is219) return DivChannelPair(); +void DivPlatformC140::getPaired(int ch, std::vector& ret) { + if (!is219) return; if ((ch&3)==0) { - return DivChannelPair(bankLabel[ch>>2],ch+1,ch+2,ch+3,-1,-1,-1,-1,-1); + ret.push_back(DivChannelPair(bankLabel[ch>>2],ch+1,ch+2,ch+3,-1,-1,-1,-1,-1)); } - return DivChannelPair(); } const void* DivPlatformC140::getSampleMem(int index) { diff --git a/src/engine/platform/c140.h b/src/engine/platform/c140.h index fb385c5eb..3d055d629 100644 --- a/src/engine/platform/c140.h +++ b/src/engine/platform/c140.h @@ -89,7 +89,7 @@ class DivPlatformC140: public DivDispatch { void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); unsigned short getPan(int chan); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivDispatchOscBuffer* getOscBuffer(int chan); unsigned char* getRegisterPool(); int getRegisterPoolSize(); diff --git a/src/engine/platform/c64.cpp b/src/engine/platform/c64.cpp index 52d87225f..221d7942d 100644 --- a/src/engine/platform/c64.cpp +++ b/src/engine/platform/c64.cpp @@ -158,6 +158,21 @@ void DivPlatformC64::tick(bool sysTick) { int i=chanOrder[_i]; chan[i].std.next(); + + if (sysTick) { + if (chan[i].pw_slide!=0) { + chan[i].duty-=chan[i].pw_slide; + chan[i].duty=CLAMP(chan[i].duty,0,0xfff); + rWrite(i*7+2,chan[i].duty&0xff); + rWrite(i*7+3,(chan[i].duty>>8)|(chan[i].outVol<<4)); + } + if (cutoff_slide!=0) { + filtCut+=cutoff_slide; + filtCut=CLAMP(filtCut,0,0x7ff); + updateFilter(); + } + } + if (chan[i].std.vol.had) { vol=MIN(15,chan[i].std.vol.val); willUpdateFilter=true; @@ -305,7 +320,7 @@ int DivPlatformC64::dispatch(DivCommand c) { chan[c.chan].active=true; chan[c.chan].keyOn=true; chan[c.chan].test=false; - if (chan[c.chan].insChanged || chan[c.chan].resetDuty || ins->std.waveMacro.len>0) { + if (((chan[c.chan].insChanged || chan[c.chan].resetDuty || ins->std.waveMacro.len>0) && ins->c64.resetDuty) || chan[c.chan].resetDuty) { chan[c.chan].duty=ins->c64.duty; rWrite(c.chan*7+2,chan[c.chan].duty&0xff); rWrite(c.chan*7+3,chan[c.chan].duty>>8); @@ -535,6 +550,12 @@ int DivPlatformC64::dispatch(DivCommand c) { chan[c.chan].release=c.value&15; rWrite(c.chan*7+6,(chan[c.chan].sustain<<4)|(chan[c.chan].release)); break; + case DIV_CMD_C64_PW_SLIDE: + chan[c.chan].pw_slide=c.value*c.value2; + break; + case DIV_CMD_C64_CUTOFF_SLIDE: + cutoff_slide=c.value*c.value2; + break; case DIV_CMD_MACRO_OFF: chan[c.chan].std.mask(c.value,true); break; @@ -600,6 +621,23 @@ DivMacroInt* DivPlatformC64::getChanMacroInt(int ch) { return &chan[ch].std; } +void DivPlatformC64::getPaired(int ch, std::vector& ret) { + if (chan[ch].ring) { + if (ch==0){ + ret.push_back(DivChannelPair(_("ring"),2)); + } else { + ret.push_back(DivChannelPair(_("ring"),(ch-1)%3)); + } + } + if (chan[ch].sync) { + if (ch==0) { + ret.push_back(DivChannelPair(_("sync"),2)); + } else { + ret.push_back(DivChannelPair(_("sync"),(ch-1)%3)); + } + } +} + DivChannelModeHints DivPlatformC64::getModeHints(int ch) { DivChannelModeHints ret; ret.count=1; @@ -653,8 +691,11 @@ void DivPlatformC64::reset() { chan[i].std.setEngine(parent); fakeLow[i]=0; fakeBand[i]=0; + chan[i].pw_slide=0; } + cutoff_slide=0; + if (sidCore==2) { dSID_init(sid_d,chipClock,rate,sidIs6581?6581:8580,needInitTables); dSID_setMuteMask( diff --git a/src/engine/platform/c64.h b/src/engine/platform/c64.h index bd2e9d65e..1fa5abd1b 100644 --- a/src/engine/platform/c64.h +++ b/src/engine/platform/c64.h @@ -37,6 +37,7 @@ class DivPlatformC64: public DivDispatch { short duty; bool sweepChanged, filter; bool resetMask, resetFilter, resetDuty, gate, ring, sync, test; + short pw_slide; Channel(): SharedChannel(15), prevFreq(65535), @@ -56,7 +57,8 @@ class DivPlatformC64: public DivDispatch { gate(true), ring(false), sync(false), - test(false) {} + test(false), + pw_slide(0) {} }; Channel chan[3]; DivDispatchOscBuffer* oscBuf[3]; @@ -76,6 +78,7 @@ class DivPlatformC64: public DivDispatch { unsigned char writeOscBuf; unsigned char sidCore; int filtCut, resetTime, initResetTime; + short cutoff_slide; bool keyPriority, sidIs6581, needInitTables, no1EUpdate, multiplyRel, macroRace; unsigned char chanOrder[3]; @@ -114,6 +117,7 @@ class DivPlatformC64: public DivDispatch { bool isVolGlobal(); float getPostAmp(); DivMacroInt* getChanMacroInt(int ch); + void getPaired(int ch, std::vector& ret); DivChannelModeHints getModeHints(int chan); void notifyInsDeletion(void* ins); void poke(unsigned int addr, unsigned short val); diff --git a/src/engine/platform/dave.cpp b/src/engine/platform/dave.cpp index 0d5868611..385bad81d 100644 --- a/src/engine/platform/dave.cpp +++ b/src/engine/platform/dave.cpp @@ -524,12 +524,16 @@ unsigned short DivPlatformDave::getPan(int ch) { return (chan[ch].panL<<8)|chan[ch].panR; } -// TODO: the rest -DivChannelPair DivPlatformDave::getPaired(int ch) { +void DivPlatformDave::getPaired(int ch, std::vector& ret) { if (chan[ch].highPass) { - DivChannelPair("high",(ch+1)&3); + ret.push_back(DivChannelPair(_("high"),(ch+1)&3)); + } + if (chan[ch].ringMod) { + ret.push_back(DivChannelPair(_("ring"),(ch+2)&3)); + } + if (chan[ch].lowPass && ch==3) { + ret.push_back(DivChannelPair(_("low"),2)); } - return DivChannelPair(); } DivChannelModeHints DivPlatformDave::getModeHints(int ch) { diff --git a/src/engine/platform/dave.h b/src/engine/platform/dave.h index b232218be..e6d7e3497 100644 --- a/src/engine/platform/dave.h +++ b/src/engine/platform/dave.h @@ -76,7 +76,7 @@ class DivPlatformDave: public DivDispatch { void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); unsigned short getPan(int chan); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivChannelModeHints getModeHints(int chan); DivSamplePos getSamplePos(int ch); DivDispatchOscBuffer* getOscBuffer(int chan); diff --git a/src/engine/platform/gbaminmod.cpp b/src/engine/platform/gbaminmod.cpp index 65342be43..1d889e498 100644 --- a/src/engine/platform/gbaminmod.cpp +++ b/src/engine/platform/gbaminmod.cpp @@ -771,6 +771,8 @@ int DivPlatformGBAMinMod::init(DivEngine* p, int channels, int sugRate, const Di setFlags(flags); reset(); + maxCPU=0.0; // initialize! + return 16; } diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index b3d47a280..b1f847459 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -29,6 +29,12 @@ #define KVSL(x,y) ((chan[x].state.op[orderedOpsL1[ops==4][y]].kvs==2 && isOutputL[ops==4][chan[x].state.alg][y]) || chan[x].state.op[orderedOpsL1[ops==4][y]].kvs==1) #define CHIP_FREQBASE chipFreqBase +#define PCM_FREQBASE (402653184) + +#define NOTE_PCM(x) parent->calcBaseFreq(chipClock,PCM_FREQBASE,x,false) + +#define PCM_CHECK(ch) ((chipType==4) && (ch>=pcmChanOffs)) +#define PCM_REG(ch) (ch-pcmChanOffs) // N = invalid #define N 255 @@ -159,37 +165,59 @@ const int orderedOpsL[4]={ #define ADDR_FREQH 0xb0 #define ADDR_LR_FB_ALG 0xc0 + +#define PCM_ADDR_WAVE_L 0x208 // Wavetable number LSB +#define PCM_ADDR_WAVE_H_FN_L 0x220 // Wavetable number MSB, F-number LSB +#define PCM_ADDR_FN_H_PR_OCT 0x238 // F-number MSB, Pseudo-reverb, Octave +#define PCM_ADDR_TL 0x250 // Total level, Level direct +#define PCM_ADDR_KEY_DAMP_LFORST_CH_PAN 0x268 // Key, Damp, LFO Reset, Channel select, Panpot + +#define PCM_ADDR_LFO_VIB 0x280 +#define PCM_ADDR_AR_D1R 0x298 +#define PCM_ADDR_DL_D2R 0x2b0 +#define PCM_ADDR_RC_RR 0x2c8 +#define PCM_ADDR_AM 0x2e0 + +#define PCM_ADDR_MIX_FM 0x2f8 +#define PCM_ADDR_MIX_PCM 0x2f9 + void DivPlatformOPL::acquire_nuked(short** buf, size_t len) { - thread_local short o[4]; - thread_local int os[4]; + thread_local short o[8]; + thread_local int os[6]; thread_local ymfm::ymfm_output<2> aOut; + thread_local short pcmBuf[24]; for (size_t h=0; h=0) { - adpcmB->write(w.addr-7,(w.val&15)|0x80); - OPL3_WriteReg(&fm,w.addr,w.val&0xc0); - } else { + if (w.addr>=0x200) { + pcm.writeReg(w.addr&0xff,w.val); + regPool[0x200|(w.addr&0xff)]=w.val; + } else { + switch (w.addr) { + case 8: + if (adpcmChan>=0) { + adpcmB->write(w.addr-7,(w.val&15)|0x80); + OPL3_WriteReg(&fm,w.addr,w.val&0xc0); + } else { + OPL3_WriteReg(&fm,w.addr,w.val); + } + break; + case 7: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 21: case 22: case 23: + if (adpcmChan>=0) { + adpcmB->write(w.addr-7,w.val); + } else { + OPL3_WriteReg(&fm,w.addr,w.val); + } + break; + default: OPL3_WriteReg(&fm,w.addr,w.val); - } - break; - case 7: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 21: case 22: case 23: - if (adpcmChan>=0) { - adpcmB->write(w.addr-7,w.val); - } else { - OPL3_WriteReg(&fm,w.addr,w.val); - } - break; - default: - OPL3_WriteReg(&fm,w.addr,w.val); - break; + break; + } + regPool[w.addr&511]=w.val; } - regPool[w.addr&511]=w.val; writes.pop(); } @@ -198,10 +226,20 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) { } else { OPL3_Generate4Ch(&fm,o); } - os[0]+=o[0]; - os[1]+=o[1]; - os[2]+=o[2]; - os[3]+=o[3]; + if (chipType==4) { + pcm.generateMix(o[0],o[1],o[4],o[5],o[6],o[7],pcmBuf); + os[0]+=o[4]; // FM + PCM left + os[1]+=o[5]; // FM + PCM right + os[2]+=o[2]; // FM left + os[3]+=o[3]; // FM right + os[4]+=o[6]; // PCM left + os[5]+=o[7]; // PCM right + } else { + os[0]+=o[0]; + os[1]+=o[1]; + os[2]+=o[2]; + os[3]+=o[3]; + } if (adpcmChan>=0) { adpcmB->clock(); @@ -261,6 +299,12 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) { oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(chOut<<2,-32768,32767); } } + + if (chipType==4) { + for (int i=pcmChanOffs; idata[oscBuf[i]->needle++]=CLAMP(pcmBuf[i-pcmChanOffs],-32768,32767); + } + } if (os[0]<-32768) os[0]=-32768; if (os[0]>32767) os[0]=32767; @@ -274,6 +318,12 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) { if (os[3]<-32768) os[3]=-32768; if (os[3]>32767) os[3]=32767; + if (os[4]<-32768) os[4]=-32768; + if (os[4]>32767) os[4]=32767; + + if (os[5]<-32768) os[5]=-32768; + if (os[5]>32767) os[5]=32767; + buf[0][h]=os[0]; if (totalOutputs>1) { buf[1][h]=os[1]; @@ -285,9 +335,8 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) { buf[3][h]=os[3]; } if (totalOutputs==6) { - // placeholder for OPL4 - buf[4][h]=0; - buf[5][h]=0; + buf[4][h]=os[4]; + buf[5][h]=os[5]; } } } @@ -505,6 +554,103 @@ void DivPlatformOPL::acquire_ymfm3(short** buf, size_t len) { } } +void DivPlatformOPL::acquire_ymfm4(short** buf, size_t len) { + ymfm::ymfm_output<6> out; + + ymfm::ymf278b::fm_engine* fme=fm_ymfm4->debug_fm_engine(); + ymfm::pcm_engine* pcme=fm_ymfm4->debug_pcm_engine(); + ymfm::fm_channel>* fmChan[18]; + ymfm::pcm_channel* pcmChan[24]; + + for (int i=0; i<18; i++) { + fmChan[i]=fme->debug_channel(i); + } + + for (int i=0; i<24; i++) { + pcmChan[i]=pcme->debug_channel(i); + } + + for (size_t h=0; hwrite((w.addr&0x200)?4:(w.addr&0x100)?2:0,w.addr); + fm_ymfm4->write((w.addr&0x200)?5:1,w.val); + + regPool[(w.addr&0x200)?(0x200+(w.addr&255)):(w.addr&511)]=w.val; + writes.pop(); + } + + fm_ymfm4->generate(&out,1); + + buf[0][h]=out.data[4]>>1; // FM + PCM left + if (totalOutputs>1) { + buf[1][h]=out.data[5]>>1; // FM + PCM right + } + if (totalOutputs>2) { + buf[2][h]=out.data[0]>>1; // FM left + } + if (totalOutputs>3) { + buf[3][h]=out.data[1]>>1; // FM right + } + if (totalOutputs==6) { + buf[4][h]=out.data[2]>>1; // PCM left + buf[5][h]=out.data[3]>>1; // PCM right + } + + if (properDrums) { + for (int i=0; i<16; i++) { + unsigned char ch=(i<12 && chan[i&(~1)].fourOp)?outChanMap[i^1]:outChanMap[i]; + if (ch==255) continue; + int chOut=fmChan[ch]->debug_output(0); + if (chOut==0) { + chOut=fmChan[ch]->debug_output(1); + } + if (chOut==0) { + chOut=fmChan[ch]->debug_output(2); + } + if (chOut==0) { + chOut=fmChan[ch]->debug_output(3); + } + if (i==15) { + oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(chOut,-32768,32767); + } else { + oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(chOut<<1,-32768,32767); + } + } + oscBuf[16]->data[oscBuf[16]->needle++]=CLAMP(fmChan[7]->debug_special2()<<1,-32768,32767); + oscBuf[17]->data[oscBuf[17]->needle++]=CLAMP(fmChan[8]->debug_special1()<<1,-32768,32767); + oscBuf[18]->data[oscBuf[18]->needle++]=CLAMP(fmChan[8]->debug_special2()<<1,-32768,32767); + oscBuf[19]->data[oscBuf[19]->needle++]=CLAMP(fmChan[7]->debug_special1()<<1,-32768,32767); + } else { + for (int i=0; i<18; i++) { + unsigned char ch=outChanMap[i]; + if (ch==255) continue; + int chOut=fmChan[ch]->debug_output(0); + if (chOut==0) { + chOut=fmChan[ch]->debug_output(1); + } + if (chOut==0) { + chOut=fmChan[ch]->debug_output(2); + } + if (chOut==0) { + chOut=fmChan[ch]->debug_output(3); + } + oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(chOut<<1,-32768,32767); + } + } + for (int i=0; i<24; i++) { + unsigned char oscOffs=i+pcmChanOffs; + int chOut=pcmChan[i]->debug_output(0); + chOut+=pcmChan[i]->debug_output(1); + chOut+=pcmChan[i]->debug_output(2); + chOut+=pcmChan[i]->debug_output(3); + oscBuf[oscOffs]->data[oscBuf[oscOffs]->needle++]=CLAMP(chOut<<1,-32768,32767); + } + } +} + static const int cycleMap[18]={ 6, 7, 8, 6, 7, 8, 0, 1, 2, 0, 1, 2, 3, 4, 5, 3, 4, 5, @@ -816,6 +962,9 @@ void DivPlatformOPL::acquire(short** buf, size_t len) { case 3: case 759: acquire_ymfm3(buf,len); break; + case 4: + acquire_ymfm4(buf,len); + break; } } else { // OPL3 acquire_nuked(buf,len); @@ -833,144 +982,230 @@ double DivPlatformOPL::NOTE_ADPCMB(int note) { void DivPlatformOPL::tick(bool sysTick) { for (int i=0; icalcArp(chan[i].note,chan[i].std.arp.val)); + } + chan[i].freqChanged=true; + } + + if (chan[i].std.pitch.had) { + if (chan[i].std.pitch.mode) { + chan[i].pitch2+=chan[i].std.pitch.val; + CLAMP_VAR(chan[i].pitch2,-131071,131071); + } else { + chan[i].pitch2=chan[i].std.pitch.val; + } + chan[i].freqChanged=true; + } + + if (chan[i].std.phaseReset.had) { + if (chan[i].std.phaseReset.val==1 && chan[i].active) { + chan[i].keyOn=true; + chan[i].writeCtrl=true; + } + } + + if (chan[i].std.panL.had) { // panning + chan[i].pan=chan[i].std.panL.val&0xf; + chan[i].freqChanged=true; + chan[i].writeCtrl=true; + } + + if (chan[i].std.ex1.had) { + chan[i].lfo=chan[i].std.ex1.val&0x7; + rWrite(PCM_ADDR_LFO_VIB+PCM_REG(i),(chan[i].lfo<<3)|(chan[i].vib)); + } + + if (chan[i].std.fms.had) { + chan[i].vib=chan[i].std.fms.val&0x7; + rWrite(PCM_ADDR_LFO_VIB+PCM_REG(i),(chan[i].lfo<<3)|(chan[i].vib)); + } + + if (chan[i].std.ams.had) { + chan[i].am=chan[i].std.ams.val&0x7; + rWrite(PCM_ADDR_AM+PCM_REG(i),chan[i].am); + } + + if (chan[i].std.ex2.had) { + chan[i].ar=chan[i].std.ex2.val&0xf; + rWrite(PCM_ADDR_AR_D1R+PCM_REG(i),(chan[i].ar<<4)|(chan[i].d1r)); + } + + if (chan[i].std.ex3.had) { + chan[i].d1r=chan[i].std.ex3.val&0xf; + rWrite(PCM_ADDR_AR_D1R+PCM_REG(i),(chan[i].ar<<4)|(chan[i].d1r)); + } + + if (chan[i].std.ex4.had) { + chan[i].dl=chan[i].std.ex4.val&0xf; + rWrite(PCM_ADDR_DL_D2R+PCM_REG(i),(chan[i].dl<<4)|(chan[i].d2r)); + } + + if (chan[i].std.ex5.had) { + chan[i].d2r=chan[i].std.ex5.val&0xf; + rWrite(PCM_ADDR_DL_D2R+PCM_REG(i),(chan[i].dl<<4)|(chan[i].d2r)); + } + + if (chan[i].std.ex6.had) { + chan[i].rc=chan[i].std.ex6.val&0xf; + rWrite(PCM_ADDR_RC_RR+PCM_REG(i),(chan[i].rc<<4)|(chan[i].rr)); + } + + if (chan[i].std.ex7.had) { + chan[i].rr=chan[i].std.ex7.val&0xf; + rWrite(PCM_ADDR_RC_RR+PCM_REG(i),(chan[i].rc<<4)|(chan[i].rr)); + } + + } else { + int ops=(slots[3][i]!=255 && chan[i].state.ops==4 && oplType==3)?4:2; + chan[i].std.next(); + + if (chan[i].std.vol.had) { + chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].vol,MIN(63,chan[i].std.vol.val),63); + for (int j=0; jmelodicChans) { + rWrite(baseAddr+ADDR_KSL_TL,(63-VOL_SCALE_LOG_BROKEN(63-op.tl,chan[i].outVol&0x3f,63))|(op.ksl<<6)); + } else { + rWrite(baseAddr+ADDR_KSL_TL,op.tl|(op.ksl<<6)); + } + } + } + } + + if (NEW_ARP_STRAT) { + chan[i].handleArp(); + } else if (chan[i].std.arp.had) { + if (!chan[i].inPorta) { + chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val)); + } + chan[i].freqChanged=true; + } + + if (oplType==3 && chan[i].std.panL.had) { + chan[i].pan=((chan[i].std.panL.val&1)<<1)|((chan[i].std.panL.val&2)>>1)|((chan[i].std.panL.val&4)<<1)|((chan[i].std.panL.val&8)>>1); + } + + if (chan[i].std.pitch.had) { + if (chan[i].std.pitch.mode) { + chan[i].pitch2+=chan[i].std.pitch.val; + CLAMP_VAR(chan[i].pitch2,-131071,131071); + } else { + chan[i].pitch2=chan[i].std.pitch.val; + } + chan[i].freqChanged=true; + } + + if (chan[i].std.phaseReset.had) { + if (chan[i].std.phaseReset.val==1 && chan[i].active) { + chan[i].keyOn=true; + } + } + + if (chan[i].std.alg.had) { + chan[i].state.alg=chan[i].std.alg.val; + } + if (chan[i].std.fb.had) { + chan[i].state.fb=chan[i].std.fb.val; + } + + if (chan[i].std.alg.had || chan[i].std.fb.had || (oplType==3 && chan[i].std.panL.had)) { + if (isMuted[i] && i<=melodicChans) { + rWrite(chanMap[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&1)|(chan[i].state.fb<<1)); + if (ops==4) { + rWrite(chanMap[i+1]+ADDR_LR_FB_ALG,((chan[i].state.alg>>1)&1)|(chan[i].state.fb<<1)); + } + } else { + rWrite(chanMap[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&1)|(chan[i].state.fb<<1)|((chan[i].pan&15)<<4)); + if (ops==4) { + rWrite(chanMap[i+1]+ADDR_LR_FB_ALG,((chan[i].state.alg>>1)&1)|(chan[i].state.fb<<1)|((chan[i].pan&15)<<4)); + } + } + } - if (chan[i].std.vol.had) { - chan[i].outVol=VOL_SCALE_LOG_BROKEN(chan[i].vol,MIN(63,chan[i].std.vol.val),63); for (int j=0; jmelodicChans) { - rWrite(baseAddr+ADDR_KSL_TL,(63-VOL_SCALE_LOG_BROKEN(63-op.tl,chan[i].outVol&0x3f,63))|(op.ksl<<6)); - } else { - rWrite(baseAddr+ADDR_KSL_TL,op.tl|(op.ksl<<6)); + if (m.ar.had) { + op.ar=m.ar.val; + rWrite(baseAddr+ADDR_AR_DR,(op.ar<<4)|op.dr); + } + if (m.dr.had) { + op.dr=m.dr.val; + rWrite(baseAddr+ADDR_AR_DR,(op.ar<<4)|op.dr); + } + if (m.sl.had) { + op.sl=m.sl.val; + rWrite(baseAddr+ADDR_SL_RR,(op.sl<<4)|op.rr); + } + if (m.rr.had) { + op.rr=m.rr.val; + rWrite(baseAddr+ADDR_SL_RR,(op.sl<<4)|op.rr); + } + + if (oplType>1) { + if (m.ws.had) { + op.ws=m.ws.val; + rWrite(baseAddr+ADDR_WS,op.ws&((oplType==3)?7:3)); } } - } - } - if (NEW_ARP_STRAT) { - chan[i].handleArp(); - } else if (chan[i].std.arp.had) { - if (!chan[i].inPorta) { - chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val)); - } - chan[i].freqChanged=true; - } - - if (oplType==3 && chan[i].std.panL.had) { - chan[i].pan=((chan[i].std.panL.val&1)<<1)|((chan[i].std.panL.val&2)>>1)|((chan[i].std.panL.val&4)<<1)|((chan[i].std.panL.val&8)>>1); - } - - if (chan[i].std.pitch.had) { - if (chan[i].std.pitch.mode) { - chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-131071,131071); - } else { - chan[i].pitch2=chan[i].std.pitch.val; - } - chan[i].freqChanged=true; - } - - if (chan[i].std.phaseReset.had) { - if (chan[i].std.phaseReset.val==1 && chan[i].active) { - chan[i].keyOn=true; - } - } - - if (chan[i].std.alg.had) { - chan[i].state.alg=chan[i].std.alg.val; - } - if (chan[i].std.fb.had) { - chan[i].state.fb=chan[i].std.fb.val; - } - - if (chan[i].std.alg.had || chan[i].std.fb.had || (oplType==3 && chan[i].std.panL.had)) { - if (isMuted[i] && i<=melodicChans) { - rWrite(chanMap[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&1)|(chan[i].state.fb<<1)); - if (ops==4) { - rWrite(chanMap[i+1]+ADDR_LR_FB_ALG,((chan[i].state.alg>>1)&1)|(chan[i].state.fb<<1)); + if (m.tl.had) { + op.tl=m.tl.val&63; } - } else { - rWrite(chanMap[i]+ADDR_LR_FB_ALG,(chan[i].state.alg&1)|(chan[i].state.fb<<1)|((chan[i].pan&15)<<4)); - if (ops==4) { - rWrite(chanMap[i+1]+ADDR_LR_FB_ALG,((chan[i].state.alg>>1)&1)|(chan[i].state.fb<<1)|((chan[i].pan&15)<<4)); + if (m.ksl.had) { + op.ksl=m.ksl.val; } - } - } - - for (int j=0; j1) { - if (m.ws.had) { - op.ws=m.ws.val; - rWrite(baseAddr+ADDR_WS,op.ws&((oplType==3)?7:3)); - } - } - - if (m.tl.had) { - op.tl=m.tl.val&63; - } - if (m.ksl.had) { - op.ksl=m.ksl.val; - } - if (m.tl.had || m.ksl.had) { - if (isMuted[i] && i<=melodicChans) { - rWrite(baseAddr+ADDR_KSL_TL,63|(op.ksl<<6)); - } else { - if (KVSL(i,j) || i>melodicChans) { - rWrite(baseAddr+ADDR_KSL_TL,(63-VOL_SCALE_LOG_BROKEN(63-op.tl,chan[i].outVol&0x3f,63))|(op.ksl<<6)); + if (m.tl.had || m.ksl.had) { + if (isMuted[i] && i<=melodicChans) { + rWrite(baseAddr+ADDR_KSL_TL,63|(op.ksl<<6)); } else { - rWrite(baseAddr+ADDR_KSL_TL,op.tl|(op.ksl<<6)); + if (KVSL(i,j) || i>melodicChans) { + rWrite(baseAddr+ADDR_KSL_TL,(63-VOL_SCALE_LOG_BROKEN(63-op.tl,chan[i].outVol&0x3f,63))|(op.ksl<<6)); + } else { + rWrite(baseAddr+ADDR_KSL_TL,op.tl|(op.ksl<<6)); + } } } } @@ -1090,7 +1325,7 @@ void DivPlatformOPL::tick(bool sysTick) { } } - for (int i=0; i<512; i++) { + for (int i=0; i<768; i++) { if (pendingWrites[i]!=oldWrites[i]) { if ((i>=0x80 && i<0xa0)) { if (weWillWriteRRLater[i-0x80]) continue; @@ -1104,38 +1339,118 @@ void DivPlatformOPL::tick(bool sysTick) { bool updateDrums=false; for (int i=0; icalcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,octave(chan[i].baseFreq)*2,chan[i].pitch2,chipClock,CHIP_FREQBASE); - if (chan[i].fixedFreq>0) chan[i].freq=chan[i].fixedFreq; - if (chan[i].freq<0) chan[i].freq=0; - if (chan[i].freq>131071) chan[i].freq=131071; - int freqt=toFreq(chan[i].freq); - chan[i].freqH=freqt>>8; - chan[i].freqL=freqt&0xff; - immWrite(chanMap[i]+ADDR_FREQ,chan[i].freqL); - } - if (igetSample(chan[i].sample); + unsigned char ctrl=0; + double off=(s->centerRate>=1)?((double)s->centerRate/8363.0):1.0; + chan[i].freq=(int)(off*parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,(524288*768))); + if (chan[i].freq<0x400) chan[i].freq=0x400; + if (chan[i].freq>0x3ffffff) chan[i].freq=0x3ffffff; + if (chan[i].freq>=0x2000000) { + chan[i].freqH=15; + } else if (chan[i].freq>=0x1000000) { + chan[i].freqH=14; + } else if (chan[i].freq>=0x800000) { + chan[i].freqH=13; + } else if (chan[i].freq>=0x400000) { + chan[i].freqH=12; + } else if (chan[i].freq>=0x200000) { + chan[i].freqH=11; + } else if (chan[i].freq>=0x100000) { + chan[i].freqH=10; + } else if (chan[i].freq>=0x80000) { + chan[i].freqH=9; + } else if (chan[i].freq>=0x40000) { + chan[i].freqH=8; + } else if (chan[i].freq>=0x20000) { + chan[i].freqH=7; + } else if (chan[i].freq>=0x10000) { + chan[i].freqH=6; + } else if (chan[i].freq>=0x8000) { + chan[i].freqH=5; + } else if (chan[i].freq>=0x4000) { + chan[i].freqH=4; + } else if (chan[i].freq>=0x2000) { + chan[i].freqH=3; + } else if (chan[i].freq>=0x1000) { + chan[i].freqH=2; + } else if (chan[i].freq>=0x800) { + chan[i].freqH=1; } else { - immWrite(chanMap[i]+ADDR_FREQH,chan[i].freqH|(chan[i].active<<5)); + chan[i].freqH=0; + } + chan[i].freqL=(chan[i].freq>>chan[i].freqH)&0x3ff; + chan[i].freqH=8^chan[i].freqH; + ctrl|=(chan[i].active?0x80:0)|(chan[i].damp?0x40:0)|(chan[i].lfoReset?0x20:0)|(chan[i].ch?0x10:0)|(isMuted[i]?8:(chan[i].pan&0xf)); + unsigned int waveNum=chan[i].sample; + if (ramSize<=0x200000) { + waveNum=CLAMP(waveNum,0,0x7f)|0x180; + } + if (chan[i].keyOn) { + immWrite(PCM_ADDR_KEY_DAMP_LFORST_CH_PAN+PCM_REG(i),ctrl&~0x80); // force keyoff first + immWrite(PCM_ADDR_WAVE_H_FN_L+PCM_REG(i),((chan[i].freqL&0x7f)<<1)|((waveNum>>8)&1)); + immWrite(PCM_ADDR_WAVE_L+PCM_REG(i),waveNum&0xff); + immWrite(PCM_ADDR_LFO_VIB+PCM_REG(i),(chan[i].lfo<<3)|(chan[i].vib)); + immWrite(PCM_ADDR_AR_D1R+PCM_REG(i),(chan[i].ar<<4)|(chan[i].d1r)); + immWrite(PCM_ADDR_DL_D2R+PCM_REG(i),(chan[i].dl<<4)|(chan[i].d2r)); + immWrite(PCM_ADDR_RC_RR+PCM_REG(i),(chan[i].rc<<4)|(chan[i].rr)); + immWrite(PCM_ADDR_AM+PCM_REG(i),chan[i].am); + if (!chan[i].std.vol.had) { + chan[i].outVol=chan[i].vol; + immWrite(PCM_ADDR_TL+(PCM_REG(i)),((0x7f-chan[i].outVol)<<1)|(chan[i].levelDirect?1:0)); + } + chan[i].writeCtrl=true; + chan[i].keyOn=false; + } + if (chan[i].keyOff) { + chan[i].writeCtrl=true; + chan[i].keyOff=false; + } + if (chan[i].freqChanged) { + immWrite(PCM_ADDR_WAVE_H_FN_L+PCM_REG(i),((chan[i].freqL&0x7f)<<1)|((waveNum>>8)&1)); + immWrite(PCM_ADDR_FN_H_PR_OCT+PCM_REG(i),((chan[i].freqH&0xf)<<4)|(chan[i].pseudoReverb?0x08:0x00)|((chan[i].freqL>>7)&0x7)); + chan[i].freqChanged=false; + } + if (chan[i].writeCtrl) { + immWrite(PCM_ADDR_KEY_DAMP_LFORST_CH_PAN+PCM_REG(i),ctrl); + chan[i].writeCtrl=false; } } } else { - if (chan[i].keyOn) { - immWrite(chanMap[i]+ADDR_FREQH,chan[i].freqH); - if (!isMuted[i]) drumState|=(1<<(totalChans-i-1)); - updateDrums=true; - chan[i].keyOn=false; - } else if (chan[i].freqChanged) { - immWrite(chanMap[i]+ADDR_FREQH,chan[i].freqH); + if (chan[i].freqChanged) { + chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,octave(chan[i].baseFreq)*2,chan[i].pitch2,chipClock,CHIP_FREQBASE); + if (chan[i].fixedFreq>0) chan[i].freq=chan[i].fixedFreq; + if (chan[i].freq<0) chan[i].freq=0; + if (chan[i].freq>131071) chan[i].freq=131071; + int freqt=toFreq(chan[i].freq); + chan[i].freqH=freqt>>8; + chan[i].freqL=freqt&0xff; + immWrite(chanMap[i]+ADDR_FREQ,chan[i].freqL); } + if (imelodicChans && ins->type==DIV_INS_OPL_DRUMS) { for (int i=0; i<4; i++) { @@ -1369,7 +1692,62 @@ int DivPlatformOPL::dispatch(DivCommand c) { } switch (c.cmd) { case DIV_CMD_NOTE_ON: { - if (c.chan==adpcmChan) { // ADPCM + if (PCM_CHECK(c.chan)) { // OPL4 PCM + DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM); + chan[c.chan].macroVolMul=ins->type==DIV_INS_AMIGA?64:127; + if (c.value!=DIV_NOTE_NULL) { + chan[c.chan].sample=ins->amiga.getSample(c.value); + chan[c.chan].sampleNote=c.value; + c.value=ins->amiga.getFreq(c.value); + chan[c.chan].sampleNoteDelta=c.value-chan[c.chan].sampleNote; + } + if (c.value!=DIV_NOTE_NULL) { + chan[c.chan].baseFreq=NOTE_PCM(c.value); + } + if (chan[c.chan].sample<0 || chan[c.chan].sample>=parent->song.sampleLen) { + chan[c.chan].sample=-1; + } + if (c.value!=DIV_NOTE_NULL) { + chan[c.chan].freqChanged=true; + chan[c.chan].note=c.value; + } + if (ins->type==DIV_INS_MULTIPCM) { + chan[c.chan].lfo=ins->multipcm.lfo; + chan[c.chan].vib=ins->multipcm.vib; + chan[c.chan].am=ins->multipcm.am; + chan[c.chan].ar=ins->multipcm.ar; + chan[c.chan].d1r=ins->multipcm.d1r; + chan[c.chan].dl=ins->multipcm.dl; + chan[c.chan].d2r=ins->multipcm.d2r; + chan[c.chan].rc=ins->multipcm.rc; + chan[c.chan].rr=ins->multipcm.rr; + chan[c.chan].damp=ins->multipcm.damp; + chan[c.chan].pseudoReverb=ins->multipcm.pseudoReverb; + chan[c.chan].levelDirect=ins->multipcm.levelDirect; + chan[c.chan].lfoReset=ins->multipcm.lfoReset; + } else { + chan[c.chan].lfo=0; + chan[c.chan].vib=0; + chan[c.chan].am=0; + chan[c.chan].ar=15; + chan[c.chan].d1r=15; + chan[c.chan].dl=0; + chan[c.chan].d2r=0; + chan[c.chan].rc=15; + chan[c.chan].rr=15; + chan[c.chan].damp=false; + chan[c.chan].pseudoReverb=false; + chan[c.chan].levelDirect=true; + chan[c.chan].lfoReset=false; + } + chan[c.chan].active=true; + chan[c.chan].keyOn=true; + chan[c.chan].macroInit(ins); + if (!chan[c.chan].std.vol.will) { + chan[c.chan].outVol=chan[c.chan].vol; + } + break; + } else if (c.chan==adpcmChan) { // ADPCM DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_FM); chan[c.chan].macroVolMul=ins->type==DIV_INS_AMIGA?64:255; if (ins->type==DIV_INS_AMIGA || ins->type==DIV_INS_ADPCMB) { @@ -1493,6 +1871,10 @@ int DivPlatformOPL::dispatch(DivCommand c) { chan[c.chan].keyOff=true; chan[c.chan].keyOn=false; chan[c.chan].active=false; + if (PCM_CHECK(c.chan)) { + chan[c.chan].sample=-1; + chan[c.chan].macroInit(NULL); + } break; case DIV_CMD_NOTE_OFF_ENV: chan[c.chan].keyOff=true; @@ -1513,6 +1895,10 @@ int DivPlatformOPL::dispatch(DivCommand c) { if (!chan[c.chan].std.vol.has) { chan[c.chan].outVol=c.value; } + if (PCM_CHECK(c.chan)) { // OPL4 PCM + immWrite(PCM_ADDR_TL+PCM_REG(c.chan),((0x7f-chan[c.chan].outVol)<<1)|(chan[c.chan].levelDirect?1:0)); + break; + } if (c.chan==adpcmChan) { // ADPCM-B immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol)); break; @@ -1550,10 +1936,17 @@ int DivPlatformOPL::dispatch(DivCommand c) { chan[c.chan].ins=c.value; break; case DIV_CMD_PANNING: { + if (PCM_CHECK(c.chan)) { + chan[c.chan].ch=false; + chan[c.chan].pan=8^MIN(parent->convertPanSplitToLinearLR(c.value,c.value2,15)+1,15); + chan[c.chan].freqChanged=true; + chan[c.chan].writeCtrl=true; + break; + } if (oplType!=3) break; if (c.chan==adpcmChan) break; chan[c.chan].pan&=~3; - if (c.value==0 && c.value2==0 && compatPan) { + if (c.value==0 && c.value2==0 && ((chipType!=4) && compatPan)) { chan[c.chan].pan|=3; } else { chan[c.chan].pan|=(c.value>0)|((c.value2>0)<<1); @@ -1573,6 +1966,12 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_SURROUND_PANNING: { + if (PCM_CHECK(c.chan)) { + chan[c.chan].ch=true; + chan[c.chan].freqChanged=true; + chan[c.chan].writeCtrl=true; + break; + } if (oplType!=3) break; if (c.chan==adpcmChan) break; @@ -1608,6 +2007,29 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_NOTE_PORTA: { + if (PCM_CHECK(c.chan)) { + int destFreq=NOTE_PCM(c.value2+chan[c.chan].sampleNoteDelta); + bool return2=false; + if (destFreq>chan[c.chan].baseFreq) { + chan[c.chan].baseFreq+=c.value; + if (chan[c.chan].baseFreq>=destFreq) { + chan[c.chan].baseFreq=destFreq; + return2=true; + } + } else { + chan[c.chan].baseFreq-=c.value; + if (chan[c.chan].baseFreq<=destFreq) { + chan[c.chan].baseFreq=destFreq; + return2=true; + } + } + chan[c.chan].freqChanged=true; + if (return2) { + chan[c.chan].inPorta=false; + return 2; + } + break; + } int destFreq=(c.chan==adpcmChan)?(NOTE_ADPCMB(c.value2)):(NOTE_FREQUENCY(c.value2)); int newFreq; bool return2=false; @@ -1648,17 +2070,20 @@ int DivPlatformOPL::dispatch(DivCommand c) { iface.sampleBank=sampleBank; break; case DIV_CMD_LEGATO: { + // TODO: OPL4 PCM if (chan[c.chan].insChanged) { DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_FM); commitState(c.chan,ins); chan[c.chan].insChanged=false; } - chan[c.chan].baseFreq=(c.chan==adpcmChan)?(NOTE_ADPCMB(c.value)):(NOTE_FREQUENCY(c.value)); + chan[c.chan].baseFreq=(PCM_CHECK(c.chan))?NOTE_PCM(c.value+chan[c.chan].sampleNoteDelta+((HACKY_LEGATO_MESS)?(chan[c.chan].std.arp.val-12):(0))): + (c.chan==adpcmChan)?(NOTE_ADPCMB(c.value)):(NOTE_FREQUENCY(c.value)); chan[c.chan].note=c.value; chan[c.chan].freqChanged=true; break; } case DIV_CMD_FM_LFO: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; if (c.value&2) { dvb=c.value&1; @@ -1669,6 +2094,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_FB: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; chan[c.chan].state.fb=c.value&7; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; @@ -1686,6 +2112,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_MULT: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value>=ops) break; @@ -1698,6 +2125,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_TL: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value>=ops) break; @@ -1718,6 +2146,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_AR: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1741,6 +2170,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_DR: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1764,6 +2194,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_SL: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1787,6 +2218,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_RR: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1810,6 +2242,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_AM: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1833,6 +2266,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_VIB: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1856,6 +2290,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_SUS: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1879,6 +2314,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_KSR: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; if (c.value<0) { @@ -1902,6 +2338,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_WS: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; if (oplType<2) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; @@ -1926,6 +2363,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_RS: { + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; if (oplType<2) break; int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; @@ -1974,6 +2412,10 @@ int DivPlatformOPL::dispatch(DivCommand c) { chanMap=properDrums?chanMapOPL3Drums:chanMapOPL3; melodicChans=properDrums?15:18; totalChans=properDrums?20:18; + if (chipType==4) { + pcmChanOffs=totalChans; + totalChans+=24; + } } else { chanMap=properDrums?chanMapOPL2Drums:chanMapOPL2; melodicChans=properDrums?6:9; @@ -1982,9 +2424,103 @@ int DivPlatformOPL::dispatch(DivCommand c) { break; } case DIV_CMD_FM_HARD_RESET: + if (PCM_CHECK(c.chan)) break; if (c.chan==adpcmChan) break; chan[c.chan].hardReset=c.value; break; + case DIV_CMD_MULTIPCM_MIX_FM: + if (chipType==4) { + fmMixL=CLAMP((c.value&0x70)>>4,0,7); + fmMixR=CLAMP((c.value&0x7),0,7); + immWrite(PCM_ADDR_MIX_FM,((7-fmMixR)<<3)|(7-fmMixL)); + } + break; + case DIV_CMD_MULTIPCM_MIX_PCM: + if (chipType==4) { + pcmMixL=CLAMP((c.value&0x70)>>4,0,7); + pcmMixR=CLAMP((c.value&0x7),0,7); + immWrite(PCM_ADDR_MIX_PCM,((7-pcmMixR)<<3)|(7-pcmMixL)); + } + break; + case DIV_CMD_MULTIPCM_LFO: + if (PCM_CHECK(c.chan)) { + chan[c.chan].lfo=c.value&7; + rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib)); + } + break; + case DIV_CMD_MULTIPCM_VIB: + if (PCM_CHECK(c.chan)) { + chan[c.chan].vib=c.value&7; + rWrite(PCM_ADDR_LFO_VIB+PCM_REG(c.chan),(chan[c.chan].lfo<<3)|(chan[c.chan].vib)); + } + break; + case DIV_CMD_MULTIPCM_AM: + if (PCM_CHECK(c.chan)) { + chan[c.chan].am=c.value&7; + rWrite(PCM_ADDR_AM+PCM_REG(c.chan),chan[c.chan].am); + } + break; + case DIV_CMD_MULTIPCM_AR: + if (PCM_CHECK(c.chan)) { + chan[c.chan].ar=c.value&0xf; + rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r)); + } + break; + case DIV_CMD_MULTIPCM_D1R: + if (PCM_CHECK(c.chan)) { + chan[c.chan].d1r=c.value&0xf; + rWrite(PCM_ADDR_AR_D1R+PCM_REG(c.chan),(chan[c.chan].ar<<4)|(chan[c.chan].d1r)); + } + break; + case DIV_CMD_MULTIPCM_DL: + if (PCM_CHECK(c.chan)) { + chan[c.chan].dl=c.value&0xf; + rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r)); + } + break; + case DIV_CMD_MULTIPCM_D2R: + if (PCM_CHECK(c.chan)) { + chan[c.chan].d2r=c.value&0xf; + rWrite(PCM_ADDR_DL_D2R+PCM_REG(c.chan),(chan[c.chan].dl<<4)|(chan[c.chan].d2r)); + } + break; + case DIV_CMD_MULTIPCM_RC: + if (PCM_CHECK(c.chan)) { + chan[c.chan].rc=c.value&0xf; + rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr)); + } + break; + case DIV_CMD_MULTIPCM_RR: + if (PCM_CHECK(c.chan)) { + chan[c.chan].rr=c.value&0xf; + rWrite(PCM_ADDR_RC_RR+PCM_REG(c.chan),(chan[c.chan].rc<<4)|(chan[c.chan].rr)); + } + break; + case DIV_CMD_MULTIPCM_DAMP: + if (PCM_CHECK(c.chan)) { + chan[c.chan].damp=c.value&1; + chan[c.chan].freqChanged=true; + chan[c.chan].writeCtrl=true; + } + break; + case DIV_CMD_MULTIPCM_PSEUDO_REVERB: + if (PCM_CHECK(c.chan)) { + chan[c.chan].pseudoReverb=c.value&1; + chan[c.chan].freqChanged=true; + } + break; + case DIV_CMD_MULTIPCM_LFO_RESET: + if (PCM_CHECK(c.chan)) { + chan[c.chan].lfoReset=c.value&1; + chan[c.chan].freqChanged=true; + chan[c.chan].writeCtrl=true; + } + break; + case DIV_CMD_MULTIPCM_LEVEL_DIRECT: + if (PCM_CHECK(c.chan)) { + immWrite(PCM_ADDR_TL+PCM_REG(c.chan),((0x7f-chan[c.chan].outVol)<<1)|(chan[c.chan].levelDirect?1:0)); + } + break; case DIV_CMD_MACRO_OFF: chan[c.chan].std.mask(c.value,true); break; @@ -1995,13 +2531,18 @@ int DivPlatformOPL::dispatch(DivCommand c) { chan[c.chan].std.restart(c.value); break; case DIV_CMD_GET_VOLMAX: + if (PCM_CHECK(c.chan)) return 127; if (c.chan==adpcmChan) return 255; if (pretendYMU) return 127; return 63; break; case DIV_CMD_PRE_PORTA: + if (PCM_CHECK(c.chan) && chan[c.chan].active && c.value2) { + if (parent->song.resetMacroOnPorta) chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_MULTIPCM)); + } if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) { - chan[c.chan].baseFreq=(c.chan==adpcmChan)?(NOTE_ADPCMB(chan[c.chan].note)):(NOTE_FREQUENCY(chan[c.chan].note)); + chan[c.chan].baseFreq=(PCM_CHECK(c.chan))?NOTE_PCM(chan[c.chan].note): + ((c.chan==adpcmChan)?(NOTE_ADPCMB(chan[c.chan].note)):(NOTE_FREQUENCY(chan[c.chan].note))); } chan[c.chan].inPorta=c.value; break; @@ -2019,6 +2560,10 @@ void DivPlatformOPL::forceIns() { chanMap=properDrums?chanMapOPL3Drums:chanMapOPL3; melodicChans=properDrums?15:18; totalChans=properDrums?20:18; + if (chipType==4) { + pcmChanOffs=totalChans; + totalChans+=24; + } } else { chanMap=properDrums?chanMapOPL2Drums:chanMapOPL2; melodicChans=properDrums?6:9; @@ -2067,7 +2612,7 @@ void DivPlatformOPL::forceIns() { } */ } - for (int i=0; i<512; i++) { + for (int i=0; i<768; i++) { oldWrites[i]=-1; } immWrite(0xbd,(dam<<7)|(dvb<<6)|(properDrums<<5)|drumState); @@ -2088,6 +2633,9 @@ DivMacroInt* DivPlatformOPL::getChanMacroInt(int ch) { unsigned short DivPlatformOPL::getPan(int ch) { if (totalOutputs<=1) return 0; + if (PCM_CHECK(ch)) { + return parent->convertPanLinearToSplit(8^chan[ch].pan,8,15); + } /*if (chan[ch&(~1)].fourOp) { if (ch&1) { return ((chan[ch-1].pan&2)<<7)|(chan[ch-1].pan&1); @@ -2098,13 +2646,12 @@ unsigned short DivPlatformOPL::getPan(int ch) { return ((chan[ch].pan&1)<<8)|((chan[ch].pan&2)>>1); } -DivChannelPair DivPlatformOPL::getPaired(int ch) { +void DivPlatformOPL::getPaired(int ch, std::vector& ret) { if (oplType==3 && ch<12 && !(ch&1)) { if (chan[ch].fourOp) { - return DivChannelPair("4OP",ch+1); + ret.push_back(DivChannelPair(_("4OP"),ch+1)); } } - return DivChannelPair(); } DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) { @@ -2126,6 +2673,19 @@ DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) { } int DivPlatformOPL::mapVelocity(int ch, float vel) { + if (PCM_CHECK(ch)) { // TODO: correct? + // -0.375dB per step + // -6: 64: 16 + // -12: 32: 32 + // -18: 16: 48 + // -24: 8: 64 + // -30: 4: 80 + // -36: 2: 96 + // -42: 1: 112 + if (vel==0) return 0; + if (vel>=1.0) return 127; + return CLAMP(round(128.0-(112.0-log2(vel*127.0)*16.0)),0,127); + } if (ch==adpcmChan) return vel*255.0; // -0.75dB per step // -6: 64: 8 @@ -2142,6 +2702,8 @@ int DivPlatformOPL::mapVelocity(int ch, float vel) { float DivPlatformOPL::getGain(int ch, int vol) { if (vol==0) return 0; + if (PCM_CHECK(ch)) return 1.0/pow(10.0,(float)(127-vol)*0.375/20.0); + if (ch==adpcmChan) return (float)vol/255.0; return 1.0/pow(10.0,(float)(63-vol)*0.75/20.0); } @@ -2150,12 +2712,12 @@ unsigned char* DivPlatformOPL::getRegisterPool() { } int DivPlatformOPL::getRegisterPoolSize() { - return (oplType<3)?256:512; + return (chipType==4)?768:((oplType<3)?256:512); } void DivPlatformOPL::reset() { while (!writes.empty()) writes.pop(); - memset(regPool,0,512); + memset(regPool,0,768); dacVal=0; dacVal2=0; @@ -2209,6 +2771,9 @@ void DivPlatformOPL::reset() { case 3: case 759: fm_ymfm3->reset(); break; + case 4: + fm_ymfm4->reset(); + break; } } else { if (downsample) { @@ -2217,6 +2782,7 @@ void DivPlatformOPL::reset() { OPL3_Reset(&fm,rate); } } + pcm.reset(); if (dumpWrites) { addWrite(0xffffffff,0); @@ -2228,6 +2794,10 @@ void DivPlatformOPL::reset() { outChanMap=outChanMapOPL3; melodicChans=properDrums?15:18; totalChans=properDrums?20:18; + if (chipType==4) { + pcmChanOffs=totalChans; + totalChans+=24; + } } else { chanMap=properDrums?chanMapOPL2Drums:chanMapOPL2; outChanMap=outChanMapOPL2; @@ -2238,8 +2808,9 @@ void DivPlatformOPL::reset() { for (int i=0; i=0) { @@ -2261,7 +2832,7 @@ void DivPlatformOPL::reset() { fm.channel[outChanMap[i]].muted=isMuted[i]; } - for (int i=0; i<512; i++) { + for (int i=0; i<768; i++) { oldWrites[i]=-1; pendingWrites[i]=-1; } @@ -2282,7 +2853,20 @@ void DivPlatformOPL::reset() { } if (oplType==3) { // enable OPL3 features - immWrite(0x105,1); + if (chipType==4) { + immWrite(0x105,3); + // Reset wavetable header + immWrite(0x202,(ramSize<=0x200000)?0x10:0x00); + // initialize mixer volume + fmMixL=7; + fmMixR=7; + pcmMixL=7; + pcmMixR=7; + immWrite(PCM_ADDR_MIX_FM,((7-fmMixR)<<3)|(7-fmMixL)); + immWrite(PCM_ADDR_MIX_PCM,((7-pcmMixR)<<3)|(7-pcmMixL)); + } else { + immWrite(0x105,1); + } } update4OpMask=true; @@ -2373,6 +2957,8 @@ void DivPlatformOPL::setOPLType(int type, bool drums) { pretendYMU=true; adpcmChan=16; } else if (type==4) { + pcmChanOffs=totalChans; + totalChans+=24; chipFreqBase=32768*684; downsample=true; } @@ -2498,18 +3084,43 @@ void DivPlatformOPL::setFlags(const DivConfig& flags) { case 4: switch (flags.getInt("clockSel",0)) { case 0x01: - chipClock=COLOR_PAL*32.0/5.0; + chipClock=COLOR_NTSC*8.0; break; case 0x02: - chipClock=33868800.0; + chipClock=COLOR_PAL*32.0/5.0; break; default: - chipClock=COLOR_NTSC*8.0; + chipClock=33868800.0; + break; + } + switch (flags.getInt("ramSize",0)) { + case 0x01: // 2MB (512KB 512KB 512KB 512KB) + ramSize=0x200000; + break; + case 0x02: // 1MB (512KB 512KB) + ramSize=0x100000; + break; + case 0x03: // 640KB (512KB 128KB) + ramSize=0xa0000; + break; + case 0x04: // 512KB + ramSize=0x80000; + break; + case 0x05: // 256KB (128KB 128KB) + ramSize=0x40000; + break; + case 0x06: // 128KB + ramSize=0x20000; + break; + default: + ramSize=0x400000; break; } CHECK_CUSTOM_CLOCK; + pcm.setClockFrequency(chipClock); rate=chipClock/768; chipRateBase=chipClock/684; + immWrite(0x202,(ramSize<=0x200000)?0x10:0x00); break; case 759: rate=48000; @@ -2519,21 +3130,25 @@ void DivPlatformOPL::setFlags(const DivConfig& flags) { } compatPan=flags.getBool("compatPan",false); - for (int i=0; i<20; i++) { + for (int i=0; i<44; i++) { oscBuf[i]->rate=rate; } } const void* DivPlatformOPL::getSampleMem(int index) { - return (index==0 && adpcmChan>=0) ? adpcmBMem : NULL; + return (index==0 && pcmChanOffs>=0)?pcmMem: + (index==0 && adpcmChan>=0)?adpcmBMem:NULL; } size_t DivPlatformOPL::getSampleMemCapacity(int index) { - return (index==0 && adpcmChan>=0) ? 262144 : 0; + return (index==0 && pcmChanOffs>=0)? + ((ramSize<=0x200000)?0x200000+ramSize:ramSize): + ((index==0 && adpcmChan>=0)?262144:0); } size_t DivPlatformOPL::getSampleMemUsage(int index) { - return (index==0 && adpcmChan>=0) ? adpcmBMemLen : 0; + return (index==0 && pcmChanOffs>=0)?pcmMemLen: + (index==0 && adpcmChan>=0)?adpcmBMemLen:0; } bool DivPlatformOPL::isSampleLoaded(int index, int sample) { @@ -2543,50 +3158,147 @@ bool DivPlatformOPL::isSampleLoaded(int index, int sample) { } const DivMemoryComposition* DivPlatformOPL::getMemCompo(int index) { - if (adpcmChan<0) return NULL; + if ((adpcmChan<0) && (pcmChanOffs<0)) return NULL; if (index!=0) return NULL; return &memCompo; } void DivPlatformOPL::renderSamples(int sysID) { - if (adpcmChan<0) return; - memset(adpcmBMem,0,getSampleMemCapacity(0)); + if (adpcmChan<0 && pcmChanOffs<0) return; + if (adpcmChan>=0 && adpcmBMem!=NULL) { + memset(adpcmBMem,0,262144); + } + if (pcmChanOffs>=0 && pcmMem!=NULL) { + memset(pcmMem,0,4194304); + } + memset(sampleOffPCM,0,256*sizeof(unsigned int)); memset(sampleOffB,0,256*sizeof(unsigned int)); memset(sampleLoaded,0,256*sizeof(bool)); memCompo=DivMemoryComposition(); memCompo.name="Sample Memory"; - size_t memPos=0; - for (int i=0; isong.sampleLen; i++) { - DivSample* s=parent->song.sample[i]; - if (!s->renderOn[0][sysID]) { - sampleOffB[i]=0; - continue; - } + if (pcmChanOffs>=0) { // OPL4 PCM + size_t memPos=((ramSize<=0x200000)?0x200600:0x1800); + const int maxSample=(ramSize<=0x200000)?127:511; + int sampleCount=parent->song.sampleLen; + if (sampleCount>maxSample) sampleCount=maxSample; + for (int i=0; isong.sample[i]; + if (!s->renderOn[0][sysID]) { + sampleOffPCM[i]=0; + continue; + } - int paddedLen=(s->lengthB+255)&(~0xff); - if ((memPos&0xf00000)!=((memPos+paddedLen)&0xf00000)) { - memPos=(memPos+0xfffff)&0xf00000; - } - if (memPos>=getSampleMemCapacity(0)) { - logW("out of ADPCM memory for sample %d!",i); - break; - } - if (memPos+paddedLen>=getSampleMemCapacity(0)) { - memcpy(adpcmBMem+memPos,s->dataB,getSampleMemCapacity(0)-memPos); - logW("out of ADPCM memory for sample %d!",i); - } else { - memcpy(adpcmBMem+memPos,s->dataB,paddedLen); + int length; + switch (s->depth) { + default: + case DIV_SAMPLE_DEPTH_8BIT: + length=MIN(65535,s->getLoopEndPosition(DIV_SAMPLE_DEPTH_8BIT)); + break; + case DIV_SAMPLE_DEPTH_12BIT: + length=MIN(98303,s->getLoopEndPosition(DIV_SAMPLE_DEPTH_12BIT)); + break; + case DIV_SAMPLE_DEPTH_16BIT: + length=MIN(131070,s->getLoopEndPosition(DIV_SAMPLE_DEPTH_16BIT)); + break; + } + unsigned char* src=(unsigned char*)s->getCurBuf(); + int actualLength=MIN((int)(getSampleMemCapacity(0)-memPos),length); + if (actualLength>0) { + #ifdef TA_BIG_ENDIAN + memcpy(&pcmMem[memPos],src,actualLength); + #else + if (s->depth==DIV_SAMPLE_DEPTH_16BIT) { + for (int i=0; isong.sample[i]; + unsigned int insAddr=(i*12)+((ramSize<=0x200000)?0x200000:0); + unsigned char bitDepth; + int endPos=CLAMP(s->loopEnd,1,0x10000); + int loop=s->isLoopable()?CLAMP(s->loopStart,0,endPos-1):(endPos-1); + switch (s->depth) { + default: + case DIV_SAMPLE_DEPTH_8BIT: + bitDepth=0; + break; + case DIV_SAMPLE_DEPTH_12BIT: + bitDepth=1; + break; + case DIV_SAMPLE_DEPTH_16BIT: + bitDepth=2; + break; + } + pcmMem[insAddr]=(bitDepth<<6)|((sampleOffPCM[i]>>16)&0x3f); + pcmMem[1+insAddr]=(sampleOffPCM[i]>>8)&0xff; + pcmMem[2+insAddr]=(sampleOffPCM[i])&0xff; + pcmMem[3+insAddr]=(loop>>8)&0xff; + pcmMem[4+insAddr]=(loop)&0xff; + pcmMem[5+insAddr]=((~(endPos-1))>>8)&0xff; + pcmMem[6+insAddr]=(~(endPos-1))&0xff; + // TODO: how to fill in rest of instrument table? + pcmMem[7+insAddr]=0; // LFO, VIB + pcmMem[8+insAddr]=(0xf << 4) | (0xf << 0); // AR, D1R + pcmMem[9+insAddr]=0; // DL, D2R + pcmMem[10+insAddr]=(0xf << 4) | (0xf << 0); // RC, RR + pcmMem[11+insAddr]=0; // AM + } + if (ramSize<=0x200000) { + memCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_RESERVED,"ROM data",0,0,0x200000)); + } + + memCompo.used=pcmMemLen; + } else if (adpcmChan>=0) { // ADPCM + size_t memPos=0; + for (int i=0; isong.sampleLen; i++) { + DivSample* s=parent->song.sample[i]; + if (!s->renderOn[0][sysID]) { + sampleOffB[i]=0; + continue; + } + + int paddedLen=(s->lengthB+255)&(~0xff); + if ((memPos&0xf00000)!=((memPos+paddedLen)&0xf00000)) { + memPos=(memPos+0xfffff)&0xf00000; + } + if (memPos>=getSampleMemCapacity(0)) { + logW("out of ADPCM memory for sample %d!",i); + break; + } + if (memPos+paddedLen>=getSampleMemCapacity(0)) { + memcpy(adpcmBMem+memPos,s->dataB,getSampleMemCapacity(0)-memPos); + logW("out of ADPCM memory for sample %d!",i); + } else { + memcpy(adpcmBMem+memPos,s->dataB,paddedLen); + sampleLoaded[i]=true; + } + sampleOffB[i]=memPos; + memCompo.entries.push_back(DivMemoryEntry(DIV_MEMORY_SAMPLE,"Sample",i,memPos,memPos+paddedLen)); + memPos+=paddedLen; + } + adpcmBMemLen=memPos+256; + + memCompo.used=adpcmBMemLen; + } memCompo.capacity=getSampleMemCapacity(0); } @@ -2594,10 +3306,10 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, const DivConfi parent=p; dumpWrites=false; skipRegisterWrites=false; - for (int i=0; i<20; i++) { + for (int i=0; i<44; i++) { isMuted[i]=false; } - for (int i=0; i<20; i++) { + for (int i=0; i<44; i++) { oscBuf[i]=new DivDispatchOscBuffer; } @@ -2605,6 +3317,7 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, const DivConfi fm_ymfm2=NULL; fm_ymfm8950=NULL; fm_ymfm3=NULL; + fm_ymfm4=NULL; if (emuCore==1) { switch (chipType) { @@ -2620,31 +3333,45 @@ int DivPlatformOPL::init(DivEngine* p, int channels, int sugRate, const DivConfi case 3: case 759: fm_ymfm3=new ymfm::ymf262(iface); break; + case 4: + fm_ymfm4=new ymfm::ymf278b(iface); + break; } } setFlags(flags); if (adpcmChan>=0) { - adpcmBMem=new unsigned char[getSampleMemCapacity(0)]; + adpcmBMem=new unsigned char[262144]; adpcmBMemLen=0; iface.adpcmBMem=adpcmBMem; iface.sampleBank=0; adpcmB=new ymfm::adpcm_b_engine(iface,2); } + if (pcmChanOffs>=0) { + pcmMem=new unsigned char[4194304]; + pcmMemLen=0; + iface.pcmMem=pcmMem; + iface.sampleBank=0; + pcmMemory.memory=pcmMem; + } + reset(); return totalChans; } void DivPlatformOPL::quit() { - for (int i=0; i<20; i++) { + for (int i=0; i<44; i++) { delete oscBuf[i]; } if (adpcmChan>=0) { delete adpcmB; delete[] adpcmBMem; } + if (pcmChanOffs>=0) { + delete[] pcmMem; + } if (fm_ymfm1!=NULL) { delete fm_ymfm1; fm_ymfm1=NULL; @@ -2661,6 +3388,10 @@ void DivPlatformOPL::quit() { delete fm_ymfm3; fm_ymfm3=NULL; } + if (fm_ymfm4!=NULL) { + delete fm_ymfm4; + fm_ymfm4=NULL; + } } DivPlatformOPL::~DivPlatformOPL() { diff --git a/src/engine/platform/opl.h b/src/engine/platform/opl.h index 327389c1f..7a6826c5a 100644 --- a/src/engine/platform/opl.h +++ b/src/engine/platform/opl.h @@ -29,24 +29,41 @@ extern "C" { } #include "sound/ymfm/ymfm_adpcm.h" #include "sound/ymfm/ymfm_opl.h" +#include "sound/ymfm/ymfm_pcm.h" +#include "sound/ymf278b/ymf278.h" class DivOPLAInterface: public ymfm::ymfm_interface { public: unsigned char* adpcmBMem; + unsigned char* pcmMem; int sampleBank; uint8_t ymfm_external_read(ymfm::access_class type, uint32_t address); void ymfm_external_write(ymfm::access_class type, uint32_t address, uint8_t data); - DivOPLAInterface(): adpcmBMem(NULL), sampleBank(0) {} + DivOPLAInterface(): adpcmBMem(NULL), pcmMem(NULL), sampleBank(0) {} +}; + +class DivYMF278MemoryInterface: public MemoryInterface { + public: + unsigned char* memory; + DivYMF278MemoryInterface(unsigned size_) : memory(NULL), size(size_) {}; + byte operator[](unsigned address) const override; + unsigned getSize() const override { return size; }; + void write(unsigned address, byte value) override {}; + void clear(byte value) override {}; + private: + unsigned size; }; class DivPlatformOPL: public DivDispatch { protected: struct Channel: public SharedChannel { DivInstrumentFM state; - unsigned char freqH, freqL; + unsigned int freqH, freqL; int sample, fixedFreq; - bool furnacePCM, fourOp, hardReset; - unsigned char pan; + bool furnacePCM, fourOp, hardReset, writeCtrl; + bool levelDirect, damp, pseudoReverb, lfoReset, ch; + int lfo, vib, am, ar, d1r, d2r, dl, rc, rr; + int pan; int macroVolMul; Channel(): SharedChannel(0), @@ -57,14 +74,29 @@ class DivPlatformOPL: public DivDispatch { furnacePCM(false), fourOp(false), hardReset(false), + writeCtrl(false), + levelDirect(true), + damp(false), + pseudoReverb(false), + lfoReset(false), + ch(false), + lfo(0), + vib(0), + am(0), + ar(15), + d1r(15), + d2r(0), + dl(0), + rc(15), + rr(15), pan(3), macroVolMul(64) { state.ops=2; } }; - Channel chan[20]; - DivDispatchOscBuffer* oscBuf[20]; - bool isMuted[20]; + Channel chan[44]; + DivDispatchOscBuffer* oscBuf[44]; + bool isMuted[44]; struct QueuedWrite { unsigned short addr; unsigned char val; @@ -72,7 +104,7 @@ class DivPlatformOPL: public DivDispatch { QueuedWrite(): addr(0), val(0), addrOrVal(false) {} QueuedWrite(unsigned short a, unsigned char v): addr(a), val(v), addrOrVal(false) {} }; - FixedQueue writes; + FixedQueue writes; unsigned int dacVal; unsigned int dacVal2; @@ -86,8 +118,12 @@ class DivPlatformOPL: public DivDispatch { unsigned char* adpcmBMem; size_t adpcmBMemLen; + unsigned char* pcmMem; + size_t pcmMemLen; DivOPLAInterface iface; + DivYMF278MemoryInterface pcmMemory; unsigned int sampleOffB[256]; + unsigned int sampleOffPCM[256]; bool sampleLoaded[256]; ymfm::adpcm_b_engine* adpcmB; @@ -97,12 +133,13 @@ class DivPlatformOPL: public DivDispatch { const unsigned short* chanMap; const unsigned char* outChanMap; int chipFreqBase, chipRateBase; - int delay, chipType, oplType, chans, melodicChans, totalChans, adpcmChan, sampleBank, totalOutputs; + int delay, chipType, oplType, chans, melodicChans, totalChans, adpcmChan=-1, pcmChanOffs=-1, sampleBank, totalOutputs, ramSize; + int fmMixL=7, fmMixR=7, pcmMixL=7, pcmMixR=7; unsigned char lastBusy; unsigned char drumState; unsigned char drumVol[5]; - unsigned char regPool[512]; + unsigned char regPool[768]; bool properDrums, properDrumsSys, dam, dvb; @@ -115,15 +152,17 @@ class DivPlatformOPL: public DivDispatch { bool update4OpMask, pretendYMU, downsample, compatPan; - short oldWrites[512]; - short pendingWrites[512]; + short oldWrites[768]; + short pendingWrites[768]; // chips opl3_chip fm; + YMF278 pcm; ymfm::ym3526* fm_ymfm1; ymfm::ym3812* fm_ymfm2; ymfm::y8950* fm_ymfm8950; ymfm::ymf262* fm_ymfm3; + ymfm::ymf278b* fm_ymfm4; fmopl2_t fm_lle2; fmopl3_t fm_lle3; @@ -141,6 +180,7 @@ class DivPlatformOPL: public DivDispatch { void acquire_nukedLLE3(short** buf, size_t len); void acquire_nuked(short** buf, size_t len); void acquire_ymfm3(short** buf, size_t len); + void acquire_ymfm4(short** buf, size_t len); void acquire_ymfm8950(short** buf, size_t len); void acquire_ymfm2(short** buf, size_t len); void acquire_ymfm1(short** buf, size_t len); @@ -151,7 +191,7 @@ class DivPlatformOPL: public DivDispatch { void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); unsigned short getPan(int chan); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivDispatchOscBuffer* getOscBuffer(int chan); int mapVelocity(int ch, float vel); float getGain(int ch, int vol); @@ -182,6 +222,9 @@ class DivPlatformOPL: public DivDispatch { void renderSamples(int chipID); int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags); void quit(); + DivPlatformOPL(): + pcmMemory(0x400000), + pcm(pcmMemory) {} ~DivPlatformOPL(); }; #endif diff --git a/src/engine/platform/oplAInterface.cpp b/src/engine/platform/oplAInterface.cpp index 9643b80c0..dcd5c8e85 100644 --- a/src/engine/platform/oplAInterface.cpp +++ b/src/engine/platform/oplAInterface.cpp @@ -28,6 +28,11 @@ uint8_t DivOPLAInterface::ymfm_external_read(ymfm::access_class type, uint32_t a return 0; } return adpcmBMem[address&0x3ffff]; + case ymfm::ACCESS_PCM: + if (pcmMem==NULL) { + return 0; + } + return pcmMem[address&0x3fffff]; default: return 0; } @@ -36,3 +41,10 @@ uint8_t DivOPLAInterface::ymfm_external_read(ymfm::access_class type, uint32_t a void DivOPLAInterface::ymfm_external_write(ymfm::access_class type, uint32_t address, uint8_t data) { } + +byte DivYMF278MemoryInterface::operator[](unsigned address) const { + if (memory && address& ret) { if (ch==1 && lfoMode>0) { - return DivChannelPair("mod",0); + ret.push_back(DivChannelPair(_("mod"),0)); } - return DivChannelPair(); } DivChannelModeHints DivPlatformPCE::getModeHints(int ch) { diff --git a/src/engine/platform/pce.h b/src/engine/platform/pce.h index 725d1c232..f780c7a3e 100644 --- a/src/engine/platform/pce.h +++ b/src/engine/platform/pce.h @@ -85,7 +85,7 @@ class DivPlatformPCE: public DivDispatch { void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); unsigned short getPan(int chan); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivChannelModeHints getModeHints(int chan); DivSamplePos getSamplePos(int ch); DivDispatchOscBuffer* getOscBuffer(int chan); diff --git a/src/engine/platform/pokey.cpp b/src/engine/platform/pokey.cpp index 6f524210e..9182b065e 100644 --- a/src/engine/platform/pokey.cpp +++ b/src/engine/platform/pokey.cpp @@ -407,22 +407,21 @@ DivMacroInt* DivPlatformPOKEY::getChanMacroInt(int ch) { return &chan[ch].std; } -DivChannelPair DivPlatformPOKEY::getPaired(int ch) { +void DivPlatformPOKEY::getPaired(int ch, std::vector& ret) { switch (ch) { case 0: - if (audctl&4) return DivChannelPair("filter",2); + if (audctl&4) ret.push_back(DivChannelPair(_("filter"),2)); break; case 1: - if (audctl&16) return DivChannelPair("16-bit",0); + if (audctl&16) ret.push_back(DivChannelPair(_("16-bit"),0)); break; case 2: - if (audctl&8) return DivChannelPair("16-bit",3); + if (audctl&8) ret.push_back(DivChannelPair(_("16-bit"),3)); break; case 3: - if (audctl&2) return DivChannelPair("filter",1); + if (audctl&2) ret.push_back(DivChannelPair(_("filter"),1)); break; } - return DivChannelPair(); } DivDispatchOscBuffer* DivPlatformPOKEY::getOscBuffer(int ch) { diff --git a/src/engine/platform/pokey.h b/src/engine/platform/pokey.h index 6407c0778..4a973e5e9 100644 --- a/src/engine/platform/pokey.h +++ b/src/engine/platform/pokey.h @@ -65,7 +65,7 @@ class DivPlatformPOKEY: public DivDispatch { int dispatch(DivCommand c); void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivDispatchOscBuffer* getOscBuffer(int chan); unsigned char* getRegisterPool(); int getRegisterPoolSize(); diff --git a/src/engine/platform/sid2.cpp b/src/engine/platform/sid2.cpp index cc0a13f5c..cb3bf0beb 100644 --- a/src/engine/platform/sid2.cpp +++ b/src/engine/platform/sid2.cpp @@ -93,7 +93,10 @@ void DivPlatformSID2::acquire(short** buf, size_t len) for(int j = 0; j < 3; j++) { - oscBuf[j]->data[oscBuf[j]->needle++] = sid2->chan_out[j] / 4; + int co=sid2->chan_out[j]>>2; + if (co<-32768) co=-32768; + if (co>32767) co=32767; + oscBuf[j]->data[oscBuf[j]->needle++]=co; } } } @@ -113,6 +116,21 @@ void DivPlatformSID2::tick(bool sysTick) { bool willUpdateFilter = false; chan[i].std.next(); + + if (sysTick) { + if (chan[i].pw_slide!=0) { + chan[i].duty-=chan[i].pw_slide; + chan[i].duty=CLAMP(chan[i].duty,0,0xfff); + rWrite(i*7+2,chan[i].duty&0xff); + rWrite(i*7+3,(chan[i].duty>>8)|(chan[i].outVol<<4)); + } + if (chan[i].cutoff_slide!=0) { + chan[i].filtCut+=chan[i].cutoff_slide; + chan[i].filtCut=CLAMP(chan[i].filtCut,0,0xfff); + updateFilter(i); + } + } + if (chan[i].std.vol.had) { chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&15,MIN(15,chan[i].std.vol.val),15); rWrite(i*7+3,(chan[i].duty>>8) | (chan[i].outVol << 4)); @@ -297,7 +315,7 @@ int DivPlatformSID2::dispatch(DivCommand c) { chan[c.chan].keyOn=true; chan[c.chan].test=false; - if (chan[c.chan].insChanged || chan[c.chan].resetDuty || ins->std.waveMacro.len>0) { + if (((chan[c.chan].insChanged || chan[c.chan].resetDuty || ins->std.waveMacro.len>0) && ins->c64.resetDuty) || chan[c.chan].resetDuty) { chan[c.chan].duty=ins->c64.duty; rWrite(c.chan*7+2,chan[c.chan].duty&0xff); rWrite(c.chan*7+3,(chan[c.chan].duty>>8) | (chan[c.chan].outVol << 4)); @@ -521,6 +539,12 @@ int DivPlatformSID2::dispatch(DivCommand c) { break; } break; + case DIV_CMD_C64_PW_SLIDE: + chan[c.chan].pw_slide=c.value*c.value2; + break; + case DIV_CMD_C64_CUTOFF_SLIDE: + chan[c.chan].cutoff_slide=c.value*c.value2; + break; case DIV_CMD_MACRO_OFF: chan[c.chan].std.mask(c.value,true); break; @@ -574,15 +598,31 @@ DivMacroInt* DivPlatformSID2::getChanMacroInt(int ch) { return &chan[ch].std; } +void DivPlatformSID2::getPaired(int ch, std::vector& ret) { + if (chan[ch].ring) { + if (ch==0) { + ret.push_back(DivChannelPair(_("ring"),2)); + } else { + ret.push_back(DivChannelPair(_("ring"),(ch-1)%3)); + } + } + if (chan[ch].sync) { + if (ch==0) { + ret.push_back(DivChannelPair(_("sync"),2)); + } else { + ret.push_back(DivChannelPair(_("sync"),(ch-1)%3)); + } + } +} + DivChannelModeHints DivPlatformSID2::getModeHints(int ch) { DivChannelModeHints ret; ret.count=1; ret.hint[0]=ICON_FA_BELL_SLASH_O; ret.type[0]=0; - if (ch == 2 && (chan[ch].filtControl & 8)) { - ret.type[0] = 7; - } - else if (!chan[ch].gate) { + if (ch==2 && (chan[ch].filtControl & 8)) { + ret.type[0]=7; + } else if (!chan[ch].gate) { ret.type[0]=4; } @@ -633,6 +673,9 @@ void DivPlatformSID2::reset() { chan[i].noise_mode = 0; rWrite(0x3 + 7 * i,0xf0); + + chan[i].cutoff_slide = 0; + chan[i].pw_slide = 0; } sid2->reset(); diff --git a/src/engine/platform/sid2.h b/src/engine/platform/sid2.h index f1dc71f3f..124f3a505 100644 --- a/src/engine/platform/sid2.h +++ b/src/engine/platform/sid2.h @@ -36,7 +36,8 @@ class DivPlatformSID2: public DivDispatch { unsigned char noise_mode; unsigned char mix_mode; int filtCut; - bool do_pw_sweep_writes, do_cutoff_sweep_writes; + short cutoff_slide; + short pw_slide; Channel(): SharedChannel(15), prevFreq(0x1ffff), @@ -60,8 +61,8 @@ class DivPlatformSID2: public DivDispatch { noise_mode(0), mix_mode(0), filtCut(0), - do_pw_sweep_writes(false), - do_cutoff_sweep_writes(false) {} + cutoff_slide(0), + pw_slide(0) {} }; Channel chan[3]; DivDispatchOscBuffer* oscBuf[3]; @@ -108,6 +109,7 @@ class DivPlatformSID2: public DivDispatch { bool isVolGlobal(); float getPostAmp(); DivMacroInt* getChanMacroInt(int ch); + void getPaired(int ch, std::vector& ret); DivChannelModeHints getModeHints(int chan); void notifyInsDeletion(void* ins); void poke(unsigned int addr, unsigned short val); diff --git a/src/engine/platform/sid3.cpp b/src/engine/platform/sid3.cpp new file mode 100644 index 000000000..9f0bffb5b --- /dev/null +++ b/src/engine/platform/sid3.cpp @@ -0,0 +1,1411 @@ +/** + * Furnace Tracker - multi-system chiptune tracker + * Copyright (C) 2021-2024 tildearrow and contributors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "sid3.h" +#include "../engine.h" +#include "IconsFontAwesome4.h" +#include +#include "../../ta-log.h" + +#define rWrite(a,v) if (!skipRegisterWrites) {writes.push(QueuedWrite(a,v)); if (dumpWrites) {addWrite(a,v);} } + +#define CHIP_FREQBASE 524288*64 +#define CHIP_DIVIDER 1 + +#define CURRENT_FREQ_IN_HZ() ((double)chipClock / pow(2.0, (double)SID3_ACC_BITS) * (double)chan[i].freq) +#define c_5_FREQ() (parent->song.tuning / pow(2, (12.0 * 9.0 + 9.0) / 12.0)) +#define FREQ_FOR_NOTE(note) (c_5_FREQ() * pow(2, (double)note / 12.0)) + +const char* regCheatSheetSID3[]={ + "FreqL0", "00", + "FreqH0", "01", + "PWL0", "02", + "PWH0Vol", "03", + "Control0", "04", + "AtkDcy0", "05", + "StnRis0", "06", + "FreqL1", "07", + "FreqH1", "08", + "PWL1", "09", + "PWH1Vol", "0A", + "Control1", "0B", + "AtkDcy1", "0C", + "StnRis1", "0D", + "FreqL2", "0E", + "FreqH2", "0F", + "PWL2", "10", + "PWH2Vol", "11", + "Control2", "12", + "AtkDcy2", "13", + "StnRis2", "14", + + "FCL0Ctrl", "15", + "FCH0", "16", + "FilterRes0", "17", + + "FCL1Ctrl", "18", + "FCH1", "19", + "FilterRes1", "1A", + + "FCL2Ctrl", "1B", + "FCH2", "1C", + "FilterRes2", "1D", + + "NoiModeFrMSB01", "1E", + "WaveMixModeFrMSB2", "1F", + NULL +}; + +typedef struct +{ + uint32_t LFSRmask; + float freqScaling; +} noiseFreqData; + +const noiseFreqData noiseInterestingWavesData[] = +{ + {524288, 523.0f / 1675.0f}, //wave very close to SID2 noise mode 1 wave + {541065280U, 523.0f / 104.0f / 2.0f}, //smth like vocals + {2068, 1.0f}, //wave very close to SID2 noise mode 3 wave + {66, 523.0f / 540.0f / 2.0f}, //wave very close to SID2 noise mode 2 wave + + {0, 0.0f}, //end marker +}; + +const char** DivPlatformSID3::getRegisterSheet() { + return regCheatSheetSID3; +} + +void DivPlatformSID3::acquire(short** buf, size_t len) +{ + for (size_t i=0; irate) + { + DivSample* s=parent->getSample(chan[SID3_NUM_CHANNELS - 1].dacSample); + if (s->samples<=0 || chan[SID3_NUM_CHANNELS - 1].dacPos>=s->samples) + { + chan[SID3_NUM_CHANNELS - 1].dacSample=-1; + continue; + } + + int dacData=s->data16[chan[SID3_NUM_CHANNELS - 1].dacPos] + 32767; + chan[SID3_NUM_CHANNELS - 1].dacOut=CLAMP(dacData,0,65535); + updateSample = true; + + if (sampleTick > 2) + { + sampleTick = 0; + } + + chan[SID3_NUM_CHANNELS - 1].dacPos++; + if (s->isLoopable() && chan[SID3_NUM_CHANNELS - 1].dacPos>=(unsigned int)s->loopEnd) + { + chan[SID3_NUM_CHANNELS - 1].dacPos=s->loopStart; + } + else if (chan[SID3_NUM_CHANNELS - 1].dacPos>=s->samples) + { + chan[SID3_NUM_CHANNELS - 1].dacSample=-1; + } + chan[SID3_NUM_CHANNELS - 1].dacPeriod-=rate; + } + while (chan[SID3_NUM_CHANNELS - 1].dacPeriod > rate) + { + chan[SID3_NUM_CHANNELS - 1].dacPeriod -= rate; + } + } + + sampleTick++; + + if(chan[SID3_NUM_CHANNELS - 1].pcm) + { + if(sampleTick == 2 && updateSample) + { + if (!isMuted[SID3_NUM_CHANNELS - 1]) + { + sid3_write(sid3, SID3_REGISTER_STREAMED_SAMPLE_HIGH + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL, chan[SID3_NUM_CHANNELS - 1].dacOut >> 8); + regPool[SID3_REGISTER_STREAMED_SAMPLE_HIGH + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL]=chan[SID3_NUM_CHANNELS - 1].dacOut >> 8; + } + else + { + sid3_write(sid3, SID3_REGISTER_STREAMED_SAMPLE_HIGH + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL, 32768 >> 8); + regPool[SID3_REGISTER_STREAMED_SAMPLE_HIGH + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL]=32768 >> 8; + } + } + else if(sampleTick == 3 && updateSample) + { + if (!isMuted[SID3_NUM_CHANNELS - 1]) + { + sid3_write(sid3, SID3_REGISTER_STREAMED_SAMPLE_LOW + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL, chan[SID3_NUM_CHANNELS - 1].dacOut & 0xff); + regPool[SID3_REGISTER_STREAMED_SAMPLE_LOW + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL]=chan[SID3_NUM_CHANNELS - 1].dacOut & 0xff; + } + else + { + sid3_write(sid3, SID3_REGISTER_STREAMED_SAMPLE_LOW + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL, 32768 & 0xff); + regPool[SID3_REGISTER_STREAMED_SAMPLE_LOW + (SID3_NUM_CHANNELS - 1) * SID3_REGISTERS_PER_CHANNEL]=32768 & 0xff; + } + + sampleTick = 0; + updateSample = false; + } + else + { + if (!writes.empty()) + { + QueuedWrite w=writes.front(); + sid3_write(sid3, w.addr, w.val); + regPool[w.addr % SID3_NUM_REGISTERS]=w.val; + writes.pop(); + } + } + } + else + { + if (!writes.empty()) + { + QueuedWrite w=writes.front(); + sid3_write(sid3, w.addr, w.val); + regPool[w.addr % SID3_NUM_REGISTERS]=w.val; + writes.pop(); + } + } + + sid3_clock(sid3); + + buf[0][i]=sid3->output_l; + buf[1][i]=sid3->output_r; + + if (++writeOscBuf>=8) + { + writeOscBuf=0; + + for(int j = 0; j < SID3_NUM_CHANNELS - 1; j++) + { + oscBuf[j]->data[oscBuf[j]->needle++] = sid3->muted[j] ? 0 : (sid3->channel_output[j] / 4); + } + + oscBuf[SID3_NUM_CHANNELS - 1]->data[oscBuf[SID3_NUM_CHANNELS - 1]->needle++] = sid3->muted[SID3_NUM_CHANNELS - 1] ? 0 : (sid3->wave_channel_output / 4); + } + } +} + +void DivPlatformSID3::updateFlags(int channel, bool gate) +{ + rWrite(SID3_REGISTER_FLAGS + channel * SID3_REGISTERS_PER_CHANNEL, (gate ? 1 : 0) | + (chan[channel].ring ? SID3_CHAN_ENABLE_RING_MOD : 0) | + (chan[channel].sync ? SID3_CHAN_ENABLE_HARD_SYNC : 0) | + (chan[channel].phase ? SID3_CHAN_ENABLE_PHASE_MOD : 0) | + (chan[channel].phaseReset ? SID3_CHAN_PHASE_RESET : 0) | + (chan[channel].envReset ? SID3_CHAN_ENV_RESET : 0) | + (chan[channel].phaseResetNoise ? SID3_CHAN_NOISE_PHASE_RESET : 0) | + (chan[channel].oneBitNoise ? SID3_CHAN_1_BIT_NOISE : 0)); +} + +void DivPlatformSID3::updateFilter(int channel, int filter) +{ + rWrite(SID3_REGISTER_FILT_MODE + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].mode | (chan[channel].filt[filter].enabled ? SID3_FILTER_ENABLE : 0)); + + rWrite(SID3_REGISTER_FILT_CUTOFF_HIGH + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].cutoff >> 8); + rWrite(SID3_REGISTER_FILT_CUTOFF_LOW + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].cutoff & 0xff); + + rWrite(SID3_REGISTER_FILT_RESONANCE + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].resonance); + + rWrite(SID3_REGISTER_FILT_DISTORTION + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].distortion_level); + + rWrite(SID3_REGISTER_FILT_CONNECTION + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].filter_matrix); + + rWrite(SID3_REGISTER_FILT_OUTPUT_VOLUME + filter * SID3_REGISTERS_PER_FILTER + channel*SID3_REGISTERS_PER_CHANNEL, + chan[channel].filt[filter].output_volume); +} + +void DivPlatformSID3::updateFreq(int channel) +{ + rWrite(SID3_REGISTER_FREQ_HIGH + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].freq >> 16) & 0xff); + rWrite(SID3_REGISTER_FREQ_MID + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].freq >> 8) & 0xff); + rWrite(SID3_REGISTER_FREQ_LOW + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].freq & 0xff); +} + +void DivPlatformSID3::updateNoiseFreq(int channel) +{ + rWrite(SID3_REGISTER_NOISE_FREQ_HIGH + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].noiseFreq >> 16) & 0xff); + rWrite(SID3_REGISTER_NOISE_FREQ_MID + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].noiseFreq >> 8) & 0xff); + rWrite(SID3_REGISTER_NOISE_FREQ_LOW + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].noiseFreq & 0xff); +} + +void DivPlatformSID3::updateNoiseLFSRMask(int channel) +{ + rWrite(SID3_REGISTER_NOISE_LFSR_HIGHEST + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].noiseLFSRMask >> 24) & 0xff); + rWrite(SID3_REGISTER_NOISE_LFSR_HIGH + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].noiseLFSRMask >> 16) & 0xff); + rWrite(SID3_REGISTER_NOISE_LFSR_MID + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].noiseLFSRMask >> 8) & 0xff); + rWrite(SID3_REGISTER_NOISE_LFSR_LOW + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].noiseLFSRMask & 0xff); +} + +void DivPlatformSID3::updateDuty(int channel) +{ + rWrite(SID3_REGISTER_PW_HIGH + channel*SID3_REGISTERS_PER_CHANNEL,(chan[channel].duty >> 8) & 0xff); + rWrite(SID3_REGISTER_PW_LOW + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].duty & 0xff); +} + +void DivPlatformSID3::updateEnvelope(int channel) +{ + rWrite(SID3_REGISTER_ADSR_A + channel * SID3_REGISTERS_PER_CHANNEL, chan[channel].attack); //attack + rWrite(SID3_REGISTER_ADSR_D + channel * SID3_REGISTERS_PER_CHANNEL, chan[channel].decay); //decay + rWrite(SID3_REGISTER_ADSR_S + channel * SID3_REGISTERS_PER_CHANNEL, chan[channel].sustain); //sustain + rWrite(SID3_REGISTER_ADSR_SR + channel * SID3_REGISTERS_PER_CHANNEL, chan[channel].sr); //sr + rWrite(SID3_REGISTER_ADSR_R + channel * SID3_REGISTERS_PER_CHANNEL, chan[channel].release); //release +} + +void DivPlatformSID3::updatePanning(int channel) +{ + rWrite(SID3_REGISTER_PAN_LEFT + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].panLeft); + rWrite(SID3_REGISTER_PAN_RIGHT + channel*SID3_REGISTERS_PER_CHANNEL,chan[channel].panRight); +} + +void DivPlatformSID3::updateWave() +{ + int channel = SID3_NUM_CHANNELS - 1; + + for(int i = 0; i < 256; i++) + { + uint8_t val = ws.output[i & 255]; + rWrite(SID3_REGISTER_PW_HIGH + channel*SID3_REGISTERS_PER_CHANNEL,i); + rWrite(SID3_REGISTER_PW_LOW + channel*SID3_REGISTERS_PER_CHANNEL,val); + } +} + +void DivPlatformSID3::tick(bool sysTick) +{ + bool doUpdateWave = false; + + for (int i=0; igetIns(chan[i].ins,DIV_INS_SID3); + + bool panChanged = false; + bool flagsChanged = false; + bool envChanged = false; + + if(sysTick) + { + if(chan[i].pw_slide != 0) + { + chan[i].duty -= chan[i].pw_slide; + chan[i].duty = CLAMP(chan[i].duty, 0, 0xffff); + updateDuty(i); + } + for(int j = 0; j < SID3_NUM_FILTERS; j++) //filters' slides + { + if(chan[i].filt[j].cutoff_slide != 0) + { + chan[i].filt[j].cutoff += chan[i].filt[j].cutoff_slide; + chan[i].filt[j].cutoff = CLAMP(chan[i].filt[j].cutoff, 0, 0xffff); + updateFilter(i, j); + } + } + + if(chan[i].phase_reset_counter >= 0) + { + if(chan[i].phase_reset_counter == 0) + { + chan[i].phaseReset = true; + flagsChanged = true; + } + chan[i].phase_reset_counter--; + } + if(chan[i].noise_phase_reset_counter >= 0) + { + if(chan[i].noise_phase_reset_counter == 0) + { + chan[i].phaseResetNoise = true; + flagsChanged = true; + } + chan[i].noise_phase_reset_counter--; + } + if(chan[i].envelope_reset_counter >= 0) + { + if(chan[i].envelope_reset_counter == 0) + { + chan[i].envReset = true; + flagsChanged = true; + } + chan[i].envelope_reset_counter--; + } + } + + if (chan[i].std.vol.had) + { + chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&255,MIN(255,chan[i].std.vol.val),255); + rWrite(13 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].outVol); + } + if (NEW_ARP_STRAT) { + chan[i].handleArp(); + } else if (chan[i].std.arp.had) { + if (!chan[i].inPorta) { + chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val)); + } + chan[i].freqChanged=true; + } + if (chan[i].std.pitch.had) { + if (chan[i].std.pitch.mode) { + chan[i].pitch2+=chan[i].std.pitch.val; + CLAMP_VAR(chan[i].pitch2,-65535,65535); + } else { + chan[i].pitch2=chan[i].std.pitch.val; + } + chan[i].freqChanged=true; + } + if (chan[i].std.duty.had) { + DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SID3); + if (ins->sid3.dutyIsAbs) { + chan[i].duty=chan[i].std.duty.val; + } else { + chan[i].duty-=chan[i].std.duty.val; + } + chan[i].duty&=65535; + updateDuty(i); + } + if (chan[i].std.wave.had) { + DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SID3); + + if(i == SID3_NUM_CHANNELS - 1 && ins->sid3.doWavetable) + { + chan[i].wavetable = chan[i].std.wave.val & 0xff; + ws.changeWave1(chan[i].wavetable, true); + doUpdateWave = true; + } + else + { + chan[i].wave = chan[i].std.wave.val & 0xff; + rWrite(SID3_REGISTER_WAVEFORM + i * SID3_REGISTERS_PER_CHANNEL, chan[i].wave); + } + } + if (chan[i].std.alg.had) { //special wave + chan[i].special_wave = chan[i].std.alg.val & 0xff; + rWrite(SID3_REGISTER_SPECIAL_WAVE + i * SID3_REGISTERS_PER_CHANNEL, chan[i].special_wave); + } + if (chan[i].std.op[3].am.had) { //noise arpeggio + //chan[i].handleArpNoise(0); + chan[i].noiseFreqChanged = true; + } + chan[i].handleArpNoise(0); + chan[i].handlePitchNoise(); + if (chan[i].std.op[0].ar.had) { //noise pitch + //chan[i].handlePitchNoise(); + chan[i].noiseFreqChanged = true; + } + if (chan[i].std.panL.had) { + panChanged = true; + chan[i].panLeft = chan[i].std.panL.val & 0xff; + } + if (chan[i].std.panR.had) { + panChanged = true; + chan[i].panRight = chan[i].std.panR.val & 0xff; + } + if (chan[i].std.op[2].ar.had) { //channel signal inversion + chan[i].phaseInv = chan[i].std.op[2].ar.val & 3; + rWrite(SID3_REGISTER_PHASE_INVERSION + i * SID3_REGISTERS_PER_CHANNEL, chan[i].phaseInv); + } + if (chan[i].std.op[0].am.had) { //key on/off + chan[i].gate = chan[i].std.op[0].am.val & 1; + flagsChanged = true; + } + if (chan[i].std.ex1.had) { //ring mod, hard sync, phase mod + chan[i].phase = chan[i].std.ex1.val & 1; + chan[i].sync = chan[i].std.ex1.val & 2; + chan[i].ring = chan[i].std.ex1.val & 4; + flagsChanged = true; + } + if (chan[i].std.ams.had) { //hard sync source + chan[i].syncSrc = chan[i].std.ams.val & 0xff; + rWrite(SID3_REGISTER_SYNC_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].syncSrc); + } + if (chan[i].std.fms.had) { //ring mod source + chan[i].ringSrc = chan[i].std.fms.val & 0xff; + rWrite(SID3_REGISTER_RING_MOD_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].ringSrc); + } + if (chan[i].std.fb.had) { //phase mod source + chan[i].phaseSrc = chan[i].std.fb.val & 0xff; + rWrite(SID3_REGISTER_PHASE_MOD_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].phaseSrc); + } + if (chan[i].std.op[3].ar.had) { //feedback + chan[i].feedback = chan[i].std.op[3].ar.val & 0xff; + rWrite(SID3_REGISTER_FEEDBACK + i * SID3_REGISTERS_PER_CHANNEL, chan[i].feedback); + } + if (chan[i].std.phaseReset.had) { + chan[i].phaseReset = chan[i].std.phaseReset.val & 1; + + if(chan[i].phaseReset) + { + flagsChanged = true; + } + + if (chan[i].pcm) + { + if (chan[i].active && chan[i].dacSample>=0 && chan[i].dacSamplesong.sampleLen) + { + chan[i].dacPos=0; + chan[i].dacPeriod=0; + } + } + } + if (chan[i].std.op[1].am.had) { //noise phase reset + chan[i].phaseResetNoise = chan[i].std.op[1].am.val & 1; + + if(chan[i].phaseResetNoise) + { + flagsChanged = true; + } + } + if (chan[i].std.op[2].am.had) { //envelope reset + chan[i].envReset = chan[i].std.op[2].am.val & 1; + + if(chan[i].envReset) + { + flagsChanged = true; + } + } + if (chan[i].std.ex2.had) { //attack + chan[i].attack = chan[i].std.ex2.val & 0xff; + envChanged = true; + } + if (chan[i].std.ex3.had) { //decay + chan[i].decay = chan[i].std.ex3.val & 0xff; + envChanged = true; + } + if (chan[i].std.ex4.had) { //sustain + chan[i].sustain = chan[i].std.ex4.val & 0xff; + envChanged = true; + } + if (chan[i].std.ex5.had) { //sustain rate + chan[i].sr = chan[i].std.ex5.val & 0xff; + envChanged = true; + } + if (chan[i].std.ex6.had) { //release + chan[i].release = chan[i].std.ex6.val & 0xff; + envChanged = true; + } + if (chan[i].std.ex7.had) { //noise LFSR feedback bits + chan[i].noiseLFSRMask = chan[i].std.ex7.val & 0x3fffffff; + updateNoiseLFSRMask(i); + chan[i].noiseFreqChanged = true; + } + if (chan[i].std.op[1].ar.had) { //1-bit noise / PCM mode for wavetable chan + if(i == SID3_NUM_CHANNELS - 1) //wave chan + { + rWrite(SID3_REGISTER_WAVEFORM + i * SID3_REGISTERS_PER_CHANNEL, chan[i].std.op[1].ar.val & 1); + } + else + { + if((uint32_t)chan[i].oneBitNoise != (chan[i].std.op[1].ar.val & 1)) + { + chan[i].oneBitNoise = chan[i].std.op[1].ar.val & 1; + flagsChanged = true; + } + } + } + if (chan[i].std.ex8.had) { //wave mix mode + chan[i].mix_mode = chan[i].std.ex8.val & 0xff; + rWrite(SID3_REGISTER_MIXMODE + i * SID3_REGISTERS_PER_CHANNEL, chan[i].mix_mode); //mixmode + } + + for(int j = 0; j < SID3_NUM_FILTERS; j++) //filter macros + { + DivMacroInt::IntOp* op = &chan[i].std.op[j]; + DivPlatformSID3::Channel::Filter* ch_filt = &chan[i].filt[j]; + DivInstrumentSID3::Filter* ins_filt = &ins->sid3.filt[j]; + + bool doUpdateFilter = false; + + if (op->d2r.had) { //cutoff + if (ins_filt->absoluteCutoff) { + ch_filt->cutoff=op->d2r.val; + } else { + ch_filt->cutoff+=op->d2r.val; + } + ch_filt->cutoff&=65535; + doUpdateFilter = true; + } + if (op->dam.had) { //resonance + ch_filt->resonance=op->dam.val & 0xff; + doUpdateFilter = true; + } + if (op->dr.had) { //filter toggle + ch_filt->enabled=op->dr.val & 1; + doUpdateFilter = true; + } + if (op->dt2.had) { //distortion level + ch_filt->distortion_level=op->dt2.val & 0xff; + doUpdateFilter = true; + } + if (op->dt.had) { //output volume + ch_filt->output_volume=op->dt.val & 0xff; + doUpdateFilter = true; + } + if (op->dvb.had) { //connect to channel input + ch_filt->mode &= ~SID3_FILTER_CHANNEL_INPUT; + ch_filt->mode |= (op->dvb.val & 1) ? SID3_FILTER_CHANNEL_INPUT : 0; + doUpdateFilter = true; + } + if (op->egt.had) { //connect to channel output + ch_filt->mode &= ~SID3_FILTER_OUTPUT; + ch_filt->mode |= (op->egt.val & 1) ? SID3_FILTER_OUTPUT : 0; + doUpdateFilter = true; + } + if (op->ksl.had) { //connection matrix row + ch_filt->filter_matrix=op->ksl.val & 0xf; + doUpdateFilter = true; + } + if (op->ksr.had) { //filter mode + ch_filt->mode &= ~(SID3_FILTER_LP | SID3_FILTER_HP | SID3_FILTER_BP); + if(op->ksr.val & 1) ch_filt->mode |= SID3_FILTER_LP; + if(op->ksr.val & 2) ch_filt->mode |= SID3_FILTER_BP; + if(op->ksr.val & 4) ch_filt->mode |= SID3_FILTER_HP; + doUpdateFilter = true; + } + + if(doUpdateFilter) + { + updateFilter(i, j); + } + } + + if(panChanged) + { + updatePanning(i); + } + if(flagsChanged) + { + updateFlags(i, chan[i].gate); + + chan[i].phaseReset = false; + chan[i].phaseResetNoise = false; + chan[i].envReset = false; + } + if(envChanged) + { + updateEnvelope(i); + } + + if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) + { + chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE); + + if (chan[i].keyOn) + { + DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SID3); + if(i == SID3_NUM_CHANNELS - 1) + { + if(ins->sid3.doWavetable && !ins->amiga.useSample) + { + rWrite(SID3_REGISTER_WAVEFORM + i * SID3_REGISTERS_PER_CHANNEL, 0); //wave channel mode + } + else + { + rWrite(SID3_REGISTER_WAVEFORM + i * SID3_REGISTERS_PER_CHANNEL, 1); //wave channel mode + } + } + else + { + rWrite(SID3_REGISTER_WAVEFORM + i * SID3_REGISTERS_PER_CHANNEL, chan[i].wave); + } + + rWrite(SID3_REGISTER_SPECIAL_WAVE + i * SID3_REGISTERS_PER_CHANNEL, chan[i].special_wave); //special wave + + rWrite(SID3_REGISTER_ADSR_VOL + i * SID3_REGISTERS_PER_CHANNEL, chan[i].outVol); //set volume + rWrite(SID3_REGISTER_MIXMODE + i * SID3_REGISTERS_PER_CHANNEL, chan[i].mix_mode); //mixmode + + rWrite(SID3_REGISTER_RING_MOD_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].ringSrc); //ring mod source + rWrite(SID3_REGISTER_SYNC_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].syncSrc); //hard sync source + rWrite(SID3_REGISTER_PHASE_MOD_SRC + i * SID3_REGISTERS_PER_CHANNEL, chan[i].phaseSrc); //phase mod source + + rWrite(SID3_REGISTER_PHASE_INVERSION + i * SID3_REGISTERS_PER_CHANNEL, chan[i].phaseInv); //signal inversion + rWrite(SID3_REGISTER_FEEDBACK + i * SID3_REGISTERS_PER_CHANNEL, chan[i].feedback); //feedback + + updateEnvelope(i); + + updateFlags(i, false); //gate off TODO: make it properly? + updateFlags(i, true); //gate on + chan[i].gate = true; + } + if (chan[i].keyOff) + { + updateFlags(i, false); //gate off + chan[i].gate = false; + } + + if (chan[i].freq<0) chan[i].freq=0; + if (chan[i].freq>0xffffff) chan[i].freq=0xffffff; + + updateFreq(i); + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + bool doUpdateFilter = false; + + if(chan[i].filt[j].bindCutoffToNote && (!ins->sid3.filt[j].bindCutoffOnNote || chan[i].keyOn)) + { + double scaling = CURRENT_FREQ_IN_HZ() / FREQ_FOR_NOTE(chan[i].filt[j].bindCutoffToNoteCenter) - 1.0; + if (chan[i].filt[j].bindCutoffToNoteDir) + { + scaling *= -1.0; + } + + int cutoff = ins->sid3.filt[j].cutoff + (int)(scaling * (double)chan[i].filt[j].bindCutoffToNoteStrength * 80.0); + + if(cutoff > 0xffff) cutoff = 0xffff; + if(cutoff < 0) cutoff = 0; + + chan[i].filt[j].cutoff = cutoff; + doUpdateFilter = true; + } + + if(chan[i].filt[j].bindResonanceToNote && (!ins->sid3.filt[j].bindResonanceOnNote || chan[i].keyOn)) + { + double scaling = CURRENT_FREQ_IN_HZ() / FREQ_FOR_NOTE(chan[i].filt[j].bindResonanceToNoteCenter) - 1.0; + if (chan[i].filt[j].bindResonanceToNoteDir) + { + scaling *= -1.0; + } + + int res = ins->sid3.filt[j].resonance + (int)(scaling * (double)chan[i].filt[j].bindResonanceToNoteStrength * 80.0 / 256.0); + + if(res > 0xff) res = 0xff; + if(res < 0) res = 0; + + chan[i].filt[j].resonance = res; + doUpdateFilter = true; + } + + if(doUpdateFilter) + { + updateFilter(i, j); + } + } + + if (chan[i].pcm && i == SID3_NUM_CHANNELS - 1) { + double off=1.0; + if (chan[i].dacSample>=0 && chan[i].dacSamplesong.sampleLen) { + DivSample* s=parent->getSample(chan[i].dacSample); + if (s->centerRate<1) { + off=1.0; + } else { + off=(double)s->centerRate/8363.0; + } + } + chan[i].dacRate=chan[i].freq*(off / 32.0)*(double)chipClock/1000000.0; + } + + chan[i].noiseFreqChanged = true; + + if(chan[i].independentNoiseFreq) + { + chan[i].noise_pitch2 = chan[i].pitch2; + } + + if (chan[i].keyOn) chan[i].keyOn=false; + if (chan[i].keyOff) chan[i].keyOff=false; + chan[i].freqChanged=false; + } + + if(chan[i].noiseFreqChanged) + { + if(chan[i].independentNoiseFreq) + { + chan[i].noiseFreq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].noise_fixedArp?chan[i].noise_baseNoteOverride:chan[i].noise_arpOff,chan[i].noise_fixedArp,false,2,chan[i].noise_pitch2,chipClock,CHIP_FREQBASE); + } + else + { + chan[i].noiseFreq = chan[i].freq; + } + + bool found = false; + int index = 0; + while(noiseInterestingWavesData[index].LFSRmask != 0 && !found) + { + if(noiseInterestingWavesData[index].LFSRmask == chan[i].noiseLFSRMask) + { + chan[i].noiseFreq *= noiseInterestingWavesData[index].freqScaling; + found = true; + } + index++; + } + + if (chan[i].noiseFreq<0) chan[i].noiseFreq=0; + if (chan[i].noiseFreq>0xffffff) chan[i].noiseFreq=0xffffff; + + updateNoiseFreq(i); + + chan[i].noiseFreqChanged = false; + } + } + + if (chan[SID3_NUM_CHANNELS - 1].active && !chan[SID3_NUM_CHANNELS - 1].pcm) + { + if (ws.tick()) + { + doUpdateWave = true; + } + } + + if(doUpdateWave) + { + updateWave(); + doUpdateWave = false; + } +} + +int DivPlatformSID3::dispatch(DivCommand c) { + if (c.chan>SID3_NUM_CHANNELS - 1) return 0; + + bool updEnv = false; + DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_SID3); + int filter = 0; + + switch (c.cmd) { + case DIV_CMD_NOTE_ON: { + DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_SID3); + if (c.value!=DIV_NOTE_NULL) { + chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value); + chan[c.chan].freqChanged=true; + chan[c.chan].note=c.value; + } + chan[c.chan].active=true; + chan[c.chan].keyOn=true; + + if (ins->amiga.useSample) + { + chan[c.chan].pcm=true; + } + else + { + chan[c.chan].pcm=false; + } + + if (chan[c.chan].pcm && c.chan == SID3_NUM_CHANNELS - 1) + { + if (ins->amiga.useSample) + { + if (skipRegisterWrites) break; + if (c.value!=DIV_NOTE_NULL) { + chan[c.chan].dacSample=ins->amiga.getSample(c.value); + chan[c.chan].sampleNote=c.value; + c.value=ins->amiga.getFreq(c.value); + chan[c.chan].sampleNoteDelta=c.value-chan[c.chan].sampleNote; + } else if (chan[c.chan].sampleNote!=DIV_NOTE_NULL) { + chan[c.chan].dacSample=ins->amiga.getSample(chan[c.chan].sampleNote); + c.value=ins->amiga.getFreq(chan[c.chan].sampleNote); + } + if (chan[c.chan].dacSample<0 || chan[c.chan].dacSample>=parent->song.sampleLen) + { + chan[c.chan].dacSample=-1; + break; + } + chan[c.chan].dacPos=0; + chan[c.chan].dacPeriod=0; + if (c.value!=DIV_NOTE_NULL) + { + chan[c.chan].baseFreq=NOTE_PERIODIC(c.value); + chan[c.chan].freqChanged=true; + chan[c.chan].note=c.value; + } + chan[c.chan].active=true; + chan[c.chan].macroInit(ins); + if (!parent->song.brokenOutVol && !chan[c.chan].std.vol.will) { + chan[c.chan].outVol=chan[c.chan].vol; + } + //chan[c.chan].keyOn=true; + } + } + + if (chan[c.chan].insChanged) + { + chan[c.chan].wave = (ins->sid3.triOn ? SID3_WAVE_TRIANGLE : 0) | (ins->sid3.sawOn ? SID3_WAVE_SAW : 0) | + (ins->sid3.pulseOn ? SID3_WAVE_PULSE : 0) | (ins->sid3.noiseOn ? SID3_WAVE_NOISE : 0) | (ins->sid3.specialWaveOn ? SID3_WAVE_SPECIAL : 0); //waveform + chan[c.chan].special_wave = ins->sid3.special_wave; //special wave + + chan[c.chan].attack=ins->sid3.a; + chan[c.chan].decay=ins->sid3.d; + chan[c.chan].sustain=ins->sid3.s; + chan[c.chan].sr=ins->sid3.sr; + chan[c.chan].release=ins->sid3.r; + + chan[c.chan].sync = ins->sid3.oscSync; + chan[c.chan].ring = ins->sid3.ringMod; + chan[c.chan].phase = ins->sid3.phase_mod; + chan[c.chan].oneBitNoise = ins->sid3.oneBitNoise; + + chan[c.chan].mix_mode = ins->sid3.mixMode; + + chan[c.chan].ringSrc = ins->sid3.ring_mod_source; + chan[c.chan].syncSrc = ins->sid3.sync_source; + chan[c.chan].phaseSrc = ins->sid3.phase_mod_source; + + chan[c.chan].independentNoiseFreq = ins->sid3.separateNoisePitch; + + chan[c.chan].phaseInv = ins->sid3.phaseInv; + chan[c.chan].feedback = ins->sid3.feedback; + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + if(ins->sid3.filt[j].init) + { + chan[c.chan].filt[j].cutoff = ins->sid3.filt[j].cutoff; + chan[c.chan].filt[j].resonance = ins->sid3.filt[j].resonance; + chan[c.chan].filt[j].distortion_level = ins->sid3.filt[j].distortion_level; + chan[c.chan].filt[j].enabled = ins->sid3.filt[j].enabled; + chan[c.chan].filt[j].filter_matrix = ins->sid3.filt[j].filter_matrix; + chan[c.chan].filt[j].mode = ins->sid3.filt[j].mode; + chan[c.chan].filt[j].output_volume = ins->sid3.filt[j].output_volume; + + chan[c.chan].filt[j].bindCutoffToNote = ins->sid3.filt[j].bindCutoffToNote; + chan[c.chan].filt[j].bindCutoffToNoteStrength = ins->sid3.filt[j].bindCutoffToNoteStrength; + chan[c.chan].filt[j].bindCutoffToNoteCenter = ins->sid3.filt[j].bindCutoffToNoteCenter; + chan[c.chan].filt[j].bindCutoffToNoteDir = ins->sid3.filt[j].bindCutoffToNoteDir; + + chan[c.chan].filt[j].bindResonanceToNote = ins->sid3.filt[j].bindResonanceToNote; + chan[c.chan].filt[j].bindResonanceToNoteStrength = ins->sid3.filt[j].bindResonanceToNoteStrength; + chan[c.chan].filt[j].bindResonanceToNoteCenter = ins->sid3.filt[j].bindResonanceToNoteCenter; + chan[c.chan].filt[j].bindResonanceToNoteDir = ins->sid3.filt[j].bindResonanceToNoteDir; + + updateFilter(c.chan, j); + } + } + + if(c.chan == SID3_NUM_CHANNELS - 1) + { + if(!chan[c.chan].pcm) + { + ws.changeWave1(chan[c.chan].wavetable, false); + ws.init(ins,256,255,chan[c.chan].insChanged); + } + } + } + if(ins->sid3.resetDuty||chan[c.chan].insChanged) + { + chan[c.chan].duty=ins->sid3.duty; + updateDuty(c.chan); + } + if (chan[c.chan].insChanged) { + chan[c.chan].insChanged=false; + } + chan[c.chan].macroInit(ins); + break; + } + case DIV_CMD_NOTE_OFF: + chan[c.chan].active=false; + chan[c.chan].keyOff=true; + chan[c.chan].keyOn=false; + //chan[c.chan].macroInit(NULL); + break; + case DIV_CMD_NOTE_OFF_ENV: + chan[c.chan].active=false; + chan[c.chan].keyOff=true; + chan[c.chan].keyOn=false; + chan[c.chan].std.release(); + break; + case DIV_CMD_ENV_RELEASE: + chan[c.chan].std.release(); + break; + case DIV_CMD_INSTRUMENT: + if (chan[c.chan].ins!=c.value || c.value2==1) { + chan[c.chan].insChanged=true; + chan[c.chan].ins=c.value; + } + break; + case DIV_CMD_VOLUME: + if (chan[c.chan].vol!=c.value) { + chan[c.chan].vol=c.value; + if (!chan[c.chan].std.vol.has) { + chan[c.chan].outVol=c.value; + chan[c.chan].vol=chan[c.chan].outVol; + rWrite(SID3_REGISTER_ADSR_VOL + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].vol); + } + } + break; + case DIV_CMD_GET_VOLUME: + if (chan[c.chan].std.vol.has) { + return chan[c.chan].vol; + } + return chan[c.chan].outVol; + break; + case DIV_CMD_PITCH: + chan[c.chan].pitch=c.value; + chan[c.chan].freqChanged=true; + break; + case DIV_CMD_NOTE_PORTA: { + int destFreq=NOTE_FREQUENCY(c.value2); + bool return2=false; + if (destFreq>chan[c.chan].baseFreq) { + chan[c.chan].baseFreq+=c.value; + if (chan[c.chan].baseFreq>=destFreq) { + chan[c.chan].baseFreq=destFreq; + return2=true; + } + } else { + chan[c.chan].baseFreq-=c.value; + if (chan[c.chan].baseFreq<=destFreq) { + chan[c.chan].baseFreq=destFreq; + return2=true; + } + } + chan[c.chan].freqChanged=true; + if (return2) { + chan[c.chan].inPorta=false; + return 2; + } + break; + } + case DIV_CMD_LEGATO: + chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value+((HACKY_LEGATO_MESS)?(chan[c.chan].std.arp.val):(0))); + chan[c.chan].freqChanged=true; + chan[c.chan].note=c.value; + break; + case DIV_CMD_PRE_PORTA: + if (chan[c.chan].active && c.value2) { + if (parent->song.resetMacroOnPorta || parent->song.preNoteNoEffect) { + chan[c.chan].macroInit(parent->getIns(chan[c.chan].ins,DIV_INS_SID3)); + chan[c.chan].keyOn=true; + } + } + if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_FREQUENCY(chan[c.chan].note); + chan[c.chan].inPorta=c.value; + break; + case DIV_CMD_PANNING: { + bool updPan = false; + if (!chan[c.chan].std.panL.has) + { + chan[c.chan].panLeft = c.value; + updPan = true; + } + if (!chan[c.chan].std.panR.has) + { + chan[c.chan].panRight = c.value2; + updPan = true; + } + if(updPan) + { + updatePanning(c.chan); + } + break; + } + case DIV_CMD_GET_VOLMAX: + return SID3_MAX_VOL; + break; + case DIV_CMD_WAVE: + if(c.chan == SID3_NUM_CHANNELS - 1 && ins->sid3.doWavetable) + { + chan[c.chan].wavetable = c.value & 0xff; + ws.changeWave1(chan[c.chan].wave); + } + else + { + chan[c.chan].wave = c.value & 0xff; + rWrite(SID3_REGISTER_WAVEFORM + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].wave); + } + break; + case DIV_CMD_SID3_SPECIAL_WAVE: + chan[c.chan].special_wave = c.value % SID3_NUM_SPECIAL_WAVES; + rWrite(SID3_REGISTER_SPECIAL_WAVE + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].special_wave); + break; + case DIV_CMD_C64_EXTENDED: + chan[c.chan].ring = c.value & 1; + chan[c.chan].sync = c.value & 2; + chan[c.chan].phase = c.value & 4; + updateFlags(c.chan, chan[c.chan].gate); + break; + case DIV_CMD_C64_DUTY_RESET: + if (c.value&15) { + DivInstrument* ins=parent->getIns(chan[c.chan].ins,DIV_INS_SID3); + chan[c.chan].duty=ins->sid3.duty; + updateDuty(c.chan); + } + chan[c.chan].resetDuty=c.value>>4; + break; + case DIV_CMD_SID3_RING_MOD_SRC: + chan[c.chan].ringSrc = c.value % (SID3_NUM_CHANNELS + 1); + rWrite(SID3_REGISTER_RING_MOD_SRC + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].ringSrc); + break; + case DIV_CMD_SID3_HARD_SYNC_SRC: + chan[c.chan].syncSrc = c.value % SID3_NUM_CHANNELS; + rWrite(SID3_REGISTER_SYNC_SRC + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].syncSrc); + break; + case DIV_CMD_SID3_PHASE_MOD_SRC: + chan[c.chan].phaseSrc = c.value % SID3_NUM_CHANNELS; + rWrite(SID3_REGISTER_PHASE_MOD_SRC + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].phaseSrc); + break; + case DIV_CMD_FM_AR: + chan[c.chan].attack = c.value & 0xff; + updEnv = true; + break; + case DIV_CMD_FM_DR: + chan[c.chan].decay = c.value & 0xff; + updEnv = true; + break; + case DIV_CMD_FM_SL: + chan[c.chan].sustain = c.value & 0xff; + updEnv = true; + break; + case DIV_CMD_FM_D2R: + chan[c.chan].sr = c.value & 0xff; + updEnv = true; + break; + case DIV_CMD_FM_RR: + chan[c.chan].release = c.value & 0xff; + updEnv = true; + break; + case DIV_CMD_SID3_WAVE_MIX: + chan[c.chan].mix_mode = c.value % 5; + rWrite(SID3_REGISTER_MIXMODE + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].mix_mode); + break; + case DIV_CMD_SID3_LFSR_FEEDBACK_BITS: + chan[c.chan].noiseLFSRMask &= ~(0xffU << (8 * c.value2)); + chan[c.chan].noiseLFSRMask |= ((c.value & (c.value2 == 3 ? 0x3f : 0xff)) << (8 * c.value2)); + updateNoiseLFSRMask(c.chan); + chan[c.chan].noiseFreqChanged = true; + break; + case DIV_CMD_SID3_1_BIT_NOISE: + if(c.chan == SID3_NUM_CHANNELS - 1) //wave chan + { + rWrite(SID3_REGISTER_WAVEFORM + c.chan * SID3_REGISTERS_PER_CHANNEL, c.value & 1); //PCM mode + } + else + { + if((uint32_t)chan[c.chan].oneBitNoise != (c.value & 1)) + { + chan[c.chan].oneBitNoise = c.value & 1; + updateFlags(c.chan, chan[c.chan].gate); + } + } + break; + case DIV_CMD_C64_FINE_DUTY: + chan[c.chan].duty = (c.value & 0xfff) << 4; + updateDuty(c.chan); + break; + case DIV_CMD_FM_FB: + chan[c.chan].feedback = c.value & 0xff; + rWrite(SID3_REGISTER_FEEDBACK + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].feedback); + break; + case DIV_CMD_SID3_CHANNEL_INVERSION: + chan[c.chan].phaseInv = c.value & 3; + rWrite(SID3_REGISTER_PHASE_INVERSION + c.chan * SID3_REGISTERS_PER_CHANNEL, chan[c.chan].phaseInv); + break; + case DIV_CMD_C64_FINE_CUTOFF: + chan[c.chan].filt[c.value2].cutoff = (c.value & 0xfff) << 4; + updateFilter(c.chan, c.value2); + break; + case DIV_CMD_C64_RESONANCE: + chan[c.chan].filt[c.value2].resonance = c.value & 0xff; + updateFilter(c.chan, c.value2); + break; + case DIV_CMD_SID3_FILTER_OUTPUT_VOLUME: + chan[c.chan].filt[c.value2].output_volume = c.value & 0xff; + updateFilter(c.chan, c.value2); + break; + case DIV_CMD_SID3_FILTER_DISTORTION: + chan[c.chan].filt[c.value2].distortion_level = c.value & 0xff; + updateFilter(c.chan, c.value2); + break; + case DIV_CMD_C64_FILTER_MODE: + chan[c.chan].filt[(c.value >> 4) & 3].mode &= ~(SID3_FILTER_LP | SID3_FILTER_HP | SID3_FILTER_BP); + if(c.value & 1) chan[c.chan].filt[(c.value >> 4) & 3].mode |= SID3_FILTER_LP; + if(c.value & 2) chan[c.chan].filt[(c.value >> 4) & 3].mode |= SID3_FILTER_BP; + if(c.value & 4) chan[c.chan].filt[(c.value >> 4) & 3].mode |= SID3_FILTER_HP; + updateFilter(c.chan, (c.value >> 4) & 3); + break; + case DIV_CMD_SID3_FILTER_CONNECTION: + chan[c.chan].filt[(c.value >> 4) & 3].mode &= ~(SID3_FILTER_CHANNEL_INPUT | SID3_FILTER_OUTPUT); + if(c.value & 1) chan[c.chan].filt[(c.value >> 4) & 3].mode |= SID3_FILTER_CHANNEL_INPUT; + if(c.value & 2) chan[c.chan].filt[(c.value >> 4) & 3].mode |= SID3_FILTER_OUTPUT; + updateFilter(c.chan, (c.value >> 4) & 3); + break; + case DIV_CMD_SID3_FILTER_MATRIX: + chan[c.chan].filt[(c.value >> 4) & 3].filter_matrix = c.value & 0xf; + updateFilter(c.chan, (c.value >> 4) & 3); + break; + case DIV_CMD_SID3_FILTER_ENABLE: + chan[c.chan].filt[(c.value >> 4) & 3].enabled = c.value & 1; + updateFilter(c.chan, (c.value >> 4) & 3); + break; + case DIV_CMD_C64_PW_SLIDE: + chan[c.chan].pw_slide = c.value * c.value2 * 16; + break; + case DIV_CMD_C64_CUTOFF_SLIDE: + filter = abs(c.value2) - 1; + chan[c.chan].filt[filter].cutoff_slide = c.value * (c.value2 > 0 ? 1 : -1) * 16; + break; + case DIV_CMD_SID3_PHASE_RESET: + chan[c.chan].phase_reset_counter = c.value; + break; + case DIV_CMD_SID3_NOISE_PHASE_RESET: + chan[c.chan].noise_phase_reset_counter = c.value; + break; + case DIV_CMD_SID3_ENVELOPE_RESET: + chan[c.chan].envelope_reset_counter = c.value; + break; + case DIV_CMD_SID3_CUTOFF_SCALING: + chan[c.chan].filt[(c.value >> 4) & 3].bindCutoffToNote = c.value & 1; + chan[c.chan].filt[(c.value >> 4) & 3].bindCutoffToNoteDir = c.value & 2; + chan[c.chan].freqChanged = true; + break; + case DIV_CMD_SID3_RESONANCE_SCALING: + chan[c.chan].filt[(c.value >> 4) & 3].bindResonanceToNote = c.value & 1; + chan[c.chan].filt[(c.value >> 4) & 3].bindResonanceToNoteDir = c.value & 2; + chan[c.chan].freqChanged = true; + break; + case DIV_CMD_SAMPLE_POS: + chan[c.chan].dacPos=c.value; + break; + case DIV_CMD_MACRO_OFF: + chan[c.chan].std.mask(c.value,true); + break; + case DIV_CMD_MACRO_ON: + chan[c.chan].std.mask(c.value,false); + break; + case DIV_CMD_MACRO_RESTART: + chan[c.chan].std.restart(c.value); + break; + default: + break; + } + + if(updEnv) + { + updateEnvelope(c.chan); + } + return 1; +} + +void DivPlatformSID3::muteChannel(int ch, bool mute) { + isMuted[ch]=mute; + sid3_set_is_muted(sid3,ch,mute); +} + +void DivPlatformSID3::forceIns() { + for (int i=0; i& wlist) { + for (DivRegWrite& i: wlist) rWrite(i.addr,i.val); +} + +void DivPlatformSID3::setFlags(const DivConfig& flags) { + chipClock=1000000; + CHECK_CUSTOM_CLOCK; + + quarterClock=flags.getBool("quarterClock",false); + + if(quarterClock && chipClock >= 1000000 && !parent->isExporting()) + { + chipClock /= 4; + } + + rate=chipClock; + sid3_set_clock_rate(sid3, chipClock); + for (int i=0; irate=rate/8; + } +} + +void DivPlatformSID3::getPaired(int ch, std::vector& ret) +{ + if(chan[ch].phase) + { + ret.push_back(DivChannelPair(_("phase"), chan[ch].phaseSrc)); + } + if(chan[ch].ring) + { + if(chan[ch].ringSrc == SID3_NUM_CHANNELS) + { + ret.push_back(DivChannelPair(_("ring"), ch)); + } + else + { + ret.push_back(DivChannelPair(_("ring"), chan[ch].ringSrc)); + } + } + if(chan[ch].sync) + { + ret.push_back(DivChannelPair(_("sync"), chan[ch].syncSrc)); + } +} + +int DivPlatformSID3::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) { + parent=p; + dumpWrites=false; + skipRegisterWrites=false; + writeOscBuf=0; + + for (int i=0; i { + int prevFreq; + unsigned char wave, special_wave, attack, decay, sustain, sr, release; + int duty; + bool resetMask, resetFilter, resetDuty, gate, ring, sync, phase, oneBitNoise; + bool phaseReset, envReset, phaseResetNoise; + bool noiseFreqChanged; + unsigned char vol; + unsigned char noise_mode; + unsigned char mix_mode; + unsigned char ringSrc, syncSrc, phaseSrc; + unsigned char panLeft, panRight; + int noiseFreq; + bool independentNoiseFreq; + unsigned int noiseLFSRMask; + + struct Filter + { + int cutoff; + unsigned char resonance; + unsigned char output_volume; + unsigned char distortion_level; + unsigned char mode; + bool enabled; + unsigned char filter_matrix; + + short cutoff_slide; + + bool bindCutoffToNote; //cutoff scaling + unsigned char bindCutoffToNoteStrength; //how much cutoff changes over e.g. 1 semitone + unsigned char bindCutoffToNoteCenter; //central note of the cutoff change + bool bindCutoffToNoteDir; //if we decrease or increase cutoff if e.g. we go upper in note space + + bool bindResonanceToNote; + unsigned char bindResonanceToNoteStrength; //how much resonance changes over e.g. 1 semitone + unsigned char bindResonanceToNoteCenter; //central note of the resonance change + bool bindResonanceToNoteDir; //if we decrease or increase resonance if e.g. we go upper in note space + + Filter(): + cutoff(0), + resonance(0), + output_volume(0), + distortion_level(0), + mode(0), + enabled(false), + filter_matrix(0), + cutoff_slide(0), + bindCutoffToNote(false), + bindCutoffToNoteStrength(0), + bindCutoffToNoteCenter(0), + bindCutoffToNoteDir(false), + bindResonanceToNote(false), + bindResonanceToNoteStrength(0), + bindResonanceToNoteCenter(0), + bindResonanceToNoteDir(false) {} + } filt[SID3_NUM_FILTERS]; + + int noise_baseNoteOverride; + bool noise_fixedArp; + int noise_arpOff; + int noise_pitch2; + bool noise_hasArp; + bool noise_hasPitch; + + bool pcm; + int wavetable; + + long long dacPeriod, dacRate, dacOut; + unsigned long long dacPos; + int dacSample; + + unsigned char phaseInv; + unsigned char feedback; + + short pw_slide; + + short phase_reset_counter; + short noise_phase_reset_counter; + short envelope_reset_counter; + + void handleArpNoise(int offset=0) + { + DivMacroStruct& m = this->std.op[3].am; + + if (m.had) { + noise_hasArp=true; + + if (m.val<0) { + if (!(m.val&0x40000000)) { + noise_baseNoteOverride=(m.val|0x40000000)+offset; + noise_fixedArp=true; + } else { + noise_arpOff=m.val; + noise_fixedArp=false; + } + } else { + if (m.val&0x40000000) { + noise_baseNoteOverride=(m.val&(~0x40000000))+offset; + noise_fixedArp=true; + } else { + noise_arpOff=m.val; + noise_fixedArp=false; + } + } + noiseFreqChanged=true; + } + + else + { + noise_hasArp=false; + } + } + + void handlePitchNoise() + { + DivMacroStruct& m = this->std.op[0].ar; + + if (m.had) { + noise_hasPitch=true; + + if (m.mode) { + noise_pitch2+=m.val; + CLAMP_VAR(noise_pitch2,-131071,131071); + } else { + noise_pitch2=m.val; + } + noiseFreqChanged=true; + } + + else + { + noise_hasPitch=false; + } + } + + Channel(): + SharedChannel(SID3_MAX_VOL), + prevFreq(0xffffff), + wave(0), + special_wave(0), + attack(0), + decay(0), + sustain(0), + sr(0), + release(0), + duty(0), + resetMask(false), + resetFilter(false), + resetDuty(false), + gate(true), + ring(false), + sync(false), + phase(false), + oneBitNoise(false), + phaseReset(false), + envReset(false), + phaseResetNoise(false), + noiseFreqChanged(false), + vol(SID3_MAX_VOL), + noise_mode(0), + mix_mode(0), + ringSrc(0), + syncSrc(0), + phaseSrc(0), + panLeft(0xff), + panRight(0xff), + noiseFreq(0), + independentNoiseFreq(false), + noiseLFSRMask((1 << 29) | (1 << 5) | (1 << 3) | 1), //https://docs.amd.com/v/u/en-US/xapp052 for 30 bits: 30, 6, 4, 1 + pcm(false), + wavetable(-1), + dacPeriod(0), + dacRate(0), + dacOut(0), + dacPos(0), + dacSample(-1), + phaseInv(0), + feedback(0), + pw_slide(0), + phase_reset_counter(-1), + noise_phase_reset_counter(-1), + envelope_reset_counter(-1) {} + }; + Channel chan[SID3_NUM_CHANNELS]; + DivDispatchOscBuffer* oscBuf[SID3_NUM_CHANNELS]; + struct QueuedWrite { + unsigned short addr; + unsigned char val; + QueuedWrite(): addr(0), val(0) {} + QueuedWrite(unsigned short a, unsigned char v): addr(a), val(v) {} + }; + FixedQueue writes; + DivWaveSynth ws; + + unsigned char writeOscBuf; + + SID3* sid3; + unsigned char regPool[SID3_NUM_REGISTERS]; + + bool isMuted[SID3_NUM_CHANNELS]; + + unsigned char sampleTick; //used to update streamed sample and not clash with other reg writes at high rate samples + bool updateSample; + bool quarterClock; + + friend void putDispatchChip(void*,int); + friend void putDispatchChan(void*,int,int); + + void updateFlags(int channel, bool gate); + void updateFilter(int channel, int filter); + void updateFreq(int channel); + void updateNoiseFreq(int channel); + void updateNoiseLFSRMask(int channel); + void updateDuty(int channel); + void updateEnvelope(int channel); + void updatePanning(int channel); + void updateWave(); + + public: + void acquire(short** buf, size_t len); + int dispatch(DivCommand c); + void* getChanState(int chan); + DivDispatchOscBuffer* getOscBuffer(int chan); + unsigned char* getRegisterPool(); + int getRegisterPoolSize(); + void reset(); + void forceIns(); + void tick(bool sysTick=true); + void muteChannel(int ch, bool mute); + void setFlags(const DivConfig& flags); + void notifyInsChange(int ins); + void notifyWaveChange(int wave); + float getPostAmp(); + bool getDCOffRequired(); + DivMacroInt* getChanMacroInt(int ch); + DivChannelModeHints getModeHints(int chan); + void notifyInsDeletion(void* ins); + void poke(unsigned int addr, unsigned short val); + void poke(std::vector& wlist); + const char** getRegisterSheet(); + int init(DivEngine* parent, int channels, int sugRate, const DivConfig& flags); + int getOutputCount(); + void getPaired(int ch, std::vector& ret); + void quit(); + ~DivPlatformSID3(); +}; + +#endif diff --git a/src/engine/platform/snes.cpp b/src/engine/platform/snes.cpp index dd0571099..31f04ca26 100644 --- a/src/engine/platform/snes.cpp +++ b/src/engine/platform/snes.cpp @@ -723,11 +723,10 @@ unsigned short DivPlatformSNES::getPan(int ch) { return (chan[ch].panL<<8)|chan[ch].panR; } -DivChannelPair DivPlatformSNES::getPaired(int ch) { +void DivPlatformSNES::getPaired(int ch, std::vector& ret) { if (chan[ch].pitchMod) { - return DivChannelPair("mod",(ch-1)&7); + ret.push_back(DivChannelPair(_("mod"),(ch-1)&7)); } - return DivChannelPair(); } DivChannelModeHints DivPlatformSNES::getModeHints(int ch) { diff --git a/src/engine/platform/snes.h b/src/engine/platform/snes.h index 6426cf395..e813b6abf 100644 --- a/src/engine/platform/snes.h +++ b/src/engine/platform/snes.h @@ -106,7 +106,7 @@ class DivPlatformSNES: public DivDispatch { void* getChanState(int chan); DivMacroInt* getChanMacroInt(int ch); unsigned short getPan(int chan); - DivChannelPair getPaired(int chan); + void getPaired(int ch, std::vector& ret); DivChannelModeHints getModeHints(int chan); DivSamplePos getSamplePos(int ch); DivDispatchOscBuffer* getOscBuffer(int chan); diff --git a/src/engine/platform/sound/sid3.c b/src/engine/platform/sound/sid3.c new file mode 100644 index 000000000..9f0d89675 --- /dev/null +++ b/src/engine/platform/sound/sid3.c @@ -0,0 +1,3856 @@ +#include "sid3.h" + +#include + +#define SAFETY_HEADER if(sid3 == NULL) return; + +enum State { ATTACK, DECAY, SUSTAIN, RELEASE }; //for envelope + +#ifndef M_PI +# define M_PI 3.14159265358979323846 +#endif + +#define envspd_factor_a_sr 10 +#define envspd_factor_dr 15 + +#define envspd_a(rate) ((uint64_t)0xff0000 / ((rate == 0 ? 1 : (rate * envspd_factor_a_sr)) * (rate == 0 ? 1 : (rate * envspd_factor_a_sr * ((float)sid3->clock_rate / 1000000.0))))) +#define envspd_dr(rate) ((uint64_t)0xff0000 / ((rate == 0 ? 1 : (rate * envspd_factor_dr)) * (rate == 0 ? 1 : (rate * envspd_factor_dr * ((float)sid3->clock_rate / 1000000.0))))) +#define envspd_sr(rate) (rate == 0 ? 0 : ((uint64_t)0xff0000 / ((256 - rate) * (256 - rate) * envspd_factor_a_sr * envspd_factor_a_sr * ((float)sid3->clock_rate / 1000000.0)))) + +//these 4 ones are util only +double square(double x) { + return fmod(x, (2 * M_PI)) >= M_PI ? -1 : 1; +} +double triangle(double x) { + return asin(sin(x)) / (M_PI / 2); +} +double saw(double x) { + return atan(tan(x / 2)) / (M_PI / 2); +} +double rectSquare(double x) { + return square(x) > 0 ? square(x) : 0; +} +//=========================== + +double sinus(double x) { //taken from waveEdit.cpp of Furnace tracker + return sin(x); +} +double rectSin(double x) { + return sin(x) > 0 ? sin(x) : 0; +} +double absSin(double x) { + return fabs(sin(x)); +} + +double quartSin(double x) { + return absSin(x) * rectSquare(2 * x); +} +double squiSin(double x) { + return sin(x) >= 0 ? sin(2 * x) : 0; +} +double squiAbsSin(double x) { + return fabs(squiSin(x)); +} + +double rectSaw(double x) { + return saw(x) > 0 ? saw(x) : 0; +} +double absSaw(double x) { + return saw(x) < 0 ? saw(x) + 1 : saw(x); +} + + +double cubSaw(double x) { + return pow(saw(x), 3); +} +double rectCubSaw(double x) { + return pow(rectSaw(x), 3); +} +double absCubSaw(double x) { + return pow(absSaw(x), 3); +} + +double cubSine(double x) { + return pow(sin(x), 3); +} +double rectCubSin(double x) { + return pow(rectSin(x), 3); +} +double absCubSin(double x) { + return pow(absSin(x), 3); +} +double quartCubSin(double x) { + return pow(quartSin(x), 3); +} +double squishCubSin(double x) { + return pow(squiSin(x), 3); +} +double squishAbsCubSin(double x) { + return pow(squiAbsSin(x), 3); +} + +double rectTri(double x) { + return triangle(x) > 0 ? triangle(x) : 0; +} +double absTri(double x) { + return fabs(triangle(x)); +} +double quartTri(double x) { + return absTri(x) * rectSquare(2 * x); +} +double squiTri(double x) { + return sin(x) >= 0 ? triangle(2 * x) : 0; +} +double absSquiTri(double x) { + return fabs(squiTri(x)); +} + +double cubTriangle(double x) { + return pow(triangle(x), 3); +} +double cubRectTri(double x) { + return pow(rectTri(x), 3); +} +double cubAbsTri(double x) { + return pow(absTri(x), 3); +} +double cubQuartTri(double x) { + return pow(quartTri(x), 3); +} +double cubSquiTri(double x) { + return pow(squiTri(x), 3); +} +double absCubSquiTri(double x) { + return fabs(cubSquiTri(x)); +} + +typedef double (*WaveFunc) (double a); + +WaveFunc waveFuncsSID3[]={ + sinus, + rectSin, + absSin, + quartSin, + squiSin, + squiAbsSin, + + rectSaw, + absSaw, + + cubSaw, + rectCubSaw, + absCubSaw, + + cubSine, + rectCubSin, + absCubSin, + quartCubSin, + squishCubSin, + squishAbsCubSin, + + rectTri, + absTri, + quartTri, + squiTri, + absSquiTri, + + cubTriangle, + cubRectTri, + cubAbsTri, + cubQuartTri, + cubSquiTri, + absCubSquiTri +}; + +uint8_t wave8580__ST[] = +{ +/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x018: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x020: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x028: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x030: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x038: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x040: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x048: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x050: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x058: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x060: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x068: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x070: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x078: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x080: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x088: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x090: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x098: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0x100: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x108: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x110: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x118: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x120: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x128: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x130: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x138: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x140: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x148: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x150: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x158: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x160: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x168: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x170: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x178: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x180: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x188: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x190: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x198: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f8: */ 0x0e, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, +/* 0x200: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x208: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x210: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x218: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x220: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x228: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x230: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x238: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x240: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x248: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x250: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x258: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x260: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x268: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x270: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x278: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x280: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x288: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x290: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x298: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0x300: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x308: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x310: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x318: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x320: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x328: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x330: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x338: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x340: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x348: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x350: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x358: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x360: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x368: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x370: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x378: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x380: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x388: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x390: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x398: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x3c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3f0: */ 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, +/* 0x3f8: */ 0x1e, 0x1e, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, +/* 0x400: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x408: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x410: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x418: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x420: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x428: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x430: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x438: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x440: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x448: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x450: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x458: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x460: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x468: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x470: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x478: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x480: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x488: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x490: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x498: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0x500: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x508: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x510: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x518: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x520: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x528: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x530: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x538: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x540: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x548: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x550: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x558: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x560: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x568: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x570: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x578: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x580: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x588: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x590: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x598: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5f8: */ 0x0e, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x1f, +/* 0x600: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x608: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x610: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x618: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x620: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x628: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x630: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x638: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x640: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x648: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x650: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x658: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x660: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x668: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x670: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x678: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x680: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x688: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x690: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x698: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6f8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0x700: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x708: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x710: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x718: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x720: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x728: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x730: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x738: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x740: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x748: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x750: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x758: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x760: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x768: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x770: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x778: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x780: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x788: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x790: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x798: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x7c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7e0: */ 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, +/* 0x7e8: */ 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, +/* 0x7f0: */ 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3e, +/* 0x7f8: */ 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, +/* 0x800: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x808: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x810: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x818: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x820: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x828: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x830: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x838: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x840: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x848: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x850: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x858: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x860: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x868: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x870: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x878: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x880: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x888: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x890: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x898: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0x900: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x908: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x910: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x918: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x920: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x928: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x930: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x938: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x940: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x948: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x950: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x958: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x960: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x968: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x970: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x978: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0x980: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x988: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x990: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x998: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9f8: */ 0x0e, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, +/* 0xa00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0xa80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaa0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaa8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xab0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xab8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xac0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xac8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xad0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xad8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0xb00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0xb80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0xbc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbf0: */ 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, +/* 0xbf8: */ 0x1e, 0x1e, 0x1f, 0x1f, 0x1f, 0x1f, 0x3f, 0x3f, +/* 0xc00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0xc80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf8: */ 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, +/* 0xd00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, +/* 0xd80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0xdc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdf8: */ 0x0e, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x1f, 0x1f, +/* 0xe00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe78: */ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x83, 0x83, +/* 0xe80: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe88: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe90: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe98: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xea0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xea8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xeb0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xeb8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xec0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xec8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xed0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xed8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xee0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xee8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xef0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xef8: */ 0x80, 0x80, 0x80, 0x80, 0x87, 0x87, 0x87, 0x8f, +/* 0xf00: */ 0xc0, 0xe0, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, +/* 0xf08: */ 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf10: */ 0xc0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf18: */ 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf20: */ 0xc0, 0xe0, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, +/* 0xf28: */ 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xc0, 0xe0, 0xe0, +/* 0xf30: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf38: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf40: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf48: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf50: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf58: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf60: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf68: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf70: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf78: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe3, 0xe3, +/* 0xf80: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf88: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf90: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf98: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfa0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfa8: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfb0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfb8: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf1, +/* 0xfc0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfc8: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfd0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfd8: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfe0: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0xfe8: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0xff0: */ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, +/* 0xff8: */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +uint8_t wave8580_P_T[] = +{ +/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x018: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x020: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x028: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x030: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x038: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x040: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x048: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x050: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x058: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x060: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x068: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x070: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x078: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x080: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x088: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x090: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x098: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +/* 0x100: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x108: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x110: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x118: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x120: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x128: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x130: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x138: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x140: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x148: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x150: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x158: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x160: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x168: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x170: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x178: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x180: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x188: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x190: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x198: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f8: */ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x3f, 0x3f, +/* 0x200: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x208: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x210: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x218: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x220: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x228: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x230: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x238: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x240: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x248: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x250: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x258: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x260: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x268: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x270: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x278: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x280: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x288: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x290: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x298: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x5e, 0x5f, +/* 0x300: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x308: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x310: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x318: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x320: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x328: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x330: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x338: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x340: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x348: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x350: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x358: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x360: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x368: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x370: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +/* 0x378: */ 0x00, 0x00, 0x00, 0x40, 0x40, 0x60, 0x60, 0x6f, +/* 0x380: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x388: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x390: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x398: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +/* 0x3a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, +/* 0x3b0: */ 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x60, +/* 0x3b8: */ 0x40, 0x40, 0x60, 0x60, 0x60, 0x60, 0x70, 0x77, +/* 0x3c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, +/* 0x3c8: */ 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x60, 0x60, +/* 0x3d0: */ 0x40, 0x40, 0x40, 0x60, 0x60, 0x60, 0x60, 0x70, +/* 0x3d8: */ 0x60, 0x60, 0x60, 0x70, 0x70, 0x70, 0x78, 0x7b, +/* 0x3e0: */ 0x60, 0x60, 0x60, 0x70, 0x60, 0x70, 0x70, 0x70, +/* 0x3e8: */ 0x70, 0x70, 0x70, 0x78, 0x78, 0x78, 0x78, 0x7c, +/* 0x3f0: */ 0x78, 0x78, 0x78, 0x7c, 0x78, 0x7c, 0x7c, 0x7e, +/* 0x3f8: */ 0x7c, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, +/* 0x400: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x408: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x410: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x418: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x420: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x428: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x430: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x438: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x440: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x448: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x450: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x458: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x460: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x468: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x470: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x478: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0x480: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x488: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x490: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x498: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, +/* 0x4c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0x4d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0x4d8: */ 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x4e0: */ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x4e8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x4f0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x4f8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x8e, 0x9f, +/* 0x500: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x508: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x510: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x518: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0x520: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x528: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, +/* 0x530: */ 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x538: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x540: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, +/* 0x548: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x550: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x558: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x560: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x568: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x570: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x578: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xaf, +/* 0x580: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x588: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x590: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x598: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x5a0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x5a8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x5b0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x5b8: */ 0x80, 0x80, 0x80, 0xa0, 0xa0, 0xa0, 0xa0, 0xb7, +/* 0x5c0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x5c8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xa0, +/* 0x5d0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xa0, 0xa0, +/* 0x5d8: */ 0xa0, 0xa0, 0xa0, 0xb0, 0xa0, 0xb0, 0xb0, 0xbb, +/* 0x5e0: */ 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xb0, 0xb0, +/* 0x5e8: */ 0xa0, 0xb0, 0xb0, 0xb8, 0xb0, 0xb8, 0xb8, 0xbc, +/* 0x5f0: */ 0xb0, 0xb8, 0xb8, 0xb8, 0xb8, 0xbc, 0xbc, 0xbe, +/* 0x5f8: */ 0xbc, 0xbc, 0xbe, 0xbf, 0xbe, 0xbf, 0xbf, 0xbf, +/* 0x600: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x608: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x610: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x618: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x620: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x628: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x630: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x638: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, +/* 0x640: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x648: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x650: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0x658: */ 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x660: */ 0x80, 0x80, 0x80, 0xc0, 0x80, 0xc0, 0xc0, 0xc0, +/* 0x668: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x670: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x678: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcf, +/* 0x680: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, +/* 0x688: */ 0xc0, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x690: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x698: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6a0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6a8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6b0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6b8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd7, +/* 0x6c0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6c8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6d0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x6d8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd0, 0xd0, 0xd9, +/* 0x6e0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd0, +/* 0x6e8: */ 0xc0, 0xd0, 0xd0, 0xd0, 0xd0, 0xd8, 0xd8, 0xdc, +/* 0x6f0: */ 0xd0, 0xd0, 0xd8, 0xd8, 0xd8, 0xdc, 0xdc, 0xde, +/* 0x6f8: */ 0xdc, 0xdc, 0xde, 0xdf, 0xde, 0xdf, 0xdf, 0xdf, +/* 0x700: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x708: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x710: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x718: */ 0xc0, 0xc0, 0xc0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, +/* 0x720: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, +/* 0x728: */ 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x730: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x738: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe7, +/* 0x740: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x748: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x750: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x758: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe8, +/* 0x760: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x768: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe8, 0xec, +/* 0x770: */ 0xe0, 0xe0, 0xe0, 0xe8, 0xe8, 0xe8, 0xec, 0xee, +/* 0x778: */ 0xec, 0xec, 0xec, 0xee, 0xee, 0xef, 0xef, 0xef, +/* 0x780: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x788: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, +/* 0x790: */ 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x798: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x7a0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x7a8: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf4, +/* 0x7b0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf4, +/* 0x7b8: */ 0xf0, 0xf4, 0xf4, 0xf6, 0xf6, 0xf7, 0xf7, 0xf7, +/* 0x7c0: */ 0xf0, 0xf0, 0xf0, 0xf8, 0xf0, 0xf8, 0xf8, 0xf8, +/* 0x7c8: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0x7d0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0x7d8: */ 0xf8, 0xf8, 0xf8, 0xfa, 0xfa, 0xfb, 0xfb, 0xfb, +/* 0x7e0: */ 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0x7e8: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfd, 0xfd, 0xfd, +/* 0x7f0: */ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, +/* 0x7f8: */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +/* 0x800: */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +/* 0x808: */ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, +/* 0x810: */ 0xfd, 0xfd, 0xfd, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0x818: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, +/* 0x820: */ 0xfb, 0xfb, 0xfb, 0xfa, 0xfa, 0xf8, 0xf8, 0xf8, +/* 0x828: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0x830: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0x838: */ 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x840: */ 0xf7, 0xf7, 0xf7, 0xf6, 0xf6, 0xf4, 0xf4, 0xf0, +/* 0x848: */ 0xf4, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x850: */ 0xf4, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x858: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x860: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0x868: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, +/* 0x870: */ 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x878: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x880: */ 0xef, 0xef, 0xef, 0xee, 0xee, 0xec, 0xec, 0xe8, +/* 0x888: */ 0xee, 0xec, 0xe8, 0xe8, 0xe8, 0xe0, 0xe0, 0xe0, +/* 0x890: */ 0xec, 0xe8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x898: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8a0: */ 0xe8, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8a8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8b0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8b8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8c0: */ 0xe7, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8c8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0x8d0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, +/* 0x8d8: */ 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x8e0: */ 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x8e8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x8f0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x8f8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x900: */ 0xdf, 0xdf, 0xdf, 0xde, 0xdf, 0xde, 0xdc, 0xdc, +/* 0x908: */ 0xde, 0xdc, 0xdc, 0xd8, 0xd8, 0xd8, 0xd0, 0xd0, +/* 0x910: */ 0xdc, 0xd8, 0xd8, 0xd0, 0xd0, 0xd0, 0xd0, 0xc0, +/* 0x918: */ 0xd0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x920: */ 0xd9, 0xd0, 0xd0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x928: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x930: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x938: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x940: */ 0xd7, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x948: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x950: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x958: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x960: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x968: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x970: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, +/* 0x978: */ 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x980: */ 0xcf, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x988: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x990: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0x998: */ 0xc0, 0xc0, 0xc0, 0x80, 0xc0, 0x80, 0x80, 0x80, +/* 0x9a0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, +/* 0x9a8: */ 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9b0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9b8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9c0: */ 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9c8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9d0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9d8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9e0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9e8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9f0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0x9f8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa00: */ 0xbf, 0xbf, 0xbf, 0xbe, 0xbf, 0xbe, 0xbc, 0xbc, +/* 0xa08: */ 0xbe, 0xbc, 0xbc, 0xb8, 0xb8, 0xb8, 0xb8, 0xb0, +/* 0xa10: */ 0xbc, 0xb8, 0xb8, 0xb0, 0xb8, 0xb0, 0xb0, 0xb0, +/* 0xa18: */ 0xb0, 0xb0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, +/* 0xa20: */ 0xbb, 0xb0, 0xb0, 0xa0, 0xb0, 0xa0, 0xa0, 0xa0, +/* 0xa28: */ 0xa0, 0xa0, 0xa0, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa30: */ 0xa0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa38: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa40: */ 0xb7, 0xb0, 0xa0, 0xa0, 0xa0, 0x80, 0x80, 0x80, +/* 0xa48: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa50: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa58: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa60: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa68: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa70: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa78: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa80: */ 0xaf, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa88: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa90: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xa98: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xaa0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xaa8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xab0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xab8: */ 0x80, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, +/* 0xac0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xac8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +/* 0xad0: */ 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, +/* 0xad8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae0: */ 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb00: */ 0x9f, 0x9e, 0x88, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb08: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb10: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb18: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +/* 0xb20: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +/* 0xb28: */ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb30: */ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb40: */ 0x80, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, +/* 0xb48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb80: */ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc00: */ 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7e, 0x7e, 0x7c, +/* 0xc08: */ 0x7e, 0x7c, 0x7c, 0x78, 0x7c, 0x78, 0x78, 0x78, +/* 0xc10: */ 0x7c, 0x78, 0x78, 0x78, 0x78, 0x70, 0x70, 0x70, +/* 0xc18: */ 0x78, 0x70, 0x70, 0x60, 0x70, 0x60, 0x60, 0x60, +/* 0xc20: */ 0x7b, 0x78, 0x70, 0x70, 0x70, 0x60, 0x60, 0x60, +/* 0xc28: */ 0x70, 0x60, 0x60, 0x60, 0x60, 0x40, 0x40, 0x40, +/* 0xc30: */ 0x60, 0x60, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, +/* 0xc38: */ 0x40, 0x40, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, +/* 0xc40: */ 0x77, 0x70, 0x60, 0x60, 0x60, 0x60, 0x40, 0x40, +/* 0xc48: */ 0x60, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, +/* 0xc50: */ 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc60: */ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc80: */ 0x6f, 0x64, 0x60, 0x40, 0x40, 0x00, 0x00, 0x00, +/* 0xc88: */ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd00: */ 0x5f, 0x5e, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe00: */ 0x3f, 0x3f, 0x3e, 0x00, 0x1c, 0x00, 0x00, 0x00, +/* 0xe08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xea0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xea8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xeb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xeb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xec0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xec8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xed0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xed8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xee0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xee8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xef0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xef8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf00: */ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xf98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfa0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfa8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfe0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xfe8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xff0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xff8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +uint8_t wave8580_PS_[] = +{ +/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x018: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x020: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x028: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x030: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x038: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x040: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x048: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x050: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x058: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x060: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x068: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x070: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x078: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x080: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x088: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x090: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x098: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x0c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +/* 0x100: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x108: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x110: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x118: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x120: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x128: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x130: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x138: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x140: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x148: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x150: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x158: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x160: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x168: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x170: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x178: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +/* 0x180: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x188: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x190: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x198: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x1c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x1e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x1f, +/* 0x200: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x208: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x210: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x218: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x220: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x228: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x230: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x238: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x240: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x248: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x250: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x258: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x260: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x268: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x270: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x278: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x280: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x288: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x290: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x298: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x2c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x2e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, +/* 0x300: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x308: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x310: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x318: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x320: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x328: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x330: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x338: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x340: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x348: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x350: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x358: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x360: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x368: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x370: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x378: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, +/* 0x380: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x388: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x390: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x398: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, +/* 0x3c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, +/* 0x3e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, +/* 0x3f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, +/* 0x3f8: */ 0x00, 0x0c, 0x1c, 0x3f, 0x1e, 0x3f, 0x3f, 0x3f, +/* 0x400: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x408: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x410: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x418: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x420: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x428: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x430: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x438: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x440: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x448: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x450: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x458: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x460: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x468: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x470: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x478: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x480: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x488: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x490: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x498: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x4c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, +/* 0x500: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x508: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x510: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x518: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x520: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x528: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x530: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x538: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x540: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x548: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x550: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x558: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x560: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x568: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x570: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x578: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +/* 0x580: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x588: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x590: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x598: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, +/* 0x5c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, +/* 0x5e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, +/* 0x5f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, +/* 0x5f8: */ 0x00, 0x00, 0x00, 0x5f, 0x0c, 0x5f, 0x5f, 0x5f, +/* 0x600: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x608: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x610: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x618: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x620: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x628: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x630: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x638: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x640: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x648: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x650: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x658: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x660: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x668: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x670: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x678: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, +/* 0x680: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x688: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x690: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x698: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, +/* 0x6c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, +/* 0x6e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, +/* 0x6f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, +/* 0x6f8: */ 0x00, 0x40, 0x40, 0x6f, 0x40, 0x6f, 0x6f, 0x6f, +/* 0x700: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x708: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x710: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x718: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x720: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x728: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x730: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x738: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, +/* 0x740: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x748: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x750: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x758: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x61, +/* 0x760: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +/* 0x768: */ 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x40, 0x70, +/* 0x770: */ 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x70, +/* 0x778: */ 0x40, 0x60, 0x60, 0x77, 0x60, 0x77, 0x77, 0x77, +/* 0x780: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x788: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, +/* 0x790: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, +/* 0x798: */ 0x00, 0x40, 0x40, 0x60, 0x40, 0x60, 0x60, 0x79, +/* 0x7a0: */ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, +/* 0x7a8: */ 0x40, 0x40, 0x40, 0x60, 0x60, 0x60, 0x60, 0x78, +/* 0x7b0: */ 0x40, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, +/* 0x7b8: */ 0x60, 0x70, 0x70, 0x78, 0x70, 0x79, 0x7b, 0x7b, +/* 0x7c0: */ 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, +/* 0x7c8: */ 0x60, 0x60, 0x60, 0x70, 0x60, 0x70, 0x70, 0x7c, +/* 0x7d0: */ 0x60, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x7c, +/* 0x7d8: */ 0x70, 0x78, 0x78, 0x7c, 0x78, 0x7c, 0x7c, 0x7d, +/* 0x7e0: */ 0x70, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x7c, +/* 0x7e8: */ 0x78, 0x7c, 0x7c, 0x7e, 0x7c, 0x7e, 0x7e, 0x7e, +/* 0x7f0: */ 0x7c, 0x7c, 0x7c, 0x7e, 0x7e, 0x7f, 0x7f, 0x7f, +/* 0x7f8: */ 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0xff, +/* 0x800: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x808: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x810: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x818: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x820: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x828: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x830: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x838: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x840: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x848: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x850: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x858: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x860: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x868: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x870: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x878: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, +/* 0x880: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x888: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x890: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x898: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x8c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, +/* 0x900: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x908: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x910: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x918: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x920: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x928: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x930: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x938: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0x940: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x948: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x950: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x958: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x960: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x968: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x970: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x978: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, +/* 0x980: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x988: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x990: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x998: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, +/* 0x9c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x8d, +/* 0x9e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0x9e8: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x8e, +/* 0x9f0: */ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x8f, +/* 0x9f8: */ 0x80, 0x80, 0x80, 0x9f, 0x80, 0x9f, 0x9f, 0x9f, +/* 0xa00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, +/* 0xa40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xa70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xa78: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x87, +/* 0xa80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xaa0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaa8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xab0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xab8: */ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x83, +/* 0xac0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xac8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xad0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, +/* 0xad8: */ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, +/* 0xae0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xae8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x84, +/* 0xaf0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x87, +/* 0xaf8: */ 0x80, 0x80, 0x80, 0x87, 0x80, 0x8f, 0xaf, 0xaf, +/* 0xb00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xb10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xb18: */ 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb20: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, +/* 0xb28: */ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb30: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb38: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, +/* 0xb40: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb48: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb50: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb58: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, +/* 0xb60: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb68: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xa0, +/* 0xb70: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xa0, +/* 0xb78: */ 0x80, 0x80, 0x80, 0xa0, 0x80, 0xa3, 0xb7, 0xb7, +/* 0xb80: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb88: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb90: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xb98: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xb1, +/* 0xba0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xba8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xb0, +/* 0xbb0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xb0, +/* 0xbb8: */ 0x80, 0xa0, 0xa0, 0xb0, 0xa0, 0xb8, 0xb9, 0xbb, +/* 0xbc0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xa0, +/* 0xbc8: */ 0x80, 0x80, 0x80, 0xa0, 0x80, 0xa0, 0xa0, 0xb8, +/* 0xbd0: */ 0x80, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xa0, 0xb8, +/* 0xbd8: */ 0xa0, 0xb0, 0xb0, 0xb8, 0xb0, 0xbc, 0xbc, 0xbd, +/* 0xbe0: */ 0xa0, 0xb0, 0xb0, 0xb0, 0xb0, 0xb8, 0xb8, 0xbc, +/* 0xbe8: */ 0xb0, 0xb8, 0xb8, 0xbc, 0xb8, 0xbc, 0xbe, 0xbe, +/* 0xbf0: */ 0xb8, 0xbc, 0xbc, 0xbe, 0xbc, 0xbe, 0xbe, 0xbf, +/* 0xbf8: */ 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf, +/* 0xc00: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, +/* 0xc08: */ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, +/* 0xc10: */ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc18: */ 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc20: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc28: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc30: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc38: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, +/* 0xc40: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc48: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc50: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc58: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc60: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc68: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc70: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc78: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc7, +/* 0xc80: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc88: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc90: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xc98: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xca0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xca8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xcb0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xcb8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc3, +/* 0xcc0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xcc8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xcd0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xcd8: */ 0x80, 0x80, 0x80, 0xc0, 0x80, 0xc0, 0xc0, 0xc1, +/* 0xce0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xce8: */ 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xcf0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc7, +/* 0xcf8: */ 0xc0, 0xc0, 0xc0, 0xc7, 0xc0, 0xcf, 0xcf, 0xcf, +/* 0xd00: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xd08: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xd10: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xd18: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xd20: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xd28: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xd30: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, +/* 0xd38: */ 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc3, +/* 0xd40: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, +/* 0xd48: */ 0x80, 0x80, 0x80, 0xc0, 0x80, 0xc0, 0xc0, 0xc0, +/* 0xd50: */ 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd58: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, +/* 0xd60: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd68: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd70: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd78: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc1, 0xc7, 0xd7, +/* 0xd80: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd88: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd90: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xd98: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xda0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xda8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd0, +/* 0xdb0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd0, +/* 0xdb8: */ 0xc0, 0xc0, 0xc0, 0xd0, 0xc0, 0xd0, 0xd8, 0xdb, +/* 0xdc0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xdc8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, +/* 0xdd0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xd8, +/* 0xdd8: */ 0xc0, 0xc0, 0xc0, 0xd8, 0xd0, 0xd8, 0xd8, 0xdd, +/* 0xde0: */ 0xc0, 0xc0, 0xc0, 0xd0, 0xc0, 0xd0, 0xd0, 0xdc, +/* 0xde8: */ 0xd0, 0xd8, 0xd8, 0xdc, 0xd8, 0xdc, 0xdc, 0xde, +/* 0xdf0: */ 0xd8, 0xdc, 0xdc, 0xde, 0xdc, 0xde, 0xde, 0xdf, +/* 0xdf8: */ 0xde, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, +/* 0xe00: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe08: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe10: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe18: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe20: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe28: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe30: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe38: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe3, +/* 0xe40: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe48: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xe50: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, +/* 0xe58: */ 0xc0, 0xc0, 0xc0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe1, +/* 0xe60: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, +/* 0xe68: */ 0xc0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xe70: */ 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xe78: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe1, 0xe3, 0xe7, +/* 0xe80: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, +/* 0xe88: */ 0xc0, 0xc0, 0xc0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, +/* 0xe90: */ 0xc0, 0xc0, 0xc0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, +/* 0xe98: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xea0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xea8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xeb0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xeb8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xeb, +/* 0xec0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xec8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xed0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xed8: */ 0xe0, 0xe0, 0xe0, 0xe8, 0xe0, 0xe8, 0xe8, 0xed, +/* 0xee0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xec, +/* 0xee8: */ 0xe0, 0xe0, 0xe0, 0xec, 0xe8, 0xec, 0xec, 0xee, +/* 0xef0: */ 0xe8, 0xe8, 0xe8, 0xec, 0xec, 0xee, 0xee, 0xef, +/* 0xef8: */ 0xec, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, +/* 0xf00: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf08: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf10: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf18: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, +/* 0xf20: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, +/* 0xf28: */ 0xe0, 0xe0, 0xe0, 0xf0, 0xe0, 0xf0, 0xf0, 0xf0, +/* 0xf30: */ 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf38: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf3, +/* 0xf40: */ 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf48: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf50: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf58: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf5, +/* 0xf60: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xf68: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf4, 0xf4, 0xf6, +/* 0xf70: */ 0xf0, 0xf0, 0xf0, 0xf4, 0xf0, 0xf4, 0xf6, 0xf7, +/* 0xf78: */ 0xf4, 0xf6, 0xf6, 0xf7, 0xf7, 0xf7, 0xf7, 0xf7, +/* 0xf80: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, +/* 0xf88: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, 0xf8, +/* 0xf90: */ 0xf0, 0xf0, 0xf0, 0xf8, 0xf0, 0xf8, 0xf8, 0xf8, +/* 0xf98: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf9, +/* 0xfa0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfa8: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xfa, +/* 0xfb0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xfb, +/* 0xfb8: */ 0xf8, 0xfa, 0xfa, 0xfb, 0xfb, 0xfb, 0xfb, 0xfb, +/* 0xfc0: */ 0xf8, 0xf8, 0xf8, 0xfc, 0xf8, 0xfc, 0xfc, 0xfc, +/* 0xfc8: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0xfd0: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfd, +/* 0xfd8: */ 0xfc, 0xfc, 0xfc, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, +/* 0xfe0: */ 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, +/* 0xfe8: */ 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, +/* 0xff0: */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +/* 0xff8: */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +uint8_t wave8580_PST[] = +{ +/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x018: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x020: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x028: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x030: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x038: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x040: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x048: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x050: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x058: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x060: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x068: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x070: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x078: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x080: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x088: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x090: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x098: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x0f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x100: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x108: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x110: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x118: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x120: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x128: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x130: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x138: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x140: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x148: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x150: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x158: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x160: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x168: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x170: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x178: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x180: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x188: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x190: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x198: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x1f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x200: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x208: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x210: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x218: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x220: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x228: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x230: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x238: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x240: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x248: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x250: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x258: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x260: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x268: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x270: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x278: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x280: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x288: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x290: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x298: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x2f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x300: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x308: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x310: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x318: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x320: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x328: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x330: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x338: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x340: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x348: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x350: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x358: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x360: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x368: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x370: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x378: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x380: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x388: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x390: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x398: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x3f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, +/* 0x400: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x408: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x410: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x418: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x420: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x428: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x430: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x438: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x440: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x448: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x450: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x458: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x460: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x468: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x470: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x478: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x480: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x488: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x490: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x498: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x4f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x500: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x508: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x510: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x518: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x520: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x528: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x530: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x538: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x540: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x548: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x550: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x558: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x560: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x568: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x570: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x578: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x580: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x588: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x590: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x598: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x5f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x600: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x608: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x610: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x618: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x620: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x628: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x630: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x638: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x640: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x648: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x650: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x658: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x660: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x668: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x670: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x678: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x680: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x688: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x690: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x698: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x6f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x700: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x708: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x710: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x718: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x720: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x728: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x730: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x738: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x740: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x748: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x750: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x758: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x760: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x768: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x770: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x778: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x780: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x788: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x790: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x798: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x7e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x70, +/* 0x7f0: */ 0x60, 0x20, 0x70, 0x70, 0x70, 0x70, 0x70, 0x78, +/* 0x7f8: */ 0x78, 0x78, 0x7c, 0x7c, 0x7e, 0x7e, 0x7f, 0x7f, +/* 0x800: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x808: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x810: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x818: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x820: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x828: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x830: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x838: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x840: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x848: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x850: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x858: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x860: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x868: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x870: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x878: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x880: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x888: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x890: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x898: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x8f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x900: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x908: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x910: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x918: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x920: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x928: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x930: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x938: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x940: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x948: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x950: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x958: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x960: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x968: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x970: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x978: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x980: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x988: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x990: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x998: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9a8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9b8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9c0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9c8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9d8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9e0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9e8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9f0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0x9f8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xa98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaa0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaa8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xab0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xab8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xac0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xac8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xad0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xad8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xae8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xaf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xb98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xba8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbe8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xbf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x3f, +/* 0xc00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xc98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xca8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xce8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xcf8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd68: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd70: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd78: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd80: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd88: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd90: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xd98: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xda8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdb8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdc0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdc8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdd8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xde8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xdf0: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, +/* 0xdf8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x8c, 0x9f, +/* 0xe00: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe08: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe10: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe18: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe20: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe28: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe30: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe38: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, +/* 0xe40: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe48: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe50: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +/* 0xe58: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, +/* 0xe60: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +/* 0xe68: */ 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe70: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe78: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe80: */ 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, +/* 0xe88: */ 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe90: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xe98: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xea0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xea8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xeb0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xeb8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xec0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xec8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xed0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xed8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xee0: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +/* 0xee8: */ 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, +/* 0xef0: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xef8: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcf, +/* 0xf00: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf08: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf10: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf18: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf20: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf28: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf30: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf38: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf40: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf48: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf50: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf58: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf60: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +/* 0xf68: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, +/* 0xf70: */ 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf78: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe3, +/* 0xf80: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf88: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf90: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xf98: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xfa0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xfa8: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, +/* 0xfb0: */ 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, +/* 0xfb8: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfc0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfc8: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfd0: */ 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, +/* 0xfd8: */ 0xf0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfe0: */ 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +/* 0xfe8: */ 0xf8, 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, +/* 0xff0: */ 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfe, 0xfe, 0xfe, +/* 0xff8: */ 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +uint16_t sid3_pulse(uint32_t acc, uint16_t pw) // 0-FFFF pulse width range +{ + return (((acc >> ((SID3_ACC_BITS - 16))) >= ((pw == 0xffff ? pw + 1 : pw)) ? (0xffff) : 0)); +} + +uint16_t sid3_saw(uint32_t acc) +{ + return (acc >> (SID3_ACC_BITS - 16)) & (0xffff); +} + +uint16_t sid3_triangle(uint32_t acc) +{ + return (((acc > (1 << (SID3_ACC_BITS - 1))) ? ~acc : acc) >> (SID3_ACC_BITS - 17)); +} + +void sid3_clock_lfsr(sid3_channel* ch) +{ + uint32_t feedback = ch->lfsr & 1; + ch->lfsr >>= 1; + + if (feedback) + { + ch->lfsr ^= ch->lfsr_taps; + } +} + +uint16_t sid3_noise(uint32_t lfsr, bool one_bit) +{ + return one_bit ? ((lfsr & 1) ? 0xffff : 0) : + + ((((lfsr & 1) << 7) | + ((lfsr & 4) << 4) | + ((lfsr & 0x40) >> 1) | + ((lfsr & 0x200) >> 5) | + ((lfsr & 0x800) >> 8) | + ((lfsr & 0x8000) >> 13) | + ((lfsr & 0x40000) >> 17) | + ((lfsr & 0x100000) >> 20)) << 8); //bits like in SID +} + +uint16_t sid3_special_wave(SID3* sid3, uint32_t acc, uint8_t wave) +{ + return sid3->special_waves[wave][acc >> (SID3_ACC_BITS - 14)]; +} + +#define fill_gap(i, how_far) \ +if(i > (how_far - 1)) \ +{ \ + if(sid3->exponential_output_to_envelope_counter[(i) - (how_far)] != 0) \ + { \ + sid3->exponential_output_to_envelope_counter[(i)] = sid3->exponential_output_to_envelope_counter[i - (how_far)]; \ + goto next; \ + } \ +} + +SID3* sid3_create() +{ + SID3* sid3 = (SID3*)malloc(sizeof(SID3)); + + memset(sid3, 0, sizeof(SID3)); + + for(int32_t i = 0; i < SID3_NUM_UNIQUE_SPECIAL_WAVES; i++) + { + for(int32_t j = 0; j < SID3_SPECIAL_WAVE_LENGTH; j++) + { + sid3->special_waves[i][j] = (uint16_t)(waveFuncsSID3[i]((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff + (double)0x7fff); + + int32_t clipped = ((int32_t)sid3->special_waves[i][j] - 0x7fff) * 2; + if (clipped < -0x7fff) clipped = -0x7fff; + if (clipped > 0x7fff) clipped = 0x7fff; + sid3->special_waves[i + SID3_NUM_UNIQUE_SPECIAL_WAVES][j] = clipped + 0x7fff; + } + } + + for (int32_t j = 0; j < SID3_SPECIAL_WAVE_LENGTH; j++) + { + int32_t clipped = (int32_t)(triangle((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff) * 2; + + if (clipped < -0x7fff) clipped = -0x7fff; + if (clipped > 0x7fff) clipped = 0x7fff; + sid3->special_waves[SID3_NUM_UNIQUE_SPECIAL_WAVES * 2][j] = clipped + 0x7fff; + + clipped = (int32_t)(saw((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff) * 2; + + if (clipped < -0x7fff) clipped = -0x7fff; + if (clipped > 0x7fff) clipped = 0x7fff; + sid3->special_waves[SID3_NUM_UNIQUE_SPECIAL_WAVES * 2 + 1][j] = clipped + 0x7fff; + } + + double min_val = exp(-2.0); + double max_val = exp(2.0); + + double scale_factor = (double)0xffff / (max_val - min_val); + + for(uint32_t i = 0; i < SID3_EXPONENTIAL_LUT_LENGTH; i++) + { + sid3->env_counter_to_exponential_output[i] = (exp(-2.0 + (double)i * 4.0 / (double)SID3_EXPONENTIAL_LUT_LENGTH) - min_val) * scale_factor; + } + + sid3->env_counter_to_exponential_output[0] = 0; //just in case + + for(uint32_t i = 0; i < SID3_EXPONENTIAL_LUT_LENGTH; i++) + { + sid3->exponential_output_to_envelope_counter[(uint64_t)sid3->env_counter_to_exponential_output[i] * (uint64_t)SID3_EXPONENTIAL_LUT_LENGTH / (uint64_t)0xffff] = i << 8; + } + for(uint32_t i = 0; i < SID3_EXPONENTIAL_LUT_LENGTH; i++) //fill the gaps... + { + if(sid3->exponential_output_to_envelope_counter[i] > 0xff0000) + { + sid3->exponential_output_to_envelope_counter[i] = 0xff0000; + } + + if(sid3->exponential_output_to_envelope_counter[i] == 0) + { + fill_gap(i, 1) + fill_gap(i, 2) + fill_gap(i, 3) + fill_gap(i, 4) + fill_gap(i, 5) + fill_gap(i, 6) + } + + next:; + } + + return sid3; +} + +void sid3_reset(SID3* sid3) +{ + SAFETY_HEADER + + for(int32_t i = 0; i < SID3_NUM_CHANNELS - 1; i++) + { + memset(&sid3->chan[i], 0, sizeof(sid3_channel)); + sid3->chan[i].adsr.hold_zero = true; + sid3->chan[i].lfsr = 0x3fffffff; + sid3->chan[i].lfsr_taps = 1 | (1 << 23) | (1 << 25) | (1 << 29); //https://docs.amd.com/v/u/en-US/xapp052 for 30 bits: 30, 6, 4, 1; but inverted since our LFSR is moving in different direction + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + sid3->chan[i].filt.filt[j].Vlp = 0; + sid3->chan[i].filt.filt[j].Vbp = 0; + sid3->chan[i].filt.filt[j].Vhp = 0; + } + } + + memset(&sid3->wave_chan, 0, sizeof(sid3_wavetable_chan)); + sid3->wave_chan.adsr.hold_zero = true; + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + sid3->wave_chan.filt.filt[j].Vlp = 0; + sid3->wave_chan.filt.filt[j].Vbp = 0; + sid3->wave_chan.filt.filt[j].Vhp = 0; + } +} + +void sid3_gate_bit(SID3* sid3, uint8_t gate, sid3_channel_adsr* adsr) +{ + // The rate counter is never reset, thus there will be a delay before the + // envelope counter starts counting up (attack) or down (release). + + // Gate bit on: Start attack, decay, sustain. + if (gate) + { + if(adsr->state != ATTACK) + { + adsr->envelope_counter = (uint32_t)sid3->env_counter_to_exponential_output[adsr->envelope_counter >> 8] << 8; + } + + adsr->state = ATTACK; + adsr->envelope_speed = envspd_a(adsr->a); //todo: make it properly + //adsr->envelope_counter = 0; + + // Switching to attack state unlocks the zero freeze. + adsr->hold_zero = false; + } + // Gate bit off: Start release. + else + { + if(adsr->state == ATTACK && !adsr->hold_zero) + { + adsr->envelope_counter = sid3->exponential_output_to_envelope_counter[adsr->envelope_counter >> 8]; + } + + adsr->state = RELEASE; + adsr->envelope_speed = envspd_dr(adsr->r); //todo: make it properly + } + + if(adsr->envelope_counter > 0xff0000) adsr->envelope_counter = 0xff0000; +} + +void sid3_adsr_clock(SID3* sid3, sid3_channel_adsr* adsr) +{ + // Check whether the envelope counter is frozen at zero. + if (adsr->hold_zero) + { + return; + } + + switch (adsr->state) + { + case ATTACK: + { + adsr->envelope_counter += adsr->envelope_speed; + + if (adsr->envelope_counter >= 0xff0000) + { + adsr->state = DECAY; + adsr->envelope_speed = envspd_dr(adsr->d); + } + + return; //do not do exponential approximation of attack + } + break; + case DECAY: + { + adsr->envelope_counter -= adsr->envelope_speed; + + if(adsr->envelope_counter > 0xff0000) adsr->envelope_counter = 0xff0000; + + if(adsr->envelope_counter <= ((uint32_t)adsr->s << 16)) + { + adsr->state = SUSTAIN; + adsr->envelope_counter = (uint32_t)adsr->s << 16; + adsr->envelope_speed = envspd_sr(adsr->sr); + } + + if(adsr->envelope_counter <= adsr->envelope_speed || adsr->envelope_counter > 0xfff0000) + { + adsr->envelope_counter = 0; + adsr->hold_zero = true; + } + } + break; + case SUSTAIN: + case RELEASE: + { + adsr->envelope_counter -= adsr->envelope_speed; + + if(adsr->envelope_counter > 0xff0000) adsr->envelope_counter = 0xff0000; + + if(adsr->envelope_counter <= adsr->envelope_speed) + { + adsr->envelope_counter = 0; + adsr->hold_zero = true; + } + } + break; + } +} + +int32_t sid3_adsr_output(SID3* sid3, sid3_channel_adsr* adsr, int32_t input) +{ + if(adsr->hold_zero) return 0; + + if(adsr->state == ATTACK) + { + return (int32_t)((int64_t)input * (int64_t)adsr->envelope_counter / (int64_t)0xff0000 * (int64_t)adsr->vol / (int64_t)SID3_MAX_VOL); + } + else + { + return (int32_t)((int64_t)input * (int64_t)sid3->env_counter_to_exponential_output[adsr->envelope_counter >> 8] / (int64_t)0xffff * (int64_t)adsr->vol / (int64_t)SID3_MAX_VOL); + } +} + +void sid3_set_filter_settings(SID3* sid3, sid3_filter* filt) +{ + const double pi = 3.1415926535897932385; + + // Multiply with 1.048576 to facilitate division by 1 000 000 by right- + // shifting 20 times (2 ^ 20 = 1048576). + filt->w0 = (2.0*pi*(float)filt->cutoff) / ((double)sid3->clock_rate / 2.0) / 5.0; // "/ 5.0" bc we have 16 bit cutoff instead of 12-bit + + // Limit f0 to 16kHz to keep 1 cycle filter stable. + const float w0_max_1 = (2.0*pi*20000.0) / ((double)sid3->clock_rate / 2.0); + filt->w0_ceil_1 = filt->w0 <= w0_max_1 ? filt->w0 : w0_max_1; + + filt->_1024_div_Q = (1.0/(0.707 + 4.0*(float)filt->resonance/(float)0x0ff)); + + filt->distortion_multiplier = (double)filt->distortion_level / 16.0; + filt->tanh_distortion_multiplier = tanh(filt->distortion_multiplier); +} + +int32_t sid3_get_waveform(SID3* sid3, sid3_channel* ch) +{ + if(ch->waveform == 0) return 0; + + int32_t wave = 0; + + switch(ch->mix_mode) + { + case SID3_MIX_8580: + { + switch(ch->waveform) + { + case SID3_WAVE_TRIANGLE: + { + wave = sid3_triangle(ch->accumulator); + break; + } + case SID3_WAVE_SAW: + { + wave = sid3_saw(ch->accumulator); + break; + } + case SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8; + break; + } + case SID3_WAVE_PULSE: + { + wave = sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE: + { + wave = (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_PULSE | SID3_WAVE_SAW: + { + wave = (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_NOISE: + { + wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_TRIANGLE: + { + wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_triangle(ch->accumulator); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_SAW: + { + wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_saw(ch->accumulator); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = (wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_PULSE: + { + wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE: + { + wave = (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW: + { + wave = (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_SPECIAL: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_triangle(ch->accumulator); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_SAW: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_saw(ch->accumulator); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8; + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_SAW: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_triangle(ch->accumulator); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_SAW: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_saw(ch->accumulator); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_pulse(ch->accumulator, ch->pw); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE: + { + wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + break; + } + default: break; + } + + wave -= 0x8000; + break; + } + case SID3_MIX_AND: + { + wave = 0xffff; + + if(ch->waveform & SID3_WAVE_TRIANGLE) + { + wave &= sid3_triangle(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_SAW) + { + wave &= sid3_saw(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_PULSE) + { + wave &= sid3_pulse(ch->accumulator, ch->pw); + } + if(ch->waveform & SID3_WAVE_NOISE) + { + wave &= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + } + if(ch->waveform & SID3_WAVE_SPECIAL) + { + wave &= sid3_special_wave(sid3, ch->accumulator, ch->special_wave); + } + + wave -= 0x8000; + break; + } + case SID3_MIX_OR: + { + uint16_t wave_16 = 0; + + if(ch->waveform & SID3_WAVE_TRIANGLE) + { + wave_16 |= sid3_triangle(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_SAW) + { + wave_16 |= sid3_saw(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_PULSE) + { + wave_16 |= sid3_pulse(ch->accumulator, ch->pw); + } + if(ch->waveform & SID3_WAVE_NOISE) + { + wave_16 |= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + } + if(ch->waveform & SID3_WAVE_SPECIAL) + { + wave_16 |= sid3_special_wave(sid3, ch->accumulator, ch->special_wave); + } + + wave = wave_16 - 0x8000; + break; + } + case SID3_MIX_XOR: + { + uint16_t wave_16 = 0; + + if(ch->waveform & SID3_WAVE_TRIANGLE) + { + wave_16 ^= sid3_triangle(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_SAW) + { + wave_16 ^= sid3_saw(ch->accumulator); + } + if(ch->waveform & SID3_WAVE_PULSE) + { + wave_16 ^= sid3_pulse(ch->accumulator, ch->pw); + } + if(ch->waveform & SID3_WAVE_NOISE) + { + wave_16 ^= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE); + } + if(ch->waveform & SID3_WAVE_SPECIAL) + { + wave_16 ^= sid3_special_wave(sid3, ch->accumulator, ch->special_wave); + } + + wave = wave_16 - 0x8000; + break; + } + case SID3_MIX_SUM: + { + if(ch->waveform & SID3_WAVE_TRIANGLE) + { + wave += (int32_t)sid3_triangle(ch->accumulator) - 0x8000; + } + if(ch->waveform & SID3_WAVE_SAW) + { + wave += (int32_t)sid3_saw(ch->accumulator) - 0x8000; + } + if(ch->waveform & SID3_WAVE_PULSE) + { + wave += (int32_t)sid3_pulse(ch->accumulator, ch->pw) - 0x8000; + } + if(ch->waveform & SID3_WAVE_NOISE) + { + wave += (int32_t)sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) - 0x8000; + } + if(ch->waveform & SID3_WAVE_SPECIAL) + { + wave += (int32_t)sid3_special_wave(sid3, ch->accumulator, ch->special_wave) - 0x8000; + } + break; + } + default: break; + } + + return wave; +} + +int32_t sid3_process_filters_block(sid3_channel* ch) +{ + int32_t output = 0; + + ch->clock_filter++; + + if(ch->clock_filter & 1) + { + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_OUTPUT) + { + output += ch->filt.filt[i].output; + } + } + + return output; + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + ch->filt.filt[i].input = 0; + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_CHANNEL_INPUT) + { + ch->filt.filt[i].input += ch->output_before_filter; + } + + for(uint8_t j = 0; j < SID3_NUM_FILTERS; j++) + { + if(ch->filt.connection_matrix[i] & (1 << j)) + { + ch->filt.filt[i].input += ch->filt.filt[j].output; + } + } + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_ENABLE) + { + float Vi = ch->filt.filt[i].input; + + float dVbp = (ch->filt.filt[i].w0_ceil_1 * ch->filt.filt[i].Vhp); + float dVlp = (ch->filt.filt[i].w0_ceil_1 * ch->filt.filt[i].Vbp); + ch->filt.filt[i].Vbp += dVbp; + ch->filt.filt[i].Vlp += dVlp; + ch->filt.filt[i].Vhp = Vi - ch->filt.filt[i].Vlp - (ch->filt.filt[i].Vbp * ch->filt.filt[i]._1024_div_Q); + + float Vo; + + switch(ch->filt.filt[i].mode & SID3_FILTER_MODES_MASK) + { + case 0x0: + default: + Vo = 0; + break; + case SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp; + break; + case SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vhp; + break; + case SID3_FILTER_LP | SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vhp; + break; + case SID3_FILTER_BP: + Vo = ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vhp + ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_HP | SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vbp + ch->filt.filt[i].Vhp; + break; + } + + if(ch->filt.filt[i].distortion_level > 0) + { + if(Vo > 0.0) + { + Vo = (tanh((Vo / 39767.0) * ch->filt.filt[i].distortion_multiplier) / ch->filt.filt[i].tanh_distortion_multiplier) * 39767.0; + } + else + { + double ahh = (Vo / 39767.0) * ch->filt.filt[i].distortion_multiplier; + Vo = ((exp(ahh) - 1.0) / ch->filt.filt[i].tanh_distortion_multiplier) * 39767.0; + } + } + + ch->filt.filt[i].output = Vo * ch->filt.filt[i].output_volume / 0xff; + } + else + { + ch->filt.filt[i].output = 0; + } + + if(ch->filt.filt[i].mode & SID3_FILTER_OUTPUT) + { + output += ch->filt.filt[i].output; + } + } + + return output; +} + +int32_t sid3_process_wave_channel_filters_block(sid3_wavetable_chan* ch) +{ + int32_t output = 0; + + ch->clock_filter++; + + if(ch->clock_filter & 1) + { + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_OUTPUT) + { + output += ch->filt.filt[i].output; + } + } + + return output; + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + ch->filt.filt[i].input = 0; + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_CHANNEL_INPUT) + { + ch->filt.filt[i].input += ch->output_before_filter; + } + + for(uint8_t j = 0; j < SID3_NUM_FILTERS; j++) + { + if(ch->filt.connection_matrix[i] & (1 << j)) + { + ch->filt.filt[i].input += ch->filt.filt[j].output; + } + } + } + + for(uint8_t i = 0; i < SID3_NUM_FILTERS; i++) + { + if(ch->filt.filt[i].mode & SID3_FILTER_ENABLE) + { + float Vi = ch->filt.filt[i].input; + + float dVbp = (ch->filt.filt[i].w0_ceil_1 * ch->filt.filt[i].Vhp); + float dVlp = (ch->filt.filt[i].w0_ceil_1 * ch->filt.filt[i].Vbp); + ch->filt.filt[i].Vbp += dVbp; + ch->filt.filt[i].Vlp += dVlp; + ch->filt.filt[i].Vhp = Vi - ch->filt.filt[i].Vlp - (ch->filt.filt[i].Vbp * ch->filt.filt[i]._1024_div_Q); + + float Vo; + + switch(ch->filt.filt[i].mode & SID3_FILTER_MODES_MASK) + { + case 0x0: + default: + Vo = 0; + break; + case SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp; + break; + case SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vhp; + break; + case SID3_FILTER_LP | SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vhp; + break; + case SID3_FILTER_BP: + Vo = ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_HP: + Vo = ch->filt.filt[i].Vhp + ch->filt.filt[i].Vbp; + break; + case SID3_FILTER_BP | SID3_FILTER_HP | SID3_FILTER_LP: + Vo = ch->filt.filt[i].Vlp + ch->filt.filt[i].Vbp + ch->filt.filt[i].Vhp; + break; + } + + if(ch->filt.filt[i].distortion_level > 0) + { + if(Vo > 0.0) + { + Vo = (tanh((Vo / 39767.0) * ch->filt.filt[i].distortion_multiplier) / ch->filt.filt[i].tanh_distortion_multiplier) * 39767.0; + } + else + { + double ahh = (Vo / 39767.0) * ch->filt.filt[i].distortion_multiplier; + Vo = ((exp(ahh) - 1.0) / ch->filt.filt[i].tanh_distortion_multiplier) * 39767.0; + } + } + + ch->filt.filt[i].output = Vo * ch->filt.filt[i].output_volume / 0xff; + } + else + { + ch->filt.filt[i].output = 0; + } + + if(ch->filt.filt[i].mode & SID3_FILTER_OUTPUT) + { + output += ch->filt.filt[i].output; + } + } + + return output; +} + +void sid3_clock(SID3* sid3) +{ + //SAFETY_HEADER + + sid3->output_l = sid3->output_r = 0; + + for(int32_t i = 0; i < SID3_NUM_CHANNELS - 1; i++) + { + sid3_channel* ch = &sid3->chan[i]; + + uint32_t prev_acc = ch->accumulator; + uint32_t prev_noise_acc = ch->noise_accumulator; + + ch->accumulator += ch->frequency; + ch->noise_accumulator += ch->noise_frequency; + + ch->sync_bit = 0; + + if(ch->accumulator & (1 << SID3_ACC_BITS)) + { + ch->sync_bit = 1; + } + + if(ch->flags & SID3_CHAN_ENABLE_HARD_SYNC) + { + if(ch->hard_sync_src == SID3_NUM_CHANNELS - 1) //wave chan + { + if(sid3->wave_chan.sync_bit) + { + ch->accumulator = 0; + ch->noise_accumulator = 0; + ch->lfsr = 0x3fffffff; + } + } + else + { + if(sid3->chan[ch->hard_sync_src].sync_bit) + { + ch->accumulator = 0; + ch->noise_accumulator = 0; + ch->lfsr = 0x3fffffff; + } + } + } + + int32_t waveform = 0; + + if(!ch->adsr.hold_zero) + { + uint32_t acc_state = ch->accumulator; + uint32_t noise_acc_state = ch->noise_accumulator; + + if(ch->flags & SID3_CHAN_ENABLE_PHASE_MOD) + { + ch->accumulator += ch->phase_mod_source == SID3_NUM_CHANNELS - 1 ? ((uint64_t)sid3->wave_channel_output << 18) : ((uint64_t)sid3->channel_output[ch->phase_mod_source] << 18); + ch->noise_accumulator += ch->phase_mod_source == SID3_NUM_CHANNELS - 1 ? ((uint64_t)sid3->wave_channel_output << 18) : ((uint64_t)sid3->channel_output[ch->phase_mod_source] << 18); + } + + if(ch->feedback) + { + ch->accumulator += (ch->prev_output + ch->prev_output2) * ch->feedback; + } + + ch->accumulator &= SID3_ACC_MASK; + ch->noise_accumulator &= SID3_ACC_MASK; + + if((prev_noise_acc & ((uint32_t)1 << (SID3_ACC_BITS - 6))) != (ch->noise_accumulator & ((uint32_t)1 << (SID3_ACC_BITS - 6)))) + { + sid3_clock_lfsr(ch); + } + + waveform = sid3_get_waveform(sid3, ch); + + ch->accumulator = acc_state & SID3_ACC_MASK; + ch->noise_accumulator = noise_acc_state & SID3_ACC_MASK; + + sid3->channel_signals_before_ADSR[i] = waveform; + + if(ch->flags & SID3_CHAN_ENABLE_RING_MOD) + { + uint8_t ring_mod_src = ch->ring_mod_src == SID3_NUM_CHANNELS ? i : ch->ring_mod_src; //SID3_NUM_CHANNELS = self-mod + + waveform = waveform * (ch->ring_mod_src == (SID3_NUM_CHANNELS - 1) ? sid3->wave_channel_signal_before_ADSR : sid3->channel_signals_before_ADSR[ring_mod_src]) / (int32_t)0xffff; //ring modulation is just multiplication of two signals! + } + } + else + { + ch->accumulator &= SID3_ACC_MASK; + ch->noise_accumulator &= SID3_ACC_MASK; + } + + sid3_adsr_clock(sid3, &ch->adsr); + + int32_t output = 0; + + if(!ch->adsr.hold_zero) + { + ch->output_before_filter = sid3_adsr_output(sid3, &ch->adsr, waveform); + + if((ch->filt.filt[0].mode & SID3_FILTER_ENABLE) || (ch->filt.filt[1].mode & SID3_FILTER_ENABLE) || + (ch->filt.filt[2].mode & SID3_FILTER_ENABLE) || (ch->filt.filt[3].mode & SID3_FILTER_ENABLE)) + { + output = sid3_process_filters_block(ch); + } + else + { + output = ch->output_before_filter; + } + + if(ch->feedback) + { + ch->prev_output2 = ch->prev_output; + ch->prev_output = output + 0xffff; + } + + if(!sid3->muted[i]) + { + sid3->output_l += output * ch->panning_left / 0x8f0 * ((ch->phase_inv & SID3_INV_SIGNAL_LEFT) ? -1 : 1); + sid3->output_r += output * ch->panning_right / 0x8f0 * ((ch->phase_inv & SID3_INV_SIGNAL_RIGHT) ? -1 : 1); + } + } + else + { + ch->output_before_filter = 0; + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + if(ch->filt.filt[j].mode & SID3_FILTER_ENABLE) + { + if(ch->filt.filt[j].output > 0) + { + ch->filt.filt[j].output--; + } + if(ch->filt.filt[j].output < 0) + { + ch->filt.filt[j].output++; + } + } + } + } + + sid3->channel_output[i] = output; + } + + //wavetable/streamed PCM sample channel: + + sid3_wavetable_chan* ch = &sid3->wave_chan; + + uint32_t prev_acc = ch->accumulator; + + ch->accumulator += ch->frequency; + + ch->sync_bit = 0; + + if(ch->accumulator & (1 << SID3_ACC_BITS)) + { + ch->sync_bit = 1; + } + + if(ch->flags & SID3_CHAN_ENABLE_HARD_SYNC) + { + if(ch->hard_sync_src == SID3_NUM_CHANNELS - 1) //wave chan + { + if(sid3->wave_chan.sync_bit) + { + ch->accumulator = 0; + } + } + else + { + if(sid3->chan[ch->hard_sync_src].sync_bit) + { + ch->accumulator = 0; + } + } + } + + int32_t waveform = 0; + + if(!ch->adsr.hold_zero) + { + uint32_t acc_state = ch->accumulator; + + if(ch->flags & SID3_CHAN_ENABLE_PHASE_MOD) + { + ch->accumulator += ch->phase_mod_source == SID3_NUM_CHANNELS - 1 ? ((uint64_t)sid3->wave_channel_output << 18) : ((uint64_t)sid3->channel_output[ch->phase_mod_source] << 18); + } + + ch->accumulator &= SID3_ACC_MASK; + + if(ch->mode) + { + waveform = (int32_t)ch->streamed_sample - 0x7fff; + } + else + { + waveform = ((int32_t)ch->wavetable[(ch->accumulator & SID3_ACC_MASK) >> (SID3_ACC_BITS - 8)] << 8) - 0x7fff; + } + + ch->accumulator = acc_state & SID3_ACC_MASK; + + sid3->wave_channel_signal_before_ADSR = waveform; + + if(ch->flags & SID3_CHAN_ENABLE_RING_MOD) + { + uint8_t ring_mod_src = ch->ring_mod_src == SID3_NUM_CHANNELS ? 0xff : ch->ring_mod_src; //SID3_NUM_CHANNELS = self-mod + + waveform = waveform * (ch->ring_mod_src == 0xff ? sid3->wave_channel_signal_before_ADSR : sid3->channel_signals_before_ADSR[ring_mod_src]) / (int32_t)0xffff; //ring modulation is just multiplication of two signals! + } + } + else + { + ch->accumulator &= SID3_ACC_MASK; + } + + sid3_adsr_clock(sid3, &ch->adsr); + + int32_t output = 0; + + if(!ch->adsr.hold_zero) + { + ch->output_before_filter = sid3_adsr_output(sid3, &ch->adsr, waveform); + + if((ch->filt.filt[0].mode & SID3_FILTER_ENABLE) || (ch->filt.filt[1].mode & SID3_FILTER_ENABLE) || + (ch->filt.filt[2].mode & SID3_FILTER_ENABLE) || (ch->filt.filt[3].mode & SID3_FILTER_ENABLE)) + { + output = sid3_process_wave_channel_filters_block(ch); + } + else + { + output = ch->output_before_filter; + } + + if(!sid3->muted[SID3_NUM_CHANNELS - 1]) + { + sid3->output_l += output * ch->panning_left / 0x8f0 * ((ch->phase_inv & SID3_INV_SIGNAL_LEFT) ? -1 : 1); + sid3->output_r += output * ch->panning_right / 0x8f0 * ((ch->phase_inv & SID3_INV_SIGNAL_RIGHT) ? -1 : 1); + } + } + else + { + ch->output_before_filter = 0; + + for(int j = 0; j < SID3_NUM_FILTERS; j++) + { + if(ch->filt.filt[j].mode & SID3_FILTER_ENABLE) + { + if(ch->filt.filt[j].output > 0) + { + ch->filt.filt[j].output--; + } + if(ch->filt.filt[j].output < 0) + { + ch->filt.filt[j].output++; + } + } + } + } + + sid3->wave_channel_output = output; +} + +void sid3_write(SID3* sid3, uint16_t address, uint8_t data) +{ + SAFETY_HEADER + + uint8_t channel = address / SID3_REGISTERS_PER_CHANNEL; + + if(channel >= SID3_NUM_CHANNELS) return; + + switch(address % SID3_REGISTERS_PER_CHANNEL) //NB: only works if registers for each channel are the same and their addresses + //are x + y*n, where x is address of channel 0 register, y is number of current channel and n is how many registers you have + //for each channel + { + case SID3_REGISTER_FLAGS: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + uint8_t prev_flags = sid3->chan[channel].flags; + sid3->chan[channel].flags = data; + + if((prev_flags & SID3_CHAN_ENABLE_GATE) != (sid3->chan[channel].flags & SID3_CHAN_ENABLE_GATE)) + { + sid3_gate_bit(sid3, sid3->chan[channel].flags & SID3_CHAN_ENABLE_GATE, &sid3->chan[channel].adsr); + } + + if(sid3->chan[channel].flags & SID3_CHAN_ENV_RESET) + { + sid3->chan[channel].adsr.envelope_counter = 0; + sid3->chan[channel].adsr.state = ATTACK; + sid3->chan[channel].adsr.envelope_speed = envspd_a(sid3->chan[channel].adsr.a); + sid3->chan[channel].adsr.hold_zero = false; + } + + if(sid3->chan[channel].flags & SID3_CHAN_PHASE_RESET) + { + sid3->chan[channel].accumulator = 0; + } + + if(sid3->chan[channel].flags & SID3_CHAN_NOISE_PHASE_RESET) + { + sid3->chan[channel].noise_accumulator = 0; + sid3->chan[channel].lfsr = 0x3fffffff; + } + + sid3->chan[channel].flags &= ~(SID3_CHAN_ENV_RESET | SID3_CHAN_NOISE_PHASE_RESET | SID3_CHAN_PHASE_RESET); + } + else + { + uint8_t prev_flags = sid3->wave_chan.flags; + sid3->wave_chan.flags = data; + + if((prev_flags & SID3_CHAN_ENABLE_GATE) != (sid3->wave_chan.flags & SID3_CHAN_ENABLE_GATE)) + { + sid3_gate_bit(sid3, sid3->wave_chan.flags & SID3_CHAN_ENABLE_GATE, &sid3->wave_chan.adsr); + } + + if(sid3->wave_chan.flags & SID3_CHAN_ENV_RESET) + { + sid3->wave_chan.adsr.envelope_counter = 0; + sid3->wave_chan.adsr.state = ATTACK; + sid3->wave_chan.adsr.envelope_speed = envspd_a(sid3->wave_chan.adsr.a); + sid3->wave_chan.adsr.hold_zero = false; + } + + if(sid3->wave_chan.flags & SID3_CHAN_PHASE_RESET) + { + sid3->wave_chan.accumulator = 0; + } + + sid3->wave_chan.flags &= ~(SID3_CHAN_ENV_RESET | SID3_CHAN_NOISE_PHASE_RESET | SID3_CHAN_PHASE_RESET); + } + break; + } + case SID3_REGISTER_ADSR_A: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.a = data; + + if(sid3->chan[channel].adsr.state == ATTACK) sid3->chan[channel].adsr.envelope_speed = envspd_a(sid3->chan[channel].adsr.a); + } + else + { + sid3->wave_chan.adsr.a = data; + + if(sid3->wave_chan.adsr.state == ATTACK) sid3->wave_chan.adsr.envelope_speed = envspd_a(sid3->wave_chan.adsr.a); + } + break; + } + case SID3_REGISTER_ADSR_D: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.d = data; + + if(sid3->chan[channel].adsr.state == DECAY) sid3->chan[channel].adsr.envelope_speed = envspd_dr(sid3->chan[channel].adsr.d); + } + else + { + sid3->wave_chan.adsr.d = data; + + if(sid3->wave_chan.adsr.state == DECAY) sid3->wave_chan.adsr.envelope_speed = envspd_dr(sid3->wave_chan.adsr.d); + } + break; + } + case SID3_REGISTER_ADSR_S: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.s = data; + + if(sid3->chan[channel].adsr.state == SUSTAIN) sid3->chan[channel].adsr.envelope_counter = sid3->chan[channel].adsr.s << 16; + } + else + { + sid3->wave_chan.adsr.s = data; + + if(sid3->wave_chan.adsr.state == SUSTAIN) sid3->wave_chan.adsr.envelope_counter = sid3->wave_chan.adsr.s << 16; + } + break; + } + case SID3_REGISTER_ADSR_SR: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.sr = data; + + if(sid3->chan[channel].adsr.state == SUSTAIN) sid3->chan[channel].adsr.envelope_speed = envspd_sr(sid3->chan[channel].adsr.sr); + } + else + { + sid3->wave_chan.adsr.sr = data; + + if(sid3->wave_chan.adsr.state == SUSTAIN) sid3->wave_chan.adsr.envelope_speed = envspd_sr(sid3->wave_chan.adsr.sr); + } + break; + } + case SID3_REGISTER_ADSR_R: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.r = data; + + if(sid3->chan[channel].adsr.state == RELEASE) sid3->chan[channel].adsr.envelope_speed = envspd_dr(sid3->chan[channel].adsr.r); + } + else + { + sid3->wave_chan.adsr.r = data; + + if(sid3->wave_chan.adsr.state == RELEASE) sid3->wave_chan.adsr.envelope_speed = envspd_dr(sid3->wave_chan.adsr.r); + } + break; + } + case SID3_REGISTER_WAVEFORM: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].waveform = data; + } + else + { + sid3->wave_chan.mode = data; + } + break; + } + case SID3_REGISTER_PW_HIGH: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].pw &= 0x00ff; + sid3->chan[channel].pw |= data << 8; + } + else + { + sid3->wave_chan.wave_address = data; + } + break; + } + case SID3_REGISTER_PW_LOW: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].pw &= 0xff00; + sid3->chan[channel].pw |= data; + } + else + { + sid3->wave_chan.wavetable[sid3->wave_chan.wave_address] = data; + } + break; + } + case SID3_REGISTER_SPECIAL_WAVE: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].special_wave = data; + } + break; + } + case SID3_REGISTER_FREQ_HIGH: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].frequency &= 0x00ffff; + sid3->chan[channel].frequency |= data << 16; + } + else + { + sid3->wave_chan.frequency &= 0x00ffff; + sid3->wave_chan.frequency |= data << 16; + } + break; + } + case SID3_REGISTER_FREQ_MID: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].frequency &= 0xff00ff; + sid3->chan[channel].frequency |= data << 8; + } + else + { + sid3->wave_chan.frequency &= 0xff00ff; + sid3->wave_chan.frequency |= data << 8; + } + break; + } + case SID3_REGISTER_FREQ_LOW: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].frequency &= 0xffff00; + sid3->chan[channel].frequency |= data; + } + else + { + sid3->wave_chan.frequency &= 0xffff00; + sid3->wave_chan.frequency |= data; + } + break; + } + case SID3_REGISTER_ADSR_VOL: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].adsr.vol = data; + } + else + { + sid3->wave_chan.adsr.vol = data; + } + break; + } + case SID3_REGISTER_MIXMODE: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].mix_mode = data; + } + break; + } + case SID3_REGISTER_RING_MOD_SRC: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].ring_mod_src = data; + } + else + { + sid3->wave_chan.ring_mod_src = data; + } + break; + } + case SID3_REGISTER_SYNC_SRC: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].hard_sync_src = data; + } + else + { + sid3->wave_chan.hard_sync_src = data; + } + break; + } + case SID3_REGISTER_FILT_MODE: + case SID3_REGISTER_FILT_MODE + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_MODE + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_MODE + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].mode = data; + } + else + { + sid3->wave_chan.filt.filt[filter].mode = data; + } + break; + } + case SID3_REGISTER_FILT_CUTOFF_HIGH: + case SID3_REGISTER_FILT_CUTOFF_HIGH + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CUTOFF_HIGH + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CUTOFF_HIGH + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].cutoff &= 0x00ff; + sid3->chan[channel].filt.filt[filter].cutoff |= data << 8; + sid3_set_filter_settings(sid3, &sid3->chan[channel].filt.filt[filter]); + } + else + { + sid3->wave_chan.filt.filt[filter].cutoff &= 0x00ff; + sid3->wave_chan.filt.filt[filter].cutoff |= data << 8; + sid3_set_filter_settings(sid3, &sid3->wave_chan.filt.filt[filter]); + } + break; + } + case SID3_REGISTER_FILT_CUTOFF_LOW: + case SID3_REGISTER_FILT_CUTOFF_LOW + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CUTOFF_LOW + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CUTOFF_LOW + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].cutoff &= 0xff00; + sid3->chan[channel].filt.filt[filter].cutoff |= data; + sid3_set_filter_settings(sid3, &sid3->chan[channel].filt.filt[filter]); + } + else + { + sid3->wave_chan.filt.filt[filter].cutoff &= 0xff00; + sid3->wave_chan.filt.filt[filter].cutoff |= data; + sid3_set_filter_settings(sid3, &sid3->wave_chan.filt.filt[filter]); + } + break; + } + case SID3_REGISTER_FILT_RESONANCE: + case SID3_REGISTER_FILT_RESONANCE + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_RESONANCE + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_RESONANCE + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].resonance = data; + sid3_set_filter_settings(sid3, &sid3->chan[channel].filt.filt[filter]); + } + else + { + sid3->wave_chan.filt.filt[filter].resonance = data; + sid3_set_filter_settings(sid3, &sid3->wave_chan.filt.filt[filter]); + } + break; + } + case SID3_REGISTER_FILT_DISTORTION: + case SID3_REGISTER_FILT_DISTORTION + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_DISTORTION + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_DISTORTION + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].distortion_level = data; + sid3_set_filter_settings(sid3, &sid3->chan[channel].filt.filt[filter]); + } + else + { + sid3->wave_chan.filt.filt[filter].distortion_level = data; + sid3_set_filter_settings(sid3, &sid3->wave_chan.filt.filt[filter]); + } + break; + } + case SID3_REGISTER_FILT_CONNECTION: + case SID3_REGISTER_FILT_CONNECTION + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CONNECTION + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_CONNECTION + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.connection_matrix[filter] = data; + } + else + { + sid3->wave_chan.filt.connection_matrix[filter] = data; + } + break; + } + case SID3_REGISTER_FILT_OUTPUT_VOLUME: + case SID3_REGISTER_FILT_OUTPUT_VOLUME + 1 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_OUTPUT_VOLUME + 2 * SID3_REGISTERS_PER_FILTER: + case SID3_REGISTER_FILT_OUTPUT_VOLUME + 3 * SID3_REGISTERS_PER_FILTER: + { + uint8_t filter = ((address % SID3_REGISTERS_PER_CHANNEL) - SID3_REGISTER_FILT_MODE) / SID3_REGISTERS_PER_FILTER; + + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].filt.filt[filter].output_volume = data; + } + else + { + sid3->wave_chan.filt.filt[filter].output_volume = data; + } + break; + } + case SID3_REGISTER_PAN_LEFT: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].panning_left = data; + } + else + { + sid3->wave_chan.panning_left = data; + } + break; + } + case SID3_REGISTER_PAN_RIGHT: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].panning_right = data; + } + else + { + sid3->wave_chan.panning_right = data; + } + break; + } + case SID3_REGISTER_NOISE_FREQ_HIGH: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].noise_frequency &= 0x00ffff; + sid3->chan[channel].noise_frequency |= data << 16; + } + break; + } + case SID3_REGISTER_NOISE_FREQ_MID: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].noise_frequency &= 0xff00ff; + sid3->chan[channel].noise_frequency |= data << 8; + } + break; + } + case SID3_REGISTER_NOISE_FREQ_LOW: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].noise_frequency &= 0xffff00; + sid3->chan[channel].noise_frequency |= data; + } + break; + } + case SID3_REGISTER_NOISE_LFSR_HIGHEST: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].lfsr_taps &= 0x00ffffff; + sid3->chan[channel].lfsr_taps |= (uint32_t)data << 24; + + sid3->chan[channel].lfsr_taps &= 0x3fffffff; //30 bits limit + } + break; + } + case SID3_REGISTER_NOISE_LFSR_HIGH: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].lfsr_taps &= 0xff00ffff; + sid3->chan[channel].lfsr_taps |= data << 16; + + sid3->chan[channel].lfsr_taps &= 0x3fffffff; + } + break; + } + case SID3_REGISTER_NOISE_LFSR_MID: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].lfsr_taps &= 0xffff00ff; + sid3->chan[channel].lfsr_taps |= data << 8; + + sid3->chan[channel].lfsr_taps &= 0x3fffffff; + } + break; + } + case SID3_REGISTER_NOISE_LFSR_LOW: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].lfsr_taps &= 0xffffff00; + sid3->chan[channel].lfsr_taps |= data; + + sid3->chan[channel].lfsr_taps &= 0x3fffffff; + } + break; + } + case SID3_REGISTER_STREAMED_SAMPLE_HIGH: + { + if(channel == SID3_NUM_CHANNELS - 1) + { + sid3->wave_chan.streamed_sample &= 0x00ff; + sid3->wave_chan.streamed_sample |= data << 8; + } + break; + } + case SID3_REGISTER_STREAMED_SAMPLE_LOW: + { + if(channel == SID3_NUM_CHANNELS - 1) + { + sid3->wave_chan.streamed_sample &= 0xff00; + sid3->wave_chan.streamed_sample |= data; + } + break; + } + case SID3_REGISTER_PHASE_INVERSION: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].phase_inv = data; + } + else + { + sid3->wave_chan.phase_inv = data; + } + break; + } + case SID3_REGISTER_FEEDBACK: + { + if(channel != SID3_NUM_CHANNELS - 1) + { + sid3->chan[channel].feedback = (uint32_t)data * (uint32_t)data; + } + break; + } + default: break; + } +} + +void sid3_set_is_muted(SID3* sid3, uint8_t ch, bool mute) +{ + SAFETY_HEADER + + sid3->muted[ch] = mute; +} + +void sid3_set_clock_rate(SID3* sid3, uint32_t clock) +{ + sid3->clock_rate = clock; +} + +void sid3_free(SID3* sid3) +{ + SAFETY_HEADER + + free(sid3); +} \ No newline at end of file diff --git a/src/engine/platform/sound/sid3.h b/src/engine/platform/sound/sid3.h new file mode 100644 index 000000000..65ca86661 --- /dev/null +++ b/src/engine/platform/sound/sid3.h @@ -0,0 +1,285 @@ +#ifndef SID3_H +#define SID3_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +#define SID3_NUM_CHANNELS 7 +#define SID3_NUM_FILTERS 4 +#define SID3_REGISTERS_PER_CHANNEL 64 +#define SID3_REGISTERS_PER_FILTER 8 +#define SID3_NUM_REGISTERS (SID3_NUM_CHANNELS * SID3_REGISTERS_PER_CHANNEL) +#define SID3_MAX_VOL 255 + +#define SID3_WAVETABLE_LENGTH 256 + +#define SID3_NUM_WAVEFORM_BITS 5 + +#define SID3_NUM_UNIQUE_SPECIAL_WAVES 28 +#define SID3_NUM_SPECIAL_WAVES (SID3_NUM_UNIQUE_SPECIAL_WAVES * 2 + 2) /* usual and 2x vol clipped + 2x vol clipped tri and saw... */ +#define SID3_SPECIAL_WAVE_LENGTH 16384 + +#define SID3_EXPONENTIAL_LUT_LENGTH ((0xff0000 >> 8) + 1) + +#define SID3_ACC_BITS 30 +#define SID3_ACC_MASK ((1UL << SID3_ACC_BITS) - 1) + +enum Flags +{ + SID3_CHAN_ENABLE_GATE = 1, + SID3_CHAN_ENABLE_RING_MOD = 2, + SID3_CHAN_ENABLE_HARD_SYNC = 4, + SID3_CHAN_ENABLE_PHASE_MOD = 8, + SID3_CHAN_PHASE_RESET = 16, + SID3_CHAN_ENV_RESET = 32, + SID3_CHAN_NOISE_PHASE_RESET = 64, + SID3_CHAN_1_BIT_NOISE = 128, +}; + +enum PhaseInversion +{ + SID3_INV_SIGNAL_RIGHT = 1, + SID3_INV_SIGNAL_LEFT = 2, +}; + +enum Waveforms +{ + SID3_WAVE_TRIANGLE = 1, + SID3_WAVE_SAW = 2, + SID3_WAVE_PULSE = 4, + SID3_WAVE_NOISE = 8, + SID3_WAVE_SPECIAL = 16, +}; + +enum Mixmodes +{ + SID3_MIX_8580 = 0, + SID3_MIX_AND = 1, + SID3_MIX_OR = 2, + SID3_MIX_XOR = 3, + SID3_MIX_SUM = 4, +}; + +enum Filter_modes +{ + SID3_FILTER_LP = 1, + SID3_FILTER_HP = 2, + SID3_FILTER_BP = 4, + + SID3_FILTER_MODES_MASK = 7, + + SID3_FILTER_ENABLE = 8, + SID3_FILTER_CHANNEL_INPUT = 16, //add channel input to filter input + SID3_FILTER_OUTPUT = 32, //output sound from this filter to channel output +}; + +enum Registers +{ + SID3_REGISTER_FLAGS = 0, + + SID3_REGISTER_ADSR_A = 1, + SID3_REGISTER_ADSR_D = 2, + SID3_REGISTER_ADSR_S = 3, + SID3_REGISTER_ADSR_SR = 4, + SID3_REGISTER_ADSR_R = 5, + + SID3_REGISTER_WAVEFORM = 6, + + SID3_REGISTER_PW_HIGH = 7, + SID3_REGISTER_PW_LOW = 8, + + SID3_REGISTER_SPECIAL_WAVE = 9, + + SID3_REGISTER_FREQ_HIGH = 10, + SID3_REGISTER_FREQ_MID = 11, + SID3_REGISTER_FREQ_LOW = 12, + + SID3_REGISTER_ADSR_VOL = 13, + + SID3_REGISTER_MIXMODE = 14, + + SID3_REGISTER_RING_MOD_SRC = 15, + SID3_REGISTER_SYNC_SRC = 16, + + SID3_REGISTER_FILT_BASE = 17, + SID3_REGISTER_FILT_MODE = 17, + SID3_REGISTER_FILT_CUTOFF_HIGH = 18, + SID3_REGISTER_FILT_CUTOFF_LOW = 19, + SID3_REGISTER_FILT_RESONANCE = 20, + SID3_REGISTER_FILT_DISTORTION = 21, + SID3_REGISTER_FILT_CONNECTION = 22, + SID3_REGISTER_FILT_OUTPUT_VOLUME = 23, + + SID3_REGISTER_AFTER_FILT_1ST_REG = SID3_REGISTER_FILT_BASE + SID3_REGISTERS_PER_FILTER * SID3_NUM_FILTERS, + SID3_REGISTER_PHASE_MOD_SRC = SID3_REGISTER_AFTER_FILT_1ST_REG, + + SID3_REGISTER_PAN_LEFT = SID3_REGISTER_AFTER_FILT_1ST_REG + 1, + SID3_REGISTER_PAN_RIGHT = SID3_REGISTER_AFTER_FILT_1ST_REG + 2, + + SID3_REGISTER_NOISE_FREQ_HIGH = SID3_REGISTER_AFTER_FILT_1ST_REG + 3, + SID3_REGISTER_NOISE_FREQ_MID = SID3_REGISTER_AFTER_FILT_1ST_REG + 4, + SID3_REGISTER_NOISE_FREQ_LOW = SID3_REGISTER_AFTER_FILT_1ST_REG + 5, + + SID3_REGISTER_NOISE_LFSR_HIGHEST = SID3_REGISTER_AFTER_FILT_1ST_REG + 6, + SID3_REGISTER_NOISE_LFSR_HIGH = SID3_REGISTER_AFTER_FILT_1ST_REG + 7, + SID3_REGISTER_NOISE_LFSR_MID = SID3_REGISTER_AFTER_FILT_1ST_REG + 8, + SID3_REGISTER_NOISE_LFSR_LOW = SID3_REGISTER_AFTER_FILT_1ST_REG + 9, + + SID3_REGISTER_STREAMED_SAMPLE_HIGH = SID3_REGISTER_AFTER_FILT_1ST_REG + 10, + SID3_REGISTER_STREAMED_SAMPLE_LOW = SID3_REGISTER_AFTER_FILT_1ST_REG + 11, + + SID3_REGISTER_PHASE_INVERSION = SID3_REGISTER_AFTER_FILT_1ST_REG + 12, + + SID3_REGISTER_FEEDBACK = SID3_REGISTER_AFTER_FILT_1ST_REG + 13, +}; + +typedef struct +{ + int32_t input; + int32_t output; + + // State of filter. + float Vhp; // highpass + float Vbp; // bandpass + float Vlp; // lowpass + + // Cutoff frequency, resonance. + float w0, w0_ceil_1; + float _1024_div_Q; + + double distortion_multiplier; //pre-calculated distortion multiplier for tanh() simple distortion + double tanh_distortion_multiplier; //pre-calculated tanh(distortion multiplier) + + uint16_t cutoff; + uint8_t resonance; + uint8_t distortion_level; + + uint8_t mode; + + uint8_t output_volume; +} sid3_filter; + +typedef struct +{ + sid3_filter filt[SID3_NUM_FILTERS]; + uint8_t connection_matrix[SID3_NUM_FILTERS]; +} sid3_filters_block; + +typedef struct +{ + uint8_t a, d, s, sr, r, vol, state; + + uint32_t envelope_counter; + uint32_t envelope_speed; + bool hold_zero; +} sid3_channel_adsr; + +typedef struct +{ + uint32_t accumulator; + uint8_t sync_bit; + uint32_t frequency; + + uint32_t noise_accumulator; + uint32_t noise_frequency; + + uint32_t lfsr, lfsr_taps; + + uint8_t waveform; + uint8_t special_wave; + + uint16_t pw; + + uint8_t mix_mode; + + sid3_channel_adsr adsr; + + uint8_t flags; + + uint8_t ring_mod_src; + uint8_t hard_sync_src; + uint8_t phase_mod_source; + + sid3_filters_block filt; + uint8_t clock_filter; + + uint8_t panning_left, panning_right; + + int32_t output_before_filter; + + uint8_t phase_inv; + uint32_t feedback; + + int32_t prev_output, prev_output2; +} sid3_channel; + +typedef struct +{ + uint32_t accumulator; + uint8_t sync_bit; + uint32_t frequency; + + uint16_t streamed_sample; + uint8_t wavetable[SID3_WAVETABLE_LENGTH]; + + uint8_t wave_address; + + sid3_channel_adsr adsr; + + uint8_t flags; + uint8_t mode; + + uint8_t ring_mod_src; + uint8_t hard_sync_src; + uint8_t phase_mod_source; + + sid3_filters_block filt; + uint8_t clock_filter; + + uint8_t panning_left, panning_right; + + int32_t output_before_filter; + + uint8_t phase_inv; +} sid3_wavetable_chan; + +typedef struct +{ + uint16_t special_waves[SID3_NUM_SPECIAL_WAVES][SID3_SPECIAL_WAVE_LENGTH]; //sine wave and OPL3-ish waves + OPZ and YMF825 waves! + + uint16_t env_counter_to_exponential_output[SID3_EXPONENTIAL_LUT_LENGTH]; + uint32_t exponential_output_to_envelope_counter[SID3_EXPONENTIAL_LUT_LENGTH]; + + sid3_channel chan[SID3_NUM_CHANNELS - 1]; + sid3_wavetable_chan wave_chan; + + int32_t output_l, output_r; + + int32_t channel_signals_before_ADSR[SID3_NUM_CHANNELS]; + int32_t channel_output[SID3_NUM_CHANNELS]; + int32_t wave_channel_signal_before_ADSR; + int32_t wave_channel_output; + + //emulation-only helpers + bool muted[SID3_NUM_CHANNELS]; + uint32_t clock_rate; //in Hz. 1 MHz default +} SID3; + +SID3* sid3_create(); +void sid3_reset(SID3* sid3); +void sid3_write(SID3* sid3, uint16_t address, uint8_t data); +void sid3_clock(SID3* sid3); +void sid3_set_is_muted(SID3* sid3, uint8_t ch, bool mute); +void sid3_set_clock_rate(SID3* sid3, uint32_t clock); +void sid3_free(SID3* sid3); + +#ifdef __cplusplus +}; +#endif +#endif diff --git a/src/engine/platform/sound/su.cpp b/src/engine/platform/sound/su.cpp index 8d5373cef..505a0d48b 100644 --- a/src/engine/platform/sound/su.cpp +++ b/src/engine/platform/sound/su.cpp @@ -146,7 +146,8 @@ void SoundUnit::NextSample(short* l, short* r) { } } } - fns[i]=ns[i]*chan[i].vol*((chan[i].flags0&8)?4:2); + fns[i]=ns[i]*chan[i].vol; + if (!(chan[i].flags0&8)) fns[i]>>=1; if ((chan[i].flags0&0xe0)!=0) { int ff=chan[i].cutoff; nslow[i]=nslow[i]+(((ff)*nsband[i])>>16); @@ -259,12 +260,12 @@ void SoundUnit::NextSample(short* l, short* r) { // mix if (dsOut) { - tnsL=nsL[dsChannel]<<1; - tnsR=nsR[dsChannel]<<1; + tnsL=nsL[dsChannel]<<3; + tnsR=nsR[dsChannel]<<3; dsChannel=(dsChannel+1)&7; } else { - tnsL=(nsL[0]+nsL[1]+nsL[2]+nsL[3]+nsL[4]+nsL[5]+nsL[6]+nsL[7])>>2; - tnsR=(nsR[0]+nsR[1]+nsR[2]+nsR[3]+nsR[4]+nsR[5]+nsR[6]+nsR[7])>>2; + tnsL=(nsL[0]+nsL[1]+nsL[2]+nsL[3]+nsL[4]+nsL[5]+nsL[6]+nsL[7]); + tnsR=(nsR[0]+nsR[1]+nsR[2]+nsR[3]+nsR[4]+nsR[5]+nsR[6]+nsR[7]); IL1=minval(32767,maxval(-32767,tnsL))>>8; IL2=minval(32767,maxval(-32767,tnsR))>>8; diff --git a/src/engine/platform/sound/su.h b/src/engine/platform/sound/su.h index 8e8009568..091f7de73 100644 --- a/src/engine/platform/sound/su.h +++ b/src/engine/platform/sound/su.h @@ -33,12 +33,12 @@ class SoundUnit { int rcycle[8]; unsigned int lfsr[8]; signed char ns[8]; - int fns[8]; - int nsL[8]; - int nsR[8]; - int nslow[8]; - int nshigh[8]; - int nsband[8]; + short fns[8]; + short nsL[8]; + short nsR[8]; + short nslow[8]; + short nshigh[8]; + short nsband[8]; int tnsL, tnsR; unsigned char ilBufPeriod; unsigned short ilBufPos; diff --git a/src/engine/platform/sound/ymf278b/License.txt b/src/engine/platform/sound/ymf278b/License.txt new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/src/engine/platform/sound/ymf278b/License.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/src/engine/platform/sound/ymf278b/ymf278.cpp b/src/engine/platform/sound/ymf278b/ymf278.cpp new file mode 100644 index 000000000..9eec6c85b --- /dev/null +++ b/src/engine/platform/sound/ymf278b/ymf278.cpp @@ -0,0 +1,1094 @@ +// Based on ymf278b.c written by R. Belmont and O. Galibert + +// Improved by Valley Bell, 2018 +// Thanks to niekniek and l_oliveira for providing recordings from OPL4 hardware. +// Thanks to superctr and wouterv for discussing changes. +// +// Improvements: +// - added TL interpolation, recordings show that internal TL levels are 0x00..0xff +// - fixed ADSR speeds, attack rate 15 is now instant +// - correct clamping of intermediate Rate Correction values +// - emulation of "loop glitch" (going out-of-bounds by playing a sample faster than it the loop is long) +// - made calculation of sample position cleaner and closer to how the HW works +// - increased output resolution from TL (0.375dB) to envelope (0.09375dB) +// - fixed volume table -6dB steps are done using bit shifts, steps in between are multiplicators +// - made octave -8 freeze the sample +// - verified that TL and envelope levels are applied separately, both go silent at -60dB +// - implemented pseudo-reverb and damping according to manual +// - made pseudo-reverb ignore Rate Correction (real hardware ignores it) +// - reimplemented LFO, speed exactly matches the formulas that were probably used when creating the manual +// - fixed LFO (tremolo) amplitude modulation +// - made LFO vibrato and tremolo accurate to hardware +// +// Known issues: +// - Octave -8 was only tested with fnum 0. Other fnum values might behave differently. + +// This class doesn't model a full YMF278b chip. Instead it only models the +// wave part. The FM part in modeled in YMF262 (it's almost 100% compatible, +// the small differences are handled in YMF262). The status register and +// interaction with the FM registers (e.g. the NEW2 bit) is currently handled +// in the MSXMoonSound class. + +// MODIFIED: +// Add YMW258 support by Grauw +// Add DO1 output support by cam900 + +#include "ymf278.h" +#include +#include + +// envelope output entries +// fixed to match recordings from actual OPL4 -Valley Bell +constexpr int MAX_ATT_INDEX = 0x280; // makes attack phase right and also goes well with "envelope stops at -60dB" +constexpr int MIN_ATT_INDEX = 0; +constexpr int TL_SHIFT = 2; // envelope values are 4x as fine as TL levels + +constexpr unsigned LFO_SHIFT = 18; // LFO period of up to 0x40000 sample +constexpr unsigned LFO_PERIOD = 1 << LFO_SHIFT; + +// Envelope Generator phases +constexpr int EG_ATT = 4; +constexpr int EG_DEC = 3; +constexpr int EG_SUS = 2; +constexpr int EG_REL = 1; +constexpr int EG_OFF = 0; + +// Pan values, units are -3dB, i.e. 8. +constexpr uint8_t pan_left[16] = { + 0, 8, 16, 24, 32, 40, 48, 255, 255, 0, 0, 0, 0, 0, 0, 0 +}; +constexpr uint8_t pan_right[16] = { + 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 48, 40, 32, 24, 16, 8 +}; + +// decay level table (3dB per step) +// 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB) +static constexpr int16_t SC(int dB) { return int16_t(dB / 3 * 0x20); } +constexpr int16_t dl_tab[16] = { + SC( 0), SC( 3), SC( 6), SC( 9), SC(12), SC(15), SC(18), SC(21), + SC(24), SC(27), SC(30), SC(33), SC(36), SC(39), SC(42), SC(93) +}; + +constexpr byte RATE_STEPS = 8; +constexpr byte eg_inc[15 * RATE_STEPS] = { +//cycle:0 1 2 3 4 5 6 7 + 0, 1, 0, 1, 0, 1, 0, 1, // 0 rates 00..12 0 (increment by 0 or 1) + 0, 1, 0, 1, 1, 1, 0, 1, // 1 rates 00..12 1 + 0, 1, 1, 1, 0, 1, 1, 1, // 2 rates 00..12 2 + 0, 1, 1, 1, 1, 1, 1, 1, // 3 rates 00..12 3 + + 1, 1, 1, 1, 1, 1, 1, 1, // 4 rate 13 0 (increment by 1) + 1, 1, 1, 2, 1, 1, 1, 2, // 5 rate 13 1 + 1, 2, 1, 2, 1, 2, 1, 2, // 6 rate 13 2 + 1, 2, 2, 2, 1, 2, 2, 2, // 7 rate 13 3 + + 2, 2, 2, 2, 2, 2, 2, 2, // 8 rate 14 0 (increment by 2) + 2, 2, 2, 4, 2, 2, 2, 4, // 9 rate 14 1 + 2, 4, 2, 4, 2, 4, 2, 4, // 10 rate 14 2 + 2, 4, 4, 4, 2, 4, 4, 4, // 11 rate 14 3 + + 4, 4, 4, 4, 4, 4, 4, 4, // 12 rates 15 0, 15 1, 15 2, 15 3 for decay + 8, 8, 8, 8, 8, 8, 8, 8, // 13 rates 15 0, 15 1, 15 2, 15 3 for attack (zero time) + 0, 0, 0, 0, 0, 0, 0, 0, // 14 infinity rates for attack and decay(s) +}; + +static constexpr byte O(int a) { return a * RATE_STEPS; } +constexpr byte eg_rate_select[64] = { + O(14),O(14),O(14),O(14), // inf rate + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 0),O( 1),O( 2),O( 3), + O( 4),O( 5),O( 6),O( 7), + O( 8),O( 9),O(10),O(11), + O(12),O(12),O(12),O(12), +}; + +// rate 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +// shift 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 +// mask 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0 +constexpr byte eg_rate_shift[64] = { + 12, 12, 12, 12, + 11, 11, 11, 11, + 10, 10, 10, 10, + 9, 9, 9, 9, + 8, 8, 8, 8, + 7, 7, 7, 7, + 6, 6, 6, 6, + 5, 5, 5, 5, + 4, 4, 4, 4, + 3, 3, 3, 3, + 2, 2, 2, 2, + 1, 1, 1, 1, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, +}; + + +// number of steps the LFO counter advances per sample +// LFO frequency (Hz) -> LFO counter steps per sample +static constexpr int L(double a) { return int((LFO_PERIOD * a) / 44100.0 + 0.5); } +constexpr int lfo_period[8] = { + L(0.168), // step: 1, period: 262144 samples + L(2.019), // step: 12, period: 21845 samples + L(3.196), // step: 19, period: 13797 samples + L(4.206), // step: 25, period: 10486 samples + L(5.215), // step: 31, period: 8456 samples + L(5.888), // step: 35, period: 7490 samples + L(6.224), // step: 37, period: 7085 samples + L(7.066), // step: 42, period: 6242 samples +}; + + +// formula used by Yamaha docs: +// vib_depth_cents(x) = (log2(0x400 + x) - 10) * 1200 +constexpr int16_t vib_depth[8] = { + 0, // 0.000 cents + 2, // 3.378 cents + 3, // 5.065 cents + 4, // 6.750 cents + 6, // 10.114 cents + 12, // 20.170 cents + 24, // 40.106 cents + 48, // 79.307 cents +}; + + +// formula used by Yamaha docs: +// am_depth_db(x) = (x-1) / 0x40 * 6.0 +// They use (x-1), because the depth is multiplied with the AM counter, which has a range of 0..0x7F. +// Thus the maximum attenuation with x=0x80 is (0x7F * 0x80) >> 7 = 0x7F. +// reversed formula: +// am_depth(dB) = round(dB / 6.0 * 0x40) + 1 +constexpr uint8_t am_depth[8] = { + 0x00, // 0.000 dB + 0x14, // 1.781 dB + 0x20, // 2.906 dB + 0x28, // 3.656 dB + 0x30, // 4.406 dB + 0x40, // 5.906 dB + 0x50, // 7.406 dB + 0x80, // 11.910 dB +}; + +// divisions of 16 +constexpr int mix_level[8] = { + 16, // 0dB + 12, // -3dB (approx) + 8, // -6dB + 6, // -9dB (approx) + 4, // -12dB + 3, // -15dB (approx) + 2, // -18dB + 0, // -inf dB +}; + +YMF278::Slot::Slot() +{ + reset(); +} + +// Sign extend a 4-bit value to int (32-bit) +// require: x in range [0..15] +static constexpr int sign_extend_4(int x) +{ + return (x ^ 8) - 8; +} + +// Params: oct in [-8 .. +7] +// fn in [ 0 .. 1023] +// We want to interpret oct as a signed 4-bit number and calculate +// ((fn | 1024) + vib) << (5 + sign_extend_4(oct)) +// Though in this formula the shift can go over a negative distance (in that +// case we should shift in the other direction). +static constexpr unsigned calcStep(int8_t oct, uint16_t fn, int16_t vib = 0) +{ + if (oct == -8) return 0; + unsigned t = (fn + 1024 + vib) << (8 + oct); // use '+' iso '|' (generates slightly better code) + return t >> 3; // was shifted 3 positions too far +} + +void YMF278::Slot::reset() +{ + wave = FN = OCT = TLdest = TL = pan = vib = AM = 0; + DL = AR = D1R = D2R = RC = RR = 0; + PRVB = keyon = DAMP = false; + stepptr = 0; + step = calcStep(OCT, FN); + bits = startaddr = loopaddr = endaddr = 0; + env_vol = MAX_ATT_INDEX; + + lfo_active = false; + lfo_cnt = 0; + lfo = 0; + + state = EG_OFF; + + // not strictly needed, but avoid UMR on savestate + pos = 0; +} + +int YMF278::Slot::compute_rate(int val) const +{ + if (val == 0) { + return 0; + } else if (val == 15) { + return 63; + } + int res = val * 4; + if (RC != 15) { + // clamping verified with HW tests -Valley Bell + res += 2 * YMF_clamp(OCT + RC, 0, 15); + res += (FN & 0x200) ? 1 : 0; + } + return YMF_clamp(res, 0, 63); +} + +int YMF278::Slot::compute_decay_rate(int val) const +{ + if (DAMP) { + // damping + // The manual lists these values for time and attenuation: (44100 samples/second) + // -12dB at 5.8ms, sample 256 + // -48dB at 8.0ms, sample 352 + // -72dB at 9.4ms, sample 416 + // -96dB at 10.9ms, sample 480 + // This results in these durations and rate values for the respective phases: + // 0dB .. -12dB: 256 samples (5.80ms) -> 128 samples per -6dB = rate 48 + // -12dB .. -48dB: 96 samples (2.18ms) -> 16 samples per -6dB = rate 63 + // -48dB .. -72dB: 64 samples (1.45ms) -> 16 samples per -6dB = rate 63 + // -72dB .. -96dB: 64 samples (1.45ms) -> 16 samples per -6dB = rate 63 + // Damping was verified to ignore rate correction. + if (env_vol < dl_tab[4]) { + return 48; // 0dB .. -12dB + } else { + return 63; // -12dB .. -96dB + } + } + if (PRVB) { + // pseudo reverb + // activated when reaching -18dB, overrides D1R/D2R/RR with reverb rate 5 + // + // The manual is actually a bit unclear and just says "RATE=5", + // referring to the D1R/D2R/RR register value. However, later + // pages use "RATE" to refer to the "internal" rate, which is + // (register * 4) + rate correction. HW recordings prove that + // Rate Correction is ignored, so pseudo reverb just sets the + // "internal" rate to a value of 4*5 = 20. + if (env_vol >= dl_tab[6]) { + return 20; + } + } + return compute_rate(val); +} + +int16_t YMF278::Slot::compute_vib() const +{ + // verified via hardware recording: + // With LFO speed 0 (period 262144 samples), each vibrato step takes + // 4096 samples. + // -> 64 steps total + // Also, with vibrato depth 7 (80 cents) and an F-Num of 0x400, the + // final F-Nums are: 0x400 .. 0x43C, 0x43C .. 0x400, 0x400 .. 0x3C4, + // 0x3C4 .. 0x400 + int16_t lfo_fm = lfo_cnt / (LFO_PERIOD / 0x40); + // results in +0x00..+0x0F, +0x0F..+0x00, -0x00..-0x0F, -0x0F..-0x00 + if (lfo_fm & 0x10) lfo_fm ^= 0x1F; + if (lfo_fm & 0x20) lfo_fm = -(lfo_fm & 0x0F); + + return (lfo_fm * vib_depth[vib]) / 12; +} + +uint16_t YMF278::Slot::compute_am() const +{ + // verified via hardware recording: + // With LFO speed 0 (period 262144 samples), each tremolo step takes + // 1024 samples. + // -> 256 steps total + uint16_t lfo_am = lfo_cnt / (LFO_PERIOD / 0x100); + // results in 0x00..0x7F, 0x7F..0x00 + if (lfo_am >= 0x80) lfo_am ^= 0xFF; + + return (lfo_am * am_depth[AM]) >> 7; +} + + +void YMF278Base::advance() +{ + eg_cnt++; + + // modulo counters for volume interpolation + int tl_int_cnt = eg_cnt % 9; // 0 .. 8 + int tl_int_step = (eg_cnt / 9) % 3; // 0 .. 2 + + for (auto& op : slots) { + // volume interpolation + if (tl_int_cnt == 0) { + if (tl_int_step == 0) { + // decrease volume by one step every 27 samples + if (op.TL < op.TLdest) ++op.TL; + } else { + // increase volume by one step every 13.5 samples + if (op.TL > op.TLdest) --op.TL; + } + } + + if (op.lfo_active) { + op.lfo_cnt = (op.lfo_cnt + lfo_period[op.lfo]) & (LFO_PERIOD - 1); + } + + // Envelope Generator + switch (op.state) { + case EG_ATT: { // attack phase + uint8_t rate = op.compute_rate(op.AR); + // Verified by HW recording (and matches Nemesis' tests of the YM2612): + // AR = 0xF during KeyOn results in instant switch to EG_DEC. (see keyOnHelper) + // Setting AR = 0xF while the attack phase is in progress freezes the envelope. + if (rate >= 63) { + break; + } + uint8_t shift = eg_rate_shift[rate]; + if (!(eg_cnt & ((1 << shift) - 1))) { + uint8_t select = eg_rate_select[rate]; + // >>4 makes the attack phase's shape match the actual chip -Valley Bell + op.env_vol += (~op.env_vol * eg_inc[select + ((eg_cnt >> shift) & 7)]) >> 4; + if (op.env_vol <= MIN_ATT_INDEX) { + op.env_vol = MIN_ATT_INDEX; + // TODO does the real HW skip EG_DEC completely, + // or is it active for 1 sample? + op.state = op.DL ? EG_DEC : EG_SUS; + } + } + break; + } + case EG_DEC: { // decay phase + uint8_t rate = op.compute_decay_rate(op.D1R); + uint8_t shift = eg_rate_shift[rate]; + if (!(eg_cnt & ((1 << shift) - 1))) { + uint8_t select = eg_rate_select[rate]; + op.env_vol += eg_inc[select + ((eg_cnt >> shift) & 7)]; + if (op.env_vol >= op.DL) { + op.state = (op.env_vol < MAX_ATT_INDEX) ? EG_SUS : EG_OFF; + } + } + break; + } + case EG_SUS: { // sustain phase + uint8_t rate = op.compute_decay_rate(op.D2R); + uint8_t shift = eg_rate_shift[rate]; + if (!(eg_cnt & ((1 << shift) - 1))) { + uint8_t select = eg_rate_select[rate]; + op.env_vol += eg_inc[select + ((eg_cnt >> shift) & 7)]; + if (op.env_vol >= MAX_ATT_INDEX) { + op.env_vol = MAX_ATT_INDEX; + op.state = EG_OFF; + } + } + break; + } + case EG_REL: { // release phase + uint8_t rate = op.compute_decay_rate(op.RR); + uint8_t shift = eg_rate_shift[rate]; + if (!(eg_cnt & ((1 << shift) - 1))) { + uint8_t select = eg_rate_select[rate]; + op.env_vol += eg_inc[select + ((eg_cnt >> shift) & 7)]; + if (op.env_vol >= MAX_ATT_INDEX) { + op.env_vol = MAX_ATT_INDEX; + op.state = EG_OFF; + } + } + break; + } + case EG_OFF: + // nothing + break; + + default: + UNREACHABLE; + } + } +} + +int16_t YMF278Base::getSample(Slot& slot, uint16_t pos) const +{ + // TODO How does this behave when R#2 bit 0 = 1? + // As-if read returns 0xff? (Like for CPU memory reads.) Or is + // sound generation blocked at some higher level? + switch (slot.bits) { + case 0: { + // 8 bit + return memory[slot.startaddr + pos] << 8; + } + case 1: { + // 12 bit + unsigned addr = slot.startaddr + ((pos / 2) * 3); + if (pos & 1) { + return (memory[addr + 2] << 8) | + (memory[addr + 1] & 0xF0); + } else { + return (memory[addr + 0] << 8) | + ((memory[addr + 1] << 4) & 0xF0); + } + } + case 2: { + // 16 bit + unsigned addr = slot.startaddr + (pos * 2); + return (memory[addr + 0] << 8) | + (memory[addr + 1]); + } + default: + // TODO unspecified + return 0; + } +} + +uint16_t YMF278Base::nextPos(Slot& slot, uint16_t pos, uint16_t increment) +{ + // If there is a 4-sample loop and you advance 12 samples per step, + // it may exceed the end offset. + // This is abused by the "Lizard Star" song to generate noise at 0:52. -Valley Bell + pos += increment; + if ((uint32_t(pos) + slot.endaddr) >= 0x10000) // check position >= (negated) end address + pos += slot.endaddr + slot.loopaddr; // This is how the actual chip does it. + return pos; +} + +bool YMF278Base::anyActive() +{ + return std::any_of(std::begin(slots), std::end(slots), [](auto& op) { return op.state != EG_OFF; }); +} + +// In: 'envVol', 0=max volume, others -> -3/32 = -0.09375 dB/step +// Out: 'x' attenuated by the corresponding factor. +// Note: microbenchmarks have shown that re-doing this calculation is about the +// same speed as using a 4kB lookup table. +static constexpr int vol_factor(int x, unsigned envVol) +{ + if (envVol >= MAX_ATT_INDEX) return 0; // hardware clips to silence below -60dB + int vol_mul = 0x80 - (envVol & 0x3F); // 0x40 values per 6dB + int vol_shift = 7 + (envVol >> 6); + return (x * ((0x8000 * vol_mul) >> vol_shift)) >> 15; +} + +void YMF278Base::generate(short& fleft, short& fright, short& rleft, short& rright, short* channelBufs) +{ + int sampleFLeft = 0; + int sampleFRight = 0; + int sampleRLeft = 0; + int sampleRRight = 0; + for (size_t i = 0, count = slots.size(); i < count; i++) { + Slot& sl = slots[i]; + if (sl.state == EG_OFF) { + //sampleLeft += 0; + //sampleRight += 0; + if (channelBufs != nullptr) { + channelBufs[i] = 0; + } + continue; + } + + int16_t sample = (getSample(sl, sl.pos) * (0x10000 - sl.stepptr) + + getSample(sl, nextPos(sl, sl.pos, 1)) * sl.stepptr) >> 16; + // TL levels are 00..FF internally (TL register value 7F is mapped to TL level FF) + // Envelope levels have 4x the resolution (000..3FF) + // Volume levels are approximate logarithmic. -6dB result in half volume. Steps in between use linear interpolation. + // A volume of -60dB or lower results in silence. (value 0x280..0x3FF). + // Recordings from actual hardware indicate that TL level and envelope level are applied separarely. + // Each of them is clipped to silence below -60dB, but TL+envelope might result in a lower volume. -Valley Bell + uint16_t envVol = std::min(sl.env_vol + ((sl.lfo_active && sl.AM) ? sl.compute_am() : 0), + MAX_ATT_INDEX); + int smplOut = vol_factor(vol_factor(sample, envVol), sl.TL << TL_SHIFT); + + // Panning is also done separately. (low-volume TL + low-volume panning goes below -60dB) + // I'll be taking wild guess and assume that -3dB is approximated with 75%. (same as with TL and envelope levels) + // The same applies to the PCM mix level. + int32_t volLeft = pan_left [sl.pan]; // note: register 0xF9 is handled externally + int32_t volRight = pan_right[sl.pan]; + // 0 -> 0x20, 8 -> 0x18, 16 -> 0x10, 24 -> 0x0C, etc. (not using vol_factor here saves array boundary checks) + volLeft = (0x20 - (volLeft & 0x0f)) >> (volLeft >> 4); + volRight = (0x20 - (volRight & 0x0f)) >> (volRight >> 4); + + if (sl.ch) + { + sampleRLeft += (smplOut * volLeft ) >> 5; + sampleRRight += (smplOut * volRight) >> 5; + } + else + { + sampleFLeft += (smplOut * volLeft ) >> 5; + sampleFRight += (smplOut * volRight) >> 5; + } + + unsigned step = (sl.lfo_active && sl.vib) + ? calcStep(sl.OCT, sl.FN, sl.compute_vib()) + : sl.step; + sl.stepptr += step; + + if (sl.stepptr >= 0x10000) { + sl.pos = nextPos(sl, sl.pos, sl.stepptr >> 16); + sl.stepptr &= 0xffff; + } + + if (channelBufs != nullptr) { + channelBufs[i] = sl.pan != 8 ? smplOut : 0; + } + } + advance(); + + fleft = sampleFLeft >> 4; + fright = sampleFRight >> 4; + rleft = sampleRLeft >> 4; + rright = sampleRRight >> 4; +} + +void YMF278Base::keyOnHelper(Slot& slot) +{ + // Unlike FM, the envelope level is reset. (And it makes sense, because you restart the sample.) + slot.env_vol = MAX_ATT_INDEX; + if (slot.compute_rate(slot.AR) < 63) { + slot.state = EG_ATT; + } else { + // Nuke.YKT verified that the FM part does it exactly this way, + // and the OPL4 manual says it's instant as well. + slot.env_vol = MIN_ATT_INDEX; + // see comment in 'case EG_ATT' in YMF278::advance() + slot.state = slot.DL ? EG_DEC : EG_SUS; + } + slot.stepptr = 0; + slot.pos = 0; +} + +YMF278Base::YMF278Base(MemoryInterface& memory, int channelCount, int clockDivider, double clockFrequency) + : memory(memory) + , slots(channelCount) + , channelCount(channelCount) + , clockDivider(clockDivider) + , clockFrequency(clockFrequency) +{ + reset(); +} + +YMF278Base::~YMF278Base() +{ +} + +int YMF278Base::getChannelCount() +{ + return channelCount; +} + +int YMF278Base::getClockDivider() +{ + return clockDivider; +} + +double YMF278Base::getClockFrequency() +{ + return clockFrequency; +} + +void YMF278Base::setClockFrequency(double clockFrequency_) +{ + clockFrequency = clockFrequency_; +} + +double YMF278Base::getSampleRate() +{ + return clockFrequency / (channelCount * clockDivider); +} + +void YMF278Base::reset() +{ + eg_cnt = 0; + for (auto& op : slots) { + op.reset(); + } + memory.setMemoryType(false); +} + +YMF278::YMF278(MemoryInterface& memory) + : YMF278Base(memory, 24, 32, 33868800) + , fmMixL(0), fmMixR(0), pcmMixL(0), pcmMixR(0) +{ + memAdr = 0; // avoid UMR + std::fill(std::begin(regs), std::end(regs), 0); +} + +void YMF278::reset() +{ + YMF278Base::reset(); + + regs[2] = 0; // avoid UMR + for (int i = 0xf7; i >= 0; --i) { // reverse order to avoid UMR + writeReg(i, 0); + } + writeReg(0xf8, 0x1b); + writeReg(0xf9, 0x00); + memAdr = 0; +} + +void YMF278::writeReg(byte reg, byte data) +{ + // Handle slot registers specifically + if (reg >= 0x08 && reg <= 0xF7) { + int sNum = (reg - 8) % 24; + auto& slot = slots[sNum]; + switch ((reg - 8) / 24) { + case 0: { + slot.wave = (slot.wave & 0x100) | data; + int waveTblHdr = (regs[2] >> 2) & 0x7; + int base = (slot.wave < 384 || !waveTblHdr) ? + (slot.wave * 12) : + (waveTblHdr * 0x80000 + ((slot.wave - 384) * 12)); + byte buf[12]; + for (unsigned i = 0; i < 12; ++i) { + // TODO What if R#2 bit 0 = 1? + // See also getSample() + buf[i] = memory[base + i]; + } + slot.bits = (buf[0] & 0xC0) >> 6; + slot.startaddr = buf[2] | (buf[1] << 8) | ((buf[0] & 0x3F) << 16); + slot.loopaddr = buf[4] | (buf[3] << 8); + slot.endaddr = buf[6] | (buf[5] << 8); + for (unsigned i = 7; i < 12; ++i) { + // Verified on real YMF278: + // After tone loading, if you read these + // registers, their value actually has changed. + writeReg(8 + sNum + (i - 2) * 24, buf[i]); + } + if (slot.keyon) { + keyOnHelper(slot); + } else { + slot.stepptr = 0; + slot.pos = 0; + } + break; + } + case 1: { + slot.wave = (slot.wave & 0xFF) | ((data & 0x1) << 8); + slot.FN = (slot.FN & 0x380) | (data >> 1); + slot.step = calcStep(slot.OCT, slot.FN); + break; + } + case 2: { + slot.FN = (slot.FN & 0x07F) | ((data & 0x07) << 7); + slot.PRVB = (data & 0x08) != 0; + slot.OCT = sign_extend_4((data & 0xF0) >> 4); + slot.step = calcStep(slot.OCT, slot.FN); + break; + } + case 3: { + uint8_t t = data >> 1; + slot.TLdest = (t != 0x7f) ? t : 0xff; // verified on HW via volume interpolation + if (data & 1) { + // directly change volume + slot.TL = slot.TLdest; + } else { + // interpolate volume + } + break; + } + case 4: + slot.ch = data & 0x10; + slot.pan = data & 0x0F; + + if (data & 0x20) { + // LFO reset + slot.lfo_active = false; + slot.lfo_cnt = 0; + } else { + // LFO activate + slot.lfo_active = true; + } + + slot.DAMP = (data & 0x40) != 0; + + if (data & 0x80) { + if (!slot.keyon) { + slot.keyon = true; + keyOnHelper(slot); + } + } else { + if (slot.keyon) { + slot.keyon = false; + slot.state = EG_REL; + } + } + break; + case 5: + slot.lfo = (data >> 3) & 0x7; + slot.vib = data & 0x7; + break; + case 6: + slot.AR = data >> 4; + slot.D1R = data & 0xF; + break; + case 7: + slot.DL = dl_tab[data >> 4]; + slot.D2R = data & 0xF; + break; + case 8: + slot.RC = data >> 4; + slot.RR = data & 0xF; + break; + case 9: + slot.AM = data & 0x7; + break; + } + } else { + // All non-slot registers + switch (reg) { + case 0x00: // TEST + case 0x01: + break; + + case 0x02: + // wave-table-header / memory-type / memory-access-mode + // Simply store in regs[2] + memory.setMemoryType(regs[2] & 2); + break; + + case 0x03: + // Verified on real YMF278: + // * Don't update the 'memAdr' variable on writes to + // reg 3 and 4. Only store the value in the 'regs' + // array for later use. + // * The upper 2 bits are not used to address the + // external memories (so from a HW pov they don't + // matter). But if you read back this register, the + // upper 2 bits always read as '0' (even if you wrote + // '1'). So we mask the bits here already. + data &= 0x3F; + break; + + case 0x04: + // See reg 3. + break; + + case 0x05: + // Verified on real YMF278: (see above) + // Only writes to reg 5 change the (full) 'memAdr'. + memAdr = (regs[3] << 16) | (regs[4] << 8) | data; + break; + + case 0x06: // memory data + if (regs[2] & 1) { + memory.write(memAdr, data); + ++memAdr; // no need to mask (again) here + } else { + // Verified on real YMF278: + // - writes are ignored + // - memAdr is NOT increased + } + break; + + case 0xf8: + fmMixL = mix_level[data & 0x7]; + fmMixR = mix_level[data >> 3 & 0x7]; + break; + case 0xf9: + pcmMixL = mix_level[data & 0x7]; + pcmMixR = mix_level[data >> 3 & 0x7]; + break; + } + } + + regs[reg] = data; +} + +byte YMF278::readReg(byte reg) +{ + // no need to call updateStream(time) + byte result = peekReg(reg); + if (reg == 6) { + // Memory Data Register + if (regs[2] & 1) { + // Verified on real YMF278: + // memAdr is only increased when 'regs[2] & 1' + ++memAdr; // no need to mask (again) here + } + } + return result; +} + +byte YMF278::peekReg(byte reg) const +{ + switch (reg) { + case 2: // 3 upper bits are device ID + return (regs[2] & 0x1F) | 0x20; + + case 6: // Memory Data Register + if (regs[2] & 1) { + return memory[memAdr]; + } else { + // Verified on real YMF278 + return 0xff; + } + + default: + return regs[reg]; + } +} + +YMW258::YMW258(MemoryInterface& memory) + : YMF278Base(memory, 28, 8, 9878400) +{ +} + +void YMW258::writeReg(byte channel, byte reg, byte data) +{ + if ((channel & 0x7) == 0x7 || channel >= 0x20 || reg >= 0x8) + return; + int sNum = (channel >> 3) * 7 + (channel & 0x7); + auto& slot = slots[sNum]; + + switch (reg) { + case 0: { + slot.pan = data >> 4; + break; + } + case 1: { + slot.wave = (slot.wave & 0x100) | data; + int base = slot.wave * 12; + byte buf[12]; + for (unsigned i = 0; i < 12; ++i) { + buf[i] = memory[base + i]; + } + slot.bits = (buf[0] >> 6) == 0x3 ? 1 : 0; // 00 / 10: 8 bit, 11: 12 bit, 01: unknown + slot.startaddr = buf[2] | (buf[1] << 8) | ((buf[0] & 0x1F) << 16); + slot.loopaddr = buf[4] | (buf[3] << 8); + slot.endaddr = buf[6] | (buf[5] << 8); + slot.lfo = (buf[7] >> 3) & 0x7; + slot.vib = buf[7] & 0x7; + slot.AR = buf[8] >> 4; + slot.D1R = buf[8] & 0xF; + slot.DL = dl_tab[buf[9] >> 4]; + slot.D2R = buf[9] & 0xF; + slot.RC = buf[10] >> 4; + slot.RR = buf[10] & 0xF; + slot.AM = buf[11] & 0x7; + if (slot.keyon) { + keyOnHelper(slot); + } else { + slot.stepptr = 0; + slot.pos = 0; + } + break; + } + case 2: { + slot.wave = (slot.wave & 0xFF) | ((data & 0x1) << 8); + slot.FN = (slot.FN & 0x3C0) | (data >> 2); + slot.step = calcStep(slot.OCT, slot.FN); + break; + } + case 3: { + slot.FN = (slot.FN & 0x03F) | ((data & 0x0F) << 6); + slot.OCT = sign_extend_4((data & 0xF0) >> 4); + slot.step = calcStep(slot.OCT, slot.FN); + break; + } + case 4: { + slot.lfo_active = true; + if (data & 0x80) { + if (!slot.keyon) { + slot.keyon = true; + keyOnHelper(slot); + } + } else { + if (slot.keyon) { + slot.keyon = false; + slot.state = EG_REL; + } + } + break; + } + case 5: { + uint8_t t = data >> 1; + slot.TLdest = (t != 0x7f) ? t : 0xff; // verified on YMF278 via volume interpolation + if (data & 1) { + // directly change volume + slot.TL = slot.TLdest; + } else { + // interpolate volume + } + break; + } + case 6: { + slot.lfo = (data >> 3) & 0x7; + slot.vib = data & 0x7; + break; + } + case 7: { + slot.AM = data & 0x7; + break; + } + } +} + +MemoryMoonSound::MemoryMoonSound(MemoryInterface& rom, MemoryInterface& ram) + : rom(rom) + , ram(ram) + , memoryType(false) +{ + if (rom.getSize() != 0x200000) { // 2MB + assert(false); + } + assert((ram.getSize() & (1024 - 1)) == 0); + int ramSize_ = ram.getSize() / 1024; + if ((ramSize_ != 0) && // - - + (ramSize_ != 128) && // 128kB - + (ramSize_ != 256) && // 128kB 128kB + (ramSize_ != 512) && // 512kB - + (ramSize_ != 640) && // 512kB 128kB + (ramSize_ != 1024) && // 512kB 512kB + (ramSize_ != 2048)) { // 512kB 512kB 512kB 512kB + assert(false); + } +} + +// This routine translates an address from the (upper) MoonSound address space +// to an address inside the (linearized) SRAM address space. +// +// The following info is based on measurements on a real MoonSound (v2.0) +// PCB. This PCB can have several possible SRAM configurations: +// 128kB: +// 1 SRAM chip of 128kB, chip enable (/CE) of this SRAM chip is connected to +// the 1Y0 output of a 74LS139 (2-to-4 decoder). The enable input of the +// 74LS139 is connected to YMF278 pin /MCS6 and the 74LS139 1B:1A inputs are +// connected to YMF278 pins MA18:MA17. So the SRAM is selected when /MC6 is +// active and MA18:MA17 == 0:0. +// 256kB: +// 2 SRAM chips of 128kB. First one connected as above. Second one has /CE +// connected to 74LS139 pin 1Y1. So SRAM2 is selected when /MSC6 is active +// and MA18:MA17 == 0:1. +// 512kB: +// 1 SRAM chip of 512kB, /CE connected to /MCS6 +// 640kB: +// 1 SRAM chip of 512kB, /CE connected to /MCS6 +// 1 SRAM chip of 128kB, /CE connected to /MCS7. +// (This means SRAM2 is potentially mirrored over a 512kB region) +// 1024kB: +// 1 SRAM chip of 512kB, /CE connected to /MCS6 +// 1 SRAM chip of 512kB, /CE connected to /MCS7 +// 2048kB: +// 1 SRAM chip of 512kB, /CE connected to /MCS6 +// 1 SRAM chip of 512kB, /CE connected to /MCS7 +// 1 SRAM chip of 512kB, /CE connected to /MCS8 +// 1 SRAM chip of 512kB, /CE connected to /MCS9 +// This configuration is not so easy to create on the v2.0 PCB. So it's +// very rare. +// +// So the /MCS6 and /MCS7 (and /MCS8 and /MCS9 in case of 2048kB) signals are +// used to select the different SRAM chips. The meaning of these signals +// depends on the 'memory access mode'. This mode can be changed at run-time +// via bit 1 in register 2. The following table indicates for which regions +// these signals are active (normally MoonSound should be used with mode=0): +// mode=0 mode=1 +// /MCS6 0x200000-0x27FFFF 0x380000-0x39FFFF +// /MCS7 0x280000-0x2FFFFF 0x3A0000-0x3BFFFF +// /MCS8 0x300000-0x37FFFF 0x3C0000-0x3DFFFF +// /MCS9 0x380000-0x3FFFFF 0x3E0000-0x3FFFFF +// +// (For completeness) MoonSound also has 2MB ROM (YRW801), /CE of this ROM is +// connected to YMF278 /MCS0. In both mode=0 and mode=1 this signal is active +// for the region 0x000000-0x1FFFFF. (But this routine does not handle ROM). +unsigned MemoryMoonSound::getRamAddress(unsigned addr) const +{ + addr -= 0x200000; // RAM starts at 0x200000 + if (memoryType) { + // Normally MoonSound is used in 'memory access mode = 0'. But + // in the rare case that mode=1 we adjust the address. + if ((0x180000 <= addr) && (addr <= 0x1FFFFF)) { + addr -= 0x180000; + switch (addr & 0x060000) { + case 0x000000: // [0x380000-0x39FFFF] + // 1st 128kB of SRAM1 + break; + case 0x020000: // [0x3A0000-0x3BFFFF] + if (ram.getSize() == 256 * 1024) { + // 2nd 128kB SRAM chip + } else { + // 2nd block of 128kB in SRAM2 + // In case of 512+128, we use mirroring + addr += 0x080000; + } + break; + case 0x040000: // [0x3C0000-0x3DFFFF] + // 3rd 128kB block in SRAM3 + addr += 0x100000; + break; + case 0x060000: // [0x3EFFFF-0x3FFFFF] + // 4th 128kB block in SRAM4 + addr += 0x180000; + break; + } + } else { + addr = unsigned(-1); // unmapped + } + } + if (ram.getSize() == 640 * 1024) { + // Verified on real MoonSound cartridge (v2.0): In case of + // 640kB (1x512kB + 1x128kB), the 128kB SRAM chip is 4 times + // visible. None of the other SRAM configurations show similar + // mirroring (because the others are powers of two). + if (addr > 0x080000) { + addr &= ~0x060000; + } + } + return addr; +} + +byte MemoryMoonSound::operator[](unsigned address) const +{ + // Verified on real YMF278: address space wraps at 4MB. + address &= 0x3FFFFF; + if (address < 0x200000) { + // ROM connected to /MCS0 + return rom[address]; + } else { + unsigned ramAddr = getRamAddress(address); + if (ramAddr < ram.getSize()) { + return ram[ramAddr]; + } else { + // unmapped region + return 255; // TODO check + } + } +} + +unsigned MemoryMoonSound::getSize() const { + return 0x400000; +} + +void MemoryMoonSound::write(unsigned address, byte value) +{ + address &= 0x3FFFFF; + if (address < 0x200000) { + // can't write to ROM + } else { + unsigned ramAddr = getRamAddress(address); + if (ramAddr < ram.getSize()) { + ram.write(ramAddr, value); + } else { + // can't write to unmapped memory + } + } +} + +void MemoryMoonSound::clear(byte value) { + ram.clear(value); +} + +void MemoryMoonSound::setMemoryType(bool memoryType_) { + memoryType = memoryType_; +} diff --git a/src/engine/platform/sound/ymf278b/ymf278.h b/src/engine/platform/sound/ymf278b/ymf278.h new file mode 100644 index 000000000..b0622adb2 --- /dev/null +++ b/src/engine/platform/sound/ymf278b/ymf278.h @@ -0,0 +1,155 @@ +#ifndef YMF278_HH +#define YMF278_HH + +#include +#include +#include + +#define UNREACHABLE while (1) assert(false) + +using byte = uint8_t; + +template +const T& YMF_clamp(const T& value, const T& min, const T& max) { + return std::min(std::max(value, min), max); +} + +class MemoryInterface { +public: + virtual byte operator[](unsigned address) const = 0; + virtual unsigned getSize() const = 0; + virtual void write(unsigned address, byte value) = 0; + virtual void clear(byte value) = 0; + virtual void setMemoryType(bool memoryType) {}; +}; + +class YMF278Base +{ +public: + YMF278Base(MemoryInterface& memory, int channelCount, int clockDivider, double clockFrequency); + ~YMF278Base(); + int getChannelCount(); + int getClockDivider(); + double getClockFrequency(); + void setClockFrequency(double clockFrequency); + double getSampleRate(); + virtual void reset(); + + void generate(short& fleft, short& fright, short& rleft, short& rright, short* channelBufs = nullptr); + + class Slot final { + public: + Slot(); + void reset(); + int compute_rate(int val) const; + int compute_decay_rate(int val) const; + unsigned decay_rate(int num, int sample_rate); + void envelope_next(int sample_rate); + int16_t compute_vib() const; + uint16_t compute_am() const; + + template + void serialize(Archive& ar, unsigned version); + + uint32_t startaddr; + uint16_t loopaddr; + uint16_t endaddr; // Note: stored in 2s complement (0x0000 = 0, 0x0001 = -65536, 0xffff = -1) + uint32_t step; // fixed-point frequency step + // invariant: step == calcStep(OCT, FN) + uint32_t stepptr; // fixed-point pointer into the sample + uint16_t pos; + + int16_t env_vol; + + uint32_t lfo_cnt; + + int16_t DL; + uint16_t wave; // wavetable number + uint16_t FN; // f-number TODO store 'FN | 1024'? + int8_t OCT; // octave [-8..+7] + bool PRVB; // pseudo-reverb + uint8_t TLdest; // destination total level + uint8_t TL; // total level (goes towards TLdest) + uint8_t pan; // panpot 0..15 + bool ch; // channel select + bool keyon; // slot keyed on + bool DAMP; + uint8_t lfo; // LFO speed 0..7 + uint8_t vib; // vibrato 0..7 + uint8_t AM; // AM level 0..7 + uint8_t AR; // 0..15 + uint8_t D1R; // 0..15 + uint8_t D2R; // 0..15 + uint8_t RC; // rate correction 0..15 + uint8_t RR; // 0..15 + + uint8_t bits; // width of the samples + + uint8_t state; // envelope generator state + bool lfo_active; + }; + +protected: + void keyOnHelper(Slot& slot); + + MemoryInterface& memory; + std::vector slots; + +private: + int16_t getSample(Slot& slot, uint16_t pos) const; + static uint16_t nextPos(Slot& slot, uint16_t pos, uint16_t increment); + void advance(); + bool anyActive(); + + /** Global envelope generator counter. */ + unsigned eg_cnt; + + unsigned channelCount, clockDivider; + double clockFrequency; +}; + +class YMF278 final : public YMF278Base { +public: + YMF278(MemoryInterface& memory); + void reset() override; + void writeReg(byte reg, byte data); + byte readReg(byte reg); + byte peekReg(byte reg) const; + + void generateMix(short fmL, short fmR, short& bufFL, short& bufFR, short& bufRL, short& bufRR, short* channelBufs = nullptr) { + generate(bufFL, bufFR, bufRL, bufRR, channelBufs); + bufFL = std::min(std::max((pcmMixL * bufFL + fmMixL * fmL) >> 4, -0x8000), 0x7fff); + bufFR = std::min(std::max((pcmMixR * bufFR + fmMixR * fmR) >> 4, -0x8000), 0x7fff);; + } + +private: + int fmMixL, fmMixR, pcmMixL, pcmMixR; + int memAdr; + byte regs[256]; +}; + +class YMW258 final : public YMF278Base { +public: + YMW258(MemoryInterface& memory); + void writeReg(byte channel, byte reg, byte data); +}; + +class MemoryMoonSound : MemoryInterface { +public: + MemoryMoonSound(MemoryInterface& rom, MemoryInterface& ram); + byte operator[](unsigned address) const override; + unsigned getSize() const override; + void write(unsigned address, byte value) override; + void clear(byte value) override; + void setMemoryType(bool memoryType) override; + +private: + unsigned getRamAddress(unsigned addr) const; + + MemoryInterface& rom; + MemoryInterface& ram; + + bool memoryType; +}; + +#endif diff --git a/src/engine/platform/sound/ymfm/ymfm_fm.h b/src/engine/platform/sound/ymfm/ymfm_fm.h index f77e89434..0c4342f0b 100644 --- a/src/engine/platform/sound/ymfm/ymfm_fm.h +++ b/src/engine/platform/sound/ymfm/ymfm_fm.h @@ -304,9 +304,9 @@ public: // simple getters for debugging fm_operator *debug_operator(uint32_t index) const { return m_op[index]; } - int32_t debug_output(uint32_t index) const { return m_output[index]; } - int32_t debug_special1() const { return m_special1; } - int32_t debug_special2() const { return m_special2; } + int32_t debug_output(uint32_t index) const { return m_output[index]; } + int32_t debug_special1() const { return m_special1; } + int32_t debug_special2() const { return m_special2; } private: // helper to add values to the outputs based on channel enables @@ -320,21 +320,21 @@ private: constexpr int out3_index = 3 % RegisterType::OUTPUTS; if (RegisterType::OUTPUTS == 1 || m_regs.ch_output_0(choffs)) { - m_output[out0_index]=value; + m_output[out0_index]=value; output.data[out0_index] += value; - } + } if (RegisterType::OUTPUTS >= 2 && m_regs.ch_output_1(choffs)) { - m_output[out1_index]=value; + m_output[out1_index]=value; output.data[out1_index] += value; - } + } if (RegisterType::OUTPUTS >= 3 && m_regs.ch_output_2(choffs)) { - m_output[out2_index]=value; + m_output[out2_index]=value; output.data[out2_index] += value; - } + } if (RegisterType::OUTPUTS >= 4 && m_regs.ch_output_3(choffs)) { - m_output[out3_index]=value; + m_output[out3_index]=value; output.data[out3_index] += value; - } + } } // internal state @@ -344,9 +344,9 @@ private: fm_operator *m_op[4]; // up to 4 operators RegisterType &m_regs; // direct reference to registers fm_engine_base &m_owner; // reference to the owning engine - mutable int32_t m_output[4]; - mutable int32_t m_special1; - mutable int32_t m_special2; + mutable int32_t m_output[4]; + mutable int32_t m_special1; + mutable int32_t m_special2; }; diff --git a/src/engine/platform/sound/ymfm/ymfm_opl.h b/src/engine/platform/sound/ymfm/ymfm_opl.h index 8a2dd5147..c23a5f0b9 100644 --- a/src/engine/platform/sound/ymfm/ymfm_opl.h +++ b/src/engine/platform/sound/ymfm/ymfm_opl.h @@ -529,7 +529,7 @@ public: // generate samples of sound void generate(output_data *output, uint32_t numsamples = 1); - fm_engine* debug_fm_engine() { return &m_fm; } + fm_engine* debug_fm_engine() { return &m_fm; } protected: // internal state uint8_t m_address; // address register @@ -577,8 +577,8 @@ public: // generate samples of sound void generate(output_data *output, uint32_t numsamples = 1); - fm_engine* debug_fm_engine() { return &m_fm; } - adpcm_b_engine* debug_adpcm_b_engine() { return &m_adpcm_b; } + fm_engine* debug_fm_engine() { return &m_fm; } + adpcm_b_engine* debug_adpcm_b_engine() { return &m_adpcm_b; } protected: // internal state @@ -628,7 +628,7 @@ public: // generate samples of sound void generate(output_data *output, uint32_t numsamples = 1); - fm_engine* debug_fm_engine() { return &m_fm; } + fm_engine* debug_fm_engine() { return &m_fm; } protected: // internal state @@ -677,7 +677,7 @@ public: // generate samples of sound void generate(output_data *output, uint32_t numsamples = 1); - fm_engine* debug_fm_engine() { return &m_fm; } + fm_engine* debug_fm_engine() { return &m_fm; } protected: // internal state @@ -791,6 +791,8 @@ public: // generate samples of sound void generate(output_data *output, uint32_t numsamples = 1); + fm_engine* debug_fm_engine() { return &m_fm; } + pcm_engine* debug_pcm_engine() { return &m_pcm; } protected: // internal state uint16_t m_address; // address register diff --git a/src/engine/platform/sound/ymfm/ymfm_pcm.cpp b/src/engine/platform/sound/ymfm/ymfm_pcm.cpp index 34417490c..30fbe2396 100644 --- a/src/engine/platform/sound/ymfm/ymfm_pcm.cpp +++ b/src/engine/platform/sound/ymfm/ymfm_pcm.cpp @@ -309,6 +309,7 @@ void pcm_channel::clock(uint32_t env_counter) void pcm_channel::output(output_data &output) const { + m_output[0] = m_output[1] = m_output[2] = m_output[3] = 0; // early out if the envelope is effectively off uint32_t envelope = m_env_attenuation; if (envelope > EG_QUIET) @@ -340,6 +341,8 @@ void pcm_channel::output(output_data &output) const uint32_t outnum = m_regs.ch_output_channel(m_choffs) * 2; output.data[outnum + 0] += (lvol * sample) >> 15; output.data[outnum + 1] += (rvol * sample) >> 15; + m_output[outnum + 0] = output.data[outnum + 0]; + m_output[outnum + 1] = output.data[outnum + 1]; } diff --git a/src/engine/platform/sound/ymfm/ymfm_pcm.h b/src/engine/platform/sound/ymfm/ymfm_pcm.h index b471fa611..ad15a80de 100644 --- a/src/engine/platform/sound/ymfm/ymfm_pcm.h +++ b/src/engine/platform/sound/ymfm/ymfm_pcm.h @@ -267,6 +267,8 @@ public: // load a new wavetable entry void load_wavetable(); + int32_t debug_output(uint32_t index) const { return m_output[index]; } + private: // internal helpers void start_attack(); @@ -291,6 +293,7 @@ private: pcm_cache m_cache; // cached data pcm_registers &m_regs; // reference to registers pcm_engine &m_owner; // reference to our owner + mutable int32_t m_output[4]; }; @@ -331,6 +334,8 @@ public: // return a reference to our registers pcm_registers ®s() { return m_regs; } + // simple getters for debugging + pcm_channel *debug_channel(uint32_t index) const { return m_channel[index].get(); } private: // internal state ymfm_interface &m_intf; // reference to the interface diff --git a/src/engine/platform/su.cpp b/src/engine/platform/su.cpp index 9425f8787..af0e253ae 100644 --- a/src/engine/platform/su.cpp +++ b/src/engine/platform/su.cpp @@ -67,6 +67,22 @@ void DivPlatformSoundUnit::writeControlUpper(int ch) { void DivPlatformSoundUnit::tick(bool sysTick) { for (int i=0; i<8; i++) { chan[i].std.next(); + if (sysTick) { + if (chan[i].pw_slide!=0) { + chan[i].virtual_duty-=chan[i].pw_slide; + chan[i].virtual_duty=CLAMP(chan[i].virtual_duty,0,0xfff); + chan[i].duty=chan[i].virtual_duty>>5; + + chWrite(i,0x08,chan[i].duty); + } + if (chan[i].cutoff_slide!=0) { + chan[i].cutoff+=chan[i].cutoff_slide*4; + chan[i].cutoff=CLAMP(chan[i].cutoff,0,0x3fff); + + chWrite(i,0x06,chan[i].cutoff&0xff); + chWrite(i,0x07,chan[i].cutoff>>8); + } + } if (chan[i].std.vol.had) { DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SU); if (ins->type==DIV_INS_AMIGA) { @@ -86,6 +102,7 @@ void DivPlatformSoundUnit::tick(bool sysTick) { } if (chan[i].std.duty.had) { chan[i].duty=chan[i].std.duty.val; + chan[i].virtual_duty=(unsigned short)chan[i].duty<<5; chWrite(i,0x08,chan[i].duty); } if (chan[i].std.wave.had) { @@ -351,6 +368,7 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) { break; case DIV_CMD_STD_NOISE_MODE: chan[c.chan].duty=c.value&127; + chan[c.chan].virtual_duty=(unsigned short)chan[c.chan].duty << 5; chWrite(c.chan,0x08,chan[c.chan].duty); break; case DIV_CMD_C64_RESONANCE: @@ -498,6 +516,12 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) { if (!chan[c.chan].inPorta && c.value && !parent->song.brokenPortaArp && chan[c.chan].std.arp.will && !NEW_ARP_STRAT) chan[c.chan].baseFreq=NOTE_SU(c.chan,chan[c.chan].note); chan[c.chan].inPorta=c.value; break; + case DIV_CMD_C64_PW_SLIDE: + chan[c.chan].pw_slide=c.value*c.value2; + break; + case DIV_CMD_C64_CUTOFF_SLIDE: + chan[c.chan].cutoff_slide=c.value*c.value2; + break; case DIV_CMD_GET_VOLMAX: return 127; break; @@ -564,6 +588,11 @@ void DivPlatformSoundUnit::reset() { for (int i=0; i<8; i++) { chan[i]=DivPlatformSoundUnit::Channel(); chan[i].std.setEngine(parent); + + chan[i].cutoff_slide=0; + chan[i].pw_slide=0; + + chan[i].virtual_duty=0x800; // for some reason duty by default is 50% } if (dumpWrites) { addWrite(0xffffffff,0); diff --git a/src/engine/platform/su.h b/src/engine/platform/su.h index 0456f42f7..7f6eef16f 100644 --- a/src/engine/platform/su.h +++ b/src/engine/platform/su.h @@ -38,6 +38,9 @@ class DivPlatformSoundUnit: public DivDispatch { signed short wave; unsigned short hwSeqPos; short hwSeqDelay; + short cutoff_slide; + short pw_slide; + short virtual_duty; Channel(): SharedChannel(127), cutoff(16383), @@ -71,7 +74,10 @@ class DivPlatformSoundUnit: public DivDispatch { syncTimer(0), wave(0), hwSeqPos(0), - hwSeqDelay(0) {} + hwSeqDelay(0), + cutoff_slide(0), + pw_slide(0), + virtual_duty(0) {} }; Channel chan[8]; DivDispatchOscBuffer* oscBuf[8]; diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index c886c9e87..89207ce54 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -265,8 +265,47 @@ const char* cmdName[]={ "BIFURCATOR_PARAMETER", "FDS_MOD_AUTO", + + "FM_OPMASK", - "FM_OPMASK" + "MULTIPCM_MIX_FM", + "MULTIPCM_MIX_PCM", + "MULTIPCM_LFO", + "MULTIPCM_VIB", + "MULTIPCM_AM", + "MULTIPCM_AR", + "MULTIPCM_D1R", + "MULTIPCM_DL", + "MULTIPCM_D2R", + "MULTIPCM_RR", + "MULTIPCM_RC", + "MULTIPCM_DAMP", + "MULTIPCM_PSEUDO_REVERB", + "MULTIPCM_LFO_RESET", + "MULTIPCM_LEVEL_DIRECT", + + "SID3_SPECIAL_WAVE", + "SID3_RING_MOD_SRC", + "SID3_HARD_SYNC_SRC", + "SID3_PHASE_MOD_SRC", + "SID3_WAVE_MIX", + "SID3_LFSR_FEEDBACK_BITS", + "SID3_1_BIT_NOISE", + "SID3_FILTER_DISTORTION", + "SID3_FILTER_OUTPUT_VOLUME", + "SID3_CHANNEL_INVERSION", + "SID3_FILTER_CONNECTION", + "SID3_FILTER_MATRIX", + "SID3_FILTER_ENABLE", + + "C64_PW_SLIDE", + "C64_CUTOFF_SLIDE", + + "SID3_PHASE_RESET", + "SID3_NOISE_PHASE_RESET", + "SID3_ENVELOPE_RESET", + "SID3_CUTOFF_SCALING", + "SID3_RESONANCE_SCALING" }; static_assert((sizeof(cmdName)/sizeof(void*))==DIV_CMD_MAX,"update cmdName!"); @@ -536,7 +575,7 @@ void DivEngine::processRow(int i, bool afterDelay) { bool comparison=(song.delayBehavior==1)?(effectVal<=nextSpeed):(effectVal<(nextSpeed*(curSubSong->timeBase+1))); if (song.delayBehavior==2) comparison=true; if (comparison) { - chan[i].rowDelay=effectVal+1; + chan[i].rowDelay=effectVal; chan[i].delayOrder=whatOrder; chan[i].delayRow=whatRow; if (effectVal==nextSpeed) { @@ -1580,6 +1619,19 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) { if (--subticks<=0) { subticks=tickMult; + // apply delayed rows before potentially advancing to a new row, which would overwrite the + // delayed row's state before it has a chance to do anything. a typical example would be + // a delay scheduling a note-on to be simultaneous with the next row, and the next row also + // containing a delayed note. if we don't apply the delayed row first, + for (int i=0; i0) { + if (--chan[i].rowDelay==0) { + processRow(i,true); + } + } + } + if (stepPlay!=1) { tempoAccum+=(skipping && virtualTempoN=virtualTempoD) { @@ -1610,15 +1662,9 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) { // under no circumstances shall the accumulator become this large if (tempoAccum>1023) tempoAccum=1023; } + // process stuff if (!shallStop) for (int i=0; i0) { - if (--chan[i].rowDelay==0) { - processRow(i,true); - } - } - // retrigger if (chan[i].retrigSpeed) { if (--chan[i].retrigTick<0) { @@ -1632,6 +1678,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) { if (!song.noSlidesOnFirstTick || !firstTick) { if (chan[i].volSpeed!=0) { chan[i].volume=(chan[i].volume&0xff)|(dispatchCmd(DivCommand(DIV_CMD_GET_VOLUME,i))<<8); + int preSpeedVol=chan[i].volume; chan[i].volume+=chan[i].volSpeed; if (chan[i].volSpeedTarget!=-1) { bool atTarget=false; @@ -1645,7 +1692,11 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) { } if (atTarget) { - chan[i].volume=chan[i].volSpeedTarget; + if (chan[i].volSpeed>0) { + chan[i].volume=MAX(preSpeedVol,chan[i].volSpeedTarget); + } else if (chan[i].volSpeed<0) { + chan[i].volume=MIN(preSpeedVol,chan[i].volSpeedTarget); + } chan[i].volSpeed=0; chan[i].volSpeedTarget=-1; dispatchCmd(DivCommand(DIV_CMD_HINT_VOLUME,i,chan[i].volume>>8)); diff --git a/src/engine/sample.cpp b/src/engine/sample.cpp index 020e0dec7..e51558190 100644 --- a/src/engine/sample.cpp +++ b/src/engine/sample.cpp @@ -285,6 +285,9 @@ int DivSample::getSampleOffset(int offset, int length, DivSampleDepth depth) { case DIV_SAMPLE_DEPTH_IMA_ADPCM: off=(offset+1)/2; break; + case DIV_SAMPLE_DEPTH_12BIT: + off=((offset*3)+1)/2; + break; case DIV_SAMPLE_DEPTH_16BIT: off=offset*2; break; @@ -348,6 +351,10 @@ int DivSample::getSampleOffset(int offset, int length, DivSampleDepth depth) { off=(offset+1)/2; len=(length+1)/2; break; + case DIV_SAMPLE_DEPTH_12BIT: + off=((offset*3)+1)/2; + len=((length*3)+1)/2; + break; case DIV_SAMPLE_DEPTH_16BIT: off=offset*2; len=length*2; @@ -409,6 +416,9 @@ int DivSample::getEndPosition(DivSampleDepth depth) { case DIV_SAMPLE_DEPTH_IMA_ADPCM: off=lengthIMA; break; + case DIV_SAMPLE_DEPTH_12BIT: + off=length12; + break; case DIV_SAMPLE_DEPTH_16BIT: off=length16; break; @@ -606,6 +616,12 @@ bool DivSample::initInternal(DivSampleDepth d, int count) { dataIMA=new unsigned char[lengthIMA]; memset(dataIMA,0,lengthIMA); break; + case DIV_SAMPLE_DEPTH_12BIT: // 12-bit PCM (MultiPCM) + if (data12!=NULL) delete[] data12; + length12=((count*3)+1)/2; + data12=new unsigned char[length12]; + memset(data12,0,length12); + break; case DIV_SAMPLE_DEPTH_16BIT: // 16-bit if (data16!=NULL) delete[] data16; length16=count*2; @@ -1293,6 +1309,14 @@ void DivSample::render(unsigned int formatMask) { case DIV_SAMPLE_DEPTH_IMA_ADPCM: // IMA ADPCM if (adpcm_decode_block(data16,dataIMA,lengthIMA,samples)==0) logE("oh crap!"); break; + case DIV_SAMPLE_DEPTH_12BIT: // 12-bit PCM (MultiPCM) + for (unsigned int i=0, j=0; i>8; + data12[j+1]=((data16[i+0]>>4)&0xf)|(i+1>4)&0xf:0); + if (i+1>8; + } + } + } } void* DivSample::getCurBuf() { @@ -1512,6 +1546,8 @@ void* DivSample::getCurBuf() { return dataC219; case DIV_SAMPLE_DEPTH_IMA_ADPCM: return dataIMA; + case DIV_SAMPLE_DEPTH_12BIT: + return data12; case DIV_SAMPLE_DEPTH_16BIT: return data16; default: @@ -1548,6 +1584,8 @@ unsigned int DivSample::getCurBufLen() { return lengthC219; case DIV_SAMPLE_DEPTH_IMA_ADPCM: return lengthIMA; + case DIV_SAMPLE_DEPTH_12BIT: + return length12; case DIV_SAMPLE_DEPTH_16BIT: return length16; default: @@ -1662,4 +1700,5 @@ DivSample::~DivSample() { if (dataMuLaw) delete[] dataMuLaw; if (dataC219) delete[] dataC219; if (dataIMA) delete[] dataIMA; + if (data12) delete[] data12; } diff --git a/src/engine/sample.h b/src/engine/sample.h index 5fc593d23..c585c7e32 100644 --- a/src/engine/sample.h +++ b/src/engine/sample.h @@ -47,6 +47,7 @@ enum DivSampleDepth: unsigned char { DIV_SAMPLE_DEPTH_MULAW=11, DIV_SAMPLE_DEPTH_C219=12, DIV_SAMPLE_DEPTH_IMA_ADPCM=13, + DIV_SAMPLE_DEPTH_12BIT=14, DIV_SAMPLE_DEPTH_16BIT=16, DIV_SAMPLE_DEPTH_MAX // boundary for sample depth }; @@ -118,6 +119,7 @@ struct DivSample { // - 11: 8-bit µ-law PCM // - 12: C219 "µ-law" PCM // - 13: IMA ADPCM + // - 14: 12-bit PCM (MultiPCM) // - 16: 16-bit PCM DivSampleDepth depth; bool loop, brrEmphasis, brrNoFilter, dither; @@ -144,8 +146,9 @@ struct DivSample { unsigned char* dataMuLaw; // 11 unsigned char* dataC219; // 12 unsigned char* dataIMA; // 13 + unsigned char* data12; // 14 - unsigned int length8, length16, length1, lengthDPCM, lengthZ, lengthQSoundA, lengthA, lengthB, lengthK, lengthBRR, lengthVOX, lengthMuLaw, lengthC219, lengthIMA; + unsigned int length8, length16, length1, lengthDPCM, lengthZ, lengthQSoundA, lengthA, lengthB, lengthK, lengthBRR, lengthVOX, lengthMuLaw, lengthC219, lengthIMA, length12; unsigned int samples; @@ -356,6 +359,7 @@ struct DivSample { dataMuLaw(NULL), dataC219(NULL), dataIMA(NULL), + data12(NULL), length8(0), length16(0), length1(0), @@ -370,6 +374,7 @@ struct DivSample { lengthMuLaw(0), lengthC219(0), lengthIMA(0), + length12(0), samples(0) { for (int i=0; i, effectValAnd<1>}}, }; + EffectHandlerMap fmOPL4PostEffectHandlerMap(fmOPLPostEffectHandlerMap); + fmOPL4PostEffectHandlerMap.insert({ + {0x1e, {DIV_CMD_MULTIPCM_MIX_FM, _("1Exy: FM global level (x: left, y: right; 0 to 7)"), effectVal}}, + {0x1f, {DIV_CMD_MULTIPCM_MIX_PCM, _("1Fxy: PCM global level (x: left, y: right; 0 to 7)"), effectVal}}, + {0x20, {DIV_CMD_MULTIPCM_LFO, _("20xx: PCM LFO Rate (0 to 7)"), effectValAnd<7>}}, + {0x21, {DIV_CMD_MULTIPCM_VIB, _("21xx: PCM LFO PM Depth (0 to 7)"), effectValAnd<7>}}, + {0x22, {DIV_CMD_MULTIPCM_AM, _("22xx: PCM LFO AM Depth (0 to 7)"), effectValAnd<7>}}, + {0x23, {DIV_CMD_MULTIPCM_AR, _("23xx: PCM Attack Rate (0 to 15)"), effectValAnd<15>}}, + {0x24, {DIV_CMD_MULTIPCM_D1R, _("24xx: PCM Decay 1 Rate (0 to 15)"), effectValAnd<15>}}, + {0x25, {DIV_CMD_MULTIPCM_DL, _("25xx: PCM Decay Level (0 to 15)"), effectValAnd<15>}}, + {0x26, {DIV_CMD_MULTIPCM_D2R, _("26xx: PCM Decay 2 Rate (0 to 15)"), effectValAnd<15>}}, + {0x27, {DIV_CMD_MULTIPCM_RR, _("27xx: PCM Release Rate (0 to 15)"), effectValAnd<15>}}, + {0x28, {DIV_CMD_MULTIPCM_RC, _("28xx: PCM Rate Correction (0 to 15)"), effectValAnd<15>}}, + {0x2c, {DIV_CMD_MULTIPCM_DAMP, _("2Cxx: PCM Damp"), effectValAnd<1>}}, + {0x2d, {DIV_CMD_MULTIPCM_PSEUDO_REVERB, _("2Dxx: PCM Pseudo Reverb"), effectValAnd<1>}}, + {0x2e, {DIV_CMD_MULTIPCM_LFO_RESET, _("2Exx: PCM LFO Reset"), effectValAnd<1>}}, + {0x2f, {DIV_CMD_MULTIPCM_LEVEL_DIRECT, _("2Fxx: PCM Level Direct"), effectValAnd<1>}}, + }); + EffectHandlerMap c64PostEffectHandlerMap={ {0x10, {DIV_CMD_WAVE, _("10xx: Set waveform (bit 0: triangle; bit 1: saw; bit 2: pulse; bit 3: noise)")}}, {0x11, {DIV_CMD_C64_CUTOFF, _("11xx: Set coarse cutoff (not recommended; use 4xxx instead)")}}, @@ -615,6 +634,12 @@ void DivEngine::registerSystems() { {0x1e, {DIV_CMD_C64_EXTENDED, _("1Exy: Change other parameters (LEGACY)")}}, {0x20, {DIV_CMD_C64_AD, _("20xy: Set attack/decay (x: attack; y: decay)")}}, {0x21, {DIV_CMD_C64_SR, _("21xy: Set sustain/release (x: sustain; y: release)")}}, + + {0x22, {DIV_CMD_C64_PW_SLIDE, _("22xx: Pulse width slide up"), effectVal, constVal<1>}}, + {0x23, {DIV_CMD_C64_PW_SLIDE, _("23xx: Pulse width slide down"), effectVal, constVal<-1>}}, + + {0x24, {DIV_CMD_C64_CUTOFF_SLIDE, _("24xx: Filter cutoff slide up"), effectVal, constVal<1>}}, + {0x25, {DIV_CMD_C64_CUTOFF_SLIDE, _("25xx: Filter cutoff slide down"), effectVal, constVal<-1>}}, }; const EffectHandler c64FineDutyHandler(DIV_CMD_C64_FINE_DUTY, _("3xxx: Set pulse width (0 to FFF)"), effectValLong<12>); const EffectHandler c64FineCutoffHandler(DIV_CMD_C64_FINE_CUTOFF, _("4xxx: Set cutoff (0 to 7FF)"), effectValLong<11>); @@ -687,12 +712,97 @@ void DivEngine::registerSystems() { {0x14, {DIV_CMD_C64_FILTER_RESET, _("14xy: Reset cutoff (x: on new note; y: now)")}}, {0x15, {DIV_CMD_C64_DUTY_RESET, _("15xy: Reset pulse width (x: on new note; y: now)")}}, {0x16, {DIV_CMD_C64_EXTENDED, _("16xy: Change other parameters")}}, + + {0x17, {DIV_CMD_C64_PW_SLIDE, _("17xx: Pulse width slide up"), effectVal, constVal<1>}}, + {0x18, {DIV_CMD_C64_PW_SLIDE, _("18xx: Pulse width slide down"), effectVal, constVal<-1>}}, + + {0x19, {DIV_CMD_C64_CUTOFF_SLIDE, _("19xx: Filter cutoff slide up"), effectVal, constVal<1>}}, + {0x1A, {DIV_CMD_C64_CUTOFF_SLIDE, _("1Axx: Filter cutoff slide down"), effectVal, constVal<-1>}}, }; const EffectHandler SID2FineDutyHandler(DIV_CMD_C64_FINE_DUTY, _("3xxx: Set pulse width (0 to FFF)"), effectValLong<12>); const EffectHandler SID2FineCutoffHandler(DIV_CMD_C64_FINE_CUTOFF, _("4xxx: Set cutoff (0 to FFF)"), effectValLong<11>); for (int i=0; i<16; i++) SID2PostEffectHandlerMap.emplace(0x30+i,SID2FineDutyHandler); for (int i=0; i<16; i++) SID2PostEffectHandlerMap.emplace(0x40+i,SID2FineCutoffHandler); + EffectHandlerMap SID3PostEffectHandlerMap={ + {0x60, {DIV_CMD_WAVE, _("60xx: Set waveform (bit 0: triangle; bit 1: saw; bit 2: pulse; bit 3: noise; bit 4: special wave)")}}, + {0x61, {DIV_CMD_SID3_SPECIAL_WAVE, _("61xx: Set special wave (00-39)")}}, + {0x62, {DIV_CMD_C64_EXTENDED, _("62xx: Modulation control (bit 0: ring mod; bit 1: osc. sync; bit 2: phase mod)")}}, + {0x63, {DIV_CMD_C64_DUTY_RESET, _("63xy: Reset pulse width (x: on new note; y: now)")}}, + + {0x64, {DIV_CMD_SID3_RING_MOD_SRC, _("64xx: Set ring modulation source channel (0-7)")}}, + {0x65, {DIV_CMD_SID3_HARD_SYNC_SRC, _("65xx: Set hard sync source channel (0-6)")}}, + {0x66, {DIV_CMD_SID3_PHASE_MOD_SRC, _("66xx: Set phase modulation source channel (0-6)")}}, + + {0x67, {DIV_CMD_FM_AR, _("67xx: Set attack")}}, + {0x68, {DIV_CMD_FM_DR, _("68xx: Set decay")}}, + {0x69, {DIV_CMD_FM_SL, _("69xx: Set sustain level")}}, + {0x6A, {DIV_CMD_FM_D2R, _("6Axx: Set sustain rate")}}, + {0x6B, {DIV_CMD_FM_RR, _("6Bxx: Set release")}}, + + {0x6C, {DIV_CMD_SID3_WAVE_MIX, _("6Cxx: Set wave mix mode (0-4)")}}, + + {0x6D, {DIV_CMD_SID3_LFSR_FEEDBACK_BITS, _("6Dxx: Set noise LFSR feedback bits (low byte)"), effectVal, constVal<0>}}, + {0x6E, {DIV_CMD_SID3_LFSR_FEEDBACK_BITS, _("6Exx: Set noise LFSR feedback bits (medium byte)"), effectVal, constVal<1>}}, + {0x6F, {DIV_CMD_SID3_LFSR_FEEDBACK_BITS, _("6Fxx: Set noise LFSR feedback bits (higher byte)"), effectVal, constVal<2>}}, + {0x70, {DIV_CMD_SID3_LFSR_FEEDBACK_BITS, _("70xx: Set noise LFSR feedback bits (highest bits, 0-3F)"), effectVal, constVal<3>}}, + + {0x71, {DIV_CMD_C64_RESONANCE, _("71xx: Set filter 1 resonance"), effectVal, constVal<0>}}, + {0x72, {DIV_CMD_C64_RESONANCE, _("72xx: Set filter 2 resonance"), effectVal, constVal<1>}}, + {0x73, {DIV_CMD_C64_RESONANCE, _("73xx: Set filter 3 resonance"), effectVal, constVal<2>}}, + {0x74, {DIV_CMD_C64_RESONANCE, _("74xx: Set filter 4 resonance"), effectVal, constVal<3>}}, + + {0x75, {DIV_CMD_SID3_1_BIT_NOISE, _("75xx: Set noise mode (0: usual noise, 1: 1-bit noise (PCM mode on wave channel))")}}, + + {0x76, {DIV_CMD_SID3_FILTER_OUTPUT_VOLUME, _("76xx: Set filter 1 output volume"), effectVal, constVal<0>}}, + {0x77, {DIV_CMD_SID3_FILTER_OUTPUT_VOLUME, _("77xx: Set filter 2 output volume"), effectVal, constVal<1>}}, + {0x78, {DIV_CMD_SID3_FILTER_OUTPUT_VOLUME, _("78xx: Set filter 3 output volume"), effectVal, constVal<2>}}, + {0x79, {DIV_CMD_SID3_FILTER_OUTPUT_VOLUME, _("79xx: Set filter 4 output volume"), effectVal, constVal<3>}}, + + {0x7A, {DIV_CMD_SID3_FILTER_DISTORTION, _("7Axx: Set filter 1 distortion"), effectVal, constVal<0>}}, + {0x7B, {DIV_CMD_SID3_FILTER_DISTORTION, _("7Bxx: Set filter 2 distortion"), effectVal, constVal<1>}}, + {0x7C, {DIV_CMD_SID3_FILTER_DISTORTION, _("7Cxx: Set filter 3 distortion"), effectVal, constVal<2>}}, + {0x7D, {DIV_CMD_SID3_FILTER_DISTORTION, _("7Dxx: Set filter 4 distortion"), effectVal, constVal<3>}}, + + {0x7E, {DIV_CMD_FM_FB, _("7Exx: Set feedback")}}, + {0x7F, {DIV_CMD_SID3_CHANNEL_INVERSION, _("7Fxx: Set channel signal inversion (bit 0: right channel, bit 1: left channel)")}}, + + {0xA0, {DIV_CMD_C64_FILTER_MODE, _("A0xy: Set filter mode (x: filter (0-3); y: bit 0: low pass; bit 1: band pass; bit 2: high pass)")}}, + {0xA1, {DIV_CMD_SID3_FILTER_CONNECTION, _("A1xy: Set filter connection (x: filter (0-3); y: bit 0: connect to channel input; bit 1: connect to channel output)")}}, + {0xA2, {DIV_CMD_SID3_FILTER_MATRIX, _("A2xy: Set filter connection matrix (x: filter (0-3); y: bits 0-3: add filter 1-4 output to filter's input)")}}, + {0xA3, {DIV_CMD_SID3_FILTER_ENABLE, _("A3xy: Enable filter (x: filter (0-3); y: enable)")}}, + + {0xA4, {DIV_CMD_C64_PW_SLIDE, _("A4xx: Pulse width slide up"), effectVal, constVal<1>}}, + {0xA5, {DIV_CMD_C64_PW_SLIDE, _("A5xx: Pulse width slide down"), effectVal, constVal<-1>}}, + + {0xA6, {DIV_CMD_C64_CUTOFF_SLIDE, _("A6xx: Filter 1 cutoff slide up"), effectVal, constVal<1>}}, + {0xA7, {DIV_CMD_C64_CUTOFF_SLIDE, _("A7xx: Filter 1 cutoff slide down"), effectVal, constVal<-1>}}, + {0xA8, {DIV_CMD_C64_CUTOFF_SLIDE, _("A8xx: Filter 2 cutoff slide up"), effectVal, constVal<2>}}, + {0xA9, {DIV_CMD_C64_CUTOFF_SLIDE, _("A9xx: Filter 2 cutoff slide down"), effectVal, constVal<-2>}}, + {0xAA, {DIV_CMD_C64_CUTOFF_SLIDE, _("AAxx: Filter 3 cutoff slide up"), effectVal, constVal<3>}}, + {0xAB, {DIV_CMD_C64_CUTOFF_SLIDE, _("ABxx: Filter 3 cutoff slide down"), effectVal, constVal<-3>}}, + {0xAC, {DIV_CMD_C64_CUTOFF_SLIDE, _("ACxx: Filter 4 cutoff slide up"), effectVal, constVal<4>}}, + {0xAD, {DIV_CMD_C64_CUTOFF_SLIDE, _("ADxx: Filter 4 cutoff slide down"), effectVal, constVal<-4>}}, + + {0xAE, {DIV_CMD_SID3_PHASE_RESET, _("AExx: Phase reset on tick xx")}}, + {0xAF, {DIV_CMD_SID3_NOISE_PHASE_RESET, _("AFxx: Noise phase reset on tick xx")}}, + {0xB0, {DIV_CMD_SID3_ENVELOPE_RESET, _("B0xx: Envelope reset on tick xx")}}, + + {0xB1, {DIV_CMD_SID3_CUTOFF_SCALING, _("B1xy: Cutoff scaling control (x: filter (0-3); y: bit 0: enable scaling; bit 1: invert scaling)")}}, + {0xB2, {DIV_CMD_SID3_RESONANCE_SCALING, _("B2xy: Resonance scaling control (x: filter (0-3); y: bit 0: enable scaling; bit 1: invert scaling)")}}, + }; + + const EffectHandler SID3FineDutyHandler(DIV_CMD_C64_FINE_DUTY, _("5xxx: Set pulse width (0 to FFF)"), effectValLong<12>); + const EffectHandler SID3FineCutoffHandler1(DIV_CMD_C64_FINE_CUTOFF, _("1xxx: Set cutoff of filter 1 (0 to FFF)"), effectValLong<12>, constVal<0>); + const EffectHandler SID3FineCutoffHandler2(DIV_CMD_C64_FINE_CUTOFF, _("2xxx: Set cutoff of filter 2 (0 to FFF)"), effectValLong<12>, constVal<1>); + const EffectHandler SID3FineCutoffHandler3(DIV_CMD_C64_FINE_CUTOFF, _("3xxx: Set cutoff of filter 3 (0 to FFF)"), effectValLong<12>, constVal<2>); + const EffectHandler SID3FineCutoffHandler4(DIV_CMD_C64_FINE_CUTOFF, _("4xxx: Set cutoff of filter 4 (0 to FFF)"), effectValLong<12>, constVal<3>); + for (int i=0; i<16; i++) SID3PostEffectHandlerMap.emplace(0x50+i,SID3FineDutyHandler); + for (int i=0; i<16; i++) SID3PostEffectHandlerMap.emplace(0x10+i,SID3FineCutoffHandler1); + for (int i=0; i<16; i++) SID3PostEffectHandlerMap.emplace(0x20+i,SID3FineCutoffHandler2); + for (int i=0; i<16; i++) SID3PostEffectHandlerMap.emplace(0x30+i,SID3FineCutoffHandler3); + for (int i=0; i<16; i++) SID3PostEffectHandlerMap.emplace(0x40+i,SID3FineCutoffHandler4); + // SysDefs // this chip uses YMZ ADPCM, but the emulator uses ADPCM-B because I got it wrong back then. @@ -1481,7 +1591,7 @@ void DivEngine::registerSystems() { sysDefs[DIV_SYSTEM_OPLL_DRUMS]=new DivSysDef( _("Yamaha YM2413 (OPLL) with drums"), NULL, 0xa7, 0, 11, true, false, 0x150, false, 0, 0, 0, - _("the OPLL chips but with drums mode turned on."), + _("the OPLL chip but with drums mode turned on."), {_("FM 1"), _("FM 2"), _("FM 3"), _("FM 4"), _("FM 5"), _("FM 6"), _("Kick"), _("Snare"), _("Tom"), _("Top"), _("HiHat")}, {"F1", "F2", "F3", "F4", "F5", "F6", "BD", "SD", "TM", "TP", "HH"}, {DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_FM, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE}, @@ -1618,24 +1728,28 @@ void DivEngine::registerSystems() { ); // to Grauw: feel free to change this to 24 during development of OPL4's PCM part. - // TODO: add 12-bit and 16-bit big-endian sample formats sysDefs[DIV_SYSTEM_OPL4]=new DivSysDef( - _("Yamaha YMF278B (OPL4)"), NULL, 0xae, 0, 42, true, true, 0, false, (1U<, effectVal}}, {0x21, {DIV_CMD_SU_SWEEP_ENABLE, _("21xx: Toggle volume sweep (bit 0-4: speed; bit 5: direction is up; bit 6: loop; bit 7: alternate)"), constVal<1>, effectVal}}, {0x22, {DIV_CMD_SU_SWEEP_ENABLE, _("22xx: Toggle cutoff sweep (bit 0-6: speed; bit 7: direction is up)"), constVal<2>, effectVal}}, + + {0x23, {DIV_CMD_C64_PW_SLIDE, _("23xx: Pulse width slide up"), effectVal, constVal<1>}}, + {0x24, {DIV_CMD_C64_PW_SLIDE, _("24xx: Pulse width slide down"), effectVal, constVal<-1>}}, + + {0x25, {DIV_CMD_C64_CUTOFF_SLIDE, _("25xx: Filter cutoff slide up"), effectVal, constVal<1>}}, + {0x26, {DIV_CMD_C64_CUTOFF_SLIDE, _("26xx: Filter cutoff slide down"), effectVal, constVal<-1>}}, }; const EffectHandler suCutoffHandler(DIV_CMD_C64_FINE_CUTOFF, _("4xxx: Set cutoff (0 to FFF)"), effectValLong<12>); for (int i=0; i<16; i++) { @@ -1919,7 +2039,7 @@ void DivEngine::registerSystems() { ); sysDefs[DIV_SYSTEM_SUPERVISION]=new DivSysDef( - _("Watara Supervision"), NULL, 0xe3, 0, 4, false, true, 0, false, 0, 0, 0, + _("Watara Supervision"), NULL, 0xe3, 0, 4, false, true, 0, false, 1U<writeC(0); } break; + case DIV_SYSTEM_OPL4: + case DIV_SYSTEM_OPL4_DRUMS: + // disable envelope + for (int i=0; i<6; i++) { + w->writeC(0xd0); + w->writeC(0x00|baseAddr2); + w->writeC(0x80+i); + w->writeC(0x0f); + w->writeC(0xd0); + w->writeC(0x00|baseAddr2); + w->writeC(0x88+i); + w->writeC(0x0f); + w->writeC(0xd0); + w->writeC(0x00|baseAddr2); + w->writeC(0x90+i); + w->writeC(0x0f); + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0x80+i); + w->writeC(0x0f); + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0x88+i); + w->writeC(0x0f); + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0x90+i); + w->writeC(0x0f); + } + for (int i=0; i<24; i++) { + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0x80+i); + w->writeC(0x00); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0x98+i); + w->writeC(0x00); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0xb0+i); + w->writeC(0x00); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0xc8+i); + w->writeC(0x00); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0xe0+i); + w->writeC(0x00); + } + // key off + freq reset + for (int i=0; i<9; i++) { + w->writeC(0xd0); + w->writeC(0x00|baseAddr2); + w->writeC(0xa0+i); + w->writeC(0); + w->writeC(0xd0); + w->writeC(0x00|baseAddr2); + w->writeC(0xb0+i); + w->writeC(0); + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0xa0+i); + w->writeC(0); + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0xb0+i); + w->writeC(0); + } + for (int i=0; i<24; i++) { + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0x20+i); + w->writeC(0); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0x38+i); + w->writeC(0); + w->writeC(0xd0); + w->writeC(0x02|baseAddr2); + w->writeC(0x68+i); + w->writeC(8); + } + // reset 4-op + w->writeC(0xd0); + w->writeC(0x01|baseAddr2); + w->writeC(0x04); + w->writeC(0x00); + break; default: break; } @@ -1096,6 +1186,13 @@ void DivEngine::performVGMWrite(SafeWriter* w, DivSystem sys, DivRegWrite& write w->writeS_BE(baseAddr2S|(write.addr&0x1ff)); w->writeC(write.val&0xff); break; + case DIV_SYSTEM_OPL4: + case DIV_SYSTEM_OPL4_DRUMS: + w->writeC(0xd0); + w->writeC(((write.addr>>8)&0x7f)|baseAddr2); + w->writeC(write.addr&0xff); + w->writeC(write.val); + break; default: logW("write not handled!"); break; @@ -1276,6 +1373,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p DivDispatch* writeC140[2]={NULL,NULL}; DivDispatch* writeC219[2]={NULL,NULL}; DivDispatch* writeNES[2]={NULL,NULL}; + DivDispatch* writePCM_OPL4[2]={NULL,NULL}; int writeNESIndex[2]={0,0}; @@ -1874,6 +1972,22 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p howManyChips++; } break; + case DIV_SYSTEM_OPL4: + case DIV_SYSTEM_OPL4_DRUMS: + if (!hasOPL4) { + hasOPL4=disCont[i].dispatch->chipClock; + CHIP_VOL(13,1.0); + willExport[i]=true; + writePCM_OPL4[0]=disCont[i].dispatch; + } else if (!(hasOPL4&0x40000000)) { + isSecond[i]=true; + CHIP_VOL_SECOND(13,1.0); + willExport[i]=true; + writePCM_OPL4[1]=disCont[i].dispatch; + hasOPL4|=0x40000000; + howManyChips++; + } + break; default: break; } @@ -2209,6 +2323,16 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p w->write(sampleMem,sampleMemLen); delete[] sampleMem; } + // PCM (OPL4) + if (writePCM_OPL4[i]!=NULL && writePCM_OPL4[i]->getSampleMemUsage(0)>0) { + w->writeC(0x67); + w->writeC(0x66); + w->writeC(0x84); + w->writeI((writePCM_OPL4[i]->getSampleMemUsage(0)+8)|(i*0x80000000)); + w->writeI(writePCM_OPL4[i]->getSampleMemCapacity(0)); + w->writeI(0); + w->write(writePCM_OPL4[i]->getSampleMem(0),writePCM_OPL4[i]->getSampleMemUsage(0)); + } } for (int i=0; i<2; i++) { diff --git a/src/gui/about.cpp b/src/gui/about.cpp index 66d229006..29f8ece10 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -300,6 +300,9 @@ const char* aboutLine[]={ _N("PowerNoise emulator by scratchminer"), _N("ep128emu by Istvan Varga"), _N("NDS sound emulator by cam900"), + _N("openMSX YMF278 emulator (modified version) by the openMSX developers"), + _N("SID2 emulator by LTVA (modification of reSID emulator)"), + _N("SID3 emulator by LTVA"), "", _N("greetings to:"), "floxy!", @@ -343,14 +346,8 @@ void FurnaceGUI::drawAbout() { float r=0; float g=0; float b=0; - float peakMix=settings.partyTime?0:0.3; - if (settings.partyTime) { - for (int j=0; jgetAudioDescGot().outChans; j++) { - peakMix+=peak[j]; - } - peakMix/=e->getAudioDescGot().outChans; - } - ImGui::ColorConvertHSVtoRGB(aboutHue,1.0,0.25+MIN(0.75f,peakMix*0.75f),r,g,b); + float peakMix=0.3; + ImGui::ColorConvertHSVtoRGB(aboutHue,1.0,0.475,r,g,b); dl->AddRectFilled(ImVec2(0,0),ImVec2(canvasW,canvasH),0xff000000); bool skip=false; bool skip2=false; diff --git a/src/gui/font_furicon.cpp b/src/gui/font_furicon.cpp index 06671a9ef..5357f39c0 100644 --- a/src/gui/font_furicon.cpp +++ b/src/gui/font_furicon.cpp @@ -1,1261 +1,1296 @@ #include "fonts.h" const unsigned char furIcons_compressed_data[]={ -0x78,0xda,0xed,0xbd,0x07,0x7c,0x5c,0xc5,0xb5,0x3f,0x3e,0x73, -0xef,0x36,0x6d,0xef,0xab,0x6d,0x5a,0x6d,0xd7,0xf6,0xbe,0xab, -0x55,0x5f,0x59,0x96,0xd5,0xdc,0x64,0xc9,0x96,0x65,0xc9,0x96, -0x5c,0xe5,0x6e,0xdc,0x30,0x60,0xe3,0x0a,0xa1,0x98,0x1a,0xc2, -0x23,0x14,0x9b,0x1a,0x42,0x4b,0xc0,0xf4,0xf2,0x92,0x3c,0x5e, -0xa8,0x21,0x90,0x5f,0x2a,0x69,0x04,0x48,0x79,0x79,0x79,0x90, -0xf0,0xf8,0x93,0x84,0x60,0xef,0xd5,0xff,0xcc,0xbd,0x77,0xd5, -0x0d,0x36,0x21,0xbf,0xe4,0xff,0xff,0xb0,0xed,0xce,0xbd,0x3b, -0x7b,0xcf,0x9d,0xb9,0x67,0xce,0x7c,0xbf,0x67,0xce,0xcc,0x22, -0x8c,0x10,0x52,0xa2,0x03,0x88,0x46,0x43,0xad,0xad,0x3d,0x73, -0xef,0xf8,0x6a,0x5f,0x0a,0xa1,0x2f,0x7c,0x0b,0x8e,0xda,0xe6, -0xb4,0xcc,0x6e,0x45,0x06,0xa4,0x87,0xfd,0x3b,0xc9,0xfe,0xfc, -0x45,0xb1,0xe4,0xd1,0x8f,0xba,0xbf,0x84,0x10,0x1e,0x81,0xfd, -0xc5,0xab,0x36,0x0f,0x6f,0xfb,0xc1,0xdc,0xd7,0xbe,0x8b,0x10, -0x75,0x2b,0xbc,0x2b,0x57,0xed,0xde,0x59,0x89,0x6a,0x05,0x5b, -0x11,0x12,0x90,0xdf,0x0b,0xd6,0x0d,0xef,0xd8,0x36,0x3a,0x0a, -0x67,0x46,0x5f,0xb8,0x19,0xf6,0x25,0xeb,0x36,0x9d,0xb7,0xf6, -0xc4,0x57,0xee,0xee,0x45,0x48,0x08,0xfb,0x17,0xfc,0x7e,0x64, -0xcd,0xf0,0x6a,0xef,0xfb,0xd5,0x4b,0xe0,0xbb,0x77,0xe0,0x9d, -0x1d,0x81,0x03,0x65,0x87,0x44,0x42,0x38,0xbf,0x07,0xf6,0x3d, -0x23,0x9b,0x77,0xee,0x49,0xd4,0x5b,0x6d,0xb0,0x4f,0xce,0xf7, -0xc6,0xa6,0xad,0xab,0x86,0x0d,0x8e,0x8c,0x1a,0x4e,0xfd,0x6d, -0xd8,0x7f,0x7d,0xf3,0xf0,0x9e,0x6d,0xe8,0x09,0x1a,0x7e,0x8b, -0xdb,0x60,0xbf,0x72,0xcb,0xf0,0xe6,0x35,0x87,0x7e,0xfd,0xb2, -0x13,0xa1,0x83,0x47,0xe0,0xd8,0xef,0xb6,0x6d,0xdd,0xb1,0xd3, -0x20,0xda,0x1b,0x41,0xe8,0xf0,0x26,0xf8,0x4d,0x1c,0x91,0xb2, -0xc2,0xfb,0xd9,0xbd,0xef,0x77,0xad,0x50,0xd5,0xfd,0x19,0xc9, -0xc4,0x88,0x3c,0xde,0x2c,0x8e,0x1e,0x27,0xdb,0xb7,0x7b,0xde, -0xdb,0x71,0xea,0x00,0x33,0x22,0x46,0xc2,0x37,0xc9,0xf5,0x22, -0x0a,0x71,0x0f,0xf8,0x8d,0x08,0x8d,0x42,0x42,0x8c,0x4e,0x1d, -0x20,0x9f,0xec,0x99,0x26,0x3e,0x04,0xec,0x91,0x8d,0xf4,0xd3, -0x48,0xc6,0xee,0x53,0xec,0xaf,0xc8,0xb1,0x26,0x14,0xe5,0xce, -0x21,0x46,0xf8,0x6a,0x04,0x65,0x13,0x1c,0x15,0xfc,0x0e,0xf6, -0x3f,0xe2,0xb6,0xf4,0x00,0x5a,0x8a,0x5f,0x23,0x3f,0x10,0x96, -0x8d,0x9d,0x0d,0xab,0x27,0x9c,0xba,0x75,0xd7,0xf6,0x1e,0x38, -0x4b,0xe5,0x5b,0xc3,0xdc,0x35,0x88,0x38,0xe1,0xfc,0x15,0xc0, -0xb5,0xd4,0xf2,0x5b,0xf6,0x7d,0xea,0x00,0x55,0x86,0xae,0x81, -0x44,0x37,0xaa,0x04,0xc9,0x77,0xa1,0x0c,0xea,0x44,0x01,0x74, -0x0d,0xde,0x8c,0xf6,0x40,0x89,0x86,0xd0,0x1c,0xd4,0x8d,0x4d, -0x48,0x8a,0x3a,0xd0,0x55,0x38,0x89,0xac,0x68,0x3e,0x8a,0xc2, -0x2f,0x5e,0xc6,0xe5,0x38,0x8b,0xee,0x81,0xef,0xaa,0x50,0x0a, -0xcf,0x45,0x70,0x45,0x90,0x87,0x46,0x2e,0xbc,0x17,0x9f,0x8f, -0xf2,0x28,0x8f,0xfd,0xf8,0x55,0xa4,0x43,0x5d,0x78,0x07,0x72, -0xa1,0x39,0xb0,0x27,0x43,0x17,0xa1,0x47,0x61,0x7f,0x19,0x8a, -0xe2,0x4e,0x34,0xc0,0x3e,0x83,0xf0,0x5e,0x04,0xef,0x4e,0xb4, -0x1c,0xb6,0x2f,0xa2,0x01,0xbc,0x18,0x47,0xd1,0x46,0x54,0x81, -0x5a,0xd9,0xe7,0x3e,0xfe,0xd9,0x8a,0x66,0xc3,0xb9,0x6e,0x9d, -0xf4,0x5c,0x05,0xcf,0xe3,0xe8,0x5e,0x5c,0x0b,0xd7,0xf1,0x33, -0xa8,0xc5,0x10,0xfa,0x0a,0x48,0x20,0x0f,0x9a,0x7f,0xdb,0xf8, -0x82,0x5b,0x60,0x0f,0xb3,0xfb,0x02,0xc4,0xb0,0xf7,0x89,0xbb, -0x53,0x95,0x6f,0x7e,0xf0,0xd6,0xf0,0xe8,0x28,0x9b,0x7a,0xef, -0x2d,0x34,0x3a,0x3a,0xfa,0xeb,0xd2,0xdd,0x83,0x4a,0x53,0xb2, -0x77,0x49,0x08,0x29,0x31,0xe4,0x2f,0x83,0xd2,0xc9,0x90,0x1c, -0x29,0xe0,0xb8,0x0a,0xa9,0x91,0x06,0x69,0xe1,0x8a,0xf4,0xa0, -0xed,0x46,0x64,0x42,0xe5,0xc8,0x8c,0x2c,0x50,0x37,0x36,0x64, -0x87,0x6b,0x77,0x40,0x4d,0x3a,0xa1,0xd4,0x6e,0xe4,0x41,0x5e, -0xe4,0x43,0x7e,0x54,0x05,0x35,0x1a,0x84,0x2b,0x0c,0xa3,0x08, -0xd4,0x71,0x0c,0xc5,0x51,0x02,0x25,0x51,0x0a,0xa5,0xa1,0xb6, -0xb3,0x28,0x87,0xaa,0xa1,0xc6,0x6a,0xe0,0xbe,0xd4,0xa1,0x7a, -0xd4,0x80,0x1a,0xe1,0xee,0x15,0x50,0x33,0x9a,0x85,0x5a,0xa0, -0xdc,0xad,0x70,0x07,0xda,0x50,0x3b,0xd4,0x7f,0x27,0xea,0x42, -0x73,0xd1,0x3c,0xb8,0x03,0x0b,0xd0,0x42,0xb8,0x5f,0x8b,0x50, -0x0f,0xea,0x45,0x8b,0xd1,0x12,0xd4,0x87,0x96,0xa2,0x7e,0xb4, -0x0c,0x6a,0x72,0x10,0x6a,0x72,0x05,0xdc,0xb5,0x61,0xb4,0x12, -0xea,0x67,0x35,0x5a,0x83,0xd6,0xa2,0x75,0x68,0x04,0xad,0x47, -0x1b,0xa0,0x60,0xa2,0x71,0x45,0xc4,0x14,0xaf,0x75,0x13,0x1f, -0x98,0xab,0xb8,0xff,0x5f,0x3f,0x58,0x7b,0x03,0x77,0x82,0x7b, -0xd6,0xa1,0x23,0xe8,0x79,0xc1,0x6a,0xa1,0x47,0xf8,0x6d,0xd1, -0x0f,0xc5,0x7d,0xe2,0x3f,0x48,0x5e,0x2d,0x4b,0x97,0xed,0x96, -0x3e,0x28,0x65,0x64,0x97,0xc8,0xfe,0x28,0x8f,0xca,0x7f,0xa7, -0xd8,0xa0,0x78,0x5d,0xb9,0x5a,0xf9,0xb2,0xea,0x4e,0x75,0xbf, -0xfa,0x19,0xcd,0x85,0x9a,0xe7,0xb5,0xd7,0xea,0xe4,0xba,0xa3, -0xba,0xd7,0xf5,0x37,0x18,0xda,0x8c,0xd5,0x26,0xad,0xe9,0x80, -0xb5,0xc2,0xfa,0x35,0x5b,0xda,0xf6,0x2d,0xfb,0x1f,0x1c,0x12, -0xc7,0x33,0x95,0x07,0x9c,0x69,0xe7,0x65,0xce,0x53,0xae,0x8b, -0xdd,0x2f,0xfa,0x83,0xfe,0x97,0xab,0x1e,0x0c,0x74,0x07,0x9e, -0x0f,0x4a,0x83,0xdf,0x08,0xdd,0x19,0xfa,0x20,0x6a,0x8c,0xb6, -0x44,0x47,0xa2,0x57,0xc6,0xde,0x8b,0xcb,0xe3,0x1b,0xe2,0xdf, -0x4f,0x54,0x24,0x16,0x27,0xee,0x4f,0xbc,0x91,0x78,0x27,0xf9, -0x54,0x6a,0x75,0xea,0xf9,0x74,0x53,0xfa,0x99,0x4c,0x4d,0xe6, -0xb1,0xcc,0x1b,0x59,0x4b,0xb6,0x39,0x7b,0x75,0xf6,0x37,0x39, -0x5b,0xee,0x68,0xee,0x58,0xee,0x44,0xee,0xf9,0xdc,0xcf,0x72, -0x7f,0xac,0xa6,0xaa,0xf5,0xd5,0x1d,0xd5,0x7b,0xab,0x7f,0x97, -0xf7,0xe4,0xb7,0xe5,0x3f,0xa8,0xd9,0x5e,0x7b,0x7b,0xdd,0x37, -0xea,0xa3,0xf5,0x1f,0xc0,0xfd,0x84,0xb6,0x4d,0x19,0x04,0xf7, -0xc2,0x6d,0x14,0xa3,0xe8,0x43,0x18,0xc5,0xea,0x4e,0x88,0x05, -0xe8,0xdd,0xe4,0x43,0x22,0xe1,0x2f,0xea,0x4e,0xd0,0x14,0x24, -0xd1,0x43,0x34,0x39,0x2c,0x24,0x87,0x4f,0x88,0x45,0xf8,0x54, -0xdd,0x09,0x4c,0x8e,0xa7,0x34,0x4e,0x8d,0xd7,0xa9,0x71,0xd6, -0xe2,0x9f,0x31,0xc3,0x78,0x35,0x73,0xb3,0xe0,0xde,0x93,0x8b, -0x6b,0x05,0x69,0xa2,0x27,0xa7,0x0e,0x8c,0xfe,0x99,0x3e,0xc0, -0x6a,0x08,0x28,0x88,0xd0,0xe9,0x75,0x16,0x53,0xc2,0x1b,0xff, -0xf6,0xb0,0x18,0xc9,0x88,0xfd,0xa2,0xc1,0x22,0xa8,0x04,0x7f, -0xa5,0x8b,0xd0,0x06,0xbc,0xa0,0xdf,0x08,0xc7,0x9d,0x49,0xa3, -0x41,0xaf,0xc4,0x62,0x91,0xd8,0x60,0x34,0x19,0x4d,0x15,0xd8, -0xa0,0x87,0xb4,0x12,0xbb,0x9d,0x39,0x67,0x32,0x5b,0x8f,0xd3, -0x3e,0xb7,0x33,0x93,0xe2,0x52,0x21,0x4c,0x49,0xf1,0xbf,0xef, -0xbb,0xd2,0x91,0xa8,0xac,0xac,0xa8,0xf0,0x7a,0x2b,0x1d,0x21, -0x9d,0xde,0xe5,0x5e,0x51,0xcd,0x98,0x6e,0xc7,0xe5,0x8d,0x6d, -0x6d,0x8d,0xcc,0xef,0x4f,0xd5,0x37,0x37,0xd7,0x9f,0xa2,0x8b, -0x57,0x9c,0x5b,0x3d,0x3f,0xa9,0x90,0xd3,0x12,0x4a,0xa1,0xb0, -0xd9,0xfa,0x1a,0xeb,0xb2,0x19,0xbf,0x3f,0x7c,0x79,0x73,0x43, -0xa2,0xa1,0xf9,0x92,0x86,0x7c,0xb4,0xa6,0x81,0x6d,0xfd,0xd7, -0xa0,0x55,0xa2,0xad,0xf4,0x3d,0xd0,0x56,0x4d,0xd0,0xee,0x90, -0x37,0xee,0x8f,0x3b,0xe3,0xe2,0xb8,0x3b,0xab,0xcd,0xa5,0x8c, -0x5a,0x13,0x8e,0xbb,0x45,0xe2,0x78,0xca,0x87,0xe3,0x1a,0xe4, -0x8f,0xa7,0xe2,0x3a,0xee,0x2d,0xa2,0xc4,0x9a,0x38,0xf5,0x87, -0x2e,0xe6,0x85,0xf6,0xcb,0x62,0xdf,0x8c,0xdd,0x07,0x6f,0xe6, -0x0a,0x51,0x5d,0xfd,0x5f,0xeb,0xa8,0x23,0xcc,0x5f,0x4d,0x37, -0xbd,0x22,0xf8,0xce,0x75,0xb9,0x57,0xed,0xab,0x7e,0xfd,0xeb, -0xa3,0x54,0xf4,0xe8,0xd1,0xe2,0xf7,0x8f,0x52,0x2f,0x3d,0xf9, -0xe4,0x93,0xc5,0xf7,0x70,0x07,0xfe,0x61,0x15,0x73,0x39,0xde, -0x35,0xcc,0xdc,0x98,0x64,0x1e,0x2e,0x59,0xa1,0xfb,0xc4,0x88, -0x1e,0xa6,0xfb,0xe8,0xa3,0xf4,0x53,0x08,0xe5,0x7c,0x94,0x3f, -0x15,0xb7,0x53,0x26,0xbb,0xc0,0x64,0xa7,0xa7,0xbd,0x04,0x9f, -0xea,0xc8,0x3f,0x25,0xdb,0x99,0xfe,0xb0,0x02,0x9b,0x52,0x0d, -0x38,0xc7,0xd7,0x39,0xbf,0x57,0x4f,0x4f,0x78,0x09,0x26,0xef, -0x9e,0xe1,0x91,0x7f,0x4a,0xb6,0x4f,0xf3,0x43,0xa2,0x50,0x6e, -0xb8,0xed,0x51,0xec,0x77,0x93,0xb6,0x40,0x89,0x85,0x2e,0x9f, -0x1f,0x2a,0xa1,0x02,0xa7,0x92,0x99,0xb4,0x8f,0x7c,0xe1,0xf3, -0xfb,0x32,0xe9,0x6c,0x2a,0x69,0x34,0x41,0x8e,0x28,0x76,0xbb, -0x44,0x06,0x3d,0xdb,0x60,0xb8,0x97,0x41,0x2f,0xf2,0xc2,0x6f, -0xdd,0x2e,0x92,0xd1,0xef,0x4b,0xe7,0xb2,0xb9,0x06,0xf8,0x31, -0xe4,0xe0,0x32,0xdb,0xb1,0xde,0x98,0x4a,0xe6,0x1a,0xa8,0x7a, -0xec,0xce,0xa4,0x34,0xee,0x2b,0xcb,0x97,0x97,0x8f,0xe0,0xcf, -0xf4,0x21,0x50,0x0a,0xe4,0x02,0x25,0xad,0xcc,0x2b,0x2f,0x50, -0xe5,0x95,0xb4,0x8a,0x56,0xd0,0x4a,0xc1,0x67,0x2b,0x62,0x75, -0xf9,0x4a,0xf3,0xf9,0xca,0x1a,0x72,0x72,0x39,0x9c,0x5c,0x55, -0xa7,0xa2,0xde,0xeb,0xdc,0xe2,0x97,0xc5,0xe4,0xf6,0xb9,0x89, -0x73,0x83,0xe9,0x32,0x8f,0xb4,0x3f,0x14,0xdc,0xb6,0xa6,0x6d, -0x95,0x07,0x8e,0x59,0x9a,0x12,0xb9,0x9c,0xd1,0x98,0x28,0xf3, -0x94,0xc5,0x5b,0x0c,0x46,0xdd,0x4e,0x6a,0x96,0xbc,0x6c,0x7e, -0x5b,0x3a,0x1c,0x72,0x56,0xea,0xb4,0x5a,0xad,0xcb,0xb5,0xa2, -0xbe,0x3f,0x57,0x5d,0xb1,0x48,0xd3,0x5a,0xd7,0xb6,0x60,0x41, -0x5b,0x85,0xc5,0xe2,0x37,0xee,0xfd,0x55,0xff,0xe3,0xdb,0xf0, -0x37,0xb6,0xe1,0xcf,0x1f,0xff,0x82,0x0f,0xcb,0x88,0xd9,0xbc, -0xce,0xdc,0x82,0xd5,0x2d,0x2d,0xcc,0x7b,0x2d,0x90,0x34,0x8f, -0x58,0x3e,0xaf,0x95,0x7f,0xc5,0xc7,0x36,0xa6,0x79,0xdb,0x6c, -0xac,0x9b,0x6d,0x81,0x7b,0xb4,0xce,0x32,0x9b,0x79,0x77,0xb6, -0xac,0x3a,0x2b,0x0b,0xca,0x02,0xe1,0xcd,0xe1,0x98,0x82,0x12, -0x53,0x86,0x70,0x64,0xe1,0xc0,0x70,0x22,0x2d,0x0d,0xc8,0xbc, -0x9e,0x48,0x3a,0x68,0x34,0xc8,0x29,0x09,0x25,0x73,0x98,0x4c, -0x8d,0x81,0x35,0x23,0x5b,0xe2,0x0d,0x3a,0x5d,0x30,0xd0,0xdc, -0xfc,0x44,0x73,0x73,0x30,0x58,0xe5,0xf7,0xcd,0x49,0x24,0xf2, -0x03,0xdd,0x77,0x76,0x0f,0x48,0xca,0x9c,0x89,0x8a,0xda,0x25, -0xcc,0x31,0x42,0x4c,0xba,0x47,0x29,0xd1,0xd7,0x84,0x16,0x40, -0xd5,0x1e,0x40,0xc7,0xed,0x80,0x75,0xf7,0x00,0xe7,0x44,0x60, -0x3e,0x33,0x69,0x30,0x76,0xb9,0x94,0x88,0x45,0x13,0xe2,0x14, -0x31,0x86,0x80,0x34,0x44,0xfe,0x24,0x20,0x09,0xb7,0x0b,0xcc, -0x21,0x4d,0xfa,0x59,0xe8,0x6f,0x8c,0xa6,0x54,0x96,0xed,0x7b, -0xc0,0xec,0x3a,0xdd,0x1a,0x27,0xd8,0x4c,0xc8,0x27,0xd6,0xb9, -0x89,0x35,0xce,0x95,0x90,0x87,0x01,0xbb,0x88,0x19,0x4e,0x43, -0xd6,0x5c,0x96,0xb5,0xab,0xa2,0x89,0x86,0x35,0x0b,0xa6,0x1a, -0x0c,0xb3,0x50,0x03,0x19,0x35,0x38,0x83,0x6f,0xdf,0xb8,0x59, -0xad,0xaa,0x99,0x9f,0xb8,0xac,0x36,0x18,0xac,0xb0,0x7b,0xcb, -0xe4,0x9a,0x39,0x89,0x85,0x2b,0xb6,0x6c,0xd8,0xbc,0x79,0x93, -0xc3,0x79,0xd8,0xb9,0x51,0xb7,0x40,0xaf,0x54,0xca,0x95,0x4a, -0xfd,0x3c,0xfd,0x7a,0xe7,0xe1,0x4a,0x7c,0xd5,0x1a,0x5c,0xb6, -0x38,0x1c,0xca,0xd7,0x1c,0x38,0x47,0xb2,0xd8,0xb4,0xe7,0x26, -0x8f,0xcf,0xe7,0xb9,0x89,0x7a,0xa0,0x66,0xd0,0xe5,0x74,0xbb, -0x9d,0xae,0x68,0xb4,0x76,0x71,0x2a,0xe5,0x50,0xb4,0x6b,0x1b, -0x32,0x2d,0x5d,0x5d,0x2d,0xd9,0x66,0xad,0xaa,0x5a,0x59,0xb9, -0x9e,0xf9,0x0d,0xae,0x62,0xb6,0x33,0xaf,0x17,0x8f,0xec,0xaf, -0xab,0xaf,0xdb,0x3a,0xe4,0x8a,0x04,0xaa,0x02,0x55,0x8b,0x93, -0xb1,0xc4,0x86,0x75,0x1b,0xce,0xed,0x3d,0xd7,0x7c,0x2e,0xbc, -0xe8,0xf2,0x6d,0xf8,0x9b,0x5b,0x5b,0x99,0xff,0x6a,0x9d,0x37, -0x7f,0xfe,0xbc,0x56,0x6c,0x6e,0xdd,0xca,0x14,0xb6,0x51,0xc7, -0x52,0xe9,0xa1,0xb9,0x43,0x1a,0xe6,0xbf,0x74,0x2f,0x65,0x7b, -0x7d,0xc1,0x86,0xa0,0xef,0x0d,0xe6,0x4a,0x7f,0x30,0x78,0xe4, -0xb1,0x23,0xc1,0xa0,0x5e,0xef,0xf5,0x76,0x88,0x03,0xf9,0xe4, -0x8a,0xee,0xdb,0x16,0x2d,0xcf,0xd6,0x4a,0x9c,0x65,0x1d,0xf3, -0x4e,0x30,0x69,0xac,0x3e,0xc4,0x5c,0x8b,0xbf,0xcb,0xfc,0xe9, -0x10,0xc7,0x4e,0x2b,0xd1,0x7d,0xa2,0x37,0xe9,0x61,0xe0,0x3c, -0x06,0x60,0x1e,0x3b,0x01,0xbd,0xc4,0x35,0x04,0xd3,0xe9,0x45, -0x21,0x6c,0xc6,0x63,0xb8,0x0d,0x73,0xdd,0x19,0x20,0x3c,0x38, -0xc4,0x77,0x68,0x51,0x9c,0x49,0x37,0x50,0x6c,0x55,0xf2,0x3d, -0x9a,0x18,0xba,0x34,0xa3,0x03,0x93,0xce,0x4c,0x49,0x71,0xbd, -0x59,0x94,0xe2,0x32,0x4d,0xe9,0xc6,0x48,0xe7,0xc6,0x77,0x64, -0x4e,0x5c,0x39,0xb8,0x76,0xed,0xe0,0x23,0x0f,0x04,0xa3,0xb1, -0xc0,0x03,0xd4,0x2f,0x7b,0x77,0x07,0xe5,0x49,0x85,0x3b,0x14, -0xca,0x16,0x0a,0xd1,0x5a,0xa9,0x5f,0xba,0x72,0xa5,0xb3,0x7e, -0x71,0xb6,0xab,0x3a,0x57,0xa5,0x48,0x2a,0x2c,0x9d,0xd5,0xf9, -0xca,0xca,0x74,0xae,0x6e,0xf5,0x60,0x65,0x63,0x3f,0xf5,0x4b, -0x81,0x74,0x79,0x57,0xdd,0xda,0x8e,0x40,0x70,0xee,0xa6,0xe6, -0xfe,0x7d,0xee,0xa5,0xba,0x85,0xf5,0x0b,0x86,0x87,0x17,0x54, -0xda,0xec,0x46,0xa3,0xf9,0xb2,0xff,0x67,0xc5,0xe3,0xd4,0xb1, -0xcd,0x4f,0x6e,0x66,0xfe,0x8c,0x37,0x84,0xaa,0xa2,0x81,0x50, -0xf1,0xb1,0xfa,0x34,0x74,0x2c,0x21,0xa3,0xa9,0x26,0xe1,0x8f, -0xca,0x41,0x8b,0xb5,0x03,0x0b,0xc3,0x6d,0x09,0xab,0xd5,0x92, -0x94,0x45,0x64,0xce,0x80,0xa9,0x3c,0x1c,0x0c,0xc8,0xe4,0xba, -0xc1,0x05,0xb1,0xb9,0x39,0xfb,0x39,0x89,0xa6,0xc8,0x92,0x43, -0x3d,0x3d,0x07,0xfb,0xa2,0x0b,0xe6,0xa4,0x63,0xb5,0x6b,0x07, -0xb7,0x0c,0xae,0x2d,0x93,0xa8,0x55,0xb1,0xca,0xf4,0x20,0x73, -0x13,0xb0,0xc6,0x28,0xd4,0xdf,0xf7,0xa1,0xfe,0xb4,0xc0,0x06, -0x83,0x28,0x8d,0x5b,0x01,0x83,0x96,0x14,0xad,0x01,0x27,0x2b, -0x28,0xa8,0x09,0x3f,0x57,0x8b,0x5c,0xe1,0x85,0xac,0x82,0x4e, -0xa9,0x5e,0x21,0x51,0x55,0xbb,0xd8,0x64,0x57,0x99,0xec,0xca, -0xd2,0x4b,0x55,0xfa,0xc4,0x1a,0xb7,0xa6,0x04,0xac,0xea,0x85, -0xfe,0x7a,0x95,0xbf,0x5e,0x59,0x7a,0x8d,0xa5,0x05,0x1a,0xa8, -0x4b,0x1f,0x85,0x53,0x75,0x43,0x6e,0x97,0x1b,0x5e,0x2b,0xce, -0x1f,0x6a,0x71,0xbb,0x5b,0x86,0xeb,0xda,0xe6,0xcf,0xbf,0x7a, -0xfe,0x7c,0xfc,0x2b,0x56,0x41,0x97,0x2c,0xbe,0xe3,0x46,0x2f, -0x3c,0x6e,0xa4,0x56,0x49,0x5c,0x65,0xf2,0x52,0x63,0x5f,0xb9, -0xcb,0x79,0x91,0x4b,0xe2,0x96,0x28,0xc6,0x0e,0xec,0x76,0x5e, -0x74,0x7f,0x49,0x99,0xaa,0xaa,0x7a,0x60,0xdb,0xe3,0xef,0x1f, -0xec,0xbe,0xbd,0x7b,0x90,0xfd,0x98,0x4f,0xd4,0xef,0x3f,0xd6, -0x31,0xff,0x8b,0xd7,0x7b,0x83,0xf5,0x01,0xdf,0x09,0xc3,0x22, -0xc3,0x3f,0xd5,0x5c,0x51,0x0c,0xb4,0x88,0x59,0xcc,0x07,0xb3, -0xfe,0xe9,0x17,0x82,0xaf,0x2e,0xae,0x9c,0x85,0xe5,0x5c,0xfb, -0xba,0x0b,0xf5,0x88,0x96,0xd1,0x4f,0x00,0x57,0x6a,0x03,0x16, -0xbf,0x9c,0x30,0x94,0xb1,0x76,0xc1,0x9b,0xa2,0x71,0x40,0x38, -0xd6,0x38,0xe0,0x49,0x5a,0x87,0x53,0xe3,0xc6,0x2c,0xbf,0x62, -0x4d,0xa0,0xa1,0x82,0x22,0x96,0x4d,0xac,0xa4,0x80,0x5b,0x91, -0x6c,0xa0,0x3b,0x7e,0x50,0x9e,0x09,0xec,0xea,0xb7,0x02,0xe5, -0xce,0xa1,0x8e,0x03,0x03,0xe9,0x4c,0x3c,0x3e,0x6b,0xd6,0xa2, -0x73,0x6e,0x0e,0x69,0x3b,0xb4,0xe5,0x6b,0xe6,0xae,0x3a,0xef, -0xbc,0x55,0x55,0x1e,0x8f,0xd5,0xaa,0x56,0xdf,0x8f,0x63,0xe7, -0x62,0x11,0xde,0xbe,0xfe,0x5c,0xab,0xde,0x90,0xb6,0x58,0xea, -0x33,0x1a,0x9d,0x46,0x9d,0x9f,0x1f,0x63,0x46,0xbe,0xf0,0xdf, -0x99,0x0a,0x78,0x64,0xfe,0xfb,0xfb,0xa9,0x5c,0x2e,0xf5,0xfd, -0xb7,0xeb,0x17,0x54,0x6f,0xbe,0x7d,0xc3,0xc8,0xed,0xd5,0x39, -0x9b,0x6d,0xd5,0x52,0x59,0x48,0x56,0xdb,0xbe,0x7f,0xd7,0x25, -0xbb,0xf6,0x4b,0x65,0x3a,0xbd,0xbd,0xc2,0x5f,0xd8,0xc5,0x14, -0xe8,0xd6,0xdd,0x2b,0x63,0xcd,0x06,0x83,0x9e,0x16,0x63,0x63, -0xcc,0xe3,0xcd,0x24,0xc3,0x91,0x82,0x77,0x97,0xd5,0x96,0x0a, -0xa4,0xad,0xb6,0x73,0x52,0x40,0xc7,0x52,0x50,0x0f,0x42,0x94, -0x81,0x76,0xf2,0x1d,0x68,0x27,0x0e,0xd4,0x0a,0x36,0x7e,0x08, -0xad,0x65,0xdb,0xc9,0x4c,0xb6,0x81,0xb5,0xc4,0x60,0xf5,0xc1, -0x68,0x62,0x16,0x32,0x43,0x3b,0xe2,0xba,0x01,0xf2,0x84,0xcc, -0x0d,0x74,0x0a,0xda,0x95,0x61,0x5a,0xc3,0xca,0x38,0x33,0xa4, -0x17,0xd0,0xa4,0x0c,0x6e,0x83,0x17,0x1a,0x83,0x12,0xe3,0x79, -0x87,0xaf,0xf7,0xb5,0xaf,0x2f,0xf4,0xed,0x76,0x2e,0xd3,0xb4, -0xd5,0xce,0x5d,0xba,0x74,0x6e,0x7d,0x97,0x56,0x55,0xa3,0x74, -0xd6,0xd7,0xe1,0x53,0xd5,0x4b,0xea,0x34,0xea,0xb0,0xdb,0xdd, -0x1b,0xb8,0x3a,0x1f,0x89,0x38,0x5d,0x26,0xa3,0x82,0x12,0x60, -0x99,0xcd,0x1b,0xaf,0x0c,0xb6,0x65,0xec,0xce,0x86,0x25,0x99, -0xda,0x42,0x61,0x57,0x73,0x33,0x75,0x1b,0xf3,0x52,0xe4,0xd1, -0xe8,0x95,0xcb,0x96,0x31,0xdf,0xf8,0xb9,0xd8,0x7d,0xe5,0xfd, -0x0f,0xdd,0x43,0x2c,0xc2,0xdc,0xce,0x64,0x3c,0xbf,0x61,0x70, -0xed,0xe0,0x86,0xc6,0x44,0x99,0xbb,0xac,0x3d,0x10,0xf0,0xb4, -0xc4,0xe3,0xf5,0xed,0x07,0xb2,0xd9,0x45,0xb6,0x80,0xdf,0x57, -0x15,0x88,0x44,0xb2,0x18,0x1b,0xdc,0x56,0x95,0x2d,0x37,0x37, -0x96,0x5a,0x54,0xe7,0xec,0x6b,0xa8,0x57,0xd4,0x37,0xb0,0x1f, -0x73,0x0f,0x0f,0x76,0xe0,0x60,0x07,0x53,0xd3,0x7b,0xf8,0x75, -0xbc,0xaa,0xf6,0x5d,0x24,0x41,0x9d,0xa3,0x12,0xd1,0xa3,0x42, -0x03,0x92,0x23,0x23,0xb2,0xa1,0x2a,0x34,0x80,0x46,0xd0,0x76, -0x74,0x13,0x42,0x26,0xd6,0x26,0x4f,0xb3,0x1a,0x58,0x43,0x0a, -0x0b,0x74,0xde,0x50,0x7a,0xe2,0x4f,0xc3,0x3a,0x78,0xd2,0xe2, -0xd6,0xa5,0x74,0x34,0x97,0x56,0xe1,0x94,0x17,0x4e,0x43,0x8e, -0xb2,0xbf,0x62,0x79,0x0d,0xe4,0x27,0x76,0x88,0xfb,0x25,0x21, -0x78,0xe4,0xb6,0x68,0xdc,0x0f,0x12,0xb3,0x12,0xee,0x2b,0x99, -0x15,0xfc,0xf2,0xda,0x0f,0x2e,0xc6,0x17,0x31,0x6f,0x61,0x9a, -0x29,0x62,0xc7,0x47,0xff,0x35,0x09,0xdd,0x7b,0xcb,0x4a,0xe8, -0x5e,0x1e,0x9d,0x01,0xdd,0x57,0x97,0xb9,0xca,0xde,0x2a,0x73, -0x4b,0x56,0xbf,0x74,0xf0,0xe5,0xff,0x05,0x26,0x42,0xf8,0x47, -0xed,0x83,0xd4,0xf7,0xc8,0x6d,0x91,0x38,0xc4,0xc6,0x25,0x46, -0xc3,0x12,0x83,0xc4,0x21,0x91,0x61,0x21,0x5e,0xb9,0x47,0xdb, -0xa6,0x85,0x74,0x19,0xbc,0xb5,0x73,0xb4,0xe7,0xae,0xfc,0x90, -0x3a,0x9e,0x4e,0x3d,0xcb,0x5a,0x24,0x5f,0xa0,0x21,0xe0,0x2d, -0x3e,0x43,0x1d,0x2f,0x3e,0xdd,0x4f,0x1d,0xef,0xff,0x76,0xdf, -0x6b,0xfd,0xf4,0x92,0x7c,0x06,0x34,0x38,0x18,0xde,0x12,0x8e, -0x11,0x98,0xa2,0x8f,0x84,0x17,0x0e,0x0e,0x11,0xf0,0x22,0xf5, -0x78,0x09,0x78,0x31,0xca,0x28,0x09,0x2d,0xad,0x24,0xe0,0x65, -0xf5,0x7a,0x99,0x63,0xaf,0x03,0x5e,0x70,0x82,0x61,0xfc,0xa6, -0xa6,0xa0,0x56,0x17,0x34,0x3f,0xb8,0x5a,0xd7,0xa5,0xd7,0x75, -0xea,0x22,0x8f,0x45,0xe0,0xa5,0x6b,0xd7,0x41,0x9a,0x59,0x45, -0x1d,0xf7,0xdf,0xe2,0x37,0xf6,0x19,0xe1,0x05,0x89,0xe2,0x30, -0xdb,0xe6,0x03,0xa0,0xeb,0x3f,0xe1,0xfb,0xd4,0x1a,0xd0,0xf7, -0xd3,0xf7,0xa9,0xd3,0x3b,0x50,0xd0,0x64,0xd3,0x84,0x46,0xe0, -0x9d,0x70,0x73,0x03,0xb8,0x72,0xf9,0x9a,0xb5,0x83,0x0f,0x3f, -0x10,0x88,0x46,0x03,0x0f,0xd0,0xaa,0x23,0x5f,0x22,0xba,0xbd, -0xa4,0xb6,0xd6,0xa5,0xaa,0x57,0x81,0x7a,0xcf,0x0b,0xc3,0x63, -0x5e,0x5d,0x97,0x4e,0x59,0xa3,0x72,0xd5,0xd5,0xe3,0x08,0xfe, -0x1a,0xf3,0x4d,0xec,0x66,0x7e,0x89,0x0b,0xd3,0x7a,0x41,0xa2, -0xc1,0x4b,0x23,0x7e,0x5f,0xa7,0xc4,0x25,0x89,0xe7,0x33,0x19, -0xd0,0xe2,0x4c,0xa6,0xa4,0xc6,0x32,0xea,0xd8,0xd0,0x53,0x43, -0xdf,0x1e,0xfa,0xd7,0xf0,0xaf,0x48,0xf0,0xe6,0x51,0x4a,0xf8, -0x45,0xc0,0x88,0x2d,0xa8,0x17,0x6d,0x86,0x2b,0x3a,0x86,0xee, -0x43,0x3f,0x42,0xbf,0x86,0xab,0xe1,0x1d,0x4c,0x2e,0x02,0xe5, -0xfc,0xac,0xa1,0xc8,0x72,0xb6,0x01,0x8c,0xe4,0xb8,0x3f,0x8a, -0xb5,0x1c,0xc4,0xe4,0xfa,0x73,0xdc,0xa1,0xb1,0x5b,0x90,0xc1, -0xbc,0x91,0xc9,0xb1,0x76,0x48,0x0d,0xe8,0x92,0x10,0xec,0x74, -0x94,0x72,0x11,0x1a,0xcf,0xde,0x0c,0xc8,0x8f,0x79,0x73,0x9d, -0xe1,0x20,0x4f,0x92,0xb4,0x00,0xd6,0x2a,0x1b,0x58,0x77,0xd7, -0x14,0x43,0xa4,0x9b,0xb8,0xe3,0x65,0x2f,0xc5,0xcd,0x35,0x17, -0x68,0x9d,0x22,0x62,0xbe,0x5d,0x7e,0x72,0xbe,0x12,0xc3,0x27, -0x27,0x13,0x8f,0x95,0x84,0xfc,0x88,0xea,0x6c,0xa8,0xab,0x49, -0xc4,0x67,0x99,0xe4,0x71,0xb9,0x4a,0xa7,0x4f,0x39,0x2b,0x43, -0xb1,0x05,0x35,0x4e,0xa9,0xd4,0x13,0xb3,0xd8,0xcd,0x16,0x9d, -0xce,0xe8,0x72,0x38,0x22,0xe1,0x6c,0x6c,0x4e,0x36,0xa8,0x5a, -0x00,0x28,0x54,0xab,0x89,0xda,0x1a,0x0a,0xb3,0x1b,0xe7,0x50, -0x37,0x34,0x0c,0xd4,0x29,0x55,0x2a,0x65,0xdd,0x40,0xc3,0xbe, -0xdd,0xbb,0xf7,0xb9,0x13,0x15,0x4a,0x65,0x45,0x62,0x76,0xc2, -0x21,0x86,0x87,0x4a,0x9d,0x28,0x7e,0x58,0xbb,0xb4,0xde,0xd1, -0x51,0x97,0x6e,0xa8,0xc8,0x2d,0x1a,0x09,0x04,0xaa,0x55,0xaa, -0xc6,0x74,0x7d,0x87,0x5a,0x5d,0xd7,0x5f,0x53,0xd7,0xdc,0x7c, -0x5e,0x73,0x73,0x7d,0xae,0xb6,0x76,0x6b,0x4d,0x0d,0xdd,0x6d, -0x34,0xce,0x5e,0x1c,0xb8,0xba,0x7a,0x99,0xcb,0x19,0x51,0x40, -0x83,0x93,0x2a,0x95,0x3e,0xb0,0x8c,0x1e,0x4f,0xc6,0xae,0xd6, -0x38,0x1c,0x8b,0xb3,0xd5,0xa1,0x30,0x18,0xd0,0x77,0x6a,0x0b, -0xcd,0x35,0x60,0x27,0xbf,0x9c,0x09,0x88,0xa3,0x89,0xb0,0x4f, -0x1a,0x94,0x42,0xd5,0xd8,0xa5,0x65,0xa6,0x48,0xa1,0xaa,0xd2, -0x62,0xae,0x32,0x8b,0x04,0x22,0x85,0xc2,0xa0,0xcf,0x7b,0xc3, -0x6d,0x16,0x33,0x20,0x66,0x67,0xd8,0xd4,0xa0,0xd7,0x68,0xe4, -0x72,0x45,0x4d,0x5a,0x9c,0xce,0x0e,0x30,0x1b,0x62,0x7d,0x4d, -0x4d,0x8b,0xba,0x0b,0x4d,0x4b,0x63,0x8f,0x33,0x4f,0x3c,0x36, -0x60,0x4b,0xb5,0x87,0x77,0x85,0xdb,0xd2,0x36,0x5b,0xda,0xe3, -0x81,0x94,0xd7,0x6d,0xb1,0xd8,0x68,0x91,0x3d,0x3d,0x27,0x38, -0x6b,0xa1,0x46,0xac,0x9b,0x57,0xe3,0x6b,0x8a,0x98,0x15,0xf2, -0x48,0x65,0xa5,0xaf,0x66,0x9e,0x4e,0xac,0x59,0x38,0x2b,0xe8, -0xf6,0xa4,0xed,0x4b,0xaa,0x93,0xba,0x64,0x2e,0x07,0x1f,0xd5, -0xb8,0x26,0x1e,0x55,0x47,0xe3,0xec,0x87,0xa3,0xbd,0xd0,0xb4, -0xb1,0xd7,0x1a,0x98,0x57,0x55,0xd5,0x0f,0xf6,0x58,0xaf,0xd5, -0x5a,0x55,0x4a,0x55,0xb6,0x2b,0x9e,0x0c,0x86,0xec,0x15,0x2e, -0xad,0x0e,0xac,0xf6,0x17,0x1b,0xeb,0x94,0x75,0x0d,0x0d,0xf0, -0xd1,0xc8,0xf5,0xdb,0x7b,0xd0,0xe3,0xa2,0x4b,0xe8,0xc5,0xa0, -0xf7,0x7e,0x94,0x43,0x4d,0xc4,0xd3,0xa9,0x89,0xbb,0xd9,0x77, -0x06,0x5a,0x80,0x01,0xb4,0x3c,0x03,0xba,0x3e,0xbe,0x4f,0xbe, -0x4b,0xc1,0xd6,0x09,0x2d,0xc4,0x3d,0xb9,0x85,0x10,0xfa,0x12, -0xc5,0xf8,0xfe,0x4d,0x2f,0xe2,0x53,0x8b,0x96,0x2d,0xc3,0x9e, -0x81,0x01,0x2a,0x54,0x77,0xb2,0x66,0xab,0xef,0xcb,0xbe,0x4b, -0xe0,0xcd,0xfc,0x44,0xa8,0x2e,0xa8,0x9f,0x57,0x37,0x51,0x7f, -0x2e,0x3e,0x4b,0x35,0x0c,0x0d,0x15,0x9f,0xed,0xc3,0x7f,0xec, -0xeb,0x63,0xb4,0x7d,0x8f,0x3e,0x4a,0x5c,0x19,0x84,0x8a,0x51, -0x35,0x89,0xe7,0x12,0x89,0xe7,0x48,0x5f,0x2a,0x01,0xfb,0xf2, -0x21,0xd8,0x97,0x34,0x6a,0x00,0xeb,0xb2,0x00,0xf5,0x81,0x85, -0xf9,0x14,0xf8,0xdc,0xef,0x26,0x36,0x9f,0x5c,0x62,0xe9,0x0a, -0xa7,0x1d,0x29,0x02,0x18,0x57,0x24,0x08,0x18,0xcf,0x35,0x15, -0xa2,0x35,0xd2,0x2a,0x00,0xe3,0xae,0x3a,0x02,0xc6,0xab,0xfd, -0x2c,0x18,0xcf,0xd5,0x54,0x3a,0xd2,0xd9,0xba,0x35,0x83,0xce, -0x86,0x7e,0xea,0x7b,0xf5,0x1f,0xd5,0x6e,0xf9,0xcd,0xa5,0xbe, -0x1b,0xa0,0x44,0x02,0x4d,0x93,0xfa,0x39,0x75,0x13,0x5d,0x35, -0xfd,0xd8,0xfd,0x67,0x05,0xc1,0x65,0x8f,0x3e,0x4a,0x1d,0x9b, -0x50,0x01,0xc5,0xbf,0x4e,0x39,0xc0,0xf9,0x60,0x87,0xa0,0x4e, -0x6e,0x85,0x3a,0x31,0x80,0x95,0xea,0x24,0x76,0x8a,0x8e,0x4f, -0xe9,0xaa,0x08,0x3b,0xcc,0xcc,0x74,0xc7,0x84,0x1f,0x8f,0x43, -0x70,0xdd,0xcf,0xb7,0x41,0x07,0x23,0x0d,0xc9,0x04,0xd0,0x81, -0x40,0x6a,0xb3,0xf7,0x4b,0x5e,0xdc,0xc9,0xdd,0x47,0x7c,0x04, -0x10,0x46,0xc7,0xc8,0x8c,0x08,0x03,0x8c,0x6e,0xee,0x97,0x39, -0xff,0x4d,0x7e,0x78,0x41,0x82,0x5c,0x72,0xe9,0xb6,0xca,0x4e, -0x87,0x20,0x58,0xdd,0x9b,0x03,0xba,0xf7,0x24,0xe8,0x1e,0xe9, -0x3f,0x9c,0xd0,0x9b,0x9c,0xae,0xff,0x98,0xd8,0xf1,0x43,0xd7, -0x0c,0x78,0xd1,0xd0,0x56,0x22,0x53,0x6c,0x1f,0x41,0xe9,0xf1, -0x03,0xa5,0x2e,0x00,0x5f,0x40,0xd4,0x6f,0x6a,0x47,0xf0,0x1f, -0xbc,0xa9,0xa7,0x1a,0x38,0xcd,0x63,0x47,0xc4,0x4a,0x9c,0xbc, -0x02,0x74,0xbf,0x1e,0xcd,0x03,0xfd,0xba,0x90,0x30,0x72,0xd6, -0x4e,0xb2,0xd8,0x34,0x17,0x4f,0x81,0x51,0x13,0x71,0xa4,0xdc, -0x34,0xc6,0xca,0x09,0x29,0xc7,0x3c,0x29,0x9f,0xe0,0x12,0x3e, -0x4b,0x5a,0x3e,0x19,0x0c,0xf3,0xbc,0x9c,0x3e,0x7f,0x63,0x36, -0xa7,0x56,0xd9,0xed,0xfe,0x2a,0xa0,0xe4,0xbd,0x35,0x5a,0xad, -0x94,0x65,0xe4,0xf1,0x18,0x50,0xf2,0x9f,0x32,0x65,0x3c,0x25, -0x17,0xe8,0x84,0x72,0xa1,0x56,0x38,0x03,0x29,0xd7,0xcf,0xd5, -0x9f,0x8e,0x94,0x2b,0x6b,0x94,0x53,0x58,0x79,0xb1,0xb9,0x19, -0xe8,0x78,0x7d,0xb6,0x3a,0x1e,0x73,0x47,0xba,0x17,0x84,0x82, -0xa9,0x58,0x22,0x93,0x99,0x89,0x90,0x5b,0xd6,0x5b,0xe0,0x35, -0x9d,0x92,0x47,0x1f,0x8b,0xce,0x4c,0xc9,0x25,0x95,0x92,0xc9, -0x9c,0x1c,0x89,0xb0,0x69,0x54,0x22,0xfc,0x6f,0xc0,0x7d,0x32, -0xe8,0x63,0x23,0xa0,0xbd,0xbd,0x68,0x05,0xd4,0x37,0xab,0x9d, -0x1a,0x56,0x53,0x53,0x13,0xd2,0x5c,0x7d,0x71,0xb0,0x38,0x49, -0x3a,0x27,0x96,0x1c,0x40,0x07,0xc4,0x91,0x06,0x60,0x04,0x7e, -0xb6,0xfa,0x48,0x9f,0x57,0xea,0xbf,0x08,0xe7,0x9c,0xa6,0x3d, -0xaf,0x6c,0xc2,0x9a,0x55,0xf0,0x2e,0xaa,0x9b,0x37,0xf8,0x7c, -0x81,0x80,0xcf,0xb7,0xe1,0xf0,0x46,0xaf,0x2f,0x18,0xf4,0x79, -0x37,0x16,0x7c,0x4d,0x80,0x86,0xc1,0x42,0x1b,0x4d,0x4d,0xbe, -0xaa,0xc6,0x52,0xba,0x11,0x7f,0x30,0x09,0x83,0x00,0xe4,0x2a, -0xfe,0xc7,0x10,0xfb,0x41,0x2f,0x89,0x84,0x43,0x87,0x7a,0x7b, -0x0e,0x85,0xc2,0x11,0x92,0xba,0x87,0x24,0x86,0xad,0x66,0xb3, -0xd7,0x1b,0x5d,0x1f,0xf5,0x7a,0xcd,0x66,0xeb,0xa4,0x9d,0xc5, -0xd4,0xf1,0x2d,0x4f,0x6c,0x21,0x8a,0x18,0xae,0x8a,0x56,0x85, -0x59,0x8e,0x20,0x85,0x36,0xfc,0x17,0x96,0x4b,0xc7,0x01,0x37, -0xb5,0xa0,0x0e,0xc2,0x11,0x4a,0x0e,0x84,0x12,0x93,0x3e,0xdb, -0x62,0x6a,0x08,0x3e,0xc6,0xe1,0xe6,0x0d,0x5d,0x81,0x40,0xd7, -0x86,0xe6,0x02,0xb7,0xfd,0xb8,0x02,0x92,0x06,0xc4,0x17,0x90, -0xd2,0x6d,0xc6,0xea,0xfb,0x59,0x17,0xc0,0xa1,0xbe,0x48,0xa4, -0xef,0xd0,0x57,0x0f,0x2d,0x89,0x0c,0x59,0x2d,0x66,0xaf,0x27, -0xba,0x21,0xea,0xf1,0x9a,0x2d,0xd6,0x49,0x3b,0xbd,0xd3,0x9b, -0x57,0xf1,0xd9,0x21,0xd2,0xa6,0x3b,0xa0,0x6c,0x8f,0x41,0xd9, -0x74,0xc8,0x05,0xf7,0x78,0x2d,0xdf,0xa6,0xd9,0xfe,0xa2,0xf4, -0xd6,0xc4,0x71,0x9c,0xc0,0x01,0x8a,0x1d,0x4e,0x0b,0x61,0xae, -0x8d,0x10,0x86,0xa7,0x11,0x4e,0x36,0xef,0xfe,0x31,0xfb,0x9e, -0x9b,0x6c,0xe0,0x59,0x70,0xcf,0x19,0x78,0xd6,0x6d,0xd6,0x81, -0xef,0x60,0x5e,0xc6,0x3a,0xe6,0x5d,0xfc,0x9f,0xef,0x16,0xd2, -0xe9,0x8e,0x40,0xa0,0x23,0x9d,0x2e,0xbc,0xfb,0x6e,0xe7,0x40, -0x34,0xda,0x79,0x80,0xfa,0x05,0x67,0xde,0x3d,0x41,0x62,0xde, -0x4d,0x26,0xce,0xbe,0x6b,0x34,0xf5,0x8b,0x33,0x25,0x03,0xdf, -0x51,0x5d,0xd3,0x68,0xb1,0x10,0x03,0xaf,0x51,0x3b,0x2a,0x97, -0x3e,0xce,0x9a,0x0b,0xe6,0x17,0xd4,0x31,0x83,0xa1,0x67,0xdf, -0x57,0xf7,0xf5,0x18,0x0c,0x43,0xcb,0x97,0x6d,0x5a,0x16,0x8b, -0x31,0xae,0x8d,0x13,0xcc,0xba,0xc9,0x54,0xb2,0xeb,0x1e,0xcf, -0xb8,0x61,0x8f,0x85,0x83,0x7a,0x03,0x18,0xf6,0x81,0x85,0x31, -0xbf,0xcf,0x6a,0xb3,0x93,0x7a,0xb9,0x0a,0xf0,0xe5,0x39,0x80, -0x2f,0x0d,0xc0,0x90,0xf3,0x68,0x16,0xb1,0xdc,0x50,0x0b,0xd3, -0x0c,0x08,0x47,0x83,0x27,0x82,0xba,0xd2,0x20,0xe3,0x38,0x96, -0x1b,0xbf,0xe7,0xb7,0x33,0xef,0x5e,0x61,0x5c,0x6a,0x54,0x65, -0x65,0x42,0x55,0xb5,0x0c,0x52,0x97,0xc6,0x9e,0x8c,0xe1,0x67, -0xf1,0x8e,0x91,0x73,0xad,0x81,0xb4,0xd9,0x5c,0xe1,0xb0,0x58, -0x3d,0x6a,0x8d,0xcd,0xce,0xb3,0xde,0xba,0xba,0x12,0xe7,0x5d, -0x45,0xb7,0xce,0x66,0xde,0x99,0x9d,0x7d,0x2e,0x90,0x7b,0xd1, -0x3b,0x1b,0xeb,0x67,0x13,0x6c,0xca,0x91,0xdc,0x20,0xe1,0xb8, -0x32,0x99,0xa9,0xbc,0x9d,0x90,0xdc,0x4a,0xa7,0x77,0x57,0x0e, -0x48,0x6e,0x6e,0x9c,0xe3,0xe2,0x24,0xb4,0xe3,0x57,0x85,0x7a, -0xe4,0x43,0x29,0xc0,0x0f,0x97,0x11,0xe6,0x26,0x3c,0x4b,0x12, -0x8b,0xff,0x7e,0x44,0x4b,0xcc,0x2b,0x21,0x6a,0x3a,0x52,0x83, -0xc4,0x29,0xe4,0x24,0x5e,0x36,0xf8,0xb5,0x0f,0xce,0x47,0x08, -0x23,0xb5,0xad,0x7a,0x49,0xbd,0x5a,0x1d,0x76,0xb9,0x7b,0x83, -0x84,0xf9,0xba,0x9c,0x70,0xbb,0x08,0xc0,0xb3,0x79,0x13,0x8e, -0xd0,0x9c,0x4c,0x85,0xab,0x7e,0x49,0xa6,0xa6,0xb9,0x79,0x57, -0xa1,0x40,0xb5,0x34,0xd6,0xe6,0xc7,0x80,0xa8,0x2e,0xcd,0x03, -0x51,0x99,0xd4,0x5d,0x02,0xa2,0x6e,0x87,0x23,0x4c,0x80,0x68, -0x2e,0xa0,0x9a,0xaf,0x50,0x2a,0x35,0xda,0x88,0x1d,0x80,0x68, -0xd3,0x9c,0xe2,0x09,0x49,0x5a,0x49,0x8f,0x9c,0xf7,0x73,0x65, -0x5a,0x42,0xaf,0x3b,0x0f,0xcf,0x7a,0x46,0x62,0x4a,0x37,0x68, -0xa9,0xa6,0xde,0xc5,0x77,0xdd,0xf1,0xa1,0x17,0x20,0x57,0x5d, -0xfb,0xc1,0xc9,0x44,0x59,0xef,0xb1,0xaa,0xec,0x59,0x96,0x28, -0xbb,0x96,0x02,0x47,0xae,0x6b,0x6c,0xac,0x03,0xa2,0x8c,0xeb, -0x59,0x64,0x19,0x62,0x91,0xa5,0x5e,0x5f,0x51,0x06,0xc8,0xb2, -0x09,0x90,0xa5,0xc5,0x6f,0x16,0x09,0x45,0x72,0xa5,0xde,0x50, -0x4d,0x90,0xa5,0x45,0xa9,0x34,0x38,0x43,0xa6,0x46,0x83,0x9a, -0x47,0x96,0xa9,0xec,0x00,0xdd,0xa1,0x5e,0x65,0x65,0x10,0x75, -0x8c,0xb9,0xc2,0xba,0x4a,0x4d,0xe1,0xe2,0xca,0x7e,0xfc,0xe7, -0xf2,0xea,0x59,0x3a,0xaa,0x66,0x60,0xb0,0xf8,0x4c,0x3f,0xe0, -0x06,0x2b,0xb4,0xcb,0xdf,0x42,0xbb,0xcc,0x03,0xdb,0xde,0xcf, -0xf9,0xee,0xa6,0x35,0x34,0xdf,0x18,0x43,0x98,0x11,0x4a,0xb1, -0x9a,0xe8,0x74,0xf9,0xc6,0x10,0xfd,0x69,0xfa,0xb0,0x33,0xc8, -0x82,0xd5,0x3d,0xe7,0x06,0x15,0x49,0x39,0x07,0xb8,0xf8,0x16, -0x99,0x48,0x68,0x34,0x75,0x4b,0xb2,0x5d,0xb9,0x6a,0xbf,0x3c, -0x35,0x11,0x73,0x41,0x93,0x74,0xf4,0x53,0x81,0x23,0x5f,0xd2, -0xe9,0x3c,0xde,0x91,0xe6,0x25,0xbb,0x09,0x11,0xd4,0xb6,0xd5, -0xcc,0xeb,0xeb,0x03,0x1a,0x08,0x28,0x44,0xe5,0x3a,0xef,0x13, -0xbe,0xbe,0x7f,0x7a,0xa3,0x8d,0x46,0x27,0xb7,0x5a,0x93,0x29, -0x52,0x82,0x63,0x6c,0xab,0x05,0xe8,0x52,0x68,0x0a,0x87,0x01, -0xbc,0xb0,0xdc,0x71,0x02,0x7c,0xe9,0xfe,0x98,0xaf,0x88,0x7d, -0x9f,0x0f,0x75,0xfd,0xd0,0xb8,0xaf,0x94,0xa0,0xea,0x4f,0xe1, -0x2b,0xc5,0xce,0x0c,0xbc,0x9c,0x06,0x02,0x2b,0x70,0x4f,0xfd, -0x90,0x8b,0x78,0x3b,0x5d,0x43,0xe7,0x0d,0xb5,0x78,0x3c,0x2d, -0x43,0x75,0x6d,0xf3,0xe6,0x11,0x6f,0xe7,0x1b,0xb8,0x6c,0x49, -0x28,0xbc,0x64,0xc9,0x1d,0x5c,0xa7,0x4f,0x0f,0x31,0x05,0xdc, -0xcc,0x7c,0x17,0x7f,0x25,0xfb,0xe3,0x2c,0xee,0x3a,0x1b,0xcf, -0x66,0xf1,0x99,0x65,0xf8,0x0f,0x4b,0x97,0x75,0x33,0x4f,0x75, -0x93,0x58,0x8b,0x51,0x89,0xe8,0xfb,0xd0,0x57,0xdb,0xa0,0x8d, -0xcf,0x41,0x8b,0xd0,0x20,0xda,0x41,0xa2,0xaa,0x72,0xc0,0x82, -0x4b,0x88,0x12,0xde,0x1c,0x46,0x12,0x89,0xc1,0x8e,0x01,0xdc, -0xc1,0x53,0x2d,0xfd,0x98,0xc5,0xf7,0xf9,0x59,0x94,0x9a,0xe2, -0xf1,0x29,0xe9,0x01,0x4e,0xe7,0x7d,0x3f,0xdb,0x3e,0xff,0xaf, -0xcd,0x96,0xcd,0x9b,0x05,0x6d,0xe5,0xfd,0xfd,0xfb,0x0b,0x5f, -0x4b,0x3e,0x65,0x3c,0xec,0xbf,0x16,0xdf,0x05,0x70,0xf0,0x5b, -0x2c,0x1c,0x6c,0xc2,0xae,0x9d,0x3b,0xf6,0x5a,0x37,0x5b,0x69, -0xeb,0x26,0xeb,0x9e,0xf2,0x3b,0x23,0x27,0x3b,0x48,0xcf,0xbe, -0x66,0x79,0xc9,0xbb,0x60,0x3a,0x73,0x50,0x50,0xe8,0xac,0xf8, -0x1e,0x75,0x9c,0xb9,0x7f,0xa0,0x62,0xf3,0xe6,0xb9,0xaf,0x76, -0x32,0xbf,0x77,0xd6,0xbf,0xc5,0xbc,0x4d,0x1d,0x1f,0x7a,0x1a, -0x80,0x25,0x96,0xbc,0xf2,0x9d,0xe4,0x0b,0x49,0x78,0x05,0x98, -0xb7,0xe7,0x31,0x7f,0xa1,0x57,0x4e,0xee,0xf8,0x8b,0x8f,0x9e, -0x1d,0x6e,0xf8,0xd7,0x8b,0x41,0x11,0xa2,0x97,0x41,0x27,0xb2, -0xa0,0x13,0xc4,0x47,0x92,0x82,0xbe,0xfd,0x5a,0x82,0xde,0xa6, -0xb1,0x40,0xd6,0x4f,0xc2,0x3a,0xfa,0x79,0x26,0x99,0x8a,0xb3, -0x26,0x9a,0xd7,0x19,0x77,0x7c,0xda,0x18,0x8b,0x6f,0x22,0x85, -0x13,0xcd,0xc0,0xe0,0x08,0xd6,0x26,0xde,0x83,0x31,0x8e,0xc3, -0x33,0x1e,0x50,0x0b,0x36,0x22,0x81,0xb5,0x5d,0x6e,0xd6,0x79, -0x4c,0x7d,0x58,0x7f,0xb2,0x66,0x0b,0xd0,0x30,0x9e,0x70,0xc6, -0x13,0xcf,0xc7,0x29,0x33,0x18,0x67,0x0a,0x6c,0x34,0x31,0xd5, -0xeb,0xce,0x3b,0xb5,0x8c,0x33,0x3e,0x1c,0x1c,0x88,0xd6,0x54, -0x54,0x00,0xd9,0x23,0x23,0x2f,0x60,0x78,0xe8,0x76,0x02,0x05, -0x1c,0x95,0x25,0xae,0x87,0xaf,0xb6,0x6c,0xb0,0x6c,0x51,0x44, -0xcb,0xca,0x4d,0xb4,0xc4,0x23,0x95,0x65,0x55,0xe7,0x29,0xb3, -0x52,0x68,0xe9,0x74,0xc2,0xed,0xde,0x68,0xdb,0x62,0x3d,0x5f, -0x91,0x57,0x9b,0xcd,0x94,0xd9,0xac,0xae,0x55,0x7c,0xf8,0xd8, -0x63,0x80,0x97,0x81,0xc5,0x02,0x42,0xae,0xbd,0xee,0xba,0xeb, -0xd2,0xd6,0xd5,0xaa,0xe2,0x28,0xa8,0xcc,0x15,0xaa,0xd5,0x56, -0xb0,0xca,0xc3,0xf4,0x92,0xfa,0xb4,0x3c,0x26,0x0b,0x19,0x8d, -0x84,0x12,0xca,0x44,0x42,0x9e,0x11,0x5a,0xac,0x49,0xaa,0xe0, -0xaa,0x32,0x99,0xc2,0xc1,0xa0,0x54,0x41,0x70,0xc3,0xdc,0x6c, -0x85,0x8c,0x9c,0xab,0xf6,0xe7,0x91,0xad,0xdb,0x2a,0x6e,0x08, -0x84,0x7e,0x51,0x57,0xf7,0x8b,0x90,0xf7,0x3a,0xef,0x1b,0xb7, -0xdd,0x4e,0xce,0x9f,0xfc,0x43,0xe3,0x5a,0x78,0x34,0xfe,0x21, -0x89,0x04,0xb8,0x7c,0x54,0x29,0xfc,0xbd,0x50,0x05,0x7a,0x52, -0x03,0xc8,0x62,0x09,0x58,0x9b,0x8f,0xa9,0x7d,0x67,0xdc,0x5d, -0x72,0x84,0x42,0x4d,0x42,0x72,0xac,0x61,0xc2,0xa1,0x0a,0x16, -0x47,0x8e,0xb5,0x5a,0xca,0x3f,0xa5,0xd5,0x7e,0x57,0x9e,0x94, -0xd3,0xeb,0xf6,0xfc,0x5c,0x91,0x90,0x43,0x9f,0x47,0x37,0xee, -0x87,0x96,0x45,0x59,0x37,0x5a,0xf7,0x78,0xae,0xf1,0xb8,0x2f, -0x77,0x1f,0x30,0xaf,0x35,0x53,0x96,0x75,0x96,0x3d,0x9e,0xa3, -0x1e,0xef,0x17,0x4f,0xfe,0x14,0x50,0x37,0xc6,0xbe,0x1b,0x7d, -0xa5,0x06,0x78,0xae,0xff,0x46,0xff,0x41,0xd3,0x8a,0x72,0xa8, -0x94,0x63,0xcc,0x95,0xe5,0x2b,0x4c,0x14,0x2a,0xae,0x8c,0x9c, -0x08,0x87,0x4f,0x44,0xf2,0xbf,0xcd,0x67,0x7f,0x9e,0x0d,0xdc, -0x1d,0x80,0x57,0xf6,0x67,0xd9,0xfc,0xef,0xe8,0x00,0x8b,0x29, -0xb1,0xa4,0x05,0xab,0x66,0x25,0x5f,0x48,0x24,0x5e,0x48,0xce, -0x62,0xde,0x9f,0xc5,0xfc,0x85,0xf0,0x60,0x11,0xce,0x42,0x99, -0x5f,0x86,0x32,0xeb,0x81,0xbd,0x05,0x51,0x12,0xb5,0x22,0x62, -0x7a,0xd9,0x12,0xf3,0x23,0x09,0x70,0xe5,0x53,0x29,0x18,0xe1, -0xfd,0x25,0x45,0x2d,0xf9,0x02,0x28,0x7a,0x0a,0x7f,0xa6,0x68, -0xe7,0x44,0xc2,0x79,0xc7,0x66,0xec,0xec,0x1f,0x69,0x2e,0x94, -0x0f,0x97,0x9f,0x67,0xec,0x37,0x5e,0x74,0x3f,0x19,0xbe,0xbb, -0x9f,0x7e,0x8c,0xf0,0xfd,0x71,0x35,0x53,0xb3,0x8c,0xbf,0x78, -0xde,0x96,0x2d,0xe7,0x68,0xda,0x34,0xb2,0x90,0x54,0x20,0x0b, -0xcb,0x20,0xb5,0x65,0xdb,0x56,0x3c,0x32,0x4e,0x4e,0xdf,0xa7, -0x8e,0x6d,0x1a,0x6c,0x5b,0xa1,0x8f,0x3d,0x13,0x8b,0x3c,0x1a, -0x59,0x16,0x0a,0x44,0xab,0x42,0x3f,0x62,0xae,0x67,0xf5,0x66, -0x2b,0xcb,0xac,0x38,0xae,0x8f,0x97,0xe2,0xf9,0x78,0xfe,0x44, -0x56,0xcd,0x3c,0xc4,0x3c,0x34,0xe6,0xae,0x44,0x14,0xba,0x07, -0xf0,0xe4,0x12,0xc0,0x93,0x76,0x68,0x89,0x64,0xac,0x85,0x94, -0x54,0xc4,0xb5,0xc3,0x29,0xb7,0xcd,0x28,0xe4,0xbc,0x01,0x63, -0xc8,0x88,0x75,0x06,0xd0,0xbb,0x6f,0xf5,0x5f,0xad,0x13,0xac, -0x5e,0x7d,0x7d,0xf9,0xb3,0x99,0xd4,0x33,0xa6,0x5b,0x2b,0xf7, -0x57,0x52,0x95,0x07,0x2b,0xaf,0x37,0x7d,0x23,0x75,0x19,0x8e, -0xfc,0x8f,0xd4,0x56,0x98,0x6f,0xa4,0x17,0x7c,0xa9,0xf0,0xea, -0x2b,0xab,0x0a,0xef,0x56,0xde,0x7d,0xb7,0x1f,0xa7,0x16,0xcd, -0xc7,0x3e,0x4f,0xfa,0x7b,0x69,0x78,0x79,0x98,0x9f,0xcf,0xff, -0xc9,0x4f,0xce,0xa1,0xb6,0x57,0xb4,0xf6,0x98,0xa8,0xb6,0xdb, -0xe6,0x14,0x43,0xe7,0xa0,0xcf,0xc7,0xb9,0xff,0xd9,0xe3,0xdc, -0x22,0x5c,0x35,0x4a,0x09,0x5f,0x87,0xfa,0x57,0x41,0x9f,0x31, -0x0b,0x2d,0x46,0x3b,0xd1,0xde,0xe9,0x3e,0xbd,0x4f,0xd3,0xcf, -0xe2,0xb3,0x61,0xa8,0x25,0x37,0x0d,0xb5,0x6e,0xf3,0x0b,0xf8, -0x24,0xde,0x51,0x28,0xf5,0xad,0x87,0x36,0x72,0xbd,0xed,0xc6, -0x82,0x7f,0xbc,0x93,0xf5,0xfb,0x9b,0x8c,0x46,0x05,0x3c,0x8c, -0xc6,0xa6,0xe2,0xf7,0x0a,0x1b,0x09,0x73,0xdd,0x58,0x28,0x6d, -0x7d,0x85,0xd2,0x97,0x05,0xe8,0x8d,0x8d,0x26,0xb9,0x42,0x21, -0x37,0x19,0x1b,0xa9,0x77,0x89,0x9f,0x07,0x77,0xf1,0x9e,0xc4, -0xc7,0x23,0xa1,0xf0,0xa1,0x9e,0xde,0x83,0x61,0xd2,0xbd,0x86, -0x0f,0xde,0x73,0x28,0x1c,0x8a,0x0c,0x5b,0x78,0xce,0xea,0xf5, -0x70,0x04,0xd6,0xe3,0xe5,0x09,0xac,0x85,0xc6,0x84,0xec,0xf6, -0x1e,0x24,0x64,0x17,0x32,0x2f,0x99,0x90,0x77,0xbc,0x2b,0xe6, -0xf3,0xe2,0xdf,0x8f,0xf9,0x8c,0xc4,0x28,0xc5,0x14,0x45,0xcf, -0x0a,0xcb,0xd8,0xb1,0xab,0x3a,0x34,0x8c,0x2e,0x46,0x37,0xa3, -0xdb,0x4f,0x3f,0x72,0x75,0x46,0x4e,0x1f,0xcc,0x8f,0x41,0xc9, -0xf0,0xc7,0x8c,0x3f,0x9d,0x59,0x26,0x8d,0xde,0x08,0x7d,0x2a, -0xd8,0x70,0xc2,0xa3,0x38,0x4e,0xa6,0xe1,0x87,0xcf,0x00,0x28, -0x86,0x43,0x63,0x40,0x11,0x54,0x79,0xb9,0x93,0xa8,0xb2,0x33, -0x36,0x83,0x77,0x48,0x99,0x07,0x5d,0xa6,0xfe,0x13,0xc8,0x92, -0x4c,0xe2,0x90,0x1c,0x3a,0x24,0x26,0x63,0x51,0x02,0xbc,0x72, -0x8f,0x8e,0x1b,0x8b,0x12,0x57,0x72,0x63,0x51,0x27,0xbf,0x05, -0x59,0xe4,0x62,0x92,0x45,0x52,0x21,0x91,0x53,0x24,0x8b,0xb6, -0x9d,0x64,0x91,0x48,0x2a,0xc5,0xda,0x36,0xc8,0x82,0x57,0x57, -0x5f,0x59,0xbd,0x46,0x2e,0xcf,0xf4,0xed,0x5f,0x92,0x95,0xcb, -0xa9,0xec,0xda,0x0f,0xa6,0x8d,0x60,0x3d,0xe4,0x0f,0x81,0x96, -0x1f,0x0e,0x02,0x42,0x29,0xb9,0x8e,0x96,0x2f,0x22,0x6a,0x5e, -0x57,0xe6,0x94,0x74,0xcc,0xc7,0x5f,0xe5,0x86,0xa4,0x98,0xf7, -0xb0,0xfa,0x74,0x03,0x52,0x82,0xd1,0x4f,0xce,0x03,0x3d,0xf1, -0xbc,0x85,0x73,0xe7,0x2e,0xc4,0x27,0x98,0xe5,0x2d,0xc9,0x64, -0xc1,0xe1,0x28,0x24,0x93,0x2d,0xf8,0x76,0xf2,0x4d,0xf1,0xe9, -0x7e,0xe2,0x93,0xc4,0x73,0xa1,0xfd,0x3c,0x0c,0xed,0xc7,0x84, -0x16,0xa2,0xcb,0xd1,0x2d,0x9c,0x7f,0x6a,0x26,0x54,0x2b,0xfc, -0xb4,0x0c,0x0a,0x7f,0xea,0x1f,0x4e,0x63,0xbc,0xf8,0xa2,0x09, -0x7e,0xcf,0xce,0x1e,0x12,0x50,0x02,0xa8,0x26,0x9c,0x6d,0x6a, -0x36,0x99,0x6a,0x81,0x52,0x0d,0x27,0x12,0x6a,0x0d,0x8f,0x6c, -0xe4,0x29,0x79,0x29,0xa6,0xa4,0x76,0xcd,0xa0,0x5a,0x5d,0xe9, -0xe8,0x2f,0x5e,0xde,0x33,0x16,0x83,0xc2,0xfd,0xc4,0xcf,0xb3, -0x30,0x3e,0x0c,0x65,0xfc,0x27,0x75,0xab,0xe1,0x27,0x0e,0xc7, -0x32,0xfc,0xb6,0x3c,0xa1,0x20,0x50,0x0a,0x36,0x00,0xa5,0xde, -0xe7,0xbb,0x24,0x19,0xe0,0x9a,0x28,0xd0,0x2b,0x63,0x3e,0xe1, -0x2f,0x37,0xc9,0xa6,0xd3,0x2b,0x16,0xdc,0x84,0x26,0xd2,0x2b, -0x7a,0xe5,0xd9,0xff,0x06,0x5f,0x38,0x15,0x3c,0xb0,0x7d,0xe1, -0x6b,0xa8,0x47,0x94,0xa0,0x9f,0x00,0xa6,0xd5,0x31,0x8d,0xd9, -0xfa,0xb8,0x30,0xd3,0x19,0xe0,0xa5,0x69,0x0c,0x5f,0x4e,0x69, -0x35,0x64,0xd0,0x4a,0x43,0x51,0x1b,0xae,0x4b,0xab,0x1a,0x55, -0x91,0x4c,0xb6,0x65,0x41,0x77,0x4d,0xbb,0xd7,0x7b,0x41,0x7d, -0x7d,0xb0,0x6b,0x63,0xcb,0xf2,0xd6,0xd6,0xc4,0x32,0x81,0x73, -0xb0,0x75,0x4e,0x55,0x95,0xb3,0xb2,0xa5,0xf3,0xc2,0x9d,0x81, -0x79,0xdb,0xf0,0xdf,0xba,0x9f,0x5b,0x78,0x91,0x5a,0xd3,0xb9, -0xfb,0x6b,0xb5,0xb5,0x9d,0xce,0xde,0xb9,0x4d,0xc0,0x3a,0xb3, -0x36,0x6b,0x5b,0x7d,0xa2,0x46,0x29,0x16,0x99,0x6a,0xf2,0x6b, -0xaa,0x97,0x36,0x38,0x9d,0xce,0x86,0x85,0x74,0x30,0x69,0xb7, -0x55,0xa7,0x2d,0x16,0x85,0xba,0x7c,0xc7,0x9a,0x9a,0xe1,0x16, -0x2f,0xdd,0x53,0x3c,0xb5,0x71,0xd3,0xa6,0x8d,0x94,0x80,0xd1, -0x0c,0xcc,0x6a,0x59,0x12,0x32,0x18,0xfb,0x2e,0x1e,0xc0,0x7f, -0xfa,0x3c,0xe6,0xfa,0xf3,0x98,0xeb,0xcf,0x63,0xae,0x3f,0x8f, -0xb9,0xfe,0xfc,0xf1,0x79,0xcc,0xf5,0xe7,0x31,0xd7,0x9f,0x22, -0xe6,0x5a,0x3a,0x2a,0x11,0xfd,0x45,0x68,0x40,0x4a,0x54,0x8e, -0x42,0x2c,0x17,0x1d,0x44,0xab,0x08,0x1b,0x4a,0x8d,0x93,0x9e, -0xd2,0xf0,0x13,0x19,0x7d,0xc2,0x9f,0xcd,0x20,0x1c,0xb5,0xfb, -0xdd,0xc2,0x88,0xd7,0x1b,0x08,0x78,0xbd,0x23,0xec,0x18,0xd4, -0x40,0xe7,0x01,0xa6,0xfd,0xef,0x18,0x98,0xc3,0x77,0x87,0x02, -0xc1,0x0b,0xef,0xbe,0x30,0x18,0x08,0x0d,0xad,0x58,0xb6,0x71, -0xd9,0x0a,0xc6,0x49,0xfd,0x15,0xf8,0x4b,0x6f,0x0f,0x10,0x17, -0xd8,0xb2,0xfc,0x85,0x50,0x16,0x4f,0x6c,0x7d,0xcc,0x53,0xe2, -0x2f,0x63,0x3b,0x53,0x86,0x20,0x8b,0xdf,0x02,0xb4,0xfb,0xec, -0x30,0x12,0x02,0xba,0xb8,0x4f,0x54,0x9c,0xe0,0xa7,0x5e,0xfa, -0xe9,0x62,0x7a,0xcf,0x88,0x98,0x48,0xa6,0x3b,0xb0,0x27,0x87, -0xeb,0xde,0xc9,0x3b,0xb0,0xaf,0xe7,0x48,0x87,0xf8,0x70,0x89, -0x74,0x0c,0x4f,0x0d,0x80,0x3b,0x1b,0xa7,0xf6,0xdd,0xba,0x2e, -0xe0,0x02,0x5a,0xe6,0x4f,0x58,0xa3,0xed,0xd0,0xea,0x3a,0x08, -0x2b,0x38,0xe6,0xbf,0xd9,0x6f,0x5c,0x6a,0x84,0x17,0x24,0x58, -0x08,0x49,0xe6,0xf9,0x42,0x5d,0xbc,0x01,0x75,0x61,0x45,0x29, -0xb4,0x09,0x21,0xdd,0xc7,0x7a,0xd0,0xce,0x82,0x11,0x9c,0xc1, -0xe0,0xe5,0x4f,0x38,0x6f,0xda,0xcf,0x89,0x6f,0x6d,0xe4,0x3c, -0xdc,0x34,0xc1,0x79,0xdd,0x75,0xb6,0x03,0x97,0x54,0x70,0x02, -0x42,0x2e,0x27,0x23,0x41,0xe3,0x08,0xfd,0xac,0x47,0x2d,0xa1, -0x0d,0xe1,0xbd,0xc0,0x87,0x8e,0x00,0x1f,0xca,0xa1,0x65,0x68, -0x04,0xed,0x02,0xb6,0x7b,0x0f,0xfa,0x11,0xeb,0x8b,0x26,0x4e, -0x9c,0x6c,0x8e,0x6b,0x2d,0x64,0xd8,0x0e,0x93,0x91,0x3a,0x0e, -0x8c,0x40,0x1d,0x54,0x50,0xa9,0x49,0x43,0x7c,0x50,0x31,0xce, -0xbf,0x23,0xbc,0x0c,0xcf,0x38,0xbe,0x08,0x08,0xe8,0x74,0x41, -0xb2,0xce,0x0c,0x01,0x8d,0x39,0xfe,0x12,0x94,0x14,0x3f,0xcc, -0x48,0x25,0x89,0xe3,0xbc,0xe4,0x45,0x87,0x0f,0x27,0xed,0x63, -0x7e,0x42,0xcb,0x29,0x91,0x4c,0xa1,0xa8,0x0c,0xd9,0x42,0x9d, -0x59,0x87,0x5a,0x5d,0x1f,0x09,0xe7,0x23,0x6e,0x77,0x5a,0xaf, -0x53,0xcf,0x97,0x2b,0x81,0x1f,0xd9,0x6a,0x0b,0x85,0xda,0x50, -0x5a,0x0b,0x98,0x42,0xa0,0x11,0xe0,0xbd,0x78,0xfd,0x19,0x45, -0x97,0xd5,0xd6,0x32,0xa6,0x5c,0x5f,0x9d,0x5a,0xc3,0x45,0xdf, -0x56,0x47,0x23,0x4e,0x97,0xd1,0x24,0xc7,0xe3,0xd1,0xb7,0x15, -0x2e,0x3e,0xfa,0xb6,0x50,0xa0,0x17,0x30,0x79,0xf7,0x55,0x9e, -0x94,0xd5,0x5a,0x93,0xb4,0x05,0x1c,0x7a,0x91,0xba,0x51,0x2d, -0xd3,0x6a,0xab,0xbb,0xd6,0x2e,0xb0,0xda,0x94,0x2a,0x73,0xc4, -0x5e,0x51,0x69,0x59,0x6f,0xc1,0xdd,0x78,0x9e,0xff,0x58,0x95, -0x5e,0xad,0x36,0xc9,0x6d,0xd9,0x79,0x89,0x64,0x30,0x58,0xaf, -0x51,0x4b,0xa5,0x4e,0xa3,0xa1,0xbc,0x41,0xaf,0xd6,0x98,0x15, -0x85,0x1a,0x59,0x4d,0xc1,0xa9,0xa7,0xca,0xa8,0x86,0xbf,0x35, -0x14,0x97,0x7c,0xda,0x70,0x32,0xfc,0x7f,0x26,0x86,0xf9,0xfa, -0xfc,0x55,0x55,0xd1,0x48,0x06,0x63,0xbd,0xdb,0xaa,0xb6,0xcf, -0x10,0xe6,0x3b,0x52,0xb9,0xbf,0x32,0x1a,0x0c,0x46,0xe5,0x89, -0x6a,0x8d,0xcd,0x6f,0x14,0x99,0x45,0x95,0x76,0x7b,0xd4,0x5a, -0x61,0xb1,0x7a,0xbc,0xa1,0xaa,0xd9,0x0d,0x36,0x9b,0xcd,0xd4, -0x6f,0x62,0x7d,0x54,0xe7,0x83,0x4e,0x5d,0x0c,0x3a,0x55,0x85, -0xb2,0xd0,0xd6,0xae,0x45,0xc7,0xd1,0xcb,0x60,0x79,0x26,0x06, -0x10,0x9e,0x61,0xfc,0xa0,0xd7,0x29,0x3a,0xad,0x0e,0x12,0x80, -0x4c,0x4f,0xd6,0xc1,0xac,0xce,0xe9,0x9d,0x51,0x8f,0x4e,0x1f, -0x6b,0xed,0xcc,0x64,0xcf,0x4c,0x8b,0xf8,0x28,0xc2,0x7c,0xbf, -0xcb,0x15,0x56,0xd0,0x02,0x36,0x88,0xd0,0x11,0xf2,0x78,0xd2, -0x15,0x1a,0x4d,0x05,0x17,0x44,0x58,0xaf,0x26,0x41,0x84,0x85, -0xda,0x9a,0xe6,0x66,0x3a,0xcd,0xfc,0x58,0x28,0x17,0xcb,0x14, -0x72,0x67,0xd0,0x1e,0xea,0x00,0x9d,0x53,0x35,0x10,0x9d,0x73, -0xb9,0x33,0x3a,0xbd,0x5a,0x99,0x56,0x28,0xac,0xae,0x90,0xad, -0xae,0xa9,0xa9,0x0e,0x94,0x4e,0x59,0xa7,0x12,0x6b,0xf1,0xde, -0xa2,0xba,0x9a,0xa8,0x12,0xe4,0x21,0xaa,0x14,0x89,0xb2,0xaa, -0x44,0xd3,0xe3,0x9a,0x44,0x46,0xb3,0xc7,0x34,0x69,0xe3,0xc6, -0x94,0xd5,0x56,0xcb,0x29,0x92,0xaa,0xa9,0xa4,0x48,0x36,0x2b, -0x28,0x52,0xb8,0xc2,0x5e,0x69,0x25,0x8a,0xf4,0xf0,0xd9,0x05, -0x0c,0xbe,0xdf,0x7e,0xe7,0x8c,0x5a,0x27,0x0d,0x4a,0xf5,0xce, -0x89,0x6a,0xb7,0x13,0xe3,0x27,0xcf,0x4e,0x77,0x56,0x0c,0x9d, -0x91,0xea,0x20,0x11,0xca,0x43,0x9f,0xfe,0x02,0x3b,0x06,0x45, -0x22,0xc7,0x93,0x68,0x09,0x3a,0x1f,0x21,0x61,0x69,0x44,0x83, -0xc4,0xe4,0x02,0x4b,0xa4,0x7d,0x7e,0x76,0x1c,0x4a,0x1c,0x4f, -0x71,0xa3,0x92,0x67,0xe0,0x99,0x13,0x9d,0xa9,0x63,0x8e,0xa5, -0x55,0xa9,0x2c,0xdf,0xb1,0x09,0x2a,0xa4,0x1e,0xd1,0xdb,0x22, -0x8f,0x74,0xf5,0x4b,0x87,0x9c,0x5f,0x70,0xfe,0xaf,0x54,0x26, -0x97,0x49,0xeb,0x1e,0x92,0x05,0x4e,0xdd,0x34,0x39,0x60,0x9c, -0x7a,0xa0,0x76,0xd0,0xe9,0xf4,0x78,0x58,0x87,0x5b,0x6f,0x2a, -0xed,0x50,0x74,0x68,0x1a,0xd3,0xc4,0xdf,0x96,0x99,0xa5,0x55, -0x56,0x2b,0x1d,0x1b,0xa8,0x6f,0x13,0x67,0x5a,0x99,0x53,0x70, -0xe8,0x10,0x4d,0xa6,0xac,0x90,0xd8,0xef,0x6c,0xae,0xcc,0x29, -0x94,0x94,0x9b,0x84,0xdd,0x86,0x73,0x57,0x7e,0xe8,0xde,0x5f, -0x5e,0xbe,0xdf,0x4d,0x1d,0x27,0x23,0x40,0xf8,0xcd,0x04,0x3c, -0x7e,0xe0,0x39,0x8a,0xef,0xfa,0x78,0x77,0x1a,0x71,0x1a,0x4f, -0xf3,0xa6,0x19,0xbb,0xcb,0x88,0xa7,0x4c,0xb2,0xd0,0xa8,0x87, -0xde,0x71,0x15,0x75,0x7c,0xf7,0x2e,0xf3,0xa0,0xb2,0xb9,0x59, -0xf6,0x50,0x8c,0x04,0x77,0x8b,0xc7,0xea,0xd9,0x88,0x2a,0x01, -0x1b,0x64,0x50,0x23,0x5a,0x8d,0xbe,0x30,0x36,0x06,0x09,0x26, -0xbb,0x64,0xbd,0xf9,0x59,0x1a,0xd3,0x83,0x53,0x34,0xff,0xc0, -0x5a,0xa7,0x6e,0xc0,0xea,0x79,0x0b,0x72,0x69,0xbb,0xa9,0xdc, -0x25,0x2d,0x33,0x56,0xe5,0x5d,0xcc,0x8f,0xd6,0xde,0xed,0xf5, -0xf9,0xbc,0x77,0xff,0x9b,0xd3,0xeb,0x75,0xfe,0x5b,0xb1,0xf6, -0x33,0xaf,0x7d,0x7c,0xf7,0xd2,0x9e,0x42,0x9b,0x50,0x2e,0x93, -0x55,0xd9,0x6c,0xce,0xd0,0x9c,0x94,0xad,0xdf,0x1f,0x0a,0x87, -0xfd,0x4b,0x3c,0x55,0xa1,0x80,0x1b,0xdb,0x3f,0xfb,0xbb,0x40, -0x62,0x6d,0xfc,0x60,0x2b,0x7f,0x0a,0xb6,0x92,0xe0,0xb3,0x3a, -0x74,0x0e,0xda,0xc7,0x8e,0x72,0x9d,0xe1,0x8c,0xb3,0xe9,0x91, -0xaf,0x9f,0x22,0x7c,0x76,0xc2,0x60,0x18,0xf5,0xc1,0x27,0x4d, -0x43,0xa3,0x76,0x90,0x78,0xdf,0xdf,0x8e,0x8d,0x8a,0x69,0x9e, -0x57,0x37,0x15,0x1f,0x9b,0x61,0xaa,0xdb,0x4c,0xd1,0xb5,0xab, -0x97,0x3b,0x1b,0xfb,0xe1,0xa6,0x8f,0xf9,0x34,0x8f,0x96,0xa6, -0xa5,0x2d,0x8d,0x8c,0x4d,0x4b,0x5b,0x23,0x91,0xa8,0xd5,0x31, -0x07,0x99,0x96,0xf6,0xd8,0x63,0xd4,0xb1,0x89,0x83,0x66,0xf3, -0x26,0x78,0x14,0x63,0xb2,0xa9,0x01,0xb7,0xe3,0xee,0x44,0x32, -0xbe,0x9a,0xb3,0x8f,0x47,0xff,0x23,0x44,0xe1,0x57,0x47,0x8d, -0xc2,0xa4,0x40,0x89,0x9c,0x64,0xc5,0x09,0xa8,0x61,0x12,0x05, -0x1a,0xcf,0x8c,0xb9,0x56,0x88,0xc2,0x26,0xf9,0x21,0x77,0x4a, -0x6c,0x48,0xf9,0x93,0x04,0x5e,0x10,0x6a,0x10,0x85,0x6e,0xaa, -0x14,0x43,0x5f,0x41,0x09,0xb6,0x5d,0xd9,0x5b,0xe5,0xef,0xbd, -0x24,0x16,0xb3,0x9a,0x1b,0xaa,0xf3,0x0b,0x16,0x7c,0x7b,0xc1, -0x82,0x7c,0x75,0xc3,0xd3,0xb7,0xde,0xf8,0x5e,0xcd,0x50,0x8b, -0x56,0xa7,0xd3,0xb6,0x0c,0xd5,0xd4,0xae,0xe0,0x52,0x2b,0xfe, -0x10,0x0e,0xb5,0x77,0xc9,0xe6,0x16,0x0a,0xcb,0x06,0x76,0xec, -0x7f,0xb6,0xb9,0xe0,0x82,0x47,0xa1,0xf9,0xd9,0xfd,0x6f,0x31, -0xa7,0x6c,0xeb,0xde,0xaf,0xea,0xca,0xe5,0x66,0x1f,0x9b,0x9d, -0xcb,0x75,0x55,0x4d,0x48,0x02,0x56,0xd5,0xa1,0xc7,0x45,0xef, -0xd2,0x8b,0x61,0x5b,0x8f,0x16,0x72,0x11,0x76,0xf4,0xd4,0xf8, -0x0a,0xbe,0x0d,0xd1,0x71,0xba,0xd4,0x88,0x38,0x2c,0x3b,0x15, -0x98,0x03,0x72,0x75,0xc6,0x33,0x71,0xcc,0x7e,0x02,0x8a,0x25, -0x63,0x6e,0xf1,0x5f,0xbf,0xb6,0xdd,0x34,0x68,0x52,0x98,0x96, -0x99,0xb6,0xb9,0x2e,0x73,0xd1,0x65,0xa4,0x65,0x48,0x2a,0x88, -0x93,0xdf,0x21,0xe6,0x5a,0x86,0xb6,0x5d,0x2b,0xae,0x94,0x48, -0x08,0x24,0x27,0x4e,0x7e,0xea,0x46,0xa6,0x80,0x0b,0xcc,0xab, -0x7c,0xd8,0xc9,0xe3,0x98,0xc6,0x37,0x25,0x5f,0x4c,0x24,0x5e, -0x4c,0xb6,0x30,0x7f,0x9c,0xcd,0x14,0xf1,0x2d,0x9f,0x8c,0xc3, -0xc7,0xa3,0x4f,0x48,0xbc,0x5c,0x17,0xe0,0xf1,0x47,0xa0,0x8c, -0x64,0x7c,0xb7,0x8a,0xc4,0x89,0xe6,0x3e,0x61,0x6c,0xb7,0xa4, -0xa6,0x1a,0xfc,0x29,0x90,0xe9,0x93,0xfc,0x20,0xaf,0x79,0x68, -0x6c,0x90,0x37,0x1a,0xbc,0x9f,0xd2,0x95,0xc2,0x0a,0xe9,0x3e, -0x02,0x12,0x69,0xf1,0x99,0x80,0x44,0x9d,0x92,0x07,0x89,0x8f, -0x4f,0x19,0xec,0x25,0x91,0x92,0x3f,0x62,0xae,0x2f,0x85,0x16, -0x36,0x55,0x1d,0xf3,0xb3,0xfd,0xa9,0x3d,0x33,0x15,0xc5,0x69, -0xd4,0x53,0x50,0x1c,0x1b,0xab,0x8f,0x77,0x80,0x2d,0xb8,0x02, -0x6c,0x41,0x17,0x58,0x81,0x47,0xd0,0x9b,0xa7,0x9b,0x17,0x62, -0xe2,0xc1,0x09,0x0f,0x6e,0x0c,0x6c,0xe4,0xc4,0xd8,0x7e,0xc9, -0x09,0xe8,0xcf,0xb1,0xaa,0x30,0x21,0xa0,0x6e,0x02,0x64,0xf6, -0xfb,0x78,0xb6,0x3b,0x7e,0xde,0x12,0xe4,0xe1,0x0e,0x13,0xcc, -0xf3,0x69,0x2a,0x1a,0x9f,0x31,0x2e,0xa7,0x16,0x4c,0x0f,0xc9, -0xab,0xaa,0xb2,0xdb,0xd5,0x1a,0xa9,0x54,0xab,0x2d,0x37,0x59, -0xec,0x29,0x9d,0x4e,0x26,0xd3,0x68,0x2a,0xd9,0xc0,0x3c,0xb7, -0xc7,0x6a,0xd3,0x1b,0x54,0xf3,0x15,0x36,0x12,0x9a,0x57,0xdf, -0x3c,0xbb,0x69,0x0e,0x7d,0x80,0xc9,0x7b,0xae,0x72,0xa7,0x6c, -0x56,0x7b,0x45,0xd2,0x1a,0x54,0xa9,0x64,0x52,0xb0,0x48,0x2a, -0x99,0x46,0x97,0xf3,0xf9,0xd6,0x2e,0x04,0x50,0xad,0x34,0x1b, -0x8d,0x2c,0xaa,0xb6,0xe2,0xee,0xe2,0xdd,0xcc,0x8f,0x69,0x19, -0x3d,0x86,0xc9,0x72,0x15,0x2a,0x75,0x43,0x38,0x42,0x30,0x59, -0x5a,0xaf,0x57,0xcd,0x53,0x28,0x94,0xae,0xb0,0x95,0x87,0x64, -0xaa,0x5a,0xee,0x16,0x53,0x0b,0x98,0x6a,0x4f,0x09,0xb3,0x07, -0x2b,0xc6,0x30,0x7b,0x27,0x77,0xfa,0xf2,0x31,0xcc,0x3e,0x6d, -0xd6,0x88,0x5c,0x66,0x32,0x3a,0x1d,0x81,0x4a,0x8b,0x59,0xaf, -0x97,0x2b,0x44,0x02,0x91,0x05,0x0e,0xdb,0xbc,0xc0,0xc8,0xc8, -0xdc,0x11,0xa9,0x54,0xa3,0x31,0x00,0x2a,0xd5,0xbb,0xc6,0x67, -0x8f,0xec,0x1a,0x47,0xd8,0x36,0x9b,0x46,0xa9,0xd4,0xeb,0x4a, -0x48,0x49,0xa1,0xe4,0xa0,0x52,0xa0,0xc5,0xe1,0xe0,0xb0,0x92, -0xb0,0xf5,0x6c,0x28,0xc2,0xca,0x33,0xc6,0xee,0x02,0x9e,0x27, -0x93,0xf9,0x22,0x51,0x94,0xa3,0xaf,0x9a,0x69,0x6c,0xf9,0x8c, -0xe2,0xe7,0x85,0x64,0x20,0xc3,0x8e,0xff,0xef,0x8f,0x27,0xfc, -0xd3,0x86,0x35,0x0c,0x33,0x8f,0x64,0xe0,0xff,0xfb,0x23,0x0a, -0xff,0xb4,0xf3,0x67,0xa6,0x8f,0x65,0xe0,0x9a,0xb5,0x27,0xf0, -0x4b,0x58,0xc4,0x4f,0x7b,0xa8,0xf2,0xcf,0x30,0xed,0x01,0xff, -0x4f,0xf9,0x8a,0xcf,0x7a,0x3c,0x02,0xd3,0xec,0x80,0x84,0x00, -0xb0,0xdf,0x5e,0x65,0x5e,0xc9,0x4f,0xc2,0xfc,0x8c,0x65,0xac, -0x36,0xaf,0x2c,0x3f,0x5f,0x95,0x57,0xc1,0x99,0x65,0x20,0x41, -0x55,0xaf,0xa2,0x4e,0x15,0x9f,0xa6,0x66,0x2f,0x5d,0x5a,0x7c, -0x90,0x9d,0x7a,0x51,0x97,0xab,0x8e,0xc5,0x4b,0x53,0x2f,0xe2, -0xe9,0x09,0x53,0x2f,0x3a,0x3e,0x1f,0x66,0xf8,0x7c,0x98,0xe1, -0xf3,0xc7,0x67,0x3d,0xcc,0xc0,0xc6,0xb1,0xce,0x81,0x3e,0xec, -0x49,0x7a,0x18,0x90,0x65,0x0c,0xd2,0x7d,0x68,0x1b,0xf4,0x62, -0x64,0xdd,0x81,0xf1,0xb8,0x66,0x1e,0x1e,0xc3,0x41,0x3e,0xb2, -0xf9,0x8c,0xa6,0xcf,0x0a,0xcf,0x6c,0x92,0xad,0x5a,0x55,0xaf, -0xde,0xb4,0x49,0xa0,0x6e,0x52,0x57,0x9c,0x57,0x71,0x61,0xd5, -0xf1,0xaa,0xd0,0x03,0xa1,0xc3,0xae,0x4b,0xa8,0x55,0xa7,0x9d, -0xd2,0x2a,0x12,0x91,0x29,0xad,0x54,0xf7,0x27,0x64,0xc0,0xef, -0x69,0x5b,0xb5,0xaf,0x51,0xc7,0x98,0xfb,0x0d,0x0b,0xf5,0xde, -0x6b,0x3c,0x00,0x3c,0x0b,0x0c,0x53,0x48,0xff,0x1f,0xe6,0xbd, -0xe8,0x52,0x32,0xf3,0xb4,0xa9,0xc0,0xcf,0x3c,0xb5,0xa6,0xdb, -0x43,0xbb,0xc3,0x6d,0x69,0xab,0x95,0xcc,0x3c,0xdd,0x1d,0xf2, -0xba,0xad,0x16,0xeb,0xc0,0x99,0x64,0x22,0xfe,0xbb,0x12,0x27, -0x8d,0xa1,0x66,0xb4,0x0a,0x5d,0x81,0x6e,0x40,0xb7,0x12,0xce, -0x44,0x18,0x04,0xe9,0xf5,0x81,0x37,0x4d,0xc4,0x76,0xdc,0x58, -0x02,0x9e,0x80,0x48,0x09,0xbc,0x13,0x72,0x38,0x91,0x54,0x16, -0x0b,0x5a,0xd9,0xea,0xca,0x4d,0x18,0x70,0x81,0xa7,0x4b,0x3c, -0x61,0xc4,0x05,0x9e,0xf8,0x6c,0x78,0xaf,0x76,0x12,0xf1,0xa5, -0x67,0x33,0xf9,0x1f,0x8f,0x7b,0xc4,0x38,0x98,0x66,0xb3,0x75, -0xad,0x5d,0x90,0x53,0xaa,0x14,0x72,0xa3,0xc9,0xce,0xfb,0xc4, -0x70,0x7b,0x63,0x34,0x5a,0xa7,0x84,0x47,0x5d,0x34,0xda,0xb8, -0x77,0xf7,0xee,0xbd,0x2e,0x73,0xb9,0x5a,0xc5,0xd5,0x70,0xb9, -0x79,0x76,0xb9,0x59,0xa5,0x16,0x89,0xc5,0x22,0xb5,0xca,0x5c, -0xce,0x5c,0xfa,0x89,0x74,0x78,0x27,0x89,0x46,0xde,0xbe,0x7d, -0x12,0x1f,0x7e,0x7f,0xe4,0x9b,0xd1,0x60,0x20,0x46,0xc0,0x96, -0xdd,0xc7,0x83,0x2d,0x93,0xc9,0x5a,0x91,0x21,0x60,0xcb,0xed, -0x2a,0x61,0xb8,0x75,0xa6,0xf2,0xd2,0x74,0x61,0x53,0x39,0x7b, -0x43,0x94,0x4a,0x8b,0xc5,0xed,0x89,0xec,0x22,0x20,0xd1,0x42, -0x2e,0xd1,0x62,0x75,0x7b,0xc2,0xbb,0x22,0x1e,0x37,0xd9,0xa5, -0xcf,0xfd,0x24,0xb6,0x4c,0x62,0x4a,0x27,0xf0,0x65,0xd6,0x17, -0x2b,0x63,0x46,0x84,0x7f,0x16,0xaa,0x90,0x03,0xe5,0x51,0x81, -0x9d,0x93,0xb7,0x95,0x60,0x3a,0xb7,0xcb,0x57,0x8f,0x67,0x64, -0xbf,0xa2,0x8f,0x61,0xbf,0xa5,0xb0,0x3f,0x3c,0xc3,0xd8,0x98, -0x70,0xf2,0x2a,0x0b,0x6c,0x1c,0x53,0x2a,0xcb,0x3a,0x73,0x7e, -0xbb,0x22,0x9f,0xa9,0x5e,0xe6,0xa8,0xd4,0x68,0x83,0x3e,0x6f, -0x36,0x73,0x28,0x9b,0xf1,0xf9,0x02,0x7b,0x37,0xae,0xbb,0xcd, -0xdf,0x14,0x21,0xc3,0x62,0x11,0x12,0x21,0x18,0x21,0x71,0x7f, -0x91,0x26,0xea,0x5d,0x12,0x51,0x78,0xb2,0x76,0xd2,0xfc,0x4f, -0x81,0x41,0x58,0xe6,0x2e,0x83,0xce,0xb6,0x7c,0xa5,0x19,0x12, -0xc2,0x75,0x07,0x1e,0x11,0xf5,0x2f,0xbd,0x60,0x1d,0x33,0x52, -0x93,0x48,0x8a,0xd3,0xa1,0x50,0x7d,0x43,0x57,0xef,0xc1,0x70, -0xc8,0x04,0x8f,0x50,0xf8,0x60,0xef,0xf5,0x0f,0xe8,0x66,0xdf, -0x6e,0x49,0x79,0xbd,0x11,0x12,0x1b,0x08,0xe8,0x3d,0x45,0x22, -0x03,0x23,0x5e,0x6f,0x6a,0x2c,0xd8,0x0f,0x7b,0xc6,0xa7,0xb8, -0x91,0x28,0xdd,0x06,0x60,0xbc,0xe1,0x87,0x23,0x91,0x87,0xc3, -0x90,0x60,0x07,0x58,0xee,0xbb,0xef,0x5e,0x3e,0xfe,0xe8,0x22, -0xd4,0x23,0xba,0x80,0x8d,0x3f,0x9a,0xfb,0xe9,0xe2,0x8f,0x66, -0xaa,0x1a,0x1d,0x19,0x35,0x7b,0x7c,0xfd,0x75,0x19,0x75,0x83, -0x3a,0x9c,0xcd,0xb4,0x2c,0x5c,0x98,0x6f,0xf7,0x79,0xcf,0xaf, -0x6f,0x08,0x76,0x6d,0x9a,0xb5,0xa2,0x75,0x76,0x62,0x19,0xed, -0x1c,0x6c,0x6d,0xab,0xf2,0x57,0x3a,0x5b,0x3a,0x2e,0xdc,0x15, -0x98,0x77,0x0e,0xfd,0x91,0x48,0x16,0x96,0xe9,0x0e,0xba,0x3d, -0x07,0x75,0x90,0x10,0x1d,0xba,0xed,0x2d,0xf1,0x9b,0x37,0x1e, -0x3a,0xbb,0x60,0x24,0xea,0x2a,0x50,0x3d,0xd7,0x3b,0x4d,0x4d, -0xef,0xb8,0x20,0x51,0xdc,0x4f,0xb7,0x32,0x8b,0xf1,0xbd,0xa7, -0x9e,0x22,0x63,0x64,0x8f,0xa2,0x55,0xa2,0x4e,0xfa,0x1e,0x76, -0xbe,0xee,0x69,0x67,0xeb,0x96,0xe1,0xe9,0xb3,0xda,0x1e,0xc3, -0x23,0x3b,0xf7,0xef,0xdf,0xf9,0xd6,0xeb,0xe9,0x7c,0x3e,0xfd, -0x3a,0xdd,0xcf,0xbc,0x7b,0xd4,0xd4,0x67,0x92,0xe6,0x54,0x42, -0x55,0xb5,0x14,0x52,0x97,0x44,0x9f,0x8a,0xae,0xa2,0x5b,0x2f, -0xfd,0xdd,0xa5,0xcc,0x09,0xfc,0x5c,0x36,0x59,0x93,0xcc,0x16, -0x13,0xdc,0x0c,0x35,0xef,0x8b,0xb9,0x09,0x33,0xd4,0xd0,0x04, -0xdf,0x40,0xc9,0x7e,0x5f,0xf8,0x19,0x59,0xef,0x4f,0x45,0x67, -0x0d,0xea,0x7a,0xd5,0xe6,0xcd,0x34,0xd8,0x72,0xc7,0x9e,0x8a, -0xfd,0x55,0xb7,0xfa,0x43,0xf7,0x83,0x2d,0xff,0x02,0xb5,0xaa, -0x71,0xa0,0x56,0xa5,0x54,0xaa,0x6a,0x07,0x38,0x1b,0x92,0x70, -0x28,0x14,0x0e,0x62,0xaa,0x39,0xdb,0x91,0xa0,0x2d,0x9f,0xc2, -0xa1,0xf0,0x77,0xda,0x77,0xfc,0xa7,0xb3,0xf2,0x38,0x08,0xf1, -0x32,0xb0,0xf3,0x77,0x81,0x9d,0x27,0xf3,0xef,0xdb,0xd0,0x41, -0x12,0xe7,0x4a,0xc6,0x38,0xb3,0xa7,0xf7,0x1f,0x52,0x33,0xfa, -0x0f,0x67,0x9c,0xe7,0x93,0xfd,0xbb,0x27,0x9f,0x4d,0xf1,0x1d, -0x93,0x5f,0x51,0x0b,0x7a,0x77,0x07,0xbd,0xbe,0x19,0xe7,0xf1, -0xcb,0x2c,0x15,0x65,0x93,0x27,0xf2,0xe3,0x08,0x3f,0xd6,0xce, -0xb9,0x7b,0x98,0x70,0xcf,0xee,0x90,0xcf,0xcb,0x0e,0xb6,0x36, -0x97,0x1b,0xa7,0x07,0x50,0x2a,0xcc,0x53,0x02,0x28,0xb9,0x49, -0x67,0x5e,0xcf,0xfa,0x42,0xdf,0x2e,0x57,0x24,0x4a,0xd6,0x26, -0xe9,0xeb,0x9b,0x57,0xdf,0xa9,0x93,0xce,0x75,0x9d,0x57,0xac, -0x4f,0xbb,0xdd,0x33,0x3a,0x23,0xa5,0x46,0xab,0x64,0x06,0x6f, -0xe4,0x44,0x73,0x83,0xcb,0xc7,0x7f,0x7d,0x86,0xc1,0x91,0x0f, -0xdd,0xd3,0xdb,0xd4,0x14,0x09,0x47,0xe6,0x76,0x9a,0xcd,0xdc, -0x9c,0xb4,0xf5,0x0d,0x09,0x51,0xac,0x9d,0xf3,0xa7,0x45,0xd1, -0xe3,0xa2,0xef,0xf3,0xeb,0x3c,0x64,0x67,0x5e,0xe7,0x61,0xe6, -0x51,0x6d,0xdd,0x69,0xa3,0x25,0x56,0x92,0x00,0xec,0x6d,0xe3, -0xde,0xda,0xc3,0xef,0x36,0xad,0xf7,0x7a,0xab,0xaa,0xbc,0xde, -0xf5,0x4d,0x5c,0xd8,0xc3,0xc1,0xf1,0x85,0x1e,0x4a,0xf3,0xef, -0x8f,0x05,0x83,0xc1,0x7d,0x5f,0xdd,0x07,0x9f,0xec,0x84,0xda, -0xe5,0x8c,0x8b,0x8b,0x5b,0xef,0x04,0x5d,0x7b,0x14,0x74,0xcd, -0x00,0xad,0x3a,0x8a,0xda,0xd1,0x16,0xfc,0x3a,0xc1,0x14,0xe4, -0xda,0xd8,0xd5,0x8e,0xf8,0x35,0x0c,0xdc,0xf0,0xf6,0x72,0xe3, -0xf0,0xca,0xb1,0x76,0x3d,0xde,0xac,0xf1,0x78,0xb8,0xc6,0x78, -0xb4,0x06,0xf4,0x4b,0x67,0xb2,0x02,0x0d,0x41,0x0e,0x2a,0x6c, -0x50,0x29,0x0d,0x2a,0x05,0xfb,0xa9,0x9c,0x29,0x4d,0x86,0x9a, -0x72,0x99,0x46,0x19,0xfb,0x92,0x96,0x12,0x5c,0x5a,0x34,0xd3, -0x71,0x31,0x3b,0x15,0x95,0x5d,0x59,0x29,0x72,0xe5,0xc0,0x00, -0xf3,0x4d,0xb2,0xb2,0x12,0xf5,0x75,0x16,0xca,0xd9,0xc7,0x91, -0x1c,0xbb,0x6c,0x89,0x0a,0x2c,0x04,0x60,0x0d,0x78,0x38,0x12, -0xc5,0x3f,0x1e,0xbe,0xde,0xdf,0x3e,0x52,0xe8,0xab,0xad,0x75, -0xaa,0xea,0xd4,0x64,0xd1,0x05,0x12,0xda,0x3e,0x61,0x61,0xa7, -0xd8,0x33,0x92,0x7f,0x61,0xec,0x0d,0x3d,0xd0,0x3f,0x64,0xd1, -0xb1,0x7f,0xc4,0xe3,0x2b,0x77,0xbc,0x3f,0x65,0x95,0x2a,0xe6, -0xed,0x58,0x5f,0x53,0xa1,0x7b,0xe1,0xe1,0xbe,0xd2,0x52,0x2d, -0x1e,0x6f,0x78,0x57,0xc8,0x0b,0xc0,0xcb,0x66,0xb3,0x58,0x00, -0xa9,0xed,0x0a,0x03,0x72,0xb0,0xd1,0x22,0x68,0x76,0x07,0xa6, -0xae,0x30,0x94,0x6e,0x28,0xad,0x30,0xd4,0x8f,0xff,0xfc,0xff, -0x0d,0xaa,0x04,0xc6,0xee,0x1f,0xba,0x56,0xdc,0x3f,0xf0,0x41, -0x26,0x38,0xb3,0x38,0x6c,0x80,0x5a,0x21,0xba,0x53,0x78,0x0e, -0x3b,0xdb,0x19,0xe9,0x9c,0x06,0x27,0x34,0x55,0x53,0x26,0x65, -0xc8,0x99,0xc4,0x29,0x83,0xdb,0x24,0xf6,0x1b,0xdc,0x19,0xb1, -0x3f,0xe7,0xce,0x0c,0x88,0xda,0xfe,0xf6,0x84,0xe0,0xd9,0xa3, -0xc1,0xa3,0x75,0xf0,0x7e,0xfe,0xf9,0x52,0x82,0xba,0xab,0x95, -0x72,0x4d,0x3a,0xc2,0x26,0xc8,0x2a,0xe1,0x03,0xa3,0x5e,0x38, -0xf7,0x8f,0xc9,0x7f,0x41,0xe8,0x92,0x61,0xdc,0x20,0xcc,0x68, -0xd2,0x51,0x3a,0x4c,0xb9,0x07,0x6e,0xc1,0x69,0x2c,0xfc,0xcb, -0x0b,0x0f,0xec,0x5f,0x16,0xad,0xdb,0x7a,0xef,0x2b,0xcc,0x87, -0xcc,0x6f,0x99,0x7b,0x1e,0xa0,0xee,0x4a,0x2d,0xde,0x7e,0xe1, -0xe1,0xf3,0xd7,0xce,0x51,0xfe,0x6d,0xbe,0x61,0xd9,0xbe,0xab, -0xaf,0xb9,0x78,0xa4,0x61,0xf2,0x79,0xb0,0x2b,0x8c,0xa3,0xe4, -0x3c,0x0d,0x70,0x9e,0x94,0xe8,0xce,0x5b,0x98,0x57,0x98,0x93, -0xe3,0x27,0xc2,0x12,0x6c,0xc5,0x4b,0x4e,0x73,0x22,0x96,0xc7, -0x06,0x47,0xab,0x45,0x3f,0x16,0x5e,0x07,0xd6,0xbd,0x09,0xb5, -0xa0,0x4e,0x2c,0x81,0x6b,0x8b,0x3b,0xc5,0x4e,0x81,0x4b,0x49, -0x8b,0x95,0x82,0x92,0xaf,0x9f,0x8d,0x0c,0x36,0x55,0x08,0x92, -0x0d,0x74,0xae,0x41,0x50,0x1a,0x21,0x00,0x24,0x4f,0xc0,0x0d, -0x4d,0x93,0x7a,0x32,0xb8,0x85,0x5e,0x77,0xc6,0xcb,0xf3,0xaa, -0x6c,0xb2,0x82,0x36,0x41,0x36,0xbd,0x88,0x7c,0x02,0xf2,0x27, -0x3f,0x21,0xa0,0x8a,0x86,0x2d,0x37,0x72,0xcb,0x82,0x24,0x9c, -0xe0,0x77,0xd8,0xe3,0x04,0x35,0x99,0xd8,0x18,0x64,0x72,0x6e, -0xe8,0xb8,0x59,0x09,0xdc,0x44,0xa3,0x4c,0x94,0xf2,0x13,0x71, -0x6c,0x0c,0x32,0xc1,0x55,0x2e,0x12,0xe0,0x41,0xf3,0x3b,0x64, -0x43,0xc1,0x2e,0x9b,0x9a,0xf0,0x66,0xa3,0x85,0xfc,0x69,0x25, -0xce,0x28,0x59,0x7c,0x60,0x32,0x02,0x58,0x10,0xe5,0x00,0x01, -0xc0,0x79,0x07,0xf0,0x6f,0x5a,0x99,0x95,0x82,0x37,0x7b,0x86, -0x17,0xcc,0x8f,0xa9,0xc4,0x86,0xba,0xa6,0x65,0xe1,0xee,0xce, -0x2f,0xde,0x3d,0x37,0x23,0xb1,0x1b,0xac,0x2a,0x55,0x6c,0xfe, -0x82,0xe1,0x8f,0xf9,0xee,0x97,0xf8,0x37,0xcc,0x4a,0x46,0x7d, -0x3d,0xf9,0x8f,0x8a,0xeb,0x4f,0x9d,0x2f,0x50,0x7a,0x2c,0x3a, -0xab,0x4c,0xe9,0x30,0xc9,0x25,0x14,0xa5,0xb1,0x1a,0x34,0x94, -0x48,0x2c,0xa8,0x8e,0x8a,0xd5,0x6a,0xa5,0x9c,0x52,0x4b,0x68, -0x91,0x5c,0x27,0x97,0x96,0x89,0x64,0x8b,0xf2,0x3a,0x85,0x20, -0x5c,0xa5,0x91,0x97,0x57,0x14,0x62,0x72,0xbb,0x41,0x21,0x50, -0x5a,0x3c,0xba,0x4a,0xbd,0xbf,0x42,0xae,0xd7,0x48,0xcb,0xca, -0xca,0x62,0xed,0xce,0x30,0xd6,0x59,0xb4,0xaa,0x72,0x81,0x5a, -0xa4,0x72,0x7a,0xf5,0x2a,0x75,0xd0,0x6c,0x33,0xa9,0x3d,0xda, -0x32,0xa7,0x42,0x19,0xd5,0x59,0x6a,0x75,0xe5,0x80,0x01,0x15, -0xd5,0x65,0x01,0xa5,0x55,0x6f,0xd1,0x28,0xd2,0x31,0xad,0x58, -0xa2,0x36,0x6b,0xa4,0x32,0xa3,0x5a,0xad,0xb6,0x99,0x54,0xe5, -0x2e,0xb9,0xc5,0x25,0xd1,0x18,0x15,0x34,0x06,0x90,0xe3,0xa7, -0x2d,0x14,0x96,0xa8,0x31,0x8d,0x29,0x89,0x58,0x6b,0xa1,0x9e, -0xdc,0xf2,0x74,0xac,0xb9,0xbb,0xce,0x54,0x66,0xef,0x68,0xee, -0x2c,0x8f,0xdc,0x3d,0x6f,0xae,0x42,0x65,0xb0,0x1b,0x4d,0x75, -0xdd,0xcd,0xb1,0xd3,0x7d,0x81,0xfb,0xb6,0x60,0xef,0x47,0xef, -0xbd,0xf7,0xd1,0xad,0x0a,0x7b,0xc0,0x62,0xb0,0x8a,0x95,0x1a, -0xbb,0x46,0x69,0xf2,0xd5,0xc8,0x28,0xb9,0x42,0x2c,0x14,0xe6, -0xd4,0x65,0x32,0x75,0x99,0x40,0x22,0x5f,0xa7,0x10,0x14,0xfc, -0x8e,0xda,0xdc,0x50,0xb9,0x52,0xac,0xb1,0x6b,0x4d,0xbe,0x32, -0x83,0x4a,0x8d,0xbb,0x67,0x09,0xaa,0x05,0x5a,0x21,0x4e,0x4b, -0x34,0x26,0xb5,0x3c,0xa2,0x95,0xd1,0x02,0x49,0x43,0xb3,0x4c, -0x1c,0xb3,0x6b,0x3c,0xb2,0xd9,0x6a,0x8d,0xde,0x96,0x52,0xd9, -0x95,0x65,0x83,0xd2,0xb9,0xf2,0xf2,0x72,0x79,0x21,0x42,0x99, -0x8c,0x4e,0x93,0x44,0xa8,0x91,0x5b,0xf5,0x3e,0x97,0x50,0xe9, -0x32,0xd3,0x26,0x31,0x25,0x97,0xd3,0x94,0x90,0xd2,0x08,0x28, -0x8a,0x12,0x60,0x78,0x53,0x62,0x8b,0x69,0xac,0xcd,0xb6,0x03, -0xa7,0x50,0x41,0x8b,0x30,0x90,0x35,0x0d,0xdd,0x19,0x60,0xf1, -0x19,0x0c,0x7a,0x29,0xbc,0xe1,0x91,0x47,0x56,0x3f,0xf2,0xc8, -0xc9,0x2a,0xd2,0x5e,0x85,0xed,0x24,0xbd,0xfa,0x91,0xe2,0x40, -0x2b,0xe8,0xfe,0xa2,0xd1,0x06,0xd1,0x51,0xe1,0xdd,0x48,0x84, -0xaa,0x50,0x18,0xc5,0x51,0x0e,0x7e,0xad,0x49,0xc9,0x70,0x4a, -0x03,0xe4,0xdf,0x4f,0x9e,0x34,0xfb,0x29,0xa3,0x32,0x56,0x2a, -0x67,0x82,0xa7,0x8e,0xfd,0x34,0xa5,0x9c,0x29,0x43,0x88,0xca, -0xa4,0x72,0x5c,0x6e,0xc1,0x6d,0xb7,0xbe,0xfa,0xea,0xad,0xd9, -0x97,0x3a,0x52,0x8d,0xf1,0x58,0x63,0x4d,0x4d,0xce,0x9c,0x50, -0x67,0x73,0x7e,0x7f,0x2e,0xab,0x4e,0x98,0x73,0x35,0x35,0x8d, -0xb1,0x78,0x63,0xaa,0xe3,0x25,0xfc,0xfe,0x65,0x97,0x3d,0xb3, -0x63,0xc7,0x25,0x24,0x33,0x25,0xc1,0x0f,0x62,0x17,0xf3,0x06, -0xb3,0xa0,0xe6,0xc7,0x0d,0xf7,0x6c,0xff,0xee,0xaf,0x99,0x53, -0x3d,0x97,0x6f,0xf8,0xd5,0xb5,0xcc,0x0f,0xb1,0x00,0xff,0xcf, -0xa5,0xf8,0x7f,0xb0,0x80,0xf9,0xfa,0xe3,0xbf,0xda,0x70,0x79, -0x0f,0x73,0xea,0xd7,0xdf,0xdd,0x7e,0x4f,0xc3,0x8f,0x87,0x87, -0x6b,0x98,0x05,0xcc,0x1b,0xd8,0x85,0x1f,0x24,0x3c,0x6a,0x60, -0x34,0x07,0x65,0x7e,0x13,0xae,0x5d,0x41,0x46,0x9b,0x81,0x35, -0x97,0x61,0xb7,0x86,0xe6,0x36,0x38,0x86,0xb9,0xeb,0xe7,0x9e, -0x2a,0x76,0x5f,0x45,0x39,0xa0,0x10,0x8d,0xd8,0x81,0xb9,0x42, -0xf0,0x4f,0x3a,0xfd,0x22,0xd6,0x63,0xfd,0x8b,0x37,0x70,0x1b, -0xea,0xf5,0xea,0xed,0xf3,0x86,0x3a,0xdb,0x86,0xfa,0xfb,0x7b, -0xfc,0x9d,0xe5,0x3d,0xb3,0x3b,0xf3,0x9d,0xd9,0x7e,0x43,0xde, -0xeb,0xcd,0x1b,0xfa,0xb3,0xb0,0x33,0xbb,0xa7,0xbc,0xd3,0xdf, -0xd3,0xdf,0x3f,0xd4,0xd6,0x39,0x34,0x6f,0x3b,0x1e,0x64,0x4e, -0xb1,0x17,0x25,0xa0,0x06,0xe1,0xca,0x49,0x89,0x4e,0x31,0x2f, -0x5a,0xab,0x05,0xcd,0x91,0x85,0x4b,0xd7,0x3a,0x73,0xc1,0xbe, -0xb6,0x23,0xdb,0xfa,0x57,0x77,0xd6,0x76,0x5f,0x35,0x6b,0xd3, -0x9a,0x8e,0xab,0xba,0x6b,0x3b,0x57,0xf7,0x6f,0x3b,0xd2,0xd6, -0x17,0xcc,0x39,0xd7,0x2e,0x5d,0x18,0x69,0x16,0x54,0x73,0x76, -0xb7,0x73,0xd4,0x25,0x7a,0x54,0xf8,0x3d,0x54,0x86,0x82,0x60, -0x96,0x0c,0x11,0x6c,0x70,0x66,0x14,0x38,0x83,0x75,0x13,0xaf, -0x15,0xae,0x7e,0x52,0xc9,0x68,0x31,0x8d,0x37,0x13,0xf1,0x02, -0x1f,0x11,0xfd,0xd1,0x0f,0xe6,0x6d,0xd9,0xec,0x58,0x99,0xdc, -0xbc,0x6b,0xd7,0xbe,0xe5,0xc3,0xfb,0xd6,0x5e,0xd7,0xde,0x7e, -0xdd,0xda,0x7d,0xc3,0xcb,0xf7,0xed,0xda,0xb5,0x39,0xb9,0xd2, -0xb1,0x79,0xcb,0xbc,0x06,0x52,0xf7,0xe4,0x4d,0xf7,0x30,0x17, -0x7e,0xf7,0x9d,0x1d,0x0f,0xf6,0x6c,0x69,0x7e,0xe5,0xc4,0x6d, -0x4b,0x8f,0x24,0xbe,0x9c,0xcd,0x7c,0x39,0x71,0x64,0xe9,0x6d, -0x27,0x5e,0x69,0xde,0xd2,0xf3,0xe0,0xd5,0xb8,0xec,0xbb,0xcc, -0x85,0xe4,0xba,0x96,0x8f,0x6e,0x10,0xdd,0x2e,0xbc,0x00,0x74, -0xcb,0x31,0x45,0xb7,0x68,0xd0,0x0e,0x19,0xe5,0xd7,0xe4,0x40, -0x37,0x74,0x39,0xe8,0x2a,0x78,0x4d,0x63,0x5e,0x28,0x09,0x2d, -0x5d,0x06,0x75,0x77,0x49,0xef,0x4e,0xbd,0xc7,0xdc,0xb2,0x92, -0xf9,0xeb,0x09,0xe6,0x1b,0x78,0x0d,0xb3,0xee,0x88,0x50,0x7c, -0x84,0x59,0x07,0xa9,0x6f,0x9c,0x60,0xfe,0xba,0x92,0xb9,0x65, -0x27,0xdc,0x57,0xa2,0x93,0x5f,0xe7,0x75,0x32,0x46,0x7a,0x20, -0x52,0x0b,0x4e,0xda,0xe0,0x34,0x4d,0x50,0x40,0x2b,0x95,0x01, -0xc9,0xe3,0x0a,0x2a,0xa6,0xb9,0x6c,0xdf,0x29,0x29,0x55,0x2f, -0x3d,0x9b,0x57,0xc6,0xda,0xec,0x44,0x65,0xcc,0xd6,0xf2,0xca, -0x78,0x7d,0x49,0x97,0x04,0x34,0xa9,0x0e,0xe6,0xd4,0xf0,0x19, -0xaa,0x21,0x73,0x13,0xc9,0xcf,0x71,0xe8,0x17,0x47,0x97,0x8b, -0xaa,0x85,0x5f,0x81,0xab,0x26,0xf3,0xc6,0xa1,0x7e,0xbc,0x19, -0xa7,0x81,0x9e,0x58,0x47,0x13,0xd3,0x1a,0xb7,0x46,0xb0,0x09, -0xbf,0xf2,0x08,0x5b,0x49,0xa7,0xbe,0xc5,0x6e,0xa8,0x44,0xff, -0xad,0xab,0x57,0x0b,0x6e,0xe6,0x6a,0x87,0x19,0xe0,0xb6,0x94, -0xf2,0x6f,0x4f,0x88,0xda,0xb8,0xff,0x5e,0x61,0xdb,0x36,0x75, -0x17,0x99,0xc5,0x44,0x7a,0x63,0xb6,0xd7,0x85,0x2e,0x96,0x8d, -0x6b,0x59,0x3c,0x2a,0x11,0xde,0xcb,0xc6,0x71,0xe5,0xd1,0x6c, -0xb4,0x06,0x5d,0x05,0x07,0x09,0x02,0xe7,0x47,0x9c,0x09,0x68, -0xc6,0x13,0x23,0x02,0x01,0xb3,0x9f,0x26,0x24,0x50,0x30,0x21, -0x60,0x0f,0x7f,0xfc,0x12,0x67,0xde,0xa9,0xe1,0x7c,0xbe,0xe9, -0x63,0xcf,0x22,0xb1,0xd3,0x80,0x6f,0x7e,0x46,0xbc,0x26,0x07, -0x08,0xb6,0x7e,0xcb,0x5d,0x77,0x50,0xb6,0xd2,0x02,0x81,0x4e, -0x57,0x84,0xac,0x9c,0x2a,0x55,0x29,0xbd,0x33,0x2c,0x10,0xc8, -0xfc,0x74,0x17,0x59,0x4b,0x86,0x59,0xcc,0xaf,0x57,0xb9,0xdb, -0xb5,0x8c,0x27,0x84,0x63,0x4b,0x55,0x52,0x6f,0x33,0xf9,0xd7, -0xc4,0x29,0x9b,0xb5,0x36,0x69,0x0d,0x56,0x18,0x84,0xe1,0x94, -0x54,0xab,0xcb,0xb1,0x71,0x79,0x2a,0xa5,0x39,0x6c,0xaf,0xa8, -0x9c,0x3f,0x1f,0x77,0x7f,0xb8,0x0c,0xff,0x79,0x23,0x89,0x92, -0x99,0x75,0x2e,0x59,0x93,0xe3,0xae,0xf6,0xa6,0xc2,0xc6,0x5e, -0x6b,0x70,0x6e,0x55,0x60,0x29,0x17,0xa5,0x67,0x51,0xab,0x94, -0xb9,0xae,0x78,0x22,0x14,0xac,0xa8,0x70,0xb2,0x51,0x7a,0xd7, -0xb2,0x01,0x7a,0x24,0x54,0x0f,0xbf,0x7c,0x82,0x2c,0xb9,0x06, -0x2c,0x30,0x11,0x03,0x12,0xb8,0x66,0x70,0xc3,0x18,0x16,0x1d, -0x79,0x42,0x1c,0x0b,0xb0,0x83,0xbc,0x6a,0xbb,0xdf,0xa8,0xd1, -0x4f,0x1e,0xe3,0xb5,0xda,0x6d,0x2d,0xb3,0x06,0xd8,0x38,0x83, -0x28,0xdc,0x1b,0x12,0xfb,0xa5,0x43,0x19,0x34,0x17,0x5d,0x3c, -0xd3,0x1c,0x48,0xb2,0x82,0xc7,0x34,0xaf,0xd5,0xf8,0xba,0x98, -0xdc,0x3a,0x0f,0x9f,0x71,0x9c,0x34,0x8e,0x8e,0x85,0x63,0x7c, -0x9b,0xf8,0xfb,0xca,0x57,0x9a,0xcb,0x57,0x96,0x97,0x79,0x24, -0xc2,0x91,0x83,0x0f,0x8b,0x1e,0xb9,0x60,0xe4,0x54,0xe8,0xef, -0x09,0x9d,0xfe,0x90,0x5d,0xc9,0x83,0xf9,0x05,0x85,0xb5,0x6d, -0xda,0xc8,0xc3,0xe1,0xf0,0xc3,0x11,0x48,0xb0,0xeb,0x37,0xdc, -0x87,0x7b,0x8b,0xc3,0x64,0x45,0x0f,0xc8,0xf0,0x9f,0xc3,0xb2, -0x09,0x8b,0x38,0x98,0x4c,0xb2,0x09,0xa1,0xd4,0x16,0x2b,0x47, -0xcd,0xa3,0xe1,0xa0,0xc1,0xc0,0x2d,0xe4,0xe0,0xf3,0x5b,0xad, -0x15,0xd0,0x16,0x36,0xa2,0x1f,0x88,0xbe,0x24,0x48,0x00,0x4e, -0x43,0x38,0xc9,0xad,0x6e,0xcc,0xae,0x6c,0x24,0x24,0xc0,0x86, -0xd0,0x51,0xde,0xdd,0xc4,0x3b,0x38,0x44,0x80,0xa6,0x84,0x26, -0xb6,0x8a,0x40,0xd3,0x1b,0x71,0x03,0x25,0xea,0xaa,0x08,0x8a, -0x65,0x9e,0xb5,0xc9,0xed,0x5b,0x82,0xdd,0xcd,0x2d,0xb1,0xac, -0x55,0xd7,0xee,0xdc,0x36,0x18,0x9f,0xd5,0xba,0x54,0xab,0x56, -0x68,0xf4,0x15,0x41,0xad,0x40,0xaa,0xb7,0x55,0xc7,0x67,0x35, -0xcd,0xf5,0x4d,0xcc,0x91,0x6c,0x0b,0x2e,0x31,0x18,0x69,0x99, -0x83,0x7a,0x39,0x58,0xa1,0x51,0x19,0x0b,0x5f,0x4c,0x6e,0xaf, -0x08,0xce,0xc9,0xf7,0x46,0x3d,0x47,0x12,0x5f,0x9d,0xd5,0x7a, -0x43,0x85,0x41,0x22,0x0d,0x56,0xd8,0xf4,0x22,0x8d,0x2b,0xda, -0x5d,0xd3,0x12,0xb4,0x8f,0x7f,0xdb,0x16,0xdc,0x5b,0x55,0x25, -0x56,0xea,0xb8,0x18,0xf9,0x8a,0xd1,0x76,0xd1,0xab,0xc2,0x57, -0xd8,0xff,0xa6,0x9a,0x07,0x8a,0x02,0xf8,0xce,0xe9,0xf2,0x01, -0xba,0x74,0x26,0xd9,0x35,0x8e,0x73,0x98,0x6d,0x94,0xd8,0x09, -0x6f,0x1e,0x5f,0x62,0xa7,0xcb,0x5f,0x86,0x95,0x58,0x97,0x9c, -0x10,0x80,0x12,0xc3,0x1c,0x26,0x75,0x60,0x9a,0x07,0xa7,0x3a, -0x28,0x24,0x25,0xb3,0x1b,0x98,0xe3,0x06,0xbb,0xdd,0x80,0x87, -0x0d,0xcc,0x65,0x06,0x3b,0x85,0x87,0x85,0x16,0x8d,0x59,0x85, -0x0f,0xe1,0xa3,0x36,0x15,0xbe,0x42,0x6c,0x37,0xd8,0x54,0xcc, -0x21,0xe6,0x5c,0xb3,0x8a,0xb9,0x97,0x79,0x46,0x68,0xb9,0x51, -0xaa,0xb2,0x60,0x0c,0xb0,0x11,0x20,0xcc,0xf7,0x55,0x2a,0xa9, -0x50,0x78,0xf9,0x1d,0xb4,0x4a,0xaa,0x94,0xdc,0xa9,0xc1,0xca, -0x6d,0x41,0xbb,0x3d,0x68,0x1f,0xb4,0x1b,0xc4,0x62,0xc1,0x57, -0xd4,0x7a,0x43,0xf1,0x4f,0xe5,0xc5,0x03,0x72,0xa5,0xc1,0x5e, -0x4e,0x8d,0x18,0xf0,0x0f,0x4f,0x3e,0xad,0xd6,0x0b,0x3b,0x54, -0x52,0xfc,0x16,0x2d,0x10,0x0b,0x04,0xd4,0x32,0xb1,0x5a,0xaa, -0xa2,0xea,0xb1,0x41,0x24,0x96,0xaa,0xe4,0xcc,0x7f,0x7f,0xa9, -0x4c,0xc1,0x96,0xb9,0x95,0x2d,0xb3,0x9e,0x2d,0xf3,0x82,0xb3, -0x2b,0x33,0x7b,0x9f,0x55,0xd8,0x9b,0x65,0x17,0x3a,0x10,0x0b, -0x79,0xcc,0x1d,0x83,0x96,0xc3,0x39,0xbb,0xb2,0x8d,0x38,0x4b, -0xdf,0x0c,0xa5,0xde,0xca,0x96,0xfa,0x1a,0xc3,0xa9,0xbf,0x9d, -0x41,0xa9,0xe9,0x6e,0xa9,0x4a,0xd0,0x86,0x23,0x02,0x81,0x54, -0xa5,0x61,0x5e,0xb8,0x54,0xa1,0x92,0x8a,0x85,0x4f,0x61,0x21, -0x2d,0x00,0x9e,0xb5,0x49,0x7c,0x26,0xe5,0xa6,0x95,0x32,0xb1, -0xe8,0xbc,0x11,0xac,0x94,0x69,0x85,0x9b,0xe7,0x8a,0x55,0x52, -0x15,0xbd,0x9e,0x16,0x8a,0x24,0x50,0x0f,0xf4,0x23,0xf2,0x09, -0xe5,0x7e,0x90,0x2d,0x77,0xf7,0x59,0x96,0x3b,0x9d,0x85,0x02, -0xeb,0xc8,0x98,0x01,0x77,0xd3,0xfd,0x7a,0x72,0xd7,0xdd,0xac, -0x23,0x3c,0xc1,0xdf,0x71,0xa3,0x49,0x58,0x80,0x92,0x2f,0x63, -0x4b,0x7e,0x97,0xe1,0x64,0xcf,0x99,0x94,0xfc,0x61,0x15,0xd4, -0xe7,0x15,0x22,0x89,0x5e,0x25,0xbc,0xde,0x49,0x69,0x49,0x89, -0xcb,0xc4,0xa2,0xf9,0x1b,0x85,0x2a,0xa9,0x42,0xdc,0x9f,0x3b, -0x93,0xa2,0x5f,0x21,0x05,0x45,0x61,0x7a,0xfe,0x5d,0x24,0x51, -0x01,0x9c,0x7f,0x21,0x22,0xd4,0x09,0x31,0x16,0x89,0x36,0x5c, -0x23,0x2a,0x93,0xaa,0xa4,0xe7,0x75,0x94,0xca,0xfe,0xf6,0xa7, -0xbc,0xe7,0xfc,0xcd,0xa6,0xc4,0x39,0x2e,0xa5,0xc2,0x1c,0x0b, -0x4b,0xbb,0xe9,0x92,0xd2,0x67,0x45,0xaf,0x42,0xc9,0x77,0xb0, -0x25,0xbf,0xc2,0xf0,0xb7,0x17,0xce,0xa0,0xe4,0xc2,0xdf,0x89, -0xb4,0x52,0x15,0x5e,0x51,0x75,0x87,0x18,0xd4,0x53,0xf6,0xa6, -0x58,0x02,0xd5,0x4a,0xe3,0x95,0x94,0x4a,0xaa,0x11,0x75,0x05, -0xcf,0xa0,0xe0,0x82,0x63,0x1a,0x95,0x54,0x20,0x60,0xde,0xde, -0xb9,0x51,0x00,0x4d,0x44,0xfc,0x45,0x81,0x40,0x20,0xc6,0x58, -0x21,0x10,0x82,0x16,0xbd,0xb2,0x8f,0xc5,0x71,0xfb,0x46,0xf7, -0x8a,0x0e,0x0b,0x1f,0x03,0xfc,0xa2,0x25,0xa8,0x34,0x27,0xc3, -0x26,0x0d,0xd2,0x03,0x57,0xc3,0x50,0x78,0x28,0xab,0xf0,0x95, -0xc7,0xdf,0x7e,0xfb,0x71,0xac,0x08,0x37,0x18,0x3f,0xba,0xda, -0x08,0x9f,0xc2,0x6d,0xc2,0xc7,0x98,0x1b,0x5b,0x99,0x5f,0x61, -0x67,0x2b,0x5e,0xfb,0x51,0xa2,0x21,0x0c,0x87,0x8c,0xf0,0xf9, -0xd1,0xd5,0x93,0xcf,0xe7,0x18,0x3b,0x1f,0x26,0xd5,0x95,0x08, -0x63,0x3f,0xa2,0x4b,0x53,0x56,0xb5,0x18,0x09,0x2b,0xc6,0x4f, -0xee,0xc0,0xcc,0x2f,0x19,0xfd,0xbf,0x33,0x97,0xec,0xc2,0x61, -0x87,0x2d,0x20,0xdc,0x84,0x97,0xe0,0x6e,0x4a,0xeb,0x08,0x4d, -0x92,0xa5,0x75,0x84,0x85,0xcf,0xff,0x3b,0xde,0x43,0x7d,0x4d, -0x24,0x76,0x84,0x3d,0xd6,0xe2,0x21,0xe6,0x1e,0xe6,0x6b,0x52, -0x1c,0x66,0xe5,0xae,0x00,0xb9,0x87,0xb9,0x72,0x08,0x35,0x62, -0x2b,0xf6,0x6b,0x3c,0x70,0x03,0x73,0x18,0x34,0x52,0x2f,0xc6, -0xc2,0xdd,0x44,0xd4,0x49,0xeb,0x84,0xcb,0xbd,0x15,0xaf,0x6d, -0xc5,0x4e,0xe6,0x57,0xad,0xcc,0x8d,0x76,0xb6,0x60,0x46,0xb6, -0x90,0x88,0xaf,0x97,0xd2,0xf9,0x62,0x63,0xe7,0xf3,0x8e,0x59, -0xea,0x5c,0xd6,0xc3,0x37,0x71,0x30,0x6e,0x02,0x42,0x64,0x29, -0xd6,0x9a,0x73,0x52,0x3e,0x3a,0xe5,0x08,0x8b,0x12,0x8b,0x5c, -0xee,0xc6,0x60,0x53,0x75,0xbb,0xff,0x5a,0xfc,0x18,0xee,0xa2, -0x05,0x8e,0xb0,0xdf,0xfe,0x18,0xf3,0xf6,0xf7,0xee,0xd8,0x9e, -0x76,0xb4,0xc6,0x42,0x8b,0x52,0x12,0xdf,0xa4,0x2b,0x70,0xa8, -0x94,0xbb,0x7f,0xd2,0xbf,0xf4,0xcb,0x8b,0x2f,0xe8,0x1d,0xf4, -0x5f,0xfb,0xd5,0x4a,0xa8,0x09,0x7b,0x88,0xd6,0xce,0x1a,0xb8, -0xf8,0x4b,0xab,0x6b,0x8f,0xef,0xd9,0xfa,0xd3,0x3d,0x06,0x33, -0x87,0xe3,0x5a,0x47,0x5b,0xa0,0x9d,0x3e,0xc2,0xfe,0x8f,0x5f, -0x25,0xf0,0x20,0xc4,0x6a,0x66,0x49,0x2b,0xdd,0x09,0x2f,0x8d, -0x09,0xe9,0x1e,0xd7,0xda,0x32,0xae,0xfb,0xc1,0x7c,0x5f,0x83, -0xb3,0x82,0xfb,0x56,0x4f,0xd0,0xb9,0x2f,0x30,0x5b,0xff,0x44, -0x34,0x4e,0x33,0x41,0x2b,0x0d,0x54,0xc2,0x11,0x96,0x9f,0x6a, -0x37,0x06,0x60,0x43,0x3f,0x6e,0xa4,0xfe,0x38,0xae,0x5e,0xb7, -0xe1,0x36,0xa2,0x5e,0x63,0xaa,0xc7,0x1c,0xa1,0xe2,0x61,0x87, -0x51,0xfb,0x91,0xdf,0x4d,0x36,0xc2,0x9f,0xba,0x39,0x2c,0x38, -0x1b,0x95,0x89,0x5e,0x03,0x4c,0xe1,0x60,0xd7,0xf0,0xfd,0xd8, -0x36,0xb4,0xe7,0x0c,0x1a,0x84,0xf4,0xe3,0x74,0x9d,0xc8,0xd3, -0x8d,0xf6,0x88,0xde,0x15,0x7e,0x1d,0x11,0x57,0x09,0x58,0x1b, -0x2b,0x10,0xa7,0xb1,0x37,0x65,0xa2,0x09,0xfa,0x86,0x0f,0x19, -0xe6,0xde,0x69,0x5a,0xa4,0xc2,0xfc,0x3e,0x0d,0x40,0x3d,0xde, -0x88,0xa1,0x4f,0x4a,0x5a,0xa0,0xe7,0xa5,0x2e,0xc7,0x79,0xaa, -0x39,0x99,0xcf,0x6f,0x0f,0xe7,0xf3,0x8d,0xa6,0x7c,0xfe,0xa8, -0x7f,0xf6,0xb6,0x23,0xf9,0x7c,0x57,0xcc,0x91,0xcf,0x2f,0x87, -0x63,0x1b,0x1b,0xf3,0xf9,0x56,0x5a,0x24,0x3e,0x0a,0xbb,0x6d, -0xf9,0x7c,0xcf,0x39,0x1e,0x71,0x5f,0x3e,0xdf,0x5b,0x8f,0x2d, -0x2e,0x69,0xb5,0xf0,0x6b,0x79,0xaa,0xd8,0x49,0xcd,0xa9,0xae, -0x2e,0xca,0xf0,0x15,0xd5,0xd5,0xcc,0x30,0xbd,0x08,0x3e,0x2b, -0x99,0xef,0x50,0x8b,0x15,0x27,0xe1,0x27,0xf4,0xd0,0xbf,0x9d, -0xbc,0x28,0x9f,0xa7,0xd6,0x30,0x5b,0xe1,0xf3,0xc5,0xa2,0x27, -0x9f,0x97,0x50,0x3f,0xcb,0xf5,0x6f,0x2e,0xbe,0x06,0x5f,0x6e, -0x3e,0x05,0xa7,0x12,0xde,0x2a,0x2a,0x1e,0x5b,0xfd,0x4e,0x75, -0xf5,0xa9,0x5f,0xff,0x19,0xdf,0x88,0x8f,0xcb,0xaa,0xa1,0x7c, -0xb7,0x8e,0xbe,0x2a,0x1a,0x12,0x26,0xc9,0x5f,0x5e,0x7a,0x49, -0xd4,0x2b,0xc0,0x74,0x7c,0x9d,0xe0,0x95,0x8f,0x9e,0xd9,0xfb, -0x41,0xeb,0x1e,0xc1,0x3b,0x7b,0xd0,0x0c,0x79,0x9c,0x19,0x27, -0xd5,0x25,0xd0,0x9f,0xdc,0xc9,0xbc,0x82,0xef,0xe7,0x73,0x9d, -0x26,0x1f,0x2d,0xa0,0x07,0x4e,0x85,0x19,0x3d,0xb5,0xfa,0x13, -0xf2,0x3d,0x43,0xdd,0x79,0xea,0x37,0xc5,0x01,0xda,0xf6,0xf1, -0xf9,0x04,0x3b,0xf1,0x3b,0xc5,0x9b,0x4f,0xdd,0x49,0xff,0xf0, -0xe3,0xf3,0x09,0xc3,0x38,0xcd,0xf4,0x9c,0x7c,0x47,0x70,0xf4, -0x34,0xf9,0x80,0x94,0xb0,0xf9,0x7e,0xb3,0xf7,0x83,0x93,0x69, -0x61,0xcb,0x58,0x59,0x57,0x41,0x9e,0x5b,0x20,0x8f,0x83,0xc3, -0x57,0x71,0xf3,0x98,0x29,0xe6,0x34,0x5d,0x33,0xae,0xf0,0xf4, -0x01,0xb3,0x9b,0xda,0xa7,0x31,0x9a,0xdd,0x86,0x62,0x25,0xd9, -0x14,0x0f,0xb3,0x3b,0xd4,0x9b,0x1a,0x61,0xd2,0x6d,0x2e,0xbe, -0x52,0x7c,0x99,0x72,0x29,0xdd,0x66,0x9b,0xb6,0x78,0x19,0x6c, -0x04,0x1b,0x8a,0x6f,0xb0,0x7b,0xd4,0x6e,0x25,0x77,0x3d,0xab, -0x50,0xad,0xe8,0x16,0xc1,0x73,0xc8,0x52,0xc2,0x72,0x58,0x44, -0x34,0x97,0x17,0x10,0x07,0x2b,0x03,0xad,0x2c,0x2b,0x1a,0x32, -0xbb,0x65,0xcc,0xd5,0xda,0x06,0x6d,0x71,0x21,0xf3,0x1f,0x5a, -0x07,0xec,0xe1,0x6d,0xb0,0x47,0x7d,0x1d,0x37,0x6a,0xa9,0x67, -0xdc,0x66,0x9d,0xba,0xf8,0xa1,0xd9,0x4c,0x7f,0x87,0xa9,0x37, -0x93,0x1d,0x4a,0x62,0x36,0x9f,0xca,0xe0,0xff,0x34,0xb3,0xfd, -0xef,0x71,0x28,0xcf,0x30,0x94,0xc7,0x89,0xd2,0x68,0x0e,0xc8, -0xc9,0xb8,0x94,0x42,0x3e,0x7c,0x42,0xe4,0x36,0x24,0x1b,0x84, -0x7c,0x84,0x65,0xd6,0x99,0x21,0x48,0x51,0x24,0xe6,0x07,0x9a, -0xb1,0x91,0x8b,0x95,0x48,0x19,0x08,0xb6,0x84,0x8b,0x90,0x79, -0x47,0x36,0xde,0x70,0xe5,0x9d,0x6d,0xe7,0x5e,0x7b,0xe4,0xca, -0x74,0xdc,0xa6,0x9e,0xb2,0xff,0xd1,0x82,0x32,0x7b,0xcf,0x92, -0x7d,0xe7,0x5d,0x5d,0x70,0x3b,0x7b,0x96,0xb3,0x87,0xe8,0x01, -0x3e,0xa1,0x1e,0xfb,0x4a,0xf0,0xd4,0x1e,0xda,0x1a,0x5d,0x7d, -0xf1,0xcf,0x2e,0xfe,0xd5,0xb5,0x47,0x6a,0x8d,0x52,0xd1,0xd4, -0x5d,0x4a,0x57,0x39,0x7b,0xe0,0xfa,0xc1,0x5c,0xed,0x81,0xe5, -0xec,0x81,0xe2,0x7c,0x3e,0x31,0xf6,0x0d,0x94,0xe9,0x5e,0xd4, -0x26,0x5a,0x4c,0x5f,0xc9,0x8e,0x1f,0xfb,0x4f,0xbb,0xda,0x73, -0x69,0x08,0x1c,0x97,0x56,0x39,0xb9,0x6f,0x6c,0xf4,0xb8,0xa6, -0x26,0xfd,0x3a,0x7d,0xbe,0xa6,0x20,0x15,0x1c,0xfc,0x37,0xac, -0x95,0x36,0x69,0x61,0xdb,0x46,0xb7,0x5e,0xfa,0x5f,0x97,0x90, -0x71,0xe3,0x4c,0xaa,0x26,0x99,0x1d,0x45,0xae,0x7d,0x3a,0x76, -0xd8,0x3a,0xa1,0xdf,0xeb,0xa2,0x0e,0x92,0x91,0x6b,0xc2,0x69, -0x6a,0x47,0xc5,0xc2,0xe7,0x84,0x72,0xd0,0x21,0x1d,0xb2,0xb3, -0xab,0xe9,0xf1,0x2b,0x43,0xd1,0x33,0x5e,0x85,0x70,0xda,0x5a, -0x2b,0xf4,0xbd,0xdc,0xca,0x4e,0x6f,0x4e,0xfe,0x1b,0x9f,0x17, -0x25,0xa9,0x89,0xcb,0x7f,0x3e,0x3c,0x71,0x45,0x26,0xaa,0x6a, -0xf2,0x32,0xb9,0xaf,0xa8,0x56,0x5b,0xb9,0xb9,0x99,0x36,0x6e, -0x95,0x4e,0x76,0x1d,0x33,0x89,0xf0,0x65,0x61,0x19,0xbb,0x9e, -0x77,0x2d,0x6a,0x47,0x4b,0xd1,0x4a,0xc2,0xb7,0x66,0x5c,0xd5, -0x5b,0x33,0x13,0x9b,0x9a,0x32,0x9b,0x39,0x9e,0x4b,0xf2,0x01, -0x38,0xec,0xe8,0x9e,0xf0,0x74,0xab,0xb4,0x53,0x8e,0x5f,0x9c, -0xa3,0x99,0xa3,0x2d,0xad,0x54,0x36,0x47,0xbb,0xc5,0x77,0x9d, -0x17,0xaf,0x1b,0xff,0x2b,0x85,0x93,0x47,0xd8,0x59,0xcc,0x64, -0x38,0xaf,0x34,0x8b,0xf9,0x20,0xfd,0x38,0xbf,0xea,0xd9,0xa4, -0x75,0xce,0x81,0x38,0x55,0xff,0xa2,0xda,0x77,0xb3,0xdf,0x7f, -0xb3,0x0f,0x12,0xec,0xf2,0x77,0xdc,0xa2,0x88,0x22,0xcc,0x4e, -0x5c,0xde,0x17,0x0a,0x84,0x86,0x97,0xb3,0x13,0x97,0x5d,0xc3, -0x13,0xd7,0xc8,0x4b,0x8e,0xaf,0x6b,0xfe,0x33,0xd4,0x23,0xf2, -0xd1,0x4f,0x20,0x35,0xdc,0x9d,0x5e,0xd6,0x8f,0xcd,0x05,0x9c, -0xf0,0x4b,0xc0,0x3a,0xbd,0x63,0x8b,0x04,0x93,0x52,0x4d,0x63, -0x90,0x3e,0x9e,0x40,0xe2,0xc9,0xf3,0x8a,0xa6,0x30,0xc8,0x9f, -0xe3,0xaa,0x05,0xcd,0x85,0x58,0x34,0x99,0x8c,0xc6,0x0a,0xcd, -0x0b,0x98,0xd7,0x71,0xd5,0xf2,0x1d,0x35,0xf9,0xe5,0xb7,0xd1, -0xd7,0x95,0x56,0x7b,0xc9,0xcc,0x5e,0xd0,0x6d,0xb7,0x93,0xe5, -0x5e,0xce,0x37,0x18,0xba,0x32,0x59,0x76,0xbd,0x17,0x77,0x1d, -0x09,0xb5,0x98,0xcf,0x2d,0xf7,0xa2,0x37,0xf8,0xfd,0xdb,0xe8, -0x7b,0xac,0x96,0x74,0xe6,0x96,0xef,0xdd,0x92,0x49,0x5b,0xac, -0x7b,0x76,0x6f,0xbf,0x78,0x7b,0x6d,0x6d,0xf1,0xde,0x8b,0x27, -0x84,0x5a,0xd8,0xed,0x24,0xd6,0x62,0xc7,0x9a,0x5c,0x24,0xd2, -0xa0,0xd6,0x38,0x9d,0x0d,0x8e,0x4c,0x30,0x59,0x93,0x1b,0x8b, -0xb5,0x48,0xc4,0x5d,0x2e,0x2f,0x29,0xbb,0x0c,0xc9,0x46,0x25, -0xa2,0x3f,0xb0,0xbe,0x10,0x3b,0xb4,0xf5,0x25,0x68,0x35,0xfa, -0x12,0x7a,0x00,0x3d,0x8d,0x5e,0x42,0x3f,0x45,0xbf,0x23,0x75, -0x91,0x62,0xe3,0xa7,0x08,0x67,0x9c,0x76,0x83,0xcf,0x62,0xa2, -0xc7,0xd4,0x49,0x72,0xa5,0xff,0x40,0x61,0x27,0xc9,0x71,0xcb, -0x83,0x44,0xa9,0xf4,0xcc,0xeb,0xb6,0x72,0x6b,0x83,0x8c,0xfd, -0x15,0x80,0xae,0x34,0x11,0x23,0x3e,0x79,0x1e,0x58,0x3c,0x35, -0xe1,0xe2,0x32,0x93,0xf6,0xf0,0xc7,0x89,0x97,0xfd,0xb2,0x6e, -0xb0,0x49,0x03,0x8f,0xa6,0xc1,0xba,0x5f,0xfe,0xb2,0xb9,0xb3, -0xb3,0xf9,0x5c,0x76,0x22,0xf8,0xd8,0xd2,0x52,0xdc,0xea,0x53, -0x63,0x4b,0x4b,0x49,0x34,0xec,0xac,0x93,0xbd,0x65,0x6e,0xc9, -0xdb,0x12,0x77,0xd9,0xaa,0x17,0xd9,0xb9,0x77,0x5c,0x48,0x2f, -0x4d,0x66,0xdf,0x9d,0x7c,0x4e,0x26,0x9d,0xdf,0x96,0x0e,0x85, -0x0b,0x1e,0x32,0xe7,0xbc,0x7e,0xe9,0x56,0x87,0xb2,0x5a,0xa1, -0x6d,0xad,0x65,0x97,0xf2,0x30,0x5b,0xaa,0x8c,0x7b,0x7f,0xb5, -0x8c,0x99,0x30,0x89,0x4c,0x6a,0xaa,0xaa,0x76,0x4f,0x99,0x44, -0x46,0x37,0x97,0xb9,0xca,0x66,0x3a,0xbf,0x34,0x88,0xef,0xf6, -0x2f,0x6c,0x6a,0x7c,0xa8,0xb1,0xb1,0xdb,0xdf,0xdf,0xbb,0xe8, -0xa6,0x45,0xbd,0x8c,0x01,0xcf,0xfa,0xe4,0x15,0xa8,0x4a,0x7f, -0xb7,0xc2,0x4d,0xe0,0xe3,0xff,0x70,0xc5,0x73,0x94,0x92,0x90, -0x05,0x0d,0x7a,0x0e,0x3f,0x79,0x38,0x18,0xf2,0xcf,0x9d,0x23, -0x71,0x4a,0x12,0x35,0x03,0x8b,0xee,0x58,0x34,0x50,0x56,0x56, -0x99,0x70,0xd4,0xf4,0x31,0xb7,0x50,0xc7,0x67,0x98,0x7c,0x16, -0x09,0xf1,0x93,0xcf,0x8a,0x4f,0x9f,0xe6,0xc4,0xec,0xff,0x8a, -0xa0,0x10,0xe8,0xd7,0x8f,0x84,0x24,0x66,0x67,0x11,0xba,0x08, -0xdd,0x82,0xee,0x43,0x4f,0x82,0x6e,0xfd,0x18,0x7a,0xd3,0x33, -0x56,0x9e,0x33,0x57,0x33,0x1c,0xff,0xe7,0xaa,0x12,0xf5,0xc2, -0x27,0xae,0x5a,0x46,0x7d,0xef,0x13,0xb3,0x9c,0x4a,0xfc,0x63, -0xf5,0xe7,0xae,0x4f,0xd6,0x15,0x32,0x67,0xea,0x93,0xf2,0xd0, -0xcf,0xfd,0xe3,0x14,0x47,0x88,0xbe,0x82,0x1d,0xa2,0x7e,0xfa, -0x1b,0xc8,0x0c,0xbd,0x35,0xf1,0x04,0x0e,0x73,0x76,0x79,0xc6, -0xff,0xe9,0xfa,0xb8,0xdb,0x75,0x9a,0x7f,0x10,0x49,0xcd,0xe0, -0x55,0xbc,0x1b,0x57,0xf5,0xac,0x30,0x68,0xd4,0x41,0xbd,0x3e, -0x11,0x54,0xaa,0x14,0x8a,0x68,0xa3,0x8f,0x79,0x6a,0xd3,0x53, -0xa1,0x78,0x3c,0xf4,0xd4,0x57,0x03,0xe1,0x70,0xe0,0xab,0xf8, -0xaf,0xdc,0x5f,0x52,0x5c,0x8a,0x6f,0x67,0x5e,0xc6,0x7a,0xe6, -0x1d,0xfa,0x1b,0xcb,0xe7,0x7b,0xb3,0x6a,0x8d,0x9a,0x12,0x61, -0x8d,0x0f,0x98,0x70,0x80,0xcc,0x6a,0x1f,0x0c,0x07,0x9c,0x81, -0xf0,0xb2,0x80,0xcf,0xe1,0x0b,0x16,0xbf,0xd9,0x87,0xdf,0x5d, -0xba,0x94,0xd1,0xf5,0x51,0xc7,0x86,0x9e,0x5e,0xc1,0xfc,0x82, -0x1b,0x3f,0xbd,0x68,0x74,0x95,0xe8,0x02,0xe1,0x36,0xe8,0x79, -0x57,0xa1,0x73,0xd0,0x41,0xd6,0x07,0x4d,0xe2,0x4d,0xa6,0xcc, -0x50,0x9a,0xd9,0x49,0x8c,0x67,0xe8,0x83,0x26,0xc5,0x30,0x89, -0x66,0x0c,0x61,0x62,0xc3,0x4c,0x32,0x4e,0x40,0xb1,0xa9,0xe9, -0xc1,0x35,0x53,0x6c,0xbb,0x60,0xd5,0x94,0x15,0x01,0x3a,0xf5, -0xec,0xe4,0xa2,0x75,0xe3,0x0b,0x02,0xcc,0x9b,0x8f,0xbb,0x8b, -0xa6,0x29,0xcb,0xb8,0xd9,0x2b,0x26,0xae,0xe2,0xe6,0xf3,0x4d, -0x5b,0xc4,0x4d,0xc3,0xd7,0xe0,0xf4,0x80,0x9d,0x9b,0xd7,0x55, -0xee,0xaf,0x1c,0xf7,0x12,0x1b,0xec,0xe2,0x19,0xbc,0xc4,0xd4, -0x47,0x0d,0xa9,0x09,0x1e,0x50,0xb9,0x50,0x48,0x82,0x93,0x22, -0x6e,0xce,0x03,0xea,0x74,0x4d,0x5a,0xc9,0xd6,0xe7,0xb3,0x59, -0x2b,0xe4,0xe3,0xf5,0xcf,0x21,0x02,0x2e,0xfe,0x87,0x45,0x04, -0xdc,0xbf,0x98,0x2b,0xd1,0xd7,0xc6,0xfe,0xca,0x9d,0x70,0x6e, -0xcc,0xff,0x7f,0xbb,0x02,0x10,0x3d,0xe6,0x8f,0x89,0x51,0x3d, -0x9f,0xa6,0x91,0x17,0x5d,0xc3,0xa7,0x05,0x90,0xe7,0x07,0x7c, -0x5a,0x88,0x54,0x18,0xf3,0x69,0x11,0x92,0xe3,0x10,0xe4,0xc4, -0x82,0x32,0xfe,0xac,0x5c,0x1a,0x03,0x6e,0xa7,0xf9,0x34,0x05, -0x72,0x23,0x7c,0x9a,0x46,0x1d,0xc0,0x52,0xb9,0xb4,0x00,0xf2, -0x3c,0xce,0xa7,0x85,0xa8,0x02,0xbd,0xc5,0xa7,0x45,0xa8,0x1c, -0x6b,0xc8,0xa9,0x5a,0xd1,0x2e,0xb4,0x1d,0x6d,0x81,0x26,0xb1, -0x0a,0xad,0x01,0xe2,0xdd,0x0e,0xdb,0xad,0xb0,0xbf,0x03,0xbe, -0xda,0xb5,0x7d,0xcb,0xf0,0xaa,0x35,0x95,0xed,0xab,0xb6,0x6e, -0x81,0xdd,0x6e,0xf8,0x7e,0x1d,0xe4,0xde,0x04,0x79,0xb7,0xc3, -0xee,0x9a,0x75,0xbb,0x36,0x0d,0x6f,0x27,0x67,0x20,0xf9,0x77, -0xb2,0xdb,0xed,0x90,0x83,0x9c,0xa5,0x06,0xde,0xa7,0x3f,0x33, -0xf7,0x7d,0x12,0xe5,0xe1,0x92,0xd3,0xf0,0x4e,0x02,0xdd,0x4f, -0x42,0x0a,0xb5,0x6e,0xdd,0xb2,0xb3,0x75,0xeb,0xf6,0x75,0x6b, -0x2a,0x6b,0x2a,0x27,0x49,0x87,0xfd,0x64,0x3e,0x92,0x8e,0x24, -0xe3,0xc9,0xf4,0xd9,0x5c,0xf3,0x62,0xf8,0x7e,0x3b,0x1c,0x5f, -0xcf,0x7e,0x4f,0xdc,0x0a,0x71,0x94,0x40,0x51,0x76,0x1b,0x87, -0xaf,0xd7,0x6c,0xdf,0xb1,0x7e,0xeb,0x96,0xca,0x78,0x3c,0x11, -0x8d,0xc7,0xe3,0x53,0xcf,0x3c,0xfd,0xbc,0xfc,0x69,0xc9,0x3d, -0x9c,0xf8,0xc0,0xd3,0xfe,0xcb,0x7e,0x23,0x7b,0x94,0x42,0x34, -0xa6,0x30,0x0d,0x76,0x59,0x88,0x45,0x58,0x8c,0x25,0xb8,0x0c, -0x4b,0xb1,0x0c,0xcb,0xb1,0x02,0x13,0x33,0xaf,0x06,0xdc,0xae, -0xc5,0x3a,0xac,0x07,0x04,0x6f,0xc4,0x26,0x5c,0x0e,0xc8,0xdd, -0x82,0xad,0xd8,0x86,0xed,0xd0,0xd0,0x1c,0xb8,0x12,0x43,0xeb, -0xc4,0x6e,0xec,0xc1,0x5e,0xec,0xc3,0x7e,0x5c,0x85,0x03,0x38, -0x08,0xcd,0x2b,0x8c,0x23,0xd0,0x75,0xc4,0x70,0x1c,0x27,0x70, -0x12,0xa7,0x70,0x1a,0x67,0x70,0x16,0xe7,0x70,0x35,0xce,0xe3, -0x1a,0x5c,0x8b,0xeb,0x70,0x3d,0x26,0xce,0xf6,0x26,0x5c,0xc0, -0xcd,0x78,0x16,0x6e,0xc1,0xb3,0x71,0x2b,0x9e,0x83,0xdb,0x70, -0x3b,0xee,0xc0,0x9d,0xb8,0x0b,0xcf,0xc5,0xf3,0xf0,0x7c,0xbc, -0x00,0x2f,0xc4,0xdd,0x78,0x11,0xee,0xc1,0xbd,0x78,0x31,0x5e, -0x82,0xfb,0xf0,0x52,0xdc,0x8f,0x97,0xe1,0x01,0x3c,0x88,0x97, -0xe3,0x15,0x78,0x08,0x0f,0xe3,0x95,0x78,0x15,0x5e,0x8d,0xd7, -0xe0,0xb5,0x80,0xa9,0x47,0xc4,0xbb,0xb6,0xac,0x9f,0x1d,0x6f, -0x8d,0xf3,0xdb,0x04,0xbf,0x4d,0xf2,0xdb,0x14,0xbf,0x4d,0xb3, -0xdb,0x44,0x3c,0xce,0x6f,0x13,0xfc,0x36,0xc9,0x6f,0x53,0xfc, -0xb6,0x94,0x2f,0xc3,0x6f,0xb3,0xfc,0x36,0xc7,0x6f,0xab,0xf9, -0x6d,0x9e,0xdf,0x16,0xf8,0x6d,0x33,0xbf,0x9d,0xc5,0x6f,0x5b, -0xf8,0xed,0x6c,0x7e,0xdb,0xca,0x6d,0x13,0xbc,0xfc,0x04,0x2f, -0x3f,0xc1,0xcb,0x4f,0xf0,0xf2,0x13,0xbc,0xfc,0x04,0x2f,0x3f, -0xc1,0xcb,0x4f,0xf0,0xf2,0x13,0xbc,0xfc,0x04,0x2f,0x3f,0xc1, -0xcb,0x4f,0xf0,0xf2,0x13,0xbc,0xfc,0x04,0x2f,0x3f,0xc1,0xcb, -0x4f,0xf0,0xf2,0x93,0xbc,0xfc,0x24,0x2f,0x3f,0xc9,0xcb,0x4f, -0xf2,0xf2,0x93,0xbc,0xfc,0x24,0x2f,0x3f,0xc9,0xcb,0x4f,0xf2, -0xf2,0x93,0xbc,0xfc,0x24,0x2f,0x3f,0xc9,0xcb,0x4f,0xf2,0xf2, -0x93,0xbc,0xfc,0x24,0x2f,0x3f,0xc9,0xcb,0x4f,0xf2,0xf2,0x53, -0xbc,0xfc,0x14,0x2f,0x3f,0xc5,0xcb,0x4f,0xf1,0xf2,0x53,0xbc, -0xfc,0x14,0x2f,0x3f,0xc5,0xcb,0x4f,0xf1,0xf2,0x53,0xbc,0xfc, -0x14,0x2f,0x3f,0xc5,0xcb,0x4f,0xf1,0xf2,0x53,0xbc,0xfc,0x14, -0x2f,0x3f,0xc5,0xcb,0x4f,0xf1,0xf2,0xd3,0xbc,0xfc,0x34,0x2f, -0x3f,0xcd,0xcb,0x4f,0xf3,0xf2,0xd3,0xbc,0xfc,0x34,0x2f,0x3f, -0xcd,0xcb,0x4f,0xf3,0xf2,0xd3,0xbc,0xfc,0x34,0x2f,0x3f,0xcd, -0xcb,0x4f,0xf3,0xf2,0xd3,0xbc,0xfc,0x34,0x2f,0x3f,0xcd,0xcb, -0x4f,0xf3,0xf2,0x33,0xbc,0xfc,0x0c,0x2f,0x3f,0xc3,0xcb,0xcf, -0xf0,0xf2,0x33,0xbc,0xfc,0x0c,0x2f,0x3f,0xc3,0xcb,0xcf,0xf0, -0xf2,0x33,0xbc,0xfc,0x0c,0x2f,0x3f,0xc3,0xcb,0xcf,0xf0,0xf2, -0x33,0xbc,0xfc,0x0c,0x2f,0x3f,0xc3,0xcb,0xcf,0xf0,0xf2,0xb3, -0xbc,0xfc,0x6c,0x82,0x58,0x83,0xd1,0xd1,0xb1,0xde,0x00,0x21, -0x39,0xd2,0x83,0x6d,0xe6,0xec,0x08,0x1e,0xb3,0x20,0xec,0xe7, -0x9b,0xbd,0x23,0x95,0xec,0xb6,0x38,0x7a,0x9c,0x6c,0xdf,0xee, -0x79,0x6f,0xc7,0xff,0x0b,0xb1,0x12,0x6f,0x96 +0x78,0xda,0xed,0xbd,0x07,0x7c,0x1c,0xd5,0xb5,0x3f,0x7e,0xef, +0xcc,0x36,0x6d,0xef,0xab,0x6d,0x5a,0x6d,0xd7,0x56,0x6d,0x5f, +0xad,0xfa,0xca,0x92,0xac,0xe6,0x26,0xcb,0xb6,0x2c,0x4b,0xb6, +0x64,0xcb,0xb6,0xdc,0x8d,0x1b,0x86,0xd8,0xb8,0x42,0x08,0x98, +0x1a,0xc2,0x23,0x14,0x9b,0x1a,0x42,0x0d,0x98,0x16,0xca,0x23, +0x79,0xbc,0x50,0x42,0x1c,0xe0,0x97,0x42,0x48,0x23,0x94,0x24, +0x2f,0xc9,0x83,0x84,0x97,0x3f,0x79,0x21,0xd8,0x3b,0xfa,0x9f, +0x3b,0x33,0xab,0x6e,0xb0,0x1d,0xf2,0x4b,0xfe,0xff,0x0f,0xb3, +0x3b,0x3b,0x77,0x66,0xef,0xde,0x33,0xf7,0xce,0xb9,0xe7,0x7e, +0x4f,0xb9,0x77,0x11,0x46,0x08,0x29,0xd1,0x7e,0x44,0xa3,0xc1, +0xd6,0xd6,0x9e,0x39,0x5f,0xab,0xbf,0xe2,0x32,0x84,0x2e,0xdf, +0x0a,0x57,0x6d,0xb3,0x9b,0x5b,0x5a,0x91,0x01,0xe9,0xe1,0xbc, +0x87,0x9c,0xcf,0x5b,0x58,0x99,0x38,0xf2,0x71,0xf7,0x0d,0x08, +0xe1,0x11,0x38,0x5f,0xbc,0x6a,0xd3,0xd0,0xd6,0xef,0x3f,0xf8, +0xfa,0xb7,0x10,0xa2,0xee,0x84,0xdd,0xb7,0x6a,0xd7,0x8e,0x72, +0x54,0x23,0xd8,0x82,0x90,0xe0,0x04,0x7c,0x2f,0x58,0x3b,0xb4, +0x7d,0xeb,0xe8,0x28,0x94,0x8c,0x2e,0xef,0x82,0x73,0xc9,0xda, +0x8d,0x17,0xac,0x59,0xb0,0xe7,0xd7,0x46,0x84,0x84,0x0f,0x21, +0xb4,0x6f,0x78,0x64,0xf5,0xd0,0xb0,0xef,0xeb,0x26,0x48,0xa3, +0xf7,0x60,0xcf,0x8c,0xc0,0x85,0x92,0x83,0x22,0x21,0x94,0xef, +0x81,0x73,0xcf,0xc8,0xa6,0x1d,0xbb,0x13,0x5e,0xdb,0x26,0x38, +0xff,0x36,0x9c,0xff,0x7a,0xe3,0x96,0x55,0x43,0x5f,0x4e,0x6f, +0x7f,0x13,0x8a,0x7e,0x0d,0xce,0xdf,0xdc,0x34,0xb4,0x7b,0x2b, +0x7a,0x9a,0x86,0xdf,0xe2,0x36,0x38,0x2f,0xdf,0x3c,0xb4,0x69, +0xf5,0x9e,0x77,0x5f,0x2d,0x47,0xe8,0x62,0xb8,0x67,0xfc,0xdb, +0xad,0x5b,0xb6,0xef,0xd8,0x18,0x3b,0xf5,0x3b,0x84,0x2e,0x39, +0x05,0xbf,0x99,0x8b,0x48,0x5d,0x61,0xff,0x7d,0xd9,0xb1,0xe7, +0x56,0xa8,0x6a,0xff,0x82,0x64,0x62,0x44,0xb6,0xb7,0x0a,0xa3, +0xc7,0xc8,0xf1,0x5d,0xe9,0xab,0x27,0x4e,0xed,0x67,0x46,0xc4, +0x48,0xf8,0x16,0xb9,0x5f,0x44,0x21,0x6e,0x83,0xdf,0x88,0xd0, +0x28,0x24,0xc4,0xe8,0xd4,0x7e,0xf2,0xc9,0x96,0x34,0x71,0x13, +0xb0,0x57,0x36,0xd3,0x4f,0x23,0x19,0x7b,0x4e,0xb1,0xbf,0x22, +0xd7,0x1a,0x51,0x94,0x2b,0x43,0x8c,0xf0,0xd5,0x08,0xea,0x26, +0x38,0x22,0xf8,0x2d,0x9c,0x7f,0xcc,0x1d,0xe9,0x7e,0xb4,0x14, +0xbf,0x4a,0x7e,0x20,0x2c,0x19,0x2b,0x0d,0xab,0x27,0x14,0xdd, +0xba,0x73,0x5b,0x0f,0x94,0x52,0xfe,0xf6,0x30,0x77,0x0f,0x22, +0x8e,0x38,0x7f,0x07,0x70,0x2f,0x35,0xfc,0x91,0xdd,0x4f,0xed, +0xa7,0x4a,0xd0,0x35,0x90,0xe8,0x46,0xe5,0x40,0xf9,0x2e,0x94, +0x46,0x9d,0x28,0x80,0xae,0xc1,0x9b,0xd0,0x6e,0xa8,0xd1,0x20, +0x9a,0x8d,0xba,0xb1,0x09,0x49,0x51,0x07,0xba,0x0a,0x27,0x90, +0x15,0xcd,0x43,0x51,0xf8,0xc5,0xcb,0xb8,0x14,0x67,0xd0,0x3d, +0xf0,0x5d,0x05,0x4a,0xe2,0x39,0x08,0xee,0x08,0xf2,0xd0,0xc8, +0x85,0xf7,0xe0,0x0b,0x51,0x0e,0xe5,0xb0,0x1f,0xbf,0x82,0x74, +0xa8,0x0b,0x6f,0x47,0x2e,0x34,0x1b,0xce,0x64,0xe8,0x62,0xf4, +0x18,0x9c,0x2f,0x43,0x51,0xdc,0x89,0xfa,0xd9,0x57,0x10,0xf6, +0x85,0xb0,0x77,0xa2,0xe5,0x70,0x7c,0x09,0xf5,0xe3,0xc5,0x38, +0x8a,0x36,0xa0,0x32,0xd4,0xca,0xbe,0xf6,0xf2,0xaf,0x56,0xd4, +0x02,0x65,0xdd,0x3a,0xe9,0xb5,0x0a,0x5e,0xc7,0xd0,0xbd,0xb8, +0x06,0xee,0xe3,0x67,0xd0,0x8a,0x21,0xf4,0x35,0xa0,0x70,0x02, +0xfd,0x0e,0x3e,0x11,0xe1,0x21,0x76,0xb7,0xf1,0x95,0x2f,0x87, +0x33,0xcc,0x9e,0x0b,0xb0,0x80,0x7d,0x56,0xdc,0xd3,0x2a,0x7f, +0xeb,0xc3,0xb7,0x87,0x47,0x47,0xd9,0xd4,0x07,0x6f,0xa3,0xd1, +0xd1,0xd1,0x77,0x8b,0x4f,0x10,0x1a,0x4e,0xc9,0x3e,0x29,0x21, +0xa4,0xc4,0x90,0xbf,0x04,0x6a,0x28,0x43,0x72,0xa4,0x80,0xeb, +0x2a,0xa4,0x46,0x1a,0xa4,0x85,0xbb,0xd2,0x03,0xc7,0x1b,0x91, +0x09,0x95,0x22,0x33,0xb2,0x40,0xfb,0xd8,0x90,0x1d,0xee,0xdf, +0x01,0xad,0xe9,0x84,0x9a,0xbb,0x91,0x07,0x79,0x91,0x0f,0xf9, +0x51,0x05,0xb4,0x6a,0x10,0xee,0x32,0x8c,0x22,0xd0,0xce,0x95, +0x28,0x86,0xe2,0x28,0x81,0x92,0x28,0x05,0x2d,0x9e,0x41,0x59, +0x54,0x05,0xad,0x56,0x0d,0xcf,0xa6,0x16,0xd5,0xa1,0x7a,0xd4, +0x00,0x4f,0x30,0x8f,0x9a,0xd0,0x2c,0xd4,0x0c,0x75,0x6f,0x85, +0xa7,0xd0,0x86,0xda,0xe1,0x19,0x74,0xa2,0x2e,0x34,0x07,0xcd, +0x85,0xa7,0x30,0x1f,0x2d,0x80,0x67,0xb6,0x10,0xf5,0xa0,0x45, +0x68,0x31,0x5a,0x82,0x7a,0xd1,0x52,0xd4,0x87,0x96,0x41,0x6b, +0x0e,0x40,0x6b,0xae,0x80,0x27,0x37,0x84,0x56,0x42,0x1b,0x0d, +0xa3,0xd5,0x68,0x0d,0x5a,0x8b,0x46,0xd0,0x3a,0xb4,0x1e,0xda, +0x76,0x23,0x22,0xfd,0x43,0x34,0xce,0x92,0x98,0xe2,0xf9,0x6f, +0xe2,0x86,0xb9,0xe6,0xfb,0xff,0xf9,0xc6,0xca,0x1e,0x78,0x22, +0xdc,0xab,0x16,0x1d,0x46,0x2f,0x08,0x86,0x85,0x1e,0xe1,0x77, +0x44,0x3f,0x12,0xf7,0x8a,0xff,0x20,0x79,0xa5,0x24,0x55,0xb2, +0x4b,0xfa,0x90,0x94,0x91,0x5d,0x2a,0xfb,0xa3,0x3c,0x2a,0xff, +0xad,0x62,0xbd,0xe2,0x0d,0xe5,0xb0,0xf2,0x65,0xd5,0x9d,0xea, +0x3e,0xf5,0x33,0x9a,0x8b,0x34,0x2f,0x68,0xaf,0xd5,0xc9,0x75, +0x47,0x74,0x6f,0xe8,0x6f,0x30,0xb4,0x19,0xab,0x4c,0x5a,0xd3, +0x7e,0x6b,0x99,0xf5,0x41,0x5b,0xca,0xf6,0x6d,0xfb,0x1f,0x1c, +0x12,0xc7,0x33,0xe5,0xfb,0x9d,0x29,0xe7,0x65,0xce,0x53,0xae, +0x4b,0xdc,0x2f,0xf9,0x83,0xfe,0x97,0x2b,0x1e,0x0a,0x74,0x07, +0x5e,0x08,0x4a,0x83,0xcf,0x86,0xee,0x0c,0x7d,0x18,0x35,0x46, +0x9b,0xa3,0x23,0xd1,0x2b,0x2b,0x3f,0x88,0xc9,0x63,0xeb,0x63, +0x3f,0x88,0x97,0xc5,0x17,0xc7,0xef,0x8f,0xbf,0x19,0x7f,0x2f, +0xf1,0x54,0x72,0x38,0xf9,0x42,0xaa,0x31,0xf5,0x4c,0xba,0x3a, +0xfd,0x78,0xfa,0xcd,0x8c,0x25,0xd3,0x94,0xb9,0x3a,0xf3,0xeb, +0xac,0x2d,0x7b,0x24,0x7b,0x34,0x7b,0x3c,0xfb,0x42,0xf6,0x67, +0xd9,0x3f,0x56,0x51,0x55,0xfa,0xaa,0x8e,0xaa,0x3d,0x55,0xbf, +0xcd,0x79,0x72,0x5b,0x73,0x1f,0x56,0x6f,0xab,0xb9,0xbd,0xf6, +0xd9,0xba,0x68,0xdd,0x87,0xf5,0xc3,0xf5,0xaf,0x34,0x1c,0x67, +0x9f,0x2c,0xf4,0x77,0xca,0x20,0xb8,0x17,0x1e,0xa8,0x18,0x45, +0x1f,0xc6,0xa8,0xb2,0xf6,0xb8,0x58,0x80,0xde,0x4f,0x3c,0x2c, +0x12,0xfe,0xa2,0xf6,0x38,0x4d,0x41,0x12,0x3d,0x4c,0x93,0xcb, +0x42,0x72,0xf9,0xb8,0x58,0x84,0x4f,0xd5,0x1e,0xc7,0xe4,0x7a, +0x52,0xe3,0xd4,0x78,0x9d,0x1a,0x67,0x0d,0xfe,0x19,0x33,0x84, +0x87,0x99,0x9b,0x05,0xf7,0x9e,0x5c,0x5c,0x23,0x48,0x91,0x72, +0x4f,0xed,0x1f,0xfd,0x0b,0xbd,0x9f,0xe5,0x15,0x60,0x15,0xa1, +0xd3,0xeb,0x2c,0x24,0x85,0x37,0xfe,0xed,0x11,0x31,0x92,0x11, +0x99,0x46,0x83,0x94,0x50,0x09,0xfe,0x4a,0x17,0xa0,0x4f,0x78, +0x81,0xdf,0x11,0x8e,0x39,0x13,0x46,0x83,0x5e,0x89,0xc5,0x22, +0xb1,0xc1,0x68,0x32,0x9a,0xca,0xb0,0x41,0x0f,0x69,0x25,0x76, +0x3b,0xb3,0xce,0x44,0xa6,0x0e,0xa7,0x7c,0x6e,0x67,0x3a,0xc9, +0xa5,0x42,0x98,0x92,0xe2,0x7f,0xdf,0x7b,0xa5,0x23,0x5e,0x5e, +0x5e,0x56,0xe6,0xf5,0x96,0x3b,0x42,0x3a,0xbd,0xcb,0xbd,0xa2, +0x8a,0x31,0xdd,0x8e,0x4b,0x1b,0xda,0xda,0x1a,0x98,0xdf,0x9d, +0xaa,0x6b,0x6a,0xaa,0x3b,0x45,0x17,0xae,0x38,0xbf,0x6a,0x5e, +0x42,0x21,0xa7,0x25,0x94,0x42,0x61,0xb3,0xf5,0x36,0xd4,0x66, +0xd2,0x7e,0x7f,0xf8,0xf2,0xa6,0xfa,0x78,0x7d,0xd3,0xa5,0xf5, +0xb9,0x68,0x75,0x3d,0x2b,0x0d,0xae,0x41,0xab,0x44,0x5b,0xe8, +0x7b,0xa0,0xef,0x9a,0xa0,0x1f,0x22,0x6f,0xcc,0x1f,0x73,0xc6, +0xc4,0x31,0x77,0x46,0x9b,0x4d,0x1a,0xb5,0x26,0x1c,0x73,0x8b, +0xc4,0xb1,0xa4,0x0f,0xc7,0x34,0xc8,0x1f,0x4b,0xc6,0x74,0xdc, +0x2e,0xa2,0xc4,0x9a,0x18,0xf5,0x87,0x2e,0xe6,0xc5,0xf6,0xcb, +0x2a,0xbf,0x55,0x79,0x1f,0xec,0xcc,0x15,0xa2,0xda,0xba,0xbf, +0xd6,0x52,0x87,0x99,0xbf,0x9a,0x6e,0x3a,0x21,0xf8,0xde,0x75, +0xd9,0x57,0xec,0xab,0xde,0x7d,0xf7,0x08,0x15,0x3d,0x72,0xa4, +0xf0,0x83,0x23,0xd4,0x77,0x9f,0x7c,0xf2,0xc9,0xc2,0x07,0xb8, +0x03,0xff,0xa8,0x82,0xb9,0x1c,0xef,0x1c,0x62,0x6e,0x4c,0x30, +0x8f,0x20,0x5e,0x22,0xdd,0x27,0x46,0xf4,0x10,0xdd,0x4b,0x1f, +0xa1,0x9f,0x42,0x28,0xeb,0xa3,0xfc,0xc9,0x98,0x9d,0x32,0xd9, +0x05,0x26,0x3b,0x3d,0xed,0x2d,0x38,0xa7,0x2b,0xff,0x94,0x6c, +0x67,0xfa,0xc3,0x32,0x6c,0x4a,0xd6,0xe3,0x2c,0xdf,0xe6,0xfc, +0x59,0x1d,0x3d,0xe1,0x2d,0x98,0x7c,0x7a,0x86,0x57,0xfe,0x29, +0xd9,0xce,0xe5,0x87,0x84,0xa1,0xdc,0xf0,0xd8,0xa3,0xd8,0xef, +0x26,0x7d,0x81,0x12,0x0b,0x5d,0x3e,0x3f,0x34,0x42,0x19,0x4e, +0x26,0xd2,0x29,0x1f,0xf9,0xc2,0xe7,0xf7,0xa5,0x53,0x99,0x64, +0xc2,0x68,0x82,0x1c,0x51,0xec,0x76,0x89,0x0c,0x7a,0xb6,0xc3, +0x70,0x6f,0x83,0x5e,0xe4,0x85,0xdf,0xba,0x5d,0x24,0xa3,0xdf, +0x97,0xca,0x66,0xb2,0xf5,0xf0,0x63,0xc8,0xc1,0x65,0xb6,0x63, +0xbd,0x31,0x99,0xc8,0xd6,0x53,0x75,0xd8,0x9d,0x4e,0x6a,0xdc, +0x57,0x96,0x2e,0x2f,0x1d,0xc1,0x9f,0xe9,0x26,0x50,0x0a,0xe4, +0x02,0x25,0xad,0xcc,0x29,0xbf,0xa0,0xca,0x29,0x69,0x15,0xad, +0xa0,0x95,0x82,0xcf,0x96,0xc4,0x70,0xe9,0x4a,0xf3,0x85,0xca, +0x6a,0x52,0xb8,0x1c,0x0a,0x57,0xd5,0xaa,0xa8,0x0f,0x3a,0x37, +0xfb,0x65,0x95,0x72,0xfb,0x9c,0xf8,0xf9,0xc1,0x54,0x89,0x47, +0xda,0x17,0x0a,0x6e,0x5d,0xdd,0xb6,0xca,0x03,0xd7,0x2c,0x8d, +0xf1,0x6c,0xd6,0x68,0x8c,0x97,0x78,0x4a,0x62,0xcd,0x06,0xa3, +0x6e,0x07,0x35,0x4b,0x5e,0x32,0xaf,0x2d,0x15,0x0e,0x39,0xcb, +0x75,0x5a,0xad,0xd6,0xe5,0x5a,0x51,0xd7,0x97,0xad,0x2a,0x5b, +0xa8,0x69,0xad,0x6d,0x9b,0x3f,0xbf,0xad,0xcc,0x62,0xf1,0x1b, +0xf7,0xfc,0xaa,0xef,0x89,0xad,0xf8,0xd9,0xad,0xf8,0xf3,0xed, +0x5f,0x70,0xb3,0x8c,0x98,0xcd,0x6b,0xcd,0xcd,0x58,0xdd,0xdc, +0xcc,0x7c,0xd0,0x0c,0x49,0xf3,0x88,0xe5,0xf3,0x56,0xf9,0x57, +0xdc,0xb6,0x32,0x4d,0x5b,0x5b,0xb0,0xae,0xc5,0x02,0xcf,0x68, +0xad,0xa5,0x85,0x79,0xbf,0x45,0x56,0x95,0x91,0x05,0x65,0x81, +0xf0,0xa6,0x70,0xa5,0x82,0x12,0x53,0x86,0x70,0x64,0x41,0xff, +0x50,0x3c,0x25,0x0d,0xc8,0xbc,0x9e,0x48,0x2a,0x68,0x34,0xc8, +0x29,0x09,0x25,0x73,0x98,0x4c,0x0d,0x81,0xd5,0x23,0x9b,0x63, +0xf5,0x3a,0x5d,0x30,0xd0,0xd4,0xf4,0xcd,0xa6,0xa6,0x60,0xb0, +0xc2,0xef,0x9b,0x1d,0x8f,0xe7,0xfa,0xbb,0xef,0xec,0xee,0x97, +0x94,0x38,0xe3,0x65,0x35,0x4b,0x98,0xa3,0x44,0x59,0xe9,0x1e, +0xa5,0x44,0x0f,0x0a,0x2d,0x80,0xb2,0x3d,0x80,0x96,0xdb,0x01, +0xfb,0xee,0x06,0x3d,0x14,0x81,0xf8,0x4c,0xa7,0x40,0xd8,0x65, +0x93,0x22,0x16,0x4d,0x88,0x93,0x44,0x18,0x02,0xd2,0x10,0xf9, +0x13,0x80,0x24,0xdc,0x2e,0x10,0x87,0x34,0x19,0x67,0x61,0xbc, +0x31,0x9a,0x92,0x19,0x76,0xec,0x01,0xb1,0xeb,0x74,0x6b,0x9c, +0x20,0x33,0x21,0x9f,0x58,0xe7,0x26,0xd2,0x38,0x5b,0x44,0x1e, +0x06,0xec,0x22,0x62,0x38,0x05,0x59,0xb3,0x19,0x56,0xae,0x8a, +0x26,0x0a,0xd6,0x0c,0x88,0x6a,0x10,0xcc,0x42,0x0d,0x64,0xd4, +0xe0,0x34,0xbe,0x7d,0xc3,0x26,0xb5,0xaa,0x7a,0x5e,0xfc,0xb2, +0x9a,0x60,0xb0,0xcc,0xee,0x2d,0x91,0x6b,0x66,0xc7,0x17,0xac, +0xd8,0xbc,0x7e,0xd3,0xa6,0x8d,0x0e,0xe7,0x21,0xe7,0x06,0xdd, +0x7c,0xbd,0x52,0x29,0x57,0x2a,0xf5,0x73,0xf5,0xeb,0x9c,0x87, +0xca,0xf1,0x55,0xab,0x71,0xc9,0xe2,0x70,0x28,0x57,0xbd,0xff, +0x3c,0xc9,0x62,0xd3,0xee,0x9b,0x3c,0x3e,0x9f,0xe7,0x26,0xea, +0x81,0xea,0x01,0x97,0xd3,0xed,0x76,0xba,0xa2,0xd1,0x9a,0xc5, +0xc9,0xa4,0x43,0xd1,0xae,0xad,0x4f,0x37,0x77,0x75,0x35,0x67, +0x9a,0xb4,0xaa,0x2a,0x65,0xf9,0x3a,0xe6,0xd7,0xb8,0x82,0xd9, +0xc6,0xbc,0x51,0x38,0xbc,0xaf,0xb6,0xae,0x76,0xcb,0xa0,0x2b, +0x12,0xa8,0x08,0x54,0x2c,0x4e,0x54,0xc6,0xd7,0xaf,0x5d,0x7f, +0xfe,0xa2,0xf3,0xcd,0xe7,0xc3,0x9b,0x2e,0xdd,0x8a,0xbf,0xb5, +0xa5,0x95,0xf9,0xaf,0xd6,0xb9,0xf3,0xe6,0xcd,0x6d,0xc5,0xe6, +0xd6,0x2d,0x4c,0x7e,0x2b,0x75,0x34,0x99,0x1a,0x9c,0x33,0xa8, +0x61,0xfe,0x4b,0xf7,0xdd,0xcc,0x22,0x5f,0xb0,0x3e,0xe8,0x7b, +0x93,0xb9,0xd2,0x1f,0x0c,0x1e,0x7e,0xfc,0x70,0x30,0xa8,0xd7, +0x7b,0xbd,0x1d,0xe2,0x40,0x2e,0xb1,0xa2,0xfb,0xb6,0x85,0xcb, +0x33,0x35,0x12,0x67,0x49,0xc7,0xdc,0xe3,0x4c,0x0a,0xab,0x0f, +0x32,0xd7,0xe2,0xef,0x33,0x7f,0x3a,0xc8,0x69,0xac,0xe5,0xe8, +0x3e,0xd1,0x5b,0xf4,0x10,0xe8,0x40,0x06,0xd0,0x44,0x76,0x00, +0x7a,0x89,0x69,0x08,0xa6,0xd3,0x8b,0x42,0xd8,0x8c,0xc7,0x70, +0x1b,0xe6,0x86,0x33,0x40,0x78,0x70,0x89,0x1f,0xd0,0xa2,0x38, +0x9d,0xaa,0xa7,0xd8,0xa6,0xe4,0x47,0x34,0x31,0x0c,0x69,0x46, +0x07,0x26,0x83,0x99,0x92,0xe2,0x46,0xb3,0x28,0xc5,0x65,0x9a, +0x32,0x8c,0x91,0xc1,0x8d,0x1f,0xc8,0x9c,0xb8,0x7c,0x60,0xcd, +0x9a,0x81,0x47,0x1f,0x08,0x46,0x2b,0x03,0x0f,0x50,0xbf,0x5c, +0xb4,0x2b,0x28,0x4f,0x28,0xdc,0xa1,0x50,0x26,0x9f,0x8f,0xd6, +0x48,0xfd,0xd2,0x95,0x2b,0x9d,0x75,0x8b,0x33,0x5d,0x55,0xd9, +0x0a,0x45,0x42,0x61,0xe9,0xac,0xca,0x95,0x97,0xa7,0xb2,0xb5, +0xc3,0x03,0xe5,0x0d,0x7d,0xd4,0x2f,0x05,0xd2,0xe5,0x5d,0xb5, +0x6b,0x3a,0x02,0xc1,0x39,0x1b,0x9b,0xfa,0xf6,0xba,0x97,0xea, +0x16,0xd4,0xcd,0x1f,0x1a,0x9a,0x5f,0x6e,0xb3,0x1b,0x8d,0xe6, +0xcb,0xfe,0x9f,0x15,0x4f,0x50,0x47,0x37,0x3d,0xb9,0x89,0xf9, +0x0b,0x5e,0x1f,0xaa,0x88,0x06,0x42,0x85,0xc7,0xeb,0x52,0x30, +0xb0,0x84,0x8c,0xa6,0xea,0xb8,0x3f,0x2a,0x07,0x2e,0xd6,0xf6, +0x2f,0x08,0xb7,0xc5,0xad,0x56,0x4b,0x42,0x16,0x91,0x39,0x03, +0xa6,0xd2,0x70,0x30,0x20,0x93,0xeb,0x06,0xe6,0x57,0xce,0xc9, +0xda,0xcf,0x8b,0x37,0x46,0x96,0x1c,0xec,0xe9,0x39,0xd0,0x1b, +0x9d,0x3f,0x3b,0x55,0x59,0xb3,0x66,0x60,0xf3,0xc0,0x9a,0x12, +0x89,0x5a,0x55,0x59,0x9e,0x1a,0x60,0x6e,0x02,0x2d,0x32,0x0a, +0xed,0xf7,0x03,0x68,0x3f,0x2d,0x68,0x87,0x41,0x94,0xc2,0xad, +0x80,0x41,0x8b,0x8c,0x56,0x8f,0x13,0x65,0x14,0xb4,0x84,0x9f, +0x6b,0x45,0xae,0xf2,0x42,0x96,0x41,0xa7,0x34,0xaf,0x90,0xb0, +0xaa,0x5d,0x6c,0xb2,0xab,0x4c,0x76,0x65,0xf1,0xad,0x2a,0x7e, +0x62,0x8d,0x5b,0x53,0x04,0x56,0x75,0x42,0x7f,0x9d,0xca,0x5f, +0xa7,0x2c,0xbe,0xc7,0xd2,0x02,0x0d,0xb4,0xa5,0x8f,0xc2,0xc9, +0xda,0x41,0xb7,0xcb,0x0d,0xef,0x15,0x17,0x0e,0x36,0xbb,0xdd, +0xcd,0x43,0xb5,0x6d,0xf3,0xe6,0x5d,0x3d,0x6f,0x1e,0xfe,0x15, +0xcb,0xa0,0x4b,0x16,0xdf,0x71,0xa3,0x17,0xb6,0x1b,0xa9,0x55, +0x12,0x57,0x89,0xbc,0xd8,0xd9,0x57,0xee,0x74,0x5e,0xec,0x92, +0xb8,0x25,0x8a,0xb1,0x0b,0xbb,0x9c,0x17,0xdf,0x5f,0x64,0xa6, +0x8a,0x8a,0x1e,0x38,0xf6,0xf8,0xfb,0x06,0xba,0x6f,0xef,0x1e, +0x60,0x3f,0xe6,0x11,0xf6,0xfb,0x8f,0xb5,0xcc,0xff,0xe0,0x75, +0xde,0x60,0x5d,0xc0,0x77,0xdc,0xb0,0xd0,0xf0,0x4f,0x15,0x57, +0x14,0x03,0x3d,0x62,0x16,0xf3,0xe1,0xac,0x7f,0xfa,0x8d,0xe0, +0xab,0x0b,0x2b,0x67,0x61,0x39,0xd7,0xbf,0xee,0x42,0x3d,0xa2, +0x65,0xf4,0x37,0x41,0x57,0x6a,0x03,0xad,0x7e,0x39,0xd1,0x50, +0xc6,0xfa,0x05,0x2f,0x8a,0xc6,0x01,0xe1,0x58,0xe7,0x80,0x17, +0xe9,0x1d,0x4e,0x8d,0x1b,0xb3,0xfa,0x15,0x2b,0x02,0x0d,0x65, +0x14,0x91,0x6c,0x62,0x25,0x05,0xba,0x15,0xc9,0x06,0xbc,0xe3, +0x07,0xe6,0x99,0xa0,0x5d,0xfd,0x46,0xa0,0xdc,0x31,0xd8,0xb1, +0xbf,0x3f,0x95,0x8e,0xc5,0x66,0xcd,0x5a,0x78,0xde,0xcd,0x21, +0x6d,0x87,0xb6,0x74,0xf5,0x9c,0x55,0x17,0x5c,0xb0,0xaa,0xc2, +0xe3,0xb1,0x5a,0xd5,0xea,0xfb,0x71,0xe5,0xf9,0x58,0x84,0xb7, +0xad,0x3b,0xdf,0xaa,0x37,0xa4,0x2c,0x96,0xba,0xb4,0x46,0xa7, +0x51,0xe7,0xe6,0x55,0x32,0x23,0x5f,0xfc,0x7d,0xba,0x0c,0xb6, +0xf4,0xef,0x7f,0x90,0xcc,0x66,0x93,0x3f,0x78,0xa7,0x6e,0x7e, +0xd5,0xa6,0xdb,0xd7,0x8f,0xdc,0x5e,0x95,0xb5,0xd9,0x56,0x2d, +0x95,0x85,0x64,0x35,0xed,0xfb,0x76,0x5e,0xba,0x73,0x9f,0x54, +0xa6,0xd3,0xdb,0xcb,0xfc,0xf9,0x9d,0x4c,0x9e,0x6e,0xdd,0xb5, +0xb2,0xb2,0xc9,0x60,0xd0,0xd3,0x62,0x6c,0xac,0xf4,0x78,0xd3, +0x89,0x70,0x24,0xef,0xdd,0x69,0xb5,0x25,0x03,0x29,0xab,0xed, +0xbc,0x24,0xa8,0x63,0x49,0x68,0x07,0x21,0x4a,0x43,0x3f,0xf9, +0x1e,0xf4,0x13,0x07,0x6a,0x05,0x19,0x3f,0x88,0xd6,0xb0,0xfd, +0x64,0x26,0xd9,0xc0,0x4a,0x62,0x90,0xfa,0x20,0x34,0x31,0x0b, +0x99,0xa1,0x1f,0x71,0xc3,0x00,0x79,0x41,0xe6,0x7a,0x3a,0x09, +0xfd,0xca,0x30,0xad,0x63,0xa5,0x9d,0x69,0x32,0x0a,0x68,0x92, +0x06,0xb7,0xc1,0x0b,0x9d,0x41,0x89,0xf1,0xdc,0x43,0xd7,0xfb, +0xda,0xd7,0xe5,0x7b,0x77,0x39,0x97,0x69,0xda,0x6a,0xe6,0x2c, +0x5d,0x3a,0xa7,0xae,0x4b,0xab,0xaa,0x56,0x3a,0xeb,0x6a,0xf1, +0xa9,0xaa,0x25,0xb5,0x1a,0x75,0xd8,0xed,0x5e,0x14,0xb8,0x3a, +0x17,0x89,0x38,0x5d,0x26,0xa3,0x82,0x12,0x60,0x99,0xcd,0x1b, +0x2b,0x0f,0xb6,0xa5,0xed,0xce,0xfa,0x25,0xe9,0x9a,0x7c,0x7e, +0x67,0x53,0x13,0x75,0x1b,0xf3,0xdd,0xc8,0x63,0xd1,0x2b,0x97, +0x2d,0x63,0x9e,0xfd,0xb9,0xd8,0x7d,0xe5,0xfd,0x0f,0xdf,0x43, +0x24,0xc2,0x9c,0xce,0x44,0x2c,0xb7,0x7e,0x60,0xcd,0xc0,0xfa, +0x86,0x78,0x89,0xbb,0xa4,0x3d,0x10,0xf0,0x34,0xc7,0x62,0x75, +0xed,0xfb,0x33,0x99,0x85,0xb6,0x80,0xdf,0x57,0x11,0x88,0x44, +0x32,0x18,0x1b,0xdc,0x56,0x95,0x2d,0x3b,0xa7,0x32,0xb9,0xb0, +0xd6,0xd9,0x5b,0x5f,0xa7,0xa8,0xab,0x67,0x3f,0xe6,0x1c,0x1a, +0xe8,0xc0,0xc1,0x0e,0xa6,0x7a,0xd1,0xa1,0x37,0xf0,0xaa,0x9a, +0xf7,0x91,0x04,0x75,0x8e,0x4a,0x44,0x8f,0x09,0x0d,0x48,0x8e, +0x8c,0xc8,0x86,0x2a,0x50,0x3f,0x1a,0x41,0xdb,0xd0,0x4d,0x08, +0x99,0x58,0x99,0x3c,0x4d,0x6a,0x60,0x0d,0xa9,0x2c,0xa8,0xf3, +0x86,0xe2,0x0b,0x9f,0x8b,0xd6,0xc1,0x2b,0x2d,0x6e,0x5d,0x52, +0x47,0x73,0x69,0x15,0x4e,0x7a,0xa1,0x18,0x72,0x95,0xfd,0x15, +0xab,0xd7,0x40,0x7e,0x22,0x87,0xb8,0x5f,0x12,0x05,0x8f,0x3c, +0x16,0x8d,0xfb,0x21,0x22,0x56,0xc2,0xbd,0x45,0xb1,0x82,0x5f, +0x5e,0xf3,0xe1,0x25,0xf8,0x62,0xe6,0x6d,0x4c,0x33,0x05,0xec, +0xf8,0xf8,0xbf,0x26,0xa1,0x7b,0x6f,0x49,0x11,0xdd,0xcb,0xa3, +0x33,0xa0,0xfb,0xaa,0x12,0x57,0xc9,0xdb,0x25,0x6e,0xc9,0xf0, +0x77,0x0f,0xbc,0xfc,0x3f,0xa0,0x89,0x10,0xfd,0xa3,0xe6,0x21, +0xea,0x35,0xf2,0x58,0x24,0x0e,0xb1,0x71,0x89,0xd1,0xb0,0xc4, +0x20,0x71,0x48,0x64,0x58,0x88,0x57,0xee,0xd6,0xb6,0x69,0x21, +0x5d,0x02,0xbb,0x76,0xb6,0xf6,0xfc,0x95,0x1f,0x51,0xc7,0x52, +0xc9,0xe7,0x58,0x89,0xe4,0x0b,0xd4,0x07,0xbc,0x85,0x67,0xa8, +0x63,0x85,0xa7,0xfb,0xa8,0x63,0x7d,0xdf,0xe9,0x7d,0xb5,0x8f, +0x5e,0x92,0x4b,0x03,0x07,0x07,0xc3,0x9b,0xc3,0x95,0x04,0xa6, +0xe8,0x23,0xe1,0x05,0x03,0x83,0x04,0xbc,0x48,0x3d,0x5e,0x02, +0x5e,0x8c,0x32,0x4a,0x42,0x4b,0xcb,0x09,0x78,0x19,0x5e,0x27, +0x73,0xec,0x71,0xc0,0x1b,0x0a,0x18,0xc2,0x6f,0x69,0xf2,0x6a, +0x75,0x5e,0xf3,0xc3,0xab,0x75,0x5d,0x7a,0x5d,0xa7,0x2e,0xf2, +0x78,0x04,0xde,0xba,0x76,0x1d,0xa4,0x99,0x55,0xd4,0x31,0xff, +0x2d,0x7e,0x63,0xaf,0x11,0xde,0x90,0x28,0x0c,0xb1,0x7d,0x3e, +0x00,0xbc,0xfe,0x13,0x7e,0x4c,0xad,0x06,0x7e,0x3f,0xfd,0x98, +0x3a,0x7d,0x00,0x05,0x4e,0x36,0x4d,0xe8,0x04,0xde,0x09,0x0f, +0x37,0x80,0xcb,0x97,0xaf,0x5e,0x33,0xf0,0xc8,0x03,0x81,0x68, +0x34,0xf0,0x00,0xad,0x3a,0xfc,0x15,0xc2,0xdb,0x4b,0x6a,0x6a, +0x5c,0xaa,0x3a,0x15,0xb0,0xf7,0xdc,0x30,0x6c,0x73,0x6b,0xbb, +0x74,0xca,0x6a,0x95,0xab,0xb6,0x0e,0x47,0xf0,0x83,0xcc,0xb7, +0xb0,0x9b,0xf9,0x25,0xce,0x4f,0x1b,0x05,0x09,0x07,0x2f,0x8d, +0xf8,0x7d,0x9d,0x12,0x97,0x24,0x96,0x4b,0xa7,0x81,0x8b,0xd3, +0xe9,0x22,0x1b,0xcb,0xa8,0xa3,0x83,0x4f,0x0d,0x7e,0x67,0xf0, +0x5f,0xc3,0xbe,0x22,0xc1,0x9b,0x46,0x29,0xe1,0x97,0x01,0x23, +0x36,0xa3,0x45,0x68,0x13,0xdc,0xd1,0x51,0x74,0x1f,0xfa,0x31, +0x7a,0x17,0xee,0x86,0x37,0x30,0xb9,0x08,0x94,0xf3,0xb3,0x82, +0x22,0xc3,0xc9,0x06,0x10,0x92,0xe3,0xf6,0x28,0x56,0x72,0x10, +0x91,0xeb,0xcf,0x72,0x97,0xc6,0x1e,0x41,0x1a,0xf3,0x42,0x26, +0xcb,0xca,0x21,0x35,0xa0,0x4b,0xa2,0x60,0xa7,0xa2,0x94,0x8b, +0xa8,0xf1,0xec,0xc3,0x80,0xfc,0x98,0x17,0xd7,0x69,0x0e,0xf2, +0x24,0x48,0x0f,0x60,0xa5,0xb2,0x81,0x35,0x77,0x4d,0x11,0x44, +0xba,0x89,0x27,0x5e,0xf6,0x56,0xdc,0x5c,0x77,0x81,0xde,0x29, +0x22,0xe2,0xdb,0xe5,0x27,0xe5,0x15,0x35,0x7c,0x52,0x98,0x78, +0xac,0x26,0xe4,0x47,0x54,0x67,0x7d,0x6d,0x75,0x3c,0x36,0xcb, +0x24,0x8f,0xc9,0x55,0x3a,0x7d,0xd2,0x59,0x1e,0xaa,0x9c,0x5f, +0xed,0x94,0x4a,0x3d,0x95,0x16,0xbb,0xd9,0xa2,0xd3,0x19,0x5d, +0x0e,0x47,0x24,0x9c,0xa9,0x9c,0x9d,0x09,0xaa,0xe6,0x03,0x0a, +0xd5,0x6a,0xa2,0xb6,0xfa,0x7c,0x4b,0xc3,0x6c,0xea,0x86,0xfa, +0xfe,0x5a,0xa5,0x4a,0xa5,0xac,0xed,0xaf,0xdf,0xbb,0x6b,0xd7, +0x5e,0x77,0xbc,0x4c,0xa9,0x2c,0x8b,0xb7,0xc4,0x1d,0x62,0xd8, +0x54,0xea,0x78,0xe1,0xa3,0x9a,0xa5,0x75,0x8e,0x8e,0xda,0x54, +0x7d,0x59,0x76,0xe1,0x48,0x20,0x50,0xa5,0x52,0x35,0xa4,0xea, +0x3a,0xd4,0xea,0xda,0xbe,0xea,0xda,0xa6,0xa6,0x0b,0x9a,0x9a, +0xea,0xb2,0x35,0x35,0x5b,0xaa,0xab,0xe9,0x6e,0xa3,0xb1,0x65, +0x71,0xe0,0xea,0xaa,0x65,0x2e,0x67,0x44,0x01,0x1d,0x4e,0xaa, +0x54,0xfa,0x40,0x32,0x7a,0x3c,0x69,0xbb,0x5a,0xe3,0x70,0x2c, +0xce,0x54,0x85,0xc2,0x20,0x40,0xdf,0xab,0xc9,0x37,0x55,0x83, +0x9c,0xfc,0x6a,0x3a,0x20,0x8e,0xc6,0xc3,0x3e,0x69,0x50,0x0a, +0x4d,0x63,0x97,0x96,0x98,0x22,0xf9,0x8a,0x72,0x8b,0xb9,0xc2, +0x2c,0x12,0x88,0x14,0x0a,0x83,0x3e,0xe7,0x0d,0xb7,0x59,0xcc, +0x80,0x98,0x9d,0x61,0x53,0xbd,0x5e,0xa3,0x91,0xcb,0x15,0xd5, +0x29,0x71,0x2a,0xd3,0xcf,0xac,0xaf,0xec,0x6d,0x6c,0x5c,0xd8, +0x9d,0x6f,0x5c,0x5a,0xf9,0x04,0xf3,0xcd,0xc7,0xfb,0x6d,0xc9, +0xf6,0xf0,0xce,0x70,0x5b,0xca,0x66,0x4b,0x79,0x3c,0x90,0xf2, +0xba,0x2d,0x16,0x1b,0x2d,0xb2,0xa7,0x66,0x07,0x67,0x2d,0xd0, +0x88,0x75,0x73,0xab,0x7d,0x8d,0x11,0xb3,0x42,0x1e,0x29,0x2f, +0xf7,0x55,0xcf,0xd5,0x89,0x35,0x0b,0x66,0x05,0xdd,0x9e,0x94, +0x7d,0x49,0x55,0x42,0x97,0xc8,0x66,0xe1,0xa3,0x0a,0x57,0xc7, +0xa2,0xea,0x68,0x8c,0xfd,0x70,0xb4,0xe7,0x1b,0x37,0x2c,0xb2, +0x06,0xe6,0x56,0x54,0xf4,0x81,0x3c,0xd6,0x6b,0xb5,0x56,0x95, +0x52,0x95,0xe9,0x8a,0x25,0x82,0x21,0x7b,0x99,0x4b,0xab,0x03, +0xa9,0xfd,0xe5,0x86,0x5a,0x65,0x6d,0x7d,0x3d,0x7c,0x34,0x70, +0xe3,0xf6,0x6e,0xf4,0x84,0xe8,0x52,0x7a,0x31,0xf0,0xbd,0x1f, +0x65,0x51,0x23,0xb1,0x74,0x6a,0x62,0x6e,0x76,0x4f,0x43,0x0f, +0x30,0x00,0x97,0xa7,0x81,0xd7,0xc7,0xcf,0xc9,0x77,0x49,0x38, +0x3a,0xa1,0x87,0xb8,0x27,0xf7,0x10,0xa2,0xbe,0x44,0x31,0xbe, +0x7f,0xe3,0x4b,0xf8,0xd4,0xc2,0x65,0xcb,0xb0,0xa7,0xbf,0x9f, +0x0a,0xd5,0x9e,0xac,0xde,0xe2,0xfb,0xaa,0xef,0x52,0xd8,0x99, +0x9f,0x08,0xd5,0x79,0xf5,0x0b,0xea,0x46,0xea,0x2f,0x85,0xe7, +0xa8,0xfa,0xc1,0xc1,0xc2,0x73,0xbd,0xf8,0x8f,0xbd,0xbd,0x8c, +0xb6,0xf7,0xb1,0xc7,0x88,0x29,0x83,0xa8,0x62,0x54,0x75,0xfc, +0xf9,0x78,0xfc,0x79,0x32,0x96,0x4a,0x40,0xbe,0x7c,0x04,0xf2, +0x25,0x85,0xea,0x41,0xba,0xcc,0x47,0xbd,0x20,0x61,0xce,0x01, +0x9f,0xfb,0xdd,0x44,0xe6,0x93,0x5b,0x2c,0xde,0xe1,0xb4,0x2b, +0x05,0x00,0xe3,0x8a,0x38,0x01,0xe3,0xd9,0xc6,0x7c,0xb4,0x5a, +0x5a,0x01,0x60,0xdc,0x55,0x4b,0xc0,0x78,0x95,0x9f,0x05,0xe3, +0xd9,0xea,0x72,0x47,0x2a,0x53,0xbb,0x7a,0xc0,0x59,0xdf,0x47, +0xbd,0x56,0xf7,0x71,0xcd,0xe6,0x5f,0x7f,0xc9,0x77,0x03,0xd4, +0x48,0xa0,0x69,0x54,0x3f,0xaf,0x6e,0xa4,0x2b,0xa6,0x5f,0xbb, +0xff,0xac,0x20,0xb8,0xec,0xb1,0xc7,0xa8,0xa3,0x13,0x1a,0xa0, +0xf0,0xd7,0x29,0x17,0x38,0x1b,0xec,0x20,0xb4,0xc9,0xad,0xd0, +0x26,0x06,0x90,0x52,0x9d,0x44,0x4e,0xd1,0xb1,0x29,0x43,0x15, +0xd1,0x0e,0xd3,0x33,0x3d,0x31,0xe1,0x27,0xe3,0x10,0x5c,0xfb, +0xf3,0xad,0x30,0xc0,0x48,0x43,0x32,0x01,0x0c,0x20,0x90,0xda, +0xe4,0xfd,0x8a,0x17,0x77,0x72,0xcf,0x11,0x1f,0x06,0x84,0xd1, +0x31,0x32,0x23,0xc2,0x00,0xa1,0x9b,0xfd,0x65,0xd6,0x7f,0x93, +0x1f,0xde,0x90,0x20,0xb7,0x5c,0x7c,0xac,0xb2,0xd3,0x21,0x08, +0x96,0xf7,0x66,0x03,0xef,0x3d,0x09,0xbc,0x47,0xc6,0x0f,0x27, +0x8c,0x26,0xa7,0x1b,0x3f,0x26,0x0e,0xfc,0x30,0x34,0x03,0x5e, +0x34,0xb4,0x15,0x95,0x29,0x76,0x8c,0xa0,0xf4,0xf8,0x81,0xe2, +0x10,0x80,0xbf,0x40,0xd8,0x6f,0xea,0x40,0xf0,0x1f,0xbc,0xa8, +0xa7,0xea,0x39,0xce,0x63,0x3d,0x64,0x45,0x9d,0xbc,0x0c,0x78, +0xbf,0x0e,0xcd,0x05,0xfe,0xba,0x88,0x68,0xe4,0xac,0x9c,0x64, +0xb1,0x69,0x36,0x96,0x04,0xa1,0x26,0xe2,0x94,0x72,0xd3,0x98, +0x56,0x4e,0x94,0x72,0xcc,0x2b,0xe5,0x13,0x4c,0xc2,0x67,0xa9, +0x96,0x4f,0x06,0xc3,0xbc,0x5e,0x4e,0x5f,0xb8,0x21,0x93,0x55, +0xab,0xec,0x76,0x7f,0x05,0xa8,0xe4,0x8b,0xaa,0xb5,0x5a,0x29, +0xab,0x91,0xc7,0x2a,0x41,0x25,0xff,0x29,0x53,0xc2,0xab,0xe4, +0x02,0x9d,0x50,0x2e,0xd4,0x0a,0x67,0x50,0xca,0xf5,0x73,0xf4, +0xa7,0x53,0xca,0x95,0xd5,0xca,0x29,0x5a,0x79,0xa1,0xa9,0x09, +0xd4,0xf1,0xba,0x4c,0x55,0xac,0xd2,0x1d,0xe9,0x9e,0x1f,0x0a, +0x26,0x2b,0xe3,0xe9,0xf4,0x4c,0x0a,0xb9,0x65,0x9d,0x05,0xde, +0xd3,0x55,0xf2,0xe8,0xe3,0xd1,0x99,0x55,0x72,0x49,0xb9,0x64, +0xb2,0x4e,0x8e,0x44,0xd8,0x34,0x2a,0x11,0xfe,0x1e,0x70,0x9f, +0x0c,0xc6,0xd8,0x08,0x70,0xef,0x22,0xb4,0x02,0xda,0x9b,0xe5, +0x4e,0x0d,0xcb,0xa9,0xc9,0x09,0x69,0xae,0xbd,0x38,0x58,0x9c, +0x20,0x83,0x13,0xab,0x1c,0xc0,0x00,0xc4,0x29,0x0d,0xa0,0x11, +0xf8,0xd9,0xe6,0x23,0x63,0x5e,0x71,0xfc,0x22,0x3a,0xe7,0x34, +0xee,0x39,0xb1,0x11,0x6b,0x56,0xc1,0x5e,0x50,0x37,0xad,0xf7, +0xf9,0x02,0x01,0x9f,0x6f,0xfd,0xa1,0x0d,0x5e,0x5f,0x30,0xe8, +0xf3,0x6e,0xc8,0xfb,0x1a,0x01,0x0d,0x83,0x84,0x36,0x9a,0x1a, +0x7d,0x15,0x0d,0xc5,0x74,0x03,0xfe,0x70,0x12,0x06,0x01,0xc8, +0x55,0xf8,0x8f,0x41,0xf6,0x83,0x5e,0x12,0x09,0x87,0x0e,0x2e, +0xea,0x39,0x18,0x0a,0x47,0x48,0xea,0x1e,0x92,0x18,0xb2,0x9a, +0xcd,0x5e,0x6f,0x74,0x5d,0xd4,0xeb,0x35,0x9b,0xad,0x93,0x4e, +0x16,0x53,0xc7,0x36,0x7f,0x73,0x33,0x61,0xc4,0x70,0x45,0xb4, +0x22,0xcc,0xea,0x08,0x52,0xe8,0xc3,0xff,0xcb,0xea,0xd2,0x31, +0xc0,0x4d,0xcd,0xa8,0x83,0xe8,0x08,0x45,0x03,0x42,0x51,0x93, +0x3e,0xdb,0x6a,0x6a,0x08,0x3e,0xc6,0xe1,0xa6,0xf5,0x5d,0x81, +0x40,0xd7,0xfa,0xa6,0x3c,0x77,0xfc,0xa4,0x0a,0x92,0x0e,0xc4, +0x57,0x90,0xd2,0x6d,0xc2,0xea,0xfb,0x59,0x13,0xc0,0xc1,0xde, +0x48,0xa4,0xf7,0xe0,0xd7,0x0f,0x2e,0x89,0x0c,0x5a,0x2d,0x66, +0xaf,0x27,0xba,0x3e,0xea,0xf1,0x9a,0x2d,0xd6,0x49,0x27,0x8b, +0xa6,0x77,0xaf,0xc2,0x73,0x83,0xa4,0x4f,0x77,0x40,0xdd,0x1e, +0x87,0xba,0xe9,0x90,0x0b,0x9e,0xf1,0x1a,0xbe,0x4f,0xb3,0xe3, +0x45,0x71,0xd7,0xc4,0x70,0x8c,0xc0,0x01,0x8a,0x75,0xa7,0x85, +0x30,0xd7,0x47,0x88,0x86,0xa7,0x11,0x4e,0x16,0xef,0xfe,0x31, +0xf9,0x9e,0x9d,0x2c,0xe0,0x59,0x70,0xcf,0x09,0x78,0xd6,0x6c, +0xd6,0x81,0xef,0x60,0x5e,0xc6,0x3a,0xe6,0x7d,0xfc,0x9f,0xef, +0xe7,0x53,0xa9,0x8e,0x40,0xa0,0x23,0x95,0xca,0xbf,0xff,0x7e, +0x67,0x7f,0x34,0xda,0xb9,0x9f,0xfa,0x05,0x27,0xde,0x3d,0x41, +0x22,0xde,0x4d,0x26,0x4e,0xbe,0x6b,0x34,0x75,0x8b,0xd3,0x45, +0x01,0xdf,0x51,0x55,0xdd,0x60,0xb1,0x10,0x01,0xaf,0x51,0x3b, +0xca,0x97,0x3e,0xc1,0x8a,0x0b,0xe6,0x17,0xd4,0x51,0x83,0xa1, +0x67,0xef,0xd7,0xf7,0xf6,0x18,0x0c,0x83,0xcb,0x97,0x6d,0x5c, +0x56,0x59,0xc9,0xb8,0x36,0x4c,0x10,0xeb,0x26,0x53,0x51,0xae, +0x7b,0x3c,0xe3,0x82,0xbd,0x32,0x1c,0xd4,0x1b,0x40,0xb0,0xf7, +0x2f,0xa8,0xf4,0xfb,0xac,0x36,0x3b,0x69,0x97,0xab,0x00,0x5f, +0x9e,0x07,0xf8,0xd2,0x00,0x1a,0x72,0x0e,0xcd,0x22,0x92,0x1b, +0x5a,0x61,0x9a,0x00,0xe1,0xd4,0xe0,0x89,0xa0,0xae,0xe8,0x64, +0x1c,0xc7,0x72,0xe3,0xcf,0xfc,0x76,0xe6,0xfd,0x2b,0x8c,0x4b, +0x8d,0xaa,0x8c,0x4c,0xa8,0xaa,0x92,0x41,0xea,0x4b,0x95,0x4f, +0x56,0xe2,0xe7,0xf0,0xf6,0x91,0xf3,0xad,0x81,0x94,0xd9,0x5c, +0xe6,0xb0,0x58,0x3d,0x6a,0x8d,0xcd,0xce,0x6b,0xbd,0xb5,0xb5, +0x45,0x9d,0x77,0x15,0xdd,0xda,0xc2,0xbc,0xd7,0x92,0x79,0x3e, +0x90,0x7d,0xc9,0xdb,0x82,0xf5,0x2d,0x04,0x9b,0x72,0x4a,0x6e, +0x90,0xe8,0xb8,0x32,0x99,0xa9,0xb4,0x9d,0x28,0xb9,0xe5,0x4e, +0xef,0xce,0x2c,0x28,0xb9,0xd9,0x71,0x1d,0x17,0x27,0xa0,0x1f, +0xbf,0x22,0xd4,0x23,0x1f,0x4a,0x02,0x7e,0xb8,0x8c,0x68,0x6e, +0xc2,0xb3,0x54,0x62,0xf1,0xdf,0x8f,0x68,0x89,0x78,0x25,0x8a, +0x9a,0x8e,0xb4,0x20,0x31,0x0a,0x39,0x89,0x95,0x0d,0x7e,0xed, +0x83,0xf2,0x88,0xc2,0x48,0x6d,0xad,0x5a,0x52,0xa7,0x56,0x87, +0x5d,0xee,0x45,0x41,0xa2,0xf9,0xba,0x9c,0xf0,0xb8,0x08,0xc0, +0xb3,0x79,0xe3,0x8e,0xd0,0xec,0x74,0x99,0xab,0x6e,0x49,0xba, +0xba,0xa9,0x69,0x67,0x3e,0x4f,0x35,0x37,0xd4,0xe4,0xc6,0x80, +0xa8,0x2e,0xc5,0x03,0x51,0x99,0xd4,0x5d,0x04,0xa2,0x6e,0x87, +0x23,0x4c,0x80,0x68,0x36,0xa0,0x9a,0xa7,0x50,0x2a,0x35,0xda, +0x88,0x1d,0x80,0x68,0xe3,0xec,0xc2,0x71,0x49,0x4a,0x49,0x8f, +0x5c,0xf0,0x73,0x65,0x4a,0x42,0xaf,0xbd,0x00,0xcf,0x7a,0x46, +0x62,0x4a,0xd5,0x6b,0xa9,0xc6,0x45,0x8b,0xef,0xba,0xe3,0x23, +0x2f,0x40,0xae,0xda,0xf6,0x03,0x93,0x15,0x65,0xbd,0xc7,0xaa, +0xb2,0x67,0x58,0x45,0xd9,0xb5,0x14,0x74,0xe4,0xda,0x86,0x86, +0x5a,0x50,0x94,0x71,0x1d,0x8b,0x2c,0x43,0x2c,0xb2,0xd4,0xeb, +0xcb,0x4a,0x00,0x59,0x36,0x02,0xb2,0xb4,0xf8,0xcd,0x22,0xa1, +0x48,0xae,0xd4,0x1b,0xaa,0x08,0xb2,0xb4,0x28,0x95,0x06,0x67, +0xc8,0xd4,0x60,0x50,0xf3,0xc8,0x32,0x99,0xe9,0xa7,0x3b,0xd4, +0xab,0xac,0x0c,0xa2,0x8e,0x32,0x57,0x58,0x57,0xa9,0x29,0x5c, +0x58,0xd9,0x87,0xff,0x52,0x5a,0x35,0x4b,0x47,0x55,0xf7,0x0f, +0x14,0x9e,0xe9,0x03,0xdc,0x60,0x85,0x7e,0xf9,0x1b,0xe8,0x97, +0x39,0xd0,0xb6,0xf7,0x71,0xb6,0xbb,0x69,0x1d,0xcd,0x37,0xa6, +0x21,0xcc,0x08,0xa5,0x58,0x4e,0x74,0xba,0x7c,0x63,0x88,0xfe, +0x34,0x63,0xd8,0x19,0x64,0xc1,0xea,0x9e,0xf3,0x83,0x8a,0x84, +0x9c,0x03,0x5c,0x7c,0x8f,0x8c,0xc7,0x35,0x9a,0xda,0x25,0x99, +0xae,0x6c,0x95,0x5f,0x9e,0x9c,0x88,0xb9,0xa0,0x4b,0x3a,0xfa, +0xa8,0xc0,0xe1,0xaf,0xe8,0x74,0x1e,0xef,0x48,0xd3,0x92,0x5d, +0x44,0x11,0xd4,0xb6,0x55,0xcf,0xed,0xed,0x05,0x35,0x10,0x50, +0x88,0xca,0x75,0xc1,0xa7,0x7c,0x7d,0xff,0xf4,0x4e,0x1b,0x8d, +0x4e,0xee,0xb5,0x26,0x53,0xa4,0x08,0xc7,0xd8,0x5e,0x0b,0xd0, +0x25,0xdf,0x18,0x0e,0x03,0x78,0x61,0x75,0xc7,0x09,0xf0,0xa5, +0xfb,0x13,0xbe,0x22,0xf2,0x7d,0x1e,0xb4,0xf5,0xc3,0xe3,0xb6, +0x52,0x82,0xaa,0xcf,0xc1,0x56,0x8a,0x9d,0x69,0x78,0x3b,0x0d, +0x04,0x56,0xe0,0x9e,0xba,0x41,0x17,0xb1,0x76,0xba,0x06,0x2f, +0x18,0x6c,0xf6,0x78,0x9a,0x07,0x6b,0xdb,0xe6,0xce,0x25,0xd6, +0xce,0x37,0x71,0xc9,0x92,0x50,0x78,0xc9,0x92,0x3b,0xb8,0x41, +0x9f,0x1e,0x64,0xf2,0xb8,0x89,0xf9,0x3e,0xfe,0x5a,0xe6,0xf5, +0x0c,0xee,0x3a,0x1b,0xcb,0x66,0xe1,0x99,0x65,0xf8,0x0f,0x4b, +0x97,0x75,0x33,0x4f,0x75,0x93,0x58,0x8b,0x51,0x89,0xe8,0x07, +0x30,0x56,0xdb,0xa0,0x8f,0xcf,0x46,0x0b,0xd1,0x00,0xda,0x4e, +0x22,0xad,0xb2,0xa0,0x05,0x17,0x11,0x25,0xec,0x1c,0x46,0x12, +0x89,0x41,0x8e,0x01,0xdc,0xc1,0x53,0x25,0xfd,0x98,0xc4,0xf7, +0xf9,0x59,0x94,0x9a,0xe4,0xf1,0x29,0x19,0x01,0x4e,0x67,0x7d, +0x3f,0xdb,0x31,0xff,0xaf,0x4d,0x96,0x4d,0x9b,0x04,0x6d,0xa5, +0x7d,0x7d,0xfb,0xf2,0x0f,0x26,0x9e,0x32,0x1e,0xf2,0x5f,0x8b, +0xef,0x02,0x38,0xf8,0x6d,0x16,0x0e,0x36,0x62,0xd7,0x8e,0xed, +0x7b,0xac,0x9b,0xac,0xb4,0x75,0xa3,0x75,0x77,0xe9,0x9d,0x91, +0x93,0x1d,0x64,0x64,0x5f,0xbd,0xbc,0x68,0x5d,0x30,0x9d,0x39, +0x28,0xc8,0x77,0x96,0xbd,0x46,0x1d,0x63,0xee,0xef,0x2f,0xdb, +0xb4,0x69,0xce,0x2b,0x9d,0xcc,0xef,0x9c,0x75,0x6f,0x33,0xef, +0x50,0xc7,0x06,0x9f,0x06,0x60,0x89,0x25,0x27,0xbe,0x97,0x78, +0x31,0x01,0xef,0x00,0xf3,0xce,0x5c,0xe6,0x7f,0xe9,0x95,0x93, +0x07,0xfe,0xc2,0x63,0x67,0x87,0x1b,0xfe,0xf5,0x62,0x50,0x84, +0xe8,0x65,0xe0,0x89,0x0c,0xf0,0x04,0xb1,0x91,0x24,0x61,0x6c, +0xbf,0x96,0xa0,0xb7,0x69,0x5a,0x20,0x6b,0x27,0x61,0x0d,0xfd, +0xbc,0x26,0x99,0x8c,0xb1,0x22,0x9a,0xe7,0x19,0x77,0x6c,0x9a, +0x8f,0xc5,0x37,0x51,0x85,0x13,0xcd,0xa0,0xc1,0x11,0xac,0x4d, +0xac,0x07,0x63,0x3a,0x0e,0xaf,0xf1,0x00,0x5b,0xb0,0x11,0x09, +0xac,0xec,0x72,0xb3,0xc6,0x63,0xea,0xa3,0xba,0x93,0xd5,0x9b, +0x41,0x0d,0xe3,0x15,0xce,0x58,0xfc,0x85,0x18,0x65,0x06,0xe1, +0x4c,0x81,0x8c,0x26,0xa2,0x7a,0xed,0x05,0xa7,0x96,0x71,0xc2, +0x87,0x83,0x03,0xd1,0xea,0xb2,0x32,0x50,0xf6,0x88,0xe7,0x05, +0x04,0x0f,0xdd,0x4e,0xa0,0x80,0xa3,0xbc,0xa8,0xeb,0xe1,0xab, +0x2d,0xeb,0x2d,0x9b,0x15,0xd1,0x92,0x52,0x13,0x2d,0xf1,0x48, +0x65,0x19,0xd5,0x05,0xca,0x8c,0x14,0x7a,0x3a,0x1d,0x77,0xbb, +0x37,0xd8,0x36,0x5b,0x2f,0x54,0xe4,0xd4,0x66,0x33,0x65,0x36, +0xab,0x6b,0x14,0x1f,0x3d,0xfe,0x38,0xe0,0x65,0xd0,0x62,0x01, +0x21,0xd7,0x5c,0x77,0xdd,0x75,0x29,0xeb,0xb0,0xaa,0x30,0x0a, +0x2c,0x73,0x85,0x6a,0xd8,0x0a,0x52,0x79,0x88,0x5e,0x52,0x97, +0x92,0x57,0xca,0x42,0x46,0x23,0x51,0x09,0x65,0x22,0x21,0xaf, +0x11,0x5a,0xac,0x09,0x2a,0xef,0xaa,0x30,0x99,0xc2,0xc1,0xa0, +0x54,0x41,0x70,0xc3,0x9c,0x4c,0x99,0x8c,0x94,0x55,0xf3,0xf3, +0xc8,0x96,0xad,0x65,0x37,0x04,0x42,0xbf,0xa8,0xad,0xfd,0x45, +0xc8,0x7b,0x9d,0xf7,0xcd,0xdb,0x6e,0x27,0xe5,0x27,0xfe,0xd0, +0xb0,0x06,0xb6,0x86,0x3f,0x24,0x90,0x00,0x97,0x8e,0x2a,0x85, +0xbf,0x13,0xaa,0x80,0x4f,0xaa,0x01,0x59,0x2c,0x01,0x69,0xf3, +0x09,0xad,0xef,0x8c,0xb9,0x8b,0x86,0x50,0x68,0x49,0x48,0x8e, +0x75,0x4c,0xb8,0x54,0xc6,0xe2,0xc8,0xb1,0x5e,0x4b,0xf9,0xa7, +0xf4,0xda,0xef,0xcb,0x13,0x72,0x7a,0xed,0xee,0x9f,0x2b,0xe2, +0x72,0x18,0xf3,0xe8,0x86,0x7d,0xd0,0xb3,0x28,0xeb,0x06,0xeb, +0x6e,0xcf,0x35,0x1e,0xf7,0xe5,0xee,0xfd,0xe6,0x35,0x66,0xca, +0xb2,0xd6,0xb2,0xdb,0x73,0xc4,0xe3,0xfd,0xf2,0xc9,0x9f,0x02, +0xea,0xc6,0xd8,0x77,0xa3,0xaf,0xd8,0x01,0xcf,0xf7,0xdf,0xe8, +0x3f,0x60,0x5a,0x51,0x0a,0x8d,0x72,0x94,0xb9,0xb2,0x74,0x85, +0x89,0x42,0x85,0x95,0x91,0xe3,0xe1,0xf0,0xf1,0x48,0xee,0x37, +0xb9,0xcc,0xcf,0x33,0x81,0xbb,0x03,0xf0,0xce,0xfc,0x2c,0x93, +0xfb,0x2d,0x1d,0x60,0x31,0x25,0x96,0x34,0x63,0xd5,0xac,0xc4, +0x8b,0xf1,0xf8,0x8b,0x89,0x59,0xcc,0x9f,0x67,0x31,0xff,0x4b, +0xf4,0x60,0x11,0xce,0x40,0x9d,0x5f,0x86,0x3a,0xeb,0x41,0x7b, +0x0b,0xa2,0x04,0x6a,0x45,0x44,0xf4,0xb2,0x35,0xe6,0x3d,0x09, +0x70,0xe7,0x53,0x55,0x30,0xa2,0xf7,0x17,0x19,0xb5,0x68,0x0b, +0xa0,0xe8,0x29,0xfa,0x33,0x45,0x3b,0x27,0x2a,0x9c,0x77,0x6c, +0xc2,0xce,0xbe,0x91,0xa6,0x7c,0xe9,0x50,0xe9,0x05,0xc6,0x3e, +0xe3,0xc5,0xf7,0x13,0xf7,0xdd,0xfd,0xf4,0xe3,0x44,0xdf,0x1f, +0x67,0x33,0x35,0xab,0xf1,0x17,0x2e,0xd8,0xbc,0xf9,0x3c,0x4d, +0x9b,0x46,0x16,0x92,0x0a,0x64,0x61,0x19,0xa4,0x36,0x6f,0xdd, +0x82,0x47,0xc6,0x95,0xd3,0x3f,0x53,0x47,0x37,0x0e,0xb4,0xad, +0xd0,0x57,0x3e,0x53,0x19,0x79,0x2c,0xb2,0x2c,0x14,0x88,0x56, +0x84,0x7e,0xcc,0x5c,0xcf,0xf2,0xcd,0x16,0x56,0xb3,0xe2,0x74, +0x7d,0xbc,0x14,0xcf,0xc3,0xf3,0x26,0x6a,0xd5,0xcc,0xc3,0xcc, +0xc3,0x63,0xe6,0x4a,0x44,0xa1,0x7b,0x00,0x4f,0x2e,0x01,0x3c, +0x69,0x87,0x9e,0x48,0x7c,0x2d,0xa4,0xa6,0x22,0xae,0x1f,0x4e, +0x79,0x6c,0x46,0x21,0x67,0x0d,0x18,0x43,0x46,0xac,0x31,0x80, +0xde,0x75,0xab,0xff,0x6a,0x9d,0x60,0x78,0xf8,0xfa,0xd2,0xe7, +0xd2,0xc9,0x67,0x4c,0xb7,0x96,0xef,0x2b,0xa7,0xca,0x0f,0x94, +0x5f,0x6f,0x7a,0x36,0x79,0x19,0x8e,0xfc,0xb7,0xd4,0x96,0x9f, +0x67,0xa4,0xe7,0x7f,0x25,0xff,0xca,0x89,0x55,0xf9,0xf7,0xcb, +0xef,0xbe,0xdb,0x8f,0x93,0x0b,0xe7,0x61,0x9f,0x27,0xf5,0x5a, +0x0a,0xde,0x1e,0xe6,0xe7,0xf3,0x7e,0xf2,0x93,0xf3,0xa8,0x6d, +0x65,0xad,0x3d,0x26,0xaa,0xed,0xb6,0xd9,0x85,0xd0,0x79,0xe8, +0x73,0x3f,0xf7,0x3f,0xdb,0xcf,0x2d,0xc2,0x15,0xa3,0x94,0xf0, +0x0d,0x68,0x7f,0x15,0x8c,0x19,0xb3,0xd0,0x62,0xb4,0x03,0xed, +0x99,0x6e,0xd3,0x3b,0x97,0x71,0x16,0x9f,0x8d,0x86,0x5a,0x34, +0xd3,0x50,0x6b,0x37,0xbd,0x88,0x4f,0xe2,0xed,0xf9,0xe2,0xd8, +0x7a,0x70,0x03,0x37,0xda,0x6e,0xc8,0xfb,0xc7,0x07,0x59,0xbf, +0xbf,0xd1,0x68,0x54,0xc0,0x66,0x34,0x36,0x16,0x5e,0xcb,0x6f, +0x20,0x9a,0xeb,0x86,0x7c,0xf1,0xe8,0xcb,0x17,0xbf,0xcc,0xc3, +0x68,0x6c,0x34,0xc9,0x15,0x0a,0xb9,0xc9,0xd8,0x40,0xbd,0x4f, +0xec,0x3c,0xb8,0x8b,0xb7,0x24,0x3e,0x11,0x09,0x85,0x0f,0xf6, +0x2c,0x3a,0x10,0x26,0xc3,0x6b,0xf8,0xc0,0x3d,0x07,0xc3,0xa1, +0xc8,0x90,0x85,0xd7,0x59,0xbd,0x1e,0x4e,0x81,0xf5,0x78,0x79, +0x05,0xd6,0x42,0x63,0xa2,0xec,0x2e,0x3a,0x40,0x94,0x5d,0xc8, +0xbc,0x64,0x42,0xde,0xf1,0xa1,0x98,0xcf,0x8b,0x7f,0x37,0x66, +0x33,0x12,0xa3,0x24,0x53,0x10,0x3d,0x27,0x2c,0x61,0x7d,0x57, +0xb5,0x68,0x08,0x5d,0x82,0x6e,0x46,0xb7,0x9f,0xde,0x73,0x75, +0x46,0x46,0x1f,0xcc,0xfb,0xa0,0x64,0xf8,0x13,0xfc,0x4f,0x67, +0x96,0x49,0xa3,0x37,0xc2,0x98,0x0a,0x32,0x9c,0xe8,0x51,0x9c, +0x4e,0xa6,0xe1,0xdd,0x67,0x00,0x14,0xc3,0xa1,0x31,0xa0,0x08, +0xac,0xbc,0xdc,0x49,0x58,0xd9,0x59,0x39,0x83,0x75,0x48,0x99, +0x03,0x5e,0xa6,0xfe,0x13,0x94,0x25,0x99,0xc4,0x21,0x39,0x78, +0x50,0x4c,0x7c,0x51,0x02,0xbc,0x72,0xb7,0x8e,0xf3,0x45,0x89, +0xcb,0x39,0x5f,0xd4,0xc9,0x6f,0x43,0x16,0xb9,0x98,0x64,0x91, +0x94,0x49,0xe4,0x14,0xc9,0xa2,0x6d,0x27,0x59,0x24,0x92,0x72, +0xb1,0xb6,0x0d,0xb2,0xe0,0xe1,0xaa,0x2b,0xab,0x56,0xcb,0xe5, +0xe9,0xde,0x7d,0x4b,0x32,0x72,0x39,0x95,0x59,0xf3,0xe1,0x34, +0x0f,0xd6,0xc3,0xfe,0x10,0x70,0xf9,0xa1,0x20,0x20,0x94,0xa2, +0xe9,0x68,0xf9,0x42,0xc2,0xe6,0xb5,0x25,0x4e,0x49,0xc7,0x3c, +0xfc,0x75,0xce,0x25,0xc5,0x7c,0x80,0xd5,0xa7,0x73,0x48,0x09, +0x46,0x3f,0x3d,0x0f,0x8c,0xc4,0x73,0x17,0xcc,0x99,0xb3,0x00, +0x1f,0x67,0x96,0x37,0x27,0x12,0x79,0x87,0x23,0x9f,0x48,0x34, +0xe3,0xdb,0xc9,0x37,0x85,0xa7,0xfb,0x88,0x4d,0x12,0xcf,0x81, +0xfe,0xf3,0x08,0xf4,0x1f,0x13,0x5a,0x80,0x2e,0x47,0xb7,0x70, +0xf6,0xa9,0x99,0x50,0xad,0xf0,0x5c,0x35,0x28,0x7c,0xce,0x3f, +0x9c,0xa6,0xf1,0xe2,0x8b,0x27,0xd8,0x3d,0x3b,0x7b,0x48,0x40, +0x09,0xa0,0x9a,0x70,0xa6,0xb1,0xc9,0x64,0xaa,0x01,0x95,0x6a, +0x28,0x1e,0x57,0x6b,0x78,0x64,0x23,0x4f,0xca,0x8b,0x31,0x25, +0x35,0xab,0x07,0xd4,0xea,0x72,0x47,0x5f,0xe1,0xf2,0x9e,0xb1, +0x18,0x14,0xee,0x27,0x7e,0x5e,0x0b,0xe3,0xc3,0x50,0xc6,0x7f, +0x52,0x3b,0x0c,0x3f,0x71,0x38,0x96,0xe1,0x77,0xe4,0x71,0x05, +0x81,0x52,0x70,0x00,0x28,0xf5,0x67,0x7e,0x48,0x92,0x01,0xae, +0x89,0x82,0x7a,0x65,0xcc,0xc5,0xfd,0xa5,0x26,0xd9,0x74,0xf5, +0x8a,0x05,0x37,0xa1,0x89,0xea,0x15,0xbd,0xf2,0xec,0x7f,0x83, +0x2f,0x9a,0x0a,0x1e,0xd8,0xb1,0xf0,0x55,0xd4,0x23,0x8a,0xd3, +0xdf,0x04,0x4d,0xab,0x63,0x9a,0x66,0xeb,0xe3,0xc2,0x4c,0x67, +0x80,0x97,0xa6,0x31,0x7c,0x39,0xa5,0xd7,0x10,0xa7,0x95,0x86, +0xa2,0xd6,0x5f,0x97,0x52,0x35,0xa8,0x22,0xe9,0x4c,0xf3,0xfc, +0xee,0xea,0x76,0xaf,0xf7,0x0b,0x75,0x75,0xc1,0xae,0x0d,0xcd, +0xcb,0x5b,0x5b,0xe3,0xcb,0x04,0xce,0x81,0xd6,0xd9,0x15,0x15, +0xce,0xf2,0xe6,0xce,0x8b,0x76,0x04,0xe6,0x6e,0xc5,0x7f,0xeb, +0x7e,0x7e,0xc1,0xc5,0x6a,0x4d,0xe7,0xae,0x07,0x6b,0x6a,0x3a, +0x9d,0x8b,0xe6,0x34,0x82,0xd6,0x99,0xb1,0x59,0xdb,0xea,0xe2, +0xd5,0x4a,0xb1,0xc8,0x54,0x9d,0x5b,0x5d,0xb5,0xb4,0xde,0xe9, +0x74,0xd6,0x2f,0xa0,0x83,0x09,0xbb,0xad,0x2a,0x65,0xb1,0x28, +0xd4,0xa5,0xdb,0x57,0x57,0x0f,0x35,0x7b,0xe9,0x9e,0xc2,0xa9, +0x0d,0x1b,0x37,0x6e,0xa0,0x04,0x8c,0xa6,0x7f,0x56,0xf3,0x92, +0x90,0xc1,0xd8,0x7b,0x49,0x3f,0xfe,0xd3,0xe7,0x31,0xd7,0x9f, +0xc7,0x5c,0x7f,0x1e,0x73,0xfd,0x79,0xcc,0xf5,0xe7,0xdb,0xe7, +0x31,0xd7,0x9f,0xc7,0x5c,0x9f,0x43,0xcc,0xb5,0x74,0x54,0x22, +0xfa,0x5f,0xa1,0x01,0x29,0x51,0x29,0x0a,0xb1,0xba,0xe8,0x00, +0x5a,0x45,0xb4,0xa1,0xe4,0xb8,0xd2,0x53,0x74,0x3f,0x11,0xef, +0x13,0xfe,0x6c,0x9c,0x70,0xd4,0xae,0xf7,0xf3,0x23,0x5e,0x6f, +0x20,0xe0,0xf5,0x8e,0xb0,0x3e,0xa8,0xfe,0xce,0xfd,0x4c,0xfb, +0xdf,0xe1,0x98,0xc3,0x77,0x87,0x02,0xc1,0x8b,0xee,0xbe,0x28, +0x18,0x08,0x0d,0xae,0x58,0xb6,0x61,0xd9,0x0a,0xc6,0x49,0xfd, +0x15,0xf4,0x97,0x45,0x3d,0xa0,0xb8,0xc0,0x91,0xd5,0x5f,0x88, +0xca,0xe2,0xa9,0x5c,0x57,0xe9,0x29,0xea,0x2f,0x63,0x27,0x53, +0x5c,0x90,0x85,0x6f,0x03,0xda,0x7d,0x6e,0x08,0x09,0x01,0x5d, +0xdc,0x27,0x2a,0x4c,0xb0,0x53,0x2f,0x3d,0xb7,0x98,0xde,0x33, +0x52,0x4c,0x24,0xd3,0x0d,0xd8,0x93,0xc3,0x75,0xef,0xe4,0x0d, +0xd8,0xd7,0x73,0x4a,0x87,0xf8,0x50,0x51,0xe9,0x18,0x9a,0x1a, +0x00,0x77,0x36,0x46,0xed,0xbb,0x75,0x5d,0xa0,0x0b,0x68,0x99, +0x3f,0x61,0x8d,0xb6,0x43,0xab,0xeb,0x20,0x5a,0xc1,0x51,0xff, +0xcd,0x7e,0xe3,0x52,0x23,0xbc,0x21,0xc1,0x42,0x48,0x32,0xf7, +0x17,0xda,0xe2,0x4d,0x68,0x0b,0x2b,0x4a,0xa2,0x8d,0x08,0xe9, +0x3e,0xd1,0x82,0x76,0x16,0x1a,0xc1,0x19,0x38,0x2f,0x7f,0xc2, +0x59,0xd3,0x7e,0x4e,0x6c,0x6b,0x23,0x17,0xe0,0xc6,0x09,0xc6, +0xeb,0xae,0xb3,0x75,0x5c,0x52,0xc1,0x09,0x08,0xb9,0x94,0x78, +0x82,0xc6,0x11,0xfa,0x59,0x7b,0x2d,0xa1,0x0f,0xe1,0x3d,0xa0, +0x0f,0x1d,0x06,0x7d,0x28,0x8b,0x96,0xa1,0x11,0xb4,0x13,0xb4, +0xdd,0x7b,0xd0,0x8f,0x59,0x5b,0x34,0x31,0xe2,0x64,0xb2,0x5c, +0x6f,0x21,0x6e,0x3b,0x4c,0x3c,0x75,0x1c,0x18,0x81,0x36,0x28, +0xa3,0x92,0x93,0x5c,0x7c,0xd0,0x30,0xce,0xbf,0x23,0xbc,0x0c, +0xcf,0xe8,0x5f,0x04,0x04,0x74,0xba,0x20,0x59,0x67,0x9a,0x80, +0xc6,0x2c,0x7f,0x0b,0x4a,0x8a,0x77,0x33,0x52,0x09,0x62,0x38, +0x2f,0x5a,0xd1,0xe1,0xc3,0x49,0xfb,0x98,0x9f,0xd0,0x72,0x4a, +0x24,0x53,0x28,0xca,0x43,0xb6,0x50,0x67,0xc6,0xa1,0x56,0xd7, +0x45,0xc2,0xb9,0x88,0xdb,0x9d,0xd2,0xeb,0xd4,0xf3,0xe4,0x4a, +0xd0,0x8f,0x6c,0x35,0xf9,0x7c,0x4d,0x28,0xa5,0x05,0x4c,0x21, +0xd0,0x08,0xf0,0x1e,0xbc,0xee,0x8c,0xa2,0xcb,0x6a,0x6a,0x18, +0x53,0xb6,0xb7,0x56,0xad,0xe1,0xa2,0x6f,0xab,0xa2,0x11,0xa7, +0xcb,0x68,0x92,0xe3,0xf1,0xe8,0xdb,0x32,0x17,0x1f,0x7d,0x9b, +0xcf,0xd3,0xf3,0x99,0x9c,0xfb,0x2a,0x4f,0xd2,0x6a,0xad,0x4e, +0xd8,0x02,0x0e,0xbd,0x48,0xdd,0xa0,0x96,0x69,0xb5,0x55,0x5d, +0x6b,0xe6,0x5b,0x6d,0x4a,0x95,0x39,0x62,0x2f,0x2b,0xb7,0xac, +0xb3,0xe0,0x6e,0x3c,0xd7,0x7f,0xb4,0x42,0xaf,0x56,0x9b,0xe4, +0xb6,0xcc,0xdc,0x78,0x22,0x18,0xac,0xd3,0xa8,0xa5,0x52,0xa7, +0xd1,0x50,0x5a,0xaf,0x57,0x6b,0xcc,0x8a,0x7c,0xb5,0xac,0x3a, +0xef,0xd4,0x53,0x25,0x54,0xfd,0xdf,0xea,0x0b,0x4b,0xce,0x35, +0x9c,0x0c,0xff,0x9f,0x89,0x61,0xbe,0x3e,0x7f,0x45,0x45,0x34, +0x92,0xc6,0x58,0xef,0xb6,0xaa,0xed,0x33,0x84,0xf9,0x8e,0x94, +0xef,0x2b,0x8f,0x06,0x83,0x51,0x79,0xbc,0x4a,0x63,0xf3,0x1b, +0x45,0x66,0x51,0xb9,0xdd,0x1e,0xb5,0x96,0x59,0xac,0x1e,0x6f, +0xa8,0xa2,0xa5,0xde,0x66,0xb3,0x99,0xfa,0x4c,0xac,0x8d,0xea, +0x42,0xe0,0xa9,0x4b,0x80,0xa7,0x2a,0x50,0x06,0xfa,0xda,0xb5, +0xe8,0x18,0x7a,0x19,0x24,0xcf,0xc4,0x00,0xc2,0x33,0x8c,0x1f, +0xf4,0x3a,0x45,0xa7,0xe5,0x41,0x02,0x90,0xe9,0xc9,0x3c,0x98, +0xd1,0x39,0xbd,0x33,0xf2,0xd1,0xe9,0x63,0xad,0x9d,0xe9,0xcc, +0x99,0x71,0x11,0x1f,0x45,0x98,0xeb,0x73,0xb9,0xc2,0x0a,0x5a, +0xc0,0x06,0x11,0x3a,0x42,0x1e,0x4f,0xaa,0x4c,0xa3,0x29,0xe3, +0x82,0x08,0xeb,0xd4,0x24,0x88,0x30,0x5f,0x53,0xdd,0xd4,0x44, +0xa7,0x98,0xd7,0x85,0x72,0xb1,0x4c,0x21,0x77,0x06,0xed,0xa1, +0x0e,0xe0,0x39,0x55,0x3d,0xe1,0x39,0x97,0x3b,0xad,0xd3,0xab, +0x95,0x29,0x85,0xc2,0xea,0x0a,0xd9,0x6a,0x1b,0x1b,0x6b,0x81, +0xe9,0x94,0xb5,0x2a,0xb1,0x16,0xef,0x29,0xa8,0xab,0x08,0x2b, +0x41,0x1e,0xc2,0x4a,0x91,0x28,0xcb,0x4a,0x34,0x3d,0xce,0x49, +0xc4,0x9b,0x3d,0xc6,0x49,0x1b,0x36,0x24,0xad,0xb6,0x1a,0x8e, +0x91,0x54,0x8d,0x45,0x46,0xb2,0x59,0x81,0x91,0xc2,0x65,0xf6, +0x72,0x2b,0x61,0xa4,0x47,0xce,0x2e,0x60,0xf0,0xcf,0xed,0x77, +0xce,0xc8,0x75,0xd2,0xa0,0x54,0xef,0x9c,0xc8,0x76,0x3b,0x30, +0x7e,0xf2,0xec,0x78,0x67,0xc5,0xe0,0x19,0xb1,0x0e,0x12,0xa1, +0x1c,0x8c,0xe9,0x2f,0xb2,0x3e,0x28,0x12,0x39,0x9e,0x40,0x4b, +0xd0,0x85,0x08,0x09,0x8b,0x1e,0x0d,0x12,0x93,0x0b,0x5a,0x22, +0xed,0xf3,0xb3,0x7e,0x28,0x71,0x2c,0xc9,0x79,0x25,0xcf,0xc0, +0x32,0x27,0x3a,0x53,0xc3,0x1c,0xab,0x56,0x25,0x33,0xfc,0xc0, +0x26,0x28,0x93,0x7a,0x44,0xef,0x88,0x3c,0xd2,0xe1,0xef,0x1e, +0x74,0x7e,0xd1,0xf9,0x3f,0x52,0x99,0x5c,0x26,0xad,0x7d,0x58, +0x16,0x38,0x75,0xd3,0xe4,0x80,0x71,0xea,0x81,0x9a,0x01,0xa7, +0xd3,0xe3,0x61,0x0d,0x6e,0x8b,0x92,0x29,0x87,0xa2,0x43,0xd3, +0x90,0x22,0xf6,0xb6,0xf4,0x2c,0xad,0xb2,0x4a,0xe9,0x58,0x4f, +0x7d,0x87,0x18,0xd3,0x4a,0x9c,0x82,0x83,0x07,0x69,0x32,0x65, +0x85,0xc4,0x7e,0x67,0xb2,0x25,0x4e,0xa1,0xa4,0xd4,0x24,0xec, +0x36,0x9c,0xbf,0xf2,0x23,0xf7,0xbe,0xd2,0xd2,0x7d,0x6e,0xea, +0x18,0xf1,0x00,0xe1,0xb7,0xe2,0xb0,0xfd,0xd0,0x73,0x04,0xdf, +0xf5,0xc9,0xe6,0x34,0x62,0x34,0x9e,0x66,0x4d,0x33,0x76,0x97, +0x10,0x4b,0x99,0x64,0x81,0x51,0x0f,0xa3,0xe3,0x2a,0xea,0xd8, +0xae,0x9d,0xe6,0x01,0x65,0x53,0x93,0xec,0xe1,0x4a,0x12,0xdc, +0x2d,0x1e,0x6b,0x67,0x23,0x2a,0x07,0x6c,0x90,0x46,0x0d,0x68, +0x18,0x7d,0x71,0xcc,0x07,0x09,0x22,0xbb,0x28,0xbd,0xf9,0x59, +0x1a,0xd3,0x83,0x53,0x34,0xff,0xc0,0x56,0xa7,0x6e,0xc0,0xea, +0xb9,0xf3,0xb3,0x29,0xbb,0xa9,0xd4,0x25,0x2d,0x31,0x56,0xe4, +0x5c,0xcc,0x8f,0xd7,0xdc,0xed,0xf5,0xf9,0xbc,0x77,0xff,0x9b, +0xd3,0xeb,0x75,0xfe,0x5b,0xa1,0xe6,0x33,0x6f,0x7d,0x7c,0xf7, +0xd2,0x9e,0x7c,0x9b,0x50,0x2e,0x93,0x55,0xd8,0x6c,0xce,0xd0, +0xec,0xa4,0xad,0xcf,0x1f,0x0a,0x87,0xfd,0x4b,0x3c,0x15,0xa1, +0x80,0x1b,0xdb,0x3f,0xfb,0xa7,0x40,0x62,0x6d,0xfc,0x20,0x2b, +0x7f,0x0a,0xb2,0x92,0xe0,0xb3,0x5a,0x74,0x1e,0xda,0xcb,0x7a, +0xb9,0xce,0x70,0xc6,0xd9,0xf4,0xc8,0xd7,0x73,0x08,0x9f,0x9d, +0xe0,0x0c,0xa3,0x3e,0xfc,0xb4,0x69,0x68,0xd4,0x76,0x12,0xef, +0xfb,0x9b,0x31,0xaf,0x98,0xe6,0x05,0x75,0x63,0xe1,0xf1,0x19, +0xa6,0xba,0xcd,0x14,0x5d,0x3b,0xbc,0xdc,0xd9,0xd0,0x07,0x0f, +0x7d,0xcc,0xa6,0x79,0xa4,0x38,0x2d,0x6d,0x69,0x64,0x6c,0x5a, +0xda,0x6a,0x89,0x44,0xad,0xae,0x74,0x90,0x69,0x69,0x8f,0x3f, +0x4e,0x1d,0x9d,0xe8,0x34,0x9b,0x3b,0xc1,0xa2,0x58,0x29,0x9b, +0x1a,0x70,0x3b,0x6e,0x4e,0x24,0xfe,0xd5,0xac,0x7d,0x3c,0xfa, +0x1f,0x21,0x0a,0xbf,0x32,0x6a,0x14,0x26,0x04,0x4a,0xe4,0x24, +0x2b,0x4e,0x40,0x0b,0x93,0x28,0xd0,0x58,0x7a,0xcc,0xb4,0x42, +0x18,0x36,0xc1,0xbb,0xdc,0x29,0xb1,0x21,0xe9,0x4f,0x10,0x78, +0x41,0x54,0x83,0x28,0x0c,0x53,0xc5,0x18,0xfa,0x32,0x4a,0xb0, +0xf5,0xca,0x45,0x15,0xfe,0x45,0x97,0x56,0x56,0x5a,0xcd,0xf5, +0x55,0xb9,0xf9,0xf3,0xbf,0x33,0x7f,0x7e,0xae,0xaa,0xfe,0xe9, +0x5b,0x6f,0xfc,0xa0,0x7a,0xb0,0x59,0xab,0xd3,0x69,0x9b,0x07, +0xab,0x6b,0x56,0x70,0xa9,0x15,0x7f,0x08,0x87,0xda,0xbb,0x64, +0x73,0xf2,0xf9,0x65,0xfd,0xdb,0xf7,0x3d,0xd7,0x94,0x77,0xc1, +0x96,0x6f,0x7a,0x6e,0xdf,0xdb,0xcc,0x29,0xdb,0xda,0x3f,0x57, +0x74,0x65,0xb3,0x2d,0x47,0x5b,0xb2,0xd9,0xae,0x8a,0x09,0x49, +0xc0,0xaa,0x3a,0xf4,0x84,0xe8,0x7d,0x7a,0x31,0x1c,0xeb,0xd0, +0x02,0x2e,0xc2,0x8e,0x9e,0x1a,0x5f,0xc1,0xf7,0x21,0x3a,0x46, +0x17,0x3b,0x11,0x87,0x65,0xa7,0x02,0x73,0x40,0xae,0xce,0x58, +0x3a,0x86,0xd9,0x4f,0x40,0xb1,0xc4,0xe7,0x16,0x7b,0xf7,0xd5, +0x6d,0xa6,0x01,0x93,0xc2,0xb4,0xcc,0xb4,0xd5,0x75,0x99,0x8b, +0x2e,0x21,0x3d,0x43,0x52,0x46,0x8c,0xfc,0x0e,0x31,0xd7,0x33, +0xb4,0xed,0x5a,0x71,0xb9,0x44,0x42,0x20,0x39,0x31,0xf2,0x53, +0x37,0x32,0x79,0x9c,0x67,0x5e,0xe1,0xc3,0x4e,0x9e,0xc0,0x34, +0xbe,0x29,0xf1,0x52,0x3c,0xfe,0x52,0xa2,0x99,0xf9,0x63,0x0b, +0x53,0xc0,0xb7,0x7c,0x3a,0x0e,0x1f,0x8f,0x3e,0x21,0xf1,0x72, +0x5d,0x80,0xc7,0x1f,0x85,0x3a,0x12,0xff,0x6e,0x05,0x89,0x13, +0xcd,0x7e,0x8a,0x6f,0xb7,0xc8,0xa6,0x1a,0x7c,0x0e,0xc8,0xf4, +0x49,0xde,0xc9,0x6b,0x1e,0x1c,0x73,0xf2,0x46,0x83,0xf7,0x53, +0xba,0x62,0x58,0x21,0xdd,0x4b,0x40,0x22,0x2d,0x3e,0x13,0x90, +0xa8,0x53,0xf2,0x20,0xf1,0x89,0x29,0xce,0x5e,0x12,0x29,0xf9, +0x63,0xe6,0xfa,0x62,0x68,0x61,0x63,0xc5,0x51,0x3f,0x3b,0x9e, +0xda,0xd3,0x53,0x51,0x9c,0x46,0x3d,0x05,0xc5,0xb1,0xb1,0xfa, +0x78,0x3b,0xc8,0x82,0x2b,0x40,0x16,0x74,0x81,0x14,0x78,0x14, +0xbd,0x75,0xba,0x79,0x21,0x26,0x1e,0x9c,0xf0,0xe0,0xc6,0xc0, +0x46,0x4e,0x8c,0x9d,0x17,0x8d,0x80,0xfe,0x2c,0xcb,0x0a,0x13, +0x02,0xea,0x26,0x40,0x66,0xbf,0x8f,0xd7,0x76,0xc7,0xcb,0x2d, +0x42,0x1e,0xee,0x32,0xc1,0x3c,0xe7,0xd2,0xd0,0xf8,0x8c,0x71, +0x39,0x35,0x7f,0x7a,0x48,0x5e,0x45,0x85,0xdd,0xae,0xd6,0x48, +0xa5,0x5a,0x6d,0xa9,0xc9,0x62,0x4f,0xea,0x74,0x32,0x99,0x46, +0x53,0xce,0x06,0xe6,0xb9,0x3d,0x56,0x9b,0xde,0xa0,0x9a,0xa7, +0xb0,0x91,0xd0,0xbc,0xba,0xa6,0x96,0xc6,0xd9,0xf4,0x7e,0x26, +0xe7,0xb9,0xca,0x9d,0xb4,0x59,0xed,0x65,0x09,0x6b,0x50,0xa5, +0x92,0x49,0x41,0x22,0xa9,0x64,0x1a,0x5d,0xd6,0xe7,0x5b,0xb3, +0x00,0x40,0xb5,0xd2,0x6c,0x34,0xb2,0xa8,0xda,0x8a,0xbb,0x0b, +0x77,0x33,0xaf,0xd3,0x32,0x7a,0x0c,0x93,0x65,0xcb,0x54,0xea, +0xfa,0x70,0x84,0x60,0xb2,0x94,0x5e,0xaf,0x9a,0xab,0x50,0x28, +0x5d,0x61,0x2b,0x0f,0xc9,0x54,0x35,0xdc,0x23,0xa6,0xe6,0x33, +0x55,0x9e,0x22,0x66,0x0f,0x96,0x8d,0x61,0xf6,0x4e,0xae,0xf8, +0xd2,0x31,0xcc,0x3e,0x6d,0xd6,0x88,0x5c,0x66,0x32,0x3a,0x1d, +0x81,0x72,0x8b,0x59,0xaf,0x97,0x2b,0x44,0x02,0x91,0x05,0x2e, +0xdb,0xbc,0xa0,0x91,0x91,0xb9,0x23,0x52,0xa9,0x46,0x63,0x00, +0x54,0xaa,0x77,0x8d,0xcf,0x1e,0xd9,0x39,0x8e,0xb0,0x6d,0x36, +0x8d,0x52,0xa9,0xd7,0x15,0x91,0x92,0x42,0xc9,0x41,0xa5,0x40, +0xb3,0xc3,0xc1,0x61,0x25,0x61,0xeb,0xd9,0xa8,0x08,0x2b,0xcf, +0x18,0xbb,0x0b,0x78,0x3d,0x99,0xcc,0x17,0x89,0xa2,0x2c,0x7d, +0xd5,0x4c,0xbe,0xe5,0x33,0x8a,0x9f,0x17,0x12,0x47,0x86,0x1d, +0xff,0xdf,0xf7,0x27,0xfc,0xd3,0xdc,0x1a,0x86,0x99,0x3d,0x19, +0xf8,0xff,0xbe,0x47,0xe1,0x9f,0x56,0x7e,0x7a,0xba,0x2f,0x03, +0x57,0xaf,0x39,0x8e,0xbf,0x8b,0x45,0xfc,0xb4,0x87,0x0a,0xff, +0x0c,0xd3,0x1e,0xf0,0x7f,0x97,0xae,0xf8,0xac,0xfd,0x11,0x98, +0x66,0x1d,0x12,0x02,0xc0,0x7e,0x7b,0x94,0x39,0x25,0x3f,0x09, +0xf3,0x33,0xa6,0x31,0x6c,0x5e,0x59,0x7a,0xa1,0x2a,0xa7,0x82, +0x92,0x65,0x40,0x41,0x55,0xa7,0xa2,0x4e,0x15,0x9e,0xa6,0x5a, +0x96,0x2e,0x2d,0x3c,0xc4,0x4e,0xbd,0xa8,0xcd,0x56,0x55,0xc6, +0x8a,0x53,0x2f,0x62,0xa9,0x09,0x53,0x2f,0x3a,0x3e,0x77,0x33, +0x7c,0xee,0x66,0xf8,0x7c,0xfb,0xac,0xdd,0x0c,0x6c,0x1c,0xeb, +0x6c,0x18,0xc3,0x9e,0xa4,0x87,0x00,0x59,0x56,0x42,0xba,0x17, +0x6d,0x85,0x51,0x8c,0xac,0x3b,0x30,0x1e,0xd7,0xcc,0xc3,0x63, +0xb8,0xc8,0x47,0x36,0x9f,0xd1,0xf4,0x59,0xe1,0x99,0x4d,0xb2, +0x55,0xab,0xea,0xd4,0x1b,0x37,0x0a,0xd4,0x8d,0xea,0xb2,0x0b, +0xca,0x2e,0xaa,0x38,0x56,0x11,0x7a,0x20,0x74,0xc8,0x75,0x29, +0xb5,0xea,0xb4,0x53,0x5a,0x45,0x22,0x32,0xa5,0x95,0xea,0xfe, +0x94,0x0c,0xf8,0x03,0x6d,0xab,0xf6,0x55,0xea,0x28,0x73,0xbf, +0x61,0x81,0xde,0x7b,0x8d,0x07,0x80,0x67,0x9e,0x61,0xf2,0xa9, +0xff,0xc3,0x7c,0x10,0x5d,0x4a,0x66,0x9e,0x36,0xe6,0xf9,0x99, +0xa7,0xd6,0x54,0x7b,0x68,0x57,0xb8,0x2d,0x65,0xb5,0x92,0x99, +0xa7,0xbb,0x42,0x5e,0xb7,0xd5,0x62,0xed,0x3f,0x93,0x4c,0xc4, +0x7e,0x57,0xd4,0x49,0x2b,0x51,0x13,0x5a,0x85,0xae,0x40,0x37, +0xa0,0x5b,0x89,0xce,0x44,0x34,0x08,0x32,0xea,0x83,0xde,0x34, +0x11,0xdb,0x71,0xbe,0x04,0x3c,0x01,0x91,0x12,0x78,0x27,0xe4, +0x70,0x22,0x69,0x2c,0x16,0xb4,0xb2,0xcd,0x95,0x9d,0xe0,0x70, +0x81,0x97,0x4b,0x3c,0xc1,0xe3,0x02,0x2f,0x7c,0x36,0x7a,0xaf, +0x76,0x92,0xe2,0x4b,0xb7,0x30,0xb9,0xd7,0xc7,0x2d,0x62,0x1c, +0x4c,0xb3,0xd9,0xba,0xd6,0xcc,0xcf,0x2a,0x55,0x0a,0xb9,0xd1, +0x64,0xe7,0x6d,0x62,0xb8,0xbd,0x21,0x1a,0xad,0x55,0xc2,0x56, +0x1b,0x8d,0x36,0xec,0xd9,0xb5,0x6b,0x8f,0xcb,0x5c,0xaa,0x56, +0x71,0x2d,0x5c,0x6a,0x6e,0x29,0x35,0xab,0xd4,0x22,0xb1,0x58, +0xa4,0x56,0x99,0x4b,0x99,0x2f,0x7d,0xaa,0x3a,0xbc,0x83,0x44, +0x23,0x6f,0xdb,0x36,0x49,0x1f,0xfe,0xf3,0xc8,0xb7,0xa2,0xc1, +0x40,0x25,0x01,0x5b,0x76,0x1f,0x0f,0xb6,0x4c,0x26,0x6b,0x59, +0x9a,0x80,0x2d,0xb7,0xab,0x88,0xe1,0xd6,0x9a,0x4a,0x8b,0xd3, +0x85,0x4d,0xa5,0xec,0x03,0x51,0x2a,0x2d,0x16,0xb7,0x27,0xb2, +0x93,0x80,0x44,0x0b,0xb9,0x45,0x8b,0xd5,0xed,0x09,0xef,0x8c, +0x78,0xdc,0xe4,0x94,0x3e,0xff,0xd3,0xb4,0x65,0x12,0x53,0x3a, +0x41,0x5f,0x66,0x6d,0xb1,0x32,0x66,0x44,0xf8,0x17,0xa1,0x0a, +0x39,0x50,0x0e,0xe5,0xd9,0x39,0x79,0x5b,0x08,0xa6,0x73,0xbb, +0x7c,0x75,0x78,0x46,0xed,0x57,0xf4,0x09,0xda,0x6f,0x31,0xec, +0x0f,0xcf,0xe0,0x1b,0x13,0x4e,0x5e,0x65,0x81,0x8d,0x63,0x4a, +0x66,0x58,0x63,0xce,0x6f,0x56,0xe4,0xd2,0x55,0xcb,0x1c,0xe5, +0x1a,0x6d,0xd0,0xe7,0xcd,0xa4,0x0f,0x66,0xd2,0x3e,0x5f,0x60, +0xcf,0x86,0xb5,0xb7,0xf9,0x1b,0x23,0xc4,0x2d,0x16,0x21,0x11, +0x82,0x11,0x12,0xf7,0x17,0x69,0xa4,0xde,0x27,0x11,0x85,0x27, +0x6b,0x26,0xcd,0xff,0x14,0x18,0x84,0x25,0xee,0x12,0x18,0x6c, +0x4b,0x57,0x9a,0x21,0x21,0x5c,0xbb,0xff,0x51,0x51,0xdf,0xd2, +0x2f,0xac,0x65,0x46,0xaa,0xe3,0x09,0x71,0x2a,0x14,0xaa,0xab, +0xef,0x5a,0x74,0x20,0x1c,0x32,0xc1,0x16,0x0a,0x1f,0x58,0x74, +0xfd,0x03,0xba,0x96,0xdb,0x2d,0x49,0xaf,0x37,0x42,0x62,0x03, +0x01,0xbd,0x27,0x49,0x64,0x60,0xc4,0xeb,0x4d,0x8e,0x05,0xfb, +0x61,0xcf,0xf8,0x14,0x37,0x12,0xa5,0x5b,0x0f,0x1a,0x6f,0xf8, +0x91,0x48,0xe4,0x91,0x30,0x24,0x58,0x07,0xcb,0x7d,0xf7,0xdd, +0xcb,0xc7,0x1f,0x5d,0x8c,0x7a,0x44,0x5f,0x60,0xe3,0x8f,0xe6, +0x9c,0x5b,0xfc,0xd1,0x4c,0x4d,0xa3,0x23,0x5e,0xb3,0x27,0xd6, +0x5d,0x97,0x56,0xd7,0xab,0xc3,0x99,0x74,0xf3,0x82,0x05,0xb9, +0x76,0x9f,0xf7,0xc2,0xba,0xfa,0x60,0xd7,0xc6,0x59,0x2b,0x5a, +0x5b,0xe2,0xcb,0x68,0xe7,0x40,0x6b,0x5b,0x85,0xbf,0xdc,0xd9, +0xdc,0x71,0xd1,0xce,0xc0,0xdc,0xf3,0xe8,0x8f,0x45,0xb2,0xb0, +0x4c,0x77,0xc0,0xed,0x39,0xa0,0x83,0x84,0xe8,0xe0,0x6d,0x6f, +0x8b,0xdf,0xba,0xf1,0xe0,0xd9,0x05,0x23,0x51,0x57,0x01,0xeb, +0xb9,0xde,0x6b,0x6c,0x7c,0xcf,0x05,0x89,0xc2,0x3e,0xba,0x95, +0x59,0x8c,0xef,0x3d,0xf5,0x14,0xf1,0x91,0x3d,0x86,0x56,0x89, +0x3a,0xe9,0x7b,0xd8,0xf9,0xba,0xa7,0x9d,0xad,0x5b,0x82,0xa7, +0xcf,0x6a,0x7b,0x1c,0x8f,0xec,0xd8,0xb7,0x6f,0xc7,0xdb,0x6f, +0xa4,0x72,0xb9,0xd4,0x1b,0x74,0x1f,0xf3,0xfe,0x11,0x53,0xaf, +0x49,0x9a,0x55,0x09,0x55,0x55,0x52,0x48,0x5d,0x1a,0x7d,0x2a, +0xba,0x8a,0x6e,0xfd,0xd2,0x6f,0xbf,0xc4,0x1c,0xc7,0xcf,0x67, +0x12,0xd5,0x89,0x4c,0x21,0xce,0xcd,0x50,0xf3,0xbe,0x94,0x9d, +0x30,0x43,0x0d,0x4d,0xb0,0x0d,0x14,0xe5,0xf7,0x45,0x9f,0x91, +0xf4,0x3e,0x27,0x75,0xd6,0xa0,0xae,0x53,0x6d,0xda,0x44,0x83, +0x2c,0x77,0xec,0x2e,0xdb,0x57,0x71,0xab,0x3f,0x74,0x3f,0xc8, +0xf2,0x2f,0x52,0xab,0x1a,0xfa,0x6b,0x54,0x4a,0xa5,0xaa,0xa6, +0x9f,0x93,0x21,0x71,0x87,0x42,0xe1,0x20,0xa2,0x9a,0x93,0x1d, +0x71,0xda,0x72,0x0e,0x06,0x85,0xbf,0x53,0xbe,0xe3,0x3f,0x9d, +0x95,0xc5,0x41,0x88,0x97,0x81,0x9c,0xbf,0x0b,0xe4,0x3c,0x99, +0x7f,0xdf,0x86,0x0e,0x90,0x38,0x57,0xe2,0xe3,0xcc,0x9c,0xde, +0x7e,0x48,0xcd,0x68,0x3f,0x9c,0x71,0x9e,0x4f,0xe6,0xef,0x9e, +0x7c,0x36,0xc5,0x76,0x4c,0x7e,0x45,0xcd,0x5f,0xb4,0x2b,0xe8, +0xf5,0xcd,0x38,0x8f,0x5f,0x66,0x29,0x2b,0x99,0x3c,0x91,0x1f, +0x47,0x78,0x5f,0x3b,0x67,0xee,0x61,0xc2,0x3d,0xbb,0x42,0x3e, +0x2f,0xeb,0x6c,0x6d,0x2a,0x35,0x4e,0x0f,0xa0,0x54,0x98,0xa7, +0x04,0x50,0x72,0x93,0xce,0xbc,0x9e,0x75,0xf9,0xde,0x9d,0xae, +0x48,0x94,0xac,0x4d,0xd2,0xdb,0x3b,0xb7,0xae,0x53,0x27,0x9d, +0xe3,0xba,0xa0,0x50,0x97,0x72,0xbb,0x67,0x34,0x46,0x4a,0x8d, +0x56,0xc9,0x0c,0xd6,0xc8,0x89,0xe2,0x06,0x97,0x8e,0xff,0xfa, +0x0c,0x83,0x23,0x1f,0xbe,0x67,0x51,0x63,0x63,0x24,0x1c,0x99, +0xd3,0x69,0x36,0x73,0x73,0xd2,0xd6,0xd5,0xc7,0x45,0x95,0xed, +0x9c,0x3d,0x2d,0x8a,0x9e,0x10,0xfd,0x80,0x5f,0xe7,0x21,0x33, +0xf3,0x3a,0x0f,0x33,0x7b,0xb5,0x75,0xa7,0x8d,0x96,0x58,0x49, +0x02,0xb0,0xb7,0x8e,0x5b,0x6b,0x0f,0xbd,0xdf,0xb8,0xce,0xeb, +0xad,0xa8,0xf0,0x7a,0xd7,0x35,0x72,0x61,0x0f,0x07,0xc6,0x17, +0x7a,0x28,0xce,0xbf,0x3f,0x1a,0x0c,0x06,0xf7,0x7e,0x7d,0x2f, +0x7c,0xb2,0x13,0x6a,0x97,0x33,0x2e,0x2e,0x6e,0xbd,0x13,0x78, +0xed,0x31,0xe0,0x35,0x03,0xf4,0xea,0x28,0x6a,0x47,0x9b,0xf1, +0x1b,0x04,0x53,0x90,0x7b,0x63,0x57,0x3b,0xe2,0xd7,0x30,0x70, +0xc3,0xee,0xe5,0xfc,0xf0,0xca,0xb1,0x7e,0x3d,0xde,0xad,0xf1, +0x78,0xb8,0xc6,0x78,0xb4,0x06,0x8c,0x4b,0x67,0xb2,0x02,0x0d, +0x41,0x0e,0x2a,0x6c,0x50,0x29,0x0d,0x2a,0x05,0xfb,0xa9,0x9c, +0x29,0x4d,0x5c,0x4d,0xd9,0x74,0x83,0x8c,0x7d,0x4b,0x8b,0x09, +0x2e,0x2d,0x9a,0xe9,0xba,0x98,0x9d,0x8a,0xca,0xae,0xac,0x14, +0xb9,0xb2,0xbf,0x9f,0xf9,0x16,0x59,0x59,0x89,0xfa,0x06,0x0b, +0xe5,0xec,0xe3,0x48,0x8e,0x5d,0xb6,0x44,0x05,0x12,0x02,0xb0, +0x06,0x6c,0x8e,0x78,0xe1,0x8f,0x87,0xae,0xf7,0xb7,0x8f,0xe4, +0x7b,0x6b,0x6a,0x9c,0xaa,0x5a,0x35,0x59,0x74,0x81,0x84,0xb6, +0x4f,0x58,0xd8,0xa9,0xf2,0x19,0xc9,0xbf,0x30,0xf6,0x86,0x11, +0xe8,0x1f,0xb2,0xe8,0xd8,0x3f,0x62,0xfb,0xda,0x1d,0x7f,0x9e, +0xb2,0x4a,0x15,0xf3,0x4e,0x65,0x6f,0x63,0xbe,0x7b,0xc1,0xa1, +0xde,0xe2,0x52,0x2d,0x1e,0x6f,0x78,0x67,0xc8,0x0b,0xc0,0xcb, +0x66,0xb3,0x58,0x00,0xa9,0xed,0x0c,0x03,0x72,0xb0,0xd1,0x22, +0xe8,0x76,0xfb,0xa7,0xae,0x30,0x94,0xaa,0x2f,0xae,0x30,0xd4, +0x87,0xff,0xf2,0xff,0x0d,0x55,0x09,0x84,0xdd,0x3f,0x74,0xad, +0xb8,0x7f,0xe0,0x46,0x26,0x38,0xb3,0x38,0xac,0x9f,0x5a,0x21, +0xba,0x53,0x78,0x1e,0x3b,0xdb,0x19,0xe9,0x9c,0x06,0x27,0x74, +0x55,0x53,0x3a,0x69,0xc8,0x9a,0xc4,0x49,0x83,0xdb,0x24,0xf6, +0x1b,0xdc,0x69,0xb1,0x3f,0xeb,0x4e,0xf7,0x8b,0xda,0xfe,0xf6, +0x4d,0xc1,0x73,0x47,0x82,0x47,0x6a,0x61,0x7f,0xe1,0x85,0x62, +0x82,0xba,0xab,0x95,0x72,0x4d,0xba,0xc2,0x26,0xc8,0x2a,0xe1, +0xfd,0xa3,0x5e,0x28,0xfb,0x75,0xf2,0xff,0x10,0xba,0x44,0x18, +0xd7,0x0b,0xd3,0x9a,0x54,0x94,0x0e,0x53,0xee,0xfe,0x5b,0x70, +0x0a,0x0b,0xff,0xf7,0xc5,0x07,0xf6,0x2d,0x8b,0xd6,0x6e,0xb9, +0xf7,0x04,0xf3,0x11,0xf3,0x1b,0xe6,0x9e,0x07,0xa8,0xbb,0x92, +0x8b,0xb7,0x5d,0x74,0xe8,0xc2,0x35,0xb3,0x95,0x7f,0x9b,0x67, +0x58,0xb6,0xf7,0xea,0x6b,0x2e,0x19,0xa9,0x9f,0x5c,0x0e,0x76, +0x85,0x71,0x94,0x94,0x53,0x0f,0xe5,0x24,0x45,0x77,0xde,0xc2, +0x9c,0x60,0x4e,0x8e,0x17,0x84,0x25,0xd8,0x8a,0x97,0x9c,0xa6, +0x20,0x56,0x8f,0x0d,0x8e,0x56,0x89,0x5e,0x17,0x5e,0x07,0xd2, +0xbd,0x11,0x35,0xa3,0x4e,0x2c,0x81,0x7b,0x8b,0x39,0xc5,0x4e, +0x81,0x4b,0x49,0x8b,0x95,0x82,0xa2,0xad,0x9f,0x8d,0x0c,0x36, +0x95,0x09,0x12,0xf5,0x74,0xb6,0x5e,0x50,0xf4,0x10,0x00,0x92, +0x27,0xe0,0x86,0xa6,0x49,0x3b,0x19,0xdc,0x42,0xaf,0x3b,0xed, +0xe5,0xf5,0xaa,0x4c,0xa2,0x8c,0x36,0x41,0x36,0xbd,0x88,0x7c, +0x02,0xf2,0x27,0x3f,0x21,0xa0,0x8a,0x86,0x23,0xe7,0xb9,0x65, +0x41,0x12,0x8e,0xf3,0x27,0xec,0x75,0x82,0x9a,0x4c,0x6c,0x0c, +0x32,0x29,0x1b,0x06,0x6e,0x96,0x02,0x37,0xd1,0x28,0x1d,0xa5, +0xfc,0x84,0x1c,0x1b,0x83,0x4c,0x70,0x95,0x8b,0x04,0x78,0xd0, +0xfc,0x09,0x39,0x50,0x70,0xca,0xa6,0x26,0xec,0x6c,0xb4,0x90, +0x3f,0xa5,0xc4,0x69,0x25,0x8b,0x0f,0x4c,0x46,0x00,0x0b,0xa2, +0x2c,0x20,0x00,0x28,0xb7,0x1f,0xff,0xba,0x95,0x59,0x29,0x78, +0xab,0x67,0x68,0xfe,0xbc,0x4a,0x95,0xd8,0x50,0xdb,0xb8,0x2c, +0xdc,0xdd,0xf9,0xe5,0xbb,0xe7,0xa4,0x25,0x76,0x83,0x55,0xa5, +0xaa,0x9c,0x37,0x7f,0xe8,0x13,0xbe,0xfb,0x25,0xfe,0x35,0xb3, +0x92,0x51,0x5f,0x4f,0xfe,0xb7,0xe2,0xfa,0x53,0x17,0x0a,0x94, +0x1e,0x8b,0xce,0x2a,0x53,0x3a,0x4c,0x72,0x09,0x45,0x69,0xac, +0x06,0x0d,0x25,0x12,0x0b,0xaa,0xa2,0x62,0xb5,0x5a,0x29,0xa7, +0xd4,0x12,0x5a,0x24,0xd7,0xc9,0xa5,0x25,0x22,0xd9,0xc2,0x9c, +0x4e,0x21,0x08,0x57,0x68,0xe4,0xa5,0x65,0xf9,0x4a,0xb9,0xdd, +0xa0,0x10,0x28,0x2d,0x1e,0x5d,0xb9,0xde,0x5f,0x26,0xd7,0x6b, +0xa4,0x25,0x25,0x25,0x95,0xed,0xce,0x30,0xd6,0x59,0xb4,0xaa, +0x52,0x81,0x5a,0xa4,0x72,0x7a,0xf5,0x2a,0x75,0xd0,0x6c,0x33, +0xa9,0x3d,0xda,0x12,0xa7,0x42,0x19,0xd5,0x59,0x6a,0x74,0xa5, +0x80,0x01,0x15,0x55,0x25,0x01,0xa5,0x55,0x6f,0xd1,0x28,0x52, +0x95,0x5a,0xb1,0x44,0x6d,0xd6,0x48,0x65,0x46,0xb5,0x5a,0x6d, +0x33,0xa9,0x4a,0x5d,0x72,0x8b,0x4b,0xa2,0x31,0x2a,0x68,0x0c, +0x20,0xc7,0x4f,0x5b,0x28,0x2c,0x51,0x63,0x1a,0x53,0x12,0xb1, +0xd6,0x42,0x3d,0xb9,0xf9,0xe9,0xca,0xa6,0xee,0x5a,0x53,0x89, +0xbd,0xa3,0xa9,0xb3,0x34,0x72,0xf7,0xdc,0x39,0x0a,0x95,0xc1, +0x6e,0x34,0xd5,0x76,0x37,0x55,0x9e,0xee,0x0b,0xdc,0xbb,0x19, +0x7b,0x3f,0xfe,0xe0,0x83,0x8f,0x6f,0x55,0xd8,0x03,0x16,0x83, +0x55,0xac,0xd4,0xd8,0x35,0x4a,0x93,0xaf,0x5a,0x46,0xc9,0x15, +0x62,0xa1,0x30,0xab,0x2e,0x91,0xa9,0x4b,0x04,0x12,0xf9,0x5a, +0x85,0x20,0xef,0x77,0xd4,0x64,0x07,0x4b,0x95,0x62,0x8d,0x5d, +0x6b,0xf2,0x95,0x18,0x54,0x6a,0xdc,0x3d,0x4b,0x50,0x25,0xd0, +0x0a,0x71,0x4a,0xa2,0x31,0xa9,0xe5,0x11,0xad,0x8c,0x16,0x48, +0xea,0x9b,0x64,0xe2,0x4a,0xbb,0xc6,0x23,0x6b,0x51,0x6b,0xf4, +0xb6,0xa4,0xca,0xae,0x2c,0x19,0x90,0xce,0x91,0x97,0x96,0xca, +0xf3,0x11,0xca,0x64,0x74,0x9a,0x24,0x42,0x8d,0xdc,0xaa,0xf7, +0xb9,0x84,0x4a,0x97,0x99,0x36,0x89,0x29,0xb9,0x9c,0xa6,0x84, +0x94,0x46,0x40,0x51,0x94,0x00,0xc3,0x4e,0x89,0x2d,0xa6,0xb1, +0x3e,0xdb,0x0e,0x3a,0x85,0x0a,0x7a,0x84,0x81,0xac,0x69,0xe8, +0x4e,0x83,0x16,0x9f,0xc6,0xc0,0x97,0xc2,0x1b,0x1e,0x7d,0x74, +0xf8,0xd1,0x47,0x4f,0x56,0x90,0xfe,0x2a,0x6c,0x27,0xe9,0xe1, +0x47,0x0b,0xfd,0xad,0xc0,0xfb,0x0b,0x47,0xeb,0x45,0x47,0x84, +0x77,0x23,0x11,0xaa,0x40,0x61,0x14,0x43,0x59,0xf8,0xb5,0x26, +0x29,0xc3,0x49,0x0d,0x28,0xff,0x7e,0xf2,0xa2,0xd9,0x4f,0x19, +0x95,0xb6,0x52,0x59,0x13,0xbc,0x74,0xec,0xa7,0x29,0xe9,0x4c, +0x1a,0x42,0x54,0x3a,0x99,0xe5,0x72,0x0b,0x6e,0xbb,0xf5,0x95, +0x57,0x6e,0xcd,0x7c,0xb7,0x23,0xd9,0x10,0xab,0x6c,0xa8,0xae, +0xce,0x9a,0xe3,0xea,0x4c,0xd6,0xef,0xcf,0x66,0xd4,0x71,0x73, +0xb6,0xba,0xba,0xa1,0x32,0xd6,0x90,0xec,0xf8,0x2e,0xfe,0xf3, +0x65,0x97,0x3d,0xb3,0x7d,0xfb,0xa5,0x24,0x33,0x25,0xc1,0x0f, +0x61,0x17,0xf3,0x26,0x33,0xbf,0xfa,0xf5,0xfa,0x7b,0xb6,0x7d, +0xff,0x5d,0xe6,0x54,0xcf,0xe5,0xeb,0x7f,0x75,0x2d,0xf3,0x23, +0x2c,0xc0,0xff,0xfd,0x25,0xfc,0xdf,0x58,0xc0,0x7c,0xe3,0x89, +0x5f,0xad,0xbf,0xbc,0x87,0x39,0xf5,0xee,0xf7,0xb7,0xdd,0x53, +0xff,0xfa,0xd0,0x50,0x35,0x33,0x9f,0x79,0x13,0xbb,0xf0,0x43, +0x44,0x8f,0xea,0x1f,0xcd,0x42,0x9d,0xdf,0x82,0x7b,0x57,0x10, +0x6f,0x33,0x68,0xcd,0x25,0xd8,0xad,0xa1,0xb9,0x03,0xae,0xc4, +0xdc,0xfd,0x73,0x2f,0x15,0x7b,0xae,0xa2,0x1c,0x50,0x89,0x06, +0xec,0xc0,0x5c,0x25,0xf8,0x17,0x9d,0x7a,0x09,0xeb,0xb1,0xfe, +0xa5,0x1b,0xb8,0x03,0xf5,0x46,0xd5,0xb6,0xb9,0x83,0x9d,0x6d, +0x83,0x7d,0x7d,0x3d,0xfe,0xce,0xd2,0x9e,0x96,0xce,0x5c,0x67, +0xa6,0xcf,0x90,0xf3,0x7a,0x73,0x86,0xbe,0x0c,0x9c,0xb4,0xf4, +0x94,0x76,0xfa,0x7b,0xfa,0xfa,0x06,0xdb,0x3a,0x07,0xe7,0x6e, +0xc3,0x03,0xcc,0x29,0xf6,0xa6,0x04,0xd4,0x00,0xdc,0x39,0xa9, +0xd1,0x29,0xe6,0x25,0x6b,0x95,0xa0,0x29,0xb2,0x60,0xe9,0x1a, +0x67,0x36,0xd8,0xdb,0x76,0x78,0x6b,0xdf,0x70,0x67,0x4d,0xf7, +0x55,0xb3,0x36,0xae,0xee,0xb8,0xaa,0xbb,0xa6,0x73,0xb8,0x6f, +0xeb,0xe1,0xb6,0xde,0x60,0xd6,0xb9,0x66,0xe9,0x82,0x48,0x93, +0xa0,0x8a,0x93,0xbb,0x9d,0xa3,0x2e,0xd1,0x63,0xc2,0xd7,0x50, +0x09,0x0a,0x82,0x58,0x32,0x44,0xb0,0xc1,0x99,0x56,0xe0,0x34, +0xd6,0x4d,0xbc,0x57,0xb8,0xfb,0x49,0x35,0xa3,0xc5,0x34,0xde, +0x44,0xc8,0x0b,0x7c,0x84,0xf4,0xc7,0x3f,0x9c,0xbb,0x79,0x93, +0x63,0x65,0x62,0xd3,0xce,0x9d,0x7b,0x97,0x0f,0xed,0x5d,0x73, +0x5d,0x7b,0xfb,0x75,0x6b,0xf6,0x0e,0x2d,0xdf,0xbb,0x73,0xe7, +0xa6,0xc4,0x4a,0xc7,0xa6,0xcd,0x73,0xeb,0x49,0xdb,0x93,0x9d, +0xee,0x61,0x2e,0xfa,0xfe,0x7b,0xdb,0x1f,0xea,0xd9,0xdc,0x74, +0xe2,0xf8,0x6d,0x4b,0x0f,0xc7,0xbf,0x9a,0x49,0x7f,0x35,0x7e, +0x78,0xe9,0x6d,0xc7,0x4f,0x34,0x6d,0xee,0x79,0xe8,0x6a,0x5c, +0xf2,0x7d,0xe6,0x22,0x72,0x5f,0xcb,0x47,0xd7,0x8b,0x6e,0x17, +0x7e,0x01,0x78,0xcb,0x31,0x85,0xb7,0x68,0xe0,0x0e,0x19,0xe5, +0xd7,0x64,0x81,0x37,0x74,0x59,0x18,0x2a,0x78,0x4e,0x63,0x5e, +0x2c,0x12,0x2d,0xde,0x06,0x75,0x77,0x91,0xef,0x4e,0x7d,0xc0, +0xdc,0xb2,0x92,0xf9,0xeb,0x71,0xe6,0x59,0xbc,0x9a,0x59,0x7b, +0x58,0x28,0x3e,0xcc,0xac,0x85,0xd4,0xb3,0xc7,0x99,0xbf,0xae, +0x64,0x6e,0xd9,0x01,0xcf,0x95,0xf0,0xe4,0x37,0x78,0x9e,0xac, +0x24,0x23,0x10,0x69,0x05,0x27,0x6d,0x70,0x9a,0x26,0x30,0xa0, +0x95,0x4a,0x03,0xe5,0x71,0x06,0x15,0xd3,0x5c,0xb6,0xef,0x15, +0x99,0x6a,0x11,0xdd,0xc2,0x33,0x63,0x4d,0x66,0x22,0x33,0x66, +0x6a,0x78,0x66,0xbc,0xbe,0xc8,0x4b,0x02,0x9a,0x34,0x07,0x73, +0x6a,0xe8,0x0c,0xd9,0x90,0xb9,0x89,0xe4,0xe7,0x74,0xe8,0x97, +0x46,0x97,0x8b,0xaa,0x84,0x5f,0x83,0xbb,0x26,0xf3,0xc6,0xa1, +0x7d,0xbc,0x69,0xa7,0x81,0x9e,0xd8,0x46,0x13,0xd3,0x1a,0xb7, +0x46,0xb0,0x11,0x9f,0x78,0x94,0x6d,0xa4,0x53,0xdf,0x66,0x0f, +0x54,0xbc,0xef,0xd6,0xe1,0x61,0xc1,0xcd,0x5c,0xeb,0x30,0xfd, +0xdc,0x91,0x52,0xfe,0xed,0x9b,0xa2,0x36,0xee,0x5f,0x58,0xd8, +0xbe,0x4d,0xdd,0x45,0x66,0x31,0x91,0xd1,0x98,0x1d,0x75,0x61, +0x88,0x65,0xe3,0x5a,0x16,0x8f,0x4a,0x84,0xf7,0xb2,0x71,0x5c, +0x39,0xd4,0x82,0x56,0xa3,0xab,0xe0,0x22,0x41,0xe0,0xbc,0xc7, +0x99,0x80,0x66,0x3c,0x31,0x22,0x10,0x30,0xfb,0x69,0x42,0x02, +0x05,0x13,0x02,0xf6,0xf0,0x27,0x2f,0x71,0xe6,0x9d,0x1a,0xce, +0xe7,0x9b,0xee,0x7b,0x16,0x89,0x9d,0x06,0x7c,0xf3,0x33,0xe2, +0xd5,0x59,0x40,0xb0,0x75,0x9b,0xef,0xba,0x83,0xb2,0x15,0x17, +0x08,0x74,0xba,0x22,0x64,0xe5,0x54,0xa9,0x4a,0xe9,0x9d,0x61, +0x81,0x40,0xe6,0xa7,0x3b,0xc9,0x5a,0x32,0xcc,0x62,0x7e,0xbd, +0xca,0x5d,0xae,0x65,0xbc,0x42,0x38,0xb6,0x54,0x25,0xf5,0x0e, +0x93,0x7b,0x55,0x9c,0xb4,0x59,0x6b,0x12,0xd6,0x60,0x99,0x41, +0x18,0x4e,0x4a,0xb5,0xba,0x2c,0x1b,0x97,0xa7,0x52,0x9a,0xc3, +0xf6,0xb2,0xf2,0x79,0xf3,0x70,0xf7,0x47,0xcb,0xf0,0x5f,0x36, +0x90,0x28,0x99,0x59,0xe7,0x93,0x35,0x39,0xee,0x6a,0x6f,0xcc, +0x6f,0x58,0x64,0x0d,0xce,0xa9,0x08,0x2c,0xe5,0xa2,0xf4,0x2c, +0x6a,0x95,0x32,0xdb,0x15,0x8b,0x87,0x82,0x65,0x65,0x4e,0x36, +0x4a,0xef,0x5a,0x36,0x40,0x8f,0x84,0xea,0xe1,0x97,0x8f,0x93, +0x25,0xd7,0x40,0x0b,0x8c,0x57,0x82,0x12,0xb8,0x7a,0x60,0xfd, +0x18,0x16,0x1d,0xf9,0xa6,0xb8,0x32,0xc0,0x3a,0x79,0xd5,0x76, +0xbf,0x51,0xa3,0x9f,0xec,0xe3,0xb5,0xda,0x6d,0xcd,0xb3,0xfa, +0xd9,0x38,0x83,0x28,0x3c,0x1b,0x12,0xfb,0xa5,0x43,0x69,0x34, +0x07,0x5d,0x32,0xd3,0x1c,0x48,0xb2,0x82,0xc7,0x34,0xab,0xd5, +0xf8,0xba,0x98,0xdc,0x3a,0x0f,0x9f,0x71,0x9c,0x34,0x8e,0x8e, +0x85,0x63,0x7c,0x87,0xd8,0xfb,0x4a,0x57,0x9a,0x4b,0x57,0x96, +0x96,0x78,0x24,0xc2,0x91,0x03,0x8f,0x88,0x1e,0xfd,0xc2,0xc8, +0xa9,0xd0,0xdf,0x13,0x3a,0xfd,0x11,0xbb,0x92,0x07,0xf3,0x0b, +0x0a,0x6b,0xdb,0xb4,0x91,0x47,0xc2,0xe1,0x47,0x22,0x90,0x60, +0xd7,0x6f,0xb8,0x0f,0x2f,0x2a,0x0c,0x91,0x15,0x3d,0x20,0xc3, +0x7f,0x0e,0xc9,0x26,0x2c,0xe2,0x60,0x32,0xc9,0x26,0x84,0x52, +0x5b,0xac,0x9c,0x6a,0x1e,0x0d,0x07,0x0d,0x06,0x6e,0x21,0x07, +0x9f,0xdf,0x6a,0x2d,0x83,0xbe,0xb0,0x01,0xfd,0x50,0xf4,0x15, +0x41,0x1c,0x70,0x1a,0xc2,0x09,0x6e,0x75,0x63,0x76,0x65,0x23, +0x21,0x01,0x36,0x44,0x1d,0xe5,0xcd,0x4d,0xbc,0x81,0x43,0x04, +0x68,0x4a,0x68,0x62,0x9b,0x08,0x38,0xbd,0x01,0xd7,0x53,0xa2, +0xae,0xb2,0xa0,0x58,0xe6,0x59,0x93,0xd8,0xb6,0x39,0xd8,0xdd, +0xd4,0x5c,0x99,0xb1,0xea,0xda,0x9d,0x5b,0x07,0x62,0xb3,0x5a, +0x97,0x6a,0xd5,0x0a,0x8d,0xbe,0x2c,0xa8,0x15,0x48,0xf5,0xb6, +0xaa,0xd8,0xac,0xc6,0x39,0xbe,0x89,0x39,0x12,0x6d,0xc1,0x25, +0x06,0x23,0x2d,0x73,0x50,0x2f,0x07,0xcb,0x34,0x2a,0x63,0xfe, +0xcb,0x89,0x6d,0x65,0xc1,0xd9,0xb9,0x45,0x51,0xcf,0xe1,0xf8, +0xd7,0x67,0xb5,0xde,0x50,0x66,0x90,0x48,0x83,0x65,0x36,0xbd, +0x48,0xe3,0x8a,0x76,0x57,0x37,0x07,0xed,0xe3,0xdf,0xb6,0x05, +0xf7,0x54,0x54,0x88,0x95,0x3a,0x2e,0x46,0xbe,0x6c,0xb4,0x5d, +0xf4,0x8a,0xf0,0x04,0xfb,0x7f,0x55,0x73,0x81,0x51,0x00,0xdf, +0x39,0x5d,0x3e,0x40,0x97,0xce,0x04,0xbb,0xc6,0x71,0x16,0xb3, +0x9d,0x12,0x3b,0x61,0xe7,0xf1,0x25,0x76,0xba,0xfc,0x25,0x58, +0x89,0x75,0x89,0x09,0x01,0x28,0x95,0x98,0xc3,0xa4,0x0e,0x4c, +0xf3,0xe0,0x54,0x07,0x95,0xa4,0x64,0x76,0x03,0x73,0xcc,0x60, +0xb7,0x1b,0xf0,0x90,0x81,0xb9,0xcc,0x60,0xa7,0xf0,0x90,0xd0, +0xa2,0x31,0xab,0xf0,0x41,0x7c,0xc4,0xa6,0xc2,0x57,0x88,0xed, +0x06,0x9b,0x8a,0x39,0xc8,0x9c,0x6f,0x56,0x31,0xf7,0x32,0xcf, +0x08,0x2d,0x37,0x4a,0x55,0x16,0x8c,0x01,0x36,0x02,0x84,0xf9, +0x81,0x4a,0x25,0x15,0x0a,0x2f,0xbf,0x83,0x56,0x49,0x95,0x92, +0x3b,0x35,0x58,0xb9,0x35,0x68,0xb7,0x07,0xed,0x03,0x76,0x83, +0x58,0x2c,0xf8,0x9a,0x5a,0x6f,0x28,0xfc,0xa9,0xb4,0xb0,0x5f, +0xae,0x34,0xd8,0x4b,0xa9,0x11,0x03,0xfe,0xd1,0xc9,0xa7,0xd5, +0x7a,0x61,0x87,0x4a,0x8a,0xdf,0xa6,0x05,0x62,0x81,0x80,0x5a, +0x26,0x56,0x4b,0x55,0x54,0x1d,0x36,0x88,0xc4,0x52,0x95,0x9c, +0xf9,0xfd,0x57,0x4a,0x14,0x6c,0x9d,0x5b,0xd9,0x3a,0xeb,0xd9, +0x3a,0xcf,0x3f,0xbb,0x3a,0xb3,0xcf,0x59,0x85,0xbd,0x19,0x76, +0xa1,0x03,0xb1,0x90,0xc7,0xdc,0x95,0xd0,0x73,0x38,0x63,0x57, +0xa6,0x01,0x67,0xe8,0x9b,0xa1,0xd6,0x5b,0xd8,0x5a,0x5f,0x63, +0x38,0xf5,0xb7,0x33,0xa8,0x35,0xdd,0x2d,0x55,0x09,0xda,0x70, +0x44,0x20,0x90,0xaa,0x34,0xcc,0x8b,0x5f,0x52,0xa8,0xa4,0x62, +0xe1,0x53,0x58,0x48,0x0b,0x40,0xcf,0xda,0x28,0x3e,0x93,0x7a, +0xd3,0x4a,0x99,0x58,0x74,0xc1,0x08,0x56,0xca,0xb4,0xc2,0x4d, +0x73,0xc4,0x2a,0xa9,0x8a,0x5e,0x47,0x0b,0x45,0x12,0x68,0x07, +0xfa,0x51,0xf9,0x84,0x7a,0x3f,0xc4,0xd6,0xbb,0xfb,0x2c,0xeb, +0x9d,0xca,0x40,0x85,0x75,0xc4,0x67,0xc0,0x3d,0x74,0xbf,0x9e, +0x3c,0x75,0x37,0x6b,0x08,0x8f,0xf3,0x4f,0xdc,0x68,0x12,0xe6, +0xa1,0xe6,0xcb,0xd8,0x9a,0xdf,0x65,0x38,0xd9,0x73,0x26,0x35, +0x7f,0x44,0x05,0xed,0x79,0x85,0x48,0xa2,0x57,0x09,0xaf,0x77, +0x52,0x5a,0x52,0xe3,0x12,0xb1,0x68,0xde,0x06,0xa1,0x4a,0xaa, +0x10,0xf7,0x65,0xcf,0xa4,0xea,0x57,0x48,0x81,0x51,0x98,0x9e, +0x7f,0x17,0x49,0x54,0x00,0xe7,0x5f,0x8c,0x08,0x75,0x42,0x8c, +0x45,0xa2,0xf5,0xd7,0x88,0x4a,0xa4,0x2a,0xe9,0x05,0x1d,0xc5, +0xba,0xbf,0x73,0x8e,0xcf,0x9c,0x7f,0xd8,0x94,0x38,0xcb,0xa5, +0x54,0x98,0xd3,0xc2,0x52,0x6e,0xba,0xc8,0xf4,0x19,0xd1,0x2b, +0x50,0xf3,0xed,0x6c,0xcd,0xaf,0x30,0xfc,0xed,0xc5,0x33,0xa8, +0xb9,0xf0,0xb7,0x22,0xad,0x54,0x85,0x57,0x54,0xdc,0x21,0x06, +0xf6,0x94,0xbd,0x25,0x96,0x40,0xb3,0xd2,0x78,0x25,0xa5,0x92, +0x6a,0x44,0x5d,0xc1,0x33,0xa8,0xb8,0xe0,0xa8,0x46,0x25,0x15, +0x08,0x98,0x77,0x76,0x6c,0x10,0x40,0x17,0x11,0x7f,0x59,0x20, +0x10,0x88,0x31,0x56,0x08,0x84,0xc0,0x45,0x27,0xf6,0xb2,0x38, +0x6e,0xef,0xe8,0x1e,0xd1,0x21,0xe1,0xe3,0x80,0x5f,0xb4,0x04, +0x95,0x66,0x65,0xd8,0xa4,0x41,0x7a,0xd0,0xd5,0x30,0x54,0x1e, +0xea,0x2a,0x3c,0xf1,0xc4,0x3b,0xef,0x3c,0x81,0x15,0xe1,0x7a, +0xe3,0xc7,0x57,0x1b,0xe1,0x53,0xb8,0x55,0xf8,0x38,0x73,0x63, +0x2b,0xf3,0x2b,0xec,0x6c,0xc5,0x6b,0x3e,0x8e,0xd7,0x87,0xe1, +0x92,0x11,0x3e,0x3f,0xbe,0x7a,0x72,0x79,0x8e,0xb1,0xf2,0x30, +0x69,0xae,0x78,0x18,0xfb,0x11,0x5d,0x9c,0xb2,0xaa,0xc5,0x48, +0x58,0x36,0x5e,0xb8,0x03,0x33,0xbf,0x64,0xf4,0xff,0xce,0x5c, +0xba,0x13,0x87,0x1d,0xb6,0x80,0x70,0x23,0x5e,0x82,0xbb,0x29, +0xad,0x23,0x34,0x89,0x96,0xd6,0x11,0x16,0xbe,0xf0,0xef,0x78, +0x37,0xf5,0xa0,0x48,0xec,0x08,0x7b,0xac,0x85,0x83,0xcc,0x3d, +0xcc,0x83,0x52,0x1c,0x66,0xe9,0xae,0x00,0xba,0x87,0xb8,0x7a, +0x08,0x35,0x62,0x2b,0xf6,0x6b,0x3c,0xf0,0x00,0xb3,0x18,0x38, +0x52,0x2f,0xc6,0xc2,0x5d,0x84,0xd4,0x49,0xeb,0x84,0xdb,0xbd, +0x15,0xaf,0x69,0xc5,0x4e,0xe6,0x57,0xad,0xcc,0x8d,0x76,0xb6, +0x62,0x46,0xb6,0x92,0x88,0x6f,0x97,0x62,0x79,0x95,0x63,0xe5, +0x79,0xc7,0x24,0x75,0x36,0xe3,0xe1,0xbb,0x38,0x08,0x37,0x01, +0x51,0x64,0x29,0x56,0x9a,0x73,0x54,0x3e,0x3e,0xe5,0x08,0x8b, +0xe2,0x0b,0x5d,0xee,0x86,0x60,0x63,0x55,0xbb,0xff,0x5a,0xfc, +0x38,0xee,0xa2,0x05,0x8e,0xb0,0xdf,0xfe,0x38,0xf3,0xce,0x6b, +0x77,0x6c,0x4b,0x39,0x5a,0x2b,0x43,0x0b,0x93,0x12,0xdf,0xa4, +0x3b,0x70,0xa8,0x94,0xbb,0x7e,0xd2,0xb7,0xf4,0xab,0x8b,0xbf, +0xb0,0x68,0xc0,0x7f,0xed,0xd7,0xcb,0xa1,0x25,0xec,0x21,0x5a, +0x3b,0xab,0xff,0x92,0xaf,0x0c,0xd7,0x1c,0xdb,0xbd,0xe5,0xa7, +0xbb,0x0d,0x66,0x0e,0xc7,0xb5,0x8e,0x36,0x43,0x3f,0x7d,0x94, +0xfd,0x5f,0xbf,0x72,0xd0,0x83,0x10,0xcb,0x99,0x45,0xae,0x74, +0xc7,0xbd,0x34,0x26,0x4a,0xf7,0x38,0xd7,0x96,0x70,0xc3,0x0f, +0xe6,0xc7,0x1a,0x9c,0x11,0xdc,0x37,0x3c,0x81,0xe7,0xbe,0xc8, +0x6c,0xf9,0x13,0xe1,0x38,0xcd,0x04,0xae,0x34,0x50,0x71,0x47, +0x58,0x7e,0xaa,0xdd,0x18,0x80,0x03,0xfd,0x84,0x91,0xfa,0xe3, +0x38,0x7b,0xdd,0x86,0xdb,0x08,0x7b,0x8d,0xb1,0x1e,0x73,0x98, +0x8a,0x85,0x1d,0x46,0xed,0xc7,0x7e,0x37,0x39,0x08,0x7f,0xea, +0xe6,0xb0,0x60,0x0b,0x2a,0x11,0xbd,0x0a,0x98,0xc2,0xc1,0xae, +0xe1,0xfb,0x89,0x7d,0x68,0xf7,0x19,0x74,0x08,0xe9,0x27,0xf1, +0x3a,0xa1,0xa7,0x1b,0xed,0x11,0xbd,0x2f,0xfc,0x06,0x22,0xa6, +0x12,0x90,0x36,0x56,0x50,0x9c,0xc6,0x76,0xca,0x44,0x13,0xf4, +0x0d,0x1f,0x32,0xcc,0xed,0x29,0x5a,0xa4,0xc2,0xfc,0x39,0x0d, +0x40,0x3d,0xd6,0x80,0x61,0x4c,0x4a,0x58,0x60,0xe4,0xa5,0x2e, +0xc7,0x39,0xaa,0x29,0x91,0xcb,0x6d,0x0b,0xe7,0x72,0x0d,0xa6, +0x5c,0xee,0x88,0xbf,0x65,0xeb,0xe1,0x5c,0xae,0xab,0xd2,0x91, +0xcb,0x2d,0x87,0x6b,0x1b,0x1a,0x72,0xb9,0x56,0x5a,0x24,0x3e, +0x02,0xa7,0x6d,0xb9,0x5c,0xcf,0x79,0x1e,0x71,0x6f,0x2e,0xb7, +0xa8,0x0e,0x5b,0x5c,0xd2,0x2a,0xe1,0x83,0x39,0xaa,0xd0,0x49, +0xcd,0xae,0xaa,0x2a,0xc8,0xf0,0x15,0x55,0x55,0xcc,0x10,0xbd, +0x10,0x3e,0xcb,0x99,0xef,0x51,0x8b,0x15,0x27,0xe1,0x27,0xf4, +0xe0,0xbf,0x9d,0xbc,0x38,0x97,0xa3,0x56,0x33,0x5b,0xe0,0xf3, +0xa5,0x82,0x27,0x97,0x93,0x50,0x3f,0xcb,0xf6,0x6d,0x2a,0xbc, +0x0a,0x5f,0x6e,0x3a,0x05,0x45,0x09,0x6f,0x15,0x15,0x8e,0x0e, +0xbf,0x57,0x55,0x75,0xea,0xdd,0xbf,0xe0,0x1b,0xf1,0x31,0x59, +0x15,0xd4,0xef,0xd6,0xd1,0x57,0x44,0x83,0xc2,0x04,0xf9,0x1b, +0x4c,0x2f,0x89,0x7a,0x05,0x98,0x8e,0xaf,0x13,0x9c,0xf8,0xf8, +0x99,0x3d,0x1f,0xb6,0xee,0x16,0xbc,0xb7,0x1b,0xcd,0x90,0xc7, +0x99,0x76,0x52,0x5d,0x02,0xfd,0xc9,0x1d,0xcc,0x09,0x7c,0x3f, +0x9f,0xeb,0x34,0xf9,0x68,0x01,0xdd,0x7f,0x2a,0xcc,0xe8,0xa9, +0xe1,0x4f,0xc9,0xf7,0x0c,0x75,0xe7,0xa9,0x5f,0x17,0xfa,0x69, +0xdb,0x27,0xe7,0x13,0xec,0xc0,0xef,0x15,0x6e,0x3e,0x75,0x27, +0xfd,0xa3,0x4f,0xce,0x27,0x0c,0xe3,0x14,0xd3,0x73,0xf2,0x3d, +0xc1,0x91,0xd3,0xe4,0x03,0xa5,0x84,0xcd,0xf7,0xeb,0x3d,0x1f, +0x9e,0x4c,0x09,0x9b,0xc7,0xea,0xba,0x0a,0xf2,0xdc,0x02,0x79, +0x1c,0x1c,0xbe,0x8a,0x99,0xc7,0x44,0x31,0xc7,0xe9,0x9a,0x71, +0x86,0xa7,0xf7,0x9b,0xdd,0xd4,0x5e,0x8d,0xd1,0xec,0x36,0x14, +0xca,0xc9,0xa1,0x70,0x88,0x3d,0xa1,0xde,0xd2,0x08,0x13,0x6e, +0x73,0xe1,0x44,0xe1,0x65,0xca,0xa5,0x74,0x9b,0x6d,0xda,0xc2, +0x65,0x70,0x10,0xac,0x2f,0xbc,0xc9,0x9e,0x51,0xbb,0x94,0xdc, +0xfd,0xac,0x42,0x35,0xa2,0x5b,0x04,0xcf,0x23,0x4b,0x11,0xcb, +0x61,0x11,0xe1,0x5c,0x9e,0x40,0x0c,0xa4,0x0c,0xf4,0xb2,0x8c, +0x68,0xd0,0xec,0x96,0x31,0x57,0x6b,0xeb,0xb5,0x85,0x05,0xcc, +0x7f,0x68,0x1d,0x70,0x86,0xb7,0xc2,0x19,0xf5,0x0d,0xdc,0xa0, +0xa5,0x9e,0x71,0x9b,0x75,0xea,0xc2,0x47,0x66,0x33,0xfd,0x3d, +0xa6,0xce,0x4c,0x4e,0x28,0x89,0xd9,0x7c,0x2a,0x8d,0xff,0xd3, +0xcc,0x8e,0xbf,0xc7,0xa0,0x3e,0x43,0x50,0x1f,0x27,0x4a,0xa1, +0xd9,0x40,0x27,0xed,0x52,0x0a,0xf9,0xf0,0x09,0x91,0xdb,0x90, +0xa8,0x17,0xf2,0x11,0x96,0x19,0x67,0x9a,0x20,0x45,0x91,0x98, +0x77,0x34,0x63,0x23,0x17,0x2b,0x91,0x34,0x10,0x6c,0x09,0x37, +0x21,0xf3,0x8e,0x6c,0xb8,0xe1,0xca,0x3b,0xdb,0xce,0xbf,0xf6, +0xf0,0x95,0xa9,0x98,0x4d,0x3d,0xe5,0xfc,0xe3,0xf9,0x25,0xf6, +0x9e,0x25,0x7b,0x2f,0xb8,0x3a,0xef,0x76,0xf6,0x2c,0x67,0x2f, +0xd1,0xfd,0x7c,0x42,0x3d,0xf6,0x95,0xe0,0xa9,0xdd,0xb4,0x35, +0x3a,0x7c,0xc9,0xcf,0x2e,0xf9,0xd5,0xb5,0x87,0x6b,0x8c,0x52, +0xd1,0xd4,0x53,0x4a,0x57,0xde,0xd2,0x7f,0xfd,0x40,0xb6,0x66, +0xff,0x72,0xf6,0x42,0x61,0x1e,0x9f,0x18,0xfb,0x06,0xea,0x74, +0x2f,0x6a,0x13,0x2d,0xa6,0xaf,0x64,0xfd,0xc7,0xfe,0xd3,0xae, +0xf6,0x5c,0x74,0x81,0xe3,0xe2,0x2a,0x27,0xf7,0x8d,0x79,0x8f, +0xab,0xab,0x53,0x6f,0xd0,0x17,0x6a,0xf2,0x52,0xc1,0x81,0x7f, +0xc3,0x5a,0x69,0xa3,0x16,0x8e,0x6d,0x74,0xeb,0x97,0xfe,0xeb, +0x52,0xe2,0x37,0x4e,0x27,0xab,0x13,0x99,0x51,0xe4,0xda,0xab, +0x63,0xdd,0xd6,0x71,0xfd,0x1e,0x17,0x75,0x80,0x78,0xae,0x89, +0x4e,0x53,0x33,0x2a,0x16,0x3e,0x2f,0x94,0x03,0x0f,0xe9,0x90, +0x9d,0x5d,0x4d,0x8f,0x5f,0x19,0x8a,0x9e,0xf1,0x2e,0x84,0xd3, +0xd6,0x5a,0xa1,0xef,0xe5,0x56,0x76,0x7a,0x6b,0xf2,0xdf,0xf8, +0xbc,0x24,0x49,0x4e,0x5c,0xfe,0xf3,0x91,0x89,0x2b,0x32,0x51, +0x15,0x93,0x97,0xc9,0x3d,0xa1,0x1a,0xb6,0x72,0x73,0x33,0x6d, +0xdc,0x2a,0x9d,0xec,0x3a,0x66,0x12,0xe1,0xcb,0xc2,0x12,0x76, +0x3d,0xef,0x1a,0xd4,0x8e,0x96,0xa2,0x95,0x44,0xdf,0x9a,0x71, +0x55,0x6f,0xcd,0x4c,0xda,0xd4,0x94,0xd9,0xcc,0xb1,0x6c,0x82, +0x0f,0xc0,0x61,0xbd,0x7b,0xc2,0xd3,0xad,0xd2,0x4e,0x39,0x7e, +0x71,0x9e,0x66,0xb6,0xb6,0xb8,0x52,0xd9,0x6c,0xed,0x66,0xdf, +0x75,0x5e,0xbc,0x76,0xfc,0xaf,0x14,0x4e,0x1e,0x66,0x67,0x31, +0x13,0x77,0x5e,0x71,0x16,0xf3,0x01,0xfa,0x09,0x7e,0xd5,0xb3, +0x49,0xeb,0x9c,0x83,0xe2,0x54,0xf5,0x8b,0x2a,0xdf,0xcd,0x7e, +0xff,0xcd,0x3e,0x48,0xb0,0xcb,0xdf,0x71,0x8b,0x22,0x8a,0x30, +0x3b,0x71,0x79,0x6f,0x28,0x10,0x1a,0x5a,0xce,0x4e,0x5c,0x76, +0x0d,0x4d,0x5c,0x23,0x2f,0x31,0xbe,0xae,0xf9,0xcf,0x50,0x8f, +0xc8,0x47,0x7f,0x13,0xa9,0xe1,0xe9,0x2c,0x62,0xed,0xd8,0x5c, +0xc0,0x09,0xbf,0x04,0xac,0xd3,0x3b,0xb6,0x48,0x30,0xa9,0xd5, +0x34,0x0d,0xd2,0xc7,0x2b,0x90,0x78,0xf2,0xbc,0xa2,0x29,0x1a, +0xe4,0xcf,0x71,0xc5,0xfc,0xa6,0x7c,0x65,0x34,0x91,0x88,0x56, +0xe6,0x9b,0xe6,0x33,0x6f,0xe0,0x8a,0xe5,0xdb,0xab,0x73,0xcb, +0x6f,0xa3,0xaf,0x2b,0xae,0xf6,0x92,0x6e,0x99,0xdf,0x6d,0xb7, +0x93,0xe5,0x5e,0x2e,0x34,0x18,0xba,0xd2,0x19,0x76,0xbd,0x17, +0x77,0x2d,0x09,0xb5,0x98,0xc7,0x2d,0xf7,0xa2,0x37,0xf8,0xfd, +0x5b,0xe9,0x7b,0xac,0x96,0x54,0xfa,0x96,0xd7,0x6e,0x49,0xa7, +0x2c,0xd6,0xdd,0xbb,0xb6,0x5d,0xb2,0xad,0xa6,0xa6,0x70,0xef, +0x25,0x13,0x42,0x2d,0xec,0x76,0x12,0x6b,0xb1,0x7d,0x75,0x36, +0x12,0xa9,0x57,0x6b,0x9c,0xce,0x7a,0x47,0x3a,0x98,0xa8,0xce, +0x8e,0xc5,0x5a,0xc4,0x63,0x2e,0x97,0x97,0xd4,0x5d,0x86,0x64, +0xa3,0x12,0xd1,0x1f,0x58,0x5b,0x88,0x1d,0xfa,0xfa,0x12,0x34, +0x8c,0xbe,0x82,0x1e,0x40,0x4f,0xa3,0xef,0xa2,0x9f,0xa2,0xdf, +0x92,0xb6,0x48,0xb2,0xf1,0x53,0x44,0x67,0x9c,0xf6,0x80,0xcf, +0x62,0xa2,0xc7,0xd4,0x49,0x72,0xc5,0xff,0x40,0x61,0x27,0xc9, +0x71,0xcb,0x83,0x44,0xa9,0xd4,0xcc,0xeb,0xb6,0x72,0x6b,0x83, +0x8c,0xfd,0x15,0x80,0xae,0x38,0x11,0x23,0x36,0x79,0x1e,0x58, +0x2c,0x39,0xe1,0xe6,0xd2,0x93,0xce,0xf0,0x27,0x91,0x97,0xfd, +0xb2,0x76,0xa0,0x51,0x03,0x5b,0xe3,0x40,0xed,0x2f,0x7f,0xd9, +0xd4,0xd9,0xd9,0x74,0x3e,0x3b,0x11,0x7c,0x6c,0x69,0x29,0x6e, +0xf5,0xa9,0xb1,0xa5,0xa5,0x24,0x1a,0x76,0xd6,0xc9,0x9e,0x12, +0xb7,0xe4,0x1d,0x89,0xbb,0x64,0xd5,0x4b,0xec,0xdc,0x3b,0x2e, +0xa4,0x97,0x26,0xb3,0xef,0x4e,0x3e,0x2f,0x93,0xce,0x6b,0x4b, +0x85,0xc2,0x79,0x0f,0x99,0x73,0x5e,0xb7,0x74,0x8b,0x43,0x59, +0xa5,0xd0,0xb6,0xd6,0xb0,0x4b,0x79,0x98,0x2d,0x15,0xc6,0x3d, +0xbf,0x5a,0xc6,0x4c,0x98,0x44,0x26,0x35,0x55,0x54,0xb9,0xa7, +0x4c,0x22,0xa3,0x9b,0x4a,0x5c,0x25,0x33,0x95,0x2f,0x0d,0xe2, +0xbb,0xfd,0x0b,0x1a,0x1b,0x1e,0x6e,0x68,0xe8,0xf6,0xf7,0x2d, +0x5a,0x78,0xd3,0xc2,0x45,0x8c,0x01,0xcf,0xfa,0xf4,0x15,0xa8, +0x8a,0x7f,0xb7,0xc2,0x4d,0xe0,0xe3,0xff,0x70,0xc5,0x73,0x84, +0x92,0x90,0x05,0x0d,0x7a,0x0e,0x3d,0x79,0x28,0x18,0xf2,0xcf, +0x99,0x2d,0x71,0x4a,0xe2,0xd5,0xfd,0x0b,0xef,0x58,0xd8,0x5f, +0x52,0x52,0x1e,0x77,0x54,0xf7,0x32,0xb7,0x50,0xc7,0x66,0x98, +0x7c,0x16,0x09,0xf1,0x93,0xcf,0x0a,0x4f,0x9f,0xa6,0x60,0xf6, +0x7f,0x45,0x50,0x08,0xf8,0xeb,0xc7,0x42,0x12,0xb3,0xb3,0x10, +0x5d,0x8c,0x6e,0x41,0xf7,0xa1,0x27,0x81,0xb7,0x5e,0x87,0xd1, +0xf4,0x8c,0x99,0xe7,0xcc,0xd9,0x0c,0xc7,0xfe,0xb9,0xac,0x44, +0xbd,0xf8,0xa9,0xab,0x96,0x51,0xaf,0x7d,0x6a,0x96,0x53,0xf1, +0x7f,0x2c,0xff,0xdc,0xf5,0xe9,0xbc,0x42,0xe6,0x4c,0x7d,0x5a, +0x1e,0xfa,0xf9,0x7f,0x1c,0xe3,0x08,0xd1,0xd7,0xb0,0x43,0xd4, +0x47,0x3f,0x8b,0xcc,0x30,0x5a,0x13,0x4b,0xe0,0x10,0x27,0x97, +0x67,0xfc,0x9f,0xae,0x4f,0x7a,0x5c,0xa7,0xf9,0x07,0x91,0xe4, +0x0c,0x56,0xc5,0xbb,0x71,0x45,0xcf,0x0a,0x83,0x46,0x1d,0xd4, +0xeb,0xe3,0x41,0xa5,0x4a,0xa1,0x88,0x36,0xf8,0x98,0xa7,0x36, +0x3e,0x15,0x8a,0xc5,0x42,0x4f,0x7d,0x3d,0x10,0x0e,0x07,0xbe, +0x8e,0xff,0xca,0xfd,0x25,0xc5,0x97,0xf0,0xed,0xcc,0xcb,0x58, +0xcf,0xbc,0x47,0x3f,0xbb,0x7c,0x9e,0x37,0xa3,0xd6,0xa8,0x29, +0x11,0xd6,0xf8,0x40,0x13,0x0e,0x90,0x59,0xed,0x03,0xe1,0x80, +0x33,0x10,0x5e,0x16,0xf0,0x39,0x7c,0xc1,0xc2,0xb7,0x7a,0xf1, +0xfb,0x4b,0x97,0x32,0xba,0x5e,0xea,0xe8,0xe0,0xd3,0x2b,0x98, +0x5f,0x70,0xfe,0xd3,0x8b,0x47,0x57,0x89,0xbe,0x20,0xdc,0x0a, +0x23,0xef,0x2a,0x74,0x1e,0x3a,0xc0,0xda,0xa0,0x49,0xbc,0xc9, +0x94,0x19,0x4a,0x33,0x1b,0x89,0xf1,0x0c,0x63,0xd0,0xa4,0x18, +0x26,0xd1,0x8c,0x21,0x4c,0x6c,0x98,0x49,0xda,0x09,0x28,0x36, +0x39,0x3d,0xb8,0x66,0x8a,0x6c,0x17,0xac,0x9a,0xb2,0x22,0x40, +0xa7,0x9e,0x9d,0x5c,0xb4,0x76,0x7c,0x41,0x80,0xb9,0xf3,0x70, +0x77,0xc1,0x34,0x65,0x19,0x37,0x7b,0xd9,0xc4,0x55,0xdc,0x7c, +0xbe,0x69,0x8b,0xb8,0x69,0xf8,0x16,0x9c,0x1e,0xb0,0x73,0xf3, +0xda,0xf2,0x7d,0xe5,0xe3,0x56,0x62,0x83,0x5d,0x3c,0x83,0x95, +0x98,0xfa,0xb8,0x3e,0x39,0xc1,0x02,0x2a,0x17,0x0a,0x49,0x70, +0x52,0xc4,0xcd,0x59,0x40,0x9d,0xae,0x49,0x2b,0xd9,0xfa,0x7c, +0x36,0x6b,0x99,0x7c,0xbc,0xfd,0x39,0x44,0xc0,0xc5,0xff,0xb0, +0x88,0x80,0xd3,0xb1,0x4f,0xc0,0xf8,0x9f,0x62,0x63,0x28,0xdb, +0xce,0x29,0x86,0xd2,0x3b,0x43,0xd8,0x21,0x66,0xd6,0x7f,0x99, +0x0d,0x9f,0x84,0x61,0x7c,0xc1,0x82,0x5c,0x87,0xd7,0x7b,0x61, +0x7d,0x1d,0x1b,0x3e,0xd9,0x42,0xd6,0x70,0x2b,0x5f,0xde,0x32, +0x31,0x7c,0x92,0xaa,0x66,0xfe,0x78,0x84,0x5d,0x4d,0x5f,0x2e, +0x50,0x57,0x49,0xc9,0x6a,0xfa,0xd1,0xa7,0xa2,0x67,0x17,0x3d, +0xa9,0x9c,0x69,0x59,0x7d,0xb6,0x7e,0xbf,0x1b,0xdd,0x2e,0x2a, +0x85,0xfa,0x39,0x49,0xfd,0x4c,0x64,0xa9,0x39,0x3e,0x66,0x99, +0x2c,0x3b,0xe7,0x4e,0xbb,0x45,0x63,0xb3,0xf3,0x88,0x70,0x35, +0x78,0x5d,0xc5,0x55,0x0a,0x8a,0x16,0x71,0xde,0x4c,0x3c,0x16, +0xb5,0x44,0x9a,0x41,0xf4,0xfb,0x43,0xbb,0xcd,0xa5,0xa5,0x5a, +0x9d,0xe9,0xd0,0x21,0xa1,0x44,0xa9,0xd0,0xe9,0x2c,0x96,0xf2, +0xb9,0x36,0x21,0x88,0x19,0x7a,0xef,0x5d,0x03,0xcb,0x63,0xd1, +0xc8,0xa1,0xee,0x4d,0x1d,0x1d,0x41,0x5d,0x97,0xce,0x18,0x89, +0xb4,0xaf,0xcc,0xc2,0xb6,0xb2,0x73,0x85,0xa9,0x26,0x11,0xec, +0xec,0xba,0x82,0x1e,0x64,0x0e,0x5f,0x23,0x12,0x2b,0x14,0x01, +0x1b,0xbe,0xad,0x70,0xf5,0x5a,0xa3,0xd1,0xa8,0x56,0x4b,0x4b, +0x72,0x86,0xc5,0x86,0x9b,0xde,0xd9,0xb2,0xe5,0x87,0xeb,0x6f, +0xad,0xca,0x56,0xc5,0x62,0x03,0xb2,0x80,0xac,0xd6,0xe3,0x6e, +0x6a,0xda,0xb1,0x7f,0x47,0x53,0xd3,0xdc,0x3a,0xb7,0x63,0x59, +0x2a,0xc9,0xf5,0x9f,0x35,0xd0,0x7f,0x2e,0x42,0xcd,0xe8,0x22, +0x74,0x19,0xba,0x81,0xc4,0x07,0x7e,0x16,0xff,0x54,0x75,0x8e, +0xcb,0x23,0x4e,0xe8,0x59,0x06,0xdd,0x69,0x62,0xd6,0xe8,0x4d, +0x13,0xfe,0x70,0x4a,0xaf,0x4b,0x95,0x3b,0x83,0x95,0x0b,0xaa, +0xcb,0xc9,0x1f,0x4e,0x99,0x6d,0x16,0xb3,0x4e,0x5f,0x5c,0xe7, +0xbf,0x2d,0x13,0x50,0xb3,0x7f,0x38,0x45,0x26,0x13,0x92,0x3f, +0x9c,0x62,0x16,0x9c,0xfd,0x5a,0x89,0xa7,0xef,0x66,0xa7,0xb8, +0xa5,0xfe,0xfd,0xd0,0xb2,0x06,0x03,0xbf,0xd4,0x7f,0xc0,0x61, +0xb1,0x54,0x98,0x85,0x42,0x91,0x42,0xa1,0x37,0xe4,0x3c,0xdc, +0x52,0xff,0x7a,0x57,0x88,0xfd,0x13,0x29,0x99,0x5c,0x59,0x93, +0x12,0xa5,0x32,0xfd,0xf8,0xc4,0x74,0xef,0xc3,0x84,0xce,0x57, +0x8c,0x0c,0xfc,0xe4,0xde,0x07,0x9f,0x13,0x7b,0x9f,0x12,0x3d, +0x08,0x5a,0x6d,0x71,0xa3,0xf8,0x34,0x46,0x0a,0xd0,0xa6,0x31, +0x7f,0x4d,0x8c,0xea,0xf8,0x34,0x8d,0xbc,0xe8,0x1a,0x3e,0x2d, +0x80,0x3c,0x3f,0xe4,0xd3,0x42,0xa4,0xc2,0x98,0x4f,0x8b,0x90, +0x1c,0x87,0x20,0x27,0x16,0x94,0xf0,0xa5,0x72,0x69,0x0c,0x3a, +0x33,0xcd,0xa7,0x29,0xa0,0x1b,0xe1,0xd3,0x34,0xea,0x40,0x2d, +0x7c,0x5a,0x00,0x79,0x9e,0xe0,0xd3,0x42,0x54,0x86,0xde,0xe6, +0xd3,0x22,0x54,0x8a,0x35,0xa4,0xa8,0x56,0xb4,0x13,0x6d,0x43, +0x9b,0x61,0x38,0x5a,0x85,0x56,0xa3,0x72,0x50,0x9a,0x56,0xa1, +0x2d,0x70,0xbe,0x1d,0xbe,0xda,0xb9,0x6d,0xf3,0xd0,0xaa,0xd5, +0xe5,0xed,0xab,0xb6,0x6c,0x86,0xd3,0x6e,0xf8,0x7e,0x2d,0xe4, +0xde,0x08,0x79,0xb7,0xc1,0xe9,0xea,0xb5,0x3b,0x37,0x0e,0x6d, +0x23,0x25,0x90,0xfc,0x3b,0xd8,0xe3,0x36,0xc8,0x41,0x4a,0xa9, +0x86,0xfd,0xf4,0x25,0x73,0xdf,0xc7,0x41,0x3c,0x45,0x50,0x0e, +0xf6,0x04,0x8a,0xc1,0x9e,0x82,0xa2,0xb6,0x6c,0xde,0xd1,0xba, +0x65,0xdb,0xda,0xd5,0xe5,0xd5,0xe5,0x93,0xa8,0xc3,0x79,0x3c, +0x15,0xc9,0x45,0x12,0xb1,0x44,0xea,0x6c,0xee,0x79,0x31,0x7c, +0xbf,0x0d,0xae,0xaf,0x63,0xbf,0x27,0x26,0xbd,0x18,0xd0,0x8d, +0xb2,0xc7,0x18,0x7c,0xbd,0x7a,0xdb,0xf6,0x75,0x5b,0x36,0x97, +0xc7,0x62,0xf1,0x68,0x2c,0x16,0x9b,0x5a,0xf2,0xf4,0x72,0xf9, +0x62,0xc9,0x33,0x9c,0xb8,0x61,0x34,0x75,0xdb,0xcc,0x5e,0xa5, +0x10,0x8d,0x29,0x4c,0x03,0x26,0x12,0x62,0x11,0x16,0x63,0x09, +0x2e,0xc1,0x52,0x2c,0xc3,0x72,0xac,0xc0,0x04,0x62,0xa9,0x41, +0x67,0xd6,0x62,0x1d,0xd6,0x83,0xf6,0x6c,0xc4,0x26,0x5c,0x0a, +0x5a,0xb3,0x05,0x5b,0xb1,0x0d,0xdb,0xa1,0x2b,0x3a,0x70,0x39, +0x86,0x91,0x11,0xbb,0xb1,0x07,0x7b,0xb1,0x0f,0xfb,0x71,0x05, +0x0e,0xe0,0x20,0xf4,0xc1,0x30,0x8e,0x00,0x6c,0xab,0xc4,0x31, +0x1c,0xc7,0x09,0x9c,0xc4,0x29,0xe8,0xe9,0x19,0x9c,0xc5,0x55, +0x38,0x87,0xab,0x71,0x0d,0xae,0xc5,0x75,0x98,0x38,0xba,0x1a, +0x71,0x1e,0x37,0xe1,0x59,0xb8,0x19,0xb7,0xe0,0x56,0x3c,0x1b, +0xb7,0xe1,0x76,0xdc,0x81,0x3b,0x71,0x17,0x9e,0x83,0xe7,0xe2, +0x79,0x78,0x3e,0x5e,0x80,0xbb,0xf1,0x42,0xdc,0x83,0x17,0xe1, +0xc5,0x78,0x09,0xee,0xc5,0x4b,0x71,0x1f,0x5e,0x86,0xfb,0xf1, +0x00,0x5e,0x8e,0x57,0xe0,0x41,0x3c,0x84,0x57,0xe2,0x55,0x78, +0x18,0xaf,0xc6,0x6b,0x40,0x9f,0x1d,0xc1,0xeb,0xf0,0x7a,0xbc, +0x41,0xbc,0x73,0xf3,0xba,0x96,0x58,0x6b,0x8c,0x3f,0xc6,0xf9, +0x63,0x82,0x3f,0x26,0xf9,0x63,0x8a,0x3d,0xc6,0x63,0x31,0xfe, +0x18,0xe7,0x8f,0x09,0xfe,0x98,0xe4,0x8f,0xc5,0x7c,0x69,0xfe, +0x98,0xe1,0x8f,0x59,0xfe,0x58,0xc5,0x1f,0x73,0xfc,0x31,0xcf, +0x1f,0x9b,0xf8,0xe3,0x2c,0xfe,0xd8,0xcc,0x1f,0x5b,0xf8,0x63, +0x2b,0x77,0x8c,0xf3,0xf4,0xe3,0x3c,0xfd,0x38,0x4f,0x3f,0xce, +0xd3,0x8f,0xf3,0xf4,0xe3,0x3c,0xfd,0x38,0x4f,0x3f,0xce,0xd3, +0x8f,0xf3,0xf4,0xe3,0x3c,0xfd,0x38,0x4f,0x3f,0xce,0xd3,0x8f, +0xf3,0xf4,0xe3,0x3c,0xfd,0x38,0x4f,0x3f,0xce,0xd3,0x4f,0xf0, +0xf4,0x13,0x3c,0xfd,0x04,0x4f,0x3f,0xc1,0xd3,0x4f,0xf0,0xf4, +0x13,0x3c,0xfd,0x04,0x4f,0x3f,0xc1,0xd3,0x4f,0xf0,0xf4,0x13, +0x3c,0xfd,0x04,0x4f,0x3f,0xc1,0xd3,0x4f,0xf0,0xf4,0x13,0x3c, +0xfd,0x04,0x4f,0x3f,0xc1,0xd3,0x4f,0xf2,0xf4,0x93,0x3c,0xfd, +0x24,0x4f,0x3f,0xc9,0xd3,0x4f,0xf2,0xf4,0x93,0x3c,0xfd,0x24, +0x4f,0x3f,0xc9,0xd3,0x4f,0xf2,0xf4,0x93,0x3c,0xfd,0x24,0x4f, +0x3f,0xc9,0xd3,0x4f,0xf2,0xf4,0x93,0x3c,0xfd,0x24,0x4f,0x3f, +0xc9,0xd3,0x4f,0xf1,0xf4,0x53,0x3c,0xfd,0x14,0x4f,0x3f,0xc5, +0xd3,0x4f,0xf1,0xf4,0x53,0x3c,0xfd,0x14,0x4f,0x3f,0xc5,0xd3, +0x4f,0xf1,0xf4,0x53,0x3c,0xfd,0x14,0x4f,0x3f,0xc5,0xd3,0x4f, +0xf1,0xf4,0x53,0x3c,0xfd,0x14,0x4f,0x3f,0xc5,0xd3,0x4f,0xf3, +0xf4,0xd3,0x3c,0xfd,0x34,0x4f,0x3f,0xcd,0xd3,0x4f,0xf3,0xf4, +0xd3,0x3c,0xfd,0x34,0x4f,0x3f,0xcd,0xd3,0x4f,0xf3,0xf4,0xd3, +0x3c,0xfd,0x34,0x4f,0x3f,0xcd,0xd3,0x4f,0xf3,0xf4,0xd3,0x3c, +0xfd,0x34,0x4f,0x3f,0xcd,0xd3,0xcf,0xf0,0xf4,0x33,0x3c,0xfd, +0x0c,0x4f,0x3f,0xc3,0xd3,0xcf,0xa4,0x38,0x19,0x32,0x3a,0x3a, +0x36,0x5a,0x20,0x24,0x47,0x7a,0x90,0xdd,0x9c,0x9c,0xc1,0x63, +0x12,0x86,0xfd,0x7c,0x27,0xfd,0x6c,0x19,0x39,0xbe,0x55,0x18, +0x3d,0x46,0x8e,0xef,0x4a,0x5f,0x3d,0xf1,0xff,0x02,0x8a,0x02, +0x26,0x3c }; -const unsigned int furIcons_compressed_size=15081; +const unsigned int furIcons_compressed_size=15494; diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 1a3f84bb2..ac2e59fe4 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -425,6 +425,21 @@ void FurnaceGUI::decodeMMLStr(String& source, int* macro, unsigned char& macroLe } \ } +bool FurnaceGUI::isCtrlWheelModifierHeld() const { + switch (settings.ctrlWheelModifier) { + case 0: + return ImGui::IsKeyDown(ImGuiMod_Ctrl) || ImGui::IsKeyDown(ImGuiMod_Super); + case 1: + return ImGui::IsKeyDown(ImGuiMod_Ctrl); + case 2: + return ImGui::IsKeyDown(ImGuiMod_Super); + case 3: + return ImGui::IsKeyDown(ImGuiMod_Alt); + default: + return false; + } +} + bool FurnaceGUI::CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags) { flags^=ImGuiSliderFlags_AlwaysClamp; if (ImGui::SliderScalar(label,data_type,p_data,p_min,p_max,format,flags)) { diff --git a/src/gui/gui.h b/src/gui/gui.h index 250c01ea1..135393ee6 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -39,7 +39,7 @@ #define FURNACE_APP_ID "org.tildearrow.furnace" #define rightClickable if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) ImGui::SetKeyboardFocusHere(-1); -#define ctrlWheeling ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) && wheelY!=0) +#define ctrlWheeling (isCtrlWheelModifierHeld() && wheelY!=0) #define handleUnimportant if (settings.insFocusesPattern && patternOpen) {nextWindow=GUI_WINDOW_PATTERN;} #define unimportant(x) if (x) {handleUnimportant} @@ -70,6 +70,9 @@ #define FM_PREVIEW_SIZE 512 +#define CHECK_HIDDEN_SYSTEM(x) \ + (x==DIV_SYSTEM_YMU759 || x==DIV_SYSTEM_UPD1771C || x==DIV_SYSTEM_DUMMY || x==DIV_SYSTEM_SEGAPCM_COMPAT || x==DIV_SYSTEM_PONG) + enum FurnaceGUIRenderBackend { GUI_BACKEND_SDL=0, GUI_BACKEND_GL3, @@ -356,6 +359,7 @@ enum FurnaceGUIColors { GUI_COLOR_INSTR_SID2, GUI_COLOR_INSTR_SUPERVISION, GUI_COLOR_INSTR_UPD1771C, + GUI_COLOR_INSTR_SID3, GUI_COLOR_INSTR_UNKNOWN, GUI_COLOR_CHANNEL_BG, @@ -1772,6 +1776,7 @@ class FurnaceGUI { int opnbCore; int opl2Core; int opl3Core; + int opl4Core; int esfmCore; int opllCore; int ayCore; @@ -1798,6 +1803,7 @@ class FurnaceGUI { int opnbCoreRender; int opl2CoreRender; int opl3CoreRender; + int opl4CoreRender; int esfmCoreRender; int opllCoreRender; int ayCoreRender; @@ -1824,6 +1830,7 @@ class FurnaceGUI { int patRowsBase; int orderRowsBase; int soloAction; + int ctrlWheelModifier; int pullDeleteBehavior; int wrapHorizontal; int wrapVertical; @@ -1832,7 +1839,6 @@ class FurnaceGUI { int allowEditDocking; int chipNames; int overflowHighlight; - int partyTime; int flatNotes; int germanNotation; int stepOnDelete; @@ -2032,6 +2038,7 @@ class FurnaceGUI { opnbCore(1), opl2Core(0), opl3Core(0), + opl4Core(0), esfmCore(0), opllCore(0), ayCore(0), @@ -2058,6 +2065,7 @@ class FurnaceGUI { opnbCoreRender(1), opl2CoreRender(0), opl3CoreRender(0), + opl4CoreRender(0), esfmCoreRender(0), opllCoreRender(0), ayCoreRender(0), @@ -2083,6 +2091,7 @@ class FurnaceGUI { patRowsBase(0), orderRowsBase(1), soloAction(0), + ctrlWheelModifier(0), pullDeleteBehavior(1), wrapHorizontal(0), wrapVertical(0), @@ -2091,7 +2100,6 @@ class FurnaceGUI { allowEditDocking(1), chipNames(0), overflowHighlight(0), - partyTime(0), germanNotation(0), stepOnDelete(0), scrollStep(0), @@ -2230,7 +2238,7 @@ class FurnaceGUI { vsync(1), frameRateLimit(60), displayRenderTime(0), - inputRepeat(0), + inputRepeat(1), glRedSize(8), glGreenSize(8), glBlueSize(8), @@ -2741,9 +2749,11 @@ class FurnaceGUI { void drawSSGEnv(unsigned char type, const ImVec2& size); void drawWaveform(unsigned char type, bool opz, const ImVec2& size); + void drawWaveformSID3(unsigned char type, const ImVec2& size); void drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size); void drawESFMAlgorithm(DivInstrumentESFM& esfm, const ImVec2& size); void drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType); + void drawSID3Env(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType); void drawGBEnv(unsigned char vol, unsigned char len, unsigned char sLen, bool dir, const ImVec2& size); bool drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& flags, bool modifyOnChange, bool fromMenu=false); void kvsConfig(DivInstrument* ins, bool supportsKVS=true); @@ -2760,6 +2770,7 @@ class FurnaceGUI { static bool LocalizedComboGetter(void* data, int idx, const char** out_text); // these ones offer ctrl-wheel fine value changes. + bool isCtrlWheelModifierHeld() const; bool CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format=NULL, ImGuiSliderFlags flags=0); bool CWVSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format=NULL, ImGuiSliderFlags flags=0); bool CWSliderInt(const char* label, int* v, int v_min, int v_max, const char* format="%d", ImGuiSliderFlags flags=0); @@ -2806,6 +2817,7 @@ class FurnaceGUI { void insTabFMModernHeader(DivInstrument* ins); void insTabFM(DivInstrument* ins); + void insTabWavetable(DivInstrument* ins); void insTabSample(DivInstrument* ins); void drawOrderButtons(); @@ -2842,6 +2854,7 @@ class FurnaceGUI { void drawPattern(); void drawInsList(bool asChild=false); void drawInsEdit(); + void drawInsSID3(DivInstrument* ins); void drawWaveList(bool asChild=false); void drawWaveEdit(); void drawSampleList(bool asChild=false); diff --git a/src/gui/guiConst.cpp b/src/gui/guiConst.cpp index 06740d927..ef6d71ba8 100644 --- a/src/gui/guiConst.cpp +++ b/src/gui/guiConst.cpp @@ -186,6 +186,7 @@ const char* insTypes[DIV_INS_MAX+1][3]={ {"SID2",ICON_FA_KEYBOARD_O,ICON_FUR_INS_SID2}, {"Watara Supervision",ICON_FA_GAMEPAD,ICON_FUR_INS_SUPERVISION}, {"NEC μPD1771C",ICON_FA_BAR_CHART,ICON_FUR_INS_UPD1771C}, + {"SID3",ICON_FA_KEYBOARD_O,ICON_FUR_INS_SID3}, {NULL,ICON_FA_QUESTION,ICON_FA_QUESTION} }; @@ -210,7 +211,7 @@ const char* sampleDepths[DIV_SAMPLE_DEPTH_MAX]={ "8-bit µ-law PCM", "C219 PCM", "IMA ADPCM", - NULL, + "12-bit PCM", NULL, "16-bit PCM" }; @@ -346,40 +347,40 @@ const FurnaceGUIColors fxColors[256]={ GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, // 60-6F - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, // 70-7F - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, // 80-8F GUI_COLOR_PATTERN_EFFECT_PANNING, @@ -418,27 +419,27 @@ const FurnaceGUIColors fxColors[256]={ GUI_COLOR_PATTERN_EFFECT_MISC, // A0-AF - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, // B0-BF - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, - GUI_COLOR_PATTERN_EFFECT_INVALID, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, + GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY, GUI_COLOR_PATTERN_EFFECT_INVALID, GUI_COLOR_PATTERN_EFFECT_INVALID, GUI_COLOR_PATTERN_EFFECT_INVALID, @@ -1022,6 +1023,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={ D(GUI_COLOR_INSTR_SID2,"",ImVec4(0.6f,0.75f,1.0f,1.0f)), D(GUI_COLOR_INSTR_SUPERVISION,"",ImVec4(0.52f,1.0f,0.6f,1.0f)), D(GUI_COLOR_INSTR_UPD1771C,"",ImVec4(0.94f,0.52f,0.6f,1.0f)), + D(GUI_COLOR_INSTR_SID3,"",ImVec4(0.6f,0.75f,0.6f,1.0f)), D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)), D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)), @@ -1270,8 +1272,11 @@ const int availableSystems[]={ DIV_SYSTEM_5E01, DIV_SYSTEM_BIFURCATOR, DIV_SYSTEM_SID2, + DIV_SYSTEM_OPL4, + DIV_SYSTEM_OPL4_DRUMS, DIV_SYSTEM_SUPERVISION, DIV_SYSTEM_UPD1771C, + DIV_SYSTEM_SID3, 0 // don't remove this last one! }; @@ -1307,6 +1312,8 @@ const int chipsFM[]={ DIV_SYSTEM_OPL3_DRUMS, DIV_SYSTEM_OPZ, DIV_SYSTEM_ESFM, + DIV_SYSTEM_OPL4, + DIV_SYSTEM_OPL4_DRUMS, 0 // don't remove this last one! }; @@ -1369,6 +1376,7 @@ const int chipsSpecial[]={ DIV_SYSTEM_SID2, DIV_SYSTEM_SUPERVISION, DIV_SYSTEM_UPD1771C, + DIV_SYSTEM_SID3, 0 // don't remove this last one! }; @@ -1394,6 +1402,8 @@ const int chipsSample[]={ DIV_SYSTEM_NDS, DIV_SYSTEM_GBA_DMA, DIV_SYSTEM_GBA_MINMOD, + DIV_SYSTEM_OPL4, + DIV_SYSTEM_OPL4_DRUMS, 0 // don't remove this last one! }; diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 9269ad06b..5590f8894 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -22,6 +22,8 @@ #include "../ta-log.h" #include "imgui_internal.h" #include "../engine/macroInt.h" +// i don't know whether this is the right thing to do +#include "../engine/platform/sound/sid3.h" #include "IconsFontAwesome4.h" #include "furIcons.h" #include "misc/cpp/imgui_stdlib.h" @@ -30,6 +32,7 @@ #include #include #include "plot_nolerp.h" +#include "util.h" extern "C" { #include "../../extern/Nuked-OPLL/opll.h" @@ -228,7 +231,7 @@ const char* esfmNoiseModeDescriptions[4]={ }; const char* sid2WaveMixModes[5]={ - _N("Normal"), + _N("8580 SID"), _N("Bitwise AND"), _N("Bitwise OR"), _N("Bitwise XOR"), @@ -242,6 +245,99 @@ const char* sid2ControlBits[4]={ NULL }; +const char* sid3ControlBits[4]={ + _N("phase"), + _N("sync"), + _N("ring"), + NULL +}; + +const char* sid3WaveMixModes[6]={ + _N("8580 SID"), + _N("Bitwise AND"), + _N("Bitwise OR"), + _N("Bitwise XOR"), + _N("Sum of the signals"), + NULL +}; + +const char* sid3SpecialWaveforms[]={ + _N("Sine"), + _N("Rect. Sine"), + _N("Abs. Sine"), + _N("Quart. Sine"), + _N("Squish. Sine"), + _N("Abs. Squish. Sine"), + + _N("Rect. Saw"), + _N("Abs. Saw"), + + _N("Cubed Saw"), + _N("Rect. Cubed Saw"), + _N("Abs. Cubed Saw"), + + _N("Cubed Sine"), + _N("Rect. Cubed Sine"), + _N("Abs. Cubed Sine"), + _N("Quart. Cubed Sine"), + _N("Squish. Cubed Sine"), + _N("Squish. Abs. Cub. Sine"), + + _N("Rect. Triangle"), + _N("Abs. Triangle"), + _N("Quart. Triangle"), + _N("Squish. Triangle"), + _N("Abs. Squish. Triangle"), + + _N("Cubed Triangle"), + _N("Rect. Cubed Triangle"), + _N("Abs. Cubed Triangle"), + _N("Quart. Cubed Triangle"), + _N("Squish. Cubed Triangle"), + _N("Squish. Abs. Cub. Triangle"), + + // clipped + + _N("Clipped Sine"), + _N("Clipped Rect. Sine"), + _N("Clipped Abs. Sine"), + _N("Clipped Quart. Sine"), + _N("Clipped Squish. Sine"), + _N("Clipped Abs. Squish. Sine"), + + _N("Clipped Rect. Saw"), + _N("Clipped Abs. Saw"), + + _N("Clipped Cubed Saw"), + _N("Clipped Rect. Cubed Saw"), + _N("Clipped Abs. Cubed Saw"), + + _N("Clipped Cubed Sine"), + _N("Clipped Rect. Cubed Sine"), + _N("Clipped Abs. Cubed Sine"), + _N("Clipped Quart. Cubed Sine"), + _N("Clipped Squish. Cubed Sine"), + _N("Clipped Squish. Abs. Cub. Sine"), + + _N("Clipped Rect. Triangle"), + _N("Clipped Abs. Triangle"), + _N("Clipped Quart. Triangle"), + _N("Clipped Squish. Triangle"), + _N("Clipped Abs. Squish. Triangle"), + + _N("Clipped Cubed Triangle"), + _N("Clipped Rect. Cubed Triangle"), + _N("Clipped Abs. Cubed Triangle"), + _N("Clipped Quart. Cubed Triangle"), + _N("Clipped Squish. Cubed Triangle"), + _N("Clipped Squish. Abs. Cub. Triangle"), + + // two clipped simple waves + + _N("Clipped Triangle"), + _N("Clipped Saw") +}; + const bool opIsOutput[8][4]={ {false,false,false,true}, {false,false,false,true}, @@ -346,6 +442,23 @@ const char* ayShapeBits[4]={ NULL }; +const char* sid3ShapeBits[6]={ + _N("triangle"), + _N("saw"), + _N("pulse"), + _N("noise"), + _N("special wave"), + NULL +}; + +const char* sid3FilterMatrixBits[5]={ + _N("From filter 1"), + _N("From filter 2"), + _N("From filter 3"), + _N("From filter 4"), + NULL +}; + const char* ayEnvBits[4]={ _N("hold"), _N("alternate"), @@ -406,7 +519,7 @@ const char* pokeyCtlBits[9]={ NULL }; -const char* mikeyFeedbackBits[11] = { +const char* mikeyFeedbackBits[11]={ "0", "1", "2", "3", "4", "5", "7", "10", "11", "int", NULL }; @@ -577,6 +690,10 @@ const int kslMap[4]={ 0, 2, 1, 3 }; +const int _SID3_SPECIAL_WAVES=SID3_NUM_SPECIAL_WAVES-1; +const int _SID3_NUM_CHANNELS=SID3_NUM_CHANNELS; +const int _SID3_NUM_CHANNELS_MINUS_ONE=SID3_NUM_CHANNELS-1; + // do not change these! // anything other than a checkbox will look ugly! // @@ -631,16 +748,16 @@ String macroHoverES5506FilterMode(int id, float val, void* u) { String mode="???"; switch (((int)val)&3) { case 0: - mode="HP/K2, HP/K2"; + mode=_("HP/K2, HP/K2"); break; case 1: - mode="HP/K2, LP/K1"; + mode=_("HP/K2, LP/K1"); break; case 2: - mode="LP/K2, LP/K2"; + mode=_("LP/K2, LP/K2"); break; case 3: - mode="LP/K2, LP/K1"; + mode=_("LP/K2, LP/K1"); break; default: break; @@ -664,6 +781,45 @@ String macroLFOWaves(int id, float val, void* u) { return "???"; } +String macroSID3SpecialWaves(int id, float val, void* u) { + if ((int)val<0 || (int)val>=SID3_NUM_SPECIAL_WAVES) return "???"; + + return _(sid3SpecialWaveforms[(int)val%SID3_NUM_SPECIAL_WAVES]); +} + +String macroSID3SourceChan(int id, float val, void* u) { + if ((int)val>SID3_NUM_CHANNELS) return "???"; + + if ((int)val==SID3_NUM_CHANNELS) { + return _("Self"); + } else if ((int)val==SID3_NUM_CHANNELS-1) { + return _("PCM/Wave channel"); + } else { + return fmt::sprintf(_("Channel %d"),(int)val+1); + } +} + +String macroSID3NoiseLFSR(int id, float val, void* u) { + return _( + "values close to SID2 noise modes:\n\n" + "Mode 1: 524288\n" + "Mode 2: 66\n" + "Mode 3: 541065280" + ); +} + +String macroSID2WaveMixMode(int id, float val, void* u) { + if ((int)val<0 || (int)val>3) return "???"; + + return _(sid2WaveMixModes[(int)val]); +} + +String macroSID3WaveMixMode(int id, float val, void* u) { + if ((int)val<0 || (int)val>4) return "???"; + + return _(sid3WaveMixModes[(int)val]); +} + void addAALine(ImDrawList* dl, const ImVec2& p1, const ImVec2& p2, const ImU32 color, float thickness=1.0f) { ImVec2 pt[2]; pt[0]=p1; @@ -924,6 +1080,114 @@ void FurnaceGUI::drawWaveform(unsigned char type, bool opz, const ImVec2& size) } } +typedef double (*WaveFunc) (double a); + +WaveFunc waveFuncsIns[]={ + sinus, + rectSin, + absSin, + quartSin, + squiSin, + squiAbsSin, + + rectSaw, + absSaw, + + cubSaw, + rectCubSaw, + absCubSaw, + + cubSine, + rectCubSin, + absCubSin, + quartCubSin, + squishCubSin, + squishAbsCubSin, + + rectTri, + absTri, + quartTri, + squiTri, + absSquiTri, + + cubTriangle, + cubRectTri, + cubAbsTri, + cubQuartTri, + cubSquiTri, + absCubSquiTri +}; + +void FurnaceGUI::drawWaveformSID3(unsigned char type, const ImVec2& size) { + ImDrawList* dl=ImGui::GetWindowDrawList(); + ImGuiWindow* window=ImGui::GetCurrentWindow(); + + ImVec2 waveform[65]; + const size_t waveformLen=64; + + ImVec2 minArea=window->DC.CursorPos; + ImVec2 maxArea=ImVec2( + minArea.x+size.x, + minArea.y+size.y + ); + ImRect rect=ImRect(minArea,maxArea); + ImGuiStyle& style=ImGui::GetStyle(); + ImU32 color=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_WAVE]); + ImGui::ItemSize(size,style.FramePadding.y); + if (ImGui::ItemAdd(rect,ImGui::GetID("SID3wsDisplay"))) { + ImGui::RenderFrame(rect.Min,rect.Max,ImGui::GetColorU32(ImGuiCol_FrameBg),true,style.FrameRounding); + + if (type=SID3_NUM_UNIQUE_SPECIAL_WAVES && type1.0f) y=1.0f; + if (y<-1.0f) y=-1.0f; + + waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.48)); + } + } else { + if (type==SID3_NUM_UNIQUE_SPECIAL_WAVES*2) { + for (size_t i=0; i<=waveformLen; i++) { + float x=(float)i/(float)waveformLen; + float y=triangle(x*2.0*M_PI); + + y*=2.0f; // clipping + + if (y>1.0f) y=1.0f; + if (y<-1.0f) y=-1.0f; + + waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.4)); + } + } + if (type==SID3_NUM_UNIQUE_SPECIAL_WAVES*2+1) { + for (size_t i=0; i<=waveformLen; i++) { + float x=(float)i/(float)waveformLen; + float y=saw(x*2.0*M_PI); + + y*=2.0f; // clipping + + if (y>1.0f) y=1.0f; + if (y<-1.0f) y=-1.0f; + + waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.4)); + } + } + } + + dl->AddPolyline(waveform,waveformLen+1,color,ImDrawFlags_None,dpiScale); + } +} + void FurnaceGUI::drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size) { ImDrawList* dl=ImGui::GetWindowDrawList(); ImGuiWindow* window=ImGui::GetCurrentWindow(); @@ -1523,6 +1787,80 @@ void FurnaceGUI::drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr, } } +void FurnaceGUI::drawSID3Env(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType) { + ImDrawList* dl=ImGui::GetWindowDrawList(); + ImGuiWindow* window=ImGui::GetCurrentWindow(); + + ImVec2 minArea=window->DC.CursorPos; + ImVec2 maxArea=ImVec2( + minArea.x+size.x, + minArea.y+size.y + ); + ImRect rect=ImRect(minArea,maxArea); + ImGuiStyle& style=ImGui::GetStyle(); + ImU32 color=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_ENVELOPE]); + ImU32 colorR=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_ENVELOPE_RELEASE]); // Relsease triangle + ImU32 colorS=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_ENVELOPE_SUS_GUIDE]); // Sustain horiz/vert line color + ImGui::ItemSize(size,style.FramePadding.y); + if (ImGui::ItemAdd(rect,ImGui::GetID("fmEnv"))) { + ImGui::RenderFrame(rect.Min,rect.Max,ImGui::GetColorU32(ImGuiCol_FrameBg),true,style.FrameRounding); + + // Adjust for OPLL global sustain setting + if (instType==DIV_INS_OPLL && algOrGlobalSus==1.0) { + rr=5.0; + } + // calculate x positions + float arPos=float(maxArDr-(float)ar)/maxArDr; // peak of AR, start of DR + float drPos=arPos+(((float)sl/255.0)*(float(maxArDr-(float)dr)/maxArDr)); // end of DR, start of D2R + float d2rPos=drPos+(((255.0-(float)sl)/255.0)*(float(255.0-(float)d2r)/255.0)); // End of D2R + float rrPos=(float(maxRr-(float)rr)/float(maxRr)); // end of RR + + // shrink all the x positions horizontally + arPos/=2.0; + drPos/=2.0; + d2rPos/=2.0; + rrPos/=1.0; + + ImVec2 pos1=ImLerp(rect.Min,rect.Max,ImVec2(0.0,1.0)); // the bottom corner + ImVec2 pos2=ImLerp(rect.Min,rect.Max,ImVec2(arPos,((float)tl/maxTl))); // peak of AR, start of DR + ImVec2 pos3=ImLerp(rect.Min,rect.Max,ImVec2(drPos,(float)(((float)tl/maxTl)+((float)sl/255.0)-(((float)tl/maxTl)*((float)sl/255.0))))); // end of DR, start of D2R + ImVec2 pos4=ImLerp(rect.Min,rect.Max,ImVec2(d2rPos,1.0)); // end of D2R + ImVec2 posRStart=ImLerp(rect.Min,rect.Max,ImVec2(0.0,((float)tl/maxTl))); // release start + ImVec2 posREnd=ImLerp(rect.Min,rect.Max,ImVec2(rrPos,1.0));// release end + ImVec2 posSLineHEnd=ImLerp(rect.Min,rect.Max,ImVec2(1.0,(float)(((float)tl/maxTl)+((float)sl/255.0)-(((float)tl/maxTl)*((float)sl/255.0))))); // sustain horizontal line end + ImVec2 posSLineVEnd=ImLerp(rect.Min,rect.Max,ImVec2(drPos,1.0)); // sustain vertical line end + ImVec2 posDecayRate0Pt=ImLerp(rect.Min,rect.Max,ImVec2(1.0,((float)tl/maxTl))); // Height of the peak of AR, forever + ImVec2 posDecay2Rate0Pt=ImLerp(rect.Min,rect.Max,ImVec2(1.0,(float)(((float)tl/maxTl)+((float)sl/255.0)-(((float)tl/maxTl)*((float)sl/255.0))))); // Height of the peak of SR, forever + + // dl->Flags=ImDrawListFlags_AntiAliasedLines|ImDrawListFlags_AntiAliasedLinesUseTex; + if ((float)ar==0.0) { // if AR = 0, the envelope never starts + dl->AddTriangleFilled(posRStart,posREnd,pos1,colorS); // draw release as shaded triangle behind everything + addAALine(dl,pos1,pos4,color); // draw line on ground + } else if ((float)dr==0.0 && (float)sl!=0.0) { // if DR = 0 and SL is not 0, then the envelope stays at max volume forever + dl->AddTriangleFilled(posRStart,posREnd,pos1,colorS); // draw release as shaded triangle behind everything + // addAALine(dl,pos3,posSLineHEnd,colorS); // draw horiz line through sustain level + // addAALine(dl,pos3,posSLineVEnd,colorS); // draw vert. line through sustain level + addAALine(dl,pos1,pos2,color); // A + addAALine(dl,pos2,posDecayRate0Pt,color); // Line from A to end of graph + } else if ((float)d2r==0.0 || ((instType==DIV_INS_OPL || instType==DIV_INS_SNES || instType == DIV_INS_ESFM) && sus==1.0) || (instType==DIV_INS_OPLL && egt!=0.0)) { // envelope stays at the sustain level forever + dl->AddTriangleFilled(posRStart,posREnd,pos1,colorS); // draw release as shaded triangle behind everything + addAALine(dl,pos3,posSLineHEnd,colorR); // draw horiz line through sustain level + addAALine(dl,pos3,posSLineVEnd,colorR); // draw vert. line through sustain level + addAALine(dl,pos1,pos2,color); // A + addAALine(dl,pos2,pos3,color); // D + addAALine(dl,pos3,posDecay2Rate0Pt,color); // Line from D to end of graph + } else { // draw graph normally + dl->AddTriangleFilled(posRStart,posREnd,pos1,colorS); // draw release as shaded triangle behind everything + addAALine(dl,pos3,posSLineHEnd,colorR); // draw horiz line through sustain level + addAALine(dl,pos3,posSLineVEnd,colorR); // draw vert. line through sustain level + addAALine(dl,pos1,pos2,color); // A + addAALine(dl,pos2,pos3,color); // D + addAALine(dl,pos3,pos4,color); // D2 + } + //dl->Flags^=ImDrawListFlags_AntiAliasedLines|ImDrawListFlags_AntiAliasedLinesUseTex; + } +} + void FurnaceGUI::drawGBEnv(unsigned char vol, unsigned char len, unsigned char sLen, bool dir, const ImVec2& size) { ImDrawList* dl=ImGui::GetWindowDrawList(); ImGuiWindow* window=ImGui::GetCurrentWindow(); @@ -1741,7 +2079,7 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail } if (i.isBitfield) { - PlotBitfield("##IMacro",asInt,totalFit,0,i.bitfieldBits,i.max,ImVec2(availableWidth,(i.macro->open&1)?(i.height*dpiScale):(32.0f*dpiScale)),sizeof(float),doHighlight,uiColors[GUI_COLOR_MACRO_HIGHLIGHT],i.color); + PlotBitfield("##IMacro",asInt,totalFit,0,i.bitfieldBits,i.max,ImVec2(availableWidth,(i.macro->open&1)?(i.height*dpiScale):(32.0f*dpiScale)),sizeof(float),doHighlight,uiColors[GUI_COLOR_MACRO_HIGHLIGHT],i.color,i.hoverFunc,i.hoverFuncUser); } else { PlotCustom("##IMacro",asFloat,totalFit,macroDragScroll,NULL,i.min+i.macro->vScroll,i.min+i.macro->vScroll+i.macro->vZoom,ImVec2(availableWidth,(i.macro->open&1)?(i.height*dpiScale):(32.0f*dpiScale)),sizeof(float),i.color,i.macro->len-macroDragScroll,i.hoverFunc,i.hoverFuncUser,i.blockMode,(i.macro->open&1)?genericGuide:NULL,doHighlight,uiColors[GUI_COLOR_MACRO_HIGHLIGHT]); } @@ -1878,7 +2216,7 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail ImGui::SetNextItemWidth(availableWidth); String& mmlStr=mmlString[index]; if (ImGui::InputText("##IMacroMML",&mmlStr)) { - decodeMMLStr(mmlStr,i.macro->val,i.macro->len,i.macro->loop,i.min,(i.isBitfield)?((1<<(i.isBitfield?i.max:0))-1):i.max,i.macro->rel,i.bit30); + decodeMMLStr(mmlStr,i.macro->val,i.macro->len,i.macro->loop,i.min,(i.isBitfield)?((1<<(i.isBitfield?(i.max):0))-1):i.max,i.macro->rel,i.bit30); } if (!ImGui::IsItemActive()) { encodeMMLStr(mmlStr,i.macro->val,i.macro->len,i.macro->loop,i.macro->rel,false,i.bit30); @@ -2392,48 +2730,68 @@ void FurnaceGUI::drawMacros(std::vector& macros, FurnaceGUI drawMacroEdit(m,totalFit,availableWidth,index); if (m.macro->open&1) { - if ((m.macro->open&6)==0) { - ImGui::Text(_("Length")); - ImGui::SameLine(); - ImGui::SetNextItemWidth(120.0f*dpiScale); - int macroLen=m.macro->len; - if (ImGui::InputScalar("##IMacroLen",ImGuiDataType_U8,¯oLen,&_ONE,&_THREE)) { MARK_MODIFIED - if (macroLen<0) macroLen=0; - if (macroLen>255) macroLen=255; - m.macro->len=macroLen; - } - ImGui::SameLine(); - } - ImGui::Text(_("StepLen")); - ImGui::SameLine(); - ImGui::SetNextItemWidth(120.0f*dpiScale); - if (ImGui::InputScalar("##IMacroSpeed",ImGuiDataType_U8,&m.macro->speed,&_ONE,&_THREE)) { - if (m.macro->speed<1) m.macro->speed=1; - MARK_MODIFIED; - } - ImGui::SameLine(); - ImGui::Text(_("Delay")); - ImGui::SameLine(); - ImGui::SetNextItemWidth(120.0f*dpiScale); - if (ImGui::InputScalar("##IMacroDelay",ImGuiDataType_U8,&m.macro->delay,&_ONE,&_THREE)) { - MARK_MODIFIED; - } - ImGui::SameLine(); - { - FurnaceGUIMacroDesc& i=m; - BUTTON_TO_SET_MODE(ImGui::Button); - if ((i.macro->open&6)==0) { + bool showLen=((m.macro->open&6)==0); + int colCount=showLen ? 4 : 3; + float availX=ImGui::GetContentRegionAvail().x; + + // fairly arbitrary scaling logic + bool shortLabels=(availX<600.0f*dpiScale); + float scalarItemWidth=MIN((availX-90.0f*dpiScale)/colCount, 120.0f*dpiScale); + if (ImGui::BeginTable("##MacroMetaData",colCount)) { + if (showLen) ImGui::TableSetupColumn("len",ImGuiTableColumnFlags_WidthStretch,0.0); + ImGui::TableSetupColumn("stepLen",ImGuiTableColumnFlags_WidthStretch,0.0); + ImGui::TableSetupColumn("delay",ImGuiTableColumnFlags_WidthStretch,0.0); + ImGui::TableSetupColumn("buttons",ImGuiTableColumnFlags_WidthFixed,0.0); + + ImGui::TableNextRow(); + if (showLen) { + ImGui::TableNextColumn(); + ImGui::Text(shortLabels ? _("Len##macroEditLengthShortLabel") : _("Length")); + if (shortLabels && ImGui::IsItemHovered()) ImGui::SetTooltip("%s", _("Length")); ImGui::SameLine(); - BUTTON_TO_SET_RELEASE(ImGui::Button); + ImGui::SetNextItemWidth(scalarItemWidth); + int macroLen=m.macro->len; + if (ImGui::InputScalar("##IMacroLen",ImGuiDataType_U8,¯oLen,&_ONE,&_THREE)) { MARK_MODIFIED + if (macroLen<0) macroLen=0; + if (macroLen>255) macroLen=255; + m.macro->len=macroLen; + } } - } - if (m.modeName!=NULL) { - bool modeVal=m.macro->mode; - String modeName=fmt::sprintf("%s##IMacroMode",m.modeName); + ImGui::TableNextColumn(); + ImGui::Text(shortLabels ? _("SLen##macroEditStepLenShortLabel") : _("StepLen")); + if (shortLabels && ImGui::IsItemHovered()) ImGui::SetTooltip("%s", _("StepLen")); ImGui::SameLine(); - if (ImGui::Checkbox(modeName.c_str(),&modeVal)) { - m.macro->mode=modeVal; + ImGui::SetNextItemWidth(scalarItemWidth); + if (ImGui::InputScalar("##IMacroSpeed",ImGuiDataType_U8,&m.macro->speed,&_ONE,&_THREE)) { + if (m.macro->speed<1) m.macro->speed=1; + MARK_MODIFIED; } + ImGui::TableNextColumn(); + ImGui::Text(shortLabels ? _("Del##macroEditDelayShortLabel") : _("Delay")); + if (shortLabels && ImGui::IsItemHovered()) ImGui::SetTooltip("%s", _("Delay")); + ImGui::SameLine(); + ImGui::SetNextItemWidth(scalarItemWidth); + if (ImGui::InputScalar("##IMacroDelay",ImGuiDataType_U8,&m.macro->delay,&_ONE,&_THREE)) { + MARK_MODIFIED; + } + ImGui::TableNextColumn(); + { + FurnaceGUIMacroDesc& i=m; + BUTTON_TO_SET_MODE(ImGui::Button); + if ((i.macro->open&6)==0) { + ImGui::SameLine(); + BUTTON_TO_SET_RELEASE(ImGui::Button); + } + } + if (m.modeName!=NULL) { + bool modeVal=m.macro->mode; + String modeName=fmt::sprintf("%s##IMacroMode",m.modeName); + ImGui::SameLine(); + if (ImGui::Checkbox(modeName.c_str(),&modeVal)) { + m.macro->mode=modeVal; + } + } + ImGui::EndTable(); } } else { ImGui::Text(_("The heck? No, this isn't even working correctly...")); @@ -2638,6 +2996,273 @@ void FurnaceGUI::alterSampleMap(int column, int val) { ImGui::EndDragDropTarget(); \ } +void FurnaceGUI::insTabWavetable(DivInstrument* ins) +{ + if (ImGui::BeginTabItem(_("Wavetable"))) { + switch (ins->type) { + case DIV_INS_GB: + case DIV_INS_NAMCO: + case DIV_INS_SM8521: + case DIV_INS_SWAN: + wavePreviewLen=32; + wavePreviewHeight=15; + break; + case DIV_INS_PCE: + wavePreviewLen=32; + wavePreviewHeight=31; + break; + case DIV_INS_VBOY: + wavePreviewLen=32; + wavePreviewHeight=63; + break; + case DIV_INS_SCC: + wavePreviewLen=32; + wavePreviewHeight=255; + break; + case DIV_INS_FDS: + wavePreviewLen=64; + wavePreviewHeight=63; + break; + case DIV_INS_N163: + wavePreviewLen=ins->n163.waveLen; + wavePreviewHeight=15; + break; + case DIV_INS_X1_010: + wavePreviewLen=128; + wavePreviewHeight=255; + break; + case DIV_INS_AMIGA: + case DIV_INS_GBA_DMA: + wavePreviewLen=ins->amiga.waveLen+1; + wavePreviewHeight=255; + break; + case DIV_INS_SNES: + wavePreviewLen=ins->amiga.waveLen+1; + wavePreviewHeight=15; + break; + case DIV_INS_GBA_MINMOD: + wavePreviewLen=ins->amiga.waveLen+1; + wavePreviewHeight=255; + break; + case DIV_INS_SID3: + wavePreviewLen=256; + wavePreviewHeight=255; + break; + default: + wavePreviewLen=32; + wavePreviewHeight=31; + break; + } + if (ImGui::Checkbox(_("Enable synthesizer"),&ins->ws.enabled)) { + wavePreviewInit=true; + } + if (ins->ws.enabled) { + ImGui::SameLine(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + if (ins->ws.effect&0x80) { + if ((ins->ws.effect&0x7f)>=DIV_WS_DUAL_MAX) { + ins->ws.effect=0; + wavePreviewInit=true; + } + } else { + if ((ins->ws.effect&0x7f)>=DIV_WS_SINGLE_MAX) { + ins->ws.effect=0; + wavePreviewInit=true; + } + } + if (ImGui::BeginCombo("##WSEffect",(ins->ws.effect&0x80)?dualWSEffects[ins->ws.effect&0x7f]:singleWSEffects[ins->ws.effect&0x7f])) { + ImGui::Text(_("Single-waveform")); + ImGui::Indent(); + for (int i=0; iws.effect=i; + wavePreviewInit=true; + } + } + ImGui::Unindent(); + ImGui::Text(_("Dual-waveform")); + ImGui::Indent(); + for (int i=129; iws.effect=i; + wavePreviewInit=true; + } + } + ImGui::Unindent(); + ImGui::EndCombo(); + } + const bool isSingleWaveFX=(ins->ws.effect>=128); + if (ImGui::BeginTable("WSPreview",isSingleWaveFX?3:2)) { + DivWavetable* wave1=e->getWave(ins->ws.wave1); + DivWavetable* wave2=e->getWave(ins->ws.wave2); + if (wavePreviewInit) { + wavePreview.init(ins,wavePreviewLen,wavePreviewHeight,true); + wavePreviewInit=false; + } + float wavePreview1[257]; + float wavePreview2[257]; + float wavePreview3[257]; + for (int i=0; ilen; i++) { + if (wave1->data[i]>wave1->max) { + wavePreview1[i]=wave1->max; + } else { + wavePreview1[i]=wave1->data[i]; + } + } + if (wave1->len>0) { + wavePreview1[wave1->len]=wave1->data[wave1->len-1]; + } + for (int i=0; ilen; i++) { + if (wave2->data[i]>wave2->max) { + wavePreview2[i]=wave2->max; + } else { + wavePreview2[i]=wave2->data[i]; + } + } + if (wave2->len>0) { + wavePreview2[wave2->len]=wave2->data[wave2->len-1]; + } + if (ins->ws.enabled && (!wavePreviewPaused || wavePreviewInit)) { + wavePreview.tick(true); + WAKE_UP; + } + for (int i=0; i0) { + wavePreview3[wavePreviewLen]=wavePreview3[wavePreviewLen-1]; + } + + float ySize=(isSingleWaveFX?96.0f:128.0f)*dpiScale; + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImVec2 size1=ImVec2(ImGui::GetContentRegionAvail().x,ySize); + PlotNoLerp("##WaveformP1",wavePreview1,wave1->len+1,0,"Wave 1",0,wave1->max,size1); + if (isSingleWaveFX) { + ImGui::TableNextColumn(); + ImVec2 size2=ImVec2(ImGui::GetContentRegionAvail().x,ySize); + PlotNoLerp("##WaveformP2",wavePreview2,wave2->len+1,0,"Wave 2",0,wave2->max,size2); + } + ImGui::TableNextColumn(); + ImVec2 size3=ImVec2(ImGui::GetContentRegionAvail().x,ySize); + PlotNoLerp("##WaveformP3",wavePreview3,wavePreviewLen+1,0,"Result",0,wavePreviewHeight,size3); + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + if (ins->std.waveMacro.len>0) { + ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_WARNING]); + ImGui::AlignTextToFramePadding(); + ImGui::Text(_("Wave 1")); + ImGui::SameLine(); + ImGui::Text(ICON_FA_EXCLAMATION_TRIANGLE); + ImGui::PopStyleColor(); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("waveform macro is controlling wave 1!\nthis value will be ineffective.")); + } + } else { + ImGui::AlignTextToFramePadding(); + ImGui::Text(_("Wave 1")); + } + ImGui::SameLine(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + if (ImGui::InputInt("##SelWave1",&ins->ws.wave1,1,4)) { + if (ins->ws.wave1<0) ins->ws.wave1=0; + if (ins->ws.wave1>=(int)e->song.wave.size()) ins->ws.wave1=e->song.wave.size()-1; + wavePreviewInit=true; + } + if (ins->std.waveMacro.len>0) { + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("waveform macro is controlling wave 1!\nthis value will be ineffective.")); + } + } + if (isSingleWaveFX) { + ImGui::TableNextColumn(); + ImGui::AlignTextToFramePadding(); + ImGui::Text(_("Wave 2")); + ImGui::SameLine(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + if (ImGui::InputInt("##SelWave2",&ins->ws.wave2,1,4)) { + if (ins->ws.wave2<0) ins->ws.wave2=0; + if (ins->ws.wave2>=(int)e->song.wave.size()) ins->ws.wave2=e->song.wave.size()-1; + wavePreviewInit=true; + } + } + ImGui::TableNextColumn(); + if (ImGui::Button(wavePreviewPaused?(ICON_FA_PLAY "##WSPause"):(ICON_FA_PAUSE "##WSPause"))) { + wavePreviewPaused=!wavePreviewPaused; + } + if (ImGui::IsItemHovered()) { + if (wavePreviewPaused) { + ImGui::SetTooltip(_("Resume preview")); + } else { + ImGui::SetTooltip(_("Pause preview")); + } + } + ImGui::SameLine(); + if (ImGui::Button(ICON_FA_REPEAT "##WSRestart")) { + wavePreviewInit=true; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Restart preview")); + } + ImGui::SameLine(); + if (ImGui::Button(ICON_FA_UPLOAD "##WSCopy")) { + curWave=e->addWave(); + if (curWave==-1) { + showError(_("too many wavetables!")); + } else { + wantScrollListWave=true; + MARK_MODIFIED; + RESET_WAVE_MACRO_ZOOM; + nextWindow=GUI_WINDOW_WAVE_EDIT; + + DivWavetable* copyWave=e->song.wave[curWave]; + copyWave->len=wavePreviewLen; + copyWave->max=wavePreviewHeight; + memcpy(copyWave->data,wavePreview.output,256*sizeof(int)); + } + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Copy to new wavetable")); + } + ImGui::SameLine(); + ImGui::Text("(%d×%d)",wavePreviewLen,wavePreviewHeight+1); + ImGui::EndTable(); + } + + if (ImGui::InputScalar(_("Update Rate"),ImGuiDataType_U8,&ins->ws.rateDivider,&_ONE,&_EIGHT)) { + wavePreviewInit=true; + } + int speed=ins->ws.speed+1; + if (ImGui::InputInt(_("Speed"),&speed,1,8)) { + if (speed<1) speed=1; + if (speed>256) speed=256; + ins->ws.speed=speed-1; + wavePreviewInit=true; + } + + if (ImGui::InputScalar(_("Amount"),ImGuiDataType_U8,&ins->ws.param1,&_ONE,&_EIGHT)) { + wavePreviewInit=true; + } + + if (ins->ws.effect==DIV_WS_PHASE_MOD) { + if (ImGui::InputScalar(_("Power"),ImGuiDataType_U8,&ins->ws.param2,&_ONE,&_EIGHT)) { + wavePreviewInit=true; + } + } + + if (ImGui::Checkbox(_("Global"),&ins->ws.global)) { + wavePreviewInit=true; + } + } else { + ImGui::TextWrapped(_("wavetable synthesizer disabled.\nuse the Waveform macro to set the wave for this instrument.")); + } + + ImGui::EndTabItem(); + } +} + void FurnaceGUI::insTabSample(DivInstrument* ins) { const char* sampleTabName=_("Sample"); if (ins->type==DIV_INS_NES) sampleTabName=_("DPCM"); @@ -2667,8 +3292,9 @@ void FurnaceGUI::insTabSample(DivInstrument* ins) { ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_VRC6 || ins->type==DIV_INS_SU || - ins->type==DIV_INS_NDS || - ins->type==DIV_INS_SUPERVISION) { + ins->type==DIV_INS_NDS || + ins->type==DIV_INS_SUPERVISION || + ins->type==DIV_INS_SID3) { P(ImGui::Checkbox(_("Use sample"),&ins->amiga.useSample)); if (ins->type==DIV_INS_X1_010) { if (ImGui::InputInt(_("Sample bank slot##BANKSLOT"),&ins->x1_010.bankSlot,1,4)) { PARAMETER @@ -3499,8 +4125,8 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { opllPreview.alg=ins->fm.alg; opllPreview.fb=patch->fb; - opllPreview.fms=patch->dm; - opllPreview.ams=patch->dc; + opllPreview.fms=patch->dc; + opllPreview.ams=patch->dm; opllPreview.op[0].tl=patch->tl; opllPreview.op[1].tl=ins->fm.op[1].tl; @@ -3510,6 +4136,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { opllPreview.op[i].vib=patch->vib[i]; opllPreview.op[i].ssgEnv=patch->et[i]?8:0; opllPreview.op[i].ksr=patch->ksr[i]; + opllPreview.op[i].ksl=patch->ksl[i]; opllPreview.op[i].mult=patch->multi[i]; opllPreview.op[i].ar=patch->ar[i]; opllPreview.op[i].dr=patch->dr[i]; @@ -4029,7 +4656,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable if ((ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS) && ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("OPL2/3 only (last 4 waveforms are OPL3 only)")); + ImGui::SetTooltip(_("OPL2/3/4 only (last 4 waveforms are OPL3/4 only)")); } if (ins->type==DIV_INS_ESFM && fixedOn) { if (ImGui::Checkbox(FM_SHORT_NAME(FM_VIB),&vibOn)) { PARAMETER @@ -4393,7 +5020,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable if ((ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS) && ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("OPL2/3 only (last 4 waveforms are OPL3 only)")); + ImGui::SetTooltip(_("OPL2/3/4 only (last 4 waveforms are OPL3/4 only)")); } // params @@ -4443,7 +5070,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable if ((ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS) && ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("OPL2/3 only (last 4 waveforms are OPL3 only)")); + ImGui::SetTooltip(_("OPL2/3/4 only (last 4 waveforms are OPL3/4 only)")); } // params @@ -5151,7 +5778,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable if ((ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS) && ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("OPL2/3 only (last 4 waveforms are OPL3 only)")); + ImGui::SetTooltip(_("OPL2/3/4 only (last 4 waveforms are OPL3/4 only)")); } ImGui::TableNextColumn(); ImGui::Text("%s",FM_NAME(FM_WS)); @@ -5235,6 +5862,458 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { } } +void FurnaceGUI::drawInsSID3(DivInstrument* ins) { + char buffer[100]; + char buffer2[100]; + + if (ImGui::BeginTabItem("SID3")) { + if (ImGui::BeginTable("sid3Waves",2,0)) { + ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,0.0f); + ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,0.0f); + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + + ImGui::AlignTextToFramePadding(); + ImGui::Text(_("Waveform")); + ImGui::SameLine(); + pushToggleColors(ins->sid3.triOn); + if (ImGui::Button(_("tri"))) { PARAMETER + ins->sid3.triOn=!ins->sid3.triOn; + } + popToggleColors(); + ImGui::SameLine(); + pushToggleColors(ins->sid3.sawOn); + if (ImGui::Button(_("saw"))) { PARAMETER + ins->sid3.sawOn=!ins->sid3.sawOn; + } + popToggleColors(); + ImGui::SameLine(); + pushToggleColors(ins->sid3.pulseOn); + if (ImGui::Button(_("pulse"))) { PARAMETER + ins->sid3.pulseOn=!ins->sid3.pulseOn; + } + popToggleColors(); + ImGui::SameLine(); + pushToggleColors(ins->sid3.noiseOn); + if (ImGui::Button(_("noise"))) { PARAMETER + ins->sid3.noiseOn=!ins->sid3.noiseOn; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Like in SID2,specific noise LFSR feedback bits config can produce tonal waves.\n" + "Refer to the manual for LFSR bits macro configurations for which frequency calculation is altered\n" + "in a way that makes tonal noise stay in tune.")); + } + popToggleColors(); + ImGui::SameLine(); + + P(ImGui::Checkbox(_("1-bit noise"),&ins->sid3.oneBitNoise)); + ImGui::SameLine(); + + pushToggleColors(ins->sid3.specialWaveOn); + if (ImGui::Button(_("special"))) { PARAMETER + ins->sid3.specialWaveOn=!ins->sid3.specialWaveOn; + } + popToggleColors(); + + P(CWSliderScalar(_("Special wave"),ImGuiDataType_U8,&ins->sid3.special_wave,&_ZERO,&_SID3_SPECIAL_WAVES,_(sid3SpecialWaveforms[ins->sid3.special_wave%SID3_NUM_SPECIAL_WAVES]))); rightClickable + + if (ImGui::Checkbox(_("Wavetable channel"),&ins->sid3.doWavetable)) { + PARAMETER; + ins->std.waveMacro.vZoom=-1; + for (int i=0; i<256; i++) { + ins->std.waveMacro.val[i]=0; + } + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Forces waveform macro to control wavetable index.")); + } + + bool invLeft=ins->sid3.phaseInv&SID3_INV_SIGNAL_LEFT; + if (ImGui::Checkbox(_("Inv. left"),&invLeft)) { PARAMETER + ins->sid3.phaseInv^=SID3_INV_SIGNAL_LEFT; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Invert left channel signal")); + } + ImGui::SameLine(); + bool invRight=ins->sid3.phaseInv&SID3_INV_SIGNAL_RIGHT; + if (ImGui::Checkbox(_("Inv. right"),&invRight)) { PARAMETER + ins->sid3.phaseInv^=SID3_INV_SIGNAL_RIGHT; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Invert right channel signal")); + } + + ImGui::TableNextColumn(); + + CENTER_TEXT(_("Special wave preview")); + ImGui::TextUnformatted(_("Special wave preview")); + drawWaveformSID3(ins->sid3.special_wave,ImVec2(120.0f*dpiScale,70.0f*dpiScale)); + + ImGui::EndTable(); + } + + ImVec2 sliderSize=ImVec2(30.0f*dpiScale,256.0*dpiScale); + + if (ImGui::BeginTable("SID3EnvParams",6,ImGuiTableFlags_NoHostExtendX)) { + ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); + ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); + ImGui::TableSetupColumn("c2",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); + ImGui::TableSetupColumn("c3",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); + ImGui::TableSetupColumn("c4",ImGuiTableColumnFlags_WidthFixed,sliderSize.x); + ImGui::TableSetupColumn("c5",ImGuiTableColumnFlags_WidthStretch); + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + CENTER_TEXT(_("A")); + ImGui::TextUnformatted(_("A")); + ImGui::TableNextColumn(); + CENTER_TEXT(_("D")); + ImGui::TextUnformatted(_("D")); + ImGui::TableNextColumn(); + CENTER_TEXT(_("S")); + ImGui::TextUnformatted(_("S")); + ImGui::TableNextColumn(); + CENTER_TEXT(_("SR")); + ImGui::TextUnformatted(_("SR")); + ImGui::TableNextColumn(); + CENTER_TEXT(_("R")); + ImGui::TextUnformatted(_("R")); + ImGui::TableNextColumn(); + CENTER_TEXT(_("Envelope")); + ImGui::TextUnformatted(_("Envelope")); + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + P(CWVSliderScalar("##Attack",sliderSize,ImGuiDataType_U8,&ins->sid3.a,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + ImGui::TableNextColumn(); + P(CWVSliderScalar("##Decay",sliderSize,ImGuiDataType_U8,&ins->sid3.d,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + ImGui::TableNextColumn(); + P(CWVSliderScalar("##Sustain",sliderSize,ImGuiDataType_U8,&ins->sid3.s,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + ImGui::TableNextColumn(); + P(CWVSliderScalar("##SustainRate",sliderSize,ImGuiDataType_U8,&ins->sid3.sr,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + ImGui::TableNextColumn(); + P(CWVSliderScalar("##Release",sliderSize,ImGuiDataType_U8,&ins->sid3.r,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + ImGui::TableNextColumn(); + // the (ins->sid3.r==15?(ins->sid3.r-1):ins->sid3.r) is used so release part never becomes horizontal (which isn't the case with SID3 envelope) + drawSID3Env(0,(ins->sid3.a==0?(255):(256-ins->sid3.a)),(ins->sid3.d==0?(255):(256-ins->sid3.d)),ins->sid3.sr,255-(ins->sid3.r==255?(ins->sid3.r-1):ins->sid3.r),255-ins->sid3.s,0,0,0,255,256,255,ImVec2(ImGui::GetContentRegionAvail().x,sliderSize.y),ins->type); + + ImGui::EndTable(); + } + + if (!ins->sid3.doWavetable) { + strncpy(buffer,macroSID3WaveMixMode(0,(float)ins->sid3.mixMode,NULL).c_str(),40); + P(CWSliderScalar(_("Wave Mix Mode"),ImGuiDataType_U8,&ins->sid3.mixMode,&_ZERO,&_FOUR,buffer)); + P(CWSliderScalar(_("Duty"),ImGuiDataType_U16,&ins->sid3.duty,&_ZERO,&_SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE)); rightClickable + P(CWSliderScalar(_("Feedback"),ImGuiDataType_U8,&ins->sid3.feedback,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); + bool resetDuty=ins->sid3.resetDuty; + if (ImGui::Checkbox(_("Reset duty on new note"),&resetDuty)) { PARAMETER + ins->sid3.resetDuty=resetDuty; + } + if (ImGui::Checkbox(_("Absolute Duty Macro"),&ins->sid3.dutyIsAbs)) { + ins->std.dutyMacro.vZoom=-1; + PARAMETER; + } + } + + bool ringMod=ins->sid3.ringMod; + if (ImGui::Checkbox(_("Ring Modulation"),&ringMod)) { PARAMETER + ins->sid3.ringMod=ringMod; + } + + ImGui::SameLine(); + + strncpy(buffer,macroSID3SourceChan(0,(float)ins->sid3.ring_mod_source,NULL).c_str(),40); + P(CWSliderScalar(_("Source channel##rmsrc"),ImGuiDataType_U8,&ins->sid3.ring_mod_source,&_ZERO,&_SID3_NUM_CHANNELS,buffer)); + + bool oscSync=ins->sid3.oscSync; + if (ImGui::Checkbox(_("Oscillator Sync"),&oscSync)) { PARAMETER + ins->sid3.oscSync=oscSync; + } + + ImGui::SameLine(); + + strncpy(buffer,macroSID3SourceChan(0,(float)ins->sid3.sync_source,NULL).c_str(),40); + P(CWSliderScalar(_("Source channel##hssrc"),ImGuiDataType_U8,&ins->sid3.sync_source,&_ZERO,&_SID3_NUM_CHANNELS_MINUS_ONE,buffer)); + + bool phaseMod=ins->sid3.phase_mod; + if (ImGui::Checkbox(_("Phase modulation"),&phaseMod)) { PARAMETER + ins->sid3.phase_mod=phaseMod; + } + + ImGui::SameLine(); + + strncpy(buffer,macroSID3SourceChan(0,(float)ins->sid3.phase_mod_source,NULL).c_str(),40); + P(CWSliderScalar(_("Source channel##pmsrc"),ImGuiDataType_U8,&ins->sid3.phase_mod_source,&_ZERO,&_SID3_NUM_CHANNELS_MINUS_ONE,buffer)); + + ImGui::Separator(); + + if (!ins->sid3.doWavetable) { + bool sepNoisePitch=ins->sid3.separateNoisePitch; + if (ImGui::Checkbox(_("Separate noise pitch"),&sepNoisePitch)) { PARAMETER + ins->sid3.separateNoisePitch=sepNoisePitch; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Make noise pitch independent from other waves' pitch.\nNoise pitch will be controllable via macros.")); + } + } + + for (int i=0; isid3.filt[i]; + + if (filt->enabled) { + ImGui::Separator(); + } + + bool enable=filt->enabled; + snprintf(buffer,100,_("Enable filter %d"),i+1); + if (ImGui::Checkbox(buffer,&enable)) { PARAMETER + filt->enabled=enable; + } + + if (filt->enabled) { + bool init=filt->init; + snprintf(buffer,100,_("Initialize filter %d"),i+1); + if (ImGui::Checkbox(buffer,&init)) { PARAMETER + filt->init=init; + } + ImGui::SameLine(); + snprintf(buffer,100,_("Connect to channel input##contoinput%d"),i+1); + bool toInput=filt->mode&SID3_FILTER_CHANNEL_INPUT; + if (ImGui::Checkbox(buffer,&toInput)) { PARAMETER + filt->mode^=SID3_FILTER_CHANNEL_INPUT; + } + + snprintf(buffer,100,_("Cutoff##fcut%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U16,&filt->cutoff,&_ZERO,&_SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE)); rightClickable + snprintf(buffer,100,_("Resonance##fres%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->resonance,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + snprintf(buffer,100,_("Output volume##foutvol%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->output_volume,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + snprintf(buffer,100,_("Distortion level##fdist%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->distortion_level,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + + ImGui::AlignTextToFramePadding(); + ImGui::Text(_("Filter Mode")); + ImGui::SameLine(); + + bool lp=filt->mode&SID3_FILTER_LP; + pushToggleColors(lp); + snprintf(buffer,100,_("low##flow%d"),i+1); + if (ImGui::Button(buffer)) { PARAMETER + filt->mode^=SID3_FILTER_LP; + } + popToggleColors(); + ImGui::SameLine(); + + bool bp=filt->mode&SID3_FILTER_BP; + pushToggleColors(bp); + snprintf(buffer,100,_("band##fband%d"),i+1); + if (ImGui::Button(buffer)) { PARAMETER + filt->mode^=SID3_FILTER_BP; + } + popToggleColors(); + ImGui::SameLine(); + + bool hp=filt->mode&SID3_FILTER_HP; + pushToggleColors(hp); + snprintf(buffer,100,_("high##fhigh%d"),i+1); + if (ImGui::Button(buffer)) { PARAMETER + filt->mode^=SID3_FILTER_HP; + } + popToggleColors(); + + + ImGui::SameLine(); + snprintf(buffer,100,_("Connect to channel output##contooutput%d"),i+1); + bool toOutput=filt->mode&SID3_FILTER_OUTPUT; + if (ImGui::Checkbox(buffer,&toOutput)) { PARAMETER + filt->mode^=SID3_FILTER_OUTPUT; + } + + snprintf(buffer,100,_("Absolute cutoff macro##abscutoff%d"),i+1); + bool absCutoff=filt->absoluteCutoff; + if (ImGui::Checkbox(buffer,&absCutoff)) { PARAMETER + filt->absoluteCutoff=!filt->absoluteCutoff; + ins->std.opMacros[i].d2rMacro.vZoom=-1; + } + + snprintf(buffer,100,_("Change cutoff with pitch##bindcutoff%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindCutoffToNote)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Filter cutoff will change with frequency/pitch.\nSee settings below.")); + } + + if (filt->bindCutoffToNote) { + snprintf(buffer,100,_("Decrease cutoff when pitch increases##decreasecutoff%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindCutoffToNoteDir)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("If this is enabled,filter cutoff will decrease if you increase the pitch.\n" + "If this is disabled,filter cutoff will increase if you increase the pitch.")); + } + + snprintf(buffer2,100,_("%s"),noteNameNormal(filt->bindCutoffToNoteCenter%12,(short)(filt->bindCutoffToNoteCenter / 12)-5)); + snprintf(buffer,100,_("Cutoff change center note##bindcutcenternote%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->bindCutoffToNoteCenter,&_ZERO,&_ONE_HUNDRED_SEVENTY_NINE,buffer2)); rightClickable + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("The center note for cutoff changes. At this note no cutoff change happens.\nAs pitch goes lower or higher,cutoff changes apply.")); + } + + snprintf(buffer,100,_("Cutoff change strength##bindcutstrength%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->bindCutoffToNoteStrength,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("How much cutoff changes for given pitch change.")); + } + snprintf(buffer,100,_("Scale cutoff only once on new note##bindcutnn%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindCutoffOnNote)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Filter cutoff will be changed only once on new note.\nIf this option is disabled,cutoff scaling will be applied\nevery time a pitch change happens.")); + } + } + + snprintf(buffer,100,_("Change resonance with pitch##bindres%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindResonanceToNote)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Filter resonance will change with frequency/pitch.\nSee settings below.")); + } + + if (filt->bindResonanceToNote) { + snprintf(buffer,100,_("Decrease resonance when pitch increases##decreaseres%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindResonanceToNoteDir)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("If this is enabled,filter resonance will decrease if you increase the pitch.\n" + "If this is disabled,filter resonance will increase if you increase the pitch.")); + } + + snprintf(buffer2,100,_("%s"),noteNameNormal(filt->bindResonanceToNoteCenter%12,(short)(filt->bindResonanceToNoteCenter / 12)-5)); + snprintf(buffer,100,_("Resonance change center note##bindrescenternote%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->bindResonanceToNoteCenter,&_ZERO,&_ONE_HUNDRED_SEVENTY_NINE,buffer2)); rightClickable + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("The center note for resonance changes. At this note no resonance change happens.\nAs pitch goes lower or higher,resonance changes apply.")); + } + + snprintf(buffer,100,_("Resonance change strength##bindresstrength%d"),i+1); + P(CWSliderScalar(buffer,ImGuiDataType_U8,&filt->bindResonanceToNoteStrength,&_ZERO,&_TWO_HUNDRED_FIFTY_FIVE)); rightClickable + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("How much resonance changes for given pitch change.")); + } + snprintf(buffer,100,_("Scale resonance only once on new note##bindresnn%d"),i+1); + P(ImGui::Checkbox(buffer,&filt->bindResonanceOnNote)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Filter resonance will be changed only once on new note.\nIf this option is disabled,resonance scaling will be applied\nevery time a pitch change happens.")); + } + } + } + } + + ImGui::Separator(); + + if (ImGui::BeginTable("SID3filtmatrix",1)) { + if (waveGenVisible) ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,250.0f*dpiScale); + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + + CENTER_TEXT(_("Filters connection matrix")); + ImGui::Text(_("Filters connection matrix")); + + if (ImGui::BeginTable("SID3checkboxesmatrix",3+SID3_NUM_FILTERS)) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::Text(">>"); + ImGui::TableNextColumn(); + ImGui::Text(_("In")); + + for (int i=0; isid3.filt[i]; + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::Text("%d",i+1); + + ImGui::TableNextColumn(); + + snprintf(buffer,40,"##filtmatrixin%d",i+1); + bool toInput=filt->mode&SID3_FILTER_CHANNEL_INPUT; + if (ImGui::Checkbox(buffer,&toInput)) { PARAMETER + filt->mode^=SID3_FILTER_CHANNEL_INPUT; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Feed signal from channel to filter %d input"),i+1); + } + + for (int j=0; jfilter_matrix&(1<filter_matrix^=(1<mode&SID3_FILTER_OUTPUT; + if (ImGui::Checkbox(buffer,&toOutput)) { PARAMETER + filt->mode^=SID3_FILTER_OUTPUT; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Feed signal from filter %d output to channel output"),i+1); + } + } + + ImGui::EndTable(); + } + + ImGui::EndTable(); + } + + ImGui::EndTabItem(); + } + + if (!ins->amiga.useSample) { + insTabWavetable(ins); + } + insTabSample(ins); + + std::vector macroList; + + for (int i=0; istd.opMacros[i].d2rMacro,ins->sid3.filt[i].absoluteCutoff?0:-65535,65535,160,uiColors[GUI_COLOR_MACRO_FILTER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Resonance"),&ins->std.opMacros[i].damMacro,0,255,160,uiColors[GUI_COLOR_MACRO_FILTER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Filter Toggle"),&ins->std.opMacros[i].drMacro,0,1,32,uiColors[GUI_COLOR_MACRO_FILTER],false,NULL,NULL,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("Filter Mode"),&ins->std.opMacros[i].ksrMacro,0,3,48,uiColors[GUI_COLOR_MACRO_FILTER],false,NULL,NULL,true,filtModeBits)); + macroList.push_back(FurnaceGUIMacroDesc(_("Distortion Level"),&ins->std.opMacros[i].dt2Macro,0,255,160,uiColors[GUI_COLOR_MACRO_FILTER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Output Volume"),&ins->std.opMacros[i].dtMacro,0,255,160,uiColors[GUI_COLOR_MACRO_FILTER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Channel Input Connection"),&ins->std.opMacros[i].dvbMacro,0,1,32,uiColors[GUI_COLOR_MACRO_FILTER],false,NULL,NULL,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("Channel Output Connection"),&ins->std.opMacros[i].egtMacro,0,1,32,uiColors[GUI_COLOR_MACRO_FILTER],false,NULL,NULL,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("Connection Matrix Row"),&ins->std.opMacros[i].kslMacro,0,SID3_NUM_FILTERS,16*SID3_NUM_FILTERS,uiColors[GUI_COLOR_MACRO_FILTER],false,NULL,NULL,true,sid3FilterMatrixBits)); + + drawMacros(macroList,macroEditStateOP[i]); + + ImGui::EndTabItem(); + } + } +} + void FurnaceGUI::drawInsEdit() { if (nextWindow==GUI_WINDOW_INS_EDIT) { insEditOpen=true; @@ -5453,6 +6532,7 @@ void FurnaceGUI::drawInsEdit() { if (ImGui::BeginTabBar("insEditTab")) { std::vector macroList; + if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPLL || ins->type==DIV_INS_OPZ || ins->type==DIV_INS_OPL_DRUMS || ins->type==DIV_INS_OPM || ins->type==DIV_INS_ESFM) { char label[32]; int opCount=4; @@ -5930,6 +7010,11 @@ void FurnaceGUI::drawInsEdit() { P(CWSliderScalar(_("Duty"),ImGuiDataType_U16,&ins->c64.duty,&_ZERO,&_FOUR_THOUSAND_NINETY_FIVE)); rightClickable + bool resetDuty=ins->c64.resetDuty; + if (ImGui::Checkbox(_("Reset duty on new note"),&resetDuty)) { PARAMETER + ins->c64.resetDuty=resetDuty; + } + bool ringMod=ins->c64.ringMod; if (ImGui::Checkbox(_("Ring Modulation"),&ringMod)) { PARAMETER ins->c64.ringMod=ringMod; @@ -6234,6 +7319,9 @@ void FurnaceGUI::drawInsEdit() { ImGui::EndChild(); ImGui::EndTabItem(); } + if (ins->type==DIV_INS_SID3) { + drawInsSID3(ins); + } if (ins->type==DIV_INS_MSM6258 || ins->type==DIV_INS_MSM6295 || ins->type==DIV_INS_ADPCMA || @@ -6569,6 +7657,19 @@ void FurnaceGUI::drawInsEdit() { P(CWSliderScalar(_("AM Depth"),ImGuiDataType_U8,&ins->multipcm.am,&_ZERO,&_SEVEN)); rightClickable ImGui::EndTable(); } + P(ImGui::Checkbox(_("Damp"),&ins->multipcm.damp)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Only for OPL4 PCM.")); + } + P(ImGui::Checkbox(_("Pseudo Reverb"),&ins->multipcm.pseudoReverb)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Only for OPL4 PCM.")); + } + P(ImGui::Checkbox(_("LFO Reset"),&ins->multipcm.lfoReset)); + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Only for OPL4 PCM.")); + } + P(ImGui::Checkbox(_("Level Direct"),&ins->multipcm.levelDirect)); ImGui::EndTabItem(); } } @@ -6701,266 +7802,9 @@ void FurnaceGUI::drawInsEdit() { ins->type==DIV_INS_SNES || ins->type==DIV_INS_NAMCO || ins->type==DIV_INS_SM8521 || - (ins->type==DIV_INS_GBA_MINMOD && ins->amiga.useWave)) { - if (ImGui::BeginTabItem(_("Wavetable"))) { - switch (ins->type) { - case DIV_INS_GB: - case DIV_INS_NAMCO: - case DIV_INS_SM8521: - case DIV_INS_SWAN: - wavePreviewLen=32; - wavePreviewHeight=15; - break; - case DIV_INS_PCE: - wavePreviewLen=32; - wavePreviewHeight=31; - break; - case DIV_INS_VBOY: - wavePreviewLen=32; - wavePreviewHeight=63; - break; - case DIV_INS_SCC: - wavePreviewLen=32; - wavePreviewHeight=255; - break; - case DIV_INS_FDS: - wavePreviewLen=64; - wavePreviewHeight=63; - break; - case DIV_INS_N163: - wavePreviewLen=ins->n163.waveLen; - wavePreviewHeight=15; - break; - case DIV_INS_X1_010: - wavePreviewLen=128; - wavePreviewHeight=255; - break; - case DIV_INS_AMIGA: - case DIV_INS_GBA_DMA: - wavePreviewLen=ins->amiga.waveLen+1; - wavePreviewHeight=255; - break; - case DIV_INS_SNES: - wavePreviewLen=ins->amiga.waveLen+1; - wavePreviewHeight=15; - break; - case DIV_INS_GBA_MINMOD: - wavePreviewLen=ins->amiga.waveLen+1; - wavePreviewHeight=255; - break; - default: - wavePreviewLen=32; - wavePreviewHeight=31; - break; - } - if (ImGui::Checkbox(_("Enable synthesizer"),&ins->ws.enabled)) { - wavePreviewInit=true; - } - if (ins->ws.enabled) { - ImGui::SameLine(); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (ins->ws.effect&0x80) { - if ((ins->ws.effect&0x7f)>=DIV_WS_DUAL_MAX) { - ins->ws.effect=0; - wavePreviewInit=true; - } - } else { - if ((ins->ws.effect&0x7f)>=DIV_WS_SINGLE_MAX) { - ins->ws.effect=0; - wavePreviewInit=true; - } - } - if (ImGui::BeginCombo("##WSEffect",(ins->ws.effect&0x80)?dualWSEffects[ins->ws.effect&0x7f]:singleWSEffects[ins->ws.effect&0x7f])) { - ImGui::Text(_("Single-waveform")); - ImGui::Indent(); - for (int i=0; iws.effect=i; - wavePreviewInit=true; - } - } - ImGui::Unindent(); - ImGui::Text(_("Dual-waveform")); - ImGui::Indent(); - for (int i=129; iws.effect=i; - wavePreviewInit=true; - } - } - ImGui::Unindent(); - ImGui::EndCombo(); - } - const bool isSingleWaveFX=(ins->ws.effect>=128); - if (ImGui::BeginTable("WSPreview",isSingleWaveFX?3:2)) { - DivWavetable* wave1=e->getWave(ins->ws.wave1); - DivWavetable* wave2=e->getWave(ins->ws.wave2); - if (wavePreviewInit) { - wavePreview.init(ins,wavePreviewLen,wavePreviewHeight,true); - wavePreviewInit=false; - } - float wavePreview1[257]; - float wavePreview2[257]; - float wavePreview3[257]; - for (int i=0; ilen; i++) { - if (wave1->data[i]>wave1->max) { - wavePreview1[i]=wave1->max; - } else { - wavePreview1[i]=wave1->data[i]; - } - } - if (wave1->len>0) { - wavePreview1[wave1->len]=wave1->data[wave1->len-1]; - } - for (int i=0; ilen; i++) { - if (wave2->data[i]>wave2->max) { - wavePreview2[i]=wave2->max; - } else { - wavePreview2[i]=wave2->data[i]; - } - } - if (wave2->len>0) { - wavePreview2[wave2->len]=wave2->data[wave2->len-1]; - } - if (ins->ws.enabled && (!wavePreviewPaused || wavePreviewInit)) { - wavePreview.tick(true); - WAKE_UP; - } - for (int i=0; i0) { - wavePreview3[wavePreviewLen]=wavePreview3[wavePreviewLen-1]; - } - - float ySize=(isSingleWaveFX?96.0f:128.0f)*dpiScale; - - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - ImVec2 size1=ImVec2(ImGui::GetContentRegionAvail().x,ySize); - PlotNoLerp("##WaveformP1",wavePreview1,wave1->len+1,0,"Wave 1",0,wave1->max,size1); - if (isSingleWaveFX) { - ImGui::TableNextColumn(); - ImVec2 size2=ImVec2(ImGui::GetContentRegionAvail().x,ySize); - PlotNoLerp("##WaveformP2",wavePreview2,wave2->len+1,0,"Wave 2",0,wave2->max,size2); - } - ImGui::TableNextColumn(); - ImVec2 size3=ImVec2(ImGui::GetContentRegionAvail().x,ySize); - PlotNoLerp("##WaveformP3",wavePreview3,wavePreviewLen+1,0,"Result",0,wavePreviewHeight,size3); - - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - if (ins->std.waveMacro.len>0) { - ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_WARNING]); - ImGui::AlignTextToFramePadding(); - ImGui::Text(_("Wave 1")); - ImGui::SameLine(); - ImGui::Text(ICON_FA_EXCLAMATION_TRIANGLE); - ImGui::PopStyleColor(); - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("waveform macro is controlling wave 1!\nthis value will be ineffective.")); - } - } else { - ImGui::AlignTextToFramePadding(); - ImGui::Text(_("Wave 1")); - } - ImGui::SameLine(); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (ImGui::InputInt("##SelWave1",&ins->ws.wave1,1,4)) { - if (ins->ws.wave1<0) ins->ws.wave1=0; - if (ins->ws.wave1>=(int)e->song.wave.size()) ins->ws.wave1=e->song.wave.size()-1; - wavePreviewInit=true; - } - if (ins->std.waveMacro.len>0) { - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("waveform macro is controlling wave 1!\nthis value will be ineffective.")); - } - } - if (isSingleWaveFX) { - ImGui::TableNextColumn(); - ImGui::AlignTextToFramePadding(); - ImGui::Text(_("Wave 2")); - ImGui::SameLine(); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (ImGui::InputInt("##SelWave2",&ins->ws.wave2,1,4)) { - if (ins->ws.wave2<0) ins->ws.wave2=0; - if (ins->ws.wave2>=(int)e->song.wave.size()) ins->ws.wave2=e->song.wave.size()-1; - wavePreviewInit=true; - } - } - ImGui::TableNextColumn(); - if (ImGui::Button(wavePreviewPaused?(ICON_FA_PLAY "##WSPause"):(ICON_FA_PAUSE "##WSPause"))) { - wavePreviewPaused=!wavePreviewPaused; - } - if (ImGui::IsItemHovered()) { - if (wavePreviewPaused) { - ImGui::SetTooltip(_("Resume preview")); - } else { - ImGui::SetTooltip(_("Pause preview")); - } - } - ImGui::SameLine(); - if (ImGui::Button(ICON_FA_REPEAT "##WSRestart")) { - wavePreviewInit=true; - } - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("Restart preview")); - } - ImGui::SameLine(); - if (ImGui::Button(ICON_FA_UPLOAD "##WSCopy")) { - curWave=e->addWave(); - if (curWave==-1) { - showError(_("too many wavetables!")); - } else { - wantScrollListWave=true; - MARK_MODIFIED; - RESET_WAVE_MACRO_ZOOM; - nextWindow=GUI_WINDOW_WAVE_EDIT; - - DivWavetable* copyWave=e->song.wave[curWave]; - copyWave->len=wavePreviewLen; - copyWave->max=wavePreviewHeight; - memcpy(copyWave->data,wavePreview.output,256*sizeof(int)); - } - } - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("Copy to new wavetable")); - } - ImGui::SameLine(); - ImGui::Text("(%d×%d)",wavePreviewLen,wavePreviewHeight+1); - ImGui::EndTable(); - } - - if (ImGui::InputScalar(_("Update Rate"),ImGuiDataType_U8,&ins->ws.rateDivider,&_ONE,&_EIGHT)) { - wavePreviewInit=true; - } - int speed=ins->ws.speed+1; - if (ImGui::InputInt(_("Speed"),&speed,1,8)) { - if (speed<1) speed=1; - if (speed>256) speed=256; - ins->ws.speed=speed-1; - wavePreviewInit=true; - } - - if (ImGui::InputScalar(_("Amount"),ImGuiDataType_U8,&ins->ws.param1,&_ONE,&_EIGHT)) { - wavePreviewInit=true; - } - - if (ins->ws.effect==DIV_WS_PHASE_MOD) { - if (ImGui::InputScalar(_("Power"),ImGuiDataType_U8,&ins->ws.param2,&_ONE,&_EIGHT)) { - wavePreviewInit=true; - } - } - - if (ImGui::Checkbox(_("Global"),&ins->ws.global)) { - wavePreviewInit=true; - } - } else { - ImGui::TextWrapped(_("wavetable synthesizer disabled.\nuse the Waveform macro to set the wave for this instrument.")); - } - - ImGui::EndTabItem(); - } + (ins->type==DIV_INS_GBA_MINMOD && ins->amiga.useWave)) + { + insTabWavetable(ins); } if (ins->typestd.arpMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.arpMacro.val)); if (!ins->amiga.useSample) { macroList.push_back(FurnaceGUIMacroDesc(_("Noise Freq"),&ins->std.dutyMacro,0,31,160,uiColors[GUI_COLOR_MACRO_NOISE])); - macroList.push_back(FurnaceGUIMacroDesc(_("Waveform"),&ins->std.waveMacro,0,3,64,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,NULL,true,ayShapeBits)); + macroList.push_back(FurnaceGUIMacroDesc(_("Waveform"),&ins->std.waveMacro,0,3,48,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,NULL,true,ayShapeBits)); } macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode)); macroList.push_back(FurnaceGUIMacroDesc(_("Phase Reset"),&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); @@ -7262,6 +8106,9 @@ void FurnaceGUI::drawInsEdit() { macroList.push_back(FurnaceGUIMacroDesc(_("Panning"),&ins->std.panLMacro,-7,7,45,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL)); macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode)); macroList.push_back(FurnaceGUIMacroDesc(_("Phase Reset"),&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("LFO Speed"),&ins->std.ex1Macro,0,7,160,uiColors[GUI_COLOR_MACRO_OTHER])); + macroList.push_back(FurnaceGUIMacroDesc(_("LFO Vib Depth"),&ins->std.fmsMacro,0,7,160,uiColors[GUI_COLOR_MACRO_PITCH])); + macroList.push_back(FurnaceGUIMacroDesc(_("LFO AM Depth"),&ins->std.amsMacro,0,7,160,uiColors[GUI_COLOR_MACRO_VOLUME])); break; case DIV_INS_SNES: macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,127,160,uiColors[GUI_COLOR_MACRO_VOLUME])); @@ -7560,7 +8407,7 @@ void FurnaceGUI::drawInsEdit() { macroList.push_back(FurnaceGUIMacroDesc(_("Sustain"),&ins->std.ex7Macro,0,15,128,uiColors[GUI_COLOR_MACRO_ENVELOPE])); macroList.push_back(FurnaceGUIMacroDesc(_("Release"),&ins->std.ex8Macro,0,15,128,uiColors[GUI_COLOR_MACRO_ENVELOPE])); macroList.push_back(FurnaceGUIMacroDesc(_("Noise Mode"),&ins->std.fmsMacro,0,3,64,uiColors[GUI_COLOR_MACRO_NOISE])); - macroList.push_back(FurnaceGUIMacroDesc(_("Wave Mix"),&ins->std.amsMacro,0,3,64,uiColors[GUI_COLOR_MACRO_OTHER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Wave Mix"),&ins->std.amsMacro,0,3,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,macroSID2WaveMixMode)); break; case DIV_INS_UPD1771C: macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,31,160,uiColors[GUI_COLOR_MACRO_VOLUME])); @@ -7570,6 +8417,64 @@ void FurnaceGUI::drawInsEdit() { macroList.push_back(FurnaceGUIMacroDesc(_("Duty/Mode"),&ins->std.dutyMacro,0,1,160,uiColors[GUI_COLOR_MACRO_NOISE])); macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode)); break; + case DIV_INS_SID3: + macroList.push_back(FurnaceGUIMacroDesc(_("Volume"),&ins->std.volMacro,0,255,160,uiColors[GUI_COLOR_MACRO_VOLUME])); + + macroList.push_back(FurnaceGUIMacroDesc(_("Arpeggio"),&ins->std.arpMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.arpMacro.val)); + macroList.push_back(FurnaceGUIMacroDesc(_("Pitch"),&ins->std.pitchMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode)); + + if (ins->sid3.doWavetable) { + int waveCount=MAX(1,e->song.waveLen-1); + macroList.push_back(FurnaceGUIMacroDesc(_("Waveform"),&ins->std.waveMacro,0,waveCount,160,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,NULL,false,NULL)); + } else { + macroList.push_back(FurnaceGUIMacroDesc(_("Duty"),&ins->std.dutyMacro,ins->sid3.dutyIsAbs?0:-65535,65535,160,uiColors[GUI_COLOR_MACRO_OTHER])); + macroList.push_back(FurnaceGUIMacroDesc(_("Waveform"),&ins->std.waveMacro,0,5,16 * 5,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,NULL,true,sid3ShapeBits)); + macroList.push_back(FurnaceGUIMacroDesc(_("Special Wave"),&ins->std.algMacro,0,SID3_NUM_SPECIAL_WAVES - 1,160,uiColors[GUI_COLOR_MACRO_WAVE],false,NULL,macroSID3SpecialWaves)); + } + + if (ins->sid3.separateNoisePitch && !ins->sid3.doWavetable) { + macroList.push_back(FurnaceGUIMacroDesc(_("Noise Arpeggio"),&ins->std.opMacros[3].amMacro,-120,120,160,uiColors[GUI_COLOR_MACRO_PITCH],true,NULL,macroHoverNote,false,NULL,true,ins->std.opMacros[3].amMacro.val,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("Noise Pitch"),&ins->std.opMacros[0].arMacro,-2048,2047,160,uiColors[GUI_COLOR_MACRO_PITCH],true,macroRelativeMode,NULL,false,NULL,false,NULL,false,true)); + } + + macroList.push_back(FurnaceGUIMacroDesc(_("Panning (left)"),&ins->std.panLMacro,0,255,160,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL)); + macroList.push_back(FurnaceGUIMacroDesc(_("Panning (right)"),&ins->std.panRMacro,0,255,160,uiColors[GUI_COLOR_MACRO_OTHER])); + + macroList.push_back(FurnaceGUIMacroDesc(_("Channel inversion"),&ins->std.opMacros[2].arMacro,0,2,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,minModModeBits)); + + macroList.push_back(FurnaceGUIMacroDesc(_("Key On/Off"),&ins->std.opMacros[0].amMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); + + macroList.push_back(FurnaceGUIMacroDesc(_("Special"),&ins->std.ex1Macro,0,3,48,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true,sid3ControlBits)); + + macroList.push_back(FurnaceGUIMacroDesc(_("Ring Mod Source"),&ins->std.fmsMacro,0,SID3_NUM_CHANNELS,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,macroSID3SourceChan)); + macroList.push_back(FurnaceGUIMacroDesc(_("Hard Sync Source"),&ins->std.amsMacro,0,SID3_NUM_CHANNELS - 1,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,macroSID3SourceChan)); + macroList.push_back(FurnaceGUIMacroDesc(_("Phase Mod Source"),&ins->std.fbMacro,0,SID3_NUM_CHANNELS - 1,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,macroSID3SourceChan)); + + if (!ins->sid3.doWavetable) { + macroList.push_back(FurnaceGUIMacroDesc(_("Feedback"),&ins->std.opMacros[3].arMacro,0,255,160,uiColors[GUI_COLOR_MACRO_OTHER])); + } + + macroList.push_back(FurnaceGUIMacroDesc(_("Phase Reset"),&ins->std.phaseResetMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); + + if (!ins->sid3.doWavetable) { + macroList.push_back(FurnaceGUIMacroDesc(_("Noise Phase Reset"),&ins->std.opMacros[1].amMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); + } + macroList.push_back(FurnaceGUIMacroDesc(_("Envelope Reset"),&ins->std.opMacros[2].amMacro,0,1,32,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,NULL,true)); + + macroList.push_back(FurnaceGUIMacroDesc(_("Attack"),&ins->std.ex2Macro,0,255,160,uiColors[GUI_COLOR_MACRO_ENVELOPE])); + macroList.push_back(FurnaceGUIMacroDesc(_("Decay"),&ins->std.ex3Macro,0,255,160,uiColors[GUI_COLOR_MACRO_ENVELOPE])); + macroList.push_back(FurnaceGUIMacroDesc(_("Sustain"),&ins->std.ex4Macro,0,255,160,uiColors[GUI_COLOR_MACRO_ENVELOPE])); + macroList.push_back(FurnaceGUIMacroDesc(_("Sustain Rate"),&ins->std.ex5Macro,0,255,160,uiColors[GUI_COLOR_MACRO_ENVELOPE])); + macroList.push_back(FurnaceGUIMacroDesc(_("Release"),&ins->std.ex6Macro,0,255,160,uiColors[GUI_COLOR_MACRO_ENVELOPE])); + + if (!ins->sid3.doWavetable) { + macroList.push_back(FurnaceGUIMacroDesc(_("Noise LFSR bits"),&ins->std.ex7Macro,0,30,16 * 30,uiColors[GUI_COLOR_MACRO_NOISE],false,NULL,macroSID3NoiseLFSR,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("1-Bit Noise"),&ins->std.opMacros[1].arMacro,0,1,32,uiColors[GUI_COLOR_MACRO_NOISE],false,NULL,NULL,true)); + macroList.push_back(FurnaceGUIMacroDesc(_("Wave Mix"),&ins->std.ex8Macro,0,4,64,uiColors[GUI_COLOR_MACRO_OTHER],false,NULL,macroSID3WaveMixMode)); + } else { + macroList.push_back(FurnaceGUIMacroDesc(_("Sample Mode"),&ins->std.opMacros[1].arMacro,0,1,32,uiColors[GUI_COLOR_MACRO_NOISE],false,NULL,NULL,true)); + } + break; case DIV_INS_MAX: case DIV_INS_NULL: break; diff --git a/src/gui/intConst.cpp b/src/gui/intConst.cpp index dde39ea34..37ff6f7aa 100644 --- a/src/gui/intConst.cpp +++ b/src/gui/intConst.cpp @@ -33,6 +33,7 @@ const int _THIRTY_ONE=31; const int _SIXTY_FOUR=64; const int _ONE_HUNDRED=100; const int _ONE_HUNDRED_TWENTY_SEVEN=127; +const int _ONE_HUNDRED_SEVENTY_NINE=179; const int _TWO_HUNDRED_FIFTY_FIVE=255; const int _FIVE_HUNDRED_ELEVEN=511; const int _TWO_THOUSAND_FORTY_SEVEN=2047; diff --git a/src/gui/intConst.h b/src/gui/intConst.h index 26f3b9e8b..d62ef5f03 100644 --- a/src/gui/intConst.h +++ b/src/gui/intConst.h @@ -35,6 +35,7 @@ extern const int _THIRTY_ONE; extern const int _SIXTY_FOUR; extern const int _ONE_HUNDRED; extern const int _ONE_HUNDRED_TWENTY_SEVEN; +extern const int _ONE_HUNDRED_SEVENTY_NINE; extern const int _TWO_HUNDRED_FIFTY_FIVE; extern const int _FIVE_HUNDRED_ELEVEN; extern const int _TWO_THOUSAND_FORTY_SEVEN; diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index f03715be5..e974b02b5 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -37,7 +37,7 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& acce ImGui::TableNextColumn(); if (!i.subDefs.empty()) { if (i.orig.empty()) { - sysDefID=fmt::sprintf("%s%s/%dS",i.name,sysDefIDLeader,index); + sysDefID=fmt::sprintf("%s%s/%dS",_(i.name.c_str()),sysDefIDLeader,index); } else { sysDefID=fmt::sprintf("%s/%dS",sysDefIDLeader,index); } @@ -45,7 +45,7 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& acce ImGui::SameLine(); } if (!i.orig.empty()) { - sysDefID=fmt::sprintf("%s%s/%d",i.name,sysDefIDLeader,index); + sysDefID=fmt::sprintf("%s%s/%d",_(i.name.c_str()),sysDefIDLeader,index); if (ImGui::Selectable(sysDefID.c_str(),false,ImGuiSelectableFlags_DontClosePopups)) { nextDesc=i.definition; nextDescName=i.name; diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index c32171161..0a658a4e2 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -1282,116 +1282,120 @@ void FurnaceGUI::drawPattern() { memset(floors,0,4*4*sizeof(unsigned int)); for (int i=0; icurSubSong->chanShow[i]) { - continue; - } + std::vector pairs; + e->getChanPaired(i,pairs); - DivChannelPair pairs=e->getChanPaired(i); - for (int j=0; j<8; j++) { - if (pairs.pairs[j]==-1) continue; - int pairCh=e->dispatchFirstChan[i]+pairs.pairs[j]; - if (!e->curSubSong->chanShow[pairCh]) { + for (DivChannelPair pair: pairs) { + bool isPaired=false; + int numPairs=0; + unsigned int pairMin=i; + unsigned int pairMax=i; + unsigned char curFloor=0; + if (!e->curSubSong->chanShow[i]) { continue; } - isPaired=true; - if ((unsigned int)pairChpairMax) pairMax=pairCh; - } - if (!isPaired) continue; - - float posY=chanHeadBottom; - - // find a free floor - while (curFloor<4) { - bool free=true; - for (unsigned int j=pairMin; j<=pairMax; j++) { - const unsigned int j0=j>>5; - const unsigned int j1=1U<<(j&31); - if (floors[curFloor][j0]&j1) { - free=false; - break; + for (int j=0; j<8; j++) { + if (pair.pairs[j]==-1) continue; + int pairCh=e->dispatchFirstChan[i]+pair.pairs[j]; + if (!e->curSubSong->chanShow[pairCh]) { + continue; } - } - if (free) break; - curFloor++; - } - if (curFloor<4) { - // occupy floor - floors[curFloor][pairMin>>5]|=1U<<(pairMin&31); - floors[curFloor][pairMax>>5]|=1U<<(pairMax&31); - } - - pos=(patChanX[i+1]+patChanX[i])*0.5; - posCenter=pos; - posMin=pos; - posMax=pos; - numPairs++; - - if (pairs.label==NULL) { - textSize=ImGui::CalcTextSize("???"); - } else { - textSize=ImGui::CalcTextSize(pairs.label); - } - - posY+=(textSize.y+ImGui::GetStyle().ItemSpacing.y)*curFloor; - - tdl->AddLine( - ImVec2(pos,chanHeadBottom), - ImVec2(pos,posY+textSize.y), - ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), - 2.0f*dpiScale - ); - - for (int j=0; j<8; j++) { - if (pairs.pairs[j]==-1) continue; - int pairCh=e->dispatchFirstChan[i]+pairs.pairs[j]; - if (!e->curSubSong->chanShow[pairCh]) { - continue; + isPaired=true; + if ((unsigned int)pairChpairMax) pairMax=pairCh; } - pos=(patChanX[pairCh+1]+patChanX[pairCh])*0.5; - posCenter+=pos; + if (!isPaired) continue; + + float posY=chanHeadBottom; + + // find a free floor + while (curFloor<4) { + bool free=true; + for (unsigned int j=pairMin; j<=pairMax; j++) { + const unsigned int j0=j>>5; + const unsigned int j1=1U<<(j&31); + if (floors[curFloor][j0]&j1) { + free=false; + break; + } + } + if (free) break; + curFloor++; + } + if (curFloor<4) { + // occupy floor + floors[curFloor][pairMin>>5]|=1U<<(pairMin&31); + floors[curFloor][pairMax>>5]|=1U<<(pairMax&31); + } + + pos=(patChanX[i+1]+patChanX[i])*0.5; + posCenter=pos; + posMin=pos; + posMax=pos; numPairs++; - if (posposMax) posMax=pos; + + if (pair.label==NULL) { + textSize=ImGui::CalcTextSize("???"); + } else { + textSize=ImGui::CalcTextSize(pair.label); + } + + posY+=(textSize.y+ImGui::GetStyle().ItemSpacing.y)*curFloor; + tdl->AddLine( ImVec2(pos,chanHeadBottom), ImVec2(pos,posY+textSize.y), ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), 2.0f*dpiScale ); - } - posCenter/=numPairs; + for (int j=0; j<8; j++) { + if (pair.pairs[j]==-1) continue; + int pairCh=e->dispatchFirstChan[i]+pair.pairs[j]; + if (!e->curSubSong->chanShow[pairCh]) { + continue; + } - if (pairs.label==NULL) { - tdl->AddLine( - ImVec2(posMin,posY+textSize.y), - ImVec2(posMax,posY+textSize.y), - ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), - 2.0f*dpiScale - ); - } else { - tdl->AddLine( - ImVec2(posMin,posY+textSize.y), - ImVec2(posCenter-textSize.x*0.5-6.0f*dpiScale,posY+textSize.y), - ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), - 2.0f*dpiScale - ); - tdl->AddLine( - ImVec2(posCenter+textSize.x*0.5+6.0f*dpiScale,posY+textSize.y), - ImVec2(posMax,posY+textSize.y), - ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), - 2.0f*dpiScale - ); + pos=(patChanX[pairCh+1]+patChanX[pairCh])*0.5; + posCenter+=pos; + numPairs++; + if (posposMax) posMax=pos; + tdl->AddLine( + ImVec2(pos,chanHeadBottom), + ImVec2(pos,posY+textSize.y), + ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), + 2.0f*dpiScale + ); + } - delayedLabels.push_back(DelayedLabel(posCenter,posY,textSize,pairs.label)); + posCenter/=numPairs; + + if (pair.label==NULL) { + tdl->AddLine( + ImVec2(posMin,posY+textSize.y), + ImVec2(posMax,posY+textSize.y), + ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), + 2.0f*dpiScale + ); + } else { + tdl->AddLine( + ImVec2(posMin,posY+textSize.y), + ImVec2(posCenter-textSize.x*0.5-6.0f*dpiScale,posY+textSize.y), + ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), + 2.0f*dpiScale + ); + tdl->AddLine( + ImVec2(posCenter+textSize.x*0.5+6.0f*dpiScale,posY+textSize.y), + ImVec2(posMax,posY+textSize.y), + ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]), + 2.0f*dpiScale + ); + + delayedLabels.push_back(DelayedLabel(posCenter,posY,textSize,pair.label)); + } } } diff --git a/src/gui/plot_nolerp.cpp b/src/gui/plot_nolerp.cpp index aa57f0da7..b34fea008 100644 --- a/src/gui/plot_nolerp.cpp +++ b/src/gui/plot_nolerp.cpp @@ -185,7 +185,7 @@ void PlotNoLerp(const char* label, const float* values, int values_count, int va PlotNoLerpEx(ImGuiPlotType_Lines, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); } -int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 frame_size, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color) +int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 frame_size, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser) { ImGuiContext& g = *GImGui; ImGuiWindow* window = ImGui::GetCurrentWindow(); @@ -225,8 +225,18 @@ int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), const int v_idx = (int)(t * item_count); IM_ASSERT(v_idx >= 0 && v_idx < values_count); - //const float v0 = values_getter(data, (v_idx + values_offset) % values_count); + const float v0 = values_getter(data, (v_idx + values_offset) % values_count); //ImGui::SetTooltip("%d: %8.4g", v_idx, v0); + + if (hoverFunc) { + std::string hoverText=hoverFunc(v_idx,v0,hoverFuncUser); + if (!hoverText.empty()) { + ImGui::SetTooltip("%s",hoverText.c_str()); + } + } else { + ImGui::SetTooltip("%d: %d (%X)", v_idx, (int)v0, (int)v0); + } + idx_hovered = v_idx; } @@ -290,10 +300,10 @@ int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), return idx_hovered; } -void PlotBitfield(const char* label, const int* values, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 graph_size, int stride, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color) +void PlotBitfield(const char* label, const int* values, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 graph_size, int stride, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser) { FurnacePlotIntArrayGetterData data(values, stride); - PlotBitfieldEx(label, &Plot_IntArrayGetter, (void*)&data, values_count, values_offset, overlay_text, bits, graph_size, values_highlight, highlightColor, color); + PlotBitfieldEx(label, &Plot_IntArrayGetter, (void*)&data, values_count, values_offset, overlay_text, bits, graph_size, values_highlight, highlightColor, color, hoverFunc, hoverFuncUser); } int PlotCustomEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_display_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 frame_size, ImVec4 color, int highlight, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser, bool blockMode, std::string (*guideFunc)(float), const bool* values_highlight, ImVec4 highlightColor) diff --git a/src/gui/plot_nolerp.h b/src/gui/plot_nolerp.h index 89cfe8573..e6fdad41e 100644 --- a/src/gui/plot_nolerp.h +++ b/src/gui/plot_nolerp.h @@ -21,5 +21,5 @@ #include "../pch.h" void PlotNoLerp(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float)); -void PlotBitfield(const char* label, const int* values, int values_count, int values_offset = 0, const char** overlay_text = NULL, int bits = 8, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f), ImVec4 color = ImVec4(1.0f,1.0f,1.0f,1.0f)); +void PlotBitfield(const char* label, const int* values, int values_count, int values_offset = 0, const char** overlay_text = NULL, int bits = 8, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f), ImVec4 color = ImVec4(1.0f,1.0f,1.0f,1.0f), std::string (*hoverFunc)(int,float,void*) = NULL, void* hoverFuncUser = NULL); void PlotCustom(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), ImVec4 fgColor = ImVec4(1.0f,1.0f,1.0f,1.0f), int highlight = 0, std::string (*hoverFunc)(int,float,void*) = NULL, void* hoverFuncUser=NULL, bool blockMode=false, std::string (*guideFunc)(float) = NULL, const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f)); diff --git a/src/gui/presets.cpp b/src/gui/presets.cpp index 85cf9ba58..cfb13973a 100644 --- a/src/gui/presets.cpp +++ b/src/gui/presets.cpp @@ -52,39 +52,39 @@ void FurnaceGUI::initSystemPresets() { FurnaceGUISysCategory cat; - CATEGORY_BEGIN("Game consoles","let's play some chiptune making games!"); + CATEGORY_BEGIN(_("Game consoles"),_("let's play some chiptune making games!")); ENTRY( - "Sega Genesis", { + _("Sega Genesis"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); SUB_ENTRY( - "Sega Genesis (extended channel 3)", { + _("Sega Genesis (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); SUB_ENTRY( - "Sega Genesis (CSM)", { + _("Sega Genesis (CSM)"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); SUB_ENTRY( - "Sega Genesis (DualPCM)", { + _("Sega Genesis (DualPCM)"), { CH(DIV_SYSTEM_YM2612_DUALPCM, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); SUB_ENTRY( - "Sega Genesis (DualPCM, extended channel 3)", { + _("Sega Genesis (DualPCM, extended channel 3)"), { CH(DIV_SYSTEM_YM2612_DUALPCM_EXT, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); SUB_ENTRY( - "Sega Genesis (with Sega CD)", { + _("Sega Genesis (with Sega CD)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, ""), CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -94,7 +94,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega Genesis (extended channel 3 with Sega CD)", { + _("Sega Genesis (extended channel 3 with Sega CD)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, ""), CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -104,7 +104,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega Genesis (CSM with Sega CD)", { + _("Sega Genesis (CSM with Sega CD)"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, ""), CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -114,49 +114,49 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Sega Master System", { + _("Sega Master System"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "") } ); SUB_ENTRY( - "Sega Master System (with FM expansion)", { + _("Sega Master System (with FM expansion)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_OPLL, 1.0f, 0, "") } ); SUB_ENTRY( - "Sega Master System (with FM expansion in drums mode)", { + _("Sega Master System (with FM expansion in drums mode)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Sega Game Gear", { + _("Sega Game Gear"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=3") } ); ENTRY( - "Game Boy", { + _("Game Boy"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "") } ); ENTRY( - "Game Boy Advance", {} + _("Game Boy Advance"), {} ); SUB_ENTRY( - "Game Boy Advance (no software mixing)", { + _("Game Boy Advance (no software mixing)"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "chipType=3"), CH(DIV_SYSTEM_GBA_DMA, 0.5f, 0, ""), } ); SUB_ENTRY( - "Game Boy Advance (with MinMod)", { + _("Game Boy Advance (with MinMod)"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "chipType=3"), CH(DIV_SYSTEM_GBA_MINMOD, 0.5f, 0, ""), } ); ENTRY( - "Neo Geo Pocket", { + _("Neo Geo Pocket"), { CH(DIV_SYSTEM_T6W28, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, -1.0f, "rate=11025\n" @@ -169,130 +169,130 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "NEC PC Engine/TurboGrafx-16", { + _("NEC PC Engine/TurboGrafx-16"), { CH(DIV_SYSTEM_PCE, 1.0f, 0, "") } ); ENTRY( - "NES", { + _("NES"), { CH(DIV_SYSTEM_NES, 1.0f, 0, "") } ); SUB_ENTRY( - "Famicom with Konami VRC6", { + _("Famicom with Konami VRC6"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_VRC6, 1.0f, 0, "") } ); SUB_ENTRY( - "Famicom with Konami VRC7", { + _("Famicom with Konami VRC7"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_VRC7, 1.0f, 0, "") } ); SUB_ENTRY( - "Famicom with MMC5", { + _("Famicom with MMC5"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_MMC5, 1.0f, 0, "") } ); SUB_ENTRY( - "Famicom with Sunsoft 5B", { + _("Famicom with Sunsoft 5B"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=2") } ); SUB_ENTRY( - "Famicom with Namco 163", { + _("Famicom with Namco 163"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_N163, 1.0f, 0, "channels=7") } ); SUB_ENTRY( - "Famicom Disk System", { + _("Famicom Disk System"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_FDS, 1.0f, 0, "") } ); ENTRY( - "SNES", { + _("SNES"), { CH(DIV_SYSTEM_SNES, 1.0f, 0, "") } ); SUB_ENTRY( - "Super Game Boy", { + _("Super Game Boy"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "customClock=4295455"), CH(DIV_SYSTEM_SNES, 1.0f, 0, "") }, "tickRate=61.44697015935724" ); SUB_ENTRY( - "Super Game Boy 2", { + _("Super Game Boy 2"), { CH(DIV_SYSTEM_GB, 1.0f, 0, ""), CH(DIV_SYSTEM_SNES, 1.0f, 0, "") } ); ENTRY( - "Mattel Intellivision", { + _("Mattel Intellivision"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=3") } ); ENTRY( - "Vectrex", { + _("Vectrex"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=4") } ); ENTRY( - "Neo Geo AES", { + _("Neo Geo AES"), { CH(DIV_SYSTEM_YM2610_FULL, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "Neo Geo AES (extended channel 2)", { + _("Neo Geo AES (extended channel 2)"), { CH(DIV_SYSTEM_YM2610_FULL_EXT, 1.0f, 0, "clockSel=1") } ); ENTRY( - "Atari 2600/7800", { + _("Atari 2600/7800"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari 2600/7800 (with software pitch driver)", { + _("Atari 2600/7800 (with software pitch driver)"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, "softwarePitch=1") } ); ENTRY( - "Atari 7800 + Ballblazer/Commando", { + _("Atari 7800 + Ballblazer/Commando"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, ""), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari 7800 (with software pitch driver) + Ballblazer/Commando", { + _("Atari 7800 (with software pitch driver) + Ballblazer/Commando"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, "softwarePitch=1"), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "") } ); ENTRY( - "Atari Lynx", { + _("Atari Lynx"), { CH(DIV_SYSTEM_LYNX, 1.0f, 0, "") } ); ENTRY( - "WonderSwan", { + _("WonderSwan"), { CH(DIV_SYSTEM_SWAN, 1.0f, 0, "") }, "tickRate=75.47169811320754716981" ); ENTRY( - "Virtual Boy", { + _("Virtual Boy"), { CH(DIV_SYSTEM_VBOY, 1.0f, 0, "") }, "tickRate=50.2734877734878" ); ENTRY( - "Gamate", { + _("Gamate"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=9\n" "chipType=0\n" @@ -301,22 +301,22 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Pokémon Mini", { + _("Pokémon Mini"), { CH(DIV_SYSTEM_POKEMINI, 0.5f, 0, "") } ); ENTRY( - "Tiger Game.com", { + _("Tiger Game.com"), { CH(DIV_SYSTEM_SM8521, 1.0f, 0, "") } ); ENTRY( - "Casio PV-1000", { + _("Casio PV-1000"), { CH(DIV_SYSTEM_PV1000, 1.0f, 0, "") } ); ENTRY( - "Nintendo DS", { + _("Nintendo DS"), { CH(DIV_SYSTEM_NDS, 1.0f, 0, "") } ); @@ -327,138 +327,138 @@ void FurnaceGUI::initSystemPresets() { ); CATEGORY_END; - CATEGORY_BEGIN("Computers","let's get to work on chiptune today."); + CATEGORY_BEGIN(_("Computers"),_("let's get to work on chiptune today.")); ENTRY( - "Commodore PET", { + _("Commodore PET"), { CH(DIV_SYSTEM_PET, 1.0f, 0, "") }, "tickRate=50" ); ENTRY( - "Commodore VIC-20", { + _("Commodore VIC-20"), { CH(DIV_SYSTEM_VIC20, 1.0f, 0, "clockSel=1") }, "tickRate=50" ); ENTRY( - "Commodore Plus/4", { + _("Commodore Plus/4"), { CH(DIV_SYSTEM_TED, 1.0f, 0, "") } ); ENTRY( - "Commodore 64 (SID)", {} + _("Commodore 64 (SID)"), {} ); SUB_ENTRY( - "Commodore 64 (6581 SID)", { + _("Commodore 64 (6581 SID)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (6581 SID + Sound Expander)", { + _("Commodore 64 (6581 SID + Sound Expander)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (6581 SID + Sound Expander in drums mode)", { + _("Commodore 64 (6581 SID + Sound Expander in drums mode)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (6581 SID + FM-YAM)", { + _("Commodore 64 (6581 SID + FM-YAM)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (6581 SID + FM-YAM in drums mode)", { + _("Commodore 64 (6581 SID + FM-YAM in drums mode)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_ENTRY( - "Commodore 64 (8580 SID)", { + _("Commodore 64 (8580 SID)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (8580 SID + Sound Expander)", { + _("Commodore 64 (8580 SID + Sound Expander)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (8580 SID + Sound Expander in drums mode)", { + _("Commodore 64 (8580 SID + Sound Expander in drums mode)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (8580 SID + FM-YAM)", { + _("Commodore 64 (8580 SID + FM-YAM)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "") }, "tickRate=50.1245421" ); SUB_SUB_ENTRY( - "Commodore 64 (8580 SID + FM-YAM in drums mode)", { + _("Commodore 64 (8580 SID + FM-YAM in drums mode)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "") }, "tickRate=50.1245421" ); ENTRY( - "Amiga", { + _("Amiga"), { CH(DIV_SYSTEM_AMIGA, 1.0f, 0, "clockSel=1") }, "tickRate=50" ); ENTRY( - "MSX", { + _("MSX"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=0\nchipType=1") } ); SUB_ENTRY( - "MSX + SFG-01", { + _("MSX + SFG-01"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_YM2151, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + MSX-AUDIO", { + _("MSX + MSX-AUDIO"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_Y8950, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + MSX-AUDIO (drums mode)", { + _("MSX + MSX-AUDIO (drums mode)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + MSX-MUSIC", { + _("MSX + MSX-MUSIC"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_OPLL, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + MSX-MUSIC (drums mode)", { + _("MSX + MSX-MUSIC (drums mode)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + Darky", { + _("MSX + Darky"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_AY8930, 1.0f, 0, "clockSel=11\n" @@ -472,7 +472,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "MSX + Playsoniq", { + _("MSX + Playsoniq"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), // Sega VDP CH(DIV_SYSTEM_C64_8580, 1.0f, 0, ""), @@ -480,43 +480,43 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "MSX + SCC", { + _("MSX + SCC"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_SCC, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + SCC+", { + _("MSX + SCC+"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_SCC_PLUS, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + Neotron", { + _("MSX + Neotron"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_YM2610_FULL, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + Neotron (extended channel 2)", { + _("MSX + Neotron (extended channel 2)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_YM2610_FULL_EXT, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + Neotron (with YM2610B)", { + _("MSX + Neotron (with YM2610B)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_YM2610B, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + Neotron (with YM2610B; extended channel 3)", { + _("MSX + Neotron (with YM2610B; extended channel 3)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_YM2610B_EXT, 1.0f, 0, "") } ); SUB_ENTRY( - "MSX + SIMPL", { + _("MSX + SIMPL"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=55930\n" @@ -524,53 +524,65 @@ void FurnaceGUI::initSystemPresets() { ) // variable rate, Mono DAC } ); + SUB_ENTRY( + "MSX + MoonSound", { + CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), + CH(DIV_SYSTEM_OPL4, 1.0f, 0, "") + } + ); + SUB_ENTRY( + "MSX + MoonSound (drums mode)", { + CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), + CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "") + } + ); ENTRY( - "NEC PC-6001", { + _("NEC PC-6001"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "customClock=3993600") } ); ENTRY( - "NEC PC-88", {} + _("NEC PC-88"), {} ); SUB_ENTRY( - "NEC PC-88 (with PC-8801-10)", { + _("NEC PC-88 (with PC-8801-10)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15"), // external CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15") // "" } ); SUB_ENTRY( - "NEC PC-88 (with PC-8801-11)", { + _("NEC PC-88 (with PC-8801-11)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-88 (with PC-8801-11; extended channel 3)", { + _("NEC PC-88 (with PC-8801-11; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-88 (with PC-8801-23)", { + _("NEC PC-88 (with PC-8801-23)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-88 (with PC-8801-23; extended channel 3)", { + _("NEC PC-88 (with PC-8801-23; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-88 (with HMB-20 HIBIKI-8800)", { + _("NEC PC-88 (with HMB-20 HIBIKI-8800)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") // external; 4.0000MHz } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-10)", { + _("NEC PC-8801mk2SR (with PC-8801-10)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15"), // external @@ -578,7 +590,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-10; extended channel 3)", { + _("NEC PC-8801mk2SR (with PC-8801-10; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15"), // external @@ -586,77 +598,77 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-11)", { + _("NEC PC-8801mk2SR (with PC-8801-11)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on internal OPN)", { + _("NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on internal OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on external OPN)", { + _("NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on external OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on both OPNs)", { + _("NEC PC-8801mk2SR (with PC-8801-11; extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-23)", { + _("NEC PC-8801mk2SR (with PC-8801-23)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on internal OPN)", { + _("NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on internal OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on external OPN)", { + _("NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on external OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on both OPNs)", { + _("NEC PC-8801mk2SR (with PC-8801-23; extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with HMB-20 HIBIKI-8800)", { + _("NEC PC-8801mk2SR (with HMB-20 HIBIKI-8800)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") // external; 4.0000MHz } ); SUB_ENTRY( - "NEC PC-8801mk2SR (with HMB-20 HIBIKI-8800; extended channel 3)", { + _("NEC PC-8801mk2SR (with HMB-20 HIBIKI-8800; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") // external; 4.0000MHz } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-10)", { + _("NEC PC-8801FA (with PC-8801-10)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15"), // external @@ -664,7 +676,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-10; extended channel 3)", { + _("NEC PC-8801FA (with PC-8801-10; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=4"), // internal CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=15"), // external @@ -672,148 +684,148 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-11)", { + _("NEC PC-8801FA (with PC-8801-11)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-11; extended channel 3 on internal OPN)", { + _("NEC PC-8801FA (with PC-8801-11; extended channel 3 on internal OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-11; extended channel 3 on external OPN)", { + _("NEC PC-8801FA (with PC-8801-11; extended channel 3 on external OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-11; extended channel 3 on both OPNs)", { + _("NEC PC-8801FA (with PC-8801-11; extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-23)", { + _("NEC PC-8801FA (with PC-8801-23)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-23; extended channel 3 on internal OPN)", { + _("NEC PC-8801FA (with PC-8801-23; extended channel 3 on internal OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-23; extended channel 3 on external OPN)", { + _("NEC PC-8801FA (with PC-8801-23; extended channel 3 on external OPN)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with PC-8801-23; extended channel 3 on both OPNs)", { + _("NEC PC-8801FA (with PC-8801-23; extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1") // external } ); SUB_ENTRY( - "NEC PC-8801FA (with HMB-20 HIBIKI-8800)", { + _("NEC PC-8801FA (with HMB-20 HIBIKI-8800)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") // external; 4.0000MHz } ); SUB_ENTRY( - "NEC PC-8801FA (with HMB-20 HIBIKI-8800; extended channel 3)", { + _("NEC PC-8801FA (with HMB-20 HIBIKI-8800; extended channel 3)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), // internal CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") // external; 4.0000MHz } ); ENTRY( - "NEC PC-98", {} + _("NEC PC-98"), {} ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-26/K)", { + _("NEC PC-98 (with PC-9801-26/K)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), // 3.9936MHz but some compatible card has 4MHz CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-26/K; extended channel 3)", { + _("NEC PC-98 (with PC-9801-26/K; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), // 3.9936MHz but some compatible card has 4MHz CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra)", { + _("NEC PC-98 (with Sound Orchestra)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra; extended channel 3)", { + _("NEC PC-98 (with Sound Orchestra; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra in drums mode)", { + _("NEC PC-98 (with Sound Orchestra in drums mode)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra in drums mode; extended channel 3)", { + _("NEC PC-98 (with Sound Orchestra in drums mode; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra V)", { + _("NEC PC-98 (with Sound Orchestra V)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra V; extended channel 3)", { + _("NEC PC-98 (with Sound Orchestra V; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra V in drums mode)", { + _("NEC PC-98 (with Sound Orchestra V in drums mode)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Orchestra V in drums mode; extended channel 3)", { + _("NEC PC-98 (with Sound Orchestra V in drums mode; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=4"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-86)", { // -73 also has OPNA + _("NEC PC-98 (with PC-9801-86)"), { // -73 also has OPNA CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, // 2x 16-bit Burr Brown DAC "rate=44100\n" @@ -827,7 +839,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-86; extended channel 3)", { // -73 also has OPNA + _("NEC PC-98 (with PC-9801-86; extended channel 3)"), { // -73 also has OPNA CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -841,7 +853,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-86) stereo", { // -73 also has OPNA + _("NEC PC-98 (with PC-9801-86) stereo"), { // -73 also has OPNA CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, -1.0f, // 2x 16-bit Burr Brown DAC "rate=44100\n" @@ -855,7 +867,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-86; extended channel 3) stereo", { // -73 also has OPNA + _("NEC PC-98 (with PC-9801-86; extended channel 3) stereo"), { // -73 also has OPNA CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, -1.0f, "rate=44100\n" @@ -869,19 +881,19 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-73)", { + _("NEC PC-98 (with PC-9801-73)"), { CH(DIV_SYSTEM_YM2608, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with PC-9801-73; extended channel 3)", { + _("NEC PC-98 (with PC-9801-73; extended channel 3)"), { CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible)", { + _("NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -893,7 +905,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible; extended channel 3)", { + _("NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -905,7 +917,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible in drums mode)", { + _("NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible in drums mode)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -917,7 +929,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible in drums mode; extended channel 3)", { + _("NEC PC-98 (with Sound Blaster 16 for PC-9800 w/PC-9801-26/K compatible in drums mode; extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -929,78 +941,78 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "ZX Spectrum (48K) beeper", {} + _("ZX Spectrum (48K) beeper"), {} ); SUB_ENTRY( - "ZX Spectrum (48K, SFX-like engine)", { + _("ZX Spectrum (48K, SFX-like engine)"), { CH(DIV_SYSTEM_SFX_BEEPER, 1.0f, 0, "") } ); SUB_ENTRY( - "ZX Spectrum (48K, QuadTone engine)", { + _("ZX Spectrum (48K, QuadTone engine)"), { CH(DIV_SYSTEM_SFX_BEEPER_QUADTONE, 1.0f, 0, "") } ); ENTRY( - "ZX Spectrum (128K)", { + _("ZX Spectrum (128K)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1") //beeper was also included } ); SUB_ENTRY( - "ZX Spectrum (128K) with TurboSound FM", { + _("ZX Spectrum (128K) with TurboSound FM"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=1") } ); SUB_SUB_ENTRY( - "ZX Spectrum (128K) with TurboSound FM (extended channel 3 on first OPN)", { + _("ZX Spectrum (128K) with TurboSound FM (extended channel 3 on first OPN)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=1") } ); SUB_SUB_ENTRY( - "ZX Spectrum (128K) with TurboSound FM (extended channel 3 on second OPN)", { + _("ZX Spectrum (128K) with TurboSound FM (extended channel 3 on second OPN)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=1") } ); SUB_SUB_ENTRY( - "ZX Spectrum (128K) with TurboSound FM (extended channel 3 on both OPNs)", { + _("ZX Spectrum (128K) with TurboSound FM (extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=1") } ); SUB_ENTRY( - "ZX Spectrum (128K) with TurboSound", { + _("ZX Spectrum (128K) with TurboSound"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1"), // or YM2149 CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1") // or YM2149 } ); ENTRY( - "Amstrad CPC", { + _("Amstrad CPC"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=5") } ); ENTRY( - "Atari 800", { + _("Atari 800"), { CH(DIV_SYSTEM_POKEY, 1.0f, 0, "clockSel=1") }, "tickRate=50" ); SUB_ENTRY( - "Atari 800 (stereo)", { + _("Atari 800 (stereo)"), { CH(DIV_SYSTEM_POKEY, 1.0f, -1.0f, "clockSel=1"), CH(DIV_SYSTEM_POKEY, 1.0f, 1.0f, "clockSel=1"), }, "tickRate=50" ); ENTRY( - "Atari ST", { + _("Atari ST"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3\n" "chipType=1\n" @@ -1008,7 +1020,7 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Atari STE", { + _("Atari STE"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3\n" "chipType=1\n" @@ -1024,18 +1036,18 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "SAM Coupé", { + _("SAM Coupé"), { CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "") } ); ENTRY( - "Enterprise 128", { + _("Enterprise 128"), { CH(DIV_SYSTEM_DAVE, 1.0f, 0, "") }, "tickRate=50" ); ENTRY( - "BBC Micro", { + _("BBC Micro"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=2\n" "chipType=4\n" // SN76489A 4MHz @@ -1043,58 +1055,58 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "IBM PC", {} + _("IBM PC"), {} ); SUB_ENTRY( - "PC (barebones)", { + _("PC (barebones)"), { CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "IBM PCjr", { + _("IBM PCjr"), { // it can be enable sound output at once CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=5") // SN76496 } ); SUB_ENTRY( - "Tandy 1000", { + _("Tandy 1000"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=5"), // NCR 8496 or SN76496 or Tandy PSSJ (with 8 bit DAC) CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + Covox Sound Master", { + _("PC + Covox Sound Master"), { CH(DIV_SYSTEM_AY8930, 1.0f, 0, "clockSel=3"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + SSI 2001", { + _("PC + SSI 2001"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + Game Blaster", { + _("PC + Game Blaster"), { CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + AdLib", { + _("PC + AdLib"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + AdLib (drums mode)", { + _("PC + AdLib (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + Sound Blaster", { + _("PC + Sound Blaster"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1104,7 +1116,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster (drums mode)", { + _("PC + Sound Blaster (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1114,7 +1126,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster w/Game Blaster Compatible", { + _("PC + Sound Blaster w/Game Blaster Compatible"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), @@ -1126,7 +1138,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster w/Game Blaster Compatible (drums mode)", { + _("PC + Sound Blaster w/Game Blaster Compatible (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), @@ -1138,7 +1150,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster Pro", { + _("PC + Sound Blaster Pro"), { CH(DIV_SYSTEM_OPL2, 1.0f, -1.0f, ""), CH(DIV_SYSTEM_OPL2, 1.0f, 1.0f, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1150,7 +1162,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster Pro (drums mode)", { + _("PC + Sound Blaster Pro (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, -1.0f, ""), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 1.0f, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1162,7 +1174,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster Pro 2", { + _("PC + Sound Blaster Pro 2"), { CH(DIV_SYSTEM_OPL3, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -1173,7 +1185,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + Sound Blaster Pro 2 (drums mode)", { + _("PC + Sound Blaster Pro 2 (drums mode)"), { CH(DIV_SYSTEM_OPL3_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -1184,7 +1196,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + ESS AudioDrive ES1488 (native ESFM mode)", { + _("PC + ESS AudioDrive ES1488 (native ESFM mode)"), { CH(DIV_SYSTEM_ESFM, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=44100\n" @@ -1195,13 +1207,13 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "PC + PC-FXGA", { + _("PC + PC-FXGA"), { CH(DIV_SYSTEM_PCE, 1.0f, 0, ""), // HuC6230 (WSG from HuC6280 but with built in 2 OKI ADPCM playback engines) CH(DIV_SYSTEM_PCSPKR, 1.0f, 0, "") } ); SUB_ENTRY( - "PC + SAAYM", { + _("PC + SAAYM"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz or 4MHz selectable via jumper CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), // 7.16MHz or 8MHz selectable via jumper CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "clockSel=1"), // "" @@ -1244,72 +1256,72 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Sharp X1", { + _("Sharp X1"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3") } ); SUB_ENTRY( - "Sharp X1 + FM Addon", { + _("Sharp X1 + FM Addon"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3"), CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2") } ); ENTRY( - "Sharp X68000", { + _("Sharp X68000"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_MSM6258, 1.0f, 0, "clockSel=2") } ); ENTRY( - "FM-7", { + _("FM-7"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=12"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5") } ); SUB_ENTRY( - "FM-7 (extended channel 3)", { + _("FM-7 (extended channel 3)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=12"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5") } ); ENTRY( - "FM Towns", { + _("FM Towns"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // YM3438 CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "") } ); SUB_ENTRY( - "FM Towns (extended channel 3)", { + _("FM Towns (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // YM3438 CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "") } ); SUB_ENTRY( - "FM Towns (CSM)", { + _("FM Towns (CSM)"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, "clockSel=2"), // YM3438 CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "") } ); ENTRY( - "Commander X16", { + _("Commander X16"), { CH(DIV_SYSTEM_VERA, 1.0f, 0, ""), CH(DIV_SYSTEM_YM2151, 1.0f, 0, "") } ); SUB_ENTRY( - "Commander X16 (VERA only)", { + _("Commander X16 (VERA only)"), { CH(DIV_SYSTEM_VERA, 1.0f, 0, "") } ); SUB_ENTRY( - "Commander X16 (with Twin OPL3)", { + _("Commander X16 (with Twin OPL3)"), { CH(DIV_SYSTEM_VERA, 1.0f, 0, ""), CH(DIV_SYSTEM_OPL3, 1.0f, 0, ""), CH(DIV_SYSTEM_OPL3, 1.0f, 0, "") } ); ENTRY( - "TI-99/4A", { + _("TI-99/4A"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=6\n" "chipType=8\n" // SN94624 447KHz @@ -1317,27 +1329,22 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Sord M5", { + _("Sord M5"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "customClock=1773447\n" "chipType=1\n" ) } ); - ENTRY( - "Epoch Super Cassette Vision", { - CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "") - } - ); CATEGORY_END; - CATEGORY_BEGIN("Arcade systems","INSERT COIN"); + CATEGORY_BEGIN(_("Arcade systems"),_("INSERT COIN")); // MANUFACTURERS ENTRY( - "Alpha Denshi", {} + _("Alpha Denshi"), {} ); SUB_ENTRY( - "Alpha Denshi Alpha-68K", { + _("Alpha Denshi Alpha-68K"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPLL, 1.0f, 0, "clockSel=0"), // 3.58MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1347,7 +1354,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Alpha Denshi Alpha-68K (extended channel 3)", { + _("Alpha Denshi Alpha-68K (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPLL, 1.0f, 0, "clockSel=0"), // 3.58MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1357,7 +1364,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Alpha Denshi Alpha-68K (drums mode)", { + _("Alpha Denshi Alpha-68K (drums mode)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "clockSel=0"), // 3.58MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1367,7 +1374,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Alpha Denshi Alpha-68K (extended channel 3; drums mode)", { + _("Alpha Denshi Alpha-68K (extended channel 3; drums mode)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "clockSel=0"), // 3.58MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1377,7 +1384,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Alpha Denshi Equites", { + _("Alpha Denshi Equites"), { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, "customClock=6144000"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=14"), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1392,58 +1399,53 @@ void FurnaceGUI::initSystemPresets() { ); ENTRY( - "Atari", {} + _("Atari"), {} ); SUB_ENTRY( - "Pong", { - CH(DIV_SYSTEM_PONG, 1.0f, 0, "") - } - ); - SUB_ENTRY( - "Atari Klax", { + _("Atari Klax"), { CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=7") // 0.895MHz (3.579545MHz / 4) } ); SUB_ENTRY( - "Atari Rampart", { + _("Atari Rampart"), { CH(DIV_SYSTEM_OPLL, 1.0f, 0, ""), // 3.579545MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=14") // 1.193MHz (3.579545MHz / 3) } ); SUB_ENTRY( - "Atari Rampart (drums mode)", { + _("Atari Rampart (drums mode)"), { CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, ""), // 3.579545MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=14") // 1.193MHz (3.579545MHz / 3) } ); SUB_ENTRY( - "Atari JSA IIIs", { + _("Atari JSA IIIs"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.579545MHz CH(DIV_SYSTEM_MSM6295, 1.0f, -1.0f, "clockSel=14"), // 1.193MHz (3.579545MHz / 3), Left output CH(DIV_SYSTEM_MSM6295, 1.0f, 1.0f, "clockSel=14") // 1.193MHz (3.579545MHz / 3), Right output } ); SUB_ENTRY( - "Atari Marble Madness", { + _("Atari Marble Madness"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari Championship Sprint", { + _("Atari Championship Sprint"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_POKEY, 1.0f, 0, ""), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari Tetris", { + _("Atari Tetris"), { CH(DIV_SYSTEM_POKEY, 1.0f, 0, ""), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari I, Robot", { + _("Atari I, Robot"), { CH(DIV_SYSTEM_POKEY, 1.0f, 0, "customClock=1512000"), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "customClock=1512000"), CH(DIV_SYSTEM_POKEY, 1.0f, 0, "customClock=1512000"), @@ -1452,10 +1454,10 @@ void FurnaceGUI::initSystemPresets() { ); ENTRY( - "Capcom", {} + _("Capcom"), {} ); SUB_ENTRY( - "Capcom Exed Exes", { + _("Capcom Exed Exes"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=4"), // 1.5MHz CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=4\n" @@ -1468,112 +1470,112 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Capcom Arcade", { // 1943, Side arms, etc + _("Capcom Arcade"), { // 1943, Side arms, etc CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 4 or 1.5MHz; various per games CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5") } ); SUB_ENTRY( - "Capcom Arcade (extended channel 3 on first OPN)", { + _("Capcom Arcade (extended channel 3 on first OPN)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5") } ); SUB_ENTRY( - "Capcom Arcade (extended channel 3 on second OPN)", { + _("Capcom Arcade (extended channel 3 on second OPN)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5") } ); SUB_ENTRY( - "Capcom Arcade (extended channel 3 on both OPNs)", { + _("Capcom Arcade (extended channel 3 on both OPNs)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5") } ); SUB_ENTRY( - "Capcom CPS-1", { + _("Capcom CPS-1"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") } ); SUB_ENTRY( - "Capcom CPS-2 (QSound)", { + _("Capcom CPS-2 (QSound)"), { CH(DIV_SYSTEM_QSOUND, 1.0f, 0, "") } ); ENTRY( - "Data East", {} + _("Data East"), {} ); SUB_ENTRY( - "Data East Karnov", { + _("Data East Karnov"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=3") // 3MHz } ); SUB_ENTRY( - "Data East Karnov (extended channel 3)", { + _("Data East Karnov (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=3") // 3MHz } ); SUB_ENTRY( - "Data East Karnov (drums mode)", { + _("Data East Karnov (drums mode)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=3") // 3MHz } ); SUB_ENTRY( - "Data East Karnov (extended channel 3; drums mode)", { + _("Data East Karnov (extended channel 3; drums mode)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=3") // 3MHz } ); SUB_ENTRY( - "Data East Arcade", { // Bad Dudes, RoboCop, etc + _("Data East Arcade"), { // Bad Dudes, RoboCop, etc CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 to 1.056MHz; various per games or optional } ); SUB_ENTRY( - "Data East Arcade (extended channel 3)", { // Bad Dudes, RoboCop, etc + _("Data East Arcade (extended channel 3)"), { // Bad Dudes, RoboCop, etc CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 to 1.056MHz; various per games or optional } ); SUB_ENTRY( - "Data East Arcade (drums mode)", { // Bad Dudes, RoboCop, etc + _("Data East Arcade (drums mode)"), { // Bad Dudes, RoboCop, etc CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 to 1.056MHz; various per games or optional } ); SUB_ENTRY( - "Data East Arcade (extended channel 3; drums mode)", { // Bad Dudes, RoboCop, etc + _("Data East Arcade (extended channel 3; drums mode)"), { // Bad Dudes, RoboCop, etc CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 to 1.056MHz; various per games or optional } ); SUB_ENTRY( - "Data East PCX", { + _("Data East PCX"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_PCE, 1.0f, 0, "") // software controlled MSM5205 } ); SUB_ENTRY( - "Data East PCX (extended channel 3)", { + _("Data East PCX (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz CH(DIV_SYSTEM_PCE, 1.0f, 0, "") // software controlled MSM5205 } ); SUB_ENTRY( - "Data East Dark Seal", { // Dark Seal, Crude Buster, Vapor Trail, etc + _("Data East Dark Seal"), { // Dark Seal, Crude Buster, Vapor Trail, etc CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.580MHz (32.22MHz / 9) CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4.0275MHz (32.22MHz / 8); optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, ""), // 1.007MHz (32.22MHz / 32) @@ -1582,7 +1584,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Data East Dark Seal (extended channel 3)", { // Dark Seal, Crude Buster, Vapor Trail, etc + _("Data East Dark Seal (extended channel 3)"), { // Dark Seal, Crude Buster, Vapor Trail, etc CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.580MHz (32.22MHz / 9) CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4.0275MHz (32.22MHz / 8); optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, ""), // 1.007MHz (32.22MHz / 32) @@ -1591,22 +1593,22 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Data East Deco 156", { + _("Data East Deco 156"), { CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=0"), // 1 or 1.007MHz (32.22MHz / 32); various per games CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=8") // 1 or 2 or 2.014MHz (32.22MHz / 16); various per games } ); SUB_ENTRY( - "Data East MLC", { + _("Data East MLC"), { CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "clockSel=5") // 14MHz } ); ENTRY( - "Irem", {} + _("Irem"), {} ); SUB_ENTRY( - "Irem M72", { + _("Irem M72"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=7812\n" @@ -1615,29 +1617,29 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Irem M92/M107", { + _("Irem M92/M107"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_GA20, 1.0f, 0, "") } ); ENTRY( - "Jaleco", {} + _("Jaleco"), {} ); SUB_ENTRY( - "Jaleco Ginga NinkyouDen", { + _("Jaleco Ginga NinkyouDen"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), // 1.79MHz CH(DIV_SYSTEM_Y8950, 1.0f, 0, "") // 3.58MHz } ); SUB_ENTRY( - "Jaleco Ginga NinkyouDen (drums mode)", { + _("Jaleco Ginga NinkyouDen (drums mode)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1"), // 1.79MHz CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "") // 3.58MHz } ); SUB_ENTRY( - "Jaleco Mega System 1", { + _("Jaleco Mega System 1"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=1"), // 3.5MHz (7MHz / 2) CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2") // 4MHz @@ -1645,24 +1647,24 @@ void FurnaceGUI::initSystemPresets() { ); ENTRY( - "Kaneko", {} + _("Kaneko"), {} ); SUB_ENTRY( - "Kaneko DJ Boy", { + _("Kaneko DJ Boy"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, -1.0f, "clockSel=12"), // 1.5MHz, Left output CH(DIV_SYSTEM_MSM6295, 1.0f, 1.0f, "clockSel=12"), // 1.5MHz, Right output } ); SUB_ENTRY( - "Kaneko DJ Boy (extended channel 3)", { + _("Kaneko DJ Boy (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, -1.0f, "clockSel=12"), // 1.5MHz, Left output CH(DIV_SYSTEM_MSM6295, 1.0f, 1.0f, "clockSel=12") // 1.5MHz, Right output } ); SUB_ENTRY( - "Kaneko Air Buster", { + _("Kaneko Air Buster"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=13\n" @@ -1671,7 +1673,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Kaneko Air Buster (extended channel 3)", { + _("Kaneko Air Buster (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=13\n" @@ -1680,7 +1682,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Kaneko Toybox System", { + _("Kaneko Toybox System"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3\n" "chipType=1\n" @@ -1693,21 +1695,21 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Kaneko Jackie Chan", { + _("Kaneko Jackie Chan"), { CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "clockSel=3") // 16MHz } ); SUB_ENTRY( - "Super Kaneko Nova System", { + _("Super Kaneko Nova System"), { CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "clockSel=4") // 16.67MHz (33.33MHz / 2) } ); ENTRY( - "Konami", {} + _("Konami"), {} ); SUB_ENTRY( - "Konami Gyruss", { + _("Konami Gyruss"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), @@ -1717,7 +1719,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Konami Bubble System", { + _("Konami Bubble System"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), CH(DIV_SYSTEM_BUBSYS_WSG, 1.0f, 0, "") @@ -1725,152 +1727,152 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Konami MX5000", { + _("Konami MX5000"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Battlantis", { + _("Konami Battlantis"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3") // "" } ); SUB_ENTRY( - "Konami Battlantis (drums mode on first OPL2)", { + _("Konami Battlantis (drums mode on first OPL2)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3") // "" } ); SUB_ENTRY( - "Konami Battlantis (drums mode on second OPL2)", { + _("Konami Battlantis (drums mode on second OPL2)"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3") // "" } ); SUB_ENTRY( - "Konami Battlantis (drums mode on both OPL2s)", { + _("Konami Battlantis (drums mode on both OPL2s)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3"), // 3MHz CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=3") // "" } ); SUB_ENTRY( - "Konami Fast Lane", { + _("Konami Fast Lane"), { CH(DIV_SYSTEM_K007232, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Chequered Flag", { + _("Konami Chequered Flag"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, "stereo=true"), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Haunted Castle", { + _("Konami Haunted Castle"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_SCC, 1.0f, 0, ""), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Haunted Castle (drums mode)", { + _("Konami Haunted Castle (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_SCC, 1.0f, 0, ""), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Hot Chase", { + _("Konami Hot Chase"), { CH(DIV_SYSTEM_K007232, 1.0f, 0, "stereo=true"), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, "stereo=true"), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "stereo=true") // "" } ); SUB_ENTRY( - "Konami S.P.Y.", { + _("Konami S.P.Y."), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, ""), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami S.P.Y. (drums mode)", { + _("Konami S.P.Y. (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K007232, 1.0f, 0, ""), // "" CH(DIV_SYSTEM_K007232, 1.0f, 0, "") // "" } ); SUB_ENTRY( - "Konami Rollergames", { + _("Konami Rollergames"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // "" } ); SUB_ENTRY( - "Konami Rollergames (drums mode)", { + _("Konami Rollergames (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // "" } ); SUB_ENTRY( - "Konami Golfing Greats", { + _("Konami Golfing Greats"), { CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // 3.58MHz } ); SUB_ENTRY( - "Konami Lightning Fighters", { + _("Konami Lightning Fighters"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // "" } ); SUB_ENTRY( - "Konami Over Drive", { + _("Konami Over Drive"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), // 3.58MHz CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // "" CH(DIV_SYSTEM_K053260, 1.0f, 0, ""), // "" } ); SUB_ENTRY( - "Konami Asterix", { + _("Konami Asterix"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_K053260, 1.0f, 0, "clockSel=1"), // "" } ); SUB_ENTRY( - "Konami Hexion", { + _("Konami Hexion"), { CH(DIV_SYSTEM_SCC, 1.0f, 0, "clockSel=2"), // 1.5MHz (3MHz input) CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=1") } ); ENTRY( - "Namco", {} + _("Namco"), {} ); SUB_ENTRY( - "Namco (3-channel WSG)", { // Pac-Man, Galaga, Xevious, etc + _("Namco (3-channel WSG)"), { // Pac-Man, Galaga, Xevious, etc CH(DIV_SYSTEM_NAMCO, 1.0f, 0, "") } ); SUB_ENTRY( - "Namco Mappy", { // Mappy, Super Pac-Man, Libble Rabble, etc + _("Namco Mappy"), { // Mappy, Super Pac-Man, Libble Rabble, etc CH(DIV_SYSTEM_NAMCO_15XX, 1.0f, 0, "") } ); SUB_ENTRY( - "Namco Pac-Land", { // Pac-Land, Baraduke, Sky kid, etc + _("Namco Pac-Land"), { // Pac-Land, Baraduke, Sky kid, etc CH(DIV_SYSTEM_NAMCO_CUS30, 1.0f, 0, "") } ); SUB_ENTRY( - "Namco System 86", { // without expansion board case; Hopping Mappy, etc + _("Namco System 86"), { // without expansion board case; Hopping Mappy, etc CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_NAMCO_CUS30, 1.0f, 0, "") } ); SUB_ENTRY( - "Namco Thunder Ceptor", { + _("Namco Thunder Ceptor"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_NAMCO_CUS30, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1880,7 +1882,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Namco System 1", { + _("Namco System 1"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_NAMCO_CUS30, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -1894,28 +1896,52 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Namco System 2", { + _("Namco System 2"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_C140, 1.0f, 0, "") } ); SUB_ENTRY( - "Namco NA-1/2", { + _("Namco NA-1/2"), { CH(DIV_SYSTEM_C219, 1.0f, 0, "") } ); ENTRY( - "Sega", {} + _("Psikyo"), {} ); SUB_ENTRY( - "Sega Kyugo", { + _("Psikyo 68EC020 hardware with OPL4"), { + CH(DIV_SYSTEM_OPL4, 1.0f, 0, "") + } + ); + SUB_ENTRY( + _("Psikyo 68EC020 hardware with OPL4 (drums mode)"), { + CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "") + } + ); + SUB_ENTRY( + _("Psikyo SH-2 hardware"), { + CH(DIV_SYSTEM_OPL4, 1.0f, 0, "clockSel=1") + } + ); + SUB_ENTRY( + _("Psikyo SH-2 hardware (drums mode)"), { + CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "clockSel=1") + } + ); + + ENTRY( + _("Sega"), {} + ); + SUB_ENTRY( + _("Sega Kyugo"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=14"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=14") } ); SUB_ENTRY( - "Sega System 1", { + _("Sega System 1"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=2\n" "chipType=4\n" @@ -1927,45 +1953,45 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega System E", { + _("Sega System E"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 1.0f, 0, "") } ); SUB_ENTRY( - "Sega System E (with FM expansion)", { + _("Sega System E (with FM expansion)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_OPLL, 1.0f, 0, "") } ); SUB_ENTRY( - "Sega System E (with FM expansion in drums mode)", { + _("Sega System E (with FM expansion in drums mode)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "") } ); SUB_ENTRY( - "Sega Hang-On", { + _("Sega Hang-On"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_SEGAPCM, 1.0f, 0, "") // discrete logics, 62.5KHz output rate } ); SUB_ENTRY( - "Sega Hang-On (extended channel 3)", { + _("Sega Hang-On (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_SEGAPCM, 1.0f, 0, "") // discrete logics, 62.5KHz output rate } ); SUB_ENTRY( - "Sega OutRun/X Board", { + _("Sega OutRun/X Board"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_SEGAPCM, 1.0f, 0, "") // ASIC, 31.25KHz output rate } ); SUB_ENTRY( - "Sega System 24", { + _("Sega System 24"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "rate=61500\n" @@ -1974,35 +2000,35 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega System 18", { + _("Sega System 18"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // discrete 8MHz YM3438 CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "clockSel=1") // 10MHz } ); SUB_ENTRY( - "Sega System 18 (extended channel 3 on first OPN2C)", { + _("Sega System 18 (extended channel 3 on first OPN2C)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // discrete 8MHz YM3438 CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "clockSel=1") // 10MHz } ); SUB_ENTRY( - "Sega System 18 (extended channel 3 on second OPN2C)", { + _("Sega System 18 (extended channel 3 on second OPN2C)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // discrete 8MHz YM3438 CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "clockSel=1") // 10MHz } ); SUB_ENTRY( - "Sega System 18 (extended channel 3 on both OPN2Cs)", { + _("Sega System 18 (extended channel 3 on both OPN2Cs)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // discrete 8MHz YM3438 CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "clockSel=1") // 10MHz } ); SUB_ENTRY( - "Sega System 32", { + _("Sega System 32"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=4"), // discrete 8.05MHz YM3438 CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=4"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -2012,7 +2038,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega System 32 (extended channel 3 on first OPN2C)", { + _("Sega System 32 (extended channel 3 on first OPN2C)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=4"), // discrete 8.05MHz YM3438 CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=4"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -2022,7 +2048,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega System 32 (extended channel 3 on second OPN2C)", { + _("Sega System 32 (extended channel 3 on second OPN2C)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=4"), // discrete 8.05MHz YM3438 CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=4"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -2032,7 +2058,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sega System 32 (extended channel 3 on both OPN2Cs)", { + _("Sega System 32 (extended channel 3 on both OPN2Cs)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=4"), // discrete 8.05MHz YM3438 CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=4"), // ^^ CH(DIV_SYSTEM_RF5C68, 1.0f, 0, @@ -2043,27 +2069,27 @@ void FurnaceGUI::initSystemPresets() { ); ENTRY( - "Seta", {} + _("Seta"), {} ); SUB_ENTRY( - "Seta 1", { + _("Seta 1"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, "") } ); SUB_ENTRY( - "Seta 1 + FM addon", { + _("Seta 1 + FM addon"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, ""), CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2") // Discrete YM3438 } ); SUB_ENTRY( - "Seta 1 + FM addon (extended channel 3)", { + _("Seta 1 + FM addon (extended channel 3)"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, ""), CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2") // Discrete YM3438 } ); SUB_ENTRY( - "Seta 2", { + _("Seta 2"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, "clockSel=1\n" "isBanked=true\n" @@ -2071,126 +2097,126 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sammy/Seta/Visco SSV", { + _("Sammy/Seta/Visco SSV"), { CH(DIV_SYSTEM_ES5506, 1.0f, 0, "channels=31") } ); ENTRY( - "SNK", {} + _("SNK"), {} ); SUB_ENTRY( - "Neo Geo MVS", { + _("Neo Geo MVS"), { CH(DIV_SYSTEM_YM2610_FULL, 1.0f, 0, "") } ); SUB_ENTRY( - "Neo Geo MVS (extended channel 2)", { + _("Neo Geo MVS (extended channel 2)"), { CH(DIV_SYSTEM_YM2610_FULL_EXT, 1.0f, 0, "") } ); SUB_ENTRY( - "SNK Ikari Warriors", { + _("SNK Ikari Warriors"), { CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Ikari Warriors (drums mode on first OPL)", { + _("SNK Ikari Warriors (drums mode on first OPL)"), { CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Ikari Warriors (drums mode on second OPL)", { + _("SNK Ikari Warriors (drums mode on second OPL)"), { CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Ikari Warriors (drums mode on both OPLs)", { + _("SNK Ikari Warriors (drums mode on both OPLs)"), { CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Triple Z80", { + _("SNK Triple Z80"), { CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Triple Z80 (drums mode on Y8950)", { + _("SNK Triple Z80 (drums mode on Y8950)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Triple Z80 (drums mode on OPL)", { + _("SNK Triple Z80 (drums mode on OPL)"), { CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Triple Z80 (drums mode on Y8950 and OPL)", { + _("SNK Triple Z80 (drums mode on Y8950 and OPL)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Chopper I", { + _("SNK Chopper I"), { CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Chopper I (drums mode on Y8950)", { + _("SNK Chopper I (drums mode on Y8950)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Chopper I (drums mode on OPL2)", { + _("SNK Chopper I (drums mode on OPL2)"), { CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Chopper I (drums mode on Y8950 and OPL2)", { + _("SNK Chopper I (drums mode on Y8950 and OPL2)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Touchdown Fever", { + _("SNK Touchdown Fever"), { CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Touchdown Fever (drums mode on OPL)", { + _("SNK Touchdown Fever (drums mode on OPL)"), { CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_Y8950, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Touchdown Fever (drums mode on Y8950)", { + _("SNK Touchdown Fever (drums mode on Y8950)"), { CH(DIV_SYSTEM_OPL, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2") } ); SUB_ENTRY( - "SNK Touchdown Fever (drums mode on OPL and Y8950)", { + _("SNK Touchdown Fever (drums mode on OPL and Y8950)"), { CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "clockSel=2"), CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "clockSel=2") } ); ENTRY( - "Sunsoft", {} + _("Sunsoft"), {} ); SUB_ENTRY( - "Sunsoft Shanghai 3", { + _("Sunsoft Shanghai 3"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=4\n" "chipType=1\n" @@ -2199,40 +2225,40 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Sunsoft Arcade", { + _("Sunsoft Arcade"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "clockSel=2"), // discrete YM3438 8MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=1") // 1.056MHz } ); SUB_ENTRY( - "Sunsoft Arcade (extended channel 3)", { + _("Sunsoft Arcade (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "clockSel=2"), // discrete YM3438 8MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=1") // 1.056MHz } ); ENTRY( - "Taito", {} + _("Taito"), {} ); SUB_ENTRY( - "Taito Arcade", { + _("Taito Arcade"), { CH(DIV_SYSTEM_YM2610B, 1.0f, 0, "") } ); SUB_ENTRY( - "Taito Arcade (extended channel 3)", { + _("Taito Arcade (extended channel 3)"), { CH(DIV_SYSTEM_YM2610B_EXT, 1.0f, 0, "") } ); SUB_ENTRY( - "Taito Metal Soldier Isaac II", { + _("Taito Metal Soldier Isaac II"), { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3") } ); SUB_ENTRY( - "Taito The Fairyland Story", { + _("Taito The Fairyland Story"), { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3\n" @@ -2245,7 +2271,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Taito Wyvern F-0", { + _("Taito Wyvern F-0"), { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, ""), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3\n" @@ -2263,70 +2289,70 @@ void FurnaceGUI::initSystemPresets() { ); ENTRY( - "Tecmo", {} + _("Tecmo"), {} ); SUB_ENTRY( - "Tecmo Ninja Gaiden", { // Ninja Gaiden, Raiga, etc + _("Tecmo Ninja Gaiden"), { // Ninja Gaiden, Raiga, etc CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1MHz } ); SUB_ENTRY( - "Tecmo Ninja Gaiden (extended channel 3 on first OPN)", { // Ninja Gaiden, Raiga, etc + _("Tecmo Ninja Gaiden (extended channel 3 on first OPN)"), { // Ninja Gaiden, Raiga, etc CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1MHz } ); SUB_ENTRY( - "Tecmo Ninja Gaiden (extended channel 3 on second OPN)", { // Ninja Gaiden, Raiga, etc + _("Tecmo Ninja Gaiden (extended channel 3 on second OPN)"), { // Ninja Gaiden, Raiga, etc CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1MHz } ); SUB_ENTRY( - "Tecmo Ninja Gaiden (extended channel 3 on both OPNs)", { // Ninja Gaiden, Raiga, etc + _("Tecmo Ninja Gaiden (extended channel 3 on both OPNs)"), { // Ninja Gaiden, Raiga, etc CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1MHz } ); SUB_ENTRY( - "Tecmo System", { + _("Tecmo System"), { CH(DIV_SYSTEM_OPL3, 1.0f, 0, ""), CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, ""), CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=8") // 2MHz } ); SUB_ENTRY( - "Tecmo System (drums mode)", { + _("Tecmo System (drums mode)"), { CH(DIV_SYSTEM_OPL3_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, ""), CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=8") // 2MHz } ); SUB_ENTRY( - "Seibu Kaihatsu Raiden", { // Raiden, Seibu Cup Soccer, Zero Team, etc + _("Seibu Kaihatsu Raiden"), { // Raiden, Seibu Cup Soccer, Zero Team, etc CH(DIV_SYSTEM_OPL2, 1.0f, 0, ""), // YM3812 3.58MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 or 1.023MHz (28.636363MHz / 28); various per games } ); SUB_ENTRY( - "Seibu Kaihatsu Raiden (drums mode)", { // Raiden, Seibu Cup Soccer, Zero Team, etc + _("Seibu Kaihatsu Raiden (drums mode)"), { // Raiden, Seibu Cup Soccer, Zero Team, etc CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, ""), // YM3812 3.58MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") // 1 or 1.023MHz (28.636363MHz / 28); various per games } ); ENTRY( - "Other", {} + _("Other"), {} ); // UNSORTED SUB_ENTRY( - "Bally Midway MCR", { + _("Bally Midway MCR"), { // SSIO sound board CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3"), // 2MHz CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=3") // 2MHz @@ -2334,7 +2360,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Williams/Midway Y/T unit w/ADPCM sound board", { + _("Williams/Midway Y/T unit w/ADPCM sound board"), { // ADPCM sound board CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, @@ -2345,7 +2371,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NMK 16-bit Arcade", { + _("NMK 16-bit Arcade"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz; optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2\n" @@ -2358,7 +2384,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NMK 16-bit Arcade (extended channel 3)", { + _("NMK 16-bit Arcade (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz; optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2\n" @@ -2371,7 +2397,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NMK 16-bit Arcade (w/NMK112 bankswitching)", { + _("NMK 16-bit Arcade (w/NMK112 bankswitching)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=5"), // 1.5MHz; optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2\n" @@ -2386,7 +2412,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "NMK 16-bit Arcade (w/NMK112 bankswitching, extended channel 3)", { + _("NMK 16-bit Arcade (w/NMK112 bankswitching, extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=5"), // 1.5MHz; optional CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=2\n" @@ -2401,7 +2427,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Atlus Power Instinct 2", { + _("Atlus Power Instinct 2"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=13\n" @@ -2416,7 +2442,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Atlus Power Instinct 2 (extended channel 3)", { + _("Atlus Power Instinct 2 (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=13\n" @@ -2431,7 +2457,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Raizing/Eighting Battle Garegga", { + _("Raizing/Eighting Battle Garegga"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=8\n" @@ -2440,7 +2466,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Raizing/Eighting Batrider", { + _("Raizing/Eighting Batrider"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "clockSel=2"), // 4MHz CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=15\n" @@ -2454,31 +2480,31 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Nichibutsu Mag Max", { + _("Nichibutsu Mag Max"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=13"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=13"), CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=13") } ); SUB_ENTRY( - "Cave 68000", { + _("Cave 68000"), { CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "") } ); SUB_ENTRY( - "Coreland Cyber Tank", { + _("Coreland Cyber Tank"), { CH(DIV_SYSTEM_Y8950, 1.0f, -1.0f, ""), // 3.58MHz, Left output CH(DIV_SYSTEM_Y8950, 1.0f, 1.0f, "") // 3.58MHz, Right output } ); SUB_ENTRY( - "Coreland Cyber Tank (drums mode)", { + _("Coreland Cyber Tank (drums mode)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, -1.0f, ""), // 3.58MHz, Left output CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 1.0f, "") // 3.58MHz, Right output } ); SUB_ENTRY( - "ICE Skimaxx", { + _("ICE Skimaxx"), { CH(DIV_SYSTEM_MSM6295, 1.0f, -1.0f, "clockSel=2\n" "rateSel=true\n" @@ -2492,224 +2518,224 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Toaplan 1", { + _("Toaplan 1"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, "clockSel=5") // 3.5MHz } ); SUB_ENTRY( - "Toaplan 1 (drums mode)", { + _("Toaplan 1 (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "clockSel=5") // 3.5MHz } ); SUB_ENTRY( - "Dynax/Nakanihon 3rd generation hardware", { + _("Dynax/Nakanihon 3rd generation hardware"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), // AY or YM, optional - 1.79MHz or 3.58MHz; various per game CH(DIV_SYSTEM_OPLL, 1.0f, 0, ""), CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=6") // 1.023MHz mostly } ); SUB_ENTRY( - "Dynax/Nakanihon 3rd generation hardware (drums mode)", { + _("Dynax/Nakanihon 3rd generation hardware (drums mode)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, ""), // AY or YM, optional - 1.79MHz or 3.58MHz; various per game CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "clockSel=6") // 1.023MHz mostly } ); SUB_ENTRY( - "Dynax/Nakanihon Real Break", { + _("Dynax/Nakanihon Real Break"), { CH(DIV_SYSTEM_OPLL, 1.0f, 0, ""), CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "") } ); SUB_ENTRY( - "Dynax/Nakanihon Real Break (drums mode)", { + _("Dynax/Nakanihon Real Break (drums mode)"), { CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, ""), CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "") } ); CATEGORY_END; - CATEGORY_BEGIN("User","system presets that you have saved."); + CATEGORY_BEGIN(_("User"),_("system presets that you have saved.")); CATEGORY_END; - CATEGORY_BEGIN("FM","chips which use frequency modulation (FM) to generate sound.\nsome of these also pack more (like square and sample channels)."); + CATEGORY_BEGIN(_("FM"),_("chips which use frequency modulation (FM) to generate sound.\nsome of these also pack more (like square and sample channels).")); ENTRY( - "Yamaha YM2151 (OPM)", { + _("Yamaha YM2151 (OPM)"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM2203 (OPN)", { + _("Yamaha YM2203 (OPN)"), { CH(DIV_SYSTEM_YM2203, 1.0f, 0, "clockSel=3") } ); SUB_ENTRY( - "Yamaha YM2203 (extended channel 3)", { + _("Yamaha YM2203 (extended channel 3)"), { CH(DIV_SYSTEM_YM2203_EXT, 1.0f, 0, "clockSel=3") } ); ENTRY( - "Yamaha YM2608 (OPNA)", { + _("Yamaha YM2608 (OPNA)"), { CH(DIV_SYSTEM_YM2608, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM2608 (extended channel 3)", { + _("Yamaha YM2608 (extended channel 3)"), { CH(DIV_SYSTEM_YM2608_EXT, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM2610 (OPNB)", { + _("Yamaha YM2610 (OPNB)"), { CH(DIV_SYSTEM_YM2610_FULL, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM2610 (extended channel 2)", { + _("Yamaha YM2610 (extended channel 2)"), { CH(DIV_SYSTEM_YM2610_FULL_EXT, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM2610B (OPNB2)", { + _("Yamaha YM2610B (OPNB2)"), { CH(DIV_SYSTEM_YM2610B, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM2610B (extended channel 3)", { + _("Yamaha YM2610B (extended channel 3)"), { CH(DIV_SYSTEM_YM2610B_EXT, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM2612 (OPN2)", { + _("Yamaha YM2612 (OPN2)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "chipType=1") } ); SUB_ENTRY( - "Yamaha YM2612 (extended channel 3)", { + _("Yamaha YM2612 (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "chipType=1") } ); SUB_ENTRY( - "Yamaha YM2612 (OPN2) CSM", { + _("Yamaha YM2612 (OPN2) CSM"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, "chipType=1") } ); SUB_ENTRY( - "Yamaha YM2612 (OPN2) with DualPCM", { + _("Yamaha YM2612 (OPN2) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM, 1.0f, 0, "chipType=1") } ); SUB_ENTRY( - "Yamaha YM2612 (extended channel 3) with DualPCM", { + _("Yamaha YM2612 (extended channel 3) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM_EXT, 1.0f, 0, "chipType=1") } ); ENTRY( - "Yamaha YMF276 (OPN2)", { + _("Yamaha YMF276 (OPN2)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "chipType=2") } ); SUB_ENTRY( - "Yamaha YMF276 (extended channel 3)", { + _("Yamaha YMF276 (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "chipType=2") } ); SUB_ENTRY( - "Yamaha YMF276 (OPN2) CSM", { + _("Yamaha YMF276 (OPN2) CSM"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, "chipType=2") } ); SUB_ENTRY( - "Yamaha YMF276 (OPN2) with DualPCM", { + _("Yamaha YMF276 (OPN2) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM, 1.0f, 0, "chipType=2") } ); SUB_ENTRY( - "Yamaha YMF276 (extended channel 3) with DualPCM", { + _("Yamaha YMF276 (extended channel 3) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM_EXT, 1.0f, 0, "chipType=2") } ); ENTRY( - "Yamaha YM2413 (OPLL)", { + _("Yamaha YM2413 (OPLL)"), { CH(DIV_SYSTEM_OPLL, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM2413 (drums mode)", { + _("Yamaha YM2413 (drums mode)"), { CH(DIV_SYSTEM_OPLL_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM2414 (OPZ)", { + _("Yamaha YM2414 (OPZ)"), { CH(DIV_SYSTEM_OPZ, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM3438 (OPN2C)", { + _("Yamaha YM3438 (OPN2C)"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3438 (extended channel 3)", { + _("Yamaha YM3438 (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3438 (OPN2C) CSM", { + _("Yamaha YM3438 (OPN2C) CSM"), { CH(DIV_SYSTEM_YM2612_CSM, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3438 (OPN2C) with DualPCM", { + _("Yamaha YM3438 (OPN2C) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3438 (extended channel 3) with DualPCM", { + _("Yamaha YM3438 (extended channel 3) with DualPCM"), { CH(DIV_SYSTEM_YM2612_DUALPCM_EXT, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM3526 (OPL)", { + _("Yamaha YM3526 (OPL)"), { CH(DIV_SYSTEM_OPL, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3526 (drums mode)", { + _("Yamaha YM3526 (drums mode)"), { CH(DIV_SYSTEM_OPL_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Yamaha Y8950", { + _("Yamaha Y8950"), { CH(DIV_SYSTEM_Y8950, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha Y8950 (drums mode)", { + _("Yamaha Y8950 (drums mode)"), { CH(DIV_SYSTEM_Y8950_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Yamaha YM3812 (OPL2)", { + _("Yamaha YM3812 (OPL2)"), { CH(DIV_SYSTEM_OPL2, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YM3812 (drums mode)", { + _("Yamaha YM3812 (drums mode)"), { CH(DIV_SYSTEM_OPL2_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Yamaha YMF262 (OPL3)", { + _("Yamaha YMF262 (OPL3)"), { CH(DIV_SYSTEM_OPL3, 1.0f, 0, "") } ); SUB_ENTRY( - "Yamaha YMF262 (drums mode)", { + _("Yamaha YMF262 (drums mode)"), { CH(DIV_SYSTEM_OPL3_DRUMS, 1.0f, 0, "") } ); ENTRY( - "Yamaha YMF289B (OPL3-L)", { + _("Yamaha YMF289B (OPL3-L)"), { CH(DIV_SYSTEM_OPL3, 1.0f, 0, "clockSel=5\n" "chipType=1\n" @@ -2717,7 +2743,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "Yamaha YMF289B (drums mode)", { + _("Yamaha YMF289B (drums mode)"), { CH(DIV_SYSTEM_OPL3_DRUMS, 1.0f, 0, "clockSel=5\n" "chipType=1\n" @@ -2725,58 +2751,61 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "ESS ES1xxx series (ESFM)", { + _("ESS ES1xxx series (ESFM)"), { CH(DIV_SYSTEM_ESFM, 1.0f, 0, "") } ); - if (settings.hiddenSystems) { - ENTRY( - "Yamaha YMU759 (MA-2)", { - CH(DIV_SYSTEM_YMU759, 1.0f, 0, "") + ENTRY( + "Yamaha YMF278B (OPL4)", { + CH(DIV_SYSTEM_OPL4, 1.0f, 0, "") + } + ); + SUB_ENTRY( + "Yamaha YMF278B (drums mode)", { + CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "") } ); - } CATEGORY_END; - CATEGORY_BEGIN("Square","these chips generate square/pulse tones only (but may include noise)."); + CATEGORY_BEGIN(_("Square"),_("these chips generate square/pulse tones only (but may include noise).")); ENTRY( - "TI SN76489", { + _("TI SN76489"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=1") } ); SUB_ENTRY( - "TI SN76489A", { + _("TI SN76489A"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=4") } ); SUB_ENTRY( - "TI SN76496", { + _("TI SN76496"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=5") } ); SUB_ENTRY( - "NCR 8496", { + _("NCR 8496"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=6") } ); SUB_ENTRY( - "Tandy PSSJ 3-voice sound", { + _("Tandy PSSJ 3-voice sound"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=7") // 8 bit DAC } ); SUB_ENTRY( - "Sega PSG (SN76489-like)", { + _("Sega PSG (SN76489-like)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), } ); SUB_ENTRY( - "Sega PSG (SN76489-like, Stereo)", { + _("Sega PSG (SN76489-like, Stereo)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "chipType=3") } ); SUB_ENTRY( - "TI SN94624", { + _("TI SN94624"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=6\n" "chipType=8\n" @@ -2784,7 +2813,7 @@ void FurnaceGUI::initSystemPresets() { } ); SUB_ENTRY( - "TI SN76494", { + _("TI SN76494"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "clockSel=6\n" "chipType=9\n" @@ -2792,432 +2821,437 @@ void FurnaceGUI::initSystemPresets() { } ); ENTRY( - "Toshiba T6W28", { + _("Toshiba T6W28"), { CH(DIV_SYSTEM_T6W28, 1.0f, 0, "") } ); ENTRY( - "AY-3-8910", { + _("AY-3-8910"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "") } ); ENTRY( - "AY-3-8914", { + _("AY-3-8914"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=3") } ); ENTRY( - "Yamaha YM2149(F)", { + _("Yamaha YM2149(F)"), { CH(DIV_SYSTEM_AY8910, 1.0f, 0, "chipType=1") } ); ENTRY( - "Philips SAA1099", { + _("Philips SAA1099"), { CH(DIV_SYSTEM_SAA1099, 1.0f, 0, "") } ); ENTRY( - "PC Speaker", { + _("PC Speaker"), { CH(DIV_SYSTEM_PCSPKR, 0.5f, 0, "") } ); ENTRY( - "Pokémon Mini", { + _("Pokémon Mini"), { CH(DIV_SYSTEM_POKEMINI, 0.5f, 0, "") } ); ENTRY( - "Commodore VIC", { + _("Commodore VIC"), { CH(DIV_SYSTEM_VIC20, 1.0f, 0, "clockSel=1") } ); ENTRY( - "OKI MSM5232", { + _("OKI MSM5232"), { CH(DIV_SYSTEM_MSM5232, 1.0f, 0, "") } ); ENTRY( - "Pong", { - CH(DIV_SYSTEM_PONG, 1.0f, 0, "") - } - ); - ENTRY( - "NEC D65010G031", { + _("NEC D65010G031"), { CH(DIV_SYSTEM_PV1000, 1.0f, 0, "") } ); ENTRY( - "MOS Technology TED", { + _("MOS Technology TED"), { CH(DIV_SYSTEM_TED, 1.0f, 0, "clockSel=1") } ); CATEGORY_END; - CATEGORY_BEGIN("Sample","chips/systems which use PCM or ADPCM samples for sound synthesis."); + CATEGORY_BEGIN(_("Sample"),_("chips/systems which use PCM or ADPCM samples for sound synthesis.")); ENTRY( - "Amiga", { + _("Amiga"), { CH(DIV_SYSTEM_AMIGA, 1.0f, 0, "clockSel=1") }, "tickRate=50" ); ENTRY( - "SegaPCM", { + _("SegaPCM"), { CH(DIV_SYSTEM_SEGAPCM, 1.0f, 0, "") } ); ENTRY( - "Capcom QSound", { + _("Capcom QSound"), { CH(DIV_SYSTEM_QSOUND, 1.0f, 0, "") } ); ENTRY( - "Seta/Allumer X1-010", { + _("Seta/Allumer X1-010"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, "") } ); ENTRY( - "Yamaha YMZ280B (PCMD8)", { + _("Yamaha YMZ280B (PCMD8)"), { CH(DIV_SYSTEM_YMZ280B, 1.0f, 0, "") } ); ENTRY( - "Ricoh RF5C68", { + _("Ricoh RF5C68"), { CH(DIV_SYSTEM_RF5C68, 1.0f, 0, "") } ); ENTRY( - "OKI MSM6258", { + _("OKI MSM6258"), { CH(DIV_SYSTEM_MSM6258, 1.0f, 0, "") } ); ENTRY( - "OKI MSM6295", { + _("OKI MSM6295"), { CH(DIV_SYSTEM_MSM6295, 1.0f, 0, "") } ); ENTRY( - "SNES", { + _("SNES"), { CH(DIV_SYSTEM_SNES, 1.0f, 0, "") } ); ENTRY( - "Konami K007232", { + _("Konami K007232"), { CH(DIV_SYSTEM_K007232, 1.0f, 0, "") } ); ENTRY( - "Irem GA20", { + _("Irem GA20"), { CH(DIV_SYSTEM_GA20, 1.0f, 0, "") } ); ENTRY( - "Generic PCM DAC", { + _("Generic PCM DAC"), { CH(DIV_SYSTEM_PCM_DAC, 1.0f, 0, "") } ); ENTRY( - "Ensoniq ES5506 (OTTO)", { + _("Ensoniq ES5506 (OTTO)"), { CH(DIV_SYSTEM_ES5506, 1.0f, 0, "channels=31") } ); ENTRY( - "Konami K053260", { + _("Konami K053260"), { CH(DIV_SYSTEM_K053260, 1.0f, 0, "") } ); ENTRY( - "Namco C140", { + _("Namco C140"), { CH(DIV_SYSTEM_C140, 1.0f, 0, "") } ); ENTRY( - "Namco C219", { + _("Namco C219"), { CH(DIV_SYSTEM_C219, 1.0f, 0, "") } ); ENTRY( - "Nintendo DS", { + _("Nintendo DS"), { CH(DIV_SYSTEM_NDS, 1.0f, 0, "") } ); + ENTRY( + "Yamaha YMF278B (OPL4)", { + CH(DIV_SYSTEM_OPL4, 1.0f, 0, "") + } + ); + SUB_ENTRY( + "Yamaha YMF278B (drums mode)", { + CH(DIV_SYSTEM_OPL4_DRUMS, 1.0f, 0, "") + } + ); CATEGORY_END; - CATEGORY_BEGIN("Wavetable","chips which use user-specified waveforms to generate sound."); + CATEGORY_BEGIN(_("Wavetable"),_("chips which use user-specified waveforms to generate sound.")); ENTRY( - "PC Engine", { + _("PC Engine"), { CH(DIV_SYSTEM_PCE, 1.0f, 0, "") } ); ENTRY( - "Konami Bubble System WSG", { + _("Konami Bubble System WSG"), { CH(DIV_SYSTEM_BUBSYS_WSG, 1.0f, 0, "") } ); ENTRY( - "Konami SCC", { + _("Konami SCC"), { CH(DIV_SYSTEM_SCC, 1.0f, 0, "") } ); ENTRY( - "Konami SCC+", { + _("Konami SCC+"), { CH(DIV_SYSTEM_SCC_PLUS, 1.0f, 0, "") } ); ENTRY( - "Namco WSG", { + _("Namco WSG"), { CH(DIV_SYSTEM_NAMCO, 1.0f, 0, "") } ); ENTRY( - "Namco C15 (8-channel mono)", { + _("Namco C15 (8-channel mono)"), { CH(DIV_SYSTEM_NAMCO_15XX, 1.0f, 0, "") } ); ENTRY( - "Namco C30 (8-channel stereo)", { + _("Namco C30 (8-channel stereo)"), { CH(DIV_SYSTEM_NAMCO_CUS30, 1.0f, 0, "") } ); ENTRY( - "Namco 163", { + _("Namco 163"), { CH(DIV_SYSTEM_N163, 1.0f, 0, "") } ); ENTRY( - "Famicom Disk System (chip)", { + _("Famicom Disk System (chip)"), { CH(DIV_SYSTEM_FDS, 1.0f, 0, "") } ); ENTRY( - "WonderSwan", { + _("WonderSwan"), { CH(DIV_SYSTEM_SWAN, 1.0f, 0, "") }, "tickRate=75.47169811320754716981" ); ENTRY( - "Virtual Boy", { + _("Virtual Boy"), { CH(DIV_SYSTEM_VBOY, 1.0f, 0, "") }, "tickRate=50.2734877734878" ); ENTRY( - "Seta/Allumer X1-010", { + _("Seta/Allumer X1-010"), { CH(DIV_SYSTEM_X1_010, 1.0f, 0, "") } ); CATEGORY_END; - CATEGORY_BEGIN("Specialized","chips/systems with unique sound synthesis methods."); + CATEGORY_BEGIN(_("Specialized"),_("chips/systems with unique sound synthesis methods.")); ENTRY( - "MOS Technology SID (6581)", { + _("MOS Technology SID (6581)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); ENTRY( - "MOS Technology SID (8580)", { + _("MOS Technology SID (8580)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); ENTRY( - "Commodore PET (pseudo-wavetable)", { + _("Commodore PET (pseudo-wavetable)"), { CH(DIV_SYSTEM_PET, 1.0f, 0, "") }, "tickRate=50" ); ENTRY( - "Konami VRC6", { + _("Konami VRC6"), { CH(DIV_SYSTEM_VRC6, 1.0f, 0, "") } ); ENTRY( - "MMC5", { + _("MMC5"), { CH(DIV_SYSTEM_MMC5, 1.0f, 0, "") } ); ENTRY( - "Microchip AY8930", { + _("Microchip AY8930"), { CH(DIV_SYSTEM_AY8930, 1.0f, 0, "") } ); ENTRY( - "Game Boy", { + _("Game Boy"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "") } ); ENTRY( - "Atari Lynx", { + _("Atari Lynx"), { CH(DIV_SYSTEM_LYNX, 1.0f, 0, "") } ); ENTRY( - "POKEY", { + _("POKEY"), { CH(DIV_SYSTEM_POKEY, 1.0f, 0, "clockSel=1") }, "tickRate=50" ); ENTRY( - "Atari TIA", { + _("Atari TIA"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, "") } ); SUB_ENTRY( - "Atari TIA (with software pitch driver)", { + _("Atari TIA (with software pitch driver)"), { CH(DIV_SYSTEM_TIA, 1.0f, 0, "softwarePitch=1") } ); ENTRY( - "NES (Ricoh 2A03)", { + _("NES (Ricoh 2A03)"), { CH(DIV_SYSTEM_NES, 1.0f, 0, "") } ); ENTRY( - "Commander X16 (VERA only)", { + _("Commander X16 (VERA only)"), { CH(DIV_SYSTEM_VERA, 1.0f, 0, "") } ); ENTRY( - "ZX Spectrum (beeper only, SFX-like engine)", { + _("ZX Spectrum (beeper only, SFX-like engine)"), { CH(DIV_SYSTEM_SFX_BEEPER, 1.0f, 0, "") } ); ENTRY( - "ZX Spectrum (beeper only, QuadTone engine)", { + _("ZX Spectrum (beeper only, QuadTone engine)"), { CH(DIV_SYSTEM_SFX_BEEPER_QUADTONE, 1.0f, 0, "") } ); ENTRY( - "Sharp SM8521", { + _("Sharp SM8521"), { CH(DIV_SYSTEM_SM8521, 1.0f, 0, "") } ); if (settings.hiddenSystems) { ENTRY( - "Dummy System", { + _("Dummy System"), { CH(DIV_SYSTEM_DUMMY, 1.0f, 0, "") } ); } ENTRY( - "tildearrow Sound Unit", { + _("tildearrow Sound Unit"), { CH(DIV_SYSTEM_SOUND_UNIT, 1.0f, 0, "") } ); ENTRY( - "PowerNoise", { + _("PowerNoise"), { CH(DIV_SYSTEM_POWERNOISE, 1.0f, 0, "") } ); ENTRY( - "Dave", { + _("Dave"), { CH(DIV_SYSTEM_DAVE, 1.0f, 0, "") }, "tickRate=50" ); ENTRY( - "Nintendo DS", { + _("Nintendo DS"), { CH(DIV_SYSTEM_NDS, 1.0f, 0, "") } ); ENTRY( - "Bifurcator", { + _("Bifurcator"), { CH(DIV_SYSTEM_BIFURCATOR, 1.0f, 0, "") } ); ENTRY( - "SID2", { + _("SID2"), { CH(DIV_SYSTEM_SID2, 1.0f, 0, "") } ); ENTRY( - "Watara Supervision", { - CH(DIV_SYSTEM_SUPERVISION, 1.0f, 0, "") + _("SID3"), { + CH(DIV_SYSTEM_SID3, 1.0f, 0, "") } ); ENTRY( - "NEC μPD1771C", { - CH(DIV_SYSTEM_UPD1771C, 1.0f, 0, "") + _("Watara Supervision"), { + CH(DIV_SYSTEM_SUPERVISION, 1.0f, 0, "") } ); CATEGORY_END; - CATEGORY_BEGIN("DefleMask-compatible","these configurations are compatible with DefleMask.\nselect this if you need to save as .dmf or work with that program."); + CATEGORY_BEGIN(_("DefleMask-compatible"),_("these configurations are compatible with DefleMask.\nselect this if you need to save as .dmf or work with that program.")); ENTRY( - "Sega Genesis", { + _("Sega Genesis"), { CH(DIV_SYSTEM_YM2612, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); ENTRY( - "Sega Genesis (extended channel 3)", { + _("Sega Genesis (extended channel 3)"), { CH(DIV_SYSTEM_YM2612_EXT, 1.0f, 0, ""), CH(DIV_SYSTEM_SMS, 0.5f, 0, "") } ); ENTRY( - "Sega Master System", { + _("Sega Master System"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, "") } ); ENTRY( - "Sega Master System (with FM expansion)", { + _("Sega Master System (with FM expansion)"), { CH(DIV_SYSTEM_SMS, 1.0f, 0, ""), CH(DIV_SYSTEM_OPLL, 1.0f, 0, "") } ); ENTRY( - "Game Boy", { + _("Game Boy"), { CH(DIV_SYSTEM_GB, 1.0f, 0, "") } ); ENTRY( - "NEC PC Engine/TurboGrafx-16", { + _("NEC PC Engine/TurboGrafx-16"), { CH(DIV_SYSTEM_PCE, 1.0f, 0, "") } ); ENTRY( - "NES", { + _("NES"), { CH(DIV_SYSTEM_NES, 1.0f, 0, "") } ); ENTRY( - "Famicom with Konami VRC7", { + _("Famicom with Konami VRC7"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_VRC7, 1.0f, 0, "") } ); ENTRY( - "Famicom Disk System", { + _("Famicom Disk System"), { CH(DIV_SYSTEM_NES, 1.0f, 0, ""), CH(DIV_SYSTEM_FDS, 1.0f, 0, "") } ); ENTRY( - "Commodore 64 (6581 SID)", { + _("Commodore 64 (6581 SID)"), { CH(DIV_SYSTEM_C64_6581, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); ENTRY( - "Commodore 64 (8580 SID)", { + _("Commodore 64 (8580 SID)"), { CH(DIV_SYSTEM_C64_8580, 1.0f, 0, "clockSel=1") }, "tickRate=50.1245421" ); ENTRY( - "Arcade (YM2151 and SegaPCM)", { + _("Arcade (YM2151 and SegaPCM)"), { CH(DIV_SYSTEM_YM2151, 1.0f, 0, ""), CH(DIV_SYSTEM_SEGAPCM_COMPAT, 1.0f, 0, "") } ); ENTRY( - "Neo Geo CD", { + _("Neo Geo CD"), { CH(DIV_SYSTEM_YM2610, 1.0f, 0, "") } ); ENTRY( - "Neo Geo CD (extended channel 2)", { + _("Neo Geo CD (extended channel 2)"), { CH(DIV_SYSTEM_YM2610_EXT, 1.0f, 0, "") } ); diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index d5975c55a..9a6000820 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -413,6 +413,12 @@ void FurnaceGUI::drawSampleEdit() { SAMPLE_WARN(warnLength,_("GBA DMA: sample length will be padded to multiple of 16")); } break; + case DIV_SYSTEM_OPL4: + case DIV_SYSTEM_OPL4_DRUMS: + if (sample->samples>65535) { + SAMPLE_WARN(warnLength,_("OPL4: maximum sample length is 65535")); + } + break; case DIV_SYSTEM_SUPERVISION: if (sample->loop) { if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) { diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 5bc3008d2..8e16e6e4f 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -83,7 +83,7 @@ const char* locales[][3]={ //{"Nederlands (4%)", "nl_NL", "start Furnace opnieuw op om deze instelling effectief te maken."}, {"Polski (95%)", "pl_PL", "aby to ustawienie było skuteczne, należy ponownie uruchomić program."}, {"Português (Brasil) (90%)", "pt_BR", "reinicie o Furnace para que essa configuração entre em vigor."}, - {"Русский (90%)", "ru_RU", "перезапустите программу, чтобы эта настройка вступила в силу."}, + {"Русский", "ru_RU", "перезапустите программу, чтобы эта настройка вступила в силу."}, {"Slovenčina (15%)", "sk_SK", "???"}, {"Svenska", "sv_SE", "starta om programmet för att denna inställning ska träda i kraft."}, //{"ไทย (0%)", "th_TH", "???"}, @@ -189,6 +189,11 @@ const char* opl3Cores[]={ "YMF262-LLE" }; +const char* opl4Cores[]={ + "Nuked-OPL3 (FM) + openMSX (PCM)", + "ymfm" +}; + const char* esfmCores[]={ "ESFMu", _N("ESFMu (fast)") @@ -1003,7 +1008,11 @@ void FurnaceGUI::drawSettings() { for (totalAvailSys=0; availableSystems[totalAvailSys]; totalAvailSys++); if (totalAvailSys>0) { for (int i=0; isystemToFileFur((DivSystem)availableSystems[rand()%totalAvailSys])); + DivSystem theSystem=DIV_SYSTEM_DUMMY; + do { + theSystem=(DivSystem)availableSystems[rand()%totalAvailSys]; + } while (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(theSystem)); + settings.initialSys.set(fmt::sprintf("id%d",i),e->systemToFileFur(theSystem)); settings.initialSys.set(fmt::sprintf("vol%d",i),1.0f); settings.initialSys.set(fmt::sprintf("pan%d",i),0.0f); settings.initialSys.set(fmt::sprintf("fr%d",i),0.0f); @@ -1226,15 +1235,6 @@ void FurnaceGUI::drawSettings() { settingsChanged=true; } - bool partyTimeB=settings.partyTime; - if (ImGui::Checkbox(_("About screen party time"),&partyTimeB)) { - settings.partyTime=partyTimeB; - settingsChanged=true; - } - if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("Warning: may cause epileptic seizures.")); - } - // SUBSECTION BEHAVIOR CONFIG_SUBSECTION(_("Behavior")); bool blankInsB=settings.blankIns; @@ -2058,6 +2058,17 @@ void FurnaceGUI::drawSettings() { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); if (ImGui::Combo("##OPL3CoreRender",&settings.opl3CoreRender,opl3Cores,3)) settingsChanged=true; + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::AlignTextToFramePadding(); + ImGui::Text("OPL4"); + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + if (ImGui::Combo("##OPL4Core",&settings.opl4Core,opl4Cores,2)) settingsChanged=true; + ImGui::TableNextColumn(); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + if (ImGui::Combo("##OPL4CoreRender",&settings.opl4CoreRender,opl4Cores,2)) settingsChanged=true; + ImGui::TableNextRow(); ImGui::TableNextColumn(); ImGui::AlignTextToFramePadding(); @@ -2137,7 +2148,6 @@ void FurnaceGUI::drawSettings() { ImGui::SameLine(); if (ImGui::Combo("##PCSOutMethod",&settings.pcSpeakerOutMethod,LocalizedComboGetter,pcspkrOutMethods,5)) settingsChanged=true; - /* ImGui::Separator(); ImGui::Text(_("Sample ROMs:")); @@ -2150,6 +2160,7 @@ void FurnaceGUI::drawSettings() { openFileDialog(GUI_FILE_YRW801_ROM_OPEN); } + /* ImGui::AlignTextToFramePadding(); ImGui::Text(_("MultiPCM TG100 path")); ImGui::SameLine(); @@ -2722,6 +2733,27 @@ void FurnaceGUI::drawSettings() { } ImGui::Unindent(); + ImGui::Text(_("Modifier for alternate wheel-scrolling (vertical/zoom/slider-input):")); + ImGui::Indent(); + if (ImGui::RadioButton(_("Ctrl or Meta/Cmd##cwm1"),settings.ctrlWheelModifier==0)) { + settings.ctrlWheelModifier=0; + settingsChanged=true; + } + if (ImGui::RadioButton(_("Ctrl##cwm2"),settings.ctrlWheelModifier==1)) { + settings.ctrlWheelModifier=1; + settingsChanged=true; + } + if (ImGui::RadioButton(_("Meta/Cmd##cwm3"),settings.ctrlWheelModifier==2)) { + settings.ctrlWheelModifier=2; + settingsChanged=true; + } + // technically this key is called Option on mac, but we call it Alt in getKeyName(s) + if (ImGui::RadioButton(_("Alt##cwm4"),settings.ctrlWheelModifier==3)) { + settings.ctrlWheelModifier=3; + settingsChanged=true; + } + ImGui::Unindent(); + bool doubleClickColumnB=settings.doubleClickColumn; if (ImGui::Checkbox(_("Double click selects entire column"),&doubleClickColumnB)) { settings.doubleClickColumn=doubleClickColumnB; @@ -4130,6 +4162,7 @@ void FurnaceGUI::drawSettings() { UI_COLOR_CONFIG(GUI_COLOR_INSTR_SID2,_("SID2")); UI_COLOR_CONFIG(GUI_COLOR_INSTR_SUPERVISION,_("Supervision")); UI_COLOR_CONFIG(GUI_COLOR_INSTR_UPD1771C,_("μPD1771C")); + UI_COLOR_CONFIG(GUI_COLOR_INSTR_SID3,_("SID3")); UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,_("Other/Unknown")); ImGui::TreePop(); } @@ -4823,6 +4856,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { if (groups&GUI_SETTINGS_BEHAVIOR) { settings.soloAction=conf.getInt("soloAction",0); + settings.ctrlWheelModifier=conf.getInt("ctrlWheelModifier",0); settings.pullDeleteBehavior=conf.getInt("pullDeleteBehavior",1); settings.wrapHorizontal=conf.getInt("wrapHorizontal",0); settings.wrapVertical=conf.getInt("wrapVertical",0); @@ -4862,7 +4896,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.selectAssetOnLoad=conf.getInt("selectAssetOnLoad",1); - settings.inputRepeat=conf.getInt("inputRepeat",0); + settings.inputRepeat=conf.getInt("inputRepeat",1); } if (groups&GUI_SETTINGS_FONT) { @@ -4920,7 +4954,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.chipNames=conf.getInt("chipNames",0); settings.overflowHighlight=conf.getInt("overflowHighlight",0); - settings.partyTime=conf.getInt("partyTime",0); settings.flatNotes=conf.getInt("flatNotes",0); settings.germanNotation=conf.getInt("germanNotation",0); @@ -5002,6 +5035,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.opnbCore=conf.getInt("opnbCore",1); settings.opl2Core=conf.getInt("opl2Core",0); settings.opl3Core=conf.getInt("opl3Core",0); + settings.opl4Core=conf.getInt("opl4Core",0); settings.esfmCore=conf.getInt("esfmCore",0); settings.opllCore=conf.getInt("opllCore",0); settings.ayCore=conf.getInt("ayCore",0); @@ -5030,6 +5064,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { settings.opnbCoreRender=conf.getInt("opnbCoreRender",1); settings.opl2CoreRender=conf.getInt("opl2CoreRender",0); settings.opl3CoreRender=conf.getInt("opl3CoreRender",0); + settings.opl4CoreRender=conf.getInt("opl4CoreRender",0); settings.esfmCoreRender=conf.getInt("esfmCoreRender",0); settings.opllCoreRender=conf.getInt("opllCoreRender",0); settings.ayCoreRender=conf.getInt("ayCoreRender",0); @@ -5075,6 +5110,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.opnbCore,0,2); clampSetting(settings.opl2Core,0,2); clampSetting(settings.opl3Core,0,2); + clampSetting(settings.opl4Core,0,1); clampSetting(settings.esfmCore,0,1); clampSetting(settings.opllCore,0,1); clampSetting(settings.ayCore,0,1); @@ -5101,6 +5137,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.opnbCoreRender,0,2); clampSetting(settings.opl2CoreRender,0,2); clampSetting(settings.opl3CoreRender,0,2); + clampSetting(settings.opl4CoreRender,0,1); clampSetting(settings.esfmCoreRender,0,1); clampSetting(settings.opllCoreRender,0,1); clampSetting(settings.ayCoreRender,0,1); @@ -5121,6 +5158,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.patRowsBase,0,1); clampSetting(settings.orderRowsBase,0,1); clampSetting(settings.soloAction,0,2); + clampSetting(settings.ctrlWheelModifier,0,3); clampSetting(settings.pullDeleteBehavior,0,1); clampSetting(settings.wrapHorizontal,0,2); clampSetting(settings.wrapVertical,0,3); @@ -5128,7 +5166,6 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { clampSetting(settings.allowEditDocking,0,1); clampSetting(settings.chipNames,0,1); clampSetting(settings.overflowHighlight,0,1); - clampSetting(settings.partyTime,0,1); clampSetting(settings.flatNotes,0,1); clampSetting(settings.germanNotation,0,1); clampSetting(settings.stepOnDelete,0,1); @@ -5408,6 +5445,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { // behavior if (groups&GUI_SETTINGS_BEHAVIOR) { conf.set("soloAction",settings.soloAction); + conf.set("ctrlWheelModifier",settings.ctrlWheelModifier); conf.set("pullDeleteBehavior",settings.pullDeleteBehavior); conf.set("wrapHorizontal",settings.wrapHorizontal); conf.set("wrapVertical",settings.wrapVertical); @@ -5507,7 +5545,6 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { conf.set("chipNames",settings.chipNames); conf.set("overflowHighlight",settings.overflowHighlight); - conf.set("partyTime",settings.partyTime); conf.set("flatNotes",settings.flatNotes); conf.set("germanNotation",settings.germanNotation); @@ -5591,6 +5628,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { conf.set("opnbCore",settings.opnbCore); conf.set("opl2Core",settings.opl2Core); conf.set("opl3Core",settings.opl3Core); + conf.set("opl4Core",settings.opl4Core); conf.set("esfmCore",settings.esfmCore); conf.set("opllCore",settings.opllCore); conf.set("ayCore",settings.ayCore); @@ -5619,6 +5657,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) { conf.set("opnbCoreRender",settings.opnbCoreRender); conf.set("opl2CoreRender",settings.opl2CoreRender); conf.set("opl3CoreRender",settings.opl3CoreRender); + conf.set("opl4CoreRender",settings.opl4CoreRender); conf.set("esfmCoreRender",settings.esfmCoreRender); conf.set("opllCoreRender",settings.opllCoreRender); conf.set("ayCoreRender",settings.ayCoreRender); @@ -5682,6 +5721,7 @@ void FurnaceGUI::commitSettings() { settings.opnbCore!=e->getConfInt("opnbCore",1) || settings.opl2Core!=e->getConfInt("opl2Core",0) || settings.opl3Core!=e->getConfInt("opl3Core",0) || + settings.opl4Core!=e->getConfInt("opl4Core",0) || settings.esfmCore!=e->getConfInt("esfmCore",0) || settings.opllCore!=e->getConfInt("opllCore",0) || settings.ayCore!=e->getConfInt("ayCore",0) || diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index a22ea0323..15cac439a 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -2543,6 +2543,67 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl } break; } + case DIV_SYSTEM_OPL4: + case DIV_SYSTEM_OPL4_DRUMS: { + int clockSel=flags.getInt("clockSel",0); + int ramSize=flags.getInt("ramSize",0); + + ImGui::Text(_("Clock rate:")); + ImGui::Indent(); + if (ImGui::RadioButton(_("33.8688MHz"),clockSel==0)) { + clockSel=0; + altered=true; + } + if (ImGui::RadioButton(_("28.64MHz (NTSC)"),clockSel==1)) { + clockSel=1; + altered=true; + } + if (ImGui::RadioButton(_("28.38MHz (PAL)"),clockSel==2)) { + clockSel=2; + altered=true; + } + ImGui::Unindent(); + + ImGui::Text(_("RAM size:")); + ImGui::Indent(); + if (ImGui::RadioButton(_("4MB"),ramSize==0)) { + ramSize=0; + altered=true; + } + if (ImGui::RadioButton(_("2MB"),ramSize==1)) { + ramSize=1; + altered=true; + } + if (ImGui::RadioButton(_("1MB"),ramSize==2)) { + ramSize=2; + altered=true; + } + if (ImGui::RadioButton(_("640KB"),ramSize==3)) { + ramSize=3; + altered=true; + } + if (ImGui::RadioButton(_("512KB"),ramSize==4)) { + ramSize=4; + altered=true; + } + if (ImGui::RadioButton(_("256KB"),ramSize==5)) { + ramSize=5; + altered=true; + } + if (ImGui::RadioButton(_("128KB"),ramSize==6)) { + ramSize=6; + altered=true; + } + ImGui::Unindent(); + + if (altered) { + e->lockSave([&]() { + flags.set("clockSel",clockSel); + flags.set("ramSize",ramSize); + }); + } + break; + } case DIV_SYSTEM_SWAN: case DIV_SYSTEM_BUBSYS_WSG: case DIV_SYSTEM_PET: @@ -2558,6 +2619,28 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl supportsCustomRate=false; ImGui::Text(_("nothing to configure")); break; + case DIV_SYSTEM_SID3: { + bool quarterClock=flags.getBool("quarterClock",false); + if (ImGui::Checkbox(_("Quarter clock speed"),&quarterClock)) { + altered=true; + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip(_("Decreases clock speed and CPU audio load by 4 times.\nCan be used if your CPU is too slow for the chip." + "\nDoes not affect clock speed during export!\n\n" + + "Warning! Filters may become unstable at high cutoff and resonance\nif this option or lower clock speed are used!\n" + "Also filters' timbre may be different near these values.\n\n" + + "Default clock speed is 1MHz (1000000Hz).")); + } + + if (altered) { + e->lockSave([&]() { + flags.set("quarterClock",(int)quarterClock); + }); + } + break; + } default: { bool sysPal=flags.getInt("clockSel",0); diff --git a/src/gui/sysPicker.cpp b/src/gui/sysPicker.cpp index 6d10ac754..9aa322836 100644 --- a/src/gui/sysPicker.cpp +++ b/src/gui/sysPicker.cpp @@ -65,6 +65,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) { if (sysSearchQuery.empty()) { // display chip list for (int j=0; curSysSection[j]; j++) { + if (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(curSysSection[j])) continue; ImGui::TableNextRow(); ImGui::TableNextColumn(); if (ImGui::Selectable(e->getSystemName((DivSystem)curSysSection[j]),false,0,ImVec2(500.0f*dpiScale,0.0f))) ret=(DivSystem)curSysSection[j]; @@ -75,6 +76,7 @@ DivSystem FurnaceGUI::systemPicker(bool fullWidth) { } else { // display search results for (DivSystem i: sysSearchResults) { + if (!settings.hiddenSystems && CHECK_HIDDEN_SYSTEM(i)) continue; ImGui::TableNextRow(); ImGui::TableNextColumn(); if (ImGui::Selectable(e->getSystemName(i),false,0,ImVec2(500.0f*dpiScale,0.0f))) ret=i; diff --git a/src/gui/util.cpp b/src/gui/util.cpp index 94e33148a..ed2ae9b31 100644 --- a/src/gui/util.cpp +++ b/src/gui/util.cpp @@ -112,3 +112,109 @@ String getKeyName(int key, bool emptyNone) { } return ret; } + +double sinus(double x) { + return sin(x); +} +double rectSin(double x) { + return sin(x) > 0 ? sin(x) : 0; +} +double absSin(double x) { + return fabs(sin(x)); +} + +double square(double x) { + return fmod(x, (2 * M_PI)) >= M_PI ? -1 : 1; +} +double rectSquare(double x) { + return square(x) > 0 ? square(x) : 0; +} + +double quartSin(double x) { + return absSin(x) * rectSquare(2 * x); +} +double squiSin(double x) { + return sin(x) >= 0 ? sin(2 * x) : 0; +} +double squiAbsSin(double x) { + return fabs(squiSin(x)); +} + +double saw(double x) { + return atan(tan(x / 2)) / (M_PI / 2); +} +double rectSaw(double x) { + return saw(x) > 0 ? saw(x) : 0; +} +double absSaw(double x) { + return saw(x) < 0 ? saw(x) + 1 : saw(x); +} + + +double cubSaw(double x) { + return pow(saw(x), 3); +} +double rectCubSaw(double x) { + return pow(rectSaw(x), 3); +} +double absCubSaw(double x) { + return pow(absSaw(x), 3); +} + +double cubSine(double x) { + return pow(sin(x), 3); +} +double rectCubSin(double x) { + return pow(rectSin(x), 3); +} +double absCubSin(double x) { + return pow(absSin(x), 3); +} +double quartCubSin(double x) { + return pow(quartSin(x), 3); +} +double squishCubSin(double x) { + return pow(squiSin(x), 3); +} +double squishAbsCubSin(double x) { + return pow(squiAbsSin(x), 3); +} + +double triangle(double x) { + return asin(sin(x)) / (M_PI / 2); +} +double rectTri(double x) { + return triangle(x) > 0 ? triangle(x) : 0; +} +double absTri(double x) { + return fabs(triangle(x)); +} +double quartTri(double x) { + return absTri(x) * rectSquare(2 * x); +} +double squiTri(double x) { + return sin(x) >= 0 ? triangle(2 * x) : 0; +} +double absSquiTri(double x) { + return fabs(squiTri(x)); +} + +double cubTriangle(double x) { + return pow(triangle(x), 3); +} +double cubRectTri(double x) { + return pow(rectTri(x), 3); +} +double cubAbsTri(double x) { + return pow(absTri(x), 3); +} +double cubQuartTri(double x) { + return pow(quartTri(x), 3); +} +double cubSquiTri(double x) { + return pow(squiTri(x), 3); +} +double absCubSquiTri(double x) { + return fabs(cubSquiTri(x)); +} + diff --git a/src/gui/util.h b/src/gui/util.h index d82466a25..f21fc0312 100644 --- a/src/gui/util.h +++ b/src/gui/util.h @@ -30,4 +30,37 @@ #endif String getHomeDir(); -String getKeyName(int key, bool emptyNone=false); \ No newline at end of file +String getKeyName(int key, bool emptyNone=false); + +double sinus(double x); +double rectSin(double x); +double absSin(double x); +double square(double x); +double rectSquare(double x); +double quartSin(double x); +double squiSin(double x); +double squiAbsSin(double x); +double saw(double x); +double rectSaw(double x); +double absSaw(double x); +double cubSaw(double x); +double rectCubSaw(double x); +double absCubSaw(double x); +double cubSine(double x); +double rectCubSin(double x); +double absCubSin(double x); +double quartCubSin(double x); +double squishCubSin(double x); +double squishAbsCubSin(double x); +double triangle(double x); +double rectTri(double x); +double absTri(double x); +double quartTri(double x); +double squiTri(double x); +double absSquiTri(double x); +double cubTriangle(double x); +double cubRectTri(double x); +double cubAbsTri(double x); +double cubQuartTri(double x); +double cubSquiTri(double x); +double absCubSquiTri(double x); \ No newline at end of file diff --git a/src/gui/waveEdit.cpp b/src/gui/waveEdit.cpp index 5362937c5..1cda66865 100644 --- a/src/gui/waveEdit.cpp +++ b/src/gui/waveEdit.cpp @@ -19,6 +19,7 @@ #define _USE_MATH_DEFINES #include "gui.h" +#include "util.h" #include "plot_nolerp.h" #include "IconsFontAwesome4.h" #include "misc/cpp/imgui_stdlib.h" @@ -40,111 +41,6 @@ const char* waveInterpolations[4]={ _N("Cubic") }; -double sinus(double x) { - return sin(x); -} -double rectSin(double x) { - return sin(x) > 0 ? sin(x) : 0; -} -double absSin(double x) { - return fabs(sin(x)); -} - -double square(double x) { - return fmod(x, (2 * M_PI)) >= M_PI ? -1 : 1; -} -double rectSquare(double x) { - return square(x) > 0 ? square(x) : 0; -} - -double quartSin(double x) { - return absSin(x) * rectSquare(2 * x); -} -double squiSin(double x) { - return sin(x) >= 0 ? sin(2 * x) : 0; -} -double squiAbsSin(double x) { - return fabs(squiSin(x)); -} - -double saw(double x) { - return atan(tan(x / 2)) / (M_PI / 2); -} -double rectSaw(double x) { - return saw(x) > 0 ? saw(x) : 0; -} -double absSaw(double x) { - return saw(x) < 0 ? saw(x) + 1 : saw(x); -} - - -double cubSaw(double x) { - return pow(saw(x), 3); -} -double rectCubSaw(double x) { - return pow(rectSaw(x), 3); -} -double absCubSaw(double x) { - return pow(absSaw(x), 3); -} - -double cubSine(double x) { - return pow(sin(x), 3); -} -double rectCubSin(double x) { - return pow(rectSin(x), 3); -} -double absCubSin(double x) { - return pow(absSin(x), 3); -} -double quartCubSin(double x) { - return pow(quartSin(x), 3); -} -double squishCubSin(double x) { - return pow(squiSin(x), 3); -} -double squishAbsCubSin(double x) { - return pow(squiAbsSin(x), 3); -} - -double triangle(double x) { - return asin(sin(x)) / (M_PI / 2); -} -double rectTri(double x) { - return triangle(x) > 0 ? triangle(x) : 0; -} -double absTri(double x) { - return fabs(triangle(x)); -} -double quartTri(double x) { - return absTri(x) * rectSquare(2 * x); -} -double squiTri(double x) { - return sin(x) >= 0 ? triangle(2 * x) : 0; -} -double absSquiTri(double x) { - return fabs(squiTri(x)); -} - -double cubTriangle(double x) { - return pow(triangle(x), 3); -} -double cubRectTri(double x) { - return pow(rectTri(x), 3); -} -double cubAbsTri(double x) { - return pow(absTri(x), 3); -} -double cubQuartTri(double x) { - return pow(quartTri(x), 3); -} -double cubSquiTri(double x) { - return pow(squiTri(x), 3); -} -double absCubSquiTri(double x) { - return fabs(cubSquiTri(x)); -} - typedef double (*WaveFunc) (double a); WaveFunc waveFuncs[]={ @@ -495,7 +391,7 @@ void FurnaceGUI::drawWaveEdit() { ImGui::TableNextColumn(); ImGui::Text(_("Width")); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine, SCC, Konami Bubble System, Namco WSG, Virtual Boy and WonderSwan\n- 64 on FDS\n- 128 on X1-010\nany other widths will be scaled during playback.")); + ImGui::SetTooltip(_("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine, SCC, Konami Bubble System, Namco WSG, Virtual Boy and WonderSwan\n- 64 on FDS\n- 128 on X1-010\n- 256 on SID3\nany other widths will be scaled during playback.")); } ImGui::SameLine(); ImGui::SetNextItemWidth(96.0f*dpiScale); @@ -509,7 +405,7 @@ void FurnaceGUI::drawWaveEdit() { ImGui::SameLine(); ImGui::Text(_("Height")); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("use a height of:\n- 16 for Game Boy, WonderSwan, Namco WSG, Konami Bubble System, X1-010 Envelope shape and N163\n- 32 for PC Engine\n- 64 for FDS and Virtual Boy\n- 256 for X1-010 and SCC\nany other heights will be scaled during playback.")); + ImGui::SetTooltip(_("use a height of:\n- 16 for Game Boy, WonderSwan, Namco WSG, Konami Bubble System, X1-010 Envelope shape and N163\n- 32 for PC Engine\n- 64 for FDS and Virtual Boy\n- 256 for X1-010, SCC and SID3\nany other heights will be scaled during playback.")); } ImGui::SameLine(); ImGui::SetNextItemWidth(96.0f*dpiScale); @@ -947,6 +843,7 @@ void FurnaceGUI::drawWaveEdit() { wave->len=waveGenScaleX; MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::TableNextRow(); @@ -965,6 +862,7 @@ void FurnaceGUI::drawWaveEdit() { wave->max=waveGenScaleY-1; MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::TableNextRow(); @@ -987,6 +885,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::TableNextRow(); @@ -1004,6 +903,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::TableNextRow(); @@ -1030,6 +930,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::TableNextRow(); @@ -1049,6 +950,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::EndTable(); @@ -1092,6 +994,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } if (ImGui::Button(_("Invert"),buttonSizeHalf)) { e->lockEngine([this,wave]() { @@ -1100,6 +1003,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::SameLine(); if (ImGui::Button(_("Reverse"),buttonSizeHalf)) { @@ -1112,6 +1016,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } if (ImGui::Button(_("Half"),buttonSizeHalf)) { @@ -1121,6 +1026,7 @@ void FurnaceGUI::drawWaveEdit() { for (int i=0; ilen; i++) { wave->data[i]=origData[i>>1]; } + e->notifyWaveChange(curWave); MARK_MODIFIED; } ImGui::SameLine(); @@ -1131,6 +1037,7 @@ void FurnaceGUI::drawWaveEdit() { for (int i=0; ilen; i++) { wave->data[i]=origData[(i*2)%wave->len]; } + e->notifyWaveChange(curWave); MARK_MODIFIED; } @@ -1145,6 +1052,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } if (ImGui::Button(_("Randomize"),buttonSize)) { if (wave->max>0) e->lockEngine([this,wave]() { @@ -1153,6 +1061,7 @@ void FurnaceGUI::drawWaveEdit() { } MARK_MODIFIED; }); + e->notifyWaveChange(curWave); } ImGui::EndTabItem(); } diff --git a/src/icon/furIcons.h b/src/icon/furIcons.h index 71df76fd2..57bb8bf7e 100644 --- a/src/icon/furIcons.h +++ b/src/icon/furIcons.h @@ -1,7 +1,7 @@ // not auto-generated. update every time you change icons.ttf! #define ICON_MIN_FUR 0xe0f0 -#define ICON_MAX_FUR 0xe161 +#define ICON_MAX_FUR 0xe164 // test #define ICON_FUR_TEST0 u8"\ue0f0" @@ -73,10 +73,11 @@ #define ICON_FUR_INS_NDS u8"\ue15d" #define ICON_FUR_INS_GBA_DMA u8"\ue15e" #define ICON_FUR_INS_GBA_MINMOD u8"\ue15f" -#define ICON_FUR_INS_BIFURCATOR u8"\ue160" +#define ICON_FUR_INS_BIFURCATOR u8"\ue160" #define ICON_FUR_INS_SID2 u8"\ue161" #define ICON_FUR_INS_SUPERVISION u8"\ue162" #define ICON_FUR_INS_UPD1771C u8"\ue163" +#define ICON_FUR_INS_SID3 u8"\ue164" // sample editor #define ICON_FUR_SAMPLE_APPLY_SILENCE u8"\ue136" diff --git a/src/main.cpp b/src/main.cpp index 30b551a83..b1e2afd18 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -339,6 +339,9 @@ TAParamResult pVersion(String) { printf("- PowerNoise emulator by scratchminer (MIT)\n"); printf("- ep128emu by Istvan Varga (GPLv2)\n"); printf("- NDS sound emulator by cam900 (zlib license)\n"); + printf("- SID2 emulator by LTVA (GPLv2, modification of reSID emulator)\n"); + printf("- SID3 emulator by LTVA (MIT)\n"); + printf("- openMSX YMF278 emulator (modified version) by the openMSX developers (GPLv2)\n"); return TA_PARAM_QUIT; }