From: Toni Wilen Date: Sat, 27 Jan 2007 14:46:02 +0000 (+0200) Subject: imported winuaesrc1400b3.zip X-Git-Tag: 2100~248 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9c1e74fdfae5cb94882dde2333dfd09895d9b981;p=francis%2Fwinuae.git imported winuaesrc1400b3.zip --- diff --git a/bsdsocket.c b/bsdsocket.c index 9de1f19c..56740d7e 100755 --- a/bsdsocket.c +++ b/bsdsocket.c @@ -1487,14 +1487,15 @@ void bsdlib_install (void) uae_u32 func_place, data_place, init_place; int i; - if (!sockdata) + if (!sockdata) { sockdata = xcalloc (sizeof (struct sockd), 1); + for (i = 0; i < SOCKPOOLSIZE; i++) + sockdata->sockpoolids[i] = UNIQUE_ID; + } + if (!init_socket_layer ()) return; - for (i = 0; i < SOCKPOOLSIZE; i++) - sockdata->sockpoolids[i] = UNIQUE_ID; - resname = ds ("bsdsocket.library"); resid = ds ("UAE bsdsocket.library 4.1"); diff --git a/cdtv.c b/cdtv.c index 730641ef..8ce71f60 100755 --- a/cdtv.c +++ b/cdtv.c @@ -27,6 +27,13 @@ #include "zfile.h" #include "threaddep/thread.h" +#define AUDIO_STATUS_NOT_SUPPORTED 0x00 +#define AUDIO_STATUS_IN_PROGRESS 0x11 +#define AUDIO_STATUS_PAUSED 0x12 +#define AUDIO_STATUS_PLAY_COMPLETE 0x13 +#define AUDIO_STATUS_PLAY_ERROR 0x14 +#define AUDIO_STATUS_NO_STATUS 0x15 + static smp_comm_pipe requests; static volatile int thread_alive; @@ -35,8 +42,8 @@ static uae_u8 dmacmemory[100]; #define MAX_TOC_ENTRIES 103 static uae_u8 cdrom_toc[MAX_TOC_ENTRIES * 13]; -static uae_u32 last_cd_position; -static uae_u8 cdrom_qcode[16]; +static uae_u32 last_cd_position, play_start, play_end; +static uae_u8 cdrom_qcode[16], cd_audio_status; static int datatrack; static volatile int cdtv_command_len; @@ -46,9 +53,9 @@ static volatile uae_u16 dmac_dawr; static volatile uae_u32 dmac_acr, dmac_wtc; static volatile int dmac_dma; -static volatile int activate_stch, cdrom_command_done; +static volatile int activate_stch, cdrom_command_done, play_state, play_statewait; static volatile int cdrom_sector, cdrom_sectors, cdrom_length, cdrom_offset; -static volatile int cd_playing, cd_paused, cd_motor, cd_media, cd_error, cd_finished; +static volatile int cd_playing, cd_paused, cd_motor, cd_media, cd_error, cd_finished, cd_isready; static volatile int cdtv_hsync, dma_wait, dma_finished; @@ -114,18 +121,34 @@ static int get_qcode(void) if (!s) return 0; memcpy (cdrom_qcode, s, 16); + if (cd_playing && s[1] == 0x11) { + int end = msf2lsn((s[5 + 4] << 16) | (s[6 + 4] << 8) | (s[7 + 4])); + if (end >= play_end) { + sys_command_cd_pause (DF_IOCTL, unitnum, 1); + cd_audio_status = AUDIO_STATUS_PLAY_COMPLETE; + cd_playing = 0; + do_stch(); + } + } + s[1] = cd_audio_status; +#if 0 if (s[1] != subq0) { subq0 = s[1]; do_stch(); } +#endif return 1; } static void cdaudiostop(void) { + cd_finished = 0; + if (cd_playing) + cd_finished = 1; cd_playing = 0; cd_paused = 0; cd_motor = 0; + cd_audio_status = AUDIO_STATUS_NO_STATUS; if (unitnum < 0) return; sys_command_cd_pause (DF_IOCTL, unitnum, 0); @@ -135,7 +158,13 @@ static void cdaudiostop(void) static int pause_audio (int pause) { sys_command_cd_pause (DF_IOCTL, unitnum, pause); + if (!cd_playing) { + cd_paused = 0; + cd_audio_status = AUDIO_STATUS_NO_STATUS; + return 0; + } cd_paused = pause; + cd_audio_status = pause ? AUDIO_STATUS_PAUSED : AUDIO_STATUS_IN_PROGRESS; return 1; } @@ -147,6 +176,7 @@ static int read_sectors(int start, int length) cdrom_offset = start * 2048; cdrom_length = length * 2048; cd_motor = 1; + cd_audio_status = AUDIO_STATUS_NOT_SUPPORTED; if (cd_playing) cdaudiostop(); return 0; @@ -159,6 +189,18 @@ static int ismedia(void) return sys_command_ismedia (DF_IOCTL, unitnum); } +static void do_play(void) +{ + sleep_millis(100); + sys_command_cd_pause (DF_IOCTL, unitnum, 0); + cd_audio_status = AUDIO_STATUS_PLAY_ERROR; + if (sys_command_cd_play (DF_IOCTL, unitnum, lsn2msf(play_start), lsn2msf(play_end), 0)) { + cd_audio_status = AUDIO_STATUS_IN_PROGRESS; + cd_playing = 1; + } + do_stch(); +} + static int play_cdtrack (uae_u8 *p) { int track_start = p[1]; @@ -182,16 +224,15 @@ static int play_cdtrack (uae_u8 *p) end = (s[8] << 16) | (s[9] << 8) | s[10]; } } - sys_command_cd_pause (DF_IOCTL, unitnum, 0); - write_log("PLAY CD AUDIO from %d-%d (%06.6X to %06.6X)\n", - track_start, track_end, start, end); - if (sys_command_cd_play (DF_IOCTL, unitnum, start, end, 0)) { - cd_playing = 1; - cd_motor = 1; - } + play_end = msf2lsn(end); + play_start = msf2lsn(start); + write_log("PLAY CD AUDIO from %d-%d, %06.6X (%d) to %06.6X (%d)\n", + track_start, track_end, start, msf2lsn(start), end, msf2lsn(end)); + do_play(); return 0; } + static int play_cd(uae_u8 *p) { uae_u32 start, end; @@ -199,7 +240,16 @@ static int play_cd(uae_u8 *p) start = (p[1] << 16) | (p[2] << 8) | p[3]; end = (p[4] << 16) | (p[5] << 8) | p[6]; if (start == 0 && end == 0) { - cdaudiostop(); + cd_finished = 0; + if (cd_playing) + cd_finished = 1; + cd_playing = 0; + cd_paused = 0; + cd_motor = 0; + cd_audio_status = AUDIO_STATUS_PLAY_COMPLETE; + sys_command_cd_pause (DF_IOCTL, unitnum, 0); + sys_command_cd_stop (DF_IOCTL, unitnum); + cd_isready = 10; return 0; } if (end == 0x00ffffff) @@ -208,12 +258,11 @@ static int play_cd(uae_u8 *p) start = lsn2msf (start); end = lsn2msf (end); } - write_log("PLAY CD AUDIO from %06.6X to %06.6X\n", start, end); - sys_command_cd_pause (DF_IOCTL, unitnum, 0); - if (sys_command_cd_play (DF_IOCTL, unitnum, start, end, 0)) { - cd_playing = 1; - cd_motor = 1; - } + play_end = msf2lsn(end); + play_start = msf2lsn(start); + write_log("PLAY CD AUDIO from %06.6X (%d) to %06.6X (%d)\n", + start, msf2lsn(start), end, msf2lsn(end)); + do_play(); return 0; } @@ -224,7 +273,7 @@ static int cdrom_subq(uae_u8 *out, int msflsn) uae_u32 diskposlsn, diskposmsf; get_qcode(); - out[0] = s[1]; + out[0] = cd_audio_status; s += 4; out[1] = s[1]; out[2] = s[2]; @@ -285,7 +334,7 @@ static int read_toc(int track, int msflsn, uae_u8 *out) out[0] = 0; out[1] = s[1]; out[2] = s[3]; - out[3] = track == 0 ? buf[3] : 0; + out[3] = buf[3]; out[4] = 0; out[5] = (msflsn ? msf : lsn) >> 16; out[6] = (msflsn ? msf : lsn) >> 8; @@ -372,11 +421,13 @@ static void cdrom_command_thread(uae_u8 b) break; case 0x81: if (cdrom_command_cnt_in == 1) { - uae_u8 flag = 1 << 0; - if (cd_finished) - flag |= 1 << 3; + uae_u8 flag = 0; + if (!cd_isready) + flag |= 1 << 0; if (cd_playing) flag |= 1 << 2; + if (cd_finished) + flag |= 1 << 3; if (cd_error) flag |= 1 << 4; if (cd_motor) @@ -393,6 +444,7 @@ static void cdrom_command_thread(uae_u8 b) if (cd_error) cdrom_command_output[2] |= 1 << 4; cd_error = 0; + cd_isready = 0; cdrom_command_accepted(6, s, &cdrom_command_cnt_in); cd_finished = 1; } @@ -512,6 +564,9 @@ static void *dev_thread (void *p) case 0x103: // unpause sys_command_cd_pause (DF_IOCTL, unitnum, 0); break; + case 0x110: // do_play! + do_play(); + break; case 0xffff: thread_alive = -1; return NULL; @@ -672,7 +727,25 @@ void CDTV_hsync_handler(void) if (cdtv_hsync < 312 * 50 / 75 && cdtv_hsync >= 0) return; cdtv_hsync = 0; - +/* + if (play_state == 1) { + play_state = 2; + play_statewait = 20; + cd_playing = 0; + } else if (play_statewait > 0) { + play_statewait--; + } else if (play_state == 2) { + write_comm_pipe_u32 (&requests, 0x0110, 1); + cd_playing = 1; + do_stch(); + play_state = 0; + } +*/ + if (cd_isready > 0) { + cd_isready--; + if (!cd_isready) + do_stch(); + } if (cd_playing) gui_cd_led (1); if (cd_media && (tp_cr & 1)) { @@ -704,12 +777,16 @@ static void do_stch(void) void bleh(void) { - //do_stch(); + cd_playing = cd_finished = cd_motor = cd_media = 1; + cd_isready = 0; + cd_playing = 0; + do_stch(); } static void cdtv_reset (void) { write_log("CDTV: reset\n"); + cdaudiostop(); cd_playing = cd_paused = 0; cd_motor = 0; cd_media = 0; @@ -1023,12 +1100,12 @@ addrbank dmac_bank = { void cdtv_entergui (void) { - if (cd_playing) + if (cd_playing && !cd_paused) write_comm_pipe_u32 (&requests, 0x102, 1); } void cdtv_exitgui (void) { - if (cd_playing) + if (cd_playing && !cd_paused) write_comm_pipe_u32 (&requests, 0x103, 1); } diff --git a/cfgfile.c b/cfgfile.c index c5e22b02..fc7ca362 100755 --- a/cfgfile.c +++ b/cfgfile.c @@ -222,7 +222,7 @@ static void write_filesys_config (struct uae_prefs *p, const char *unexpanded, char *str; str = cfgfile_subst_path (default_path, unexpanded, uci->rootdir); - if (uci->volname != 0) { + if (uci->volname[0] != 0) { sprintf (tmp, "filesystem2=%s,%s:%s:%s,%d\n", uci->readonly ? "ro" : "rw", uci->devname ? uci->devname : "", uci->volname, str, uci->bootpri); zfile_fputs (f, tmp); @@ -1771,10 +1771,10 @@ static void parse_sound_spec (struct uae_prefs *p, char *spec) } p->produce_sound = atoi (x0); if (x1) { - p->sound_stereo_separation = 16; + p->sound_stereo_separation = 0; if (*x1 == 'S') { p->sound_stereo = 1; - p->sound_stereo_separation = 10; + p->sound_stereo_separation = 7; } else if (*x1 == 's') p->sound_stereo = 1; else @@ -2740,6 +2740,9 @@ static void buildin_default_prefs (struct uae_prefs *p) strcpy (p->cartfile, ""); p->prtname[0] = 0; p->sername[0] = 0; + + p->mountitems = 0; + target_default_options (p, 1); } diff --git a/filesys.c b/filesys.c index c941e6a8..cfd6cbdb 100755 --- a/filesys.c +++ b/filesys.c @@ -216,10 +216,10 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo * mi->ismounted = 1; } mi->size = ui->hf.size; - mi->nrcyls = (int)(ui->hf.secspertrack * ui->hf.surfaces ? (ui->hf.size / ui->hf.blocksize) / (ui->hf.secspertrack * ui->hf.surfaces) : 0); + mi->nrcyls = (int)(uci->sectors * uci->surfaces ? (ui->hf.size / uci->blocksize) / (uci->sectors * uci->surfaces) : 0); if (ui->volname) return FILESYS_VIRTUAL; - if (ui->hf.secspertrack == 0) { + if (uci->reserved == 0 && uci->sectors == 0 && uci->surfaces == 0) { if (ui->hf.flags & 1) return FILESYS_HARDDRIVE; return FILESYS_HARDFILE_RDB; diff --git a/newcpu.c b/newcpu.c index 829a5780..28f59a05 100755 --- a/newcpu.c +++ b/newcpu.c @@ -1792,7 +1792,7 @@ void doint (void) //static uae_u32 pcs[1000]; -#define DEBUG_CD32IO +//#define DEBUG_CD32IO #ifdef DEBUG_CD32IO static uae_u32 cd32nextpc, cd32request; @@ -1885,7 +1885,9 @@ static void m68k_run_1 (void) count_instr (opcode); - //out_cd32io(m68k_getpc(®s)); +#ifdef DEBUG_CD32IO + out_cd32io(m68k_getpc(®s)); +#endif #if 0 int pc = m68k_getpc(); @@ -2051,7 +2053,9 @@ static void m68k_run_2p (void) uae_u32 opcode; uae_u32 pc = m68k_getpc (r); +#ifdef DEBUG_CD32IO out_cd32io(m68k_getpc(®s)); +#endif do_cycles (cpu_cycles); diff --git a/od-win32/blkdev_win32_ioctl.c b/od-win32/blkdev_win32_ioctl.c index f47d1820..e601a14a 100755 --- a/od-win32/blkdev_win32_ioctl.c +++ b/od-win32/blkdev_win32_ioctl.c @@ -17,6 +17,7 @@ #include "blkdev.h" #include "scsidev.h" #include "gui.h" +#include "win32.h" #include #include @@ -40,7 +41,7 @@ struct dev_info_ioctl { #define IOCTL_DATA_BUFFER 4096 -static int MCICDA = 1; +static int MCICDA; static struct dev_info_ioctl ciw32[MAX_TOTAL_DEVICES]; @@ -62,7 +63,7 @@ static void mcierr(char *str, DWORD err) if (err == MMSYSERR_NOERROR) return; if (mciGetErrorString(err, es, sizeof es)) - write_log("MCIErr: %s: '%s'\n", str, es); + write_log("MCIErr: %s: %d = '%s'\n", str, err, es); } static int win32_error (int unitnum, const char *format,...) @@ -85,7 +86,7 @@ static int win32_error (int unitnum, const char *format,...) NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, NULL); if (log_scsi) - write_log ("IOCTL: unit=%d %s,%d: %s ", unitnum, buf, err, (char*)lpMsgBuf); + write_log ("IOCTL: unit=%d %s,%d: %s\n", unitnum, buf, err, (char*)lpMsgBuf); va_end(arglist); return err; } @@ -95,7 +96,11 @@ static int close_createfile(int unitnum) struct dev_info_ioctl *ciw = &ciw32[unitnum]; if (ciw->h != INVALID_HANDLE_VALUE) { + if (log_scsi) + write_log("IOCTL: IOCTL close\n"); CloseHandle(ciw->h); + if (log_scsi) + write_log("IOCTL: IOCTL close completed\n"); ciw->h = INVALID_HANDLE_VALUE; return 1; } @@ -109,8 +114,12 @@ static int close_mci(int unitnum) ciw->playend = -1; if (ciw->mciid) { + if (log_scsi) + write_log("IOCTL: MCI close\n"); mcierr("MCI_STOP", mciSendCommand(ciw->mciid, MCI_STOP, MCI_WAIT, (DWORD_PTR)&gp)); mcierr("MCI_CLOSE", mciSendCommand(ciw->mciid, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&gp)); + if (log_scsi) + write_log("IOCTL: MCI close completed\n"); ciw->mciid = 0; return 1; } @@ -121,34 +130,41 @@ static int open_createfile(int unitnum) { struct dev_info_ioctl *ciw = &ciw32[unitnum]; int closed = 0; - int cnt = 10; + int cnt = 50; DWORD flags; if (ciw->h != INVALID_HANDLE_VALUE) return 1; closed = close_mci(unitnum); + if (log_scsi) + write_log("IOCTL: opening IOCTL %s\n", ciw->devname); for (;;) { flags = GENERIC_READ; - ciw->h = CreateFile(ciw->devname, flags, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ciw->h = CreateFile(ciw->devname, flags, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (ciw->h == INVALID_HANDLE_VALUE) { - flags |= GENERIC_WRITE; ciw->h = CreateFile(ciw->devname, flags, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (ciw->h == INVALID_HANDLE_VALUE) { - DWORD err = GetLastError(); - if (err == ERROR_SHARING_VIOLATION) { - if (cnt > 0) { - Sleep(10); - continue; + flags |= GENERIC_WRITE; + ciw->h = CreateFile(ciw->devname, flags, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (ciw->h == INVALID_HANDLE_VALUE) { + DWORD err = GetLastError(); + if (err == ERROR_SHARING_VIOLATION) { + if (closed && cnt > 0) { + cnt--; + Sleep(10); + continue; + } } - cnt--; + if (closed) + write_log("IOCTL: failed to re-open '%s', err=%d\n", ciw->devname, GetLastError()); + return 0; } - if (closed) - write_log("IOCTL: failed to re-open '%s', err=%d\n", ciw->devname, GetLastError()); - return 0; } } break; } + if (log_scsi) + write_log("IOCTL: IOCTL open completed\n"); return 1; } @@ -165,6 +181,8 @@ static int open_mci(int unitnum) return 1; ciw->playend = -1; closed = close_createfile(unitnum); + if (log_scsi) + write_log("IOCTL: MCI opening %c:\n", ciw->drvletter); memset (&mciOpen, 0, sizeof(mciOpen)); mciOpen.lpstrDeviceType = (LPSTR)MCI_DEVTYPE_CD_AUDIO; sprintf(elname,"%c:", ciw->drvletter); @@ -179,6 +197,8 @@ static int open_mci(int unitnum) mcierr("MCI_OPEN", err); return 0; } + if (log_scsi) + write_log("IOCTL: MCI open completed\n"); return 1; } @@ -683,6 +703,7 @@ static int open_bus (int flags) memset (&ciw32[i], 0, sizeof (struct dev_info_ioctl)); ciw32[i].h = INVALID_HANDLE_VALUE; } + MCICDA = 1;//os_vista ? 1 : 0; total_devices = 0; dwDriveMask = GetLogicalDrives(); if (log_scsi) diff --git a/od-win32/resources/RCa03440 b/od-win32/resources/RCa03440 new file mode 100755 index 00000000..7864adba Binary files /dev/null and b/od-win32/resources/RCa03440 differ diff --git a/od-win32/resources/amiga.png b/od-win32/resources/amiga.png new file mode 100755 index 00000000..46908b54 Binary files /dev/null and b/od-win32/resources/amiga.png differ diff --git a/od-win32/resources/resource.hm b/od-win32/resources/resource.hm index 1af540e8..32269cfc 100755 --- a/od-win32/resources/resource.hm +++ b/od-win32/resources/resource.hm @@ -1,14 +1,3 @@ // Microsoft Visual C++ generated Help ID include file. // Used by winuae.rc // -#define HIDC_CREATELOGFILE 0x808d0402 // IDD_MISC1 [English (United States)] -#define HIDC_CS_AGNUSREV 0x809b06c8 // IDD_CHIPSET2 [English (United States)] -#define HIDC_CS_DENISEREV 0x809b06ca // IDD_CHIPSET2 [English (United States)] -#define HIDC_CS_FATGARYREV 0x809b06c1 // IDD_CHIPSET2 [English (United States)] -#define HIDC_CS_RAMSEYREV 0x809b06b3 // IDD_CHIPSET2 [English (United States)] -#define HIDC_CS_RTCADJUST 0x809b06c0 // IDD_CHIPSET2 [English (United States)] -#define HIDC_EDITDESCRIPTION 0x8087057e // IDD_LOADSAVE [English (United States)] -#define HIDC_EDITNAME 0x8087057d // IDD_LOADSAVE [English (United States)] -#define HIDC_EDITPATH 0x80870582 // IDD_LOADSAVE [English (United States)] -#define HIDC_MAPDRIVES 0x807105e3 // IDD_HARDDISK [English (United States)] -#define HIDC_MAPDRIVES_NET 0x807105e4 // IDD_HARDDISK [English (United States)] diff --git a/od-win32/resources/winuae.ico b/od-win32/resources/winuae.ico index ea35d3bc..96e2693d 100755 Binary files a/od-win32/resources/winuae.ico and b/od-win32/resources/winuae.ico differ diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 376bd4c4..b3362ea3 100755 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -2,24 +2,10 @@ // #include "resource.h" -// Generated Help ID header file -#define APSTUDIO_HIDDEN_SYMBOLS -#include "resource.hm" -#undef APSTUDIO_HIDDEN_SYMBOLS - #define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// #include "afxres.h" -#include "dlgs.h" -///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US @@ -228,10 +214,10 @@ BEGIN PUSHBUTTON "Add Ha&rd Drive...",IDC_NEW_HD,135,186,60,15 PUSHBUTTON "Remove",IDC_REMOVE,235,186,60,15 PUSHBUTTON "&Properties",IDC_EDIT,235,207,60,15 - CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,205,100,10,0,HIDC_MAPDRIVES + CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,205,100,10,0 CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,205,115,10 CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,110,216,115,10 - CONTROL "Include network drives",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,216,101,10,0,HIDC_MAPDRIVES_NET + CONTROL "Include network drives",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,216,101,10,0 END IDD_SOUND DIALOGEX 0, 0, 300, 231 @@ -280,13 +266,13 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN CONTROL "",IDC_CONFIGTREE,"SysTreeView32",TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,6,3,289,153,WS_EX_CLIENTEDGE RTEXT "Name:",IDC_STATIC,0,161,40,15,SS_CENTERIMAGE - EDITTEXT IDC_EDITNAME,44,162,150,13,ES_AUTOHSCROLL,0,HIDC_EDITNAME + EDITTEXT IDC_EDITNAME,44,162,150,13,ES_AUTOHSCROLL RTEXT "Description:",IDC_STATIC,4,183,37,15,SS_CENTERIMAGE - EDITTEXT IDC_EDITDESCRIPTION,44,183,150,13,ES_AUTOHSCROLL,0,HIDC_EDITDESCRIPTION + EDITTEXT IDC_EDITDESCRIPTION,44,183,150,13,ES_AUTOHSCROLL,0 RTEXT "Link:",IDC_STATIC,0,204,40,15,SS_CENTERIMAGE COMBOBOX IDC_CONFIGLINK,44,205,97,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CONTROL "Ignore link",IDC_CONFIGNOLINK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,146,206,48,10 - EDITTEXT IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED,0,HIDC_EDITPATH + EDITTEXT IDC_EDITPATH,199,161,49,15,ES_AUTOHSCROLL | WS_DISABLED,0 CONTROL "Autoload",IDC_CONFIGAUTO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,253,163,42,10 GROUPBOX "Additional Information",IDC_STATIC,199,179,96,38,BS_LEFT PUSHBUTTON "View",IDC_VIEWINFO,210,195,35,15 @@ -381,7 +367,7 @@ BEGIN COMBOBOX IDC_KBLED2,22,173,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_KBLED3,22,193,56,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Logging",IDC_STATIC,97,140,195,25 - CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10,0,HIDC_CREATELOGFILE + CONTROL "Create log file",IDC_CREATELOGFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,151,72,10,0 CONTROL "Illegal memory accesses",IDC_ILLEGAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,189,151,95,10 GROUPBOX "State Files",IDC_STATIC,98,165,195,69 PUSHBUTTON "Load state...",IDC_DOLOADSTATE,105,182,49,14 @@ -520,7 +506,7 @@ BEGIN CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,22,49,55,10 CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,91,49,52,10 CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,160,49,46,10 - EDITTEXT IDC_CS_RTCADJUST,218,47,64,13,ES_AUTOHSCROLL,0,HIDC_CS_RTCADJUST + EDITTEXT IDC_CS_RTCADJUST,218,47,64,13,ES_AUTOHSCROLL,0 GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,12,69,275,29 CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,81,63,10 CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,95,81,85,10 @@ -536,16 +522,16 @@ BEGIN CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,166,79,10 CONTROL "A4000 IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,102,166,84,10 CONTROL "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,201,71,10 - EDITTEXT IDC_CS_RAMSEYREV,94,199,45,13,ES_AUTOHSCROLL,0,HIDC_CS_RAMSEYREV + EDITTEXT IDC_CS_RAMSEYREV,94,199,45,13,ES_AUTOHSCROLL,0 CONTROL "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,214,71,10 - EDITTEXT IDC_CS_FATGARYREV,94,213,45,13,ES_AUTOHSCROLL,0,HIDC_CS_FATGARYREV + EDITTEXT IDC_CS_FATGARYREV,94,213,45,13,ES_AUTOHSCROLL,0 CONTROL "Motherboard Super DMAC",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,227,118,10 CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,21,234,10 CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,128,95,10 CONTROL "Agnus/Alice revision:",IDC_CS_AGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,201,81,10 - EDITTEXT IDC_CS_AGNUSREV,235,199,45,13,ES_AUTOHSCROLL,0,HIDC_CS_AGNUSREV + EDITTEXT IDC_CS_AGNUSREV,235,199,45,13,ES_AUTOHSCROLL,0 CONTROL "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,214,81,10 - EDITTEXT IDC_CS_DENISEREV,235,213,45,13,ES_AUTOHSCROLL,0,HIDC_CS_DENISEREV + EDITTEXT IDC_CS_DENISEREV,235,213,45,13,ES_AUTOHSCROLL,0 END IDD_AVIOUTPUT DIALOGEX 0, 0, 288, 203 @@ -781,71 +767,6 @@ BEGIN CTEXT "x",IDC_PROGRESSBAR_TEXT,23,5,187,10,SS_CENTERIMAGE | WS_TABSTOP END - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SOUND, DIALOG - BEGIN - BOTTOMMARGIN, 230 - END - - IDD_LOADSAVE, DIALOG - BEGIN - BOTTOMMARGIN, 240 - END - - IDD_CONTRIBUTORS, DIALOG - BEGIN - RIGHTMARGIN, 370 - BOTTOMMARGIN, 212 - END - - IDD_INPUT, DIALOG - BEGIN - BOTTOMMARGIN, 240 - END - - IDD_QUICKSTART, DIALOG - BEGIN - RIGHTMARGIN, 299 - END -END -#endif // APSTUDIO_INVOKED - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""dlgs.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - ///////////////////////////////////////////////////////////////////////////// // // Icon diff --git a/od-win32/win32.c b/od-win32/win32.c index 43981df5..e21dd73a 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -67,6 +67,8 @@ #include "uaeipc.h" #include "ar.h" #include "audio.h" +#include "akiko.h" +#include "cdtv.h" extern FILE *debugfile; extern int console_logging; @@ -438,6 +440,34 @@ static void setcursor(int oldx, int oldy) SetCursorPos (amigawin_rect.left + x, amigawin_rect.top + y); } +void resumepaused(void) +{ + resume_sound (); +#ifdef AHI + ahi_open_sound (); +#endif +#ifdef CD32 + akiko_exitgui (); +#endif +#ifdef CDTV + cdtv_exitgui (); +#endif +} + +void setpaused(void) +{ + pause_sound (); +#ifdef AHI + ahi_close_sound (); +#endif +#ifdef CD32 + akiko_entergui (); +#endif +#ifdef CDTV + cdtv_entergui (); +#endif +} + static WPARAM activateapp; static void checkpause (void) @@ -445,10 +475,7 @@ static void checkpause (void) if (activateapp) return; if (currprefs.win32_inactive_pause) { - close_sound (); - #ifdef AHI - ahi_close_sound (); - #endif + setpaused (); emulation_paused = 1; } } @@ -553,10 +580,7 @@ static void winuae_active (HWND hWnd, int minimized) emulation_paused = -1; ShowWindow (hWnd, SW_RESTORE); if (sound_closed) { -#ifdef AHI - ahi_open_sound (); -#endif - set_audio (); + resumepaused(); sound_closed = 0; } if (WIN32GFX_IsPicassoScreen ()) @@ -586,30 +610,22 @@ static void winuae_inactive (HWND hWnd, int minimized) inputdevice_unacquire (); pri = &priorities[currprefs.win32_iconified_priority]; if (currprefs.win32_iconified_nosound) { - close_sound (); - #ifdef AHI - ahi_close_sound (); - #endif + setpaused(); sound_closed = 1; } if (!avioutput_video) { set_inhibit_frame (IHF_WINDOWHIDDEN); } if (currprefs.win32_iconified_pause) { - close_sound (); - #ifdef AHI - ahi_close_sound (); - #endif + if (!sound_closed) + setpaused(); emulation_paused = 1; sound_closed = 1; } } else { if (currprefs.win32_inactive_nosound) { - close_sound (); - #ifdef AHI - ahi_close_sound (); + setpaused(); sound_closed = 1; - #endif } } } @@ -1234,10 +1250,7 @@ void handle_events (void) while (emulation_paused > 0 || pause_emulation) { if ((emulation_paused > 0 || pause_emulation) && was_paused == 0) { - close_sound (); -#ifdef AHI - ahi_close_sound (); -#endif + setpaused(); was_paused = 1; manual_painting_needed++; gui_fps (0, 0); @@ -1262,11 +1275,9 @@ void handle_events (void) } while (checkIPC(&currprefs)); if (was_paused) { - set_audio (); -#ifdef AHI - ahi_open_sound (); -#endif + resumepaused(); emulation_paused = 0; + sound_closed = 0; manual_painting_needed--; } } diff --git a/od-win32/win32.h b/od-win32/win32.h index 038114ac..7211a704 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,9 +15,9 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 2 +#define WINUAEBETA 3 #define WINUAEPUBLICBETA 1 -#define WINUAEDATE MAKEBD(2007, 1, 20) +#define WINUAEDATE MAKEBD(2007, 1, 27) #define IHF_WINDOWHIDDEN 6 #define NORMAL_WINDOW_STYLE (WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU) @@ -39,12 +39,12 @@ extern void clearallkeys(void); extern int getcapslock (void); void releasecapture (void); -int WIN32_RegisterClasses( void ); -int WIN32_InitHtmlHelp( void ); -int WIN32_InitLibraries( void ); -int WIN32_CleanupLibraries( void ); -void WIN32_MouseDefaults( int, int ); -void WIN32_HandleRegistryStuff( void ); +int WIN32_RegisterClasses(void); +int WIN32_InitHtmlHelp(void); +int WIN32_InitLibraries(void); +int WIN32_CleanupLibraries(void); +void WIN32_MouseDefaults(int, int); +void WIN32_HandleRegistryStuff(void); extern void setup_brkhandler (void); extern void remove_brkhandler (void); extern void disablecapture (void); @@ -54,6 +54,9 @@ extern void setmouseactive (int active); extern void minimizewindow (void); extern uae_u32 OSDEP_minimize_uae(void); +extern void resumepaused(void); +extern void setpaused(void); + void finishjob (void); void updatedisplayarea (void); void init_colors (void); diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index d8dce987..8d834b15 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -97,28 +97,28 @@ static int qs_request_reset; static int qs_override; int gui_active; -extern HWND (WINAPI *pHtmlHelp)(HWND, LPCSTR, UINT, LPDWORD ); +extern HWND (WINAPI *pHtmlHelp)(HWND, LPCSTR, UINT, LPDWORD); #undef HtmlHelp #ifndef HH_DISPLAY_TOPIC #define HH_DISPLAY_TOPIC 0 #endif -#define HtmlHelp(a,b,c,d) if( pHtmlHelp ) (*pHtmlHelp)(a,b,c,(LPDWORD)d); else \ -{ char szMessage[MAX_DPATH]; WIN32GUI_LoadUIString( IDS_NOHELP, szMessage, MAX_DPATH ); gui_message( szMessage ); } +#define HtmlHelp(a,b,c,d) if(pHtmlHelp) (*pHtmlHelp)(a,b,c,(LPDWORD)d); else \ +{ char szMessage[MAX_DPATH]; WIN32GUI_LoadUIString(IDS_NOHELP, szMessage, MAX_DPATH); gui_message(szMessage); } extern HWND hAmigaWnd; extern char help_file[MAX_DPATH]; extern int mouseactive; -static char config_filename[ MAX_DPATH ] = ""; +static char config_filename[MAX_DPATH] = ""; -#define Error(x) MessageBox( NULL, (x), "WinUAE Error", MB_OK ) +#define Error(x) MessageBox(NULL, (x), "WinUAE Error", MB_OK) -void WIN32GUI_LoadUIString( DWORD id, char *string, DWORD dwStringLen ) +void WIN32GUI_LoadUIString(DWORD id, char *string, DWORD dwStringLen) { - if( LoadString( hUIDLL ? hUIDLL : hInst, id, string, dwStringLen ) == 0 ) - LoadString( hInst, id, string, dwStringLen ); + if(LoadString(hUIDLL ? hUIDLL : hInst, id, string, dwStringLen) == 0) + LoadString(hInst, id, string, dwStringLen); } static int C_PAGES; @@ -138,6 +138,16 @@ struct ToolTipHWNDS { }; static struct ToolTipHWNDS ToolTipHWNDS2[MAX_IMAGETOOLTIPS + 1]; +static void ew (HWND hDlg, DWORD id, int enable) +{ + HWND w = GetDlgItem(hDlg, id); + if (!w) + return; + if (!enable && w == GetFocus()) + SendMessage(hDlg, WM_NEXTDLGCTL, 0, FALSE); + EnableWindow(w, !!enable); +} + void write_disk_history (void) { int i, j; @@ -781,18 +791,9 @@ void gui_display(int shortcut) #ifdef D3D D3D_guimode (TRUE); #endif -#ifdef CD32 - akiko_entergui (); -#endif -#ifdef CDTV - cdtv_entergui (); -#endif + setpaused(); inputdevice_unacquire (); clearallkeys (); -#ifdef AHI - ahi_close_sound (); -#endif - pause_sound (); setmouseactive (0); if ((!WIN32GFX_IsPicassoScreen() && currprefs.gfx_afullscreen && (currprefs.gfx_size.width < gui_width || currprefs.gfx_size.height < gui_height)) @@ -833,20 +834,11 @@ void gui_display(int shortcut) } manual_painting_needed--; /* So that WM_PAINT doesn't need to use custom refreshing */ manual_palette_refresh_needed = 1; - resume_sound (); -#ifdef AHI - ahi_open_sound (); -#endif + resumepaused(); inputdevice_copyconfig (&changed_prefs, &currprefs); inputdevice_config_change_test (); clearallkeys (); inputdevice_acquire (); -#ifdef CD32 - akiko_exitgui (); -#endif -#ifdef CDTV - cdtv_exitgui (); -#endif if (flipflop >= 0) setmouseactive (1); #ifdef D3D @@ -1635,8 +1627,8 @@ static char *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *conf case CONFIG_SAVE: if (strlen (name) == 0 || strcmp (name, ".uae") == 0) { - char szMessage[ MAX_DPATH ]; - WIN32GUI_LoadUIString( IDS_MUSTENTERNAME, szMessage, MAX_DPATH ); + char szMessage[MAX_DPATH]; + WIN32GUI_LoadUIString(IDS_MUSTENTERNAME, szMessage, MAX_DPATH); pre_gui_message (szMessage); } else { strcpy (workprefs.description, desc); @@ -1646,27 +1638,27 @@ static char *HandleConfiguration (HWND hDlg, int flag, struct ConfigStruct *conf case CONFIG_LOAD: if (strlen (name) == 0) { - char szMessage[ MAX_DPATH ]; - WIN32GUI_LoadUIString( IDS_MUSTSELECTCONFIG, szMessage, MAX_DPATH ); + char szMessage[MAX_DPATH]; + WIN32GUI_LoadUIString(IDS_MUSTSELECTCONFIG, szMessage, MAX_DPATH); pre_gui_message (szMessage); } else { if (target_cfgfile_load (&workprefs, path, configtypepanel, 0) == 0) { - char szMessage[ MAX_DPATH ]; + char szMessage[MAX_DPATH]; WIN32GUI_LoadUIString( IDS_COULDNOTLOADCONFIG, szMessage, MAX_DPATH ); pre_gui_message (szMessage); } else { - EnableWindow (GetDlgItem (hDlg, IDC_VIEWINFO), workprefs.info[0]); + ew (hDlg, IDC_VIEWINFO, workprefs.info[0]); } break; case CONFIG_DELETE: if (strlen (name) == 0) { - char szMessage[ MAX_DPATH ]; - WIN32GUI_LoadUIString( IDS_MUSTSELECTCONFIGFORDELETE, szMessage, MAX_DPATH ); + char szMessage[MAX_DPATH]; + WIN32GUI_LoadUIString(IDS_MUSTSELECTCONFIGFORDELETE, szMessage, MAX_DPATH); pre_gui_message (szMessage); } else { - char szMessage[ MAX_DPATH ]; - char szTitle[ MAX_DPATH ]; + char szMessage[MAX_DPATH]; + char szTitle[MAX_DPATH]; WIN32GUI_LoadUIString( IDS_DELETECONFIGCONFIRMATION, szMessage, MAX_DPATH ); WIN32GUI_LoadUIString( IDS_DELETECONFIGTITLE, szTitle, MAX_DPATH ); if( MessageBox( hDlg, szMessage, szTitle, @@ -1845,16 +1837,16 @@ void InitializeListView (HWND hDlg) // If there are no columns, then insert some lvcolumn.mask = LVCF_WIDTH; - if( ListView_GetColumn( list, 1, &lvcolumn ) == FALSE ) + if(ListView_GetColumn(list, 1, &lvcolumn) == FALSE) { - for( i = 0; i < listview_num_columns; i++ ) + for(i = 0; i < listview_num_columns; i++) { lvcolumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; lvcolumn.iSubItem = i; lvcolumn.fmt = LVCFMT_LEFT; lvcolumn.pszText = column_heading[i]; lvcolumn.cx = listview_column_width[i]; - ListView_InsertColumn( list, i, &lvcolumn ); + ListView_InsertColumn(list, i, &lvcolumn); } } if (lv_type == LV_INPUT) @@ -1867,10 +1859,10 @@ void InitializeListView (HWND hDlg) lvstruct.lParam = 0; lvstruct.iItem = i; lvstruct.iSubItem = 0; - result = ListView_InsertItem( list, &lvstruct ); - width = ListView_GetStringWidth( list, lvstruct.pszText ) + 15; - if( width > listview_column_width[ 0 ] ) - listview_column_width[ 0 ] = width; + result = ListView_InsertItem(list, &lvstruct); + width = ListView_GetStringWidth(list, lvstruct.pszText) + 15; + if( width > listview_column_width[0]) + listview_column_width[0] = width; entry++; } listview_column_width [1] = 260; @@ -1908,7 +1900,7 @@ void InitializeListView (HWND hDlg) ListView_SetItemText (list, result, 2, tmp); width = ListView_GetStringWidth(list, lvstruct.pszText) + 15; if (width > listview_column_width[0]) - listview_column_width[ 0 ] = width; + listview_column_width[0] = width; entry++; } listview_column_width[0] = 30; @@ -1970,12 +1962,12 @@ void InitializeListView (HWND hDlg) listview_column_width[0] = 15; - width = ListView_GetStringWidth(list, devname_str) + 10; ListView_SetItemText(list, result, 1, devname_str); + width = ListView_GetStringWidth(list, devname_str) + 10; if(width > listview_column_width[1]) listview_column_width[1] = width; - ListView_SetItemText(list, result, 1, volname_str); + ListView_SetItemText(list, result, 2, volname_str); width = ListView_GetStringWidth(list, volname_str) + 10; if(width > listview_column_width[2]) listview_column_width[2] = width; @@ -2314,7 +2306,7 @@ static void checkautoload (HWND hDlg, struct ConfigStruct *config) ConfigToRegistry2 (ct, configtypepanel, -1); } CheckDlgButton(hDlg, IDC_CONFIGAUTO, ct ? BST_CHECKED : BST_UNCHECKED); - EnableWindow (GetDlgItem (hDlg, IDC_CONFIGAUTO), configtypepanel > 0 && config && !config->Directory ? TRUE : FALSE); + ew (hDlg, IDC_CONFIGAUTO, configtypepanel > 0 && config && !config->Directory ? TRUE : FALSE); RegQueryValueEx (hWinUAEKey, "ConfigFile_NoAuto", 0, &dwType, (LPBYTE)&ct, &dwRFPsize); CheckDlgButton(hDlg, IDC_CONFIGNOLINK, ct ? BST_CHECKED : BST_UNCHECKED); } @@ -2553,9 +2545,9 @@ static INT_PTR CALLBACK LoadSaveDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPA static INT_PTR CALLBACK ContributorsProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { CHARFORMAT CharFormat; - char szContributors1[ MAX_CONTRIBUTORS_LENGTH ]; - char szContributors2[ MAX_CONTRIBUTORS_LENGTH ]; - char szContributors[ MAX_CONTRIBUTORS_LENGTH*2 ]; + char szContributors1[MAX_CONTRIBUTORS_LENGTH]; + char szContributors2[MAX_CONTRIBUTORS_LENGTH]; + char szContributors[MAX_CONTRIBUTORS_LENGTH * 2]; switch (msg) { case WM_COMMAND: @@ -2939,21 +2931,23 @@ static struct amigamodels amodels[] = { static DWORD quickstart_model = 0, quickstart_conf = 0, quickstart_compa = 1; static int quickstart_ok, quickstart_ok_floppy; static void addfloppytype (HWND hDlg, int n); +static void addfloppyhistory (HWND hDlg); static void enable_for_quickstart (HWND hDlg) { int v = quickstart_ok && quickstart_ok_floppy ? TRUE : FALSE; - EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), !full_property_sheet ? TRUE : FALSE); + ew (guiDlg, IDC_RESETAMIGA, !full_property_sheet ? TRUE : FALSE); ShowWindow (GetDlgItem (hDlg, IDC_QUICKSTART_SETCONFIG), quickstart ? SW_HIDE : SW_SHOW); } static void load_quickstart (HWND hDlg, int romcheck) { - EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), FALSE); + ew (guiDlg, IDC_RESETAMIGA, FALSE); quickstart_ok = build_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa, romcheck); enable_for_quickstart (hDlg); addfloppytype (hDlg, 0); addfloppytype (hDlg, 1); + addfloppyhistory (hDlg); } static void quickstarthost (HWND hDlg, char *name) @@ -3068,7 +3062,7 @@ static void init_quickstartdlg (HWND hDlg) if (quickstart_compa >= amodels[quickstart_model].compalevels) quickstart_compa = 0; i = amodels[quickstart_model].compalevels; - EnableWindow (GetDlgItem (hDlg, IDC_QUICKSTART_COMPATIBILITY), i > 1); + ew (hDlg, IDC_QUICKSTART_COMPATIBILITY, i > 1); SendDlgItemMessage (hDlg, IDC_QUICKSTART_COMPATIBILITY, TBM_SETRANGE, TRUE, MAKELONG (0, i > 1 ? i - 1 : 1)); SendDlgItemMessage (hDlg, IDC_QUICKSTART_COMPATIBILITY, TBM_SETPAGESIZE, 0, 1); SendDlgItemMessage( hDlg, IDC_QUICKSTART_COMPATIBILITY, TBM_SETPOS, TRUE, quickstart_compa); @@ -3176,7 +3170,7 @@ static INT_PTR CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, L static int doinit; LRESULT val; - switch( msg ) + switch(msg) { case WM_INITDIALOG: pages[QUICKSTART_ID] = hDlg; @@ -3193,6 +3187,7 @@ static INT_PTR CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, L if (doinit) { addfloppytype (hDlg, 0); addfloppytype (hDlg, 1); + addfloppyhistory (hDlg); init_quickstartdlg (hDlg); } doinit = 0; @@ -3377,22 +3372,22 @@ static void enable_for_displaydlg (HWND hDlg) #ifndef PICASSO96 rtg = FALSE; #endif - EnableWindow (GetDlgItem (hDlg, IDC_PFULLSCREEN), rtg); + ew (hDlg, IDC_PFULLSCREEN, rtg); if (!full_property_sheet) { /* Disable certain controls which are only to be set once at start-up... */ - EnableWindow (GetDlgItem (hDlg, IDC_TEST16BIT), FALSE); + ew (hDlg, IDC_TEST16BIT, FALSE); } else { - CheckDlgButton( hDlg, IDC_VSYNC, workprefs.gfx_vsync); - EnableWindow (GetDlgItem (hDlg, IDC_XCENTER), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_YCENTER), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_LM_SCANLINES), TRUE); + CheckDlgButton(hDlg, IDC_VSYNC, workprefs.gfx_vsync); + ew (hDlg, IDC_XCENTER, TRUE); + ew (hDlg, IDC_YCENTER, TRUE); + ew (hDlg, IDC_LM_SCANLINES, TRUE); } - EnableWindow (GetDlgItem (hDlg, IDC_FRAMERATE2), !workprefs.gfx_vsync); - EnableWindow (GetDlgItem (hDlg, IDC_FRAMERATE), !workprefs.cpu_cycle_exact); - EnableWindow (GetDlgItem (hDlg, IDC_LORES), !workprefs.gfx_autoresolution); - EnableWindow (GetDlgItem (hDlg, IDC_LM_NORMAL), !workprefs.gfx_autoresolution); - EnableWindow (GetDlgItem (hDlg, IDC_LM_DOUBLED), !workprefs.gfx_autoresolution); - EnableWindow (GetDlgItem (hDlg, IDC_LM_SCANLINES), !workprefs.gfx_autoresolution); + ew (hDlg, IDC_FRAMERATE2, !workprefs.gfx_vsync); + ew (hDlg, IDC_FRAMERATE, !workprefs.cpu_cycle_exact); + ew (hDlg, IDC_LORES, !workprefs.gfx_autoresolution); + ew (hDlg, IDC_LM_NORMAL, !workprefs.gfx_autoresolution); + ew (hDlg, IDC_LM_DOUBLED, !workprefs.gfx_autoresolution); + ew (hDlg, IDC_LM_SCANLINES, !workprefs.gfx_autoresolution); } static void enable_for_chipsetdlg (HWND hDlg) @@ -3400,17 +3395,17 @@ static void enable_for_chipsetdlg (HWND hDlg) int enable = workprefs.cpu_cycle_exact ? FALSE : TRUE; #if !defined (CPUEMU_6) - EnableWindow (GetDlgItem (hDlg, IDC_CYCLEEXACT), FALSE); + ew (hDlg, IDC_CYCLEEXACT, FALSE); #endif - EnableWindow (GetDlgItem (hDlg, IDC_FASTCOPPER), enable); - EnableWindow (GetDlgItem (hDlg, IDC_GENLOCK), full_property_sheet); - EnableWindow (GetDlgItem (hDlg, IDC_BLITIMM), enable); + ew (hDlg, IDC_FASTCOPPER, enable); + ew (hDlg, IDC_GENLOCK, full_property_sheet); + ew (hDlg, IDC_BLITIMM, enable); if (enable == FALSE) { workprefs.immediate_blits = 0; CheckDlgButton (hDlg, IDC_FASTCOPPER, FALSE); CheckDlgButton (hDlg, IDC_BLITIMM, FALSE); } - EnableWindow (GetDlgItem (hDlg, IDC_CS_EXT), workprefs.cs_compatible ? TRUE : FALSE); + ew (hDlg, IDC_CS_EXT, workprefs.cs_compatible ? TRUE : FALSE); } static DWORD idnth[] = { IDS_SECOND, IDS_THIRD, IDS_FOURTH, IDS_FIFTH, IDS_SIXTH, IDS_SEVENTH, IDS_EIGHTH, IDS_NINTH, IDS_TENTH, -1 }; @@ -3647,8 +3642,8 @@ static void init_display_mode (HWND hDlg) static void values_to_displaydlg (HWND hDlg) { - char buffer[ MAX_FRAMERATE_LENGTH + MAX_NTH_LENGTH ]; - char Nth[ MAX_NTH_LENGTH ]; + char buffer[MAX_FRAMERATE_LENGTH + MAX_NTH_LENGTH]; + char Nth[MAX_NTH_LENGTH]; LPSTR blah[1] = { Nth }; LPTSTR string = NULL; int v; @@ -3745,8 +3740,8 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l workprefs.gfx_vsync = IsDlgButtonChecked (hDlg, IDC_VSYNC); { - char buffer[ MAX_FRAMERATE_LENGTH ]; - char Nth[ MAX_NTH_LENGTH ]; + char buffer[MAX_FRAMERATE_LENGTH]; + char Nth[MAX_NTH_LENGTH]; LPSTR blah[1] = { Nth }; LPTSTR string = NULL; @@ -3899,7 +3894,7 @@ static INT_PTR CALLBACK DisplayDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR if((wParam == IDC_TEST16BIT) && DirectDraw_Start(NULL)) { if(RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Arabuusimiehet\\WinUAE", 0, KEY_WRITE | KEY_READ, &hPixelFormatKey) == ERROR_SUCCESS) { char szMessage[4096]; - char szTitle[ MAX_DPATH ]; + char szTitle[MAX_DPATH]; WIN32GUI_LoadUIString(IDS_GFXCARDCHECK, szMessage, 4096); WIN32GUI_LoadUIString(IDS_GFXCARDTITLE, szTitle, MAX_DPATH); @@ -3933,7 +3928,7 @@ static INT_PTR CALLBACK DisplayDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR static void values_to_chipsetdlg (HWND hDlg) { - char Nth[ MAX_NTH_LENGTH ]; + char Nth[MAX_NTH_LENGTH]; LPSTR blah[1] = { Nth }; LPTSTR string = NULL; int which_button; @@ -4052,7 +4047,7 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR pages[CHIPSET_ID] = hDlg; currentpage = CHIPSET_ID; #ifndef AGA - EnableWindow (GetDlgItem (hDlg, IDC_AGA), FALSE); + ew (hDlg, IDC_AGA, FALSE); #endif case WM_USER: @@ -4226,26 +4221,26 @@ static void enable_for_chipsetdlg2 (HWND hDlg) { int e = workprefs.cs_compatible ? FALSE : TRUE; - EnableWindow (GetDlgItem (hDlg, IDC_CS_FATGARY), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_RAMSEY), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_AGNUS), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_DENISE), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_FATGARYREV), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_RAMSEYREV), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_AGNUSREV), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_DENISEREV), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_IDE1), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_IDE2), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_DMAC), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CD32CD), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CD32NVRAM), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CD32C2P), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CDTVCD), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CDTVRAM), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CDTVRAMEXP), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_KSMIRROR), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_A1000RAM), e); - EnableWindow (GetDlgItem (hDlg, IDC_CS_DF0IDHW), e); + ew (hDlg, IDC_CS_FATGARY, e); + ew (hDlg, IDC_CS_RAMSEY, e); + ew (hDlg, IDC_CS_AGNUS, e); + ew (hDlg, IDC_CS_DENISE, e); + ew (hDlg, IDC_CS_FATGARYREV, e); + ew (hDlg, IDC_CS_RAMSEYREV, e); + ew (hDlg, IDC_CS_AGNUSREV, e); + ew (hDlg, IDC_CS_DENISEREV, e); + ew (hDlg, IDC_CS_IDE1, e); + ew (hDlg, IDC_CS_IDE2, e); + ew (hDlg, IDC_CS_DMAC, e); + ew (hDlg, IDC_CS_CD32CD, e); + ew (hDlg, IDC_CS_CD32NVRAM, e); + ew (hDlg, IDC_CS_CD32C2P, e); + ew (hDlg, IDC_CS_CDTVCD, e); + ew (hDlg, IDC_CS_CDTVRAM, e); + ew (hDlg, IDC_CS_CDTVRAMEXP, e); + ew (hDlg, IDC_CS_KSMIRROR, e); + ew (hDlg, IDC_CS_A1000RAM, e); + ew (hDlg, IDC_CS_DF0IDHW, e); } static INT_PTR CALLBACK ChipsetDlgProc2 (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -4284,19 +4279,19 @@ static void enable_for_memorydlg (HWND hDlg) z3 = FALSE; fast = FALSE; #endif - EnableWindow (GetDlgItem (hDlg, IDC_Z3TEXT), z3); - EnableWindow (GetDlgItem (hDlg, IDC_Z3FASTRAM), z3); - EnableWindow (GetDlgItem (hDlg, IDC_Z3FASTMEM), z3); - EnableWindow (GetDlgItem (hDlg, IDC_FASTMEM), fast); - EnableWindow (GetDlgItem (hDlg, IDC_FASTRAM), fast); - EnableWindow (GetDlgItem (hDlg, IDC_FASTTEXT), fast); - EnableWindow (GetDlgItem (hDlg, IDC_GFXCARDTEXT), z3); - EnableWindow (GetDlgItem (hDlg, IDC_P96RAM), z3); - EnableWindow (GetDlgItem (hDlg, IDC_P96MEM), z3); - EnableWindow (GetDlgItem (hDlg, IDC_MBRAM1), z3); - EnableWindow (GetDlgItem (hDlg, IDC_MBMEM1), z3); - EnableWindow (GetDlgItem (hDlg, IDC_MBRAM2), z3); - EnableWindow (GetDlgItem (hDlg, IDC_MBMEM2), z3); + ew (hDlg, IDC_Z3TEXT, z3); + ew (hDlg, IDC_Z3FASTRAM, z3); + ew (hDlg, IDC_Z3FASTMEM, z3); + ew (hDlg, IDC_FASTMEM, fast); + ew (hDlg, IDC_FASTRAM, fast); + ew (hDlg, IDC_FASTTEXT, fast); + ew (hDlg, IDC_GFXCARDTEXT, z3); + ew (hDlg, IDC_P96RAM, z3); + ew (hDlg, IDC_P96MEM, z3); + ew (hDlg, IDC_MBRAM1, z3); + ew (hDlg, IDC_MBMEM1, z3); + ew (hDlg, IDC_MBRAM2, z3); + ew (hDlg, IDC_MBMEM2, z3); } static void values_to_memorydlg (HWND hDlg) @@ -4532,7 +4527,7 @@ static void values_from_kickstartdlg (HWND hDlg) getromfile (hDlg, IDC_CARTFILE, workprefs.cartfile, sizeof (workprefs.cartfile)); if (workprefs.cartfile[0]) workprefs.cart_internal = 0; - EnableWindow(GetDlgItem(hDlg, IDC_HRTMON), workprefs.cartfile[0] ? FALSE : TRUE); + ew (hDlg, IDC_HRTMON, workprefs.cartfile[0] ? FALSE : TRUE); CheckDlgButton(hDlg, IDC_HRTMON, workprefs.cart_internal ? TRUE : FALSE); } @@ -4562,26 +4557,26 @@ static void init_kickstart (HWND hDlg) HKEY fkey; #if !defined(AUTOCONFIG) - EnableWindow(GetDlgItem(hDlg, IDC_MAPROM), FALSE); + ew (hDlg, IDC_MAPROM), FALSE); #endif #if !defined (CDTV) && !defined (CD32) - EnableWindow(GetDlgItem(hDlg, IDC_FLASHFILE), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_ROMFILE2), FALSE); + ew (hDlg, IDC_FLASHFILE), FALSE); + ew (hDlg, IDC_ROMFILE2), FALSE); #endif #if !defined (ACTION_REPLAY) - EnableWindow(GetDlgItem(hDlg, IDC_CARTFILE), FALSE); + ew (hDlg, IDC_CARTFILE), FALSE); #endif #if defined (UAE_MINI) - EnableWindow(GetDlgItem(hDlg, IDC_KICKSHIFTER), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_ROMCHOOSER2), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_CARTCHOOSER), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_FLASHCHOOSER), FALSE); + ew (hDlg, IDC_KICKSHIFTER), FALSE); + ew (hDlg, IDC_ROMCHOOSER2), FALSE); + ew (hDlg, IDC_CARTCHOOSER), FALSE); + ew (hDlg, IDC_FLASHCHOOSER), FALSE); #endif if (RegOpenKeyEx (hWinUAEKey , "DetectedROMs", 0, KEY_READ, &fkey) != ERROR_SUCCESS) scan_roms (workprefs.path_rom); if (fkey) RegCloseKey (fkey); - EnableWindow(GetDlgItem(hDlg, IDC_HRTMON), full_property_sheet); + ew (hDlg, IDC_HRTMON, full_property_sheet); } @@ -4649,7 +4644,7 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP case IDC_HRTMON: workprefs.cart_internal = IsDlgButtonChecked(hDlg, IDC_HRTMON) ? 1 : 0; - EnableWindow(GetDlgItem(hDlg, IDC_CARTFILE), workprefs.cart_internal ? FALSE : TRUE); + ew (hDlg, IDC_CARTFILE, workprefs.cart_internal ? FALSE : TRUE); break; } @@ -4662,23 +4657,23 @@ static INT_PTR CALLBACK KickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP static void enable_for_miscdlg (HWND hDlg) { if (!full_property_sheet) { - EnableWindow (GetDlgItem (hDlg, IDC_JULIAN), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_CTRLF11), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_SOCKETS), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_SHOWGUI), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_NOSPEED), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_NOSPEEDPAUSE), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_NOSOUND), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_NOOVERLAY), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_DOSAVESTATE), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_SCSIMODE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_SCSIDEVICE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CLOCKSYNC), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CATWEASEL), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_STATE_CAPTURE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_STATE_RATE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_STATE_BUFFERSIZE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_LANGUAGE), FALSE); + ew (hDlg, IDC_JULIAN, TRUE); + ew (hDlg, IDC_CTRLF11, TRUE); + ew (hDlg, IDC_SOCKETS, FALSE); + ew (hDlg, IDC_SHOWGUI, FALSE); + ew (hDlg, IDC_NOSPEED, TRUE); + ew (hDlg, IDC_NOSPEEDPAUSE, TRUE); + ew (hDlg, IDC_NOSOUND, TRUE); + ew (hDlg, IDC_NOOVERLAY, TRUE); + ew (hDlg, IDC_DOSAVESTATE, TRUE); + ew (hDlg, IDC_SCSIMODE, FALSE); + ew (hDlg, IDC_SCSIDEVICE, FALSE); + ew (hDlg, IDC_CLOCKSYNC, FALSE); + ew (hDlg, IDC_CATWEASEL, FALSE); + ew (hDlg, IDC_STATE_CAPTURE, FALSE); + ew (hDlg, IDC_STATE_RATE, FALSE); + ew (hDlg, IDC_STATE_BUFFERSIZE, FALSE); + ew (hDlg, IDC_LANGUAGE, FALSE); } else { #if !defined (BSDSOCKET) EnableWindow (GetDlgItem(hDlg, IDC_SOCKETS), FALSE); @@ -4687,9 +4682,9 @@ static void enable_for_miscdlg (HWND hDlg) EnableWindow (GetDlgItem(hDlg, IDC_SCSIDEVICE), FALSE); EnableWindow (GetDlgItem(hDlg, IDC_SCSIMODE), TRUE); #endif - EnableWindow (GetDlgItem (hDlg, IDC_DOSAVESTATE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_STATE_RATE), workprefs.statecapture ? TRUE : FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_STATE_BUFFERSIZE), workprefs.statecapture ? TRUE : FALSE); + ew (hDlg, IDC_DOSAVESTATE, FALSE); + ew (hDlg, IDC_STATE_RATE, workprefs.statecapture ? TRUE : FALSE); + ew (hDlg, IDC_STATE_BUFFERSIZE, workprefs.statecapture ? TRUE : FALSE); } } @@ -4829,7 +4824,7 @@ static void values_to_miscdlg (HWND hDlg) CheckDlgButton (hDlg, IDC_CLOCKSYNC, workprefs.tod_hack); CheckDlgButton (hDlg, IDC_POWERSAVE, workprefs.win32_powersavedisabled); cw = catweasel_detect(); - EnableWindow (GetDlgItem (hDlg, IDC_CATWEASEL), cw); + ew (hDlg, IDC_CATWEASEL, cw); if (!cw && workprefs.catweasel < 100) workprefs.catweasel = 0; CheckDlgButton (hDlg, IDC_CATWEASEL, workprefs.catweasel); @@ -5059,21 +5054,21 @@ static void enable_for_cpudlg (HWND hDlg) BOOL cpu_based_enable = FALSE; /* These four items only get enabled when adjustable CPU style is enabled */ - EnableWindow (GetDlgItem (hDlg, IDC_SPEED), workprefs.m68k_speed > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CPU_TEXT), (!workprefs.cpu_cycle_exact || workprefs.cpu_level > 0) && workprefs.m68k_speed > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CHIPSET_TEXT), (!workprefs.cpu_cycle_exact || workprefs.cpu_level > 0) && workprefs.m68k_speed > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CS_HOST), !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CS_68000), !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CS_ADJUSTABLE), !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); - EnableWindow (GetDlgItem (hDlg, IDC_CPUTEXT), workprefs.m68k_speed > 0 ); - EnableWindow (GetDlgItem (hDlg, IDC_CPUIDLE), workprefs.m68k_speed != 0 ? TRUE : FALSE); + ew (hDlg, IDC_SPEED, workprefs.m68k_speed > 0); + ew (hDlg, IDC_CS_CPU_TEXT, (!workprefs.cpu_cycle_exact || workprefs.cpu_level > 0) && workprefs.m68k_speed > 0); + ew (hDlg, IDC_CS_CHIPSET_TEXT, (!workprefs.cpu_cycle_exact || workprefs.cpu_level > 0) && workprefs.m68k_speed > 0); + ew (hDlg, IDC_CS_HOST, !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); + ew (hDlg, IDC_CS_68000, !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); + ew (hDlg, IDC_CS_ADJUSTABLE, !workprefs.cpu_cycle_exact || workprefs.cpu_level > 0); + ew (hDlg, IDC_CPUTEXT, workprefs.m68k_speed > 0 ); + ew (hDlg, IDC_CPUIDLE, workprefs.m68k_speed != 0 ? TRUE : FALSE); #if !defined(CPUEMU_0) || defined(CPUEMU_68000_ONLY) - EnableWindow (GetDlgItem (hDlg, IDC_CPU1), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CPU2), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CPU3), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CPU4), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CPU5), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_CPU6), FALSE); + ew (hDlg, IDC_CPU1, FALSE); + ew (hDlg, IDC_CPU2, FALSE); + ew (hDlg, IDC_CPU3, FALSE); + ew (hDlg, IDC_CPU4, FALSE); + ew (hDlg, IDC_CPU5, FALSE); + ew (hDlg, IDC_CPU6, FALSE); #endif cpu_based_enable = workprefs.cpu_level >= 2 && @@ -5085,20 +5080,20 @@ static void enable_for_cpudlg (HWND hDlg) #endif enable2 = enable && workprefs.compforcesettings; - EnableWindow (GetDlgItem (hDlg, IDC_TRUST0), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_TRUST1), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_TRUST2), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_HARDFLUSH), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_CONSTJUMP), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_JITFPU), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_NOFLAGS), enable2); - EnableWindow (GetDlgItem (hDlg, IDC_CS_CACHE_TEXT), cpu_based_enable && workprefs.cachesize); - EnableWindow (GetDlgItem (hDlg, IDC_CACHE), cpu_based_enable && workprefs.cachesize); - EnableWindow (GetDlgItem (hDlg, IDC_CACHETEXT), cpu_based_enable && workprefs.cachesize); - EnableWindow (GetDlgItem (hDlg, IDC_FORCE), enable); - EnableWindow (GetDlgItem (hDlg, IDC_JITENABLE), cpu_based_enable); - EnableWindow (GetDlgItem (hDlg, IDC_COMPATIBLE), !workprefs.cpu_cycle_exact && !workprefs.cachesize); - EnableWindow (GetDlgItem (hDlg, IDC_COMPATIBLE_FPU), workprefs.cpu_level >= 3); + ew (hDlg, IDC_TRUST0, enable2); + ew (hDlg, IDC_TRUST1, enable2); + ew (hDlg, IDC_TRUST2, enable2); + ew (hDlg, IDC_HARDFLUSH, enable2); + ew (hDlg, IDC_CONSTJUMP, enable2); + ew (hDlg, IDC_JITFPU, enable2); + ew (hDlg, IDC_NOFLAGS, enable2); + ew (hDlg, IDC_CS_CACHE_TEXT, cpu_based_enable && workprefs.cachesize); + ew (hDlg, IDC_CACHE, cpu_based_enable && workprefs.cachesize); + ew (hDlg, IDC_CACHETEXT, cpu_based_enable && workprefs.cachesize); + ew (hDlg, IDC_FORCE, enable); + ew (hDlg, IDC_JITENABLE, cpu_based_enable); + ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_cycle_exact && !workprefs.cachesize); + ew (hDlg, IDC_COMPATIBLE_FPU, workprefs.cpu_level >= 3); #ifdef JIT if( enable ) @@ -5121,7 +5116,7 @@ static void enable_for_cpudlg (HWND hDlg) static void values_to_cpudlg (HWND hDlg) { - char cache[ 8 ] = ""; + char cache[8] = ""; BOOL enable = FALSE; BOOL cpu_based_enable = FALSE; @@ -5166,7 +5161,7 @@ static void values_to_cpudlg (HWND hDlg) workprefs.comptrustnaddr= 0; } - CheckRadioButton(hDlg, IDC_TRUST0, IDC_TRUST2, trust_ids[ workprefs.comptrustbyte]); + CheckRadioButton(hDlg, IDC_TRUST0, IDC_TRUST2, trust_ids[workprefs.comptrustbyte]); SendDlgItemMessage(hDlg, IDC_CACHE, TBM_SETPOS, TRUE, workprefs.cachesize / 1024); sprintf(cache, "%d MB", workprefs.cachesize / 1024 ); @@ -5309,34 +5304,34 @@ static void enable_for_sounddlg (HWND hDlg) enumerate_sound_devices (&numdevs); if( numdevs == 0 ) - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCARDLIST), FALSE); + ew (hDlg, IDC_SOUNDCARDLIST, FALSE); else - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCARDLIST), workprefs.produce_sound); - - EnableWindow (GetDlgItem (hDlg, IDC_FREQUENCY), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDFREQ), workprefs.produce_sound ? TRUE : FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREO), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDINTERPOLATION), workprefs.sound_stereo < 3 && workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDVOLUME2), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOSEP), ISSTEREO(workprefs) && workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSTEREOMIX), ISSTEREO(workprefs) && workprefs.produce_sound); - - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERMEM), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERRAM), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDADJUST), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDADJUSTNUM), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDBUFFERTEXT), workprefs.produce_sound); - - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVE), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVESELECT), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDDRIVEVOLUME2), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_AUDIOSYNC), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDFILTER), workprefs.produce_sound); - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDSWAP), workprefs.produce_sound); - - EnableWindow (GetDlgItem (hDlg, IDC_SOUNDCALIBRATE), workprefs.produce_sound && full_property_sheet); + ew (hDlg, IDC_SOUNDCARDLIST, workprefs.produce_sound); + + ew (hDlg, IDC_FREQUENCY, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDFREQ, workprefs.produce_sound ? TRUE : FALSE); + ew (hDlg, IDC_SOUNDSTEREO, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDINTERPOLATION, workprefs.sound_stereo < 3 && workprefs.produce_sound); + ew (hDlg, IDC_SOUNDVOLUME, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDVOLUME2, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDSTEREOSEP, ISSTEREO(workprefs) && workprefs.produce_sound); + ew (hDlg, IDC_SOUNDSTEREOMIX, ISSTEREO(workprefs) && workprefs.produce_sound); + + ew (hDlg, IDC_SOUNDBUFFERMEM, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDBUFFERRAM, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDADJUST, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDADJUSTNUM, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDBUFFERTEXT, workprefs.produce_sound); + + ew (hDlg, IDC_SOUNDDRIVE, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDDRIVESELECT, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDDRIVEVOLUME, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDDRIVEVOLUME2, workprefs.produce_sound); + ew (hDlg, IDC_AUDIOSYNC, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDFILTER, workprefs.produce_sound); + ew (hDlg, IDC_SOUNDSWAP, workprefs.produce_sound); + + ew (hDlg, IDC_SOUNDCALIBRATE, workprefs.produce_sound && full_property_sheet); } static int exact_log2 (int v) @@ -5609,13 +5604,13 @@ static void values_from_sounddlg (HWND hDlg) workprefs.sound_mixed_stereo = 0; if (workprefs.sound_stereo > 0) { idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOSEP, CB_GETCURSEL, 0, 0); - if (idx >= 0) { + if (idx != CB_ERR) { if (idx > 0) workprefs.sound_mixed_stereo = -1; workprefs.sound_stereo_separation = 10 - idx; } idx = SendDlgItemMessage (hDlg, IDC_SOUNDSTEREOMIX, CB_GETCURSEL, 0, 0); - if (idx > 0) + if (idx != CB_ERR && idx > 0) workprefs.sound_mixed_stereo = idx; } @@ -5769,7 +5764,7 @@ static INT_PTR CALLBACK VolumeSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, BROWSEINFO browse_info; char directory_path[MAX_DPATH] = ""; LPITEMIDLIST browse; - char szTitle[ MAX_DPATH ]; + char szTitle[MAX_DPATH]; WIN32GUI_LoadUIString( IDS_SELECTFILESYSROOT, szTitle, MAX_DPATH ); @@ -5857,7 +5852,7 @@ static void sethardfile (HWND hDlg) SetDlgItemInt (hDlg, IDC_BLOCKSIZE, current_hfdlg.blocksize, FALSE); SetDlgItemInt (hDlg, IDC_HARDFILE_BOOTPRI, current_hfdlg.bootpri, TRUE); CheckDlgButton (hDlg, IDC_RW, current_hfdlg.rw); - EnableWindow (GetDlgItem (hDlg, IDC_HDF_RDB), + ew (hDlg, IDC_HDF_RDB, !(current_hfdlg.sectors == 0 && current_hfdlg.surfaces == 0 && current_hfdlg.reserved == 0)); } @@ -5865,8 +5860,8 @@ static void inithardfile (HWND hDlg) { char tmp[MAX_DPATH]; - EnableWindow (GetDlgItem (hDlg, IDC_HF_DOSTYPE), FALSE); - EnableWindow (GetDlgItem (hDlg, IDC_HF_CREATE), FALSE); + ew (hDlg, IDC_HF_DOSTYPE, FALSE); + ew (hDlg, IDC_HF_CREATE, FALSE); SendDlgItemMessage(hDlg, IDC_HF_TYPE, CB_RESETCONTENT, 0, 0); WIN32GUI_LoadUIString (IDS_HF_FS_CUSTOM, tmp, sizeof (tmp)); SendDlgItemMessage (hDlg, IDC_HF_TYPE, CB_ADDSTRING, 0, (LPARAM)"OFS/FFS/RDB"); @@ -5923,12 +5918,12 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam switch (LOWORD (wParam)) { case IDC_HF_SIZE: - EnableWindow (GetDlgItem (hDlg, IDC_HF_CREATE), CalculateHardfileSize (hDlg) > 0); + ew (hDlg, IDC_HF_CREATE, CalculateHardfileSize (hDlg) > 0); break; case IDC_HF_TYPE: res = SendDlgItemMessage (hDlg, IDC_HF_TYPE, CB_GETCURSEL, 0, 0); sethfdostype (hDlg, (int)res); - EnableWindow (GetDlgItem (hDlg, IDC_HF_DOSTYPE), res >= 2); + ew (hDlg, IDC_HF_DOSTYPE, res >= 2); break; case IDC_HF_CREATE: { @@ -6017,9 +6012,9 @@ static INT_PTR CALLBACK HarddriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara recursive++; CheckDlgButton (hDlg, IDC_RW, current_hfdlg.rw); SendDlgItemMessage(hDlg, IDC_HARDDRIVE, CB_RESETCONTENT, 0, 0); - EnableWindow(GetDlgItem(hDlg, IDC_HARDDRIVE_IMAGE), FALSE); - EnableWindow(GetDlgItem(hDlg, IDOK), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_RW), FALSE); + ew (hDlg, IDC_HARDDRIVE_IMAGE, FALSE); + ew (hDlg, IDOK, FALSE); + ew (hDlg, IDC_RW, FALSE); index = -1; for (i = 0; i < hdf_getnumharddrives(); i++) { SendDlgItemMessage( hDlg, IDC_HARDDRIVE, CB_ADDSTRING, 0, (LPARAM)hdf_getnameharddrive(i, 1)); @@ -6038,9 +6033,9 @@ static INT_PTR CALLBACK HarddriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara if (oposn != posn) { oposn = posn; if (posn >= 0) { - EnableWindow(GetDlgItem(hDlg, IDC_HARDDRIVE_IMAGE), TRUE); - EnableWindow(GetDlgItem(hDlg, IDOK), TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_RW), TRUE); + ew (hDlg, IDC_HARDDRIVE_IMAGE, TRUE); + ew (hDlg, IDOK, TRUE); + ew (hDlg, IDC_RW, TRUE); } } if (HIWORD (wParam) == BN_CLICKED) { @@ -6416,7 +6411,7 @@ static void floppytooltip (HWND hDlg, int num, uae_u32 crc32) SendMessage (ToolTipHWND, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti); } -static void addfloppyhistory (HWND hDlg, HKEY fkey, int n, int f_text) +static void addfloppyhistory_2 (HWND hDlg, HKEY fkey, int n, int f_text) { int i, j; char *s; @@ -6464,10 +6459,36 @@ static void addfloppyhistory (HWND hDlg, HKEY fkey, int n, int f_text) } } +static void addfloppyhistory(HWND hDlg) +{ + HKEY fkey; + int f_text, max, n; + + if (currentpage == QUICKSTART_ID) + max = 2; + else if (currentpage == FLOPPY_ID) + max = 4; + else if (currentpage == DISK_ID) + max = 1; + else + return; + fkey = read_disk_history (); + for (n = 0; n < max; n++) { + if (currentpage == QUICKSTART_ID) + f_text = floppybuttonsq[n][0]; + else if (currentpage == FLOPPY_ID) + f_text = floppybuttons[n][0]; + else + f_text = IDC_DISKTEXT; + addfloppyhistory_2 (hDlg, fkey, n, f_text); + } + if (fkey) + RegCloseKey (fkey); +} + static void addfloppytype (HWND hDlg, int n) { int state, chk; - HKEY fkey; int nn = workprefs.dfxtype[n] + 1; int f_text = floppybuttons[n][0]; @@ -6496,25 +6517,18 @@ static void addfloppytype (HWND hDlg, int n) ShowWindow (GetDlgItem(hDlg, f_si), zfile_exists (DISK_get_saveimagepath (workprefs.df[n])) ? SW_SHOW : SW_HIDE); if (f_text >= 0) - EnableWindow(GetDlgItem(hDlg, f_text), state); + ew (hDlg, f_text, state); if (f_eject >= 0) - EnableWindow(GetDlgItem(hDlg, f_eject), TRUE); + ew (hDlg, f_eject, TRUE); if (f_drive >= 0) - EnableWindow(GetDlgItem(hDlg, f_drive), state); + ew (hDlg, f_drive, state); chk = disk_getwriteprotect (workprefs.df[n]) && state == TRUE ? BST_CHECKED : 0; if (f_wp >= 0) CheckDlgButton(hDlg, f_wp, chk); chk = state && DISK_validate_filename (workprefs.df[n], 0, NULL, NULL) ? TRUE : FALSE; if (f_wp >= 0) - EnableWindow(GetDlgItem(hDlg, f_wp), chk); - - fkey = read_disk_history (); - - addfloppyhistory (hDlg, fkey, n, f_text); - - if (fkey) - RegCloseKey (fkey); -} + ew (hDlg, f_wp, chk); + } static void getfloppytype (HWND hDlg, int n) { @@ -6584,6 +6598,7 @@ static void addallfloppies (HWND hDlg) for (i = 0; i < 4; i++) addfloppytype (hDlg, i); + addfloppyhistory (hDlg); } static void floppysetwriteprotect (HWND hDlg, int n, int protect) @@ -6610,6 +6625,7 @@ static void diskselect (HWND hDlg, WPARAM wParam, struct uae_prefs *p, int drv) disk_insert (2, p->df[2]); disk_insert (3, p->df[3]); addfloppytype (hDlg, drv); + addfloppyhistory (hDlg); } static INT_PTR CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -6677,19 +6693,23 @@ static INT_PTR CALLBACK FloppyDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARA case IDC_DF0TEXTQ: getfloppyname (hDlg, 0); addfloppytype (hDlg, 0); + addfloppyhistory (hDlg); break; case IDC_DF1TEXT: case IDC_DF1TEXTQ: getfloppyname (hDlg, 1); addfloppytype (hDlg, 1); + addfloppyhistory (hDlg); break; case IDC_DF2TEXT: getfloppyname (hDlg, 2); addfloppytype (hDlg, 2); + addfloppyhistory (hDlg); break; case IDC_DF3TEXT: getfloppyname (hDlg, 3); addfloppytype (hDlg, 3); + addfloppyhistory (hDlg); break; case IDC_DF0TYPE: getfloppytype (hDlg, 0); @@ -6838,7 +6858,6 @@ static INT_PTR CALLBACK SwapperDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR static int recursive = 0; static int entry; char tmp[MAX_DPATH]; - HKEY fkey; switch (msg) { @@ -6846,10 +6865,7 @@ static INT_PTR CALLBACK SwapperDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR pages[DISK_ID] = hDlg; currentpage = DISK_ID; InitializeListView(hDlg); - fkey = read_disk_history (); - addfloppyhistory (hDlg, fkey, 0, IDC_DISKTEXT); - if (fkey) - RegCloseKey (fkey); + addfloppyhistory (hDlg); entry = 0; swapperhili (hDlg, entry); break; @@ -6964,6 +6980,7 @@ static INT_PTR CALLBACK SwapperDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR if (entry >= 0) { if (getfloppybox (hDlg, IDC_DISKTEXT, tmp, sizeof (tmp))) { strcpy (workprefs.dfxlist[entry], tmp); + addfloppyhistory (hDlg); InitializeListView (hDlg); swapperhili (hDlg, entry); } else { @@ -7072,33 +7089,33 @@ static void enable_for_portsdlg( HWND hDlg ) int v; v = workprefs.input_selected_setting > 0 ? FALSE : TRUE; - EnableWindow (GetDlgItem (hDlg, IDC_SWAP), v); + ew (hDlg, IDC_SWAP, v); #if !defined (SERIAL_PORT) - EnableWindow(GetDlgItem(hDlg, IDC_MIDIOUTLIST), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_MIDIINLIST), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_SHARED), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_SER_CTSRTS), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_SERIAL_DIRECT), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_SERIAL), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_UAESERIAL), FALSE); + ew (hDlg, IDC_MIDIOUTLIST, FALSE); + ew (hDlg, IDC_MIDIINLIST, FALSE); + ew (hDlg, IDC_SHARED, FALSE); + ew (hDlg, IDC_SER_CTSRTS, FALSE); + ew (hDlg, IDC_SERIAL_DIRECT, FALSE); + ew (hDlg, IDC_SERIAL, FALSE); + ew (hDlg, IDC_UAESERIAL, FALSE); #else v = workprefs.use_serial ? TRUE : FALSE; - EnableWindow(GetDlgItem(hDlg, IDC_SER_SHARED), v); - EnableWindow(GetDlgItem(hDlg, IDC_SER_CTSRTS), v); - EnableWindow(GetDlgItem(hDlg, IDC_SER_DIRECT), v); - EnableWindow(GetDlgItem(hDlg, IDC_UAESERIAL), full_property_sheet); + ew (hDlg, IDC_SER_SHARED, v); + ew (hDlg, IDC_SER_CTSRTS, v); + ew (hDlg, IDC_SER_DIRECT, v); + ew (hDlg, IDC_UAESERIAL, full_property_sheet); #endif #if !defined (PARALLEL_PORT) - EnableWindow(GetDlgItem(hDlg, IDC_PRINTERLIST), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_FLUSHPRINTER), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PSPRINTER), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PS_PARAMS), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PRINTER_AUTOFLUSH), FALSE); + ew (hDlg, IDC_PRINTERLIST, FALSE); + ew (hDlg, IDC_FLUSHPRINTER, FALSE); + ew (hDlg, IDC_PSPRINTER, FALSE); + ew (hDlg, IDC_PS_PARAMS, FALSE); + ew (hDlg, IDC_PRINTER_AUTOFLUSH, FALSE); #else - EnableWindow(GetDlgItem(hDlg, IDC_FLUSHPRINTER), isprinteropen () ? TRUE : FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PSPRINTER), full_property_sheet && ghostscript_available ? TRUE : FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PSPRINTERDETECT), full_property_sheet ? TRUE : FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_PS_PARAMS), full_property_sheet && ghostscript_available); + ew (hDlg, IDC_FLUSHPRINTER, isprinteropen () ? TRUE : FALSE); + ew (hDlg, IDC_PSPRINTER, full_property_sheet && ghostscript_available ? TRUE : FALSE); + ew (hDlg, IDC_PSPRINTERDETECT, full_property_sheet ? TRUE : FALSE); + ew (hDlg, IDC_PS_PARAMS, full_property_sheet && ghostscript_available); #endif } @@ -7267,7 +7284,7 @@ static void values_from_portsdlg (HWND hDlg) } else { workprefs.win32_midiindev = SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_GETCURSEL, 0, 0); } - EnableWindow(GetDlgItem(hDlg, IDC_MIDIINLIST), workprefs.win32_midioutdev < -1 ? FALSE : TRUE); + ew (hDlg, IDC_MIDIINLIST, workprefs.win32_midioutdev < -1 ? FALSE : TRUE); item = SendDlgItemMessage (hDlg, IDC_SERIAL, CB_GETCURSEL, 0, 0L); if (item != CB_ERR && item > 0) { @@ -7336,7 +7353,7 @@ static void values_to_portsdlg (HWND hDlg) SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_SETCURSEL, workprefs.win32_midiindev, 0); else SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_SETCURSEL, 0, 0); - EnableWindow(GetDlgItem(hDlg, IDC_MIDIINLIST ), workprefs.win32_midioutdev < -1 ? FALSE : TRUE); + ew (hDlg, IDC_MIDIINLIST, workprefs.win32_midioutdev < -1 ? FALSE : TRUE); CheckDlgButton(hDlg, IDC_UAESERIAL, workprefs.uaeserial); CheckDlgButton(hDlg, IDC_SER_SHARED, workprefs.serial_demand); @@ -7418,7 +7435,7 @@ static void init_portsdlg( HWND hDlg ) for(port = 0; port < (int)dwEnumeratedPrinters; port++) SendDlgItemMessage(hDlg, IDC_PRINTERLIST, CB_ADDSTRING, 0, (LPARAM)pInfo[port].pName); } else { - EnableWindow(GetDlgItem(hDlg, IDC_PRINTERLIST), FALSE); + ew (hDlg, IDC_PRINTERLIST, FALSE); } if (paraport_mask) { int mask = paraport_mask; @@ -7437,7 +7454,7 @@ static void init_portsdlg( HWND hDlg ) SendDlgItemMessage (hDlg, IDC_MIDIOUTLIST, CB_RESETCONTENT, 0, 0L); SendDlgItemMessage (hDlg, IDC_MIDIOUTLIST, CB_ADDSTRING, 0, (LPARAM)szNone); if((numdevs = midiOutGetNumDevs()) == 0) { - EnableWindow(GetDlgItem(hDlg, IDC_MIDIOUTLIST), FALSE); + ew (hDlg, IDC_MIDIOUTLIST, FALSE); } else { char szMidiOut[MAX_DPATH]; WIN32GUI_LoadUIString(IDS_DEFAULTMIDIOUT, szMidiOut, MAX_DPATH); @@ -7447,12 +7464,12 @@ static void init_portsdlg( HWND hDlg ) if(midiOutGetDevCaps(port, &midiOutCaps, sizeof(midiOutCaps)) == MMSYSERR_NOERROR) SendDlgItemMessage(hDlg, IDC_MIDIOUTLIST, CB_ADDSTRING, 0, (LPARAM)midiOutCaps.szPname); } - EnableWindow(GetDlgItem(hDlg, IDC_MIDIOUTLIST), TRUE); + ew (hDlg, IDC_MIDIOUTLIST, TRUE); } SendDlgItemMessage(hDlg, IDC_MIDIINLIST, CB_RESETCONTENT, 0, 0L); if((numdevs = midiInGetNumDevs()) == 0) { - EnableWindow(GetDlgItem(hDlg, IDC_MIDIINLIST), FALSE); + ew (hDlg, IDC_MIDIINLIST, FALSE); bNoMidiIn = TRUE; } else { for(port = 0; port < numdevs; port++) { @@ -7624,23 +7641,23 @@ static void init_inputdlg( HWND hDlg ) static void enable_for_inputdlg (HWND hDlg) { int v = workprefs.input_selected_setting == 0 ? FALSE : TRUE; - EnableWindow (GetDlgItem (hDlg, IDC_INPUTLIST), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTAMIGA), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTAMIGACNT), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTDEADZONE), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTAUTOFIRERATE), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTSPEEDA), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTSPEEDD), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTSPEEDM), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTCOPY), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTCOPYFROM), v); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTSWAP), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_INPUTDEVICEDISABLE), workprefs.input_selected_setting == 0 ? FALSE : TRUE); + ew (hDlg, IDC_INPUTLIST, v); + ew (hDlg, IDC_INPUTAMIGA, v); + ew (hDlg, IDC_INPUTAMIGACNT, v); + ew (hDlg, IDC_INPUTDEADZONE, TRUE); + ew (hDlg, IDC_INPUTAUTOFIRERATE, v); + ew (hDlg, IDC_INPUTSPEEDA, v); + ew (hDlg, IDC_INPUTSPEEDD, v); + ew (hDlg, IDC_INPUTSPEEDM, TRUE); + ew (hDlg, IDC_INPUTCOPY, v); + ew (hDlg, IDC_INPUTCOPYFROM, v); + ew (hDlg, IDC_INPUTSWAP, TRUE); + ew (hDlg, IDC_INPUTDEVICEDISABLE, workprefs.input_selected_setting == 0 ? FALSE : TRUE); } static void clearinputlistview (HWND hDlg) { - ListView_DeleteAllItems( GetDlgItem( hDlg, IDC_INPUTLIST ) ); + ListView_DeleteAllItems(GetDlgItem(hDlg, IDC_INPUTLIST)); } static void values_from_inputdlg (HWND hDlg) @@ -7859,24 +7876,24 @@ static void enable_for_hw3ddlg (HWND hDlg) vv = TRUE; if (v && uf->x[0]) vv2 = TRUE; - EnableWindow (GetDlgItem (hDlg, IDC_FILTERENABLE), TRUE); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERMODE), v); - CheckDlgButton( hDlg, IDC_FILTERENABLE, v ); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERHZ), v); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERVZ), v); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERHZMULT), vv && !vv2); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERVZMULT), vv && !vv2); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERHO), v); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERVO), v); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERSLR), vv2); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERSL), vv2); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERSL2), vv2); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERDEFAULT), v); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERFILTER), vv); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERAUTORES), vv && !vv2); - - EnableWindow (GetDlgItem (hDlg, IDC_FILTERPRESETLOAD), filterpreset > 0); - EnableWindow (GetDlgItem (hDlg, IDC_FILTERPRESETDELETE), filterpreset > 0); + ew (hDlg, IDC_FILTERENABLE, TRUE); + ew (hDlg, IDC_FILTERMODE, v); + CheckDlgButton(hDlg, IDC_FILTERENABLE, v); + ew (hDlg, IDC_FILTERHZ, v); + ew (hDlg, IDC_FILTERVZ, v); + ew (hDlg, IDC_FILTERHZMULT, vv && !vv2); + ew (hDlg, IDC_FILTERVZMULT, vv && !vv2); + ew (hDlg, IDC_FILTERHO, v); + ew (hDlg, IDC_FILTERVO, v); + ew (hDlg, IDC_FILTERSLR, vv2); + ew (hDlg, IDC_FILTERSL, vv2); + ew (hDlg, IDC_FILTERSL2, vv2); + ew (hDlg, IDC_FILTERDEFAULT, v); + ew (hDlg, IDC_FILTERFILTER, vv); + ew (hDlg, IDC_FILTERAUTORES, vv && !vv2); + + ew (hDlg, IDC_FILTERPRESETLOAD, filterpreset > 0); + ew (hDlg, IDC_FILTERPRESETDELETE, filterpreset > 0); } static void makefilter(char *s, int x, int flags) @@ -8332,25 +8349,25 @@ static void enable_for_avioutputdlg(HWND hDlg) { char tmp[1000]; #if defined (PROWIZARD) - EnableWindow(GetDlgItem(hDlg, IDC_PROWIZARD), TRUE); + ew (hDlg, IDC_PROWIZARD, TRUE); if (full_property_sheet) - EnableWindow(GetDlgItem(hDlg, IDC_PROWIZARD), FALSE); + ew (hDlg, IDC_PROWIZARD, FALSE); #endif - EnableWindow(GetDlgItem(hDlg, IDC_SCREENSHOT), full_property_sheet ? FALSE : TRUE); + ew (hDlg, IDC_SCREENSHOT, full_property_sheet ? FALSE : TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_PAL), TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_NTSC), TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FPS), TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_FILE), TRUE); + ew (hDlg, IDC_AVIOUTPUT_PAL, TRUE); + ew (hDlg, IDC_AVIOUTPUT_NTSC, TRUE); + ew (hDlg, IDC_AVIOUTPUT_FPS, TRUE); + ew (hDlg, IDC_AVIOUTPUT_FILE, TRUE); if(workprefs.produce_sound < 2) { - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), FALSE); + ew (hDlg, IDC_AVIOUTPUT_AUDIO, FALSE); + ew (hDlg, IDC_AVIOUTPUT_AUDIO_STATIC, FALSE); avioutput_audio = 0; } else { - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO), TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_AUDIO_STATIC), TRUE); + ew (hDlg, IDC_AVIOUTPUT_AUDIO, TRUE); + ew (hDlg, IDC_AVIOUTPUT_AUDIO_STATIC, TRUE); } if (avioutput_audio == AVIAUDIO_WAV) { @@ -8372,20 +8389,20 @@ static void enable_for_avioutputdlg(HWND hDlg) } SetWindowText(GetDlgItem(hDlg, IDC_AVIOUTPUT_VIDEO_STATIC), tmp); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT), avioutput_framelimiter ? TRUE : FALSE); + ew (hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT, avioutput_framelimiter ? TRUE : FALSE); if (!avioutput_framelimiter) avioutput_nosoundoutput = 1; CheckDlgButton (hDlg, IDC_AVIOUTPUT_FRAMELIMITER, avioutput_framelimiter ? FALSE : TRUE); CheckDlgButton (hDlg, IDC_AVIOUTPUT_NOSOUNDOUTPUT, avioutput_nosoundoutput ? TRUE : FALSE); - EnableWindow(GetDlgItem(hDlg, IDC_AVIOUTPUT_ACTIVATED), (!avioutput_audio && !avioutput_video) ? FALSE : TRUE); + ew (hDlg, IDC_AVIOUTPUT_ACTIVATED, (!avioutput_audio && !avioutput_video) ? FALSE : TRUE); - EnableWindow(GetDlgItem(hDlg, IDC_INPREC_RECORD), input_recording >= 0); + ew (hDlg, IDC_INPREC_RECORD, input_recording >= 0); CheckDlgButton(hDlg, IDC_INPREC_RECORD, input_recording > 0 ? BST_CHECKED : BST_UNCHECKED); - EnableWindow(GetDlgItem(hDlg, IDC_INPREC_PLAY), input_recording <= 0); + ew (hDlg, IDC_INPREC_PLAY, input_recording <= 0); CheckDlgButton(hDlg, IDC_INPREC_PLAY, input_recording < 0 ? BST_CHECKED : BST_UNCHECKED); - EnableWindow(GetDlgItem(hDlg, IDC_INPREC_PLAYMODE), input_recording == 0); + ew (hDlg, IDC_INPREC_PLAYMODE, input_recording == 0); } static INT_PTR CALLBACK AVIOutputDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) @@ -8801,8 +8818,8 @@ static HWND updatePanel (HWND hDlg, int id) int w, h, pw, ph, x , y, i; int fullpanel; - EnableWindow (GetDlgItem (guiDlg, IDC_RESETAMIGA), full_property_sheet ? FALSE : TRUE); - EnableWindow (GetDlgItem (guiDlg, IDOK), TRUE); + ew (guiDlg, IDC_RESETAMIGA, full_property_sheet ? FALSE : TRUE); + ew (guiDlg, IDOK, TRUE); if (panelDlg != NULL) { ShowWindow (panelDlg, FALSE); DestroyWindow (panelDlg); @@ -8829,7 +8846,7 @@ static HWND updatePanel (HWND hDlg, int id) RegSetValueEx (hWinUAEKey, "yPosGUI", 0, REG_DWORD, (LPBYTE)&top, sizeof(LONG)); } } - EnableWindow (GetDlgItem (hDlg, IDHELP), FALSE); + ew (hDlg, IDHELP, FALSE); return NULL; } @@ -8863,7 +8880,7 @@ static HWND updatePanel (HWND hDlg, int id) ShowWindow(GetDlgItem(hDlg, IDC_PANEL_FRAME_OUTER), !fullpanel ? SW_SHOW : SW_HIDE); ShowWindow(GetDlgItem(hDlg, IDC_PANELTREE), !fullpanel ? SW_SHOW : SW_HIDE); ShowWindow (panelDlg, SW_SHOW); - EnableWindow (GetDlgItem (hDlg, IDHELP), pHtmlHelp && ppage[currentpage].help ? TRUE : FALSE); + ew (hDlg, IDHELP, pHtmlHelp && ppage[currentpage].help ? TRUE : FALSE); ToolTipHWND = CreateWindowEx (WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, @@ -9596,7 +9613,7 @@ static int fsdialog (HWND *hwnd, DWORD *flags) int gui_message_multibutton (int flags, const char *format,...) { char msg[2048]; - char szTitle[ MAX_DPATH ]; + char szTitle[MAX_DPATH]; va_list parms; int flipflop = 0; int fullscreen = 0; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 3591521c..d02498ec 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,23 @@ +Beta 3: + +- remove harddrives loaded from default.uae in quickstart-mode +- wrong device/volumename in harddisk panel (visual error only) +- S in command line parameters set illegal stereo + separation value in some cases +- hardfile configuration handling bugs fixed +- disk history list wrong item selection fixed (really old bug, + select second entry from disk history then select first entry + from other drive's disk history) +- sinc interpolator update from uaede 2.04 +- CDTV CD audio play end position status change detection improved +- application icon updated (also includes 256x256 Vista-style icon) +- CD access freeze when CD was already open in another program, also + tries shared access mode first before falling back to exclusive + mode +- emulation paused mode sound start/stop issues fixed + + Beta 2: - filter zoom and position is not restricted to coordinates divisible diff --git a/sinctable.c b/sinctable.c index 5e962117..a373d01b 100755 --- a/sinctable.c +++ b/sinctable.c @@ -1,647 +1,626 @@ /* tables are: a500 off, a500 on, a1200 off, a1200 on, vanilla. */ static const int winsinc_integral[5][2048] = { { -131072,131070,131069,131067,131065,131064,131062,131060,131058,131056,131054, -131052,131050,131048,131046,131043,131041,131038,131035,131033,131029,131026,131023, -131019,131015,131011,131007,131002,130997,130992,130986,130980,130974,130967,130960, -130953,130944,130936,130927,130917,130907,130896,130884,130872,130859,130845,130830, -130815,130799,130781,130763,130744,130724,130702,130680,130656,130631,130605,130578, -130549,130518,130486,130453,130418,130381,130343,130303,130260,130217,130171,130123, -130073,130020,129966,129909,129850,129788,129724,129657,129588,129516,129441,129363, -129282,129199,129112,129022,128928,128832,128731,128628,128520,128409,128295,128176, -128054,127927,127796,127662,127523,127379,127232,127079,126922,126761,126594,126423, -126247,126066,125880,125689,125492,125290,125083,124870,124652,124428,124198,123963, -123722,123475,123222,122962,122697,122426,122148,121864,121574,121277,120974,120664, -120347,120024,119695,119358,119015,118665,118308,117945,117574,117196,116812,116420, -116022,115616,115204,114784,114357,113923,113482,113034,112579,112117,111648,111171, -110688,110198,109700,109196,108684,108166,107641,107109,106570,106025,105473,104914, -104348,103776,103198,102613,102022,101424,100821,100211,99596,98974,98347,97714,97075, -96431,95782,95127,94467,93802,93132,92457,91778,91094,90406,89713,89016,88316,87611, -86903,86191,85476,84758,84036,83312,82585,81856,81124,80389,79653,78915,78175,77434, -76691,75948,75203,74457,73711,72965,72218,71471,70724,69978,69232,68487,67743,67000, -66258,65518,64779,64043,63308,62576,61846,61118,60394,59672,58954,58239,57527,56819, -56116,55416,54720,54029,53342,52661,51984,51312,50645,49984,49329,48679,48035,47397, -46765,46139,45520,44907,44301,43701,43109,42523,41945,41374,40810,40254,39705,39164, -38630,38105,37587,37077,36575,36081,35595,35117,34648,34186,33733,33289,32852,32424, -32005,31593,31191,30796,30410,30032,29663,29302,28949,28605,28268,27940,27621,27309, -27005,26710,26422,26143,25871,25607,25350,25101,24860,24626,24399,24180,23968,23762, -23564,23372,23187,23009,22837,22671,22512,22358,22211,22069,21932,21802,21676,21556, -21441,21330,21224,21123,21027,20934,20846,20761,20681,20604,20530,20460,20393,20329, -20267,20209,20152,20098,20047,19997,19949,19903,19858,19814,19772,19731,19691,19651, -19613,19574,19536,19498,19460,19422,19384,19345,19306,19266,19226,19184,19142,19098, -19054,19008,18960,18911,18860,18808,18754,18698,18639,18579,18517,18453,18386,18317, -18245,18171,18095,18016,17935,17851,17764,17674,17582,17487,17390,17290,17187,17081, -16972,16861,16747,16630,16511,16389,16264,16136,16006,15874,15739,15601,15461,15319, -15174,15027,14878,14726,14573,14418,14260,14101,13940,13777,13613,13447,13280,13111, -12941,12770,12598,12424,12250,12075,11899,11723,11546,11369,11192,11014,10836,10658, -10481,10303,10126,9950,9774,9598,9423,9249,9076,8905,8734,8564,8396,8229,8064,7901, -7739,7579,7420,7264,7110,6958,6809,6661,6516,6373,6233,6096,5961,5829,5700,5573, -5450,5329,5211,5097,4985,4877,4771,4669,4570,4475,4382,4293,4207,4125,4045,3969, -3897,3827,3761,3699,3639,3583,3530,3481,3434,3391,3351,3314,3281,3250,3222,3197, -3176,3157,3141,3127,3117,3109,3103,3100,3100,3102,3106,3113,3122,3132,3145,3160, -3177,3195,3215,3237,3261,3285,3311,3339,3367,3397,3428,3459,3491,3525,3558,3593, -3627,3663,3698,3734,3769,3805,3841,3876,3912,3947,3981,4015,4049,4082,4114,4145, -4176,4205,4234,4261,4287,4312,4336,4359,4380,4400,4418,4434,4449,4463,4475,4485, -4493,4499,4504,4507,4507,4506,4503,4498,4492,4483,4472,4459,4444,4427,4408,4387, -4364,4339,4312,4284,4253,4220,4185,4149,4110,4070,4028,3984,3939,3891,3842,3792, -3740,3686,3631,3574,3517,3457,3397,3335,3272,3208,3143,3077,3010,2942,2874,2805, -2735,2664,2593,2522,2450,2378,2305,2233,2160,2087,2014,1942,1869,1797,1725,1654, -1582,1512,1442,1372,1304,1236,1169,1103,1037,973,910,848,787,727,669,612,556,501, -448,397,347,299,252,207,164,122,82,44,8,-27,-60,-91,-120,-147,-172,-196,-217,-237, --255,-271,-285,-297,-307,-316,-322,-327,-330,-331,-331,-328,-324,-319,-311,-302, --291,-279,-265,-250,-233,-215,-195,-175,-152,-129,-104,-79,-52,-24,5,35,65,97,129, -162,196,230,265,300,336,372,408,445,482,519,556,593,630,667,704,740,777,813,848, -884,918,953,986,1019,1052,1083,1114,1144,1173,1202,1229,1255,1281,1305,1328,1350, -1371,1391,1409,1427,1443,1458,1471,1483,1494,1503,1511,1518,1523,1527,1530,1531, -1531,1529,1526,1521,1516,1508,1500,1490,1478,1465,1451,1436,1419,1401,1382,1362, -1340,1318,1294,1269,1243,1216,1187,1158,1128,1097,1066,1033,1000,966,931,895,859, -823,785,748,710,671,632,593,554,515,475,435,395,355,316,276,236,197,158,119,80,42, -4,-33,-70,-106,-142,-177,-212,-246,-279,-311,-343,-374,-403,-432,-461,-488,-514, --539,-563,-586,-608,-629,-649,-668,-686,-702,-717,-731,-744,-756,-767,-776,-784, --791,-797,-801,-805,-807,-808,-807,-806,-803,-800,-795,-789,-782,-773,-764,-754, --742,-730,-717,-703,-687,-671,-654,-636,-618,-598,-578,-557,-536,-514,-491,-467, --443,-419,-394,-369,-343,-317,-290,-264,-237,-209,-182,-155,-127,-100,-72,-45,-17, -10,37,64,91,118,144,170,195,220,245,269,293,316,339,361,382,403,423,443,462,480, -497,513,529,544,558,571,583,594,605,614,623,631,637,643,648,652,655,657,658,658, -658,656,653,649,645,639,633,626,618,609,599,588,577,564,551,538,523,508,492,475, -458,440,421,402,383,362,342,321,299,277,255,232,209,186,163,139,115,91,67,42,18,-6, --31,-55,-79,-103,-127,-151,-175,-198,-221,-244,-267,-289,-311,-333,-354,-375,-395, --415,-434,-453,-471,-488,-505,-522,-538,-553,-567,-581,-594,-607,-618,-629,-639, --649,-658,-666,-673,-679,-685,-690,-694,-697,-700,-702,-703,-703,-702,-701,-699, --696,-693,-689,-684,-678,-672,-665,-657,-648,-639,-630,-619,-609,-597,-585,-573, --560,-546,-532,-518,-503,-488,-472,-456,-440,-423,-406,-389,-372,-354,-336,-319, --300,-282,-264,-246,-227,-209,-191,-172,-154,-136,-118,-100,-83,-65,-48,-31,-14,3, -19,35,50,65,80,95,109,122,135,148,160,172,183,193,204,213,222,231,239,246,253,259, -264,269,274,277,280,283,285,286,287,287,286,285,283,281,278,275,271,266,261,255, -249,242,235,227,219,210,201,192,182,171,160,149,138,126,114,101,88,75,62,49,35,21, -7,-7,-22,-36,-51,-65,-80,-95,-109,-124,-139,-153,-168,-182,-196,-210,-224,-238, --252,-265,-279,-292,-304,-317,-329,-341,-352,-363,-374,-385,-395,-405,-414,-423, --431,-439,-447,-454,-461,-467,-473,-479,-483,-488,-492,-495,-498,-501,-503,-504, --505,-505,-505,-505,-504,-502,-501,-498,-495,-492,-488,-484,-479,-474,-468,-462, --456,-449,-442,-435,-427,-418,-410,-401,-392,-382,-372,-362,-352,-341,-330,-319, --308,-297,-285,-273,-262,-250,-238,-225,-213,-201,-188,-176,-164,-151,-139,-127, --114,-102,-90,-78,-66,-54,-43,-31,-20,-9,2,13,23,34,44,53,63,72,81,90,98,106,114, -121,129,135,142,148,154,159,164,169,173,177,180,183,186,189,191,192,194,195,195, -196,195,195,194,193,191,190,187,185,182,179,175,172,168,163,159,154,149,144,138, -132,126,120,114,107,100,94,87,79,72,65,57,50,42,35,27,19,11,3,-4,-12,-20,-28,-35, --43,-51,-58,-66,-73,-80,-87,-94,-101,-108,-115,-121,-127,-133,-139,-145,-150,-156, --161,-166,-170,-175,-179,-183,-186,-190,-193,-196,-199,-201,-203,-205,-207,-208, --209,-210,-211,-211,-211,-211,-211,-210,-209,-208,-207,-205,-203,-201,-199,-196, --194,-191,-187,-184,-180,-177,-173,-169,-164,-160,-155,-150,-146,-141,-135,-130, --125,-119,-114,-108,-103,-97,-91,-85,-79,-73,-67,-61,-56,-50,-44,-38,-32,-26,-20, --14,-9,-3,2,8,13,18,24,29,34,38,43,48,52,56,61,65,68,72,75,79,82,85,88,90,93,95,97, -99,101,102,104,105,106,106,107,107,107,107,107,107,106,106,105,104,103,101,100,98, -96,94,92,90,87,85,82,79,76,73,70,67,64,60,57,53,49,46,42,38,34,31,27,23,19,15,11, -7,3,-1,-5,-9,-13,-17,-21,-24,-28,-32,-35,-39,-42,-46,-49,-52,-55,-58,-61,-64,-67, --70,-72,-75,-77,-79,-81,-83,-85,-87,-88,-90,-91,-92,-93,-94,-95,-95,-96,-96,-97, --97,-97,-96,-96,-96,-95,-95,-94,-93,-92,-91,-90,-88,-87,-85,-84,-82,-80,-78,-76, --74,-72,-69,-67,-65,-62,-60,-57,-55,-52,-49,-46,-44,-41,-38,-35,-32,-29,-27,-24, --21,-18,-15,-12,-9,-7,-4,-1,2,4,7,10,12,15,17,19,22,24,26,28,30,32,34,36,37,39,41, -42,43,45,46,47,48,49,50,50,51,51,52,52,52,52,53,52,52,52,52,51,51,50,50,49,48,47, -46,45,44,43,42,40,39,38,36,35,33,31,30,28,26,25,23,21,19,17,15,13,11,10,8,6,4,2,0, --2,-4,-6,-8,-10,-11,-13,-15,-17,-18,-20,-22,-23,-25,-26,-28,-29,-31,-32,-33,-34, --35,-37,-38,-38,-39,-40,-41,-42,-42,-43,-43,-44,-44,-44,-45,-45,-45,-45,-45,-45, --45,-45,-44,-44,-44,-43,-43,-42,-42,-41,-40,-39,-39,-38,-37,-36,-35,-34,-33,-32, --31,-29,-28,-27,-26,-25,-23,-22,-21,-19,-18,-17,-15,-14,-13,-11,-10,-9,-7,-6,-5,-3, --2,-1,1,2,3,4,5,6,8,9,10,11,12,13,13,14,15,16,17,17,18,19,19,20,20,21,21,21,22,22, -22,22,22,23,23,23,22,22,22,22,22,22,21,21,20,20,20,19,19,18,17,17,16,15,15,14,13, -13,12,11,10,9,8,8,7,6,5,4,3,2,1,0,0,-1,-2,-3,-4,-5,-6,-7,-7,-8,-9,-10,-11,-11,-12, --13,-13,-14,-15,-15,-16,-17,-17,-18,-18,-19,-19,-19,-20,-20,-20,-21,-21,-21,-21, --21,-21,-21,-22,-22,-21,-21,-21,-21,-21,-21,-21,-21,-20,-20,-20,-19,-19,-19,-18, --18,-17,-17,-16,-16,-15,-15,-14,-14,-13,-13,-12,-11,-11,-10,-10,-9,-8,-8,-7,-7,-6, --5,-5,-4,-3,-3,-2,-2,-1,0,0,1,1,2,2,3,3,4,4,4,5,5,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,8, -8,8,8,8,8,8,8,8,8,7,7,7,7,7,6,6,6,5,5,5,4,4,4,3,3,2,2,2,1,1,0,0,-1,-1,-1,-2,-2, --3,-3,-4,-4,-4,-5,-5,-6,-6,-6,-7,-7,-7,-8,-8,-8,-8,-9,-9,-9,-9,-10,-10,-10,-10, --10,-10,-10,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-11,-10,-10,-10,-10,-10, --10,-10,-10,-9,-9,-9,-9,-9,-9,-8,-8,-8,-8,-8,-7,-7,-7,-7,-7,-6,-6,-6,-6,-6,-5,-5, --5,-5,-5,-5,-4,-4,-4,-4,-4,-3,-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,0,0,0, +131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072, +131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131070, +131070,131070,131070,131070,131069,131069,131069,131069,131068,131068,131067,131067, +131066,131066,131065,131065,131064,131063,131062,131062,131061,131060,131058,131057, +131056,131055,131053,131051,131050,131048,131046,131043,131041,131039,131036,131033, +131030,131027,131023,131019,131016,131011,131007,131002,130997,130992,130986,130980, +130973,130967,130959,130952,130944,130935,130926,130917,130907,130896,130885,130873, +130861,130848,130835,130820,130805,130789,130773,130756,130737,130718,130698,130677, +130655,130633,130609,130584,130557,130530,130502,130472,130441,130408,130375,130339, +130303,130265,130225,130184,130141,130096,130050,130002,129952,129900,129846,129790, +129732,129672,129609,129545,129478,129409,129337,129263,129186,129107,129025,128940, +128852,128762,128669,128572,128473,128370,128264,128155,128043,127927,127807,127684, +127558,127428,127293,127156,127014,126868,126718,126564,126406,126243,126076,125905, +125729,125549,125364,125174,124980,124780,124576,124367,124152,123933,123708,123478, +123243,123002,122756,122505,122247,121985,121716,121442,121162,120876,120584,120286, +119982,119672,119356,119033,118705,118370,118029,117682,117328,116967,116601,116228, +115848,115462,115069,114670,114264,113851,113432,113006,112573,112134,111688,111236, +110777,110311,109838,109359,108874,108381,107882,107377,106865,106346,105821,105290, +104752,104208,103657,103100,102537,101968,101392,100811,100224,99630,99031,98426, +97816,97199,96578,95950,95318,94680,94037,93389,92736,92079,91416,90749,90077,89401, +88721,88037,87348,86656,85960,85260,84557,83851,83141,82429,81713,80995,80274,79551, +78826,78098,77369,76638,75905,75171,74435,73699,72961,72223,71484,70745,70006,69266, +68527,67788,67050,66312,65576,64840,64106,63373,62641,61912,61184,60459,59736,59015, +58297,57582,56871,56162,55457,54755,54058,53364,52674,51989,51308,50632,49960,49294, +48632,47976,47325,46680,46041,45407,44780,44158,43543,42934,42332,41737,41148,40566, +39991,39424,38863,38310,37765,37227,36696,36173,35659,35152,34652,34161,33678,33204, +32737,32279,31828,31387,30953,30528,30112,29704,29304,28913,28530,28155,27790,27432, +27083,26743,26411,26087,25772,25465,25166,24875,24593,24318,24052,23794,23543,23300, +23066,22838,22619,22406,22202,22004,21814,21631,21454,21285,21122,20966,20816,20673, +20536,20404,20279,20160,20046,19938,19835,19738,19645,19558,19475,19396,19322,19253, +19187,19126,19068,19014,18963,18915,18871,18830,18791,18755,18721,18690,18661,18633, +18608,18584,18561,18540,18520,18501,18483,18465,18448,18431,18414,18398,18381,18364, +18347,18329,18310,18291,18270,18249,18226,18203,18177,18150,18122,18092,18060,18026, +17990,17951,17911,17868,17823,17775,17725,17672,17617,17559,17498,17434,17368,17298, +17226,17150,17072,16990,16906,16818,16727,16634,16537,16437,16334,16228,16119,16007, +15892,15774,15653,15529,15403,15273,15141,15006,14868,14728,14585,14440,14293,14143, +13990,13836,13680,13521,13361,13198,13035,12869,12702,12533,12363,12192,12019,11846, +11671,11496,11320,11143,10966,10789,10611,10433,10255,10076,9898,9721,9543,9367,9190, +9015,8840,8666,8493,8322,8151,7982,7814,7648,7484,7321,7160,7002,6845,6690,6537, +6387,6239,6094,5951,5811,5673,5538,5406,5277,5151,5027,4907,4790,4676,4565,4458, +4354,4253,4155,4061,3970,3882,3798,3718,3640,3567,3496,3430,3366,3306,3250,3197, +3147,3100,3057,3018,2981,2948,2918,2892,2868,2847,2830,2815,2804,2795,2789,2786, +2785,2787,2792,2799,2809,2820,2834,2851,2869,2889,2911,2935,2961,2988,3017,3048, +3079,3113,3147,3182,3218,3256,3294,3332,3372,3412,3452,3493,3534,3575,3616,3657, +3698,3739,3780,3820,3860,3899,3937,3975,4012,4048,4083,4118,4151,4183,4213,4243, +4271,4297,4323,4346,4368,4389,4407,4424,4440,4453,4465,4474,4482,4488,4492,4494, +4494,4491,4487,4481,4472,4462,4449,4435,4418,4399,4378,4355,4330,4303,4274,4243, +4210,4176,4139,4100,4060,4017,3973,3927,3880,3831,3780,3728,3674,3619,3562,3504, +3445,3384,3323,3260,3196,3132,3066,2999,2932,2864,2796,2727,2657,2587,2516,2446, +2375,2304,2232,2161,2090,2019,1948,1878,1807,1738,1668,1599,1531,1464,1397,1331, +1266,1201,1138,1076,1015,954,896,838,782,726,673,620,570,520,473,426,382,339,297, +258,220,184,149,116,86,56,29,4,-20,-42,-62,-80,-96,-111,-123,-134,-143,-151,-156, +-160,-162,-162,-161,-158,-153,-147,-139,-130,-119,-107,-93,-78,-61,-43,-24,-4,17,40, +64,89,114,141,168,197,226,256,286,318,349,381,414,447,481,514,548,582,616,651,685, +719,753,787,821,854,887,920,953,985,1016,1047,1077,1107,1136,1164,1192,1218,1244, +1269,1293,1316,1338,1359,1379,1398,1416,1433,1449,1463,1477,1489,1500,1509,1518, +1525,1531,1536,1539,1541,1542,1542,1541,1538,1534,1528,1522,1514,1505,1495,1483, +1471,1457,1442,1426,1409,1391,1372,1352,1331,1309,1286,1262,1238,1212,1186,1159, +1131,1102,1073,1044,1013,983,951,919,887,855,822,789,755,722,688,654,620,586,552, +518,484,451,417,384,351,318,285,253,221,190,159,129,99,69,41,12,-15,-42,-68,-93, +-118,-142,-165,-187,-209,-229,-249,-268,-285,-302,-318,-333,-347,-361,-373,-384, +-394,-403,-412,-419,-425,-430,-435,-438,-440,-442,-442,-442,-440,-438,-435,-431, +-426,-420,-413,-405,-397,-388,-378,-367,-356,-344,-331,-318,-304,-289,-274,-258, +-242,-225,-208,-191,-173,-154,-136,-117,-97,-78,-58,-38,-18,2,22,43,63,83,104,124, +144,164,184,204,223,243,262,281,299,317,335,352,369,386,402,418,433,448,462,475, +488,501,513,524,535,545,554,563,571,579,586,592,597,602,606,610,612,615,616,617, +617,616,615,613,610,607,603,599,593,588,581,574,567,559,550,541,532,521,511,500, +488,476,464,451,438,424,411,397,382,368,353,338,322,307,291,275,259,243,227,211, +195,179,163,147,130,115,99,83,67,52,37,21,7,-8,-22,-36,-50,-64,-77,-90,-103,-115, +-127,-138,-149,-160,-170,-180,-189,-198,-207,-215,-222,-229,-236,-242,-248,-253, +-258,-262,-266,-269,-272,-274,-276,-277,-278,-278,-278,-278,-277,-275,-273,-271, +-268,-265,-262,-258,-253,-248,-243,-238,-232,-226,-219,-212,-205,-198,-190,-182, +-174,-166,-157,-148,-139,-130,-121,-112,-102,-92,-83,-73,-63,-53,-43,-33,-23,-13,-3, +7,17,27,36,46,55,65,74,83,92,101,109,118,126,134,141,149,156,163,170,177,183,189, +194,200,205,210,214,218,222,226,229,232,234,237,239,240,241,242,243,243,244,243, +243,242,241,239,237,235,233,230,227,224,221,217,213,209,205,200,196,191,186,180, +175,169,163,157,151,145,139,132,126,119,113,106,99,92,85,79,72,65,58,51,44,37,31, +24,17,11,4,-2,-9,-15,-21,-27,-33,-39,-44,-50,-55,-60,-65,-70,-74,-79,-83,-87,-91, +-95,-98,-102,-105,-108,-110,-113,-115,-117,-119,-121,-122,-123,-124,-125,-126,-126, +-126,-126,-126,-126,-125,-124,-123,-122,-121,-119,-118,-116,-114,-112,-110,-107, +-105,-102,-99,-96,-93,-90,-86,-83,-80,-76,-72,-69,-65,-61,-57,-53,-49,-45,-41,-37, +-33,-29,-25,-21,-17,-13,-8,-4,0,3,7,11,15,19,22,26,30,33,36,40,43,46,49,52,55,57, +60,62,65,67,69,71,73,74,76,78,79,80,81,82,83,84,84,85,85,85,85,85,85,85,85,84,83, +83,82,81,80,79,77,76,75,73,72,70,68,66,64,62,60,58,56,54,52,49,47,45,42,40,37,35, +32,30,27,25,22,20,17,15,12,10,8,5,3,0,-2,-4,-6,-9,-11,-13,-15,-17,-19,-21,-22,-24, +-26,-27,-29,-30,-32,-33,-34,-35,-37,-38,-39,-39,-40,-41,-42,-42,-43,-43,-43,-44, +-44,-44,-44,-44,-44,-44,-44,-43,-43,-42,-42,-41,-41,-40,-39,-39,-38,-37,-36,-35, +-34,-33,-32,-31,-29,-28,-27,-26,-24,-23,-22,-20,-19,-18,-16,-15,-14,-12,-11,-9,-8, +-6,-5,-4,-2,-1,0,2,3,4,6,7,8,9,10,12,13,14,15,16,17,18,18,19,20,21,22,22,23,23,24, +24,25,25,26,26,26,27,27,27,27,27,27,27,27,27,27,27,26,26,26,25,25,25,24,24,23,23, +22,22,21,21,20,19,19,18,17,16,16,15,14,13,13,12,11,10,9,9,8,7,6,5,5,4,3,2,2,1,0, +-1,-1,-2,-3,-3,-4,-5,-5,-6,-6,-7,-8,-8,-9,-9,-9,-10,-10,-11,-11,-11,-12,-12,-12, +-12,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-13,-12,-12, +-12,-12,-11,-11,-11,-11,-10,-10,-10,-9,-9,-9,-8,-8,-8,-7,-7,-6,-6,-5,-5,-5,-4,-4, +-3,-3,-3,-2,-2,-1,-1,-1,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7, +7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,4,4,4,4,4,3,3,3,3,3, +2,2,2,2,2,1,1,1,1,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-3,-3,-3, +-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3, +-3,-3,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0, +0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, +-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }, { -131072,131070,131069,131067,131065,131064,131062,131060,131059,131057,131055, -131054,131052,131050,131049,131047,131046,131044,131042,131041,131039,131037,131036, -131034,131032,131031,131029,131027,131026,131024,131022,131021,131019,131017,131016, -131014,131012,131011,131009,131007,131006,131004,131002,131001,130999,130997,130995, -130994,130992,130990,130989,130987,130985,130983,130982,130980,130978,130976,130974, -130973,130971,130969,130967,130965,130963,130962,130960,130958,130956,130954,130952, -130950,130948,130946,130944,130941,130939,130937,130935,130933,130930,130928,130926, -130923,130921,130918,130916,130913,130910,130908,130905,130902,130899,130896,130893, -130890,130887,130883,130880,130876,130873,130869,130865,130861,130857,130853,130849, -130845,130840,130836,130831,130826,130821,130816,130811,130805,130800,130794,130788, -130782,130775,130769,130762,130755,130748,130740,130733,130725,130717,130708,130700, -130691,130682,130672,130663,130653,130642,130632,130621,130609,130598,130586,130573, -130561,130548,130534,130520,130506,130491,130476,130461,130445,130428,130411,130394, -130376,130358,130339,130319,130300,130279,130258,130236,130214,130191,130168,130144, -130119,130094,130068,130042,130014,129987,129958,129929,129898,129868,129836,129804, -129771,129737,129702,129666,129630,129593,129555,129516,129476,129435,129393,129351, -129307,129263,129217,129171,129124,129075,129026,128975,128924,128871,128818,128763, -128707,128650,128592,128533,128473,128411,128348,128285,128219,128153,128086,128017, -127947,127876,127803,127729,127654,127578,127500,127421,127341,127259,127176,127092, -127006,126919,126830,126740,126649,126556,126462,126366,126269,126170,126070,125969, -125866,125761,125655,125548,125439,125329,125217,125103,124988,124871,124753,124634, -124512,124390,124265,124140,124012,123883,123753,123621,123487,123352,123215,123077, -122937,122795,122652,122507,122361,122213,122064,121913,121761,121607,121451,121294, -121135,120975,120813,120650,120485,120318,120150,119981,119810,119637,119463,119288, -119111,118932,118752,118571,118388,118204,118018,117830,117642,117452,117260,117067, -116873,116677,116480,116281,116081,115880,115677,115474,115268,115062,114854,114645, -114434,114223,114010,113796,113580,113364,113146,112927,112707,112486,112263,112039, -111815,111589,111362,111134,110905,110675,110443,110211,109978,109744,109508,109272, -109035,108797,108557,108317,108076,107835,107592,107348,107104,106858,106612,106365, -106117,105869,105619,105369,105118,104867,104614,104361,104108,103853,103598,103342, -103086,102828,102571,102312,102053,101794,101534,101273,101012,100750,100487,100225, -99961,99697,99433,99168,98902,98637,98370,98104,97836,97569,97301,97032,96763,96494, -96225,95955,95684,95414,95142,94871,94599,94327,94055,93782,93509,93236,92962,92689, -92415,92140,91866,91591,91316,91040,90765,90489,90213,89936,89660,89383,89106,88829, -88552,88275,87997,87719,87441,87163,86885,86606,86328,86049,85770,85491,85212,84932, -84653,84374,84094,83814,83534,83254,82974,82694,82414,82133,81853,81573,81292,81011, -80731,80450,80169,79888,79607,79326,79045,78764,78483,78202,77921,77640,77358,77077, -76796,76515,76234,75952,75671,75390,75109,74828,74547,74266,73985,73704,73423,73142, -72861,72580,72299,72019,71738,71458,71177,70897,70617,70337,70057,69777,69497,69218, -68938,68659,68380,68101,67822,67543,67264,66986,66708,66430,66152,65874,65597,65320, -65043,64766,64490,64213,63937,63661,63386,63111,62836,62561,62287,62013,61739,61465, -61192,60919,60647,60374,60103,59831,59560,59289,59019,58748,58479,58209,57941,57672, -57404,57136,56869,56602,56336,56070,55804,55539,55274,55010,54747,54483,54221,53958, -53696,53435,53174,52914,52654,52395,52136,51878,51621,51363,51107,50851,50595,50340, -50086,49832,49579,49326,49074,48823,48572,48321,48072,47823,47574,47326,47079,46832, -46586,46340,46095,45851,45608,45365,45122,44880,44639,44399,44159,43920,43681,43443, -43206,42969,42733,42498,42263,42029,41795,41563,41330,41099,40868,40638,40408,40180, -39951,39724,39497,39271,39045,38820,38596,38372,38149,37927,37705,37484,37264,37044, -36825,36606,36389,36171,35955,35739,35524,35309,35096,34882,34670,34458,34247,34036, -33826,33617,33408,33200,32992,32786,32579,32374,32169,31965,31761,31558,31356,31154, -30953,30753,30553,30354,30155,29957,29760,29563,29367,29172,28977,28783,28590,28397, -28205,28013,27822,27632,27442,27253,27065,26877,26690,26503,26317,26132,25947,25763, -25580,25397,25215,25033,24852,24672,24493,24314,24135,23958,23781,23604,23428,23253, -23079,22905,22732,22559,22387,22216,22045,21875,21706,21537,21369,21202,21035,20869, -20704,20539,20375,20211,20049,19886,19725,19564,19404,19245,19086,18928,18770,18613, -18457,18302,18147,17993,17839,17686,17534,17383,17232,17082,16932,16784,16636,16488, -16342,16195,16050,15905,15761,15618,15475,15333,15192,15051,14911,14772,14634,14496, -14358,14222,14086,13951,13816,13682,13549,13417,13285,13154,13023,12893,12764,12636, -12508,12381,12254,12128,12003,11879,11755,11632,11509,11387,11266,11145,11025,10906, -10788,10670,10552,10435,10319,10204,10089,9975,9861,9748,9636,9524,9413,9303,9193, -9084,8975,8867,8760,8653,8547,8441,8336,8232,8128,8025,7922,7820,7718,7617,7517, -7417,7318,7219,7121,7024,6927,6830,6735,6639,6545,6450,6357,6264,6171,6079,5987, -5896,5806,5716,5626,5538,5449,5361,5274,5187,5101,5015,4930,4845,4760,4677,4593, -4510,4428,4346,4265,4184,4103,4024,3944,3865,3787,3709,3631,3554,3478,3401,3326, -3251,3176,3102,3028,2955,2882,2809,2737,2666,2595,2524,2454,2385,2315,2247,2178, -2111,2043,1976,1910,1844,1778,1713,1648,1584,1520,1457,1394,1331,1269,1207,1146, -1085,1025,965,906,847,788,730,672,615,558,502,446,390,335,280,226,172,119,66,13,-39, --91,-142,-193,-244,-294,-343,-393,-441,-490,-538,-585,-633,-679,-726,-772,-817, --863,-907,-952,-996,-1039,-1082,-1125,-1167,-1209,-1251,-1292,-1333,-1374,-1414, --1453,-1493,-1531,-1570,-1608,-1646,-1683,-1720,-1757,-1793,-1829,-1865,-1900,-1935, --1969,-2004,-2037,-2071,-2104,-2137,-2169,-2201,-2233,-2264,-2296,-2326,-2357,-2387, --2417,-2446,-2475,-2504,-2532,-2561,-2588,-2616,-2643,-2670,-2697,-2723,-2749,-2775, --2801,-2826,-2851,-2875,-2900,-2924,-2947,-2971,-2994,-3017,-3040,-3062,-3084,-3106, --3128,-3149,-3170,-3191,-3212,-3232,-3252,-3272,-3292,-3311,-3330,-3349,-3368,-3386, --3404,-3422,-3440,-3457,-3475,-3492,-3508,-3525,-3541,-3557,-3573,-3589,-3605,-3620, --3635,-3650,-3664,-3679,-3693,-3707,-3721,-3735,-3748,-3761,-3774,-3787,-3800,-3812, --3824,-3836,-3848,-3860,-3871,-3883,-3894,-3905,-3915,-3926,-3936,-3946,-3956,-3966, --3976,-3985,-3994,-4003,-4012,-4021,-4029,-4038,-4046,-4054,-4062,-4069,-4077,-4084, --4091,-4098,-4105,-4111,-4117,-4124,-4130,-4136,-4141,-4147,-4152,-4157,-4162,-4167, --4172,-4176,-4181,-4185,-4189,-4193,-4197,-4200,-4204,-4207,-4210,-4213,-4215,-4218, --4220,-4223,-4225,-4227,-4229,-4230,-4232,-4233,-4234,-4235,-4236,-4237,-4238,-4238, --4238,-4239,-4239,-4239,-4238,-4238,-4237,-4237,-4236,-4235,-4234,-4233,-4232,-4230, --4228,-4227,-4225,-4223,-4221,-4219,-4216,-4214,-4211,-4209,-4206,-4203,-4200,-4197, --4194,-4190,-4187,-4183,-4179,-4176,-4172,-4168,-4164,-4160,-4155,-4151,-4146,-4142, --4137,-4133,-4128,-4123,-4118,-4113,-4107,-4102,-4097,-4091,-4086,-4080,-4075,-4069, --4063,-4057,-4051,-4045,-4039,-4033,-4027,-4021,-4014,-4008,-4002,-3995,-3988,-3982, --3975,-3968,-3961,-3955,-3948,-3941,-3934,-3927,-3919,-3912,-3905,-3898,-3890,-3883, --3876,-3868,-3861,-3853,-3846,-3838,-3830,-3823,-3815,-3807,-3799,-3791,-3783,-3775, --3767,-3759,-3751,-3743,-3735,-3727,-3719,-3710,-3702,-3694,-3685,-3677,-3669,-3660, --3652,-3643,-3635,-3626,-3618,-3609,-3600,-3592,-3583,-3574,-3565,-3556,-3548,-3539, --3530,-3521,-3512,-3503,-3494,-3485,-3476,-3467,-3457,-3448,-3439,-3430,-3420,-3411, --3402,-3393,-3383,-3374,-3364,-3355,-3345,-3336,-3326,-3317,-3307,-3298,-3288,-3278, --3269,-3259,-3249,-3239,-3229,-3220,-3210,-3200,-3190,-3180,-3170,-3160,-3150,-3140, --3130,-3120,-3110,-3100,-3090,-3080,-3070,-3059,-3049,-3039,-3029,-3018,-3008,-2998, --2988,-2977,-2967,-2957,-2946,-2936,-2926,-2915,-2905,-2894,-2884,-2873,-2863,-2853, --2842,-2832,-2821,-2811,-2800,-2790,-2779,-2769,-2758,-2747,-2737,-2726,-2716,-2705, --2695,-2684,-2674,-2663,-2653,-2642,-2632,-2621,-2611,-2600,-2590,-2579,-2569,-2558, --2548,-2537,-2527,-2516,-2506,-2495,-2485,-2474,-2464,-2454,-2443,-2433,-2422,-2412, --2402,-2391,-2381,-2371,-2361,-2350,-2340,-2330,-2320,-2309,-2299,-2289,-2279,-2269, --2259,-2249,-2238,-2228,-2218,-2208,-2198,-2188,-2178,-2169,-2159,-2149,-2139,-2129, --2119,-2109,-2100,-2090,-2080,-2070,-2061,-2051,-2041,-2032,-2022,-2013,-2003,-1993, --1984,-1974,-1965,-1955,-1946,-1937,-1927,-1918,-1908,-1899,-1890,-1881,-1871,-1862, --1853,-1844,-1834,-1825,-1816,-1807,-1798,-1789,-1780,-1771,-1762,-1753,-1744,-1735, --1726,-1717,-1708,-1699,-1691,-1682,-1673,-1664,-1655,-1647,-1638,-1629,-1621,-1612, --1603,-1595,-1586,-1577,-1569,-1560,-1552,-1543,-1535,-1526,-1518,-1510,-1501,-1493, --1484,-1476,-1468,-1459,-1451,-1443,-1435,-1426,-1418,-1410,-1402,-1394,-1386,-1378, --1369,-1361,-1353,-1345,-1337,-1329,-1321,-1314,-1306,-1298,-1290,-1282,-1274,-1266, --1259,-1251,-1243,-1236,-1228,-1220,-1213,-1205,-1197,-1190,-1182,-1175,-1167,-1160, --1152,-1145,-1138,-1130,-1123,-1116,-1108,-1101,-1094,-1087,-1080,-1072,-1065,-1058, --1051,-1044,-1037,-1030,-1023,-1016,-1009,-1003,-996,-989,-982,-975,-969,-962,-955, --949,-942,-935,-929,-922,-916,-909,-903,-897,-890,-884,-878,-871,-865,-859,-853, --846,-840,-834,-828,-822,-816,-810,-804,-798,-792,-786,-780,-775,-769,-763,-757, --751,-746,-740,-735,-729,-723,-718,-712,-707,-701,-696,-691,-685,-680,-674,-669, --664,-659,-653,-648,-643,-638,-633,-628,-623,-618,-613,-608,-603,-598,-593,-588, --583,-578,-573,-569,-564,-559,-554,-550,-545,-540,-536,-531,-527,-522,-517,-513, --508,-504,-500,-495,-491,-486,-482,-478,-473,-469,-465,-461,-456,-452,-448,-444, --440,-436,-431,-427,-423,-419,-415,-411,-407,-403,-399,-396,-392,-388,-384,-380, --376,-373,-369,-365,-361,-358,-354,-350,-347,-343,-339,-336,-332,-329,-325,-322, --318,-315,-311,-308,-305,-301,-298,-295,-291,-288,-285,-281,-278,-275,-272,-269, --266,-262,-259,-256,-253,-250,-247,-244,-241,-238,-235,-232,-229,-227,-224,-221, --218,-215,-213,-210,-207,-204,-202,-199,-196,-194,-191,-188,-186,-183,-181,-178, --176,-173,-171,-168,-166,-164,-161,-159,-157,-154,-152,-150,-147,-145,-143,-141, --139,-136,-134,-132,-130,-128,-126,-124,-122,-120,-118,-116,-114,-112,-110,-108, --106,-104,-102,-100,-99,-97,-95,-93,-91,-90,-88,-86,-84,-83,-81,-79,-78,-76,-74,-73, --71,-70,-68,-66,-65,-63,-62,-60,-59,-57,-56,-55,-53,-52,-50,-49,-48,-46,-45,-43, --42,-41,-40,-38,-37,-36,-34,-33,-32,-31,-30,-28,-27,-26,-25,-24,-23,-21,-20,-19, --18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,0,1,2,3,4,5,5,6,7, -8,9,9,10,11,12,12,13,14,14,15,16,16,17,18,18,19,20,20,21,21,22,23,23,24,24,25,25, -26,26,27,27,28,28,29,29,29,30,30,31,31,31,32,32,33,33,33,34,34,34,35,35,35,35,36, -36,36,36,37,37,37,37,38,38,38,38,38,39,39,39,39,39,39,40,40,40,40,40,40,40,40,40, -41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, -41,41,41,40,40,40,40,40,40,40,40,40,40,40,39,39,39,39,39,39,39,38,38,38,38,38,38, -38,37,37,37,37,37,36,36,36,36,36,35,35,35,35,35,34,34,34,34,33,33,33,33,32,32,32, -32,31,31,31,31,30,30,30,30,29,29,29,28,28,28,27,27,27,27,26,26,26,25,25,25,24,24, -24,23,23,23,22,22,22,21,21,21,20,20,19,19,19,18,18,18,17,17,16,16,16,15,15,15,14, -14,13,13,13,12,12,11,11,11,10,10,9,9,9,8,8,7,7,7,6,6,5,5,5,4,4,3,3,3,2,2,1,1,0,0, +131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072, +131072,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071, +131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071, +131070,131070,131070,131070,131070,131070,131070,131070,131070,131070,131070,131070, +131070,131070,131070,131070,131070,131070,131070,131070,131070,131070,131069,131069, +131069,131069,131069,131069,131069,131069,131069,131069,131069,131069,131069,131069, +131069,131068,131068,131068,131068,131068,131068,131068,131068,131068,131068,131067, +131067,131067,131067,131067,131067,131067,131066,131066,131066,131066,131066,131065, +131065,131065,131065,131064,131064,131064,131064,131063,131063,131062,131062,131062, +131061,131061,131060,131060,131059,131059,131058,131058,131057,131056,131056,131055, +131054,131053,131052,131052,131051,131050,131049,131048,131046,131045,131044,131043, +131041,131040,131038,131037,131035,131034,131032,131030,131028,131026,131024,131022, +131020,131017,131015,131012,131010,131007,131004,131001,130998,130994,130991,130987, +130984,130980,130976,130972,130968,130963,130959,130954,130949,130944,130938,130933, +130927,130921,130915,130909,130902,130895,130888,130881,130873,130865,130857,130849, +130840,130831,130822,130813,130803,130793,130782,130771,130760,130749,130737,130725, +130712,130699,130685,130672,130657,130643,130628,130612,130596,130580,130563,130545, +130528,130509,130490,130471,130451,130430,130409,130388,130365,130343,130319,130295, +130270,130245,130219,130193,130165,130137,130109,130079,130049,130018,129987,129954, +129921,129887,129853,129817,129781,129744,129706,129667,129627,129587,129545,129503, +129459,129415,129370,129324,129276,129228,129179,129129,129078,129026,128972,128918, +128862,128806,128748,128690,128630,128569,128507,128443,128379,128313,128246,128178, +128109,128038,127966,127893,127819,127743,127667,127588,127509,127428,127346,127262, +127177,127091,127004,126915,126824,126732,126639,126545,126449,126351,126252,126152, +126050,125947,125842,125736,125628,125519,125408,125296,125182,125067,124950,124832, +124712,124591,124468,124344,124218,124090,123961,123830,123698,123564,123429,123292, +123154,123014,122872,122729,122585,122438,122291,122141,121990,121838,121684,121528, +121371,121212,121052,120891,120727,120562,120396,120228,120059,119888,119715,119541, +119366,119189,119011,118831,118649,118467,118282,118097,117909,117721,117531,117339, +117146,116952,116757,116560,116361,116161,115960,115758,115554,115349,115143,114935, +114726,114516,114305,114092,113878,113663,113447,113229,113011,112791,112570,112348, +112124,111900,111675,111448,111220,110992,110762,110531,110300,110067,109833,109598, +109363,109126,108889,108650,108411,108171,107930,107688,107445,107201,106957,106712, +106466,106219,105972,105723,105474,105225,104974,104723,104471,104219,103966,103712, +103458,103203,102948,102692,102435,102178,101920,101662,101403,101144,100885,100624, +100364,100103,99841,99579,99317,99054,98791,98527,98264,97999,97735,97470,97204,96939, +96673,96407,96140,95873,95606,95339,95071,94804,94536,94267,93999,93730,93461,93192, +92923,92653,92383,92114,91844,91573,91303,91033,90762,90491,90220,89949,89678,89407, +89136,88865,88593,88321,88050,87778,87506,87234,86962,86690,86418,86146,85874,85602, +85330,85057,84785,84513,84240,83968,83696,83423,83151,82878,82606,82333,82061,81789, +81516,81244,80971,80699,80427,80154,79882,79610,79337,79065,78793,78521,78249,77977, +77705,77433,77161,76889,76617,76345,76074,75802,75531,75259,74988,74717,74446,74175, +73904,73633,73362,73092,72821,72551,72280,72010,71740,71470,71201,70931,70661,70392, +70123,69854,69585,69317,69048,68780,68512,68244,67976,67709,67441,67174,66907,66641, +66374,66108,65842,65576,65311,65046,64781,64516,64252,63988,63724,63460,63197,62934, +62672,62409,62147,61886,61624,61363,61103,60843,60583,60323,60064,59805,59547,59289, +59031,58774,58517,58261,58005,57749,57494,57239,56985,56731,56478,56225,55973,55721, +55470,55219,54968,54718,54469,54220,53971,53724,53476,53229,52983,52737,52492,52247, +52003,51759,51516,51274,51032,50791,50550,50310,50070,49831,49593,49355,49118,48881, +48645,48410,48175,47941,47707,47474,47242,47010,46779,46549,46319,46090,45861,45633, +45406,45179,44953,44728,44503,44279,44056,43833,43611,43389,43168,42948,42728,42510, +42291,42074,41857,41640,41425,41210,40995,40782,40568,40356,40144,39933,39723,39513, +39304,39095,38887,38680,38473,38267,38062,37857,37653,37449,37247,37044,36843,36642, +36442,36242,36043,35845,35647,35450,35253,35057,34862,34667,34473,34280,34087,33894, +33703,33512,33321,33132,32942,32754,32566,32378,32192,32006,31820,31635,31451,31267, +31084,30901,30719,30538,30357,30177,29997,29818,29640,29462,29285,29108,28932,28756, +28581,28407,28233,28060,27888,27716,27545,27374,27204,27034,26865,26697,26529,26362, +26195,26029,25863,25699,25534,25371,25207,25045,24883,24722,24561,24401,24241,24082, +23924,23766,23609,23453,23297,23142,22987,22833,22679,22526,22374,22222,22071,21921, +21771,21622,21473,21325,21177,21031,20884,20739,20594,20449,20306,20162,20020,19878, +19737,19596,19456,19316,19178,19039,18902,18765,18628,18493,18358,18223,18089,17956, +17823,17691,17560,17429,17299,17169,17040,16912,16784,16657,16531,16405,16280,16155, +16031,15908,15785,15663,15541,15420,15300,15180,15061,14942,14824,14707,14590,14474, +14358,14243,14129,14015,13901,13789,13677,13565,13454,13344,13234,13125,13016,12908, +12801,12694,12588,12482,12377,12272,12168,12064,11961,11859,11757,11655,11554,11454, +11354,11255,11156,11058,10960,10863,10766,10670,10575,10480,10385,10291,10197,10104, +10012,9920,9828,9737,9646,9556,9466,9377,9289,9200,9113,9025,8939,8852,8766,8681, +8596,8512,8428,8344,8261,8178,8096,8014,7933,7852,7772,7692,7612,7533,7455,7376, +7299,7221,7144,7068,6992,6916,6841,6766,6692,6618,6544,6471,6398,6326,6254,6182, +6111,6041,5970,5901,5831,5762,5693,5625,5557,5490,5423,5356,5290,5224,5159,5093, +5029,4965,4901,4837,4774,4711,4649,4587,4525,4464,4404,4343,4283,4224,4164,4105, +4047,3989,3931,3874,3817,3760,3704,3648,3593,3538,3483,3429,3375,3321,3268,3215, +3163,3111,3059,3008,2957,2906,2856,2806,2756,2707,2658,2610,2562,2514,2466,2419, +2373,2326,2280,2235,2189,2144,2100,2056,2012,1968,1925,1882,1839,1797,1755,1714, +1672,1631,1591,1551,1511,1471,1432,1393,1354,1316,1278,1240,1203,1165,1129,1092, +1056,1020,984,949,914,879,845,811,777,743,710,677,644,612,580,548,516,485,454,423, +393,362,332,303,273,244,215,186,158,129,101,74,46,19,-8,-35,-61,-88,-114,-140,-165, +-191,-216,-241,-265,-290,-314,-338,-362,-386,-409,-432,-455,-478,-501,-523,-545, +-567,-589,-610,-632,-653,-674,-694,-715,-735,-756,-775,-795,-815,-834,-853,-872, +-891,-910,-928,-947,-965,-983,-1000,-1018,-1035,-1052,-1069,-1086,-1103,-1119,-1136, +-1152,-1168,-1184,-1199,-1215,-1230,-1245,-1260,-1275,-1289,-1304,-1318,-1332,-1346, +-1360,-1373,-1387,-1400,-1413,-1426,-1439,-1452,-1464,-1477,-1489,-1501,-1513,-1524, +-1536,-1547,-1558,-1570,-1581,-1591,-1602,-1612,-1623,-1633,-1643,-1653,-1663,-1672, +-1682,-1691,-1700,-1709,-1718,-1727,-1735,-1744,-1752,-1760,-1768,-1776,-1784,-1792, +-1799,-1807,-1814,-1821,-1828,-1835,-1842,-1848,-1855,-1861,-1867,-1873,-1879,-1885, +-1891,-1896,-1902,-1907,-1913,-1918,-1923,-1928,-1932,-1937,-1942,-1946,-1950,-1955, +-1959,-1963,-1967,-1971,-1974,-1978,-1981,-1985,-1988,-1991,-1994,-1997,-2000,-2003, +-2006,-2009,-2011,-2013,-2016,-2018,-2020,-2022,-2024,-2026,-2028,-2030,-2032,-2033, +-2035,-2036,-2037,-2039,-2040,-2041,-2042,-2043,-2044,-2045,-2045,-2046,-2047,-2047, +-2048,-2048,-2048,-2049,-2049,-2049,-2049,-2049,-2049,-2049,-2049,-2048,-2048,-2048, +-2047,-2047,-2046,-2046,-2045,-2044,-2043,-2043,-2042,-2041,-2040,-2039,-2038,-2036, +-2035,-2034,-2033,-2031,-2030,-2028,-2027,-2025,-2024,-2022,-2020,-2019,-2017,-2015, +-2013,-2011,-2009,-2007,-2005,-2003,-2001,-1998,-1996,-1994,-1992,-1989,-1987,-1984, +-1982,-1979,-1977,-1974,-1971,-1969,-1966,-1963,-1960,-1957,-1954,-1952,-1949,-1946, +-1942,-1939,-1936,-1933,-1930,-1927,-1923,-1920,-1917,-1913,-1910,-1906,-1903,-1899, +-1896,-1892,-1889,-1885,-1881,-1878,-1874,-1870,-1866,-1863,-1859,-1855,-1851,-1847, +-1843,-1839,-1835,-1831,-1827,-1823,-1819,-1814,-1810,-1806,-1802,-1798,-1793,-1789, +-1785,-1780,-1776,-1771,-1767,-1763,-1758,-1754,-1749,-1745,-1740,-1736,-1731,-1726, +-1722,-1717,-1713,-1708,-1703,-1698,-1694,-1689,-1684,-1680,-1675,-1670,-1665,-1660, +-1656,-1651,-1646,-1641,-1636,-1631,-1626,-1622,-1617,-1612,-1607,-1602,-1597,-1592, +-1587,-1582,-1577,-1572,-1567,-1562,-1557,-1552,-1547,-1542,-1537,-1532,-1527,-1522, +-1517,-1512,-1507,-1502,-1497,-1492,-1487,-1482,-1477,-1471,-1466,-1461,-1456,-1451, +-1446,-1441,-1436,-1431,-1426,-1421,-1416,-1411,-1406,-1401,-1395,-1390,-1385,-1380, +-1375,-1370,-1365,-1360,-1355,-1350,-1345,-1340,-1335,-1330,-1325,-1320,-1315,-1310, +-1305,-1300,-1295,-1290,-1285,-1280,-1275,-1270,-1265,-1260,-1255,-1250,-1245,-1240, +-1235,-1230,-1225,-1220,-1215,-1210,-1205,-1200,-1195,-1190,-1185,-1180,-1175,-1171, +-1166,-1161,-1156,-1151,-1146,-1141,-1136,-1131,-1127,-1122,-1117,-1112,-1107,-1102, +-1098,-1093,-1088,-1083,-1078,-1074,-1069,-1064,-1059,-1055,-1050,-1045,-1040,-1036, +-1031,-1026,-1022,-1017,-1012,-1007,-1003,-998,-994,-989,-984,-980,-975,-970,-966, +-961,-957,-952,-948,-943,-938,-934,-929,-925,-920,-916,-911,-907,-902,-898,-894, +-889,-885,-880,-876,-872,-867,-863,-858,-854,-850,-845,-841,-837,-833,-828,-824, +-820,-816,-811,-807,-803,-799,-795,-790,-786,-782,-778,-774,-770,-766,-762,-757, +-753,-749,-745,-741,-737,-733,-729,-725,-721,-717,-714,-710,-706,-702,-698,-694, +-690,-686,-683,-679,-675,-671,-667,-664,-660,-656,-652,-649,-645,-641,-638,-634, +-630,-627,-623,-620,-616,-612,-609,-605,-602,-598,-595,-591,-588,-584,-581,-577, +-574,-571,-567,-564,-560,-557,-554,-550,-547,-544,-540,-537,-534,-530,-527,-524, +-521,-518,-514,-511,-508,-505,-502,-499,-495,-492,-489,-486,-483,-480,-477,-474, +-471,-468,-465,-462,-459,-456,-453,-450,-447,-444,-441,-438,-435,-433,-430,-427, +-424,-421,-418,-416,-413,-410,-407,-405,-402,-399,-396,-394,-391,-388,-386,-383, +-380,-378,-375,-373,-370,-367,-365,-362,-360,-357,-355,-352,-350,-347,-345,-342, +-340,-337,-335,-333,-330,-328,-325,-323,-321,-318,-316,-314,-311,-309,-307,-305, +-302,-300,-298,-296,-293,-291,-289,-287,-285,-282,-280,-278,-276,-274,-272,-270, +-268,-266,-264,-261,-259,-257,-255,-253,-251,-249,-247,-246,-244,-242,-240,-238, +-236,-234,-232,-230,-228,-227,-225,-223,-221,-219,-217,-216,-214,-212,-210,-209, +-207,-205,-203,-202,-200,-198,-197,-195,-193,-192,-190,-188,-187,-185,-184,-182, +-180,-179,-177,-176,-174,-173,-171,-170,-168,-167,-165,-164,-162,-161,-159,-158, +-156,-155,-154,-152,-151,-149,-148,-147,-145,-144,-143,-141,-140,-139,-137,-136, +-135,-133,-132,-131,-130,-128,-127,-126,-125,-123,-122,-121,-120,-119,-117,-116, +-115,-114,-113,-112,-111,-109,-108,-107,-106,-105,-104,-103,-102,-101,-100,-99,-98, +-97,-96,-95,-94,-93,-92,-91,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78, +-78,-77,-76,-75,-74,-73,-72,-71,-71,-70,-69,-68,-67,-67,-66,-65,-64,-63,-63,-62, +-61,-60,-60,-59,-58,-58,-57,-56,-55,-55,-54,-53,-53,-52,-51,-51,-50,-49,-49,-48, +-47,-47,-46,-45,-45,-44,-44,-43,-42,-42,-41,-41,-40,-40,-39,-38,-38,-37,-37,-36, +-36,-35,-35,-34,-34,-33,-33,-32,-32,-31,-31,-30,-30,-29,-29,-28,-28,-28,-27,-27, +-26,-26,-25,-25,-25,-24,-24,-23,-23,-23,-22,-22,-21,-21,-21,-20,-20,-20,-19,-19, +-19,-18,-18,-17,-17,-17,-17,-16,-16,-16,-15,-15,-15,-14,-14,-14,-13,-13,-13,-13, +-12,-12,-12,-12,-11,-11,-11,-11,-10,-10,-10,-10,-9,-9,-9,-9,-9,-8,-8,-8,-8,-7,-7, +-7,-7,-7,-7,-6,-6,-6,-6,-6,-5,-5,-5,-5,-5,-5,-5,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3, +-3,-3,-3,-3,-3,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, +-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }, { -131072,131070,131069,131067,131065,131063,131060,131058,131055,131052,131049, -131045,131041,131037,131032,131026,131020,131014,131007,130999,130990,130981,130970, -130959,130947,130934,130919,130904,130887,130869,130849,130828,130805,130781,130755, -130727,130697,130666,130632,130596,130557,130516,130473,130427,130378,130326,130272, -130214,130153,130089,130021,129949,129874,129795,129712,129625,129533,129437,129336, -129231,129121,129005,128885,128759,128627,128490,128347,128198,128043,127882,127714, -127539,127357,127169,126973,126770,126559,126341,126114,125880,125637,125386,125127, -124859,124581,124295,123999,123694,123380,123055,122721,122377,122022,121657,121281, -120895,120498,120090,119670,119239,118797,118343,117878,117401,116911,116410,115896, -115370,114831,114280,113717,113140,112551,111949,111334,110705,110064,109409,108742, -108061,107366,106658,105937,105203,104455,103693,102919,102130,101329,100514,99685, -98844,97989,97121,96240,95346,94439,93519,92586,91641,90683,89712,88730,87735,86728, -85710,84679,83638,82585,81521,80446,79361,78265,77159,76042,74917,73782,72637,71484, -70322,69152,67974,66788,65594,64394,63187,61974,60754,59529,58298,57063,55823,54579, -53331,52079,50825,49568,48309,47048,45785,44522,43259,41995,40731,39469,38208,36948, -35691,34436,33184,31936,30692,29453,28218,26989,25766,24549,23338,22135,20940,19753, -18575,17405,16246,15096,13956,12828,11711,10606,9512,8432,7365,6311,5270,4245,3234, -2238,1257,292,-656,-1588,-2503,-3401,-4281,-5144,-5988,-6813,-7620,-8407,-9175, --9924,-10653,-11361,-12049,-12716,-13363,-13989,-14593,-15176,-15738,-16278,-16796, --17293,-17767,-18219,-18650,-19058,-19443,-19807,-20148,-20467,-20764,-21038,-21291, --21521,-21729,-21914,-22079,-22221,-22341,-22440,-22518,-22575,-22610,-22625,-22618, --22592,-22545,-22479,-22393,-22287,-22162,-22019,-21857,-21677,-21479,-21263,-21031, --20781,-20515,-20234,-19936,-19624,-19296,-18955,-18599,-18230,-17848,-17453,-17047, --16628,-16199,-15759,-15308,-14848,-14379,-13902,-13416,-12922,-12422,-11914,-11401, --10882,-10358,-9830,-9297,-8762,-8223,-7682,-7139,-6595,-6049,-5504,-4959,-4414,-3871, --3329,-2790,-2253,-1720,-1190,-665,-144,372,882,1386,1884,2375,2858,3334,3802,4261, -4712,5153,5585,6006,6417,6818,7208,7586,7953,8309,8652,8983,9301,9606,9899,10178, -10444,10697,10936,11161,11372,11569,11752,11920,12075,12215,12340,12452,12549,12631, -12699,12753,12792,12817,12829,12825,12808,12778,12733,12675,12603,12519,12421,12310, -12187,12051,11903,11743,11571,11388,11193,10988,10772,10546,10310,10064,9808,9544, -9271,8990,8701,8404,8100,7789,7471,7148,6819,6484,6145,5801,5453,5101,4746,4388, -4028,3665,3301,2936,2570,2203,1836,1470,1104,740,377,16,-343,-699,-1052,-1401,-1747, --2088,-2425,-2757,-3084,-3405,-3721,-4030,-4333,-4629,-4918,-5199,-5473,-5740,-5998, --6247,-6488,-6720,-6944,-7158,-7362,-7557,-7742,-7918,-8083,-8238,-8383,-8518,-8642, --8756,-8859,-8951,-9033,-9103,-9164,-9213,-9252,-9279,-9297,-9303,-9299,-9285,-9260, --9224,-9179,-9123,-9057,-8981,-8896,-8801,-8696,-8582,-8460,-8328,-8188,-8039,-7882, --7716,-7544,-7363,-7175,-6981,-6779,-6571,-6357,-6137,-5911,-5680,-5444,-5203,-4958, --4708,-4455,-4198,-3938,-3676,-3410,-3143,-2874,-2603,-2331,-2058,-1784,-1510,-1237, --963,-691,-419,-149,120,386,650,912,1171,1427,1679,1927,2172,2412,2647,2878,3104, -3324,3539,3749,3952,4149,4340,4524,4701,4872,5035,5191,5340,5481,5614,5740,5858, -5967,6069,6162,6248,6325,6393,6453,6505,6548,6583,6610,6628,6637,6638,6631,6616, -6592,6560,6520,6472,6416,6353,6281,6203,6116,6023,5922,5815,5700,5579,5452,5318, -5179,5033,4882,4725,4563,4396,4225,4049,3868,3684,3495,3304,3108,2910,2709,2506, -2300,2092,1883,1672,1459,1246,1032,818,604,389,175,-38,-250,-461,-671,-879,-1085, --1289,-1491,-1690,-1886,-2079,-2269,-2455,-2638,-2816,-2990,-3160,-3326,-3486,-3642, --3793,-3938,-4078,-4213,-4341,-4464,-4582,-4693,-4797,-4896,-4988,-5074,-5153,-5226, --5292,-5351,-5404,-5450,-5489,-5521,-5547,-5565,-5577,-5582,-5580,-5572,-5557,-5535, --5506,-5472,-5430,-5383,-5329,-5269,-5202,-5130,-5052,-4969,-4880,-4785,-4685,-4580, --4470,-4355,-4235,-4111,-3983,-3851,-3714,-3574,-3430,-3283,-3133,-2980,-2824,-2666, --2505,-2342,-2177,-2011,-1843,-1674,-1504,-1333,-1161,-990,-818,-646,-474,-303,-133, -37,205,372,537,701,863,1022,1179,1334,1486,1635,1781,1923,2063,2198,2330,2458, -2582,2702,2817,2929,3035,3137,3234,3326,3413,3496,3573,3645,3711,3772,3828,3878, -3923,3963,3997,4025,4048,4065,4076,4082,4083,4078,4067,4051,4030,4003,3971,3934, -3892,3845,3792,3735,3673,3606,3535,3459,3379,3294,3206,3113,3017,2917,2813,2707, -2596,2483,2367,2248,2126,2002,1876,1748,1617,1485,1352,1217,1081,943,806,667,528, -388,249,109,-30,-168,-307,-444,-580,-715,-849,-982,-1113,-1242,-1369,-1494,-1616, --1737,-1854,-1969,-2082,-2191,-2297,-2400,-2500,-2596,-2688,-2777,-2862,-2944,-3021, --3094,-3164,-3229,-3289,-3346,-3398,-3446,-3489,-3528,-3563,-3592,-3618,-3638,-3655, --3666,-3673,-3676,-3674,-3667,-3656,-3641,-3621,-3597,-3568,-3536,-3499,-3458,-3413, --3364,-3311,-3254,-3194,-3130,-3062,-2991,-2917,-2840,-2759,-2676,-2590,-2501,-2409, --2315,-2219,-2121,-2021,-1918,-1814,-1709,-1602,-1493,-1384,-1273,-1162,-1050,-937, --824,-711,-598,-485,-371,-259,-146,-35,76,186,295,403,509,614,717,819,919,1016,1112, -1205,1297,1385,1471,1555,1636,1714,1789,1861,1930,1996,2058,2117,2173,2226,2275, -2320,2362,2401,2435,2466,2494,2517,2537,2554,2566,2575,2580,2581,2579,2573,2563, -2550,2533,2513,2489,2461,2431,2397,2359,2319,2275,2228,2178,2126,2070,2012,1951, -1887,1821,1753,1683,1610,1535,1458,1380,1300,1218,1134,1050,964,877,789,700,610,520, -429,337,246,154,63,-29,-120,-212,-302,-392,-481,-570,-657,-744,-829,-914,-996, --1078,-1157,-1236,-1312,-1386,-1459,-1529,-1598,-1664,-1728,-1790,-1849,-1905,-1960, --2011,-2060,-2106,-2150,-2190,-2228,-2263,-2295,-2324,-2350,-2373,-2393,-2411,-2425, --2436,-2444,-2449,-2451,-2450,-2446,-2439,-2429,-2416,-2401,-2382,-2361,-2337,-2310, --2281,-2249,-2214,-2177,-2138,-2096,-2052,-2006,-1957,-1906,-1854,-1799,-1743,-1685, --1625,-1564,-1501,-1437,-1371,-1305,-1237,-1168,-1098,-1028,-957,-885,-812,-739,-666, --593,-519,-446,-373,-299,-226,-154,-82,-10,61,131,200,269,336,402,468,531,594,655, -715,773,829,884,937,988,1037,1085,1130,1173,1214,1253,1290,1325,1357,1387,1415, -1441,1464,1484,1503,1519,1532,1543,1552,1558,1562,1564,1563,1559,1554,1546,1535, -1523,1508,1491,1472,1450,1427,1401,1373,1344,1312,1279,1244,1207,1168,1128,1086, -1043,998,952,904,856,806,755,703,650,596,542,487,431,375,318,261,204,146,88,30,-27, --85,-143,-200,-257,-313,-369,-425,-479,-534,-587,-639,-691,-741,-791,-839,-887, --933,-977,-1021,-1063,-1103,-1143,-1180,-1216,-1250,-1283,-1314,-1343,-1371,-1397, --1421,-1443,-1463,-1481,-1498,-1512,-1525,-1536,-1545,-1551,-1556,-1559,-1561,-1560, --1557,-1552,-1546,-1538,-1527,-1515,-1502,-1486,-1469,-1450,-1429,-1407,-1383,-1358, --1331,-1302,-1272,-1241,-1209,-1175,-1140,-1104,-1066,-1028,-988,-948,-907,-865,-822, --778,-734,-689,-644,-598,-552,-505,-459,-412,-364,-317,-270,-223,-176,-129,-82,-35, -11,56,102,146,191,234,277,319,360,401,440,479,517,554,589,624,657,689,721,750,779, -806,832,857,880,902,922,941,958,974,989,1002,1014,1024,1032,1039,1045,1049,1052, -1053,1053,1051,1048,1043,1037,1030,1021,1011,999,987,973,957,941,923,904,884,863, -841,818,794,769,743,717,689,661,632,603,572,542,510,478,446,414,381,348,314,280, -247,213,179,145,111,77,44,10,-23,-56,-89,-121,-153,-184,-215,-246,-275,-305,-333, --361,-389,-415,-441,-466,-490,-513,-536,-557,-578,-597,-616,-633,-650,-666,-680, --694,-706,-718,-728,-737,-746,-753,-759,-764,-767,-770,-772,-772,-772,-770,-768, --764,-759,-754,-747,-740,-731,-722,-711,-700,-688,-675,-661,-646,-631,-615,-598, --580,-562,-543,-524,-504,-483,-462,-441,-419,-397,-374,-351,-328,-305,-281,-257, --233,-209,-185,-161,-137,-113,-89,-65,-41,-17,6,29,52,75,97,119,141,162,183,203,223, -242,261,279,297,314,330,346,361,375,389,402,414,426,437,447,456,465,472,479,486, -491,496,500,503,505,506,507,507,506,505,502,499,495,491,486,480,473,466,458,449, -440,431,420,409,398,386,374,361,347,334,320,305,290,275,259,244,228,211,195,178, -161,144,127,110,93,76,59,42,24,7,-9,-26,-43,-59,-76,-92,-107,-123,-138,-153,-168, --182,-196,-209,-223,-235,-248,-260,-271,-282,-292,-302,-312,-321,-329,-337,-344, --351,-358,-363,-369,-373,-377,-381,-384,-386,-388,-389,-390,-390,-389,-388,-387, --385,-382,-379,-375,-371,-367,-362,-356,-350,-344,-337,-330,-322,-314,-305,-297, --288,-278,-268,-258,-248,-238,-227,-216,-205,-193,-182,-170,-158,-146,-134,-122, --110,-98,-86,-74,-62,-50,-38,-26,-14,-2,9,21,32,43,54,65,75,85,95,105,115,124,133, -141,149,157,165,172,179,185,191,197,202,207,212,216,220,223,226,229,231,233,234, -235,236,236,236,235,234,233,231,229,226,223,220,217,213,209,204,199,194,189,183, -177,171,165,158,151,144,137,129,122,114,106,98,90,82,74,65,57,48,40,31,23,14,6,-2, --11,-19,-27,-36,-44,-52,-59,-67,-75,-82,-89,-96,-103,-110,-116,-123,-129,-135,-140, --146,-151,-156,-160,-164,-169,-172,-176,-179,-182,-185,-187,-189,-191,-193,-194, --195,-196,-196,-196,-196,-196,-195,-194,-193,-191,-190,-188,-186,-183,-180,-177, --174,-171,-167,-164,-160,-155,-151,-147,-142,-137,-132,-127,-122,-117,-111,-106, --100,-95,-89,-83,-77,-72,-66,-60,-54,-48,-42,-36,-30,-25,-19,-13,-8,-2,3,9,14,19,24, -29,34,39,43,47,52,56,60,63,67,70,73,77,79,82,84,87,89,91,92,94,95,96,97,98,98,98, -99,98,98,98,97,96,95,94,92,91,89,87,85,83,81,78,75,73,70,67,64,60,57,54,50,47,43, -39,35,32,28,24,20,16,12,8,4,0,-5,-9,-13,-17,-20,-24,-28,-32,-36,-39,-43,-47,-50, --54,-57,-60,-63,-66,-69,-72,-75,-77,-80,-82,-84,-86,-88,-90,-91,-93,-94,-96,-97, --98,-99,-99,-100,-100,-101,-101,-101,-101,-100,-100,-99,-99,-98,-97,-96,-95,-94, --92,-91,-89,-88,-86,-84,-82,-80,-78,-75,-73,-71,-68,-66,-63,-61,-58,-56,-53,-50, --47,-45,-42,-39,-36,-33,-31,-28,-25,-22,-20,-17,-14,-12,-9,-6,-4,-1,1,3,6,8,10,12, -14,16,18,19,21,23,24,25,27,28,29,30,31,32,32,33,33,34,34,34,34,34,34,34,34,33,33, -32,31,31,30,29,28,27,26,24,23,22,20,19,17,15,14,12,10,8,7,5,3,1,-1,-3,-5,-7,-9, --11,-13,-15,-17,-19,-21,-23,-25,-27,-29,-31,-32,-34,-36,-37,-39,-40,-42,-43,-45, --46,-47,-48,-49,-50,-51,-52,-53,-54,-54,-55,-56,-56,-56,-56,-57,-57,-57,-57,-57, --56,-56,-56,-55,-55,-54,-54,-53,-52,-52,-51,-50,-49,-48,-47,-46,-45,-44,-43,-42, --40,-39,-38,-37,-36,-34,-33,-32,-31,-30,-29,-27,-26,-25,-24,-23,-22,-21,-20,-19, --18,-17,-16,-16,-15,-14,-13,-13,-12,-11,-11,-10,-10,-9,-9,-8,-8,-8,-7,-7,-6,-6,-6, --5,-5,-5,-4,-4,-3,-3,-3,-2,-2,-2,-1,-1,-1,0,0,0, +131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072, +131072,131072,131072,131071,131071,131071,131071,131071,131071,131070,131070,131070, +131070,131069,131069,131069,131068,131068,131067,131066,131066,131065,131064,131063, +131062,131061,131059,131058,131056,131055,131053,131051,131049,131046,131044,131041, +131038,131035,131031,131028,131024,131019,131015,131010,131004,130998,130992,130986, +130979,130971,130963,130955,130945,130936,130925,130914,130903,130890,130877,130863, +130849,130833,130816,130799,130781,130761,130740,130719,130696,130672,130646,130619, +130591,130562,130531,130498,130463,130427,130390,130350,130308,130265,130219,130172, +130122,130069,130015,129958,129898,129836,129772,129704,129633,129560,129483,129404, +129321,129235,129145,129051,128954,128854,128749,128640,128527,128410,128289,128163, +128033,127898,127758,127613,127463,127308,127147,126982,126810,126633,126450,126261, +126066,125864,125657,125443,125222,124994,124759,124518,124269,124013,123749,123478, +123199,122912,122617,122314,122003,121683,121355,121017,120672,120317,119953,119579, +119197,118805,118403,117992,117570,117139,116698,116246,115784,115312,114829,114336, +113831,113316,112790,112253,111705,111145,110575,109992,109399,108794,108177,107549, +106909,106257,105594,104918,104231,103532,102821,102098,101363,100616,99858,99087, +98304,97510,96703,95885,95054,94212,93358,92493,91616,90727,89827,88915,87992,87058, +86113,85157,84190,83212,82224,81225,80216,79196,78167,77128,76079,75021,73953,72877, +71792,70698,69596,68485,67367,66241,65108,63967,62820,61666,60506,59339,58168,56990, +55808,54621,53429,52234,51034,49832,48626,47417,46206,44994,43779,42563,41347,40130, +38913,37696,36480,35265,34052,32841,31632,30426,29223,28023,26828,25637,24451,23270, +22095,20926,19764,18609,17461,16321,15190,14067,12953,11849,10755,9671,8598,7537, +6487,5449,4423,3410,2411,1425,453,-504,-1447,-2375,-3287,-4184,-5064,-5928,-6775, +-7605,-8417,-9212,-9989,-10747,-11487,-12208,-12910,-13592,-14255,-14898,-15521, +-16124,-16706,-17268,-17809,-18329,-18829,-19306,-19763,-20198,-20612,-21004,-21374, +-21723,-22050,-22355,-22639,-22900,-23140,-23358,-23555,-23729,-23883,-24014,-24124, +-24213,-24281,-24328,-24353,-24359,-24343,-24307,-24251,-24175,-24079,-23964,-23830, +-23677,-23505,-23314,-23106,-22879,-22636,-22375,-22097,-21804,-21494,-21168,-20827, +-20472,-20102,-19718,-19320,-18909,-18486,-18050,-17603,-17144,-16674,-16194,-15705, +-15205,-14697,-14181,-13657,-13125,-12587,-12042,-11491,-10936,-10375,-9810,-9242, +-8670,-8096,-7520,-6942,-6363,-5783,-5204,-4625,-4047,-3471,-2897,-2325,-1756,-1191, +-630,-74,477,1023,1563,2096,2623,3142,3654,4157,4652,5138,5614,6081,6537,6983,7418, +7842,8255,8655,9044,9420,9783,10134,10471,10795,11105,11401,11684,11952,12205,12444, +12669,12878,13073,13252,13417,13567,13701,13820,13924,14012,14086,14144,14187,14215, +14228,14226,14209,14178,14132,14071,13996,13907,13805,13688,13558,13415,13259,13089, +12908,12714,12508,12290,12061,11821,11570,11309,11038,10756,10466,10166,9858,9542, +9218,8886,8547,8201,7850,7492,7129,6761,6388,6011,5631,5247,4860,4471,4080,3687, +3294,2899,2504,2110,1716,1323,931,541,154,-231,-613,-991,-1365,-1736,-2101,-2462, +-2817,-3166,-3510,-3847,-4177,-4500,-4816,-5124,-5424,-5716,-5999,-6273,-6539,-6795, +-7042,-7279,-7506,-7722,-7929,-8125,-8310,-8485,-8649,-8802,-8943,-9074,-9193,-9300, +-9397,-9481,-9555,-9617,-9667,-9706,-9733,-9749,-9754,-9748,-9730,-9701,-9661,-9610, +-9548,-9476,-9393,-9300,-9196,-9083,-8960,-8827,-8685,-8534,-8373,-8204,-8027,-7842, +-7648,-7447,-7238,-7023,-6801,-6572,-6337,-6096,-5849,-5598,-5341,-5080,-4815,-4545, +-4273,-3997,-3718,-3436,-3153,-2867,-2581,-2293,-2004,-1715,-1425,-1136,-848,-560, +-274,11,293,574,852,1127,1399,1667,1932,2192,2448,2699,2946,3187,3423,3653,3877, +4095,4306,4511,4709,4900,5084,5261,5430,5591,5744,5889,6026,6155,6276,6388,6492, +6587,6673,6750,6819,6879,6931,6973,7007,7031,7047,7055,7053,7043,7024,6997,6962, +6918,6866,6805,6737,6661,6577,6486,6387,6281,6168,6048,5922,5789,5650,5504,5353, +5196,5034,4866,4694,4517,4336,4150,3960,3767,3571,3371,3168,2963,2755,2546,2334, +2122,1907,1692,1477,1261,1044,828,612,397,183,-30,-241,-451,-659,-864,-1067,-1268, +-1465,-1659,-1850,-2037,-2221,-2400,-2575,-2746,-2912,-3073,-3230,-3381,-3527,-3667, +-3802,-3931,-4054,-4172,-4283,-4388,-4487,-4579,-4665,-4745,-4818,-4884,-4944,-4997, +-5043,-5082,-5115,-5141,-5160,-5173,-5179,-5178,-5171,-5157,-5136,-5110,-5076,-5037, +-4991,-4940,-4882,-4819,-4749,-4675,-4594,-4509,-4418,-4322,-4221,-4116,-4006,-3891, +-3772,-3650,-3523,-3393,-3259,-3123,-2983,-2840,-2694,-2546,-2396,-2244,-2090,-1934, +-1777,-1619,-1459,-1299,-1139,-978,-817,-655,-495,-334,-175,-16,141,298,452,605,757, +906,1053,1197,1339,1478,1615,1748,1878,2004,2127,2247,2362,2474,2582,2685,2785, +2880,2970,3056,3137,3214,3286,3353,3415,3473,3525,3572,3615,3652,3684,3711,3733, +3750,3762,3769,3771,3768,3760,3747,3729,3707,3680,3648,3611,3570,3525,3476,3422, +3364,3302,3236,3166,3093,3016,2936,2852,2766,2676,2583,2488,2390,2290,2187,2082, +1976,1867,1757,1645,1532,1418,1303,1187,1070,952,835,717,599,481,363,246,129,13, +-102,-216,-329,-440,-550,-659,-766,-871,-974,-1075,-1174,-1270,-1364,-1456,-1544, +-1630,-1714,-1794,-1871,-1945,-2016,-2084,-2148,-2209,-2267,-2321,-2372,-2418,-2462, +-2502,-2538,-2570,-2599,-2624,-2645,-2662,-2676,-2686,-2693,-2695,-2694,-2690,-2682, +-2670,-2655,-2636,-2614,-2589,-2560,-2528,-2493,-2455,-2414,-2370,-2323,-2274,-2221, +-2167,-2109,-2050,-1988,-1923,-1857,-1789,-1719,-1647,-1574,-1499,-1422,-1345,-1266, +-1186,-1105,-1023,-941,-858,-774,-690,-606,-522,-438,-354,-270,-187,-104,-21,61,142, +222,301,379,456,532,606,679,750,820,888,954,1018,1081,1141,1199,1255,1309,1361, +1410,1457,1502,1544,1584,1621,1655,1687,1717,1743,1768,1789,1808,1824,1838,1849, +1857,1863,1866,1867,1864,1860,1853,1843,1831,1816,1800,1780,1759,1735,1709,1681, +1651,1619,1585,1549,1511,1472,1431,1388,1344,1298,1251,1202,1153,1102,1050,997,943, +889,833,778,721,664,607,549,491,433,375,317,259,201,143,86,29,-27,-83,-138,-193, +-246,-299,-351,-402,-452,-501,-548,-595,-640,-684,-726,-767,-807,-845,-882,-917, +-950,-982,-1012,-1040,-1067,-1091,-1115,-1136,-1155,-1173,-1189,-1203,-1215,-1226, +-1235,-1241,-1246,-1250,-1251,-1251,-1249,-1245,-1239,-1232,-1223,-1213,-1201,-1187, +-1172,-1155,-1137,-1117,-1096,-1074,-1051,-1026,-1000,-973,-944,-915,-885,-854,-822, +-789,-755,-720,-685,-650,-613,-577,-539,-502,-464,-426,-387,-349,-310,-272,-233, +-194,-156,-118,-80,-42,-4,33,69,105,141,176,210,244,277,309,341,372,401,430,458,485, +512,537,561,584,606,626,646,665,682,698,713,727,740,751,762,771,778,785,791,795, +798,800,801,800,799,796,792,787,781,774,766,757,747,736,724,711,697,682,667,650, +633,616,597,578,558,538,517,496,474,452,429,406,382,359,335,311,286,262,237,213, +188,163,139,114,90,65,41,17,-6,-30,-53,-75,-98,-120,-141,-162,-183,-203,-222,-241, +-260,-277,-295,-311,-327,-342,-357,-371,-384,-396,-408,-419,-429,-439,-448,-456, +-463,-469,-475,-480,-484,-488,-490,-492,-493,-494,-493,-492,-491,-488,-485,-481, +-477,-472,-466,-460,-453,-445,-437,-428,-419,-410,-399,-389,-378,-366,-354,-342, +-329,-316,-303,-290,-276,-262,-248,-233,-218,-204,-189,-174,-159,-144,-129,-114,-99, +-84,-69,-54,-39,-24,-10,4,18,32,46,59,73,85,98,110,122,134,145,156,167,177,186,196, +205,213,221,229,236,243,249,255,260,265,269,273,277,280,282,284,286,287,288,288, +288,287,286,285,283,281,278,275,272,268,264,259,254,249,244,238,232,225,219,212, +205,198,190,182,175,167,158,150,142,133,125,116,107,98,90,81,72,63,54,46,37,28,20, +11,3,-5,-13,-21,-29,-37,-45,-52,-59,-66,-73,-79,-86,-92,-98,-104,-109,-114,-119, +-124,-128,-132,-136,-140,-143,-146,-149,-152,-154,-156,-158,-159,-160,-161,-162, +-162,-163,-162,-162,-161,-161,-159,-158,-157,-155,-153,-151,-148,-146,-143,-140, +-137,-133,-130,-126,-122,-118,-114,-110,-106,-101,-97,-92,-88,-83,-78,-73,-68,-64, +-59,-54,-49,-44,-39,-34,-29,-24,-19,-14,-9,-5,0,5,9,14,18,22,26,30,34,38,42,45,49, +52,55,58,61,64,67,69,72,74,76,78,79,81,82,84,85,86,86,87,88,88,88,88,88,88,88,87, +87,86,85,84,83,82,80,79,77,75,74,72,70,68,66,64,61,59,57,54,52,49,47,44,42,39,36, +34,31,28,25,23,20,17,15,12,9,7,4,2,-1,-3,-6,-8,-10,-12,-15,-17,-19,-21,-23,-25, +-26,-28,-30,-31,-33,-34,-36,-37,-38,-39,-40,-41,-42,-43,-43,-44,-45,-45,-45,-46, +-46,-46,-46,-46,-46,-46,-45,-45,-45,-44,-44,-43,-42,-42,-41,-40,-39,-38,-37,-36, +-35,-34,-33,-32,-30,-29,-28,-27,-25,-24,-23,-21,-20,-18,-17,-16,-14,-13,-11,-10,-9, +-7,-6,-5,-3,-2,-1,1,2,3,4,5,7,8,9,10,11,12,13,14,14,15,16,17,17,18,19,19,20,20,21, +21,21,22,22,22,22,22,23,23,23,23,23,22,22,22,22,22,21,21,21,20,20,20,19,19,18,18, +17,16,16,15,15,14,13,13,12,11,11,10,9,9,8,7,7,6,5,5,4,3,3,2,1,1,0,-1,-1,-2,-2,-3, +-3,-4,-4,-5,-5,-6,-6,-7,-7,-7,-8,-8,-8,-9,-9,-9,-9,-10,-10,-10,-10,-10,-10,-10, +-10,-11,-11,-11,-11,-10,-10,-10,-10,-10,-10,-10,-10,-10,-9,-9,-9,-9,-8,-8,-8,-8,-7, +-7,-7,-7,-6,-6,-6,-5,-5,-5,-4,-4,-4,-3,-3,-3,-2,-2,-2,-2,-1,-1,-1,0,0,0,0,1,1,1,2, +2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4, +4,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1, +-1,-1,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, +-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0, }, { -131072,131070,131069,131067,131065,131064,131062,131060,131059,131057,131055, -131054,131052,131050,131049,131047,131045,131044,131042,131040,131039,131037,131035, -131034,131032,131030,131028,131027,131025,131023,131021,131020,131018,131016,131014, -131012,131010,131008,131007,131005,131003,131001,130998,130996,130994,130992,130990, -130988,130985,130983,130980,130978,130975,130973,130970,130967,130964,130961,130958, -130955,130952,130949,130945,130942,130938,130934,130930,130926,130922,130917,130913, -130908,130903,130898,130893,130887,130881,130875,130869,130863,130856,130849,130842, -130834,130826,130818,130810,130801,130792,130783,130773,130762,130752,130741,130729, -130718,130705,130693,130679,130666,130651,130637,130621,130605,130589,130572,130554, -130536,130517,130497,130477,130456,130434,130412,130389,130365,130340,130314,130288, -130261,130232,130203,130173,130142,130110,130077,130043,130008,129972,129935,129897, -129857,129816,129775,129732,129687,129642,129595,129547,129498,129447,129395,129341, -129286,129230,129172,129112,129051,128989,128925,128859,128791,128722,128652,128579, -128505,128429,128351,128272,128190,128107,128022,127935,127846,127755,127662,127567, -127470,127371,127270,127166,127061,126953,126844,126732,126618,126502,126383,126262, -126139,126014,125886,125756,125624,125489,125352,125212,125070,124926,124779,124629, -124477,124323,124166,124007,123845,123681,123514,123344,123172,122997,122820,122640, -122458,122273,122085,121895,121702,121506,121308,121107,120904,120698,120490,120279, -120065,119848,119629,119408,119184,118957,118728,118496,118261,118024,117785,117543, -117298,117051,116802,116550,116295,116038,115779,115517,115253,114986,114718,114446, -114173,113897,113619,113339,113056,112771,112485,112195,111904,111611,111316,111018, -110719,110417,110114,109809,109502,109193,108882,108569,108255,107939,107621,107301, -106980,106657,106333,106007,105680,105351,105020,104689,104356,104021,103686,103349, -103011,102672,102331,101990,101647,101304,100959,100613,100267,99920,99572,99223, -98873,98522,98171,97819,97467,97114,96761,96406,96052,95697,95342,94986,94630,94273, -93917,93560,93203,92846,92488,92131,91773,91415,91058,90700,90343,89985,89628,89271, -88913,88557,88200,87843,87487,87131,86776,86420,86066,85711,85357,85003,84650,84297, -83945,83593,83242,82891,82541,82191,81842,81494,81146,80798,80452,80106,79761,79416, -79072,78729,78386,78044,77703,77363,77023,76684,76346,76008,75671,75335,75000,74665, -74332,73999,73666,73335,73004,72674,72345,72016,71689,71361,71035,70710,70385,70061, -69737,69415,69093,68772,68451,68131,67812,67494,67176,66859,66542,66227,65912,65597, -65283,64970,64657,64345,64034,63723,63413,63103,62794,62486,62178,61870,61563,61257, -60951,60646,60341,60036,59732,59429,59126,58824,58522,58220,57919,57618,57318,57018, -56719,56420,56121,55823,55525,55228,54931,54634,54338,54042,53747,53452,53157,52863, -52569,52275,51982,51689,51396,51104,50813,50521,50230,49940,49650,49360,49070,48781, -48493,48204,47917,47629,47342,47056,46770,46484,46199,45914,45629,45346,45062,44779, -44497,44215,43933,43652,43372,43092,42813,42534,42256,41978,41701,41425,41149,40874, -40599,40325,40052,39780,39508,39237,38966,38696,38427,38159,37891,37625,37359,37094, -36829,36566,36303,36041,35780,35520,35260,35002,34744,34488,34232,33977,33724,33471, -33219,32968,32718,32469,32221,31974,31729,31484,31240,30997,30755,30515,30275,30037, -29800,29563,29328,29094,28861,28629,28398,28169,27940,27713,27487,27262,27038,26815, -26594,26373,26154,25936,25719,25503,25288,25075,24862,24651,24441,24232,24024,23818, -23612,23408,23204,23002,22801,22601,22403,22205,22009,21813,21619,21426,21233,21042, -20852,20663,20475,20289,20103,19918,19734,19551,19370,19189,19009,18830,18652,18476, -18300,18125,17951,17778,17605,17434,17264,17094,16925,16758,16591,16425,16259,16095, -15931,15769,15607,15445,15285,15125,14967,14808,14651,14494,14338,14183,14029,13875, -13722,13569,13418,13267,13116,12967,12817,12669,12521,12374,12227,12082,11936,11792, -11647,11504,11361,11219,11077,10936,10795,10655,10516,10377,10239,10101,9964,9828, -9692,9556,9421,9287,9153,9020,8888,8755,8624,8493,8363,8233,8104,7975,7847,7719, -7592,7466,7340,7215,7090,6966,6843,6720,6598,6476,6355,6235,6115,5996,5877,5759, -5642,5525,5409,5294,5179,5065,4952,4839,4727,4615,4505,4395,4285,4177,4069,3961, -3855,3749,3644,3540,3436,3333,3231,3129,3028,2928,2829,2731,2633,2536,2439,2344, -2249,2155,2062,1970,1878,1787,1697,1607,1519,1431,1344,1258,1172,1088,1004,921,838, -757,676,596,516,438,360,283,207,131,57,-17,-91,-163,-235,-306,-376,-446,-514,-583, --650,-717,-783,-848,-913,-976,-1040,-1102,-1164,-1225,-1286,-1346,-1405,-1464,-1522, --1579,-1636,-1692,-1748,-1803,-1857,-1911,-1965,-2017,-2069,-2121,-2172,-2223,-2273, --2322,-2371,-2420,-2468,-2516,-2563,-2609,-2655,-2701,-2746,-2791,-2836,-2880,-2923, --2966,-3009,-3052,-3093,-3135,-3176,-3217,-3258,-3298,-3338,-3377,-3416,-3455,-3493, --3532,-3569,-3607,-3644,-3681,-3718,-3754,-3790,-3826,-3861,-3896,-3931,-3966,-4000, --4034,-4068,-4101,-4135,-4168,-4201,-4233,-4265,-4297,-4329,-4361,-4392,-4423,-4454, --4484,-4514,-4544,-4574,-4604,-4633,-4662,-4691,-4719,-4748,-4776,-4803,-4831,-4858, --4885,-4912,-4938,-4964,-4990,-5016,-5041,-5066,-5091,-5116,-5140,-5164,-5188,-5211, --5234,-5257,-5280,-5302,-5324,-5345,-5367,-5388,-5408,-5429,-5449,-5468,-5488,-5507, --5526,-5544,-5562,-5580,-5597,-5614,-5631,-5647,-5664,-5679,-5695,-5710,-5724,-5739, --5753,-5766,-5779,-5792,-5805,-5817,-5829,-5840,-5852,-5862,-5873,-5883,-5892,-5902, --5911,-5919,-5928,-5936,-5943,-5951,-5958,-5964,-5970,-5976,-5982,-5987,-5992,-5996, --6001,-6005,-6008,-6011,-6014,-6017,-6019,-6021,-6023,-6024,-6026,-6026,-6027,-6027, --6027,-6027,-6026,-6026,-6025,-6023,-6022,-6020,-6018,-6016,-6013,-6010,-6007,-6004, --6001,-5997,-5993,-5989,-5985,-5981,-5976,-5972,-5967,-5962,-5957,-5951,-5946,-5940, --5934,-5928,-5922,-5916,-5910,-5903,-5897,-5890,-5884,-5877,-5870,-5863,-5856,-5848, --5841,-5834,-5826,-5819,-5811,-5804,-5796,-5788,-5781,-5773,-5765,-5757,-5749,-5741, --5733,-5725,-5717,-5709,-5701,-5693,-5684,-5676,-5668,-5660,-5651,-5643,-5635,-5626, --5618,-5610,-5601,-5593,-5584,-5576,-5567,-5559,-5550,-5542,-5533,-5525,-5516,-5508, --5499,-5490,-5482,-5473,-5464,-5455,-5447,-5438,-5429,-5420,-5411,-5402,-5393,-5384, --5375,-5366,-5357,-5347,-5338,-5329,-5319,-5310,-5300,-5291,-5281,-5271,-5262,-5252, --5242,-5232,-5222,-5211,-5201,-5191,-5181,-5170,-5159,-5149,-5138,-5127,-5116,-5105, --5094,-5083,-5072,-5060,-5049,-5037,-5025,-5013,-5001,-4989,-4977,-4965,-4953,-4940, --4928,-4915,-4902,-4889,-4876,-4863,-4850,-4837,-4823,-4810,-4796,-4782,-4768,-4755, --4740,-4726,-4712,-4698,-4683,-4669,-4654,-4639,-4625,-4610,-4595,-4580,-4565,-4549, --4534,-4519,-4503,-4488,-4472,-4456,-4441,-4425,-4409,-4393,-4377,-4361,-4345,-4329, --4313,-4297,-4281,-4264,-4248,-4232,-4215,-4199,-4183,-4166,-4150,-4134,-4117,-4101, --4084,-4068,-4051,-4035,-4019,-4002,-3986,-3969,-3953,-3937,-3920,-3904,-3888,-3872, --3855,-3839,-3823,-3807,-3791,-3775,-3759,-3743,-3727,-3712,-3696,-3680,-3665,-3649, --3633,-3618,-3603,-3587,-3572,-3557,-3542,-3527,-3512,-3497,-3482,-3467,-3452,-3437, --3423,-3408,-3394,-3379,-3365,-3351,-3337,-3322,-3308,-3294,-3280,-3267,-3253,-3239, --3225,-3212,-3198,-3185,-3171,-3158,-3144,-3131,-3118,-3105,-3092,-3079,-3066,-3053, --3040,-3027,-3014,-3001,-2989,-2976,-2963,-2951,-2938,-2925,-2913,-2900,-2888,-2875, --2863,-2851,-2838,-2826,-2813,-2801,-2789,-2777,-2764,-2752,-2740,-2727,-2715,-2703, --2691,-2678,-2666,-2654,-2642,-2629,-2617,-2605,-2593,-2580,-2568,-2556,-2543,-2531, --2519,-2506,-2494,-2482,-2469,-2457,-2444,-2432,-2420,-2407,-2395,-2382,-2370,-2357, --2345,-2332,-2320,-2307,-2295,-2282,-2269,-2257,-2244,-2232,-2219,-2206,-2194,-2181, --2168,-2156,-2143,-2130,-2118,-2105,-2092,-2080,-2067,-2054,-2042,-2029,-2016,-2004, --1991,-1978,-1966,-1953,-1941,-1928,-1915,-1903,-1890,-1878,-1865,-1853,-1841,-1828, --1816,-1804,-1791,-1779,-1767,-1755,-1743,-1730,-1718,-1706,-1694,-1683,-1671,-1659, --1647,-1635,-1624,-1612,-1600,-1589,-1577,-1566,-1555,-1543,-1532,-1521,-1510,-1499, --1488,-1477,-1466,-1455,-1445,-1434,-1424,-1413,-1403,-1392,-1382,-1372,-1362,-1351, --1341,-1331,-1322,-1312,-1302,-1292,-1283,-1273,-1264,-1254,-1245,-1235,-1226,-1217, --1208,-1199,-1190,-1181,-1172,-1164,-1155,-1146,-1138,-1129,-1121,-1112,-1104,-1095, --1087,-1079,-1071,-1063,-1055,-1047,-1039,-1031,-1023,-1015,-1007,-1000,-992,-984, --977,-969,-962,-954,-947,-939,-932,-925,-917,-910,-903,-896,-889,-881,-874,-867, --860,-853,-846,-839,-832,-825,-818,-811,-804,-798,-791,-784,-777,-770,-763,-757, --750,-743,-736,-730,-723,-716,-710,-703,-696,-690,-683,-677,-670,-663,-657,-650, --644,-637,-631,-624,-618,-611,-605,-598,-592,-586,-579,-573,-566,-560,-554,-547, --541,-535,-529,-522,-516,-510,-504,-498,-491,-485,-479,-473,-467,-461,-455,-449, --443,-437,-432,-426,-420,-414,-408,-403,-397,-391,-386,-380,-375,-369,-364,-358, --353,-347,-342,-337,-331,-326,-321,-316,-311,-306,-301,-296,-291,-286,-281,-276, --272,-267,-262,-258,-253,-248,-244,-239,-235,-231,-226,-222,-218,-214,-210,-205, --201,-197,-193,-189,-186,-182,-178,-174,-170,-167,-163,-159,-156,-152,-149,-145, --142,-139,-135,-132,-129,-126,-122,-119,-116,-113,-110,-107,-104,-101,-98,-95,-92, --89,-87,-84,-81,-78,-76,-73,-70,-68,-65,-62,-60,-57,-55,-52,-50,-47,-45,-43,-40, --38,-35,-33,-31,-28,-26,-24,-21,-19,-17,-15,-12,-10,-8,-6,-4,-1,1,3,5,7,9,11,13,15, -18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,51,53,55,57,59,61,63,65,66,68, -70,72,74,75,77,79,81,82,84,86,87,89,91,92,94,95,97,99,100,102,103,105,106,107,109, -110,112,113,114,116,117,118,120,121,122,123,125,126,127,128,129,130,131,132,134, -135,136,136,137,138,139,140,141,142,143,144,144,145,146,147,147,148,149,149,150, -150,151,152,152,153,153,154,154,155,155,156,156,156,157,157,157,158,158,158,159, -159,159,159,160,160,160,160,161,161,161,161,161,161,161,162,162,162,162,162,162, -162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162, -162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,161,161,161,161,161, -161,161,161,161,161,161,161,160,160,160,160,160,160,160,160,160,159,159,159,159, -159,159,159,158,158,158,158,158,158,157,157,157,157,157,156,156,156,156,155,155, -155,155,154,154,154,154,153,153,153,152,152,152,151,151,151,150,150,150,149,149, -148,148,148,147,147,146,146,146,145,145,144,144,143,143,142,142,141,141,140,140, -139,139,138,138,137,137,136,135,135,134,134,133,133,132,131,131,130,130,129,128, -128,127,127,126,125,125,124,123,123,122,122,121,120,120,119,118,118,117,116,116, -115,114,114,113,113,112,111,111,110,109,109,108,107,107,106,106,105,104,104,103, -102,102,101,101,100,99,99,98,97,97,96,96,95,94,94,93,93,92,91,91,90,90,89,88,88,87, -87,86,86,85,84,84,83,83,82,81,81,80,80,79,79,78,77,77,76,76,75,74,74,73,73,72,72, -71,70,70,69,69,68,67,67,66,66,65,64,64,63,63,62,61,61,60,60,59,58,58,57,57,56,55, -55,54,54,53,52,52,51,50,50,49,49,48,47,47,46,45,45,44,44,43,42,42,41,41,40,39,39, -38,37,37,36,36,35,34,34,33,33,32,31,31,30,30,29,28,28,27,27,26,25,25,24,24,23,22, -22,21,21,20,20,19,18,18,17,17,16,16,15,15,14,13,13,12,12,11,11,10,10,9,9,8,8,7,7, -6,6,5,4,4,3,3,2,2,1,1,0,0, +131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072, +131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072,131072, +131072,131072,131072,131072,131072,131072,131072,131071,131071,131071,131071,131071, +131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071, +131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071,131071, +131071,131071,131071,131071,131071,131070,131070,131070,131070,131070,131070,131070, +131070,131070,131070,131070,131069,131069,131069,131069,131069,131069,131068,131068, +131068,131068,131068,131067,131067,131067,131066,131066,131066,131065,131065,131064, +131064,131064,131063,131062,131062,131061,131061,131060,131059,131058,131058,131057, +131056,131055,131054,131053,131052,131051,131049,131048,131047,131045,131044,131042, +131040,131039,131037,131035,131033,131031,131028,131026,131024,131021,131018,131015, +131012,131009,131006,131003,130999,130995,130991,130987,130983,130978,130974,130969, +130964,130959,130953,130947,130941,130935,130929,130922,130915,130908,130900,130892, +130884,130876,130867,130858,130848,130838,130828,130817,130806,130795,130783,130771, +130758,130745,130731,130717,130702,130687,130671,130655,130638,130621,130603,130585, +130566,130546,130526,130505,130483,130461,130437,130414,130389,130364,130338,130311, +130283,130255,130225,130195,130164,130132,130099,130065,130031,129995,129958,129920, +129881,129841,129800,129758,129715,129671,129625,129578,129531,129481,129431,129379, +129326,129272,129216,129159,129101,129041,128980,128918,128853,128788,128721,128652, +128582,128510,128437,128362,128285,128206,128126,128045,127961,127876,127789,127700, +127609,127517,127422,127326,127228,127128,127026,126922,126816,126708,126598,126486, +126371,126255,126137,126016,125894,125769,125642,125513,125382,125248,125112,124974, +124834,124691,124546,124399,124250,124098,123944,123787,123628,123467,123303,123137, +122969,122798,122625,122449,122271,122090,121907,121722,121534,121343,121150,120955, +120757,120557,120354,120149,119941,119731,119519,119304,119086,118866,118644,118419, +118192,117962,117730,117495,117258,117019,116777,116533,116287,116038,115787,115533, +115277,115019,114759,114496,114232,113965,113695,113424,113150,112874,112597,112317, +112035,111750,111464,111176,110886,110594,110300,110004,109706,109406,109105,108801, +108496,108189,107881,107571,107259,106945,106630,106313,105995,105675,105354,105032, +104708,104382,104056,103728,103398,103068,102736,102403,102070,101735,101398,101061, +100723,100384,100044,99704,99362,99020,98676,98333,97988,97643,97297,96950,96603, +96256,95908,95559,95211,94861,94512,94162,93812,93461,93111,92760,92409,92058,91707, +91356,91005,90654,90303,89952,89601,89250,88899,88549,88199,87849,87499,87150,86801, +86452,86104,85756,85408,85061,84715,84369,84023,83678,83334,82990,82646,82304,81962, +81620,81279,80939,80600,80261,79923,79586,79249,78914,78579,78244,77911,77578,77247, +76916,76585,76256,75927,75600,75273,74947,74622,74297,73974,73651,73329,73008,72688, +72369,72051,71733,71417,71101,70786,70472,70159,69847,69535,69225,68915,68606,68298, +67990,67684,67378,67073,66769,66466,66163,65861,65560,65260,64960,64661,64363,64066, +63769,63473,63178,62884,62590,62296,62004,61712,61421,61130,60840,60550,60262,59973, +59686,59399,59112,58826,58541,58256,57972,57688,57405,57122,56840,56558,56277,55996, +55715,55436,55156,54877,54599,54321,54043,53766,53490,53213,52938,52662,52387,52113, +51839,51565,51292,51019,50747,50475,50203,49932,49661,49391,49121,48852,48583,48314, +48046,47778,47511,47244,46978,46712,46446,46181,45917,45653,45389,45126,44864,44601, +44340,44079,43818,43558,43299,43040,42782,42524,42267,42010,41754,41499,41244,40990, +40737,40484,40232,39980,39729,39479,39230,38981,38733,38486,38239,37994,37749,37504, +37261,37018,36777,36536,36296,36056,35818,35580,35343,35108,34873,34639,34405,34173, +33942,33712,33482,33254,33026,32800,32574,32349,32126,31903,31682,31461,31242,31023, +30806,30589,30374,30160,29946,29734,29523,29313,29104,28896,28689,28483,28278,28074, +27872,27670,27470,27270,27072,26875,26678,26483,26289,26096,25904,25713,25524,25335, +25147,24961,24775,24591,24407,24225,24043,23863,23684,23505,23328,23152,22976,22802, +22628,22456,22285,22114,21945,21776,21608,21442,21276,21111,20947,20784,20622,20460, +20300,20140,19981,19823,19666,19510,19355,19200,19046,18893,18741,18589,18438,18288, +18139,17990,17843,17696,17549,17403,17258,17114,16970,16827,16685,16543,16402,16262, +16122,15983,15845,15707,15569,15433,15296,15161,15026,14891,14758,14624,14492,14359, +14228,14097,13966,13836,13707,13578,13449,13321,13194,13067,12941,12815,12689,12565, +12440,12317,12193,12071,11948,11826,11705,11584,11464,11344,11225,11107,10988,10871, +10753,10637,10521,10405,10290,10175,10061,9948,9835,9722,9610,9499,9388,9278,9168, +9059,8950,8842,8735,8628,8522,8416,8311,8206,8102,7998,7896,7793,7692,7591,7490, +7390,7291,7192,7094,6997,6900,6804,6709,6614,6520,6426,6333,6241,6149,6058,5968, +5878,5789,5700,5613,5526,5439,5353,5268,5184,5100,5017,4935,4853,4772,4691,4611, +4532,4454,4376,4299,4222,4146,4071,3997,3923,3849,3777,3705,3634,3563,3493,3423, +3354,3286,3219,3152,3085,3020,2954,2890,2826,2762,2700,2637,2576,2515,2454,2394, +2335,2276,2218,2160,2102,2046,1989,1934,1878,1824,1769,1716,1662,1610,1557,1505, +1454,1403,1352,1302,1253,1203,1155,1106,1058,1011,963,917,870,824,778,733,688,643, +599,555,512,468,425,383,341,299,257,216,175,134,93,53,13,-26,-65,-105,-143,-182, +-220,-258,-296,-333,-370,-407,-444,-480,-516,-552,-588,-623,-659,-694,-728,-763, +-797,-831,-865,-898,-932,-965,-997,-1030,-1062,-1094,-1126,-1158,-1189,-1220,-1251, +-1282,-1312,-1343,-1373,-1402,-1432,-1461,-1490,-1519,-1547,-1575,-1603,-1631,-1659, +-1686,-1713,-1739,-1766,-1792,-1818,-1844,-1869,-1894,-1919,-1944,-1968,-1992,-2016, +-2039,-2063,-2086,-2108,-2131,-2153,-2175,-2196,-2218,-2239,-2259,-2280,-2300,-2320, +-2339,-2359,-2378,-2396,-2415,-2433,-2451,-2469,-2486,-2503,-2520,-2536,-2552,-2568, +-2584,-2599,-2614,-2629,-2644,-2658,-2672,-2686,-2699,-2712,-2725,-2738,-2750,-2762, +-2774,-2786,-2797,-2808,-2819,-2829,-2840,-2850,-2860,-2869,-2878,-2888,-2896,-2905, +-2914,-2922,-2930,-2938,-2945,-2953,-2960,-2967,-2973,-2980,-2986,-2992,-2998,-3004, +-3010,-3015,-3020,-3026,-3030,-3035,-3040,-3044,-3048,-3053,-3057,-3060,-3064,-3068, +-3071,-3074,-3077,-3080,-3083,-3086,-3089,-3091,-3094,-3096,-3098,-3100,-3102,-3104, +-3106,-3108,-3109,-3111,-3112,-3113,-3115,-3116,-3117,-3118,-3119,-3120,-3120,-3121, +-3122,-3122,-3123,-3123,-3123,-3124,-3124,-3124,-3124,-3124,-3124,-3124,-3124,-3123, +-3123,-3123,-3122,-3122,-3121,-3121,-3120,-3120,-3119,-3118,-3117,-3116,-3115,-3114, +-3113,-3112,-3111,-3110,-3108,-3107,-3105,-3104,-3102,-3101,-3099,-3097,-3096,-3094, +-3092,-3090,-3088,-3086,-3083,-3081,-3079,-3076,-3074,-3071,-3069,-3066,-3063,-3061, +-3058,-3055,-3052,-3049,-3045,-3042,-3039,-3035,-3032,-3028,-3025,-3021,-3017,-3013, +-3010,-3005,-3001,-2997,-2993,-2989,-2984,-2980,-2975,-2971,-2966,-2961,-2956,-2951, +-2946,-2941,-2936,-2931,-2925,-2920,-2915,-2909,-2903,-2898,-2892,-2886,-2880,-2874, +-2868,-2862,-2856,-2850,-2843,-2837,-2830,-2824,-2817,-2811,-2804,-2797,-2791,-2784, +-2777,-2770,-2763,-2756,-2749,-2742,-2734,-2727,-2720,-2713,-2705,-2698,-2690,-2683, +-2675,-2668,-2660,-2653,-2645,-2637,-2630,-2622,-2614,-2606,-2599,-2591,-2583,-2575, +-2567,-2559,-2551,-2544,-2536,-2528,-2520,-2512,-2504,-2496,-2488,-2480,-2472,-2464, +-2456,-2448,-2440,-2432,-2424,-2416,-2408,-2400,-2392,-2384,-2376,-2368,-2360,-2352, +-2344,-2336,-2328,-2321,-2313,-2305,-2297,-2289,-2281,-2273,-2266,-2258,-2250,-2242, +-2234,-2227,-2219,-2211,-2203,-2196,-2188,-2180,-2172,-2165,-2157,-2149,-2142,-2134, +-2127,-2119,-2111,-2104,-2096,-2089,-2081,-2074,-2066,-2059,-2051,-2044,-2036,-2029, +-2021,-2014,-2006,-1999,-1991,-1984,-1976,-1969,-1962,-1954,-1947,-1939,-1932,-1925, +-1917,-1910,-1902,-1895,-1888,-1880,-1873,-1865,-1858,-1851,-1843,-1836,-1829,-1821, +-1814,-1806,-1799,-1792,-1784,-1777,-1770,-1762,-1755,-1747,-1740,-1733,-1725,-1718, +-1711,-1703,-1696,-1689,-1681,-1674,-1667,-1659,-1652,-1644,-1637,-1630,-1622,-1615, +-1608,-1600,-1593,-1586,-1578,-1571,-1564,-1556,-1549,-1542,-1535,-1527,-1520,-1513, +-1506,-1498,-1491,-1484,-1477,-1469,-1462,-1455,-1448,-1441,-1433,-1426,-1419,-1412, +-1405,-1398,-1391,-1384,-1377,-1370,-1363,-1356,-1349,-1342,-1335,-1328,-1321,-1314, +-1307,-1300,-1293,-1287,-1280,-1273,-1266,-1260,-1253,-1246,-1240,-1233,-1226,-1220, +-1213,-1207,-1200,-1193,-1187,-1181,-1174,-1168,-1161,-1155,-1149,-1142,-1136,-1130, +-1123,-1117,-1111,-1105,-1099,-1093,-1087,-1081,-1074,-1068,-1062,-1057,-1051,-1045, +-1039,-1033,-1027,-1021,-1015,-1010,-1004,-998,-992,-987,-981,-976,-970,-964,-959, +-953,-948,-942,-937,-931,-926,-920,-915,-910,-904,-899,-894,-888,-883,-878,-873, +-868,-862,-857,-852,-847,-842,-837,-832,-827,-822,-817,-812,-807,-802,-797,-792, +-787,-782,-777,-772,-768,-763,-758,-753,-748,-744,-739,-734,-729,-725,-720,-715, +-711,-706,-702,-697,-692,-688,-683,-679,-674,-670,-665,-661,-657,-652,-648,-643, +-639,-635,-630,-626,-622,-617,-613,-609,-605,-600,-596,-592,-588,-584,-579,-575, +-571,-567,-563,-559,-555,-551,-547,-543,-539,-535,-531,-527,-523,-519,-516,-512, +-508,-504,-500,-497,-493,-489,-485,-482,-478,-474,-471,-467,-463,-460,-456,-453, +-449,-446,-442,-439,-435,-432,-428,-425,-422,-418,-415,-412,-408,-405,-402,-399, +-395,-392,-389,-386,-383,-379,-376,-373,-370,-367,-364,-361,-358,-355,-352,-349, +-346,-343,-340,-338,-335,-332,-329,-326,-323,-321,-318,-315,-312,-310,-307,-304, +-302,-299,-296,-294,-291,-289,-286,-283,-281,-278,-276,-273,-271,-268,-266,-264, +-261,-259,-256,-254,-252,-249,-247,-245,-242,-240,-238,-236,-233,-231,-229,-227, +-224,-222,-220,-218,-216,-214,-212,-209,-207,-205,-203,-201,-199,-197,-195,-193, +-191,-189,-187,-185,-183,-181,-180,-178,-176,-174,-172,-170,-168,-166,-165,-163, +-161,-159,-157,-156,-154,-152,-151,-149,-147,-145,-144,-142,-140,-139,-137,-136, +-134,-132,-131,-129,-128,-126,-124,-123,-121,-120,-118,-117,-115,-114,-113,-111, +-110,-108,-107,-105,-104,-103,-101,-100,-99,-97,-96,-95,-93,-92,-91,-89,-88,-87,-86, +-84,-83,-82,-81,-80,-78,-77,-76,-75,-74,-73,-71,-70,-69,-68,-67,-66,-65,-64,-63, +-62,-61,-60,-59,-58,-57,-56,-55,-54,-53,-52,-51,-50,-49,-48,-47,-46,-46,-45,-44, +-43,-42,-41,-40,-40,-39,-38,-37,-36,-36,-35,-34,-33,-32,-32,-31,-30,-30,-29,-28, +-27,-27,-26,-25,-25,-24,-23,-23,-22,-21,-21,-20,-19,-19,-18,-18,-17,-16,-16,-15, +-15,-14,-14,-13,-12,-12,-11,-11,-10,-10,-9,-9,-8,-8,-7,-7,-6,-6,-5,-5,-5,-4,-4,-3, +-3,-2,-2,-1,-1,-1,0,0,0,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9, +10,10,10,10,11,11,11,11,11,12,12,12,12,12,13,13,13,13,13,14,14,14,14,14,14,14,15, +15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17, +17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +18,18,18,18,18,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16,16, +16,16,16,16,16,16,16,16,16,16,16,15,15,15,15,15,15,15,15,15,15,14,14,14,14,14,14, +14,14,14,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,11,11,11,11,11,11,11,10, +10,10,10,10,10,10,9,9,9,9,9,9,8,8,8,8,8,8,8,7,7,7,7,7,7,6,6,6,6,6,6,5,5,5,5,5,5,4, +4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,1,1,0,0,0, }, { -131072,131070,131067,131063,131059,131055,131049,131043,131036,131029,131020, -131010,131000,130988,130975,130960,130945,130928,130909,130889,130867,130843,130818, -130790,130760,130729,130694,130658,130619,130577,130533,130486,130435,130382,130325, -130265,130201,130134,130063,129987,129908,129824,129736,129644,129546,129444,129337, -129224,129106,128982,128853,128718,128576,128429,128275,128114,127946,127771,127590, -127400,127203,126999,126786,126566,126337,126099,125853,125598,125333,125060,124777, -124484,124182,123869,123546,123213,122869,122515,122149,121773,121385,120986,120575, -120152,119717,119271,118812,118340,117856,117359,116850,116327,115792,115243,114681, -114105,113516,112913,112296,111665,111021,110362,109690,109003,108302,107587,106857, -106113,105355,104583,103796,102994,102178,101348,100504,99645,98772,97884,96983,96067, -95137,94194,93236,92265,91280,90281,89270,88245,87207,86156,85092,84016,82927,81826, -80713,79589,78453,77306,76148,74979,73800,72610,71411,70202,68983,67756,66520,65276, -64024,62765,61498,60224,58944,57658,56366,55069,53767,52460,51150,49836,48518,47199, -45876,44553,43227,41901,40575,39249,37923,36598,35275,33954,32636,31321,30009,28701, -27398,26100,24807,23521,22241,20969,19704,18447,17199,15960,14731,13512,12303,11106, -9920,8747,7586,6438,5304,4184,3078,1988,912,-147,-1190,-2216,-3225,-4217,-5190, --6146,-7082,-7999,-8897,-9775,-10633,-11471,-12287,-13082,-13856,-14609,-15339, --16047,-16732,-17395,-18035,-18652,-19245,-19815,-20361,-20884,-21382,-21857,-22307, --22733,-23135,-23513,-23866,-24194,-24498,-24778,-25034,-25265,-25471,-25654,-25812, --25947,-26057,-26144,-26208,-26247,-26264,-26257,-26228,-26176,-26102,-26006,-25887, --25748,-25587,-25405,-25203,-24980,-24738,-24476,-24195,-23896,-23578,-23242,-22889, --22519,-22133,-21730,-21312,-20879,-20431,-19969,-19494,-19006,-18505,-17992,-17468, --16933,-16388,-15833,-15268,-14696,-14115,-13527,-12932,-12331,-11724,-11112,-10496, --9876,-9253,-8627,-7998,-7369,-6738,-6107,-5477,-4847,-4219,-3592,-2969,-2348,-1731, --1119,-511,92,689,1279,1862,2438,3007,3566,4117,4659,5191,5713,6224,6724,7212,7689, -8154,8606,9045,9471,9883,10281,10666,11035,11390,11730,12055,12365,12659,12937, -13199,13445,13675,13888,14085,14265,14429,14576,14707,14820,14917,14998,15061,15108, -15139,15153,15150,15132,15097,15046,14980,14898,14800,14687,14559,14416,14259,14087, -13901,13702,13489,13263,13024,12773,12510,12234,11948,11650,11342,11023,10695,10357, -10010,9655,9291,8920,8541,8156,7764,7366,6963,6555,6142,5725,5305,4881,4455,4027, -3597,3166,2735,2303,1871,1440,1010,582,156,-268,-688,-1106,-1519,-1928,-2332,-2732, --3125,-3513,-3894,-4269,-4637,-4997,-5349,-5693,-6029,-6356,-6674,-6982,-7281,-7569, --7848,-8115,-8373,-8619,-8854,-9078,-9290,-9490,-9679,-9855,-10019,-10171,-10311, --10438,-10553,-10655,-10745,-10821,-10885,-10937,-10976,-11002,-11015,-11016,-11005, --10981,-10945,-10896,-10836,-10764,-10680,-10584,-10477,-10358,-10229,-10088,-9937, --9776,-9605,-9423,-9232,-9032,-8822,-8604,-8377,-8142,-7900,-7649,-7392,-7127,-6856, --6579,-6296,-6008,-5714,-5416,-5113,-4807,-4496,-4183,-3867,-3548,-3227,-2905,-2581, --2256,-1931,-1605,-1280,-956,-632,-310,10,329,645,958,1268,1574,1876,2174,2468,2757, -3041,3319,3591,3857,4117,4370,4617,4856,5088,5312,5528,5736,5936,6127,6310,6483, -6648,6804,6950,7087,7214,7332,7439,7537,7626,7704,7772,7830,7878,7916,7944,7962, -7970,7968,7956,7935,7903,7862,7811,7751,7681,7602,7514,7418,7312,7198,7075,6944, -6805,6658,6504,6342,6173,5997,5815,5626,5431,5230,5023,4811,4594,4373,4147,3916, -3682,3444,3203,2959,2713,2464,2213,1960,1707,1452,1196,940,683,427,172,-83,-336, --588,-839,-1087,-1333,-1576,-1816,-2053,-2287,-2517,-2743,-2964,-3181,-3393,-3601, --3803,-3999,-4190,-4375,-4553,-4726,-4892,-5051,-5204,-5349,-5488,-5619,-5742,-5859, --5967,-6068,-6161,-6246,-6324,-6393,-6454,-6507,-6552,-6589,-6617,-6638,-6650,-6654, --6651,-6639,-6619,-6591,-6555,-6512,-6461,-6402,-6336,-6262,-6181,-6093,-5998,-5897, --5789,-5674,-5553,-5425,-5292,-5153,-5009,-4859,-4704,-4545,-4380,-4211,-4038,-3861, --3680,-3496,-3308,-3118,-2924,-2729,-2531,-2331,-2129,-1926,-1722,-1516,-1310,-1104, --898,-692,-486,-280,-76,127,329,529,727,923,1117,1308,1496,1681,1862,2041,2215,2386, -2552,2714,2872,3025,3173,3316,3454,3586,3713,3835,3951,4060,4164,4262,4353,4439, -4518,4590,4656,4716,4769,4815,4854,4887,4914,4933,4946,4952,4952,4945,4931,4911, -4884,4851,4812,4766,4715,4657,4593,4523,4448,4366,4280,4188,4091,3988,3881,3769, -3653,3532,3407,3277,3144,3008,2867,2724,2577,2427,2275,2120,1963,1804,1643,1480, -1316,1151,985,818,650,483,315,147,-21,-188,-354,-519,-683,-846,-1007,-1166,-1323, --1478,-1631,-1781,-1928,-2073,-2214,-2352,-2487,-2618,-2746,-2869,-2988,-3104,-3215, --3321,-3423,-3521,-3613,-3701,-3784,-3862,-3934,-4002,-4064,-4121,-4172,-4219,-4259, --4295,-4324,-4349,-4367,-4381,-4389,-4391,-4388,-4379,-4365,-4346,-4322,-4292,-4257, --4217,-4172,-4122,-4067,-4007,-3943,-3874,-3800,-3723,-3641,-3555,-3465,-3371,-3274, --3173,-3068,-2961,-2850,-2737,-2620,-2501,-2380,-2256,-2131,-2003,-1874,-1743,-1610, --1477,-1343,-1207,-1071,-935,-798,-661,-525,-388,-252,-117,18,152,284,416,546,674, -800,925,1047,1167,1285,1400,1513,1622,1729,1833,1933,2031,2124,2215,2301,2384,2463, -2538,2609,2677,2739,2798,2853,2903,2949,2990,3027,3060,3088,3111,3131,3145,3155, -3161,3162,3159,3151,3139,3122,3101,3076,3047,3013,2975,2934,2888,2839,2785,2728, -2668,2604,2536,2465,2391,2314,2234,2151,2066,1977,1887,1794,1698,1601,1502,1401, -1298,1194,1089,982,874,766,656,546,436,325,214,103,-7,-118,-228,-338,-446,-554,-661, --767,-872,-975,-1077,-1177,-1275,-1371,-1465,-1557,-1647,-1735,-1820,-1902,-1982, --2059,-2134,-2205,-2273,-2338,-2400,-2459,-2515,-2567,-2616,-2661,-2703,-2741,-2776, --2807,-2835,-2859,-2879,-2895,-2908,-2918,-2923,-2925,-2924,-2918,-2910,-2897,-2881, --2862,-2839,-2813,-2784,-2751,-2715,-2676,-2633,-2588,-2540,-2489,-2435,-2379,-2320, --2258,-2194,-2128,-2059,-1988,-1916,-1841,-1765,-1687,-1607,-1526,-1444,-1360,-1276, --1190,-1104,-1016,-928,-840,-751,-662,-573,-484,-395,-306,-218,-130,-43,44,130,215, -299,382,463,543,622,699,775,849,921,991,1059,1125,1189,1251,1310,1367,1422,1474, -1524,1571,1615,1657,1696,1732,1765,1795,1823,1848,1870,1888,1904,1917,1928,1935, -1939,1940,1939,1934,1927,1917,1904,1888,1870,1849,1825,1798,1769,1738,1704,1668, -1629,1588,1545,1500,1452,1403,1352,1299,1244,1188,1130,1071,1010,948,884,820,755, -688,621,553,485,415,346,276,206,136,65,-5,-75,-145,-215,-284,-352,-421,-488,-554, --620,-685,-749,-811,-873,-933,-992,-1049,-1105,-1159,-1212,-1263,-1312,-1359,-1405, --1448,-1490,-1530,-1567,-1603,-1636,-1667,-1696,-1723,-1747,-1769,-1789,-1806,-1822, --1835,-1845,-1853,-1859,-1863,-1864,-1863,-1859,-1853,-1845,-1835,-1822,-1808,-1791, --1772,-1751,-1727,-1702,-1675,-1646,-1615,-1582,-1548,-1511,-1473,-1434,-1392,-1350, --1306,-1261,-1214,-1166,-1117,-1067,-1016,-964,-911,-857,-803,-748,-693,-637,-580, --524,-467,-410,-352,-295,-238,-181,-124,-68,-12,44,99,154,208,261,314,365,416,466, -514,562,609,654,698,741,782,822,861,898,934,968,1000,1031,1060,1088,1114,1138,1160, -1181,1200,1217,1232,1245,1257,1267,1275,1281,1285,1287,1288,1287,1284,1280,1273, -1265,1256,1244,1231,1217,1200,1183,1163,1143,1121,1097,1072,1046,1018,990,960,929, -897,864,830,795,760,723,686,648,610,571,531,491,450,410,369,327,286,245,203,161, -120,79,38,-3,-44,-84,-124,-163,-202,-240,-278,-315,-351,-387,-422,-456,-489,-521, --552,-582,-611,-639,-666,-692,-717,-741,-763,-784,-804,-823,-840,-856,-871,-885, --897,-908,-917,-926,-932,-938,-942,-945,-947,-947,-946,-943,-940,-935,-929,-921, --913,-903,-892,-880,-867,-852,-837,-820,-803,-785,-765,-745,-724,-702,-680,-656, --632,-607,-582,-556,-529,-502,-475,-447,-419,-390,-361,-332,-302,-273,-243,-213, --184,-154,-124,-95,-65,-36,-7,22,51,79,107,134,161,187,213,239,263,288,311,334,356, -378,398,418,437,456,473,490,506,520,534,547,559,571,581,590,598,606,612,617,622, -625,628,629,630,629,628,626,623,618,613,608,601,593,585,576,566,555,543,531,518, -504,490,475,459,443,427,409,392,374,355,336,317,297,277,257,236,216,195,174,153, -132,110,89,68,47,26,5,-16,-37,-58,-78,-98,-118,-137,-156,-175,-193,-211,-229,-246, --263,-279,-294,-310,-324,-338,-351,-364,-376,-388,-399,-409,-419,-428,-436,-443, --450,-457,-462,-467,-471,-474,-477,-479,-480,-481,-481,-480,-479,-477,-474,-470, --466,-462,-456,-451,-444,-437,-429,-421,-413,-403,-394,-384,-373,-362,-350,-339, --326,-314,-301,-288,-274,-260,-246,-232,-218,-203,-189,-174,-159,-144,-129,-114,-98, --83,-68,-53,-38,-24,-9,6,20,34,48,62,75,88,101,114,126,138,150,161,172,183,193,203, -212,221,229,237,244,251,258,264,270,275,279,283,287,290,292,294,296,297,298,298, -297,296,295,293,291,288,285,281,277,272,267,262,256,250,244,237,230,222,214,206, -198,189,180,171,162,152,143,133,123,113,102,92,81,71,60,50,39,28,18,7,-3,-14,-24, --35,-45,-55,-65,-74,-84,-93,-103,-112,-120,-129,-137,-145,-153,-161,-168,-175,-181, --188,-194,-199,-205,-210,-215,-219,-223,-227,-230,-233,-235,-238,-239,-241,-242, --243,-243,-243,-243,-242,-242,-240,-239,-237,-234,-232,-229,-226,-222,-219,-214, --210,-206,-201,-196,-191,-185,-179,-173,-167,-161,-155,-148,-141,-135,-128,-121, --114,-106,-99,-92,-84,-77,-70,-62,-55,-47,-40,-33,-25,-18,-11,-4,3,10,17,23,30,36, -42,48,54,60,65,70,75,80,85,89,94,98,101,105,108,111,114,117,119,121,123,124,126, -127,127,128,128,128,128,128,127,126,125,123,122,120,118,116,113,111,108,105,102,98, -95,91,87,83,79,75,70,66,61,57,52,47,42,37,32,27,22,17,12,7,2,-4,-9,-14,-19,-24, --29,-34,-38,-43,-48,-52,-57,-61,-66,-70,-74,-78,-81,-85,-89,-92,-95,-98,-101,-104, --107,-109,-111,-113,-115,-117,-118,-120,-121,-122,-123,-124,-124,-124,-125,-125, --124,-124,-124,-123,-122,-121,-120,-118,-117,-115,-114,-112,-110,-107,-105,-103, --100,-98,-95,-92,-89,-86,-83,-80,-77,-73,-70,-67,-63,-60,-56,-53,-49,-45,-42,-38, --35,-31,-28,-24,-21,-17,-14,-10,-7,-4,-1,2,5,8,11,14,17,20,22,24,27,29,31,33,35,37, -38,40,41,43,44,45,46,46,47,47,48,48,48,48,48,48,47,47,46,46,45,44,43,41,40,39,37, -36,34,32,30,28,26,24,22,20,17,15,13,10,8,5,3,0,-2,-5,-8,-10,-13,-15,-18,-21,-23, --26,-28,-31,-33,-35,-38,-40,-42,-44,-47,-49,-50,-52,-54,-56,-58,-59,-61,-62,-63, --64,-66,-66,-67,-68,-69,-69,-70,-70,-71,-71,-71,-71,-71,-70,-70,-70,-69,-68,-68, --67,-66,-65,-64,-63,-62,-60,-59,-58,-56,-55,-53,-52,-50,-48,-47,-45,-43,-42,-40, --38,-36,-35,-33,-31,-30,-28,-26,-25,-23,-22,-20,-19,-18,-16,-15,-14,-13,-12,-11, --10,-9,-8,-7,-7,-6,-6,-5,-5,-4,-4,-4,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2, --2,-2,-2,-2,-1,-1,-1,0,0,0,1,1,2,2,2,3,3,3,3,3,3,2,0, +131072,131072,131072,131072,131072,131072,131072,131072,131071,131071,131071, +131071,131071,131070,131070,131070,131069,131069,131068,131068,131067,131066,131066, +131065,131064,131063,131061,131060,131058,131057,131055,131053,131051,131048,131046, +131043,131040,131037,131033,131029,131025,131021,131016,131011,131005,130999,130993, +130986,130978,130970,130962,130953,130943,130933,130922,130910,130897,130884,130870, +130855,130839,130822,130804,130785,130765,130744,130721,130697,130672,130646,130618, +130589,130558,130525,130491,130455,130417,130377,130336,130292,130246,130198,130147, +130095,130039,129982,129921,129858,129792,129723,129651,129576,129497,129416,129330, +129242,129149,129053,128953,128849,128741,128628,128512,128390,128265,128134,127998, +127858,127712,127561,127405,127243,127076,126903,126723,126538,126346,126148,125944, +125733,125515,125290,125058,124818,124572,124317,124055,123785,123508,123222,122927, +122624,122313,121993,121664,121326,120978,120622,120255,119880,119494,119099,118693, +118278,117852,117415,116968,116510,116042,115562,115072,114570,114057,113532,112996, +112448,111889,111317,110734,110139,109532,108912,108280,107636,106980,106311,105630, +104936,104229,103510,102778,102034,101276,100506,99724,98928,98120,97299,96466,95620, +94761,93889,93005,92109,91200,90279,89345,88400,87442,86472,85490,84497,83492,82475, +81447,80408,79358,78297,77225,76142,75050,73947,72834,71712,70580,69439,68289,67130, +65963,64787,63604,62413,61215,60009,58797,57578,56354,55123,53887,52646,51401,50151, +48897,47639,46378,45115,43848,42580,41310,40039,38767,37495,36223,34951,33680,32410, +31142,29877,28614,27354,26098,24846,23598,22355,21118,19887,18662,17444,16233,15030, +13835,12649,11472,10304,9147,8001,6865,5741,4629,3529,2442,1368,308,-738,-1769,-2786, +-3787,-4772,-5741,-6693,-7628,-8546,-9447,-10329,-11192,-12037,-12863,-13669,-14455, +-15221,-15967,-16692,-17396,-18079,-18741,-19380,-19998,-20593,-21167,-21717,-22245, +-22750,-23232,-23690,-24126,-24538,-24926,-25291,-25632,-25949,-26243,-26513,-26759, +-26981,-27179,-27354,-27505,-27633,-27737,-27818,-27875,-27910,-27921,-27909,-27875, +-27818,-27739,-27638,-27516,-27371,-27206,-27019,-26812,-26584,-26336,-26069,-25782, +-25476,-25151,-24808,-24448,-24070,-23674,-23263,-22835,-22391,-21933,-21459,-20972, +-20470,-19955,-19428,-18888,-18337,-17775,-17202,-16619,-16027,-15425,-14816,-14199, +-13574,-12943,-12306,-11663,-11016,-10364,-9709,-9051,-8390,-7728,-7064,-6400,-5735, +-5071,-4408,-3747,-3088,-2432,-1779,-1131,-486,153,786,1413,2034,2647,3253,3850,4439, +5018,5587,6147,6696,7233,7759,8274,8776,9265,9741,10204,10652,11087,11507,11912, +12303,12677,13037,13380,13707,14018,14313,14590,14851,15095,15321,15531,15723,15897, +16055,16194,16316,16420,16507,16577,16628,16663,16679,16679,16661,16627,16575,16507, +16422,16320,16203,16069,15920,15755,15575,15380,15170,14946,14708,14456,14191,13913, +13622,13319,13004,12678,12340,11992,11633,11265,10887,10501,10106,9703,9292,8875, +8451,8021,7585,7145,6699,6250,5797,5341,4883,4422,3960,3497,3033,2570,2106,1644, +1183,724,268,-186,-636,-1082,-1524,-1961,-2393,-2820,-3240,-3654,-4061,-4460,-4852, +-5236,-5611,-5977,-6334,-6682,-7019,-7347,-7664,-7970,-8265,-8549,-8822,-9082,-9331, +-9567,-9791,-10002,-10200,-10386,-10558,-10718,-10864,-10997,-11116,-11222,-11314, +-11393,-11458,-11510,-11548,-11573,-11584,-11582,-11566,-11537,-11496,-11441,-11373, +-11293,-11200,-11095,-10978,-10849,-10708,-10556,-10392,-10218,-10032,-9837,-9631, +-9415,-9190,-8955,-8712,-8460,-8200,-7931,-7656,-7373,-7083,-6787,-6485,-6177,-5864, +-5547,-5224,-4898,-4568,-4235,-3899,-3560,-3220,-2878,-2535,-2191,-1847,-1502,-1158, +-816,-474,-134,204,540,872,1202,1528,1849,2167,2480,2788,3091,3388,3678,3963,4241, +4512,4776,5033,5281,5522,5754,5979,6194,6400,6598,6786,6965,7134,7293,7443,7582, +7711,7830,7939,8038,8126,8203,8271,8327,8373,8409,8434,8448,8452,8446,8429,8403, +8366,8319,8262,8195,8119,8033,7938,7834,7721,7599,7469,7330,7183,7028,6865,6695, +6518,6334,6143,5946,5743,5534,5319,5100,4875,4646,4412,4175,3934,3689,3442,3192, +2940,2685,2429,2172,1913,1654,1394,1135,875,616,359,102,-153,-406,-657,-906,-1152, +-1394,-1634,-1870,-2101,-2329,-2552,-2771,-2985,-3193,-3396,-3594,-3785,-3971,-4150, +-4323,-4490,-4649,-4802,-4947,-5086,-5217,-5340,-5456,-5564,-5665,-5757,-5842,-5919, +-5987,-6048,-6101,-6145,-6181,-6209,-6229,-6241,-6245,-6241,-6229,-6210,-6182,-6147, +-6104,-6053,-5996,-5930,-5858,-5779,-5693,-5600,-5501,-5395,-5283,-5165,-5041,-4911, +-4777,-4637,-4491,-4341,-4187,-4028,-3865,-3699,-3528,-3354,-3177,-2998,-2815,-2630, +-2444,-2255,-2064,-1872,-1680,-1486,-1292,-1097,-902,-708,-513,-320,-127,64,254,442, +629,813,995,1174,1351,1525,1695,1862,2026,2185,2341,2493,2640,2783,2921,3054,3183, +3306,3424,3537,3645,3746,3843,3933,4018,4097,4170,4237,4298,4353,4402,4445,4482, +4512,4536,4555,4567,4573,4573,4566,4554,4537,4513,4483,4448,4407,4361,4309,4252, +4190,4122,4050,3973,3891,3805,3714,3619,3520,3417,3310,3200,3086,2969,2849,2726, +2600,2472,2341,2209,2074,1938,1800,1660,1520,1378,1236,1093,950,806,663,520,377,235, +93,-48,-187,-325,-462,-597,-730,-862,-991,-1118,-1242,-1364,-1483,-1599,-1712, +-1822,-1929,-2032,-2132,-2228,-2320,-2409,-2494,-2575,-2651,-2724,-2792,-2856,-2916, +-2971,-3022,-3069,-3111,-3148,-3181,-3210,-3234,-3253,-3268,-3278,-3284,-3285,-3282, +-3275,-3263,-3247,-3227,-3202,-3174,-3141,-3104,-3064,-3019,-2971,-2919,-2864,-2805, +-2743,-2678,-2610,-2539,-2464,-2387,-2308,-2226,-2142,-2055,-1966,-1876,-1783,-1689, +-1594,-1497,-1399,-1299,-1199,-1098,-996,-894,-791,-689,-586,-483,-380,-278,-176,-75, +26,126,224,322,418,513,606,698,788,877,963,1047,1129,1209,1287,1362,1434,1504, +1572,1637,1698,1757,1814,1867,1917,1964,2008,2049,2086,2121,2152,2180,2205,2227, +2245,2260,2272,2280,2286,2288,2287,2283,2276,2265,2252,2236,2216,2194,2169,2142, +2111,2078,2042,2004,1963,1921,1875,1828,1778,1727,1673,1618,1561,1502,1442,1380, +1317,1253,1187,1120,1053,984,915,846,775,705,633,562,491,419,348,277,206,135,65,-5, +-74,-142,-209,-276,-341,-406,-469,-531,-592,-651,-709,-765,-820,-873,-924,-974, +-1021,-1067,-1111,-1153,-1193,-1231,-1267,-1301,-1332,-1362,-1389,-1414,-1437,-1457, +-1476,-1492,-1505,-1517,-1526,-1534,-1538,-1541,-1542,-1540,-1536,-1530,-1522,-1512, +-1500,-1486,-1470,-1452,-1432,-1410,-1387,-1362,-1335,-1306,-1276,-1245,-1212,-1178, +-1142,-1105,-1067,-1028,-987,-946,-904,-861,-817,-772,-727,-681,-635,-588,-541,-494, +-446,-399,-351,-303,-255,-208,-160,-113,-66,-20,26,72,117,161,205,248,290,331,371, +411,449,486,523,558,592,624,656,686,715,743,769,794,817,839,860,879,897,913,928, +941,953,963,972,979,985,989,992,993,993,992,989,984,979,972,963,954,943,931,917, +903,887,870,852,833,813,792,771,748,724,700,675,649,623,596,568,540,512,483,453, +424,394,363,333,302,272,241,210,180,149,119,88,58,28,-1,-30,-59,-88,-115,-143,-170, +-196,-222,-247,-272,-296,-319,-341,-363,-384,-404,-423,-441,-459,-476,-491,-506, +-520,-533,-545,-557,-567,-576,-584,-592,-598,-604,-608,-612,-614,-616,-617,-616, +-615,-613,-610,-607,-602,-597,-591,-583,-576,-567,-558,-548,-537,-526,-514,-501, +-488,-474,-460,-445,-430,-414,-398,-382,-365,-347,-330,-312,-294,-276,-257,-239, +-220,-201,-182,-163,-144,-126,-107,-88,-69,-51,-32,-14,4,22,39,56,73,90,106,122,137, +152,167,181,195,208,221,233,245,257,267,277,287,296,305,313,320,327,333,339,344, +348,352,355,358,360,362,363,363,363,362,361,359,357,354,351,347,343,338,333,327, +321,315,308,301,293,285,277,268,259,250,241,231,221,211,201,190,180,169,158,147, +136,125,114,103,91,80,69,58,47,36,25,15,4,-7,-17,-27,-37,-47,-56,-66,-75,-84,-92, +-101,-109,-117,-124,-131,-138,-145,-151,-157,-163,-168,-173,-178,-182,-186,-189, +-193,-196,-198,-200,-202,-204,-205,-206,-206,-206,-206,-206,-205,-204,-203,-201, +-199,-197,-194,-191,-188,-185,-181,-178,-174,-169,-165,-160,-155,-150,-145,-140, +-135,-129,-123,-117,-111,-105,-99,-93,-87,-81,-74,-68,-62,-55,-49,-43,-36,-30,-24, +-18,-12,-6,0,6,12,18,23,29,34,39,44,49,54,58,63,67,71,75,79,82,86,89,92,95,97,100, +102,104,106,107,109,110,111,112,112,113,113,113,113,113,112,112,111,110,109,107, +106,104,103,101,99,97,94,92,89,87,84,81,78,75,72,69,66,63,60,56,53,50,46,43,39,36, +32,29,25,22,18,15,12,8,5,2,-1,-5,-8,-11,-14,-17,-19,-22,-25,-27,-30,-32,-35,-37, +-39,-41,-43,-45,-46,-48,-50,-51,-52,-53,-54,-55,-56,-57,-58,-58,-59,-59,-59,-59, +-59,-59,-59,-59,-58,-58,-57,-57,-56,-55,-54,-54,-53,-51,-50,-49,-48,-46,-45,-44, +-42,-41,-39,-37,-36,-34,-32,-31,-29,-27,-25,-23,-22,-20,-18,-16,-14,-12,-11,-9,-7, +-5,-4,-2,0,1,3,5,6,8,9,11,12,13,15,16,17,18,19,20,21,22,23,24,25,25,26,27,27,28, +28,29,29,29,29,29,30,30,30,30,29,29,29,29,29,28,28,27,27,27,26,25,25,24,24,23,22, +21,21,20,19,18,17,16,16,15,14,13,12,11,10,9,8,7,7,6,5,4,3,2,1,0,0,-1,-2,-3,-3,-4, +-5,-6,-6,-7,-7,-8,-9,-9,-10,-10,-11,-11,-11,-12,-12,-12,-13,-13,-13,-13,-14,-14, +-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-14,-13,-13,-13,-13,-13,-12,-12,-12,-11, +-11,-11,-10,-10,-10,-9,-9,-9,-8,-8,-7,-7,-6,-6,-6,-5,-5,-4,-4,-3,-3,-3,-2,-2,-1,-1, +-1,0,0,1,1,1,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,5,5,5,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,-1, +-1,-1,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-3,-3,-3,-3,-3,-3, +-3,-3,-3,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-1,-1,-1,-1,-1,-1, +-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }, };