diff --git a/css/ui.css b/css/ui.css index 6426f5d1..e4231107 100644 --- a/css/ui.css +++ b/css/ui.css @@ -138,10 +138,6 @@ div.mem_info a.selected { .btn_recording { color: #ff3333; } -.seg_code { color: #ff9966; } -.seg_data { color: #66ff66; } -.seg_stack { color: #ffff66; } -.seg_unknown { color: #cccccc; } span.hilite { color: #ff66ff; } @@ -413,6 +409,11 @@ div.markdown th { border-color: #ffffff; cursor: pointer; } +.seg_code { color: #ccddff; } +.seg_data { color: #aaeeaa; } +.seg_io { color: #ffcccc; } +.seg_stack { color: #ffff66; } +.seg_unknown { color: #cccccc; } .segment.segment-ram { background-color:#aaeeaa; } diff --git a/doc/notes.txt b/doc/notes.txt index b6ed419a..a8196fe3 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -92,6 +92,7 @@ TODO: - game starts even if switched away before first load - vcs: break on # of lines changed (maybe using getRasterPosition?) - profiler restarts when paused +- it's pretty easy to add a new file named like a library file (bcd.c) WEB WORKER FORMAT diff --git a/presets/nes/apu.h b/presets/nes/apu.h index 319406f4..3dc38bfd 100644 --- a/presets/nes/apu.h +++ b/presets/nes/apu.h @@ -43,15 +43,25 @@ #define APU_PULSE_CONTROL(channel,duty,decay)\ APU.pulse[channel].control = (duty) | (decay); +#define APU_PULSE_SWEEP(channel,period,shift,up)\ + APU.pulse[channel].ramp = 0x80 | (period<<4) | (up?8:0) | shift; + +#define APU_PULSE_SWEEP_DISABLE(channel)\ + APU.pulse[channel].ramp = 0; // triangle channel #define TRIANGLE_LC_HALT 0x80 #define TRIANGLE_LC_MASK 0x7f +#define APU_TRIANGLE_LENGTH(period,len)\ + APU.triangle.counter = 0x7f;\ + APU.triangle.period_low = (period)&0xff;\ + APU.triangle.len_period_high = (((period)>>8)&7) | ((len)<<3); + #define APU_TRIANGLE_SUSTAIN(period)\ - APU.triangle.counter = 0xc0;\ - APU.triangle.period_low = (period) & 0xff;\ - APU.triangle.len_period_high = (period) >> 8; + APU.triangle.counter = 0xff;\ + APU.triangle.period_low = (period)&0xff;\ + APU.triangle.len_period_high = (((period)>>8)&7); // noise channel #define NOISE_ENVLOOP 0x20 diff --git a/presets/nes/aputest.c b/presets/nes/aputest.c new file mode 100644 index 00000000..90095eaf --- /dev/null +++ b/presets/nes/aputest.c @@ -0,0 +1,100 @@ + +#include +#include +#include +#include "neslib.h" + +#include "apu.h" +//#link "apu.c" + +// link the pattern table into CHR ROM +//#link "chr_generic.s" + +typedef struct APUParam { + byte chmask; + const char* name; + word valmask; +} APUParam; + +#define APU_DEFCOUNT 20 + +const APUParam APU_DEFS[APU_DEFCOUNT] = { + {0x01, "Pulse1 Period", 0x7ff }, + {0x01, "Pulse1 Duty", 0xc0 }, + {0x01, "Pulse1 Decay", 0x0f }, + {0x01, "Pulse1 Length", 0x0f }, + {0x01, "Pulse1 Sweep Period", 0x07 }, + {0x01, "Pulse1 Sweep Rate", 0x07 }, + {0x01, "Pulse1 Sweep Up?", 0x01 }, + {0x02, "Pulse2 Period", 0x7ff }, + {0x02, "Pulse2 Duty", 0xc0 }, + {0x02, "Pulse2 Decay", 0x0f }, + {0x02, "Pulse2 Length", 0x0f }, + {0x02, "Pulse2 Sweep Period", 0x07 }, + {0x02, "Pulse2 Sweep Rate", 0x07 }, + {0x02, "Pulse2 Sweep Up?", 0x01 }, + {0x04, "Triangle Period", 0x7ff }, + {0x04, "Triangle Length", 0x0f }, + {0x08, "Noise Period", 0x0f }, + {0x08, "Noise Decay", 0x0f }, + {0x08, "Noise Length", 0x0f }, + {0x08, "Noise Buzz", NOISE_PERIOD_BUZZ }, +}; + +word enmask; +word vals[APU_DEFCOUNT]; + +void random_sound() { + byte i; + + do { + enmask = rand() & 15; // all except DMC + } while (enmask == 0); + + for (i=0; i= 10) { - ++c; - d -= 10; - } - result |= d << shift; - shift += 4; - a >>= 4; - b >>= 4; - } - return result; + register word c, d; // intermediate values + c = a + 0x0666; // add 6 to each BCD digit + d = c ^ b; // sum without carry propagation + c += b; // provisional sum + d = ~(c ^ d) & 0x1110; // just the BCD carry bits + d = (d >> 2) | (d >> 3); // correction + return c - d; // corrected BCD sum } diff --git a/presets/nes/bcd.h b/presets/nes/bcd.h index 25926d6c..b8daf0d0 100644 --- a/presets/nes/bcd.h +++ b/presets/nes/bcd.h @@ -1,2 +1,3 @@ unsigned int bcd_add(unsigned int a, unsigned int b); +unsigned int bcd_add2(unsigned int a, unsigned int b); diff --git a/presets/nes/music.c b/presets/nes/music.c index 63134dda..37b98b4d 100644 --- a/presets/nes/music.c +++ b/presets/nes/music.c @@ -31,7 +31,7 @@ const int note_table_63[64] = { const int note_table_tri[64] = { 2138, 2018, 1905, 1798, 1697, 1602, 1512, 1427, 1347, 1272, 1200, 1133, 1069, 1009, 953, 899, 849, 801, 756, 714, 674, 636, 601, 567, 535, 505, 477, 450, 425, 401, 379, 358, 338, 319, 301, 284, 268, 253, 239, 226, 213, 201, 190, 179, 169, 160, 151, 142, 135, 127, 120, 113, 107, 101, 95, 90, 85, 80, 76, 72, 68, 64, 60, 57, }; -const int* note_table = note_table_63; +#define note_table note_table_49 byte music_index = 0; byte cur_duration = 0; @@ -43,22 +43,38 @@ byte next_music_byte() { } void play_music() { - static byte ch = 0; + static byte chs = 0; if (music_ptr) { + // run out duration timer yet? while (cur_duration == 0) { + // fetch next byte in score byte note = next_music_byte(); + // is this a note? if ((note & 0x80) == 0) { - int period = note_table[note & 63]; - if (ch == 0) { - APU_PULSE_DECAY(0, period, DUTY_25, 2, 10); + // pulse plays higher notes, triangle for lower if it's free + if (note >= 36 || (chs & 4)) { + int period = note_table[note & 63]; + // see which pulse generator is free + if (!(chs & 1)) { + APU_PULSE_DECAY(0, period, DUTY_25, 2, 10); + chs |= 1; + } else if (!(chs & 2)) { + APU_PULSE_DECAY(1, period, DUTY_25, 2, 10); + chs |= 2; + } } else { - APU_PULSE_DECAY(1, period, DUTY_25, 2, 10); + int period = note_table_tri[note & 63]; + APU_TRIANGLE_LENGTH(period, 15); + chs |= 4; } - ch = ch^1; } else { + // end of score marker if (note == 0xff) music_ptr = NULL; + // set duration until next note cur_duration = note & 63; + // reset channel used mask + chs = 0; } } cur_duration--; @@ -85,158 +101,5 @@ void main(void) // MUSIC DATA -- "The Easy Winners" by Scott Jopline // const byte music1[] = { - 0x2a,0x1e,0x98,0x33,0x27,0xa4,0x31,0x25,0x8c,0x2f,0x23,0x8c,0x2e,0x22,0x8c,0x2c, - 0x20,0x8c,0x2a,0x1e,0x98,0x28,0x1c,0x8c,0x27,0x1b,0x98,0x25,0x19,0x8c,0x23,0x17, - 0x8c,0x22,0x12,0x8c,0x23,0x8c,0x25,0x8c,0x27,0x8c,0x28,0x1e,0x8c,0x2a,0x1c,0x8c, - 0x2c,0x1b,0x8c,0x2e,0x19,0x8c,0x2f,0x17,0x98,0x1e,0x98,0x12,0x98,0x1e,0x98,0x2f, - 0x17,0x98,0x33,0x27,0x98,0x12,0x98,0x36,0x1e,0x98,0x38,0x17,0x8c,0x36,0x8c,0x1e, - 0x8c,0x38,0x8c,0x33,0x12,0x8c,0x38,0x8c,0x36,0x1e,0x98,0x3d,0x10,0x8c,0x3b,0x8c, - 0x20,0x8c,0x37,0x8c,0x3b,0x10,0x8c,0x3d,0x8c,0x3b,0x28,0x8c,0x36,0x8c,0x17,0x98, - 0x2a,0x1e,0x8c,0x2c,0x8c,0x2e,0x12,0x8c,0x2f,0x8c,0x31,0x1e,0x8c,0x32,0x8c,0x33, - 0x17,0x98,0x33,0x1e,0x98,0x12,0x98,0x33,0x1e,0x98,0x38,0x17,0x8c,0x36,0x8c,0x27, - 0x8c,0x38,0x8c,0x36,0x18,0x8c,0x36,0x8c,0x33,0x21,0x98,0x36,0x19,0x8c,0x2e,0x8c, - 0x22,0x8c,0x36,0x8c,0x2f,0x19,0x8c,0x36,0x8c,0x2f,0x25,0x98,0x2e,0x1e,0x98,0x1c, - 0x98,0x1b,0x8c,0x2a,0x8c,0x2e,0x25,0x8c,0x34,0x8c,0x33,0x17,0x98,0x33,0x1e,0x98, - 0x12,0x98,0x33,0x27,0x98,0x38,0x17,0x8c,0x36,0x8c,0x1e,0x8c,0x38,0x8c,0x36,0x12, - 0x8c,0x38,0x8c,0x33,0x1e,0x98,0x3d,0x10,0x8c,0x3b,0x8c,0x20,0x8c,0x3d,0x8c,0x3b, - 0x1c,0x8c,0x3b,0x8c,0x38,0x1c,0x8c,0x3f,0x8c,0x1b,0x8c,0x33,0x8c,0x37,0x22,0x8c, - 0x3a,0x8c,0x3f,0x0f,0x98,0x3a,0x8c,0x3b,0x8c,0x3d,0x10,0x8c,0x3b,0x8c,0x20,0x8c, - 0x3d,0x8c,0x38,0x10,0x8c,0x3d,0x8c,0x3b,0x28,0x8c,0x36,0x8c,0x17,0x8c,0x34,0x8c, - 0x36,0x1e,0x8c,0x34,0x8c,0x33,0x17,0x8c,0x36,0x8c,0x27,0x8c,0x36,0x8c,0x30,0x12, - 0x8c,0x34,0x8c,0x1e,0x8c,0x36,0x8c,0x34,0x12,0x8c,0x33,0x8c,0x28,0x1e,0x98,0x2f, - 0x1e,0x98,0x12,0x98,0x14,0x98,0x16,0x98,0x33,0x17,0x98,0x33,0x27,0x98,0x12,0x98, - 0x33,0x1e,0x98,0x38,0x17,0x8c,0x36,0x8c,0x1e,0x8c,0x38,0x8c,0x36,0x12,0x8c,0x38, - 0x8c,0x33,0x1e,0x98,0x3d,0x10,0x8c,0x3b,0x8c,0x20,0x8c,0x3d,0x8c,0x3b,0x10,0x8c, - 0x3d,0x8c,0x38,0x28,0x8c,0x36,0x8c,0x17,0x98,0x2a,0x1e,0x8c,0x2c,0x8c,0x2e,0x12, - 0x8c,0x2f,0x8c,0x31,0x1e,0x8c,0x32,0x8c,0x33,0x17,0x98,0x33,0x1e,0x98,0x12,0x98, - 0x36,0x1e,0x98,0x38,0x17,0x8c,0x36,0x8c,0x27,0x8c,0x32,0x8c,0x36,0x18,0x8c,0x36, - 0x8c,0x36,0x21,0x98,0x36,0x19,0x8c,0x2e,0x8c,0x22,0x8c,0x36,0x8c,0x35,0x19,0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33,0x8c,0x12,0x8c,0x36,0x8c,0x31,0x1e,0x8c,0x33, - 0x8c,0x34,0x25,0x8c,0x3d,0x8c,0x1e,0x8c,0x33,0x8c,0x34,0x12,0x8c,0x3d,0x8c,0x1e, - 0x8c,0x33,0x8c,0x34,0x25,0x8c,0x3d,0x8c,0x1e,0x8c,0x3b,0x8c,0x3a,0x12,0x8c,0x38, - 0x8c,0x36,0x16,0x8c,0x34,0x8c,0x33,0x17,0x8c,0x3b,0x8c,0x27,0x8c,0x32,0x8c,0x33, - 0x12,0x8c,0x3b,0x8c,0x1e,0x8c,0x32,0x8c,0x33,0x17,0x8c,0x3b,0x8c,0x27,0x8c,0x38, - 0x8c,0x36,0x12,0x8c,0x33,0x8c,0x31,0x1e,0x8c,0x2f,0x8c,0x2e,0x14,0x8c,0x2f,0x8c, - 0x30,0x2a,0x8c,0x30,0x8c,0x18,0x8c,0x36,0x8c,0x33,0x20,0x8c,0x30,0x8c,0x2e,0x1b, - 0x8c,0x2f,0x8c,0x30,0x2a,0x8c,0x30,0x8c,0x14,0x8c,0x33,0x8c,0x38,0x20,0x8c,0x33, - 0x8c,0x31,0x19,0x8c,0x30,0x8c,0x31,0x28,0x8c,0x2c,0x8c,0x1c,0x8c,0x30,0x8c,0x31, - 0x20,0x8c,0x34,0x8c,0x38,0x19,0x8c,0x33,0x8c,0x34,0x20,0x8c,0x31,0x8c,0x25,0x8c, - 0x2c,0x8c,0x28,0x8c,0x25,0x8c,0x26,0x1d,0x8c,0x29,0x20,0x8c,0x2c,0x23,0x8c,0x2f, - 0x26,0x8c,0x32,0x29,0x8c,0x32,0x29,0x98,0x32,0x29,0x98,0x35,0x8c,0x38,0x8c,0x32, - 0x8c,0x3e,0xb0,0x3f,0x8c,0x3b,0x8c,0x36,0x8c,0x33,0x8c,0x33,0x8c,0x2f,0x8c,0x27, - 0x8c,0x2a,0x8c,0x28,0x12,0x8c,0x28,0x8c,0x12,0x8c,0x2f,0x8c,0x17,0x98,0x2a,0x8c, - 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20,0x8c,0x31,0x8c,0x25,0x8c,0x2c,0x8c, - 0x28,0x8c,0x25,0x8c,0x26,0x1d,0x8c,0x29,0x20,0x8c,0x2c,0x23,0x8c,0x2f,0x26,0x8c, - 0x32,0x29,0x8c,0x32,0x29,0x98,0x32,0x29,0x98,0x35,0x8c,0x2f,0x8c,0x3b,0x8c,0x3e, - 0xb0,0x3f,0x8c,0x3b,0x8c,0x36,0x8c,0x33,0x8c,0x33,0x8c,0x2f,0x8c,0x27,0x8c,0x2a, - 0x8c,0x28,0x1e,0x8c,0x28,0x8c,0x12,0x8c,0x2f,0x8c,0x17,0x98,0x2a,0x98,0x33,0x17, - 0x98,0x33,0x1e,0x98,0x12,0x98,0x33,0x1e,0x98,0x38,0x17,0x8c,0x36,0x8c,0x1e,0x8c, - 0x38,0x8c,0x36,0x12,0x8c,0x38,0x8c,0x33,0x27,0x98,0x3d,0x10,0x8c,0x3b,0x8c,0x20, - 0x8c,0x3d,0x8c,0x3b,0x10,0x8c,0x37,0x8c,0x3b,0x20,0x8c,0x36,0x8c,0x17,0x98,0x2a, - 0x1e,0x8c,0x2c,0x8c,0x2e,0x12,0x8c,0x2f,0x8c,0x31,0x1e,0x8c,0x32,0x8c,0x33,0x17, - 0x98,0x33,0x27,0x98,0x12,0x98,0x36,0x1e,0x98,0x38,0x17,0x8c,0x33,0x8c,0x27,0x8c, - 0x38,0x8c,0x36,0x18,0x8c,0x36,0x8c,0x36,0x21,0x98,0x36,0x19,0x8c,0x31,0x8c,0x22, - 0x8c,0x36,0x8c,0x2f,0x19,0x8c,0x36,0x8c,0x2f,0x25,0x98,0x36,0x1e,0x98,0x1c,0x98, - 0x1b,0x8c,0x2a,0x8c,0x2e,0x25,0x8c,0x34,0x8c,0x33,0x17,0x98,0x33,0x1e,0x98,0x12, - 0x98,0x36,0x27,0x98,0x38,0x17,0x8c,0x33,0x8c,0x1e,0x8c,0x38,0x8c,0x36,0x12,0x8c, - 0x38,0x8c,0x36,0x1e,0x98,0x3d,0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b,0x14, - 0x8c,0x38,0x8c,0x31,0x15,0x8c,0x39,0x8c,0x25,0x8c,0x36,0x8c,0x30,0x2a,0x8c,0x39, - 0x8c,0x1f,0x8c,0x36,0x8c,0x2f,0x20,0x8c,0x34,0x8c,0x38,0x23,0x8c,0x3d,0x8c,0x1c, - 0x8c,0x3b,0x8c,0x38,0x2c,0x8c,0x34,0x8c,0x36,0x19,0x8c,0x38,0x8c,0x36,0x28,0x8c, - 0x34,0x8c,0x33,0x12,0x8c,0x34,0x8c,0x2e,0x8c,0x31,0x8c,0x2f,0x23,0x98,0x32,0x1d, - 0x8c,0x36,0x1e,0x8c,0x33,0x17,0x98,0x2f,0x20,0x98,0x31,0x21,0x8c,0x39,0x8c,0x25, - 0x8c,0x36,0x8c,0x30,0x1e,0x8c,0x39,0x8c,0x1f,0x8c,0x36,0x8c,0x2c,0x8c,0x2f,0x8c, - 0x34,0x23,0x8c,0x38,0x8c,0x3d,0x1c,0x8c,0x3b,0x8c,0x38,0x23,0x8c,0x34,0x8c,0x33, - 0x23,0x8c,0x3b,0x8c,0x36,0x23,0x8c,0x33,0x8c,0x31,0x1e,0x8c,0x33,0x8c,0x1f,0x8c, - 0x2f,0x8c,0x2c,0x8c,0x34,0x8c,0x38,0x1c,0x8c,0x3b,0x8c,0x38,0x17,0x8c,0x3d,0x8c, - 0x3b,0x14,0x8c,0x38,0x8c,0x31,0x15,0x8c,0x39,0x8c,0x25,0x8c,0x36,0x8c,0x30,0x1e, - 0x8c,0x39,0x8c,0x21,0x8c,0x36,0x8c,0x20,0x8c,0x2f,0x8c,0x34,0x1c,0x8c,0x38,0x8c, - 0x3d,0x23,0x8c,0x3b,0x8c,0x38,0x1c,0x8c,0x2f,0x8c,0x2e,0x19,0x8c,0x31,0x8c,0x12, - 0x98,0x2d,0x0b,0x8c,0x33,0x98,0x2c,0x8c,0x1c,0x98,0x38,0x1c,0x8c,0x34,0x8c,0x36, - 0x17,0x8c,0x38,0x8c,0x2f,0x14,0x8c,0x30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x8c,0x32,0x14,0x8c,0x38,0x8c,0x31,0x21,0x8c,0x39,0x8c,0x19,0x8c,0x36,0x8c,0x30, - 0x1e,0x8c,0x39,0x8c,0x21,0x8c,0x36,0x8c,0x20,0x8c,0x2f,0x8c,0x34,0x28,0x8c,0x38, - 0x8c,0x3d,0x17,0x8c,0x3b,0x8c,0x38,0x1c,0x8c,0x2f,0x8c,0x2e,0x19,0x8c,0x31,0x8c, - 0x12,0x98,0x2d,0x17,0x8c,0x36,0x98,0x2c,0x8c,0x10,0x98,0x17,0x98,0x34,0x10,0x8c, - 0x2f,0x8c,0x31,0x8c,0x3e,0x8c,0x33,0x1e,0x98,0x2f,0x23,0x8c,0x31,0x8c,0x23,0x98, - 0x23,0x98,0x33,0x12,0x98,0x2f,0x23,0x8c,0x31,0x8c,0x1e,0x8c,0x2f,0x17,0x8c,0x31, - 0x16,0x8c,0x33,0x15,0x8c,0x34,0x14,0x98,0x3b,0x2c,0x8c,0x31,0x8c,0x1c,0x98,0x23, - 0x98,0x34,0x14,0x98,0x3b,0x2c,0x8c,0x31,0x8c,0x1c,0x98,0x1d,0x98,0x1e,0x98,0x3d, - 0x2d,0x8c,0x3b,0x8c,0x17,0x98,0x23,0x98,0x1b,0x98,0x3d,0x2d,0x8c,0x33,0x8c,0x17, - 0x98,0x23,0x98,0x1c,0x98,0x3d,0x2c,0x8c,0x34,0x8c,0x17,0x98,0x23,0x98,0x1c,0x98, - 0x3d,0x2c,0x8c,0x3b,0x8c,0x20,0x8c,0x2f,0x8c,0x31,0x1f,0x8c,0x32,0x8c,0x3f,0x1e, - 0x98,0x2f,0x2d,0x8c,0x31,0x8c,0x17,0x98,0x23,0x98,0x3f,0x12,0x98,0x2f,0x2d,0x8c, - 0x31,0x8c,0x12,0x8c,0x2f,0x17,0x8c,0x3d,0x16,0x8c,0x33,0x15,0x8c,0x34,0x20,0x98, - 0x2f,0x23,0x8c,0x3d,0x8c,0x1c,0x98,0x23,0x98,0x2c,0x8c,0x34,0x8c,0x38,0x1c,0x8c, - 0x3b,0x8c,0x38,0x17,0x8c,0x3d,0x8c,0x32,0x14,0x8c,0x38,0x8c,0x31,0x15,0x8c,0x39, - 0x8c,0x25,0x8c,0x36,0x8c,0x30,0x1e,0x8c,0x39,0x8c,0x21,0x8c,0x36,0x8c,0x20,0x8c, - 0x2f,0x8c,0x34,0x1c,0x8c,0x38,0x8c,0x3d,0x23,0x8c,0x3b,0x8c,0x38,0x1c,0x8c,0x2f, - 0x8c,0x2e,0x19,0x8c,0x31,0x8c,0x12,0x98,0x2d,0x17,0x8c,0x36,0x98,0x2c,0x8c,0x2c, - 0x10,0x98,0x17,0x98,0x34,0x20,0x8c,0x2f,0x8c,0x3d,0x1f,0x8c,0x32,0x8c,0x33,0x2a, - 0x98,0x2f,0x23,0x8c,0x3d,0x8c,0x17,0x98,0x23,0x98,0x33,0x1e,0x98,0x2f,0x23,0x8c, - 0x3d,0x8c,0x12,0x8c,0x2f,0x17,0x8c,0x31,0x16,0x8c,0x33,0x21,0x8c,0x38,0x14,0x98, - 0x2f,0x23,0x8c,0x31,0x8c,0x1c,0x98,0x2c,0x98,0x38,0x14,0x98,0x2f,0x23,0x8c,0x31, - 0x8c,0x1c,0x98,0x29,0x98,0x1e,0x98,0x3d,0x23,0x8c,0x33,0x8c,0x17,0x98,0x2d,0x98, - 0x1b,0x98,0x3d,0x23,0x8c,0x33,0x8c,0x17,0x98,0x2d,0x98,0x1c,0x98,0x3d,0x23,0x8c, - 0x34,0x8c,0x17,0x98,0x2c,0x98,0x1c,0x98,0x3d,0x23,0x8c,0x3b,0x8c,0x20,0x8c,0x2f, - 0x8c,0x31,0x2b,0x8c,0x32,0x8c,0x3f,0x1e,0x98,0x2f,0x23,0x8c,0x31,0x8c,0x17,0x98, - 0x2d,0x98,0x3f,0x12,0x98,0x2f,0x23,0x8c,0x31,0x8c,0x12,0x8c,0x3b,0x23,0x8c,0x31, - 0x16,0x8c,0x33,0x15,0x8c,0x34,0x14,0x98,0x2f,0x23,0x8c,0x3d,0x8c,0x28,0x98,0x23, - 0x98,0x20,0x8c,0x34,0x8c,0x38,0x1c,0x8c,0x3b,0x8c,0x38,0x23,0x8c,0x3d,0x8c,0x3b, - 0x14,0x8c,0x38,0x8c,0x31,0x15,0x8c,0x39,0x8c,0x19,0x8c,0x36,0x8c,0x30,0x1e,0x8c, - 0x39,0x8c,0x2d,0x8c,0x36,0x8c,0x20,0x8c,0x2f,0x8c,0x34,0x1c,0x8c,0x38,0x8c,0x3d, - 0x17,0x8c,0x3b,0x8c,0x38,0x1c,0x8c,0x2f,0x8c,0x2e,0x25,0x8c,0x31,0x8c,0x12,0x98, - 0x2d,0x0b,0x8c,0x33,0x98,0x2c,0x8c,0x2c,0x10,0x98,0x17,0x98,0x34,0x10,0xff, -}; \ No newline at end of file +0x2a,0x1e,0x95,0x33,0x27,0x9f,0x31,0x25,0x8a,0x2f,0x23,0x8b,0x2e,0x22,0x89,0x2c,0x20,0x8b,0x2a,0x1e,0x95,0x28,0x1c,0x8a,0x27,0x1b,0x95,0x25,0x19,0x8b,0x23,0x17,0x89,0x22,0x12,0x8b,0x23,0x8a,0x25,0x8b,0x27,0x89,0x28,0x1e,0x8c,0x2a,0x1c,0x89,0x2c,0x1b,0x8c,0x2e,0x19,0x89,0x2f,0x17,0x95,0x27,0x23,0x1e,0x95,0x12,0x95,0x23,0x1e,0x27,0x95,0x2f,0x33,0x17,0x95,0x2f,0x33,0x27,0x94,0x12,0x95,0x33,0x36,0x23,0x95,0x38,0x32,0x17,0x8b,0x33,0x36,0x89,0x1e,0x27,0x23,0x8b,0x38,0x32,0x8a,0x33,0x36,0x12,0x8b,0x32,0x38,0x89,0x36,0x33,0x27,0x95,0x3d,0x37,0x10,0x8b,0x3b,0x38,0x8a,0x20,0x23,0x28,0x8b,0x37,0x3d,0x89,0x38,0x3b,0x10,0x8b,0x37,0x3d,0x8a,0x3b,0x38,0x28,0x8b,0x36,0x33,0x8a,0x17,0x95,0x2a,0x1e,0x23,0x8b,0x2c,0x89,0x2e,0x12,0x8b,0x2f,0x8a,0x31,0x27,0x23,0x8b,0x32,0x89,0x2f,0x33,0x17,0x95,0x33,0x2f,0x1e,0x95,0x12,0x94,0x36,0x33,0x1e,0x95,0x32,0x38,0x17,0x8b,0x36,0x33,0x89,0x23,0x1e,0x27,0x8b,0x38,0x32,0x8a,0x33,0x36,0x18,0x8b,0x33,0x36,0x8a,0x33,0x36,0x2a,0x95,0x36,0x19,0x8b,0x31,0x2e,0x89,0x25,0x22,0x2a,0x8b,0x36,0x8a,0x2f,0x35,0x19,0x8b,0x36,0x89,0x38,0x2f,0x29,0x95,0x2e,0x36,0x1e,0x95,0x1c,0x28,0x95,0x27,0x1b,0x8b,0x2a,0x8a,0x2e,0x25,0x19,0x8b,0x34,0x89,0x33,0x2f,0x23,0x95,0x33,0x2f,0x1e,0x95,0x12,0x94,0x33,0x36,0x23,0x95,0x32,0x38,0x17,0x8b,0x33,0x36,0x8a,0x23,0x27,0x1e,0x8b,0x38,0x32,0x89,0x36,0x33,0x12,0x8b,0x32,0x38,0x8a,0x33,0x36,0x1e,0x94,0x37,0x3d,0x10,0x8b,0x3b,0x38,0x8a,0x23,0x28,0x20,0x8b,0x3d,0x37,0x89,0x3b,0x38,0x1c,0x8b,0x38,0x3b,0x8a,0x3a,0x3d,0x38,0x8b,0x3f,0x37,0x3a,0x89,0x27,0x1b,0x8b,0x33,0x8a,0x37,0x22,0x16,0x8b,0x3a,0x8a,0x3f,0x0f,0x1b,0x95,0x3a,0x8b,0x3b,0x8a,0x3d,0x37,0x1c,0x8b,0x3b,0x38,0x89,0x23,0x28,0x20,0x8b,0x3d,0x37,0x8a,0x38,0x3b,0x10,0x8b,0x3d,0x37,0x89,0x38,0x3b,0x20,0x8b,0x36,0x33,0x8a,0x17,0x23,0x8b,0x38,0x34,0x8a,0x33,0x36,0x1e,0x8b,0x31,0x34,0x8a,0x2f,0x33,0x17,0x8b,0x36,0x33,0x8a,0x23,0x27,0x1e,0x8b,0x33,0x36,0x8a,0x36,0x30,0x12,0x8a,0x34,0x31,0x8a,0x1e,0x28,0x22,0x8b,0x30,0x36,0x89,0x34,0x31,0x12,0x8b,0x2e,0x28,0x33,0x8a,0x31,0x28,0x2e,0x95,0x27,0x2f,0x1e,0x95,0x12,0x95,0x14,0x94,0x16,0x95,0x2f,0x33,0x17,0x95,0x2f,0x33,0x27,0x94,0x12,0x95,0x36,0x33,0x23,0x95,0x32,0x38,0x17,0x8a,0x33,0x36,0x8a,0x23,0x27,0x1e,0x8b,0x32,0x38,0x8a,0x33,0x36,0x12,0x8b,0x38,0x32,0x8a,0x36,0x33,0x27,0x95,0x3d,0x37,0x10,0x8a,0x3b,0x38,0x8a,0x23,0x28,0x20,0x8b,0x37,0x3d,0x89,0x3b,0x38,0x10,0x8b,0x37,0x3d,0x8a,0x38,0x3b,0x23,0x8b,0x36,0x33,0x8a,0x17,0x95,0x2a,0x1e,0x23,0x8b,0x2c,0x8a,0x2e,0x12,0x8b,0x2f,0x89,0x31,0x23,0x1e,0x8b,0x32,0x8a,0x33,0x2f,0x17,0x95,0x2f,0x33,0x1e,0x94,0x12,0x95,0x36,0x33,0x27,0x95,0x38,0x32,0x17,0x8a,0x36,0x33,0x8a,0x23,0x1e,0x27,0x8b,0x38,0x32,0x89,0x33,0x36,0x18,0x8c,0x36,0x33,0x89,0x33,0x36,0x21,0x95,0x36,0x19,0x8b,0x2e,0x31,0x8a,0x25,0x2a,0x22,0x8b,0x36,0x89,0x35,0x2f,0x19,0x8b,0x36,0x8a,0x2f,0x38,0x25,0x94,0x36,0x2e,0x2a,0x95,0x1c,0x28,0x95,0x27,0x1b,0x8c,0x2a,0x89,0x2e,0x25,0x19,0x8b,0x34,0x8a,0x33,0x2f,0x23,0x95,0x2f,0x33,0x1e,0x94,0x12,0x95,0x33,0x36,0x23,0x95,0x32,0x38,0x17,0x8a,0x33,0x36,0x8a,0x23,0x1e,0x27,0x8b,0x32,0x38,0x89,0x36,0x33,0x12,0x8c,0x32,0x38,0x89,0x33,0x36,0x1e,0x95,0x37,0x3d,0x10,0x8b,0x3b,0x38,0x8a,0x23,0x20,0x28,0x8a,0x3d,0x37,0x8a,0x38,0x3b,0x1c,0x8b,0x3b,0x38,0x8a,0x3d,0x38,0x3a,0x8b,0x3a,0x3f,0x37,0x89,0x27,0x1b,0x8b,0x33,0x8a,0x37,0x22,0x16,0x8b,0x3a,0x8a,0x3f,0x0f,0x1b,0x95,0x3a,0x8b,0x3b,0x8a,0x3d,0x37,0x1c,0x8b,0x3b,0x38,0x8a,0x20,0x28,0x23,0x8b,0x3d,0x37,0x89,0x38,0x3b,0x10,0x8b,0x3d,0x37,0x8a,0x38,0x3b,0x20,0x8b,0x33,0x36,0x89,0x17,0x23,0x8b,0x38,0x34,0x8a,0x36,0x33,0x23,0x8b,0x34,0x31,0x89,0x2f,0x33,0x17,0x8c,0x36,0x33,0x89,0x1e,0x27,0x23,0x8c,0x33,0x36,0x89,0x36,0x30,0x12,0x8b,0x34,0x31,0x8a,0x1e,0x28,0x22,0x8a,0x30,0x36,0x8a,0x34,0x31,0x1e,0x8b,0x28,0x2e,0x33,0x89,0x28,0x31,0x2e,0x95,0x27,0x2f,0x17,0x95,0x12,0x1e,0x95,0x3b,0x36,0x33,0x96,0x2a,0x8b,0x2b,0x8a,0x2c,0x1e,0x12,0x8b,0x2d,0x89,0x2e,0x28,0x1e,0x8b,0x2e,0x31,0x8a,0x16,0x22,0x8b,0x36,0x89,0x34,0x1e,0x22,0x8b,0x31,0x8a,0x2c,0x25,0x19,0x8b,0x2d,0x89,0x2e,0x28,0x25,0x8b,0x33,0x2e,0x8a,0x25,0x19,0x8c,0x31,0x89,0x2c,0x1a,0x26,0x8b,0x2e,0x8a,0x2f,0x1b,0x27,0x8b,0x2a,0x89,0x2c,0x23,0x1e,0x8b,0x2e,0x8a,0x2f,0x12,0x1e,0x8b,0x30,0x89,0x31,0x27,0x23,0x8b,0x32,0x8a,0x33,0x17,0x23,0x8b,0x32,0x8a,0x33,0x1e,0x23,0x8b,0x38,0x33,0x8a,0x1e,0x12,0x8b,0x36,0x8a,0x31,0x1e,0x23,0x8b,0x33,0x89,0x34,0x25,0x19,0x8b,0x3d,0x89,0x1e,0x28,0x22,0x8b,0x33,0x89,0x34,0x12,0x1e,0x8b,0x3d,0x8a,0x1e,0x22,0x28,0x8a,0x33,0x8a,0x34,0x19,0x25,0x8b,0x3d,0x89,0x28,0x1e,0x22,0x8b,0x3b,0x89,0x3a,0x1e,0x12,0x8b,0x38,0x8a,0x36,0x22,0x16,0x8b,0x34,0x8a,0x33,0x23,0x17,0x8b,0x3b,0x8a,0x1e,0x23,0x27,0x8a,0x32,0x8a,0x33,0x12,0x1e,0x8b,0x3b,0x89,0x27,0x23,0x1e,0x8b,0x32,0x89,0x33,0x23,0x17,0x8b,0x3b,0x89,0x1e,0x23,0x27,0x8b,0x38,0x8a,0x36,0x12,0x1e,0x8b,0x33,0x89,0x31,0x1e,0x27,0x8b,0x2f,0x8a,0x2e,0x20,0x14,0x8b,0x2f,0x8a,0x30,0x2a,0x24,0x8b,0x30,0x38,0x8a,0x24,0x18,0x8b,0x36,0x89,0x33,0x24,0x20,0x8b,0x30,0x8a,0x2e,0x27,0x1b,0x8b,0x2f,0x89,0x30,0x24,0x2a,0x8b,0x30,0x38,0x8a,0x20,0x14,0x8b,0x33,0x36,0x8a,0x38,0x30,0x24,0x8b,0x33,0x36,0x89,0x34,0x31,0x19,0x8b,0x30,0x33,0x89,0x31,0x34,0x25,0x8b,0x2c,0x89,0x1c,0x8b,0x30,0x8a,0x31,0x20,0x28,0x8a,0x34,0x8a,0x38,0x19,0x8b,0x33,0x89,0x34,0x25,0x20,0x8b,0x31,0x8a,0x25,0x20,0x1c,0x8b,0x2c,0x8a,0x28,0x8b,0x25,0x8a,0x26,0x1d,0x8a,0x29,0x20,0x8a,0x2c,0x23,0x8b,0x2f,0x26,0x89,0x32,0x29,0x8b,0x32,0x29,0x94,0x32,0x29,0x94,0x35,0x2c,0x8a,0x38,0x2f,0x8a,0x3b,0x32,0x8a,0x35,0x3e,0xa8,0x2f,0x3f,0x36,0x8b,0x3b,0x8a,0x36,0x8b,0x33,0x94,0x2f,0x8a,0x27,0x8b,0x2a,0x89,0x2a,0x2e,0x28,0x8b,0x31,0x2a,0x2e,0x8a,0x1e,0x12,0x8b,0x2f,0x2a,0x27,0x8a,0x17,0x23,0x95,0x2a,0x8b,0x2b,0x8a,0x2c,0x1e,0x12,0x8a,0x2d,0x8a,0x2e,0x25,0x1e,0x8b,0x31,0x2e,0x89,0x22,0x16,0x8b,0x36,0x8a,0x34,0x1e,0x22,0x8a,0x31,0x8a,0x2c,0x25,0x19,0x8b,0x2d,0x89,0x2e,0x28,0x25,0x8b,0x33,0x2e,0x8a,0x19,0x25,0x8a,0x31,0x8a,0x2c,0x1a,0x26,0x8b,0x2e,0x89,0x2f,0x27,0x1b,0x8b,0x2a,0x89,0x2c,0x23,0x1e,0x8b,0x2e,0x8a,0x2f,0x1e,0x12,0x8b,0x30,0x89,0x31,0x27,0x23,0x8b,0x32,0x8a,0x33,0x17,0x23,0x8b,0x32,0x8a,0x33,0x1e,0x23,0x8b,0x33,0x38,0x8a,0x12,0x1e,0x8b,0x36,0x8a,0x31,0x27,0x1e,0x8b,0x33,0x89,0x34,0x25,0x19,0x8b,0x3d,0x89,0x28,0x1e,0x22,0x8b,0x33,0x8a,0x34,0x1e,0x12,0x8b,0x3d,0x89,0x1e,0x22,0x28,0x8b,0x33,0x89,0x34,0x19,0x25,0x8b,0x3d,0x8a,0x22,0x1e,0x28,0x8b,0x3b,0x89,0x3a,0x12,0x1e,0x8b,0x38,0x89,0x36,0x22,0x16,0x8b,0x34,0x8a,0x33,0x23,0x17,0x8b,0x3b,0x8a,0x1e,0x27,0x23,0x8b,0x32,0x8a,0x33,0x1e,0x12,0x8a,0x3b,0x8a,0x23,0x1e,0x27,0x8b,0x32,0x89,0x33,0x23,0x17,0x8b,0x3b,0x8a,0x27,0x1e,0x23,0x8a,0x38,0x8a,0x36,0x12,0x1e,0x8b,0x33,0x8a,0x31,0x1e,0x23,0x8b,0x2f,0x89,0x2e,0x14,0x20,0x8b,0x2f,0x8a,0x30,0x24,0x20,0x8b,0x38,0x30,0x89,0x18,0x24,0x8c,0x36,0x8a,0x33,0x24,0x20,0x8a,0x30,0x8a,0x2e,0x27,0x1b,0x8b,0x2f,0x89,0x30,0x24,0x20,0x8b,0x38,0x30,0x8a,0x14,0x20,0x8b,0x36,0x33,0x8a,0x30,0x38,0x20,0x8b,0x36,0x33,0x8a,0x31,0x34,0x19,0x8b,0x33,0x30,0x89,0x34,0x31,0x25,0x8b,0x2c,0x8a,0x1c,0x8a,0x30,0x8a,0x31,0x28,0x20,0x8b,0x34,0x89,0x38,0x19,0x8b,0x33,0x8a,0x34,0x25,0x20,0x8b,0x31,0x8a,0x25,0x20,0x1c,0x8b,0x2c,0x89,0x28,0x8b,0x25,0x8a,0x26,0x1d,0x8b,0x29,0x20,0x89,0x2c,0x23,0x8b,0x2f,0x26,0x8a,0x32,0x29,0x8a,0x32,0x29,0x95,0x32,0x29,0x94,0x35,0x2c,0x8a,0x38,0x2f,0x8b,0x3b,0x32,0x89,0x3e,0x35,0xa9,0x36,0x3f,0x2f,0x8b,0x3b,0x8a,0x36,0x8b,0x33,0x95,0x2f,0x89,0x27,0x8b,0x2a,0x89,0x28,0x31,0x2a,0x8b,0x2e,0x31,0x28,0x8a,0x12,0x1e,0x8b,0x27,0x2a,0x2f,0x8a,0x17,0x23,0x95,0x2a,0x94,0x33,0x2f,0x17,0x94,0x2f,0x33,0x1e,0x95,0x12,0x94,0x33,0x36,0x23,0x95,0x38,0x32,0x17,0x8a,0x33,0x36,0x8a,0x27,0x1e,0x23,0x8b,0x32,0x38,0x8a,0x33,0x36,0x12,0x8b,0x32,0x38,0x89,0x33,0x36,0x27,0x95,0x3d,0x37,0x10,0x8b,0x38,0x3b,0x8a,0x28,0x20,0x23,0x8b,0x3d,0x37,0x89,0x3b,0x38,0x10,0x8b,0x3d,0x37,0x8a,0x38,0x3b,0x23,0x8b,0x36,0x33,0x8a,0x17,0x95,0x2a,0x1e,0x23,0x8b,0x2c,0x89,0x2e,0x12,0x8b,0x2f,0x8a,0x31,0x23,0x1e,0x8b,0x32,0x89,0x33,0x2f,0x17,0x94,0x2f,0x33,0x1e,0x95,0x12,0x94,0x33,0x36,0x27,0x95,0x38,0x32,0x17,0x8b,0x36,0x33,0x8a,0x23,0x27,0x1e,0x8b,0x32,0x38,0x8a,0x33,0x36,0x18,0x8b,0x36,0x33,0x8a,0x33,0x36,0x2a,0x95,0x36,0x19,0x8b,0x31,0x2e,0x89,0x22,0x2a,0x25,0x8b,0x36,0x89,0x35,0x2f,0x19,0x8b,0x36,0x8a,0x2f,0x38,0x25,0x95,0x2e,0x36,0x2a,0x95,0x28,0x1c,0x95,0x27,0x1b,0x8b,0x2a,0x8a,0x2e,0x25,0x19,0x8b,0x34,0x89,0x33,0x2f,0x17,0x95,0x2f,0x33,0x23,0x94,0x12,0x95,0x33,0x36,0x1e,0x95,0x38,0x32,0x17,0x8b,0x36,0x33,0x8a,0x23,0x27,0x1e,0x8b,0x32,0x38,0x8a,0x33,0x36,0x12,0x8b,0x38,0x32,0x8a,0x33,0x36,0x1e,0x95,0x3d,0x37,0x10,0x8b,0x3b,0x38,0x89,0x23,0x28,0x20,0x8b,0x37,0x3d,0x8a,0x38,0x3b,0x1c,0x8b,0x38,0x3b,0x89,0x38,0x3d,0x3a,0x8b,0x3f,0x3a,0x37,0x8a,0x1b,0x27,0x8b,0x33,0x8a,0x37,0x22,0x16,0x8b,0x3a,0x8a,0x3f,0x0f,0x1b,0x95,0x3a,0x8b,0x3b,0x89,0x3d,0x37,0x1c,0x8b,0x38,0x3b,0x8a,0x28,0x20,0x23,0x8a,0x3d,0x37,0x8a,0x38,0x3b,0x10,0x8b,0x3d,0x37,0x89,0x3b,0x38,0x20,0x8b,0x33,0x36,0x8a,0x23,0x17,0x8b,0x38,0x34,0x8a,0x33,0x36,0x27,0x8b,0x34,0x31,0x8a,0x33,0x2f,0x23,0x8b,0x36,0x33,0x8a,0x1e,0x23,0x27,0x8b,0x33,0x36,0x8a,0x36,0x30,0x12,0x8b,0x34,0x31,0x89,0x1e,0x28,0x22,0x8b,0x30,0x36,0x89,0x31,0x34,0x1e,0x8b,0x2e,0x28,0x33,0x8a,0x28,0x31,0x2e,0x95,0x2f,0x27,0x17,0x95,0x12,0x1e,0x95,0x36,0x33,0x3b,0xa9,0x34,0x28,0x95,0x34,0x28,0xa0,0x2f,0x23,0x8a,0x34,0x28,0x8b,0x36,0x2a,0x8a,0x38,0x2c,0x94,0x2c,0x38,0xa1,0x2f,0x23,0x89,0x28,0x34,0x8b,0x2c,0x38,0x8a,0x39,0x3b,0x2f,0x8b,0x3f,0x39,0x36,0x94,0x33,0x39,0x3d,0x8a,0x17,0x23,0x8b,0x3b,0x33,0x39,0x89,0x33,0x2f,0x2d,0x95,0x34,0x2c,0x2f,0x95,0x1c,0x10,0x95,0x12,0x1e,0x95,0x2f,0x14,0x20,0x8b,0x30,0x89,0x31,0x21,0x15,0x8b,0x39,0x8a,0x28,0x2d,0x25,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x89,0x1f,0x2b,0x8b,0x36,0x8a,0x2f,0x2c,0x20,0x8b,0x34,0x8a,0x38,0x23,0x28,0x8b,0x3d,0x89,0x1c,0x28,0x8b,0x3b,0x8a,0x38,0x23,0x28,0x8b,0x34,0x8a,0x33,0x17,0x23,0x8b,0x3b,0x89,0x36,0x2d,0x23,0x8b,0x33,0x8a,0x31,0x1e,0x2a,0x8b,0x33,0x89,0x1f,0x2b,0x8c,0x2f,0x89,0x34,0x20,0x2c,0x8b,0x34,0x8a,0x38,0x28,0x1c,0x8b,0x3b,0x89,0x40,0x23,0x17,0x8b,0x3d,0x8a,0x3b,0x14,0x20,0x8b,0x38,0x8a,0x31,0x15,0x21,0x8b,0x39,0x89,0x28,0x25,0x2d,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x8a,0x2b,0x1f,0x8b,0x36,0x89,0x2f,0x2c,0x20,0x8b,0x34,0x8a,0x38,0x28,0x2c,0x8b,0x3d,0x8a,0x28,0x1c,0x8b,0x3b,0x89,0x38,0x28,0x2c,0x8b,0x34,0x8a,0x36,0x19,0x25,0x8b,0x38,0x8a,0x36,0x28,0x2e,0x8b,0x34,0x89,0x33,0x12,0x1e,0x8b,0x34,0x8a,0x2a,0x2e,0x28,0x8b,0x31,0x89,0x2f,0x27,0x2a,0x81,0x23,0x94,0x32,0x38,0x1d,0x8b,0x33,0x36,0x1e,0x8a,0x33,0x3b,0x17,0x95,0x2f,0x32,0x20,0x94,0x31,0x15,0x21,0x8b,0x39,0x8a,0x2d,0x28,0x25,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x8a,0x1f,0x2b,0x8b,0x36,0x89,0x20,0x2c,0x8b,0x2f,0x8a,0x34,0x23,0x2c,0x8b,0x38,0x8a,0x3d,0x28,0x1c,0x8b,0x3b,0x8a,0x38,0x2c,0x28,0x8b,0x34,0x89,0x33,0x17,0x23,0x8b,0x3b,0x8a,0x36,0x23,0x2d,0x8b,0x33,0x8a,0x31,0x1e,0x2a,0x8b,0x33,0x8a,0x2b,0x1f,0x8b,0x2f,0x89,0x2c,0x20,0x8b,0x34,0x8a,0x38,0x28,0x1c,0x8b,0x3b,0x8a,0x38,0x40,0x17,0x8b,0x3d,0x8a,0x32,0x3b,0x20,0x8b,0x38,0x89,0x31,0x15,0x21,0x8b,0x39,0x8a,0x25,0x19,0x8b,0x36,0x8a,0x30,0x2a,0x1e,0x8b,0x39,0x8a,0x21,0x2d,0x8b,0x36,0x89,0x2c,0x20,0x8b,0x2f,0x8a,0x34,0x28,0x1c,0x8b,0x38,0x89,0x3d,0x23,0x17,0x8b,0x3b,0x8a,0x38,0x28,0x1c,0x8b,0x2f,0x89,0x2e,0x19,0x25,0x8b,0x31,0x34,0x8a,0x12,0x1e,0x95,0x2d,0x0b,0x17,0x8b,0x33,0x36,0x95,0x34,0x2c,0x8a,0x1c,0x10,0x96,0x38,0x1c,0x28,0x8b,0x34,0x89,0x36,0x23,0x17,0x8b,0x38,0x8b,0x2f,0x14,0x20,0x8b,0x30,0x89,0x31,0x21,0x15,0x8b,0x39,0x8a,0x28,0x25,0x2d,0x8b,0x36,0x89,0x30,0x2a,0x1e,0x8b,0x39,0x8a,0x1f,0x2b,0x8b,0x36,0x8a,0x2f,0x2c,0x20,0x8b,0x34,0x89,0x38,0x23,0x28,0x8b,0x3d,0x8a,0x1c,0x28,0x8b,0x3b,0x8a,0x38,0x23,0x28,0x8b,0x34,0x89,0x33,0x17,0x23,0x8b,0x3b,0x8a,0x36,0x2d,0x27,0x8b,0x33,0x8a,0x31,0x2a,0x1e,0x8b,0x33,0x89,0x2b,0x1f,0x8b,0x2f,0x8a,0x34,0x20,0x2c,0x8b,0x34,0x8a,0x38,0x28,0x1c,0x8b,0x3b,0x8a,0x40,0x17,0x23,0x8b,0x3d,0x89,0x3b,0x20,0x14,0x8c,0x38,0x89,0x31,0x15,0x21,0x8b,0x39,0x8a,0x2d,0x25,0x28,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x8a,0x2b,0x1f,0x8b,0x36,0x8a,0x2f,0x2c,0x20,0x8b,0x34,0x8a,0x38,0x23,0x28,0x8b,0x3d,0x8a,0x28,0x1c,0x8b,0x3b,0x89,0x38,0x23,0x28,0x8c,0x34,0x89,0x36,0x19,0x25,0x8b,0x38,0x8a,0x36,0x28,0x2e,0x8b,0x34,0x89,0x33,0x12,0x1e,0x8c,0x34,0x89,0x2e,0x28,0x2a,0x8c,0x31,0x89,0x2f,0x2a,0x27,0x81,0x23,0x94,0x32,0x38,0x1d,0x8c,0x33,0x36,0x1e,0x89,0x3b,0x33,0x17,0x95,0x2f,0x32,0x20,0x95,0x31,0x21,0x15,0x8b,0x39,0x8a,0x2d,0x28,0x25,0x8b,0x36,0x8a,0x30,0x2a,0x1e,0x8b,0x39,0x8a,0x1f,0x2b,0x8b,0x36,0x8a,0x2c,0x20,0x8b,0x2f,0x89,0x34,0x23,0x28,0x8c,0x38,0x89,0x3d,0x28,0x1c,0x8b,0x3b,0x8a,0x38,0x28,0x23,0x8b,0x34,0x8a,0x33,0x17,0x23,0x8b,0x3b,0x8a,0x36,0x2d,0x27,0x8b,0x33,0x8a,0x31,0x2a,0x1e,0x8b,0x33,0x8a,0x2b,0x1f,0x8b,0x2f,0x89,0x2c,0x20,0x8c,0x34,0x89,0x38,0x1c,0x28,0x8b,0x3b,0x8a,0x40,0x38,0x23,0x8b,0x3d,0x8a,0x32,0x3b,0x14,0x8b,0x38,0x8a,0x31,0x15,0x21,0x8b,0x39,0x8a,0x19,0x25,0x8b,0x36,0x8a,0x30,0x2a,0x1e,0x8b,0x39,0x8a,0x2d,0x21,0x8b,0x36,0x8a,0x2c,0x20,0x8b,0x2f,0x89,0x34,0x1c,0x28,0x8b,0x38,0x8a,0x3d,0x23,0x17,0x8b,0x3b,0x89,0x38,0x1c,0x28,0x8c,0x2f,0x89,0x2e,0x19,0x25,0x8b,0x31,0x34,0x8a,0x12,0x1e,0x95,0x2d,0x0b,0x17,0x8c,0x33,0x36,0x95,0x2c,0x34,0x8a,0x1c,0x10,0x95,0x17,0x96,0x10,0x8b,0x3b,0x2f,0x8a,0x31,0x3d,0x8b,0x3e,0x32,0x8a,0x3f,0x33,0x39,0x94,0x3b,0x2f,0x23,0x8b,0x39,0x3d,0x31,0x8a,0x23,0x17,0x95,0x2d,0x23,0x27,0x95,0x3f,0x39,0x33,0x94,0x3b,0x2f,0x2d,0x8b,0x3d,0x39,0x31,0x8a,0x12,0x1e,0x8b,0x3b,0x2f,0x17,0x8a,0x31,0x3d,0x22,0x8b,0x3f,0x33,0x15,0x8a,0x38,0x40,0x34,0x95,0x38,0x3b,0x2f,0x8b,0x31,0x38,0x3d,0x89,0x1c,0x28,0x95,0x28,0x2c,0x23,0x95,0x34,0x40,0x38,0x95,0x38,0x2f,0x3b,0x8b,0x31,0x3d,0x38,0x89,0x28,0x1c,0x95,0x29,0x1d,0x95,0x1e,0x2a,0x95,0x3d,0x27,0x23,0x8b,0x39,0x3b,0x33,0x89,0x23,0x17,0x95,0x2d,0x27,0x23,0x95,0x2a,0x1e,0x95,0x3d,0x23,0x27,0x8b,0x33,0x3b,0x39,0x89,0x23,0x17,0x95,0x27,0x23,0x2d,0x95,0x1c,0x28,0x95,0x3d,0x28,0x2c,0x8b,0x34,0x3b,0x38,0x89,0x23,0x17,0x95,0x28,0x23,0x2c,0x95,0x1c,0x28,0x95,0x3d,0x28,0x23,0x8b,0x38,0x34,0x3b,0x8a,0x20,0x2c,0x8b,0x2f,0x3b,0x89,0x3d,0x31,0x1f,0x8b,0x32,0x3e,0x8a,0x3f,0x39,0x33,0x95,0x3b,0x2f,0x27,0x8b,0x39,0x31,0x3d,0x8a,0x23,0x17,0x94,0x27,0x2d,0x23,0x95,0x33,0x39,0x3f,0x95,0x3b,0x2f,0x27,0x8b,0x3d,0x31,0x39,0x8a,0x12,0x1e,0x8b,0x3b,0x2f,0x23,0x89,0x3d,0x31,0x22,0x8b,0x33,0x3f,0x15,0x8a,0x34,0x40,0x38,0x95,0x3b,0x38,0x2f,0x8b,0x3d,0x31,0x38,0x8a,0x1c,0x28,0x95,0x28,0x23,0x2c,0x95,0x20,0x2c,0x8c,0x34,0x8a,0x38,0x28,0x1c,0x8b,0x3b,0x8a,0x40,0x38,0x23,0x8b,0x3d,0x8a,0x32,0x3b,0x20,0x8b,0x38,0x8a,0x31,0x15,0x21,0x8b,0x39,0x8a,0x19,0x25,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x8a,0x2d,0x21,0x8b,0x36,0x8a,0x2c,0x20,0x8b,0x2f,0x8a,0x34,0x28,0x1c,0x8b,0x38,0x89,0x3d,0x17,0x23,0x8b,0x3b,0x8a,0x38,0x1c,0x28,0x8b,0x2f,0x8a,0x2e,0x19,0x25,0x8b,0x34,0x31,0x89,0x1e,0x12,0x95,0x2d,0x17,0x0b,0x8b,0x36,0x33,0x95,0x2c,0x34,0x8a,0x10,0x1c,0x95,0x17,0x23,0x96,0x20,0x2c,0x8b,0x2f,0x3b,0x89,0x31,0x3d,0x2b,0x8b,0x32,0x3e,0x89,0x39,0x3f,0x33,0x95,0x2f,0x3b,0x23,0x8b,0x39,0x31,0x3d,0x8a,0x23,0x17,0x95,0x2d,0x23,0x27,0x95,0x3f,0x39,0x33,0x95,0x2f,0x3b,0x23,0x8b,0x31,0x3d,0x39,0x89,0x1e,0x12,0x8c,0x2f,0x3b,0x23,0x89,0x31,0x3d,0x22,0x8b,0x3f,0x33,0x15,0x89,0x40,0x38,0x34,0x95,0x3b,0x2f,0x38,0x8b,0x3d,0x31,0x38,0x8a,0x1c,0x28,0x95,0x23,0x28,0x2c,0x95,0x38,0x34,0x40,0x95,0x3b,0x38,0x2f,0x8b,0x31,0x3d,0x38,0x89,0x1c,0x28,0x95,0x29,0x1d,0x95,0x2a,0x1e,0x95,0x3d,0x27,0x23,0x8b,0x39,0x3b,0x33,0x89,0x17,0x23,0x95,0x2d,0x27,0x23,0x95,0x1e,0x2a,0x95,0x3d,0x27,0x23,0x8b,0x33,0x39,0x3b,0x8a,0x23,0x17,0x94,0x2d,0x23,0x27,0x95,0x1c,0x28,0x95,0x3d,0x2c,0x28,0x8b,0x34,0x3b,0x38,0x89,0x17,0x23,0x95,0x2c,0x28,0x23,0x95,0x1c,0x28,0x94,0x3d,0x23,0x2c,0x8b,0x38,0x34,0x3b,0x8a,0x2c,0x20,0x8b,0x2f,0x3b,0x89,0x31,0x3d,0x1f,0x8b,0x32,0x3e,0x8a,0x3f,0x39,0x33,0x94,0x3b,0x2f,0x2d,0x8b,0x31,0x39,0x3d,0x8a,0x23,0x17,0x95,0x2d,0x27,0x23,0x95,0x39,0x3f,0x33,0x95,0x3b,0x2f,0x27,0x8b,0x31,0x39,0x3d,0x89,0x12,0x1e,0x8b,0x3b,0x2f,0x17,0x8a,0x31,0x3d,0x22,0x8b,0x33,0x3f,0x15,0x89,0x34,0x40,0x38,0x95,0x3b,0x38,0x2f,0x8b,0x3d,0x31,0x38,0x8a,0x28,0x1c,0x95,0x28,0x23,0x2c,0x95,0x20,0x2c,0x8b,0x34,0x89,0x38,0x1c,0x28,0x8b,0x3b,0x8a,0x38,0x40,0x23,0x8b,0x3d,0x8a,0x3b,0x32,0x20,0x8b,0x38,0x89,0x31,0x15,0x21,0x8b,0x39,0x8a,0x19,0x25,0x8b,0x36,0x8a,0x30,0x1e,0x2a,0x8b,0x39,0x89,0x2d,0x21,0x8b,0x36,0x8a,0x20,0x2c,0x8b,0x2f,0x8a,0x34,0x28,0x1c,0x8a,0x38,0x8a,0x3d,0x23,0x17,0x8b,0x3b,0x8a,0x38,0x28,0x1c,0x8b,0x2f,0x89,0x2e,0x25,0x19,0x8c,0x31,0x34,0x89,0x1e,0x12,0x95,0x2d,0x17,0x0b,0x8c,0x33,0x36,0x95,0x34,0x2c,0x8a,0x1c,0x10,0x95,0x17,0x96,0x40,0x34,0x3b,0xff +}; diff --git a/presets/nes/vrambuf.h b/presets/nes/vrambuf.h index e1bce93b..3df2cf61 100644 --- a/presets/nes/vrambuf.h +++ b/presets/nes/vrambuf.h @@ -24,9 +24,16 @@ extern byte updptr; VRAMBUF_SET(b)\ asm("inc %v", updptr); +// C versions of macros //#define VRAMBUF_SET(b) updbuf[updptr] = (b); //#define VRAMBUF_ADD(b) VRAMBUF_SET(b); ++updptr +// macro to add a raw header (useful for single bytes) +#define VRAMBUF_PUT(addr,len,flags)\ + VRAMBUF_ADD(((addr) >> 8) | (flags));\ + VRAMBUF_ADD(addr);\ + VRAMBUF_ADD(len); + // add EOF marker to buffer (but don't increment pointer) void cendbuf(void); diff --git a/src/platform/nes.ts b/src/platform/nes.ts index 5a7a82f9..7e114e19 100644 --- a/src/platform/nes.ts +++ b/src/platform/nes.ts @@ -26,6 +26,7 @@ const JSNES_PRESETS = [ {id:'statusbar.c', name:'Split Status Bar'}, {id:'horizmask.c', name:'Offscreen Scrolling'}, {id:'attributes.c', name:'Attribute Table + Pixels'}, + {id:'aputest.c', name:'Sound Tester'}, {id:'music.c', name:'Music Player'}, {id:'siegegame.c', name:'Siege Game'}, {id:'shoot2.c', name:'Solarian Game'}, diff --git a/src/views.ts b/src/views.ts index fb5b977a..f27b7fe4 100644 --- a/src/views.ts +++ b/src/views.ts @@ -710,17 +710,27 @@ export class MemoryView implements ProjectView { // TODO: use segments list? getMemorySegment(a:number) : string { - if (!compparams) return 'unknown'; - if (a >= compparams.data_start && a < compparams.data_start+compparams.data_size) { - if (platform.getSP && a >= platform.getSP() - 15) - return 'stack'; - else - return 'data'; + if (compparams) { + if (a >= compparams.data_start && a < compparams.data_start+compparams.data_size) { + if (platform.getSP && a >= platform.getSP() - 15) + return 'stack'; + else + return 'data'; + } + else if (a >= compparams.code_start && a < compparams.code_start+(compparams.code_size||compparams.rom_size)) + return 'code'; } - else if (a >= compparams.code_start && a < compparams.code_start+(compparams.code_size||compparams.rom_size)) - return 'code'; - else - return 'unknown'; + var segments = current_project.segments; + if (segments) { + for (var seg of segments) { + if (a >= seg.start && a < seg.start+seg.size) { + if (seg.type == 'rom') return 'code'; + if (seg.type == 'ram') return 'data'; + if (seg.type == 'io') return 'io'; + } + } + } + return 'unknown'; } findMemoryWindowLine(a:number) : number {