From: Toni Wilen Date: Tue, 10 Jul 2012 10:49:13 +0000 (+0300) Subject: 2420b6 X-Git-Tag: 2500~25 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=37d1014ee58f7d7e88b40a708e5872184284ce01;p=francis%2Fwinuae.git 2420b6 --- diff --git a/autoconf.cpp b/autoconf.cpp index c34dde6c..5285526e 100644 --- a/autoconf.cpp +++ b/autoconf.cpp @@ -223,7 +223,7 @@ static uae_u32 REGPARAM2 uae_puts (TrapContext *context) void rtarea_init_mem (void) { - rtarea = mapped_malloc (0x10000, _T("rtarea")); + rtarea = mapped_malloc (RTAREA_SIZE, _T("rtarea")); if (!rtarea) { write_log (_T("virtual memory exhausted (rtarea)!\n")); abort (); @@ -242,7 +242,7 @@ void rtarea_init (void) init_traps (); rtarea_init_mem (); - memset (rtarea, 0, 0x10000); + memset (rtarea, 0, RTAREA_SIZE); _stprintf (uaever, _T("uae-%d.%d.%d"), UAEMAJOR, UAEMINOR, UAESUBREV); @@ -256,7 +256,7 @@ void rtarea_init (void) dw (0); dw (0); - a = here(); + a = here (); /* Dummy trap - removing this breaks the filesys emulation. */ org (rtarea_base + 0xFF00); calltrap (deftrap2 (nullfunc, TRAPFLAG_NO_RETVAL, _T(""))); @@ -273,11 +273,18 @@ void rtarea_init (void) #ifdef FILESYS filesys_install_code (); #endif + + uae_boot_rom_size = here () - rtarea_base; + if (uae_boot_rom_size >= RTAREA_TRAPS) { + write_log (_T("RTAREA_TRAPS needs to be increased!")); + abort (); + } + #ifdef PICASSO96 - uaegfx_install_code (); + uaegfx_install_code (rtarea_base + RTAREA_RTG); #endif - uae_boot_rom_size = here() - rtarea_base; + org (RTAREA_TRAPS); init_extended_traps (); } diff --git a/blkdev_cdimage.cpp b/blkdev_cdimage.cpp index 3a97fc96..bb9f096f 100644 --- a/blkdev_cdimage.cpp +++ b/blkdev_cdimage.cpp @@ -675,7 +675,9 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int struct cdunit *cdu = unitisopen (unitnum); if (!cdu) return 0; + int asector = sector; struct cdtoc *t = findtoc (cdu, §or); + int ssize = t->size + t->skipsize; if (!t || t->handle == NULL) goto end; @@ -686,44 +688,51 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int // 2048 -> 2352 while (size-- > 0) { memset (data, 0, 16); - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize, SEEK_SET); zfile_fread (data + 16, t->size, 1, t->handle); encode_l2 (data, sector + 150); sector++; + asector++; data += sectorsize; + ret += sectorsize; } } else if (sectorsize == 2048 && t->size == 2352) { // 2352 -> 2048 while (size-- > 0) { uae_u8 b = 0; - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 15, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 15, SEEK_SET); zfile_fread (&b, 1, 1, t->handle); if (b == 2) // MODE2? - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 24, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 24, SEEK_SET); zfile_fread (data, sectorsize, 1, t->handle); sector++; + asector++; data += sectorsize; + ret += sectorsize; } } else if (sectorsize == 2336 && t->size == 2352) { // 2352 -> 2336 while (size-- > 0) { uae_u8 b = 0; - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 15, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 15, SEEK_SET); zfile_fread (&b, 1, 1, t->handle); if (b != 2 && b != 0) // MODE0 or MODE2 only allowed return 0; zfile_fread (data, sectorsize, 1, t->handle); sector++; + asector++; data += sectorsize; + ret += sectorsize; } } else if (sectorsize == t->size) { // no change - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize, SEEK_SET); zfile_fread (data, sectorsize, size, t->handle); sector += size; + asector += size; + ret = size; } - cdu->cd_last_pos = sector; - ret = sectorsize * size; + cdu->cd_last_pos = asector; } else { @@ -750,7 +759,7 @@ static int command_rawread (int unitnum, uae_u8 *data, int sector, int size, int goto end; } for (int i = 0; i < size; i++) { - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize, SEEK_SET); zfile_fread (data, t->size, 1, t->handle); uae_u8 *p = data + t->size; if (subs) { @@ -785,24 +794,25 @@ static int command_read (int unitnum, uae_u8 *data, int sector, int size) return 0; struct cdtoc *t = findtoc (cdu, §or); + int ssize = t->size + t->skipsize; if (!t || t->handle == NULL) return 0; cdda_stop (cdu); if (t->size == 2048) { - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize, SEEK_SET); zfile_fread (data, size, 2048, t->handle); sector += size; } else { while (size-- > 0) { if (t->size == 2352) { uae_u8 b = 0; - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 15, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 15, SEEK_SET); zfile_fread (&b, 1, 1, t->handle); if (b == 2) // MODE2? - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 24, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 24, SEEK_SET); } else { - zfile_fseek (t->handle, t->offset + (uae_u64)sector * t->size + 16, SEEK_SET); + zfile_fseek (t->handle, t->offset + (uae_u64)sector * ssize + 16, SEEK_SET); } zfile_fread (data, 1, 2048, t->handle); data += 2048; @@ -1044,6 +1054,9 @@ static int parsemds (struct cdunit *cdu, struct zfile *zmds, const TCHAR *img) t->offset = tb->start_offset; t->size = tb->sector_size; + if (point >= 100) + continue; + if (footer) { TCHAR *fname = NULL; if (footer->widechar_filename == 0) @@ -1072,10 +1085,9 @@ static int parsemds (struct cdunit *cdu, struct zfile *zmds, const TCHAR *img) t->subhandle = zfile_dup (t->handle); t->skipsize = SUB_CHANNEL_SIZE; t->size -= SUB_CHANNEL_SIZE; - if ((t->ctrl & 0x0c) != 4) - t->enctype = AUDENC_PCM; } - + if ((t->ctrl & 0x0c) != 4) + t->enctype = AUDENC_PCM; } } diff --git a/cfgfile.cpp b/cfgfile.cpp index 1a986f98..866d4877 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -803,11 +803,10 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write (f, _T("gfx_display"), _T("%d"), p->gfx_apmode[APMODE_NATIVE].gfx_display); cfgfile_write_str (f, _T("gfx_display_friendlyname"), target_get_display_name (p->gfx_apmode[APMODE_NATIVE].gfx_display, true)); cfgfile_write_str (f, _T("gfx_display_name"), target_get_display_name (p->gfx_apmode[APMODE_NATIVE].gfx_display, false)); - if (p->gfx_apmode[APMODE_NATIVE].gfx_display != p->gfx_apmode[APMODE_RTG].gfx_display) { - cfgfile_write (f, _T("gfx_display_rtg"), _T("%d"), p->gfx_apmode[APMODE_RTG].gfx_display); - cfgfile_write_str (f, _T("gfx_display_friendlyname_rtg"), target_get_display_name (p->gfx_apmode[APMODE_RTG].gfx_display, true)); - cfgfile_write_str (f, _T("gfx_display_name_rtg"), target_get_display_name (p->gfx_apmode[APMODE_RTG].gfx_display, false)); - } + cfgfile_write (f, _T("gfx_display_rtg"), _T("%d"), p->gfx_apmode[APMODE_RTG].gfx_display); + cfgfile_write_str (f, _T("gfx_display_friendlyname_rtg"), target_get_display_name (p->gfx_apmode[APMODE_RTG].gfx_display, true)); + cfgfile_write_str (f, _T("gfx_display_name_rtg"), target_get_display_name (p->gfx_apmode[APMODE_RTG].gfx_display, false)); + cfgfile_write (f, _T("gfx_framerate"), _T("%d"), p->gfx_framerate); cfgfile_write (f, _T("gfx_width"), _T("%d"), p->gfx_size_win.width); /* compatibility with old versions */ cfgfile_write (f, _T("gfx_height"), _T("%d"), p->gfx_size_win.height); /* compatibility with old versions */ @@ -825,8 +824,8 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write (f, _T("gfx_backbuffers"), _T("%d"), p->gfx_apmode[0].gfx_backbuffers); cfgfile_write (f, _T("gfx_backbuffers_rtg"), _T("%d"), p->gfx_apmode[1].gfx_backbuffers); - if (p->gfx_apmode[0].gfx_interlaced) - cfgfile_write_bool (f, _T("gfx_interlace"), p->gfx_apmode[0].gfx_interlaced); + if (p->gfx_apmode[APMODE_NATIVE].gfx_interlaced) + cfgfile_write_bool (f, _T("gfx_interlace"), p->gfx_apmode[APMODE_NATIVE].gfx_interlaced); cfgfile_write_str (f, _T("gfx_vsync"), vsyncmodes[p->gfx_apmode[0].gfx_vsync]); cfgfile_write_str (f, _T("gfx_vsyncmode"), vsyncmodes2[p->gfx_apmode[0].gfx_vsyncmode]); cfgfile_write_str (f, _T("gfx_vsync_picasso"), vsyncmodes[p->gfx_apmode[1].gfx_vsync]); @@ -1031,6 +1030,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write (f, _T("bogomem_size"), _T("%d"), p->bogomem_size / 0x40000); cfgfile_write (f, _T("gfxcard_size"), _T("%d"), p->rtgmem_size / 0x100000); cfgfile_write_str (f, _T("gfxcard_type"), rtgtype[p->rtgmem_type]); + cfgfile_write_bool (f, _T("gfxcard_hardware_vblank"), p->rtg_hardwareinterrupt); cfgfile_write (f, _T("chipmem_size"), _T("%d"), p->chipmem_size == 0x20000 ? -1 : (p->chipmem_size == 0x40000 ? 0 : p->chipmem_size / 0x80000)); cfgfile_dwrite (f, _T("megachipmem_size"), _T("%d"), p->z3chipmem_size / 0x100000); @@ -1494,6 +1494,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_intval (option, value, _T("gfx_backbuffers"), &p->gfx_apmode[APMODE_NATIVE].gfx_backbuffers, 1) || cfgfile_intval (option, value, _T("gfx_backbuffers_rtg"), &p->gfx_apmode[APMODE_RTG].gfx_backbuffers, 1) || cfgfile_yesno (option, value, _T("gfx_interlace"), &p->gfx_apmode[APMODE_NATIVE].gfx_interlaced) + || cfgfile_yesno (option, value, _T("gfx_interlace_rtg"), &p->gfx_apmode[APMODE_RTG].gfx_interlaced) || cfgfile_intval (option, value, _T("gfx_center_horizontal_position"), &p->gfx_xcenter_pos, 1) || cfgfile_intval (option, value, _T("gfx_center_vertical_position"), &p->gfx_ycenter_pos, 1) @@ -2243,6 +2244,26 @@ static void parse_addmem (struct uae_prefs *p, TCHAR *buf, int num) p->custom_memory_sizes[num] = size; } +static int get_filesys_controller (const TCHAR *hdc) +{ + int hdcv = HD_CONTROLLER_UAE; + if(_tcslen (hdc) >= 4 && !_tcsncmp (hdc, _T("ide"), 3)) { + hdcv = hdc[3] - '0' + HD_CONTROLLER_IDE0; + if (hdcv < HD_CONTROLLER_IDE0 || hdcv > HD_CONTROLLER_IDE3) + hdcv = 0; + } + if(_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scsi"), 4)) { + hdcv = hdc[4] - '0' + HD_CONTROLLER_SCSI0; + if (hdcv < HD_CONTROLLER_SCSI0 || hdcv > HD_CONTROLLER_SCSI6) + hdcv = 0; + } + if (_tcslen (hdc) >= 6 && !_tcsncmp (hdc, _T("scsram"), 6)) + hdcv = HD_CONTROLLER_PCMCIA_SRAM; + if (_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scide"), 6)) + hdcv = HD_CONTROLLER_PCMCIA_IDE; + return hdcv; +} + static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, bool hdf, TCHAR *value) { int secs, heads, reserved, bs, bp, hdcv; @@ -2306,21 +2327,7 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, bool hdf, TCHA tmpp = _tcschr (tmpp, ','); if (tmpp != 0) { *tmpp++ = 0; - hdc = tmpp; - if(_tcslen (hdc) >= 4 && !_tcsncmp (hdc, _T("ide"), 3)) { - hdcv = hdc[3] - '0' + HD_CONTROLLER_IDE0; - if (hdcv < HD_CONTROLLER_IDE0 || hdcv > HD_CONTROLLER_IDE3) - hdcv = 0; - } - if(_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scsi"), 4)) { - hdcv = hdc[4] - '0' + HD_CONTROLLER_SCSI0; - if (hdcv < HD_CONTROLLER_SCSI0 || hdcv > HD_CONTROLLER_SCSI6) - hdcv = 0; - } - if (_tcslen (hdc) >= 6 && !_tcsncmp (hdc, _T("scsram"), 6)) - hdcv = HD_CONTROLLER_PCMCIA_SRAM; - if (_tcslen (hdc) >= 5 && !_tcsncmp (hdc, _T("scide"), 6)) - hdcv = HD_CONTROLLER_PCMCIA_IDE; + hdcv = get_filesys_controller (tmpp); } } } @@ -2369,6 +2376,26 @@ static int cfgfile_parse_filesys (struct uae_prefs *p, const TCHAR *option, TCHA #endif } return 1; + } else if (!_tcsncmp (option, tmp, _tcslen (tmp)) && option[_tcslen (tmp)] == '_') { + struct uaedev_config_info *uci = &currprefs.mountconfig[i]; + if (uci->devname) { + const TCHAR *s = &option[_tcslen (tmp) + 1]; + if (!_tcscmp (s, _T("bootpri"))) { + getintval (&value, &uci->bootpri, 0); + } else if (!_tcscmp (s, _T("read-only"))) { + cfgfile_yesno (NULL, value, NULL, &uci->readonly); + } else if (!_tcscmp (s, _T("volumename"))) { + _tcscpy (uci->volname, value); + } else if (!_tcscmp (s, _T("devicename"))) { + _tcscpy (uci->devname, value); + } else if (!_tcscmp (s, _T("root"))) { + _tcscpy (uci->rootdir, value); + } else if (!_tcscmp (s, _T("filesys"))) { + _tcscpy (uci->filesys, value); + } else if (!_tcscmp (s, _T("controller"))) { + uci->controller = get_filesys_controller (value); + } + } } } @@ -2421,7 +2448,7 @@ static int cfgfile_parse_filesys (struct uae_prefs *p, const TCHAR *option, TCHA #ifdef FILESYS add_filesys_config (p, -1, NULL, aname, str, ro, secs, heads, reserved, bs, 0, NULL, 0, 0); #endif - free (str); + xfree (str); return 1; invalid_fs: write_log (_T("Invalid filesystem/hardfile specification.\n")); @@ -2499,6 +2526,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH || cfgfile_yesno (option, value, _T("ics_agnus"), &p->cs_dipagnus) || cfgfile_yesno (option, value, _T("agnus_bltbusybug"), &p->cs_agnusbltbusybug) || cfgfile_yesno (option, value, _T("fastmem_autoconfig"), &p->fastmem_autoconfig) + || cfgfile_yesno (option, value, _T("gfxcard_hardware_vblank"), &p->rtg_hardwareinterrupt) || cfgfile_yesno (option, value, _T("kickshifter"), &p->kickshifter) || cfgfile_yesno (option, value, _T("ntsc"), &p->ntscmode) @@ -3752,6 +3780,11 @@ int cmdlineparser (const TCHAR *s, TCHAR *outp[], int max) #define UAELIB_MAX_PARSE 100 +static bool cfgfile_parse_uaelib_option (struct uae_prefs *p, TCHAR *option, TCHAR *value, int type) +{ + return false; +} + uae_u32 cfgfile_modify (uae_u32 index, TCHAR *parms, uae_u32 size, TCHAR *out, uae_u32 outsize) { TCHAR *p; @@ -3874,9 +3907,11 @@ uae_u32 cfgfile_modify (uae_u32 index, TCHAR *parms, uae_u32 size, TCHAR *out, u if (!_tcsicmp (argc[i], _T("dbg"))) { debug_parser (argc[i + 1], out, outsize); } else if (!inputdevice_uaelib (argc[i], argc[i + 1])) { - if (!cfgfile_parse_option (&changed_prefs, argc[i], argc[i + 1], 0)) { - err = 5; - break; + if (!cfgfile_parse_uaelib_option (&changed_prefs, argc[i], argc[i + 1], 0)) { + if (!cfgfile_parse_option (&changed_prefs, argc[i], argc[i + 1], 0)) { + err = 5; + break; + } } } set_special (SPCFLAG_BRK); diff --git a/cia.cpp b/cia.cpp index 3e774e9c..33718d3a 100644 --- a/cia.cpp +++ b/cia.cpp @@ -505,8 +505,8 @@ static void do_tod_hack (int dotod) if (rate <= 0) return; if (rate != oldrate || ciaatod != tod_hack_tod_last) { - if (ciaatod != 0) - //write_log (_T("TOD HACK reset %d,%d %d,%d\n"), rate, oldrate, ciaatod, tod_hack_tod_last); + //if (ciaatod != 0) + // write_log (_T("TOD HACK reset %d,%d %d,%d\n"), rate, oldrate, ciaatod, tod_hack_tod_last); tod_hack_reset (); oldrate = rate; docount = 1; diff --git a/custom.cpp b/custom.cpp index 606474c4..aea397d2 100644 --- a/custom.cpp +++ b/custom.cpp @@ -2858,6 +2858,8 @@ void compute_framesync (void) if (cr->locked == false) { changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate = vblank_hz; cfgfile_parse_lines (&changed_prefs, cr->commands, -1); + if (cr->commands[0]) + write_log (L"CMD1: '%s'\n", cr->commands); break; } else { v = cr->rate; @@ -2868,6 +2870,8 @@ void compute_framesync (void) if (v > 0) { changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate = v; cfgfile_parse_lines (&changed_prefs, cr->commands, -1); + if (cr->commands[0]) + write_log (L"CMD2: '%s'\n", cr->commands); } } else { if (cr->locked == false) @@ -2876,6 +2880,8 @@ void compute_framesync (void) v = cr->rate; changed_prefs.chipset_refreshrate = currprefs.chipset_refreshrate = v; cfgfile_parse_lines (&changed_prefs, cr->commands, -1); + if (cr->commands[0]) + write_log (L"CMD3: '%s'\n", cr->commands); } found = true; break; @@ -2957,7 +2963,7 @@ void compute_framesync (void) compute_vsynctime (); - write_log (_T("%s mode%s%s V=%.4fHz H=%0.4fHz (%dx%d+%d) IDX=%d (%s)\n"), + write_log (_T("%s mode%s%s V=%.4fHz H=%0.4fHz (%dx%d+%d) IDX=%d (%s) D=%d RTG=%d\n"), isntsc ? _T("NTSC") : _T("PAL"), islace ? _T(" lace") : _T(""), doublescan > 0 ? _T(" dblscan") : _T(""), @@ -2965,7 +2971,8 @@ void compute_framesync (void) (double)(currprefs.ntscmode ? CHIPSET_CLOCK_NTSC : CHIPSET_CLOCK_PAL) / (maxhpos + (islinetoggle () ? 0.5 : 0)), maxhpos, maxvpos, lof_store ? 1 : 0, cr ? cr->index : -1, - cr != NULL && cr->label != NULL ? cr->label : _T("") + cr != NULL && cr->label != NULL ? cr->label : _T(""), + currprefs.gfx_apmode[picasso_on ? 1 : 0].gfx_display, picasso_on ); config_changed = 1; @@ -4481,12 +4488,14 @@ static int custom_wput_copper (int hpos, uaecptr addr, uae_u32 value, int noget) static void dump_copper (TCHAR *error, int until_hpos) { - write_log (_T("%s: vpos=%d until_hpos=%d\n"), - error, vpos, until_hpos); + write_log (_T("\n")); + write_log (_T("%s: vpos=%d until_hpos=%d vp=%d\n"), + error, vpos, until_hpos, vpos & (((cop_state.saved_i2 >> 8) & 0x7F) | 0x80)); write_log (_T("cvcmp=%d chcmp=%d chpos=%d cvpos=%d ci1=%04X ci2=%04X\n"), - cop_state.vcmp,cop_state.hcmp,cop_state.hpos,cop_state.vpos,cop_state.saved_i1,cop_state.saved_i2); - write_log (_T("cstate=%d ip=%x SPCFLAGS=%x\n"), - cop_state.state, cop_state.ip, regs.spcflags); + cop_state.vcmp, cop_state.hcmp, cop_state.hpos, cop_state.vpos, cop_state.saved_i1, cop_state.saved_i2); + write_log (_T("cstate=%d ip=%x SPCFLAGS=%x iscline=%d\n"), + cop_state.state, cop_state.ip, regs.spcflags, copper_enabled_thisline); + write_log (_T("\n")); } // "emulate" chip internal delays, not the right place but fast and 99.9% programs @@ -5399,9 +5408,10 @@ static bool framewait (void) frame_time_t now; flipdelay = 0; + curr_time = vsync_busywait_end (&flipdelay); if (!frame_rendered && !picasso_on) frame_rendered = render_screen (false); - curr_time = vsync_busywait_end (&flipdelay); + status = vsync_busywait_do (&freetime, (bplcon0 & 4) != 0 && !lof_changed && !lof_changing, lof_store != 0); vsync_busywait_start (); @@ -6222,8 +6232,6 @@ static void hsync_handler_post (bool onvsync) } } } - } else { - ;//write_log (_T("%d "), vpos); } } } else { @@ -6889,7 +6897,7 @@ static int REGPARAM2 custom_wput_1 (int hpos, uaecptr addr, uae_u32 value, int n case 0x020: DSKPTH (value); break; case 0x022: DSKPTL (value); break; case 0x024: DSKLEN (value, hpos); break; - case 0x026: DSKDAT (value); break; + case 0x026: /* DSKDAT (value). Writing to DMA write registers won't do anything */; break; case 0x02A: VPOSW (value); break; case 0x02C: VHPOSW (value); break; diff --git a/debug.cpp b/debug.cpp index e1e42d7d..c045008a 100644 --- a/debug.cpp +++ b/debug.cpp @@ -70,6 +70,7 @@ void deactivate_debugger (void) processptr = 0; xfree (processname); processname = NULL; + setsystime (); } void activate_debugger (void) diff --git a/disk.cpp b/disk.cpp index b90072a6..c5ed90b0 100644 --- a/disk.cpp +++ b/disk.cpp @@ -1156,6 +1156,9 @@ static void rand_shifter (drive *drv) static void set_steplimit (drive *drv) { + // emulate step limit only if cycle-exact or approximate CPU speed + if (currprefs.m68k_speed != 0) + return; drv->steplimit = 10; drv->steplimitcycle = get_cycles (); } @@ -1913,7 +1916,11 @@ static int drive_write_pcdos (drive *drv) secbuf[3] = 0xfb; while (secwritten < drvsec) { + int mfmcount; + + mfmcount = 0; while (getmfmword (mbuf, shift) != 0x4489) { + mfmcount++; if (mbuf >= mend) return 1; shift++; @@ -1921,12 +1928,20 @@ static int drive_write_pcdos (drive *drv) shift = 0; mbuf++; } + if (sector >= 0 && mfmcount / 16 >= 43) + sector = -1; } + + mfmcount = 0; while (getmfmword (mbuf, shift) == 0x4489) { + mfmcount++; if (mbuf >= mend) return 1; mbuf++; } + if (mfmcount < 3) // ignore if less than 3 sync markers + continue; + mark = mfmdecode(&mbuf, shift); if (mark == 0xfe) { uae_u8 tmp[8]; @@ -1940,6 +1955,11 @@ static int drive_write_pcdos (drive *drv) tmp[0] = 0xa1; tmp[1] = 0xa1; tmp[2] = 0xa1; tmp[3] = mark; tmp[4] = cyl; tmp[5] = head; tmp[6] = sector; tmp[7] = size; + + // skip 28 bytes + for (i = 0; i < 28; i++) + mfmdecode (&mbuf, shift); + if (get_crc16 (tmp, 8) != crc || cyl != drv->cyl || head != side || size != 2 || sector < 1 || sector > drv->num_secs) { write_log (_T("PCDOS: track %d, corrupted sector header\n"), drv->cyl * 2 + side); return 1; @@ -1947,7 +1967,7 @@ static int drive_write_pcdos (drive *drv) sector--; continue; } - if (mark != 0xfb) { + if (mark != 0xfb && mark != 0xfa) { write_log (_T("PCDOS: track %d: unknown address mark %02X\n"), drv->cyl * 2 + side, mark); continue; } diff --git a/diskutil.cpp b/diskutil.cpp index c0a2af1f..b96eaa9e 100644 --- a/diskutil.cpp +++ b/diskutil.cpp @@ -156,7 +156,7 @@ static uae_u8 mfmdecode (uae_u16 **mfmp, int shift) return out; } -static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsize) +static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsecs) { int sectors, shift, sector, i; uae_u8 mark; @@ -171,16 +171,15 @@ static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer sector = -1; shift = 0; mend -= (4 + 16 + 8 + 512); - mfmcount = 0; for (;;) { + *outsecs = sectors; - *outsize = sectors * 512; + mfmcount = 0; while (getmfmword (mbuf, shift) != 0x4489) { + mfmcount++; if (mbuf >= mend) { - if (sectors >= 7) { - *outsize = sectors * 512; + if (sectors >= 1) return 0; - } write_log (_T("* track %d, unexpected end of data\n"), track); return 1; } @@ -189,20 +188,21 @@ static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer shift = 0; mbuf++; } + if (sector >= 0 && mfmcount / 16 >= 43) + sector = -1; } - mfmcount++; + mfmcount = 0; while (getmfmword (mbuf, shift) == 0x4489) { mfmcount++; if (mbuf >= mend) { - if (sectors >= 7) { - *outsize = sectors * 512; + if (sectors >= 1) return 0; - } return 1; } mbuf++; } - mfmcount = 0; + if (mfmcount < 3) // ignore if less than 3 sync markers + continue; mark = mfmdecode (&mbuf, shift); if (mark == 0xfe) { uae_u8 tmp[8]; @@ -216,6 +216,11 @@ static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer tmp[0] = 0xa1; tmp[1] = 0xa1; tmp[2] = 0xa1; tmp[3] = mark; tmp[4] = cyl; tmp[5] = head; tmp[6] = sector; tmp[7] = size; + + // skip 28 bytes + for (i = 0; i < 28; i++) + mfmdecode (&mbuf, shift); + if (get_crc16 (tmp, 8) != crc || cyl != track / 2 || head != (track & 1) || size != 2 || sector < 1 || sector > 20) { write_log (_T("PCDOS: track %d, corrupted sector header\n"), track); continue; @@ -223,34 +228,36 @@ static int drive_write_adf_pc (uae_u16 *mbuf, uae_u16 *mend, uae_u8 *writebuffer sector--; continue; } - if (mark != 0xfb) { + if (mark != 0xfb && mark != 0xfa) { write_log (_T("PCDOS: track %d: unknown address mark %02X\n"), track, mark); continue; } - if (sector < 0) + if (sector < 0) { + write_log (_T("PCDOS: track %d: data mark without header\n"), track); continue; + } for (i = 0; i < 512; i++) secbuf[i + 4] = mfmdecode (&mbuf, shift); - sectors++; - memcpy (writebuffer + sector * 512, secbuf + 4, 512); - sector = 0; crc = (mfmdecode (&mbuf, shift) << 8) | mfmdecode (&mbuf, shift); if (get_crc16 (secbuf, 3 + 1 + 512) != crc) { write_log (_T("PCDOS: track %d, sector %d data checksum error\n"), track, sector + 1); continue; } - + memcpy (writebuffer + sector * 512, secbuf + 4, 512); + sectors++; + sector = -1; } } int ispctrack(uae_u16 *amigamfmbuffer, uae_u8 *mfmdata, int len, uae_u8 *writebuffer, uae_u8 *writebuffer_ok, int track, int *outsize) { - int i; + int i, outsecs; for (i = 0; i < len / 2; i++) amigamfmbuffer[i] = mfmdata[i * 2 + 1] | (mfmdata[i * 2 + 0] << 8); - i = drive_write_adf_pc (amigamfmbuffer, amigamfmbuffer + len / 2, writebuffer, writebuffer_ok, track, outsize); + i = drive_write_adf_pc (amigamfmbuffer, amigamfmbuffer + len / 2, writebuffer, writebuffer_ok, track, &outsecs); + *outsize = outsecs * 512; if (*outsize < 9 * 512) *outsize = 9 * 512; return i ? -1 : 0; diff --git a/drawing.cpp b/drawing.cpp index 27ef0970..ff2b48da 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2419,11 +2419,13 @@ static void init_drawing_frame (void) if (frame_res_cnt == 0) { int m = frame_res * 2 + frame_res_lace; struct wh *dst = currprefs.gfx_apmode[0].gfx_fullscreen ? &changed_prefs.gfx_size_fs : &changed_prefs.gfx_size_win; - while (m < 6) { + while (m < 3 * 2) { struct wh *src = currprefs.gfx_apmode[0].gfx_fullscreen ? &currprefs.gfx_size_fs_xtra[m] : &currprefs.gfx_size_win_xtra[m]; if ((src->width > 0 && src->height > 0) || (currprefs.gfx_api || currprefs.gfx_filter > 0)) { int nr = m >> 1; int nl = (m & 1) == 0 ? 0 : 1; + int nr_o = nr; + int nl_o = nl; if (currprefs.gfx_autoresolution_minh < 0) { if (nr < nl) @@ -2446,7 +2448,9 @@ static void init_drawing_frame (void) if (changed_prefs.gfx_resolution != nr || changed_prefs.gfx_vresolution != nl) { changed_prefs.gfx_resolution = nr; changed_prefs.gfx_vresolution = nl; - write_log (_T("RES -> %d LINE -> %d\n"), nr, nl); + write_log (_T("RES -> %d (%d) LINE -> %d (%d) (%d - %d, %d - %d)\n"), nr, nr_o, nl, nl_o, + currprefs.gfx_autoresolution_minh, currprefs.gfx_autoresolution_minv, + gfxvidinfo.gfx_resolution_reserved, gfxvidinfo.gfx_vresolution_reserved); config_changed = 1; //activate_debugger (); } @@ -3071,7 +3075,6 @@ void drawing_init (void) uae_sem_init (&gui_sem, 0, 1); #ifdef PICASSO96 if (!isrestore ()) { - InitPicasso96 (); picasso_on = 0; picasso_requested_on = 0; gfx_set_picasso_state (0); diff --git a/filesys.cpp b/filesys.cpp index e8e76376..0f1ffa56 100644 --- a/filesys.cpp +++ b/filesys.cpp @@ -1300,6 +1300,20 @@ int filesys_eject (int nr) return 1; } +// This uses filesystem process to reduce resource usage +void setsystime (void) +{ + if (!currprefs.tod_hack) + return; + Unit *u; + for (u = units; u; u = u->next) { + if (is_virtual (u->unit)) { + put_byte (u->volume + 173 - 32, 1); + uae_Signal (get_long (u->volume + 176 - 32), 1 << 13); + break; + } + } +} int filesys_insert (int nr, TCHAR *volume, const TCHAR *rootdir, bool readonly, int flags) { @@ -3811,11 +3825,14 @@ static uae_u32 REGPARAM2 fsmisc_helper (TrapContext *context) return filesys_media_change_reply (context, 0); case 2: return filesys_media_change_reply (context, 1); + case 3: + uae_u32 t = getlocaltime (); + uae_u32 secs = (uae_u32)t - (8 * 365 + 2) * 24 * 60 * 60; + return secs; } return 0; } - static void action_examine_object (Unit *unit, dpacket packet) { uaecptr lock = GET_PCK_ARG1 (packet) << 2; @@ -6623,7 +6640,7 @@ static uae_u32 REGPARAM2 mousehack_done (TrapContext *context) uaecptr diminfo = m68k_areg (regs, 2); uaecptr dispinfo = m68k_areg (regs, 3); uaecptr vp = m68k_areg (regs, 4); - input_mousehack_status (mode, diminfo, dispinfo, vp, m68k_dreg (regs, 2)); + return input_mousehack_status (mode, diminfo, dispinfo, vp, m68k_dreg (regs, 2)); } else if (mode == 10) { amiga_clipboard_die (); } else if (mode == 11) { diff --git a/filesys_bootrom.cpp b/filesys_bootrom.cpp index 1e3ac75d..ae662068 100644 --- a/filesys_bootrom.cpp +++ b/filesys_bootrom.cpp @@ -1,13 +1,13 @@ db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x00); db(0x09); db(0x60); db(0x00); db(0x0b); db(0x94); - db(0x00); db(0x00); db(0x09); db(0x70); db(0x00); db(0x00); db(0x00); db(0xe0); + db(0x00); db(0x00); db(0x00); db(0x09); db(0x60); db(0x00); db(0x0b); db(0xcc); + db(0x00); db(0x00); db(0x09); db(0x7a); db(0x00); db(0x00); db(0x00); db(0xe0); db(0x00); db(0x00); db(0x02); db(0x9c); db(0x00); db(0x00); db(0x00); db(0x24); - db(0x00); db(0x00); db(0x03); db(0x58); db(0x00); db(0x00); db(0x0f); db(0x96); - db(0x00); db(0x00); db(0x14); db(0x26); db(0x43); db(0xfa); db(0x19); db(0x14); + db(0x00); db(0x00); db(0x03); db(0x58); db(0x00); db(0x00); db(0x00); db(0x00); + db(0x00); db(0x00); db(0x14); db(0x4e); db(0x43); db(0xfa); db(0x19); db(0x3c); db(0x4e); db(0xae); db(0xff); db(0xa0); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x16); db(0x20); db(0x40); db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xe0); db(0xe2); db(0x30); db(0x3c); db(0xff); db(0x38); - db(0x72); db(0x11); db(0x61); db(0x00); db(0x0d); db(0xbe); db(0x4e); db(0x90); + db(0x72); db(0x11); db(0x61); db(0x00); db(0x0d); db(0xfe); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x4c); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x0c); db(0x6e); db(0x00); db(0x25); db(0x00); db(0x14); db(0x65); db(0x40); db(0x70); db(0x14); db(0x24); db(0x00); db(0x72); db(0x01); db(0x4e); db(0xae); @@ -22,16 +22,16 @@ db(0x20); db(0x68); db(0x00); db(0x02); db(0x2f); db(0x08); db(0x4e); db(0x90); db(0x20); db(0x5f); db(0x58); db(0x8f); db(0x48); db(0xe7); db(0xff); db(0x7e); db(0x22); db(0x4e); db(0x20); db(0x08); db(0x30); db(0x7c); db(0xff); db(0xb8); - db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x13); db(0x68); - db(0x61); db(0x00); db(0x17); db(0x30); db(0x4c); db(0xdf); db(0x7e); db(0xff); + db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x13); db(0x90); + db(0x61); db(0x00); db(0x17); db(0x58); db(0x4c); db(0xdf); db(0x7e); db(0xff); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x08); db(0x00); db(0x00); db(0x02); db(0x67); db(0x06); db(0x4e); db(0xb9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x4e); db(0xf9); db(0x00); db(0xf0); db(0x00); db(0x00); db(0x00); db(0x00); db(0x48); db(0xe7); db(0xff); db(0xfe); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0d); db(0x14); - db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x18); db(0x75); db(0x70); db(0x24); + db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x0d); db(0x54); + db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x18); db(0x9d); db(0x70); db(0x24); db(0x7a); db(0x01); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x4a); db(0x80); - db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x18); db(0x65); db(0x70); db(0x00); + db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x18); db(0x8d); db(0x70); db(0x00); db(0x7a); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x4a); db(0xad); db(0x01); db(0x0c); db(0x67); db(0x00); db(0x00); db(0x84); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x02); db(0x2c); db(0x22); db(0x3c); @@ -40,13 +40,13 @@ db(0xbc); db(0x6d); db(0x01); db(0x0e); db(0x64); db(0x2c); db(0x2f); db(0x06); db(0x7e); db(0x01); db(0x4a); db(0x45); db(0x67); db(0x04); db(0x08); db(0xc7); db(0x00); db(0x02); db(0x2f); db(0x0b); db(0x20); db(0x4b); db(0x61); db(0x00); - db(0x08); db(0x28); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff); + db(0x08); db(0x32); db(0x26); db(0x5f); db(0x0c); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46); db(0x48); db(0x46); db(0x60); db(0xdc); db(0x2c); db(0x1f); db(0x52); db(0x46); db(0x60); db(0xce); db(0x4a); db(0x45); db(0x67); db(0x24); db(0x7c); db(0x00); db(0x30); db(0x2d); db(0x01); db(0x0c); db(0x0d); db(0x00); db(0x67); db(0x12); db(0x48); db(0xe7); db(0x02); db(0x10); db(0x20); db(0x4b); db(0x08); db(0xc6); - db(0x00); db(0x1f); db(0x61); db(0x00); db(0x06); db(0xf8); db(0x4c); db(0xdf); + db(0x00); db(0x1f); db(0x61); db(0x00); db(0x07); db(0x02); db(0x4c); db(0xdf); db(0x08); db(0x40); db(0x52); db(0x46); db(0x0c); db(0x46); db(0x00); db(0x08); db(0x66); db(0xde); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x22); db(0x4b); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x02); db(0x2c); db(0x4e); db(0xae); @@ -55,38 +55,38 @@ db(0x00); db(0x24); db(0x00); db(0x14); db(0x65); db(0x04); db(0x00); db(0x44); db(0x01); db(0x00); db(0x43); db(0xf9); db(0x00); db(0x21); db(0x00); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xea); db(0x4a); db(0x80); db(0x66); db(0x20); - db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0c); db(0x3c); + db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0c); db(0x7c); db(0x4e); db(0x90); db(0x22); db(0x04); db(0x74); db(0xf6); db(0x20); db(0x7c); db(0x00); db(0x20); db(0x00); db(0x00); db(0x90); db(0x88); db(0x65); db(0x08); db(0x67); db(0x06); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfd); db(0x96); - db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0c); db(0x1c); + db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x0c); db(0x5c); db(0x4e); db(0x90); db(0x20); db(0x49); db(0x20); db(0x01); db(0x67); db(0x0c); - db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x17); db(0x99); - db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x17); db(0x10); + db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x17); db(0xc1); + db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x17); db(0x38); db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00); - db(0x0c); db(0xd6); db(0x22); db(0x40); db(0x72); db(0x01); db(0x30); db(0x3c); - db(0xff); db(0x48); db(0x61); db(0x00); db(0x0b); db(0xee); db(0x4e); db(0x90); + db(0x0d); db(0x16); db(0x22); db(0x40); db(0x72); db(0x01); db(0x30); db(0x3c); + db(0xff); db(0x48); db(0x61); db(0x00); db(0x0c); db(0x2e); db(0x4e); db(0x90); db(0x4c); db(0xdf); db(0x7f); db(0xff); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x38); db(0x22); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x24); db(0x00); db(0x28); db(0x01); db(0x26); db(0x09); db(0x24); db(0x48); db(0x43); db(0xfa); - db(0x17); db(0x0a); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); + db(0x17); db(0x32); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x67); db(0x14); db(0x2c); db(0x40); db(0x22); db(0x0a); db(0xe4); db(0x8b); db(0x4e); db(0xae); db(0xff); db(0x76); db(0x22); db(0x4e); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x4c); db(0xdf); db(0x44); db(0x1c); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x70); db(0x00); db(0x08); db(0xc0); db(0x00); db(0x0d); - db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x41); db(0xfa); db(0x16); db(0xbb); + db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x41); db(0xfa); db(0x16); db(0xe3); db(0x43); db(0xfa); db(0x00); db(0x16); db(0x70); db(0x0f); db(0x22); db(0x3c); db(0x00); db(0x00); db(0x1f); db(0x40); db(0x61); db(0x00); db(0xff); db(0xa8); db(0x60); db(0xdc); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00); db(0x72); db(0x02); db(0x30); db(0x3c); - db(0xff); db(0x48); db(0x61); db(0x00); db(0x0b); db(0x76); db(0x4e); db(0x90); - db(0x22); db(0x00); db(0x6b); db(0x04); db(0x61); db(0x00); db(0x08); db(0x8c); + db(0xff); db(0x48); db(0x61); db(0x00); db(0x0b); db(0xb6); db(0x4e); db(0x90); + db(0x22); db(0x00); db(0x6b); db(0x04); db(0x61); db(0x00); db(0x08); db(0x96); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x20); - db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x0b); db(0x5c); + db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x0b); db(0x9c); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa2); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x30); db(0x3c); - db(0xff); db(0x50); db(0x61); db(0x00); db(0x0b); db(0x46); db(0x70); db(0x02); + db(0xff); db(0x50); db(0x61); db(0x00); db(0x0b); db(0x86); db(0x70); db(0x02); db(0x4e); db(0x90); db(0x0c); db(0x40); db(0x00); db(0x01); db(0x6d); db(0x00); db(0x00); db(0x7c); db(0x6e); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0xe4); db(0x0c); db(0x40); db(0x00); db(0x02); db(0x6e); db(0x08); @@ -104,275 +104,282 @@ db(0x00); db(0x18); db(0x25); db(0x49); db(0x00); db(0x1a); db(0x20); db(0x69); db(0x00); db(0x10); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00); db(0xff); db(0x74); db(0x30); db(0x3c); db(0xff); db(0x50); - db(0x61); db(0x00); db(0x0a); db(0xb8); db(0x70); db(0x04); db(0x4e); db(0x90); + db(0x61); db(0x00); db(0x0a); db(0xf8); db(0x70); db(0x04); db(0x4e); db(0x90); db(0x70); db(0x01); db(0x4c); db(0xdf); db(0x04); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xc0); db(0x61); db(0x00); db(0xfc); db(0xda); db(0x70); db(0x1a); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); db(0x41); db(0xfa); - db(0x15); db(0x8f); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); + db(0x15); db(0xb7); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0xff); db(0x24); db(0x23); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xfa); db(0xff); db(0x1c); db(0x23); db(0x48); db(0x00); db(0x12); db(0x33); db(0x7c); db(0x02); db(0x14); db(0x00); db(0x08); db(0x70); db(0x03); db(0x4e); db(0xae); - db(0xff); db(0x58); db(0x30); db(0x3a); db(0x0c); db(0x02); db(0x67); db(0x04); - db(0x61); db(0x00); db(0x0b); db(0xa0); db(0x4c); db(0xdf); db(0x03); db(0x03); - db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xf2); db(0x2c); db(0x78); - db(0x00); db(0x04); db(0x24); db(0x48); db(0x26); db(0x49); db(0x20); db(0x3c); - db(0x00); db(0x00); db(0x00); db(0xbe); db(0x22); db(0x3c); db(0x00); db(0x01); - db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40); - db(0x70); db(0x00); db(0x43); db(0xeb); db(0x01); db(0xa0); db(0x11); db(0xb1); - db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); db(0x0c); db(0x40); - db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); db(0xe4); db(0x88); - db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); db(0x41); db(0xfa); - db(0x15); db(0x1f); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b); - db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); db(0x4e); db(0xae); - db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); db(0x4e); db(0x75); - db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x24); db(0x48); db(0x0c); db(0x9a); db(0x00); db(0x00); db(0x03); db(0xf3); - db(0x66); db(0x00); db(0x00); db(0xe4); db(0x50); db(0x8a); db(0x2e); db(0x2a); - db(0x00); db(0x04); db(0x9e); db(0x92); db(0x50); db(0x8a); db(0x52); db(0x87); - db(0x26); db(0x4a); db(0x20); db(0x07); db(0xd0); db(0x80); db(0xd0); db(0x80); - db(0xd7); db(0xc0); db(0x28); db(0x4a); db(0x9b); db(0xcd); db(0x7c); db(0x00); - db(0x24); db(0x12); db(0x72); db(0x01); db(0x08); db(0x02); db(0x00); db(0x1e); - db(0x67); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x01); db(0x08); db(0xc1); - db(0x00); db(0x10); db(0xe5); db(0x8a); db(0x20); db(0x02); db(0x66); db(0x04); - db(0x42); db(0x9a); db(0x60); db(0x1e); db(0x50); db(0x80); db(0x4e); db(0xae); - db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xa0); - db(0x20); db(0x40); db(0x20); db(0xc2); db(0x24); db(0xc8); db(0x22); db(0x0d); - db(0x67); db(0x06); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x2a); db(0x80); - db(0x2a); db(0x48); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0xc0); - db(0x7c); db(0x00); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81); - db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x26); db(0x1b); - db(0x28); db(0x1b); db(0xe5); db(0x8c); db(0x0c); db(0x83); db(0x00); db(0x00); - db(0x03); db(0xe9); db(0x67); db(0x08); db(0x0c); db(0x83); db(0x00); db(0x00); - db(0x03); db(0xea); db(0x66); db(0x0c); db(0x20); db(0x04); db(0x4a); db(0x80); - db(0x67); db(0x0e); db(0x10); db(0xdb); db(0x53); db(0x80); db(0x60); db(0xf6); - db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xeb); db(0x66); db(0x4e); - db(0x26); db(0x1b); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xec); - db(0x66); db(0x28); db(0x22); db(0x06); db(0xd2); db(0x81); db(0xd2); db(0x81); - db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); db(0x20); db(0x1b); - db(0x67); db(0xe6); db(0x22); db(0x1b); db(0xd2); db(0x81); db(0xd2); db(0x81); - db(0x26); db(0x34); db(0x18); db(0x00); db(0x58); db(0x83); db(0x24); db(0x1b); - db(0xd7); db(0xb0); db(0x28); db(0x00); db(0x53); db(0x80); db(0x66); db(0xf6); - db(0x60); db(0xe4); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xf2); - db(0x66); db(0x14); db(0x52); db(0x86); db(0xbe); db(0x86); db(0x66); db(0x00); - db(0xff); db(0x8a); db(0x7e); db(0x01); db(0x20); db(0x54); db(0x20); db(0x07); - db(0x4c); db(0xdf); db(0x7e); db(0xfe); db(0x4e); db(0x75); db(0x7e); db(0x00); - db(0x60); db(0xf4); db(0x48); db(0xe7); db(0x40); db(0xe2); db(0x2c); db(0x78); - db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); db(0x20); db(0x50); - db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68); db(0x00); db(0x0a); - db(0x45); db(0xfa); db(0x14); db(0x71); db(0x10); db(0x19); db(0x12); db(0x1a); - db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00); db(0x67); db(0x42); - db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2); db(0x70); db(0x20); - db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); - db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c); db(0x00); db(0x08); - db(0x00); db(0x08); db(0x41); db(0xfa); db(0x14); db(0x47); db(0x25); db(0x48); - db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x13); db(0xc3); db(0x25); db(0x48); - db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12); db(0x20); db(0x88); - db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08); db(0x41); db(0xee); - db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae); db(0xff); db(0x0a); - db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf); db(0x47); db(0x02); - db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x01); db(0x02); db(0x2e); db(0x00); - db(0x4a); db(0x2b); db(0x00); db(0x4c); db(0x67); db(0x7c); db(0x2c); db(0x6b); - db(0x00); db(0xa0); db(0x0c); db(0x6e); db(0x00); db(0x25); db(0x00); db(0x14); - db(0x65); db(0x3e); db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x66); - db(0x02); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x62); - db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x0a); db(0x41); db(0xeb); - db(0x00); db(0x20); db(0x22); db(0x08); db(0x4e); db(0xae); db(0xfd); db(0x5a); + db(0xff); db(0x58); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x04); + db(0x61); db(0x00); db(0x0a); db(0xa8); db(0x4e); db(0x90); db(0x4a); db(0x80); + db(0x67); db(0x04); db(0x61); db(0x00); db(0x0b); db(0xd6); db(0x4c); db(0xdf); + db(0x03); db(0x03); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xf2); + db(0x2c); db(0x78); db(0x00); db(0x04); db(0x24); db(0x48); db(0x26); db(0x49); + db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0xbe); db(0x22); db(0x3c); + db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); + db(0x20); db(0x40); db(0x70); db(0x00); db(0x43); db(0xeb); db(0x01); db(0xa0); + db(0x11); db(0xb1); db(0x00); db(0x00); db(0x00); db(0x0e); db(0x52); db(0x40); + db(0x0c); db(0x40); db(0x00); db(0x8c); db(0x66); db(0xf2); db(0x20); db(0x0a); + db(0xe4); db(0x88); db(0x21); db(0x40); db(0x00); db(0x36); db(0x22); db(0x48); + db(0x41); db(0xfa); db(0x15); db(0x3d); db(0x23); db(0x48); db(0x00); db(0x0a); + db(0x20); db(0x6b); db(0x01); db(0x98); db(0x41); db(0xe8); db(0x00); db(0x12); + db(0x4e); db(0xae); db(0xff); db(0x10); db(0x4c); db(0xdf); db(0x4f); db(0x03); + db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x7f); db(0x7e); db(0x2c); db(0x78); + db(0x00); db(0x04); db(0x24); db(0x48); db(0x0c); db(0x9a); db(0x00); db(0x00); + db(0x03); db(0xf3); db(0x66); db(0x00); db(0x00); db(0xe4); db(0x50); db(0x8a); + db(0x2e); db(0x2a); db(0x00); db(0x04); db(0x9e); db(0x92); db(0x50); db(0x8a); + db(0x52); db(0x87); db(0x26); db(0x4a); db(0x20); db(0x07); db(0xd0); db(0x80); + db(0xd0); db(0x80); db(0xd7); db(0xc0); db(0x28); db(0x4a); db(0x9b); db(0xcd); + db(0x7c); db(0x00); db(0x24); db(0x12); db(0x72); db(0x01); db(0x08); db(0x02); + db(0x00); db(0x1e); db(0x67); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x01); + db(0x08); db(0xc1); db(0x00); db(0x10); db(0xe5); db(0x8a); db(0x20); db(0x02); + db(0x66); db(0x04); db(0x42); db(0x9a); db(0x60); db(0x1e); db(0x50); db(0x80); + db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); + db(0x00); db(0xa0); db(0x20); db(0x40); db(0x20); db(0xc2); db(0x24); db(0xc8); + db(0x22); db(0x0d); db(0x67); db(0x06); db(0x20); db(0x08); db(0xe4); db(0x88); + db(0x2a); db(0x80); db(0x2a); db(0x48); db(0x52); db(0x86); db(0xbe); db(0x86); + db(0x66); db(0xc0); db(0x7c); db(0x00); db(0x22); db(0x06); db(0xd2); db(0x81); + db(0xd2); db(0x81); db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); + db(0x26); db(0x1b); db(0x28); db(0x1b); db(0xe5); db(0x8c); db(0x0c); db(0x83); + db(0x00); db(0x00); db(0x03); db(0xe9); db(0x67); db(0x08); db(0x0c); db(0x83); + db(0x00); db(0x00); db(0x03); db(0xea); db(0x66); db(0x0c); db(0x20); db(0x04); + db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x10); db(0xdb); db(0x53); db(0x80); + db(0x60); db(0xf6); db(0x0c); db(0x83); db(0x00); db(0x00); db(0x03); db(0xeb); + db(0x66); db(0x4e); db(0x26); db(0x1b); db(0x0c); db(0x83); db(0x00); db(0x00); + db(0x03); db(0xec); db(0x66); db(0x28); db(0x22); db(0x06); db(0xd2); db(0x81); + db(0xd2); db(0x81); db(0x20); db(0x74); db(0x18); db(0x00); db(0x58); db(0x88); + db(0x20); db(0x1b); db(0x67); db(0xe6); db(0x22); db(0x1b); db(0xd2); db(0x81); + db(0xd2); db(0x81); db(0x26); db(0x34); db(0x18); db(0x00); db(0x58); db(0x83); + db(0x24); db(0x1b); db(0xd7); db(0xb0); db(0x28); db(0x00); db(0x53); db(0x80); + db(0x66); db(0xf6); db(0x60); db(0xe4); db(0x0c); db(0x83); db(0x00); db(0x00); + db(0x03); db(0xf2); db(0x66); db(0x14); db(0x52); db(0x86); db(0xbe); db(0x86); + db(0x66); db(0x00); db(0xff); db(0x8a); db(0x7e); db(0x01); db(0x20); db(0x54); + db(0x20); db(0x07); db(0x4c); db(0xdf); db(0x7e); db(0xfe); db(0x4e); db(0x75); + db(0x7e); db(0x00); db(0x60); db(0xf4); db(0x48); db(0xe7); db(0x40); db(0xe2); + db(0x2c); db(0x78); db(0x00); db(0x04); db(0x41); db(0xee); db(0x01); db(0x50); + db(0x20); db(0x50); db(0x4a); db(0x90); db(0x67); db(0x1a); db(0x22); db(0x68); + db(0x00); db(0x0a); db(0x45); db(0xfa); db(0x14); db(0x8f); db(0x10); db(0x19); + db(0x12); db(0x1a); db(0xb0); db(0x01); db(0x66); db(0x06); db(0x4a); db(0x00); + db(0x67); db(0x42); db(0x60); db(0xf2); db(0x20); db(0x50); db(0x60); db(0xe2); + db(0x70); db(0x20); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); + db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x24); db(0x40); db(0x15); db(0x7c); + db(0x00); db(0x08); db(0x00); db(0x08); db(0x41); db(0xfa); db(0x14); db(0x65); + db(0x25); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x13); db(0xe1); + db(0x25); db(0x48); db(0x00); db(0x0e); db(0x41); db(0xea); db(0x00); db(0x12); + db(0x20); db(0x88); db(0x58); db(0x90); db(0x21); db(0x48); db(0x00); db(0x08); + db(0x41); db(0xee); db(0x01); db(0x50); db(0x22); db(0x4a); db(0x4e); db(0xae); + db(0xff); db(0x0a); db(0x20); db(0x4a); db(0x20); db(0x08); db(0x4c); db(0xdf); + db(0x47); db(0x02); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x01); db(0x02); + db(0x2e); db(0x00); db(0x4a); db(0x2b); db(0x00); db(0x4c); db(0x67); db(0x7c); + db(0x2c); db(0x6b); db(0x00); db(0xa0); db(0x0c); db(0x6e); db(0x00); db(0x25); + db(0x00); db(0x14); db(0x65); db(0x3e); db(0x72); db(0x0e); db(0x4e); db(0xae); + db(0xfd); db(0x66); db(0x02); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); + db(0x67); db(0x62); db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x0a); + db(0x41); db(0xeb); db(0x00); db(0x20); db(0x22); db(0x08); db(0x4e); db(0xae); + db(0xfd); db(0x5a); db(0x08); db(0x07); db(0x00); db(0x01); db(0x67); db(0x12); + db(0x4a); db(0x2b); db(0x00); db(0x9e); db(0x66); db(0x0c); db(0x50); db(0xeb); + db(0x00); db(0x9e); db(0x22); db(0x2b); db(0x00); db(0xb4); db(0x4e); db(0xae); + db(0xfd); db(0x5a); db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x6c); + db(0x60); db(0x32); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x7c); db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x08); + db(0x41); db(0xeb); db(0x00); db(0x20); db(0x61); db(0x00); db(0x00); db(0xac); db(0x08); db(0x07); db(0x00); db(0x01); db(0x67); db(0x12); db(0x4a); db(0x2b); db(0x00); db(0x9e); db(0x66); db(0x0c); db(0x50); db(0xeb); db(0x00); db(0x9e); - db(0x22); db(0x2b); db(0x00); db(0xb4); db(0x4e); db(0xae); db(0xfd); db(0x5a); - db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x6c); db(0x60); db(0x32); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x7c); - db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x08); db(0x41); db(0xeb); - db(0x00); db(0x20); db(0x61); db(0x00); db(0x00); db(0xac); db(0x08); db(0x07); - db(0x00); db(0x01); db(0x67); db(0x12); db(0x4a); db(0x2b); db(0x00); db(0x9e); - db(0x66); db(0x0c); db(0x50); db(0xeb); db(0x00); db(0x9e); db(0x20); db(0x6b); - db(0x00); db(0xb4); db(0x61); db(0x00); db(0x00); db(0x94); db(0x4e); db(0xae); - db(0xff); db(0x76); db(0x4c); db(0xdf); db(0x40); db(0x80); db(0x4e); db(0x75); - db(0x48); db(0xe7); db(0x01); db(0x22); db(0x2e); db(0x00); db(0x2c); db(0x6b); - db(0x00); db(0xa0); db(0x0c); db(0x6e); db(0x00); db(0x25); db(0x00); db(0x14); - db(0x65); db(0x3e); db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x66); - db(0x02); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); db(0x67); db(0x62); - db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x0a); db(0x41); db(0xeb); - db(0x00); db(0x20); db(0x22); db(0x08); db(0x4e); db(0xae); db(0xfd); db(0x60); + db(0x20); db(0x6b); db(0x00); db(0xb4); db(0x61); db(0x00); db(0x00); db(0x94); + db(0x4e); db(0xae); db(0xff); db(0x76); db(0x4c); db(0xdf); db(0x40); db(0x80); + db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x01); db(0x22); db(0x2e); db(0x00); + db(0x2c); db(0x6b); db(0x00); db(0xa0); db(0x0c); db(0x6e); db(0x00); db(0x25); + db(0x00); db(0x14); db(0x65); db(0x3e); db(0x72); db(0x0e); db(0x4e); db(0xae); + db(0xfd); db(0x66); db(0x02); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); + db(0x67); db(0x62); db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x0a); + db(0x41); db(0xeb); db(0x00); db(0x20); db(0x22); db(0x08); db(0x4e); db(0xae); + db(0xfd); db(0x60); db(0x08); db(0x07); db(0x00); db(0x01); db(0x67); db(0x12); + db(0x4a); db(0x2b); db(0x00); db(0x9e); db(0x67); db(0x0c); db(0x42); db(0x2b); + db(0x00); db(0x9e); db(0x22); db(0x2b); db(0x00); db(0xb4); db(0x4e); db(0xae); + db(0xfd); db(0x60); db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x6c); + db(0x60); db(0x32); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x7c); db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x08); + db(0x41); db(0xeb); db(0x00); db(0x20); db(0x61); db(0x00); db(0x00); db(0x44); db(0x08); db(0x07); db(0x00); db(0x01); db(0x67); db(0x12); db(0x4a); db(0x2b); db(0x00); db(0x9e); db(0x67); db(0x0c); db(0x42); db(0x2b); db(0x00); db(0x9e); - db(0x22); db(0x2b); db(0x00); db(0xb4); db(0x4e); db(0xae); db(0xfd); db(0x60); - db(0x72); db(0x0e); db(0x4e); db(0xae); db(0xfd); db(0x6c); db(0x60); db(0x32); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x7c); - db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x08); db(0x41); db(0xeb); - db(0x00); db(0x20); db(0x61); db(0x00); db(0x00); db(0x44); db(0x08); db(0x07); - db(0x00); db(0x01); db(0x67); db(0x12); db(0x4a); db(0x2b); db(0x00); db(0x9e); - db(0x67); db(0x0c); db(0x42); db(0x2b); db(0x00); db(0x9e); db(0x20); db(0x6b); - db(0x00); db(0xb4); db(0x61); db(0x00); db(0x00); db(0x2c); db(0x4e); db(0xae); - db(0xff); db(0x76); db(0x4c); db(0xdf); db(0x44); db(0x80); db(0x4e); db(0x75); - db(0x22); db(0x48); db(0x20); db(0x6b); db(0x00); db(0xa0); db(0x20); db(0x68); - db(0x00); db(0x22); db(0x20); db(0x68); db(0x00); db(0x18); db(0xd1); db(0xc8); - db(0xd1); db(0xc8); db(0x22); db(0xa8); db(0x00); db(0x04); db(0x20); db(0x09); - db(0xe4); db(0x88); db(0x21); db(0x40); db(0x00); db(0x04); db(0x4e); db(0x75); - db(0x24); db(0x48); db(0x20); db(0x6b); db(0x00); db(0xa0); db(0x20); db(0x68); - db(0x00); db(0x22); db(0x20); db(0x68); db(0x00); db(0x18); db(0xd1); db(0xc8); - db(0xd1); db(0xc8); db(0x22); db(0x68); db(0x00); db(0x04); db(0xd3); db(0xc9); - db(0xd3); db(0xc9); db(0xb3); db(0xca); db(0x66); db(0x06); db(0x21); db(0x52); - db(0x00); db(0x04); db(0x60); db(0x18); db(0x20); db(0x09); db(0x67); db(0x0e); - db(0x20); db(0x11); db(0xd0); db(0x80); db(0xd0); db(0x80); db(0xb5); db(0xc0); - db(0x67); db(0x04); db(0x22); db(0x40); db(0x60); db(0xee); db(0x20); db(0x09); - db(0x67); db(0x02); db(0x22); db(0x92); db(0x4e); db(0x75); db(0x48); db(0xe7); - db(0x20); db(0x22); db(0x74); db(0x16); db(0x9f); db(0xc2); db(0x24); db(0x4f); - db(0x32); db(0x02); db(0x42); db(0x32); db(0x10); db(0xff); db(0x53); db(0x41); - db(0x66); db(0xf8); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x72); db(0x0f); - db(0x4a); db(0x80); db(0x67); db(0x02); db(0x72); db(0x10); db(0x15); db(0x41); - db(0x00); db(0x04); db(0x35); db(0x7c); db(0x08); db(0x00); db(0x00); db(0x08); - db(0x22); db(0x6b); db(0x00); db(0xa4); db(0x33); db(0x7c); db(0x00); db(0x0b); - db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00); db(0x00); db(0x16); - db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x28); db(0x13); db(0x7c); - db(0x00); db(0x01); db(0x00); db(0x1e); db(0x22); db(0x6b); db(0x00); db(0xa8); - db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); db(0x13); db(0x7c); - db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38); - db(0x22); db(0x6b); db(0x00); db(0xa8); db(0x25); db(0x69); db(0x00); db(0x20); - db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24); db(0x00); db(0x12); - db(0x22); db(0x6b); db(0x00); db(0xa4); db(0x4e); db(0xae); db(0xfe); db(0x38); - db(0xdf); db(0xc2); db(0x4c); db(0xdf); db(0x44); db(0x04); db(0x4e); db(0x75); - db(0x4a); db(0x00); db(0x67); db(0x26); db(0x4a); db(0x2b); db(0x00); db(0x4c); - db(0x66); db(0x36); db(0x70); db(0x00); db(0x4a); db(0x33); db(0x00); db(0x4d); - db(0x67); db(0x04); db(0x52); db(0x00); db(0x60); db(0xf6); db(0x17); db(0x40); - db(0x00); db(0x4c); db(0x67); db(0x24); db(0x20); db(0x01); db(0x61); db(0x00); - db(0xfd); db(0xf2); db(0x70); db(0x01); db(0x61); db(0x00); db(0xff); db(0x60); - db(0x60); db(0x16); db(0x4a); db(0x2b); db(0x00); db(0x4c); db(0x67); db(0x10); - db(0x42); db(0x2b); db(0x00); db(0x4c); db(0x20); db(0x01); db(0x61); db(0x00); - db(0xfe); db(0x68); db(0x70); db(0x00); db(0x61); db(0x00); db(0xff); db(0x48); - db(0x4e); db(0x75); db(0x4a); db(0xac); db(0x00); db(0x14); db(0x67); db(0x0a); - db(0x70); db(0x00); db(0x72); db(0x01); db(0x61); db(0x00); db(0xff); db(0xb2); - db(0x4e); db(0x75); db(0x70); db(0x01); db(0x72); db(0x03); db(0x61); db(0x00); - db(0xff); db(0xa8); db(0x4e); db(0x75); db(0x10); db(0x2b); db(0x00); db(0xac); - db(0x6b); db(0x0a); db(0x70); db(0x01); db(0x72); db(0x03); db(0x61); db(0x00); - db(0xff); db(0x98); db(0x4e); db(0x75); db(0x72); db(0x01); db(0x0c); db(0x00); - db(0x00); db(0xfe); db(0x66); db(0x02); db(0x72); db(0x03); db(0x70); db(0x00); - db(0x61); db(0x00); db(0xff); db(0x86); db(0x4e); db(0x75); db(0x20); db(0x6c); - db(0x00); db(0x24); db(0x4a); db(0x90); db(0x67); db(0x0c); db(0x4a); db(0xa8); - db(0x00); db(0x08); db(0x66); db(0x0a); db(0x4a); db(0xa8); db(0x00); db(0x0c); - db(0x66); db(0x04); db(0x70); db(0x01); db(0x4e); db(0x75); db(0x48); db(0xe7); - db(0x3f); db(0x3e); db(0x2a); db(0x48); db(0x24); db(0x6c); db(0x00); db(0x18); - db(0x2e); db(0x15); db(0x7a); db(0x00); db(0x4a); db(0x87); db(0x67); db(0x70); - db(0x20); db(0x0a); db(0x67); db(0x6c); db(0x7c); db(0x00); db(0x22); db(0x2d); - db(0x00); db(0x08); db(0x67); db(0x12); db(0x24); db(0x2a); db(0x00); db(0x04); - db(0x2c); db(0x6b); db(0x00); db(0xa0); db(0x4e); db(0xae); db(0xfc); db(0x34); - db(0x4a); db(0x80); db(0x66); db(0x02); db(0x50); db(0xc6); db(0x22); db(0x2d); - db(0x00); db(0x0c); db(0x67); db(0x1c); db(0x20); db(0x41); db(0x22); db(0x4a); - db(0x2f); db(0x0a); db(0x45); db(0xec); db(0x00); db(0x20); db(0x48); db(0x7a); - db(0x00); db(0x08); db(0x2f); db(0x28); db(0x00); db(0x08); db(0x4e); db(0x75); - db(0x24); db(0x5f); db(0x4a); db(0x80); db(0x66); db(0x02); db(0x50); db(0xc6); - db(0x4a); db(0x06); db(0x67); db(0x24); db(0x20); db(0x2a); db(0x00); db(0x04); - db(0x90); db(0x8a); db(0x4a); db(0x92); db(0x66); db(0x0a); db(0x20); db(0x05); - db(0x67); db(0x10); db(0x20); db(0x40); db(0x42); db(0x90); db(0x60); db(0x0a); - db(0x20); db(0x52); db(0x22); db(0x4a); db(0x22); db(0xd8); db(0x59); db(0x80); - db(0x6a); db(0xfa); db(0x53); db(0x95); db(0x53); db(0x87); db(0x60); db(0x94); - db(0x2a); db(0x0a); db(0x24); db(0x52); db(0x53); db(0x87); db(0x60); db(0x8c); - db(0x4c); db(0xdf); db(0x7c); db(0xfc); db(0x20); db(0x6c); db(0x00); db(0x24); - db(0x4a); db(0x90); db(0x4e); db(0x75); db(0x61); db(0x00); db(0xfc); db(0x7c); - db(0x21); db(0x40); db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c); - db(0xff); db(0xfc); db(0x61); db(0x00); db(0x05); db(0x7e); db(0x2a); db(0x50); - db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00); db(0x05); db(0x74); - db(0x22); db(0x48); db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90); - db(0x42); db(0xa8); db(0x01); db(0x94); db(0x4e); db(0x91); db(0x4a); db(0x80); - db(0x67); db(0x00); db(0x00); db(0xcc); db(0x20); db(0x28); db(0x01); db(0x90); - db(0x67); db(0x18); db(0x6b); db(0x16); db(0x2f); db(0x08); db(0x72); db(0x01); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a); - db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94); db(0x67); db(0x00); - db(0x00); db(0xae); db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); + db(0x20); db(0x6b); db(0x00); db(0xb4); db(0x61); db(0x00); db(0x00); db(0x2c); + db(0x4e); db(0xae); db(0xff); db(0x76); db(0x4c); db(0xdf); db(0x44); db(0x80); + db(0x4e); db(0x75); db(0x22); db(0x48); db(0x20); db(0x6b); db(0x00); db(0xa0); + db(0x20); db(0x68); db(0x00); db(0x22); db(0x20); db(0x68); db(0x00); db(0x18); + db(0xd1); db(0xc8); db(0xd1); db(0xc8); db(0x22); db(0xa8); db(0x00); db(0x04); + db(0x20); db(0x09); db(0xe4); db(0x88); db(0x21); db(0x40); db(0x00); db(0x04); + db(0x4e); db(0x75); db(0x24); db(0x48); db(0x20); db(0x6b); db(0x00); db(0xa0); + db(0x20); db(0x68); db(0x00); db(0x22); db(0x20); db(0x68); db(0x00); db(0x18); + db(0xd1); db(0xc8); db(0xd1); db(0xc8); db(0x22); db(0x68); db(0x00); db(0x04); + db(0xd3); db(0xc9); db(0xd3); db(0xc9); db(0xb3); db(0xca); db(0x66); db(0x06); + db(0x21); db(0x52); db(0x00); db(0x04); db(0x60); db(0x18); db(0x20); db(0x09); + db(0x67); db(0x0e); db(0x20); db(0x11); db(0xd0); db(0x80); db(0xd0); db(0x80); + db(0xb5); db(0xc0); db(0x67); db(0x04); db(0x22); db(0x40); db(0x60); db(0xee); + db(0x20); db(0x09); db(0x67); db(0x02); db(0x22); db(0x92); db(0x4e); db(0x75); + db(0x48); db(0xe7); db(0x20); db(0x22); db(0x74); db(0x16); db(0x9f); db(0xc2); + db(0x24); db(0x4f); db(0x32); db(0x02); db(0x42); db(0x32); db(0x10); db(0xff); + db(0x53); db(0x41); db(0x66); db(0xf8); db(0x2c); db(0x78); db(0x00); db(0x04); + db(0x72); db(0x0f); db(0x4a); db(0x80); db(0x67); db(0x02); db(0x72); db(0x10); + db(0x15); db(0x41); db(0x00); db(0x04); db(0x35); db(0x7c); db(0x08); db(0x00); + db(0x00); db(0x08); db(0x22); db(0x6b); db(0x00); db(0xa4); db(0x33); db(0x7c); + db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00); + db(0x00); db(0x16); db(0x00); db(0x24); db(0x23); db(0x4a); db(0x00); db(0x28); + db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x22); db(0x6b); + db(0x00); db(0xa8); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); + db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); + db(0xfe); db(0x38); db(0x22); db(0x6b); db(0x00); db(0xa8); db(0x25); db(0x69); + db(0x00); db(0x20); db(0x00); db(0x0e); db(0x25); db(0x69); db(0x00); db(0x24); + db(0x00); db(0x12); db(0x22); db(0x6b); db(0x00); db(0xa4); db(0x4e); db(0xae); + db(0xfe); db(0x38); db(0xdf); db(0xc2); db(0x4c); db(0xdf); db(0x44); db(0x04); + db(0x4e); db(0x75); db(0x4a); db(0x00); db(0x67); db(0x26); db(0x4a); db(0x2b); + db(0x00); db(0x4c); db(0x66); db(0x36); db(0x70); db(0x00); db(0x4a); db(0x33); + db(0x00); db(0x4d); db(0x67); db(0x04); db(0x52); db(0x00); db(0x60); db(0xf6); + db(0x17); db(0x40); db(0x00); db(0x4c); db(0x67); db(0x24); db(0x20); db(0x01); + db(0x61); db(0x00); db(0xfd); db(0xf2); db(0x70); db(0x01); db(0x61); db(0x00); + db(0xff); db(0x60); db(0x60); db(0x16); db(0x4a); db(0x2b); db(0x00); db(0x4c); + db(0x67); db(0x10); db(0x42); db(0x2b); db(0x00); db(0x4c); db(0x20); db(0x01); + db(0x61); db(0x00); db(0xfe); db(0x68); db(0x70); db(0x00); db(0x61); db(0x00); + db(0xff); db(0x48); db(0x4e); db(0x75); db(0x4a); db(0xac); db(0x00); db(0x14); + db(0x67); db(0x0a); db(0x70); db(0x00); db(0x72); db(0x01); db(0x61); db(0x00); + db(0xff); db(0xb2); db(0x4e); db(0x75); db(0x70); db(0x01); db(0x72); db(0x03); + db(0x61); db(0x00); db(0xff); db(0xa8); db(0x4e); db(0x75); db(0x10); db(0x2b); + db(0x00); db(0xac); db(0x6b); db(0x0a); db(0x70); db(0x01); db(0x72); db(0x03); + db(0x61); db(0x00); db(0xff); db(0x98); db(0x4e); db(0x75); db(0x72); db(0x01); + db(0x0c); db(0x00); db(0x00); db(0xfe); db(0x66); db(0x02); db(0x72); db(0x03); + db(0x70); db(0x00); db(0x61); db(0x00); db(0xff); db(0x86); db(0x4e); db(0x75); + db(0x20); db(0x6c); db(0x00); db(0x24); db(0x4a); db(0x90); db(0x67); db(0x0c); + db(0x4a); db(0xa8); db(0x00); db(0x08); db(0x66); db(0x0a); db(0x4a); db(0xa8); + db(0x00); db(0x0c); db(0x66); db(0x04); db(0x70); db(0x01); db(0x4e); db(0x75); + db(0x48); db(0xe7); db(0x3f); db(0x3e); db(0x2a); db(0x48); db(0x24); db(0x6c); + db(0x00); db(0x18); db(0x2e); db(0x15); db(0x7a); db(0x00); db(0x4a); db(0x87); + db(0x67); db(0x70); db(0x20); db(0x0a); db(0x67); db(0x6c); db(0x7c); db(0x00); + db(0x22); db(0x2d); db(0x00); db(0x08); db(0x67); db(0x12); db(0x24); db(0x2a); + db(0x00); db(0x04); db(0x2c); db(0x6b); db(0x00); db(0xa0); db(0x4e); db(0xae); + db(0xfc); db(0x34); db(0x4a); db(0x80); db(0x66); db(0x02); db(0x50); db(0xc6); + db(0x22); db(0x2d); db(0x00); db(0x0c); db(0x67); db(0x1c); db(0x20); db(0x41); + db(0x22); db(0x4a); db(0x2f); db(0x0a); db(0x45); db(0xec); db(0x00); db(0x20); + db(0x48); db(0x7a); db(0x00); db(0x08); db(0x2f); db(0x28); db(0x00); db(0x08); + db(0x4e); db(0x75); db(0x24); db(0x5f); db(0x4a); db(0x80); db(0x66); db(0x02); + db(0x50); db(0xc6); db(0x4a); db(0x06); db(0x67); db(0x24); db(0x20); db(0x2a); + db(0x00); db(0x04); db(0x90); db(0x8a); db(0x4a); db(0x92); db(0x66); db(0x0a); + db(0x20); db(0x05); db(0x67); db(0x10); db(0x20); db(0x40); db(0x42); db(0x90); + db(0x60); db(0x0a); db(0x20); db(0x52); db(0x22); db(0x4a); db(0x22); db(0xd8); + db(0x59); db(0x80); db(0x6a); db(0xfa); db(0x53); db(0x95); db(0x53); db(0x87); + db(0x60); db(0x94); db(0x2a); db(0x0a); db(0x24); db(0x52); db(0x53); db(0x87); + db(0x60); db(0x8c); db(0x4c); db(0xdf); db(0x7c); db(0xfc); db(0x20); db(0x6c); + db(0x00); db(0x24); db(0x4a); db(0x90); db(0x4e); db(0x75); db(0x61); db(0x00); + db(0xfc); db(0x7c); db(0x21); db(0x40); db(0x01); db(0x98); db(0x2f); db(0x08); + db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); db(0x05); db(0xb4); + db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00); + db(0x05); db(0xaa); db(0x22); db(0x48); db(0x20); db(0x5f); db(0x42); db(0xa8); + db(0x01); db(0x90); db(0x42); db(0xa8); db(0x01); db(0x94); db(0x4e); db(0x91); + db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0xcc); db(0x20); db(0x28); + db(0x01); db(0x90); db(0x67); db(0x18); db(0x6b); db(0x16); db(0x2f); db(0x08); + db(0x72); db(0x01); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x3a); db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94); + db(0x67); db(0x00); db(0x00); db(0xae); db(0x2c); db(0x4c); db(0x2f); db(0x08); + db(0x4e); db(0xae); db(0xff); db(0x70); db(0x20); db(0x5f); db(0x22); db(0x48); + db(0x26); db(0x40); db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); + db(0x05); db(0x62); db(0x4e); db(0x90); db(0x70); db(0x00); db(0x27); db(0x40); + db(0x00); db(0x08); db(0x27); db(0x40); db(0x00); db(0x10); db(0x27); db(0x40); + db(0x00); db(0x20); db(0x20); db(0x29); db(0x01); db(0x94); db(0x67); db(0x22); + db(0x20); db(0x40); db(0x61); db(0x00); db(0xfb); db(0x06); db(0x48); db(0xe7); + db(0x80); db(0xc0); db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); + db(0x01); db(0x94); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x2e); db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x61); db(0x00); + db(0xfa); db(0x94); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); + db(0x05); db(0x22); db(0x4e); db(0x90); db(0x16); db(0x29); db(0x00); db(0x4f); + db(0x0c); db(0x03); db(0x00); db(0x80); db(0x67); db(0x38); db(0x2c); db(0x78); + db(0x00); db(0x04); db(0x70); db(0x14); db(0x22); db(0x3c); db(0x00); db(0x01); + db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); + db(0x30); db(0x3c); db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40); + db(0x00); db(0x08); db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a); + db(0x23); db(0x4b); db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a); + db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x4e); db(0xae); db(0xfe); db(0xf2); + db(0x4e); db(0xae); db(0xff); db(0x76); db(0x60); db(0x12); db(0x24); db(0x49); + db(0x20); db(0x4b); db(0x72); db(0x00); db(0x22); db(0x41); db(0x72); db(0x01); + db(0x70); db(0xec); db(0x2c); db(0x4c); db(0x4e); db(0xae); db(0xff); db(0x6a); + db(0x4e); db(0x75); db(0x61); db(0x00); db(0xfb); db(0x80); db(0x21); db(0x40); + db(0x01); db(0x98); db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc); + db(0x61); db(0x00); db(0x04); db(0xb8); db(0x2a); db(0x50); db(0x30); db(0x3c); + db(0xff); db(0x28); db(0x61); db(0x00); db(0x04); db(0xae); db(0x22); db(0x48); + db(0x20); db(0x5f); db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8); + db(0x01); db(0x94); db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x43); + db(0xff); db(0xfe); db(0x67); db(0x00); db(0xf8); db(0x70); db(0x20); db(0x28); + db(0x01); db(0x90); db(0x67); db(0x14); db(0x6b); db(0x12); db(0x2f); db(0x08); + db(0x72); db(0x01); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x3a); db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94); + db(0x4a); db(0x83); db(0x6a); db(0x0e); db(0x22); db(0x48); db(0x30); db(0x3c); + db(0xff); db(0x20); db(0x61); db(0x00); db(0x04); db(0x6e); db(0x4e); db(0x90); + db(0x60); db(0x26); db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70); db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40); - db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x05); db(0x2c); + db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x04); db(0x54); db(0x4e); db(0x90); db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40); db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20); - db(0x20); db(0x29); db(0x01); db(0x94); db(0x67); db(0x22); db(0x20); db(0x40); - db(0x61); db(0x00); db(0xfb); db(0x06); db(0x48); db(0xe7); db(0x80); db(0xc0); - db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e); - db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x61); db(0x00); db(0xfa); db(0x94); - db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); db(0x04); db(0xec); - db(0x4e); db(0x90); db(0x16); db(0x29); db(0x00); db(0x4f); db(0x0c); db(0x03); - db(0x00); db(0x80); db(0x67); db(0x38); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x70); db(0x14); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); - db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); db(0x30); db(0x3c); - db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40); db(0x00); db(0x08); - db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a); db(0x23); db(0x4b); - db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a); db(0x4e); db(0xae); - db(0xff); db(0x7c); db(0x4e); db(0xae); db(0xfe); db(0xf2); db(0x4e); db(0xae); - db(0xff); db(0x76); db(0x60); db(0x12); db(0x24); db(0x49); db(0x20); db(0x4b); - db(0x72); db(0x00); db(0x22); db(0x41); db(0x72); db(0x01); db(0x70); db(0xec); - db(0x2c); db(0x4c); db(0x4e); db(0xae); db(0xff); db(0x6a); db(0x4e); db(0x75); - db(0x61); db(0x00); db(0xfb); db(0x80); db(0x21); db(0x40); db(0x01); db(0x98); - db(0x2f); db(0x08); db(0x30); db(0x3c); db(0xff); db(0xfc); db(0x61); db(0x00); - db(0x04); db(0x82); db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28); - db(0x61); db(0x00); db(0x04); db(0x78); db(0x22); db(0x48); db(0x20); db(0x5f); - db(0x42); db(0xa8); db(0x01); db(0x90); db(0x42); db(0xa8); db(0x01); db(0x94); - db(0x4e); db(0x91); db(0x26); db(0x00); db(0x0c); db(0x43); db(0xff); db(0xfe); - db(0x67); db(0x00); db(0xf8); db(0x7a); db(0x20); db(0x28); db(0x01); db(0x90); - db(0x67); db(0x14); db(0x6b); db(0x12); db(0x2f); db(0x08); db(0x72); db(0x01); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x3a); - db(0x20); db(0x5f); db(0x21); db(0x40); db(0x01); db(0x94); db(0x4a); db(0x83); - db(0x6a); db(0x0e); db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x20); - db(0x61); db(0x00); db(0x04); db(0x38); db(0x4e); db(0x90); db(0x60); db(0x26); - db(0x2c); db(0x4c); db(0x2f); db(0x08); db(0x4e); db(0xae); db(0xff); db(0x70); - db(0x20); db(0x5f); db(0x22); db(0x48); db(0x26); db(0x40); db(0x30); db(0x3c); - db(0xff); db(0x20); db(0x61); db(0x00); db(0x04); db(0x1e); db(0x4e); db(0x90); - db(0x70); db(0x00); db(0x27); db(0x40); db(0x00); db(0x08); db(0x27); db(0x40); - db(0x00); db(0x10); db(0x27); db(0x40); db(0x00); db(0x20); db(0x4a); db(0xa9); - db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69); db(0x01); db(0x94); - db(0x61); db(0x00); db(0xf9); db(0xf6); db(0x48); db(0xe7); db(0x80); db(0xc0); - db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); db(0x01); db(0x94); - db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xff); db(0x2e); - db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80); db(0x67); db(0x04); - db(0x61); db(0x00); db(0xf9); db(0x80); db(0x4a); db(0x83); db(0x6b); db(0x00); - db(0xf7); db(0xf4); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); - db(0x03); db(0xd2); db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29); - db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a); db(0x27); db(0x7c); - db(0x00); db(0x00); db(0x17); db(0x70); db(0x00); db(0x14); db(0x41); db(0xfa); - db(0xf5); db(0xb4); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x27); db(0x40); - db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40); db(0x00); db(0x24); - db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x40); db(0x0c); db(0x03); - db(0x00); db(0x80); db(0x67); db(0x3a); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x70); db(0x14); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); - db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); db(0x30); db(0x3c); - db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40); db(0x00); db(0x08); - db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a); db(0x23); db(0x4b); - db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a); db(0x4e); db(0xae); - db(0xff); db(0x7c); db(0x4e); db(0xae); db(0xfe); db(0xf2); db(0x4e); db(0xae); - db(0xff); db(0x76); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x24); db(0x49); - db(0x20); db(0x4b); db(0x72); db(0x00); db(0x22); db(0x41); db(0x08); db(0x07); - db(0x00); db(0x01); db(0x67); db(0x08); db(0x08); db(0x07); db(0x00); db(0x02); - db(0x67); db(0x02); db(0x72); db(0x01); db(0x70); db(0x80); db(0x2c); db(0x4c); - db(0x4e); db(0xae); db(0xff); db(0x6a); db(0x08); db(0x07); db(0x00); db(0x01); - db(0x67); db(0x5c); db(0x08); db(0x07); db(0x00); db(0x02); db(0x66); db(0x56); - db(0x20); db(0x52); db(0x74); db(0x02); db(0x52); db(0x82); db(0x4a); db(0x30); - db(0x28); db(0xfd); db(0x66); db(0xf8); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x20); db(0x02); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); - db(0x4a); db(0x80); db(0x67); db(0x3a); db(0x20); db(0x52); db(0x24); db(0x40); - db(0x22); db(0x4a); db(0x12); db(0xd8); db(0x66); db(0xfc); db(0x13); db(0x7c); - db(0x00); db(0x3a); db(0xff); db(0xff); db(0x42); db(0x11); db(0x2c); db(0x78); - db(0x00); db(0x04); db(0x43); db(0xfa); db(0x0e); db(0x3e); db(0x70); db(0x00); - db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x2c); db(0x40); db(0x22); db(0x0a); - db(0x4e); db(0xae); db(0xff); db(0x52); db(0x22); db(0x4e); db(0x2c); db(0x78); - db(0x00); db(0x04); db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x22); db(0x4a); - db(0x20); db(0x02); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x70); db(0x00); - db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x3f); db(0x3e); db(0x2c); db(0x01); - db(0x7e); db(0x06); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x43); db(0xfa); - db(0x0e); db(0x39); db(0x70); db(0x24); db(0x4e); db(0xae); db(0xfd); db(0xd8); - db(0x4a); db(0x80); db(0x66); db(0x0e); db(0x08); db(0x87); db(0x00); db(0x02); - db(0x43); db(0xfa); db(0x0e); db(0x27); db(0x70); db(0x00); db(0x4e); db(0xae); - db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00); - db(0x02); db(0x2c); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); - db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40); db(0x4a); db(0x80); - db(0x67); db(0x2c); db(0x21); db(0x4c); db(0x01); db(0x9c); db(0x48); db(0xe7); - db(0x00); db(0x8a); db(0x61); db(0x00); db(0xfe); db(0x04); db(0x4c); db(0xdf); - db(0x51); db(0x00); db(0x0c); db(0x80); db(0xff); db(0xff); db(0xff); db(0xfe); - db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46); db(0x48); db(0x46); - db(0x60); db(0xe4); db(0x22); db(0x48); db(0x20); db(0x3c); db(0x00); db(0x00); - db(0x02); db(0x2c); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x22); db(0x4c); - db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x4c); db(0xdf); db(0x7c); db(0xfc); + db(0x4a); db(0xa9); db(0x01); db(0x94); db(0x67); db(0x28); db(0x20); db(0x69); + db(0x01); db(0x94); db(0x61); db(0x00); db(0xf9); db(0xf6); db(0x48); db(0xe7); + db(0x80); db(0xc0); db(0x20); db(0x29); db(0x01); db(0x90); db(0x22); db(0x69); + db(0x01); db(0x94); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); + db(0xff); db(0x2e); db(0x4c); db(0xdf); db(0x03); db(0x01); db(0x4a); db(0x80); + db(0x67); db(0x04); db(0x61); db(0x00); db(0xf9); db(0x80); db(0x4a); db(0x83); + db(0x6b); db(0x00); db(0xf7); db(0xea); db(0x30); db(0x3c); db(0xff); db(0x18); + db(0x61); db(0x00); db(0x04); db(0x08); db(0x4e); db(0x90); db(0x20); db(0x03); + db(0x16); db(0x29); db(0x00); db(0x4f); db(0x4a); db(0x80); db(0x66); db(0x1a); + db(0x27); db(0x7c); db(0x00); db(0x00); db(0x17); db(0x70); db(0x00); db(0x14); + db(0x41); db(0xfa); db(0xf5); db(0xaa); db(0x20); db(0x08); db(0xe4); db(0x88); + db(0x27); db(0x40); db(0x00); db(0x20); db(0x70); db(0xff); db(0x27); db(0x40); + db(0x00); db(0x24); db(0x08); db(0x07); db(0x00); db(0x00); db(0x67); db(0x40); + db(0x0c); db(0x03); db(0x00); db(0x80); db(0x67); db(0x3a); db(0x2c); db(0x78); + db(0x00); db(0x04); db(0x70); db(0x14); db(0x22); db(0x3c); db(0x00); db(0x01); + db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x22); db(0x40); + db(0x30); db(0x3c); db(0x10); db(0x00); db(0x80); db(0x03); db(0x33); db(0x40); + db(0x00); db(0x08); db(0x23); db(0x6d); db(0x01); db(0x04); db(0x00); db(0x0a); + db(0x23); db(0x4b); db(0x00); db(0x10); db(0x41); db(0xec); db(0x00); db(0x4a); + db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x4e); db(0xae); db(0xfe); db(0xf2); + db(0x4e); db(0xae); db(0xff); db(0x76); db(0x70); db(0x00); db(0x4e); db(0x75); + db(0x24); db(0x49); db(0x20); db(0x4b); db(0x72); db(0x00); db(0x22); db(0x41); + db(0x08); db(0x07); db(0x00); db(0x01); db(0x67); db(0x08); db(0x08); db(0x07); + db(0x00); db(0x02); db(0x67); db(0x02); db(0x72); db(0x01); db(0x70); db(0x80); + db(0x2c); db(0x4c); db(0x4e); db(0xae); db(0xff); db(0x6a); db(0x08); db(0x07); + db(0x00); db(0x01); db(0x67); db(0x5c); db(0x08); db(0x07); db(0x00); db(0x02); + db(0x66); db(0x56); db(0x20); db(0x52); db(0x74); db(0x02); db(0x52); db(0x82); + db(0x4a); db(0x30); db(0x28); db(0xfd); db(0x66); db(0xf8); db(0x2c); db(0x78); + db(0x00); db(0x04); db(0x20); db(0x02); db(0x72); db(0x01); db(0x4e); db(0xae); + db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x3a); db(0x20); db(0x52); + db(0x24); db(0x40); db(0x22); db(0x4a); db(0x12); db(0xd8); db(0x66); db(0xfc); + db(0x13); db(0x7c); db(0x00); db(0x3a); db(0xff); db(0xff); db(0x42); db(0x11); + db(0x2c); db(0x78); db(0x00); db(0x04); db(0x43); db(0xfa); db(0x0e); db(0x5c); + db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x2c); db(0x40); + db(0x22); db(0x0a); db(0x4e); db(0xae); db(0xff); db(0x52); db(0x22); db(0x4e); + db(0x2c); db(0x78); db(0x00); db(0x04); db(0x4e); db(0xae); db(0xfe); db(0x62); + db(0x22); db(0x4a); db(0x20); db(0x02); db(0x4e); db(0xae); db(0xff); db(0x2e); + db(0x70); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x3f); db(0x3e); + db(0x2c); db(0x01); db(0x7e); db(0x06); db(0x2c); db(0x78); db(0x00); db(0x04); + db(0x43); db(0xfa); db(0x0e); db(0x57); db(0x70); db(0x24); db(0x4e); db(0xae); + db(0xfd); db(0xd8); db(0x4a); db(0x80); db(0x66); db(0x0e); db(0x08); db(0x87); + db(0x00); db(0x02); db(0x43); db(0xfa); db(0x0e); db(0x45); db(0x70); db(0x00); + db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x28); db(0x40); db(0x20); db(0x3c); + db(0x00); db(0x00); db(0x02); db(0x2c); db(0x22); db(0x3c); db(0x00); db(0x01); + db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x20); db(0x40); + db(0x4a); db(0x80); db(0x67); db(0x2c); db(0x21); db(0x4c); db(0x01); db(0x9c); + db(0x48); db(0xe7); db(0x00); db(0x8a); db(0x61); db(0x00); db(0xfe); db(0x04); + db(0x4c); db(0xdf); db(0x51); db(0x00); db(0x0c); db(0x80); db(0xff); db(0xff); + db(0xff); db(0xfe); db(0x67); db(0x08); db(0x48); db(0x46); db(0x52); db(0x46); + db(0x48); db(0x46); db(0x60); db(0xe4); db(0x22); db(0x48); db(0x20); db(0x3c); + db(0x00); db(0x00); db(0x02); db(0x2c); db(0x4e); db(0xae); db(0xff); db(0x2e); + db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x62); db(0x4c); db(0xdf); + db(0x7c); db(0xfc); db(0x4e); db(0x75); db(0x30); db(0x3c); db(0xff); db(0x58); + db(0x61); db(0x00); db(0x02); db(0x98); db(0x70); db(0x03); db(0x4e); db(0x90); + db(0x22); db(0x6b); db(0x00); db(0xa8); db(0x23); db(0x40); db(0x00); db(0x20); + db(0x67); db(0x16); db(0x70); db(0x00); db(0x23); db(0x40); db(0x00); db(0x24); + db(0x33); db(0x7c); db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x13); db(0x7c); + db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x20); db(0x40); db(0x4b); db(0xe8); - db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x0d); db(0x8e); db(0x70); db(0x00); + db(0x00); db(0x5c); db(0x43); db(0xfa); db(0x0d); db(0x7e); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x24); db(0x40); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0xb9); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x26); db(0x40); @@ -380,25 +387,26 @@ db(0x27); db(0x46); db(0x00); db(0x08); db(0x27); db(0x4a); db(0x00); db(0xa0); db(0x50); db(0xeb); db(0x00); db(0x9e); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x27); db(0x40); db(0x00); db(0xb0); db(0x41); db(0xfa); - db(0x0c); db(0x76); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); - db(0x02); db(0xb4); db(0x27); db(0x40); db(0x00); db(0xa4); db(0x41); db(0xfa); - db(0x0c); db(0x73); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); - db(0x02); db(0xa4); db(0x27); db(0x40); db(0x00); db(0xa8); db(0x7a); db(0x00); + db(0x0c); db(0x66); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); + db(0x02); db(0xbc); db(0x27); db(0x40); db(0x00); db(0xa4); db(0x41); db(0xfa); + db(0x0c); db(0x63); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); + db(0x02); db(0xac); db(0x27); db(0x40); db(0x00); db(0xa8); db(0x7a); db(0x00); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x80); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00); - db(0x01); db(0xe2); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x24); db(0x00); - db(0x70); db(0x01); db(0x61); db(0x00); db(0xf9); db(0x36); db(0x08); db(0x02); + db(0x01); db(0xea); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x24); db(0x00); + db(0x70); db(0x01); db(0x61); db(0x00); db(0xf9); db(0x08); db(0x08); db(0x02); db(0x00); db(0x01); db(0x67); db(0x06); db(0x70); db(0x01); db(0x61); db(0x00); - db(0xfa); db(0x9e); db(0x60); db(0x00); db(0x01); db(0x26); db(0x20); db(0x4d); + db(0xfa); db(0x70); db(0x60); db(0x00); db(0x01); db(0x2e); db(0x20); db(0x4d); db(0x4e); db(0xae); db(0xfe); db(0x8c); db(0x28); db(0x40); db(0x4a); db(0x80); db(0x66); db(0x10); db(0x70); db(0x00); db(0x12); db(0x2d); db(0x00); db(0x0f); db(0x03); db(0xc0); db(0x08); db(0xc0); db(0x00); db(0x0d); db(0x4e); db(0xae); - db(0xfe); db(0xc2); db(0x4a); db(0x2b); db(0x00); db(0xac); db(0x67); db(0x2a); - db(0x30); db(0x3c); db(0xff); db(0x58); db(0x61); db(0x00); db(0x01); db(0x9c); - db(0x70); db(0x01); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x66); db(0x06); - db(0x42); db(0x2b); db(0x00); db(0xac); db(0x60); db(0x14); db(0x61); db(0x00); - db(0xfb); db(0x34); db(0x42); db(0x2b); db(0x00); db(0xac); db(0x30); db(0x3c); + db(0xfe); db(0xc2); db(0x4a); db(0x2b); db(0x00); db(0xad); db(0x67); db(0x08); + db(0x61); db(0x00); db(0xff); db(0x0a); db(0x42); db(0x2b); db(0x00); db(0xad); + db(0x4a); db(0x2b); db(0x00); db(0xac); db(0x67); db(0x24); db(0x30); db(0x3c); + db(0xff); db(0x58); db(0x61); db(0x00); db(0x01); db(0x96); db(0x70); db(0x01); + db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x04); db(0x61); db(0x00); + db(0xfa); db(0xfe); db(0x42); db(0x2b); db(0x00); db(0xac); db(0x30); db(0x3c); db(0xff); db(0x58); db(0x61); db(0x00); db(0x01); db(0x7e); db(0x70); db(0x02); db(0x4e); db(0x90); db(0x20); db(0x0c); db(0x67); db(0x56); db(0x0c); db(0x6c); db(0x00); db(0x26); db(0x00); db(0x12); db(0x66); db(0x4e); db(0x0c); db(0xac); @@ -409,14 +417,14 @@ db(0x80); db(0x00); db(0x00); db(0x08); db(0x66); db(0x1a); db(0x02); db(0xa8); db(0x7f); db(0xff); db(0xff); db(0xff); db(0x00); db(0x0c); db(0x20); db(0x68); db(0x00); db(0x10); db(0x22); db(0x4c); db(0x12); db(0xbc); db(0x00); db(0x08); - db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00); db(0xff); db(0x68); + db(0x4e); db(0xae); db(0xfe); db(0x92); db(0x60); db(0x00); db(0xff); db(0x60); db(0x22); db(0x4c); db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e); - db(0x60); db(0x00); db(0xff); db(0x5c); db(0x74); db(0xfe); db(0x20); db(0x0c); + db(0x60); db(0x00); db(0xff); db(0x54); db(0x74); db(0xfe); db(0x20); db(0x0c); db(0x67); db(0x14); db(0x26); db(0x2c); db(0x00); db(0x0a); db(0x66); db(0x42); db(0x74); db(0xff); db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x01); db(0x0a); db(0x70); db(0x01); db(0x4e); db(0x90); db(0x45); db(0xeb); db(0x00); db(0x04); db(0x20); db(0x52); db(0x20); db(0x08); db(0x67); db(0x00); - db(0xff); db(0x36); db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x28); + db(0xff); db(0x2e); db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x04); db(0xb4); db(0x80); db(0x66); db(0x16); db(0x48); db(0xe7); db(0x00); db(0xc0); db(0x28); db(0x68); db(0x00); db(0x0a); db(0x61); db(0x4a); db(0x53); db(0x85); db(0x4c); db(0xdf); db(0x03); db(0x00); db(0x24); db(0x89); @@ -427,11 +435,11 @@ db(0xff); db(0x30); db(0x61); db(0x00); db(0x00); db(0xb6); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x0e); db(0x52); db(0x85); db(0x28); db(0xab); db(0x00); db(0x04); db(0x27); db(0x4c); db(0x00); db(0x04); db(0x60); db(0x00); - db(0xfe); db(0xde); db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00); - db(0xfe); db(0xd6); db(0x0c); db(0xac); db(0x00); db(0x00); db(0x00); db(0x1f); - db(0x00); db(0x08); db(0x66); db(0x04); db(0x61); db(0x00); db(0xfa); db(0x1c); + db(0xfe); db(0xd6); db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00); + db(0xfe); db(0xce); db(0x0c); db(0xac); db(0x00); db(0x00); db(0x00); db(0x1f); + db(0x00); db(0x08); db(0x66); db(0x04); db(0x61); db(0x00); db(0xf9); db(0xe6); db(0x0c); db(0xac); db(0x00); db(0x00); db(0x04); db(0x09); db(0x00); db(0x08); - db(0x66); db(0x14); db(0x61); db(0x00); db(0xfa); db(0x4a); db(0x66); db(0x0e); + db(0x66); db(0x14); db(0x61); db(0x00); db(0xfa); db(0x14); db(0x66); db(0x0e); db(0x30); db(0x3c); db(0xff); db(0x58); db(0x61); db(0x00); db(0x00); db(0x74); db(0x70); db(0x00); db(0x4e); db(0x90); db(0x60); db(0xec); db(0x22); db(0x54); db(0x20); db(0x6c); db(0x00); db(0x04); db(0x29); db(0x4d); db(0x00); db(0x04); @@ -447,7 +455,7 @@ db(0x22); db(0x4a); db(0x24); db(0x51); db(0x70); db(0x18); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x06); db(0x86); db(0x00); db(0x01); db(0x00); db(0x00); db(0x20); db(0x0a); db(0x66); db(0xec); db(0x26); db(0x87); db(0x2a); db(0x1f); - db(0x4e); db(0x75); db(0x41); db(0xfa); db(0xf1); db(0xf0); db(0x02); db(0x80); + db(0x4e); db(0x75); db(0x41); db(0xfa); db(0xf1); db(0xb0); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff); db(0xd1); db(0xc0); db(0x4e); db(0x75); db(0x20); db(0x88); db(0x58); db(0x90); db(0x42); db(0xa8); db(0x00); db(0x04); db(0x21); db(0x48); db(0x00); db(0x08); db(0x4e); db(0x75); db(0x48); db(0xe7); @@ -486,8 +494,8 @@ db(0x00); db(0x3e); db(0x25); db(0x4b); db(0x00); db(0x36); db(0x22); db(0x4a); db(0x24); db(0x43); db(0x97); db(0xcb); db(0x24); db(0x09); db(0x4e); db(0xae); db(0xfe); db(0xe6); db(0x20); db(0x02); db(0x4c); db(0xdf); db(0x4c); db(0x1c); - db(0x4e); db(0x75); db(0x41); db(0xfa); db(0x09); db(0xb2); db(0x43); db(0xfa); - db(0x01); db(0x5c); db(0x70); db(0x13); db(0x61); db(0x00); db(0xff); db(0x98); + db(0x4e); db(0x75); db(0x41); db(0xfa); db(0x09); db(0x9a); db(0x43); db(0xfa); + db(0x01); db(0x30); db(0x70); db(0x13); db(0x61); db(0x00); db(0xff); db(0x98); db(0x4e); db(0x75); db(0x22); db(0x6d); db(0x02); db(0x0c); db(0x33); db(0x7c); db(0x00); db(0x0a); db(0x00); db(0x1c); db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x22); db(0x6d); @@ -497,49 +505,46 @@ db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x4e); db(0x75); db(0x42); db(0xaa); db(0x00); db(0x0e); db(0x42); db(0xaa); db(0x00); db(0x12); db(0x22); db(0x6d); db(0x02); db(0x08); db(0x13); db(0x7c); db(0x00); db(0x01); db(0x00); db(0x1e); - db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x4e); db(0x75); db(0x00); db(0x00); - db(0xff); db(0xff); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); - db(0x00); db(0x00); db(0x48); db(0xe7); db(0xf8); db(0xfe); db(0x2a); db(0x48); - db(0x95); db(0xca); db(0x97); db(0xcb); db(0x99); db(0xcc); db(0x78); db(0x00); - db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x20); db(0x6d); db(0x00); db(0x14); - db(0x20); db(0x28); db(0x00); db(0x3c); db(0x67); db(0x5c); db(0x20); db(0x40); - db(0x41); db(0xe8); db(0x00); db(0x2c); db(0x28); db(0x48); db(0x4e); db(0xae); - db(0xfc); db(0xe8); db(0x72); db(0xff); db(0x74); db(0xff); db(0xb2); db(0x80); - db(0x67); db(0x48); db(0x26); db(0x00); db(0x2c); db(0x6d); db(0x00); db(0x14); - db(0x41); db(0xed); db(0x00); db(0xc0); db(0x70); db(0x66); db(0x4e); db(0xae); - db(0xff); db(0x7c); db(0x41); db(0xed); db(0x00); db(0xc0); db(0x38); db(0x28); - db(0x00); db(0x64); db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x91); db(0xc8); - db(0x43); db(0xed); db(0x00); db(0x38); db(0x70); db(0x00); db(0x30); db(0x3c); - db(0x00); db(0x58); db(0x22); db(0x3c); db(0x80); db(0x00); db(0x10); db(0x00); - db(0x24); db(0x03); db(0x4e); db(0xae); db(0xfd); db(0x0c); db(0x72); db(0xff); - db(0x74); db(0xff); db(0x4a); db(0x80); db(0x6b); db(0x0c); db(0x45); db(0xed); - db(0x00); db(0x38); db(0x22); db(0x2a); db(0x00); db(0x32); db(0x24); db(0x2a); - db(0x00); db(0x36); db(0x20); db(0x2c); db(0x00); db(0x1c); db(0xb8); db(0x6d); - db(0x00); db(0x2c); db(0x66); db(0x12); db(0xb0); db(0xad); db(0x00); db(0x28); - db(0x66); db(0x0c); db(0xb2); db(0xad); db(0x00); db(0x20); db(0x66); db(0x06); - db(0xb4); db(0xad); db(0x00); db(0x24); db(0x67); db(0x40); db(0x2b); db(0x40); - db(0x00); db(0x28); db(0x2b); db(0x41); db(0x00); db(0x20); db(0x2b); db(0x42); - db(0x00); db(0x24); db(0x3b); db(0x44); db(0x00); db(0x2c); db(0x91); db(0xc8); - db(0x43); db(0xed); db(0x00); db(0x90); db(0x70); db(0x00); db(0x30); db(0x3c); - db(0x00); db(0x58); db(0x22); db(0x3c); db(0x80); db(0x00); db(0x00); db(0x00); - db(0x24); db(0x03); db(0x4e); db(0xae); db(0xfd); db(0x0c); db(0x4a); db(0x80); - db(0x6b); db(0x04); db(0x47); db(0xed); db(0x00); db(0x90); db(0x34); db(0x2d); - db(0x00); db(0x2c); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x01); - db(0x61); db(0x00); db(0xfd); db(0x70); db(0x4e); db(0x90); db(0x4c); db(0xdf); - db(0x7f); db(0x1f); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04); - db(0x3e); db(0x2e); db(0x00); db(0x14); db(0x70); db(0xff); db(0x4e); db(0xae); - db(0xfe); db(0xb6); db(0x7c); db(0x00); db(0x01); db(0xc6); db(0x93); db(0xc9); - db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x28); db(0x40); db(0x70); db(0x14); - db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0xd4); db(0x70); db(0x00); - db(0x30); db(0x3c); db(0x02); db(0x10); db(0x22); db(0x3c); db(0x00); db(0x01); - db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2a); db(0x40); - db(0x47); db(0xed); db(0x00); db(0x16); db(0x27); db(0x4e); db(0x00); db(0x10); - db(0x27); db(0x4c); db(0x00); db(0x08); db(0x27); db(0x46); db(0x00); db(0x0c); - db(0x70); db(0xff); db(0x37); db(0x40); db(0x00); db(0x00); db(0x43); db(0xed); + db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x4e); db(0x75); db(0x48); db(0xe7); + db(0xf8); db(0xfe); db(0x2a); db(0x48); db(0x95); db(0xca); db(0x97); db(0xcb); + db(0x99); db(0xcc); db(0x78); db(0x00); db(0x2c); db(0x6d); db(0x00); db(0x18); + db(0x20); db(0x6d); db(0x00); db(0x14); db(0x20); db(0x28); db(0x00); db(0x3c); + db(0x67); db(0x5c); db(0x20); db(0x40); db(0x41); db(0xe8); db(0x00); db(0x2c); + db(0x28); db(0x48); db(0x4e); db(0xae); db(0xfc); db(0xe8); db(0x72); db(0xff); + db(0x74); db(0xff); db(0xb2); db(0x80); db(0x67); db(0x48); db(0x26); db(0x00); + db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x41); db(0xed); db(0x00); db(0xc0); + db(0x70); db(0x66); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xed); + db(0x00); db(0xc0); db(0x38); db(0x28); db(0x00); db(0x64); db(0x2c); db(0x6d); + db(0x00); db(0x18); db(0x91); db(0xc8); db(0x43); db(0xed); db(0x00); db(0x38); + db(0x70); db(0x00); db(0x30); db(0x3c); db(0x00); db(0x58); db(0x22); db(0x3c); + db(0x80); db(0x00); db(0x10); db(0x00); db(0x24); db(0x03); db(0x4e); db(0xae); + db(0xfd); db(0x0c); db(0x72); db(0xff); db(0x74); db(0xff); db(0x4a); db(0x80); + db(0x6b); db(0x0c); db(0x45); db(0xed); db(0x00); db(0x38); db(0x22); db(0x2a); + db(0x00); db(0x32); db(0x24); db(0x2a); db(0x00); db(0x36); db(0x20); db(0x2c); + db(0x00); db(0x1c); db(0xb8); db(0x6d); db(0x00); db(0x2c); db(0x66); db(0x12); + db(0xb0); db(0xad); db(0x00); db(0x28); db(0x66); db(0x0c); db(0xb2); db(0xad); + db(0x00); db(0x20); db(0x66); db(0x06); db(0xb4); db(0xad); db(0x00); db(0x24); + db(0x67); db(0x40); db(0x2b); db(0x40); db(0x00); db(0x28); db(0x2b); db(0x41); + db(0x00); db(0x20); db(0x2b); db(0x42); db(0x00); db(0x24); db(0x3b); db(0x44); + db(0x00); db(0x2c); db(0x91); db(0xc8); db(0x43); db(0xed); db(0x00); db(0x90); + db(0x70); db(0x00); db(0x30); db(0x3c); db(0x00); db(0x58); db(0x22); db(0x3c); + db(0x80); db(0x00); db(0x00); db(0x00); db(0x24); db(0x03); db(0x4e); db(0xae); + db(0xfd); db(0x0c); db(0x4a); db(0x80); db(0x6b); db(0x04); db(0x47); db(0xed); + db(0x00); db(0x90); db(0x34); db(0x2d); db(0x00); db(0x2c); db(0x30); db(0x3c); + db(0xff); db(0x38); db(0x72); db(0x01); db(0x61); db(0x00); db(0xfd); db(0x9c); + db(0x4e); db(0x90); db(0x4c); db(0xdf); db(0x7f); db(0x1f); db(0x4e); db(0x75); + db(0x2c); db(0x78); db(0x00); db(0x04); db(0x3e); db(0x2e); db(0x00); db(0x14); + db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x7c); db(0x00); + db(0x01); db(0xc6); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); + db(0x28); db(0x40); db(0x70); db(0x14); db(0x22); db(0x4c); db(0x4e); db(0xae); + db(0xfe); db(0xd4); db(0x70); db(0x00); db(0x30); db(0x3c); db(0x02); db(0x3c); + db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); + db(0xff); db(0x3a); db(0x2a); db(0x40); db(0x47); db(0xed); db(0x00); db(0x16); + db(0x27); db(0x4e); db(0x00); db(0x10); db(0x27); db(0x4c); db(0x00); db(0x08); + db(0x27); db(0x46); db(0x00); db(0x0c); db(0x70); db(0xff); db(0x37); db(0x40); + db(0x00); db(0x00); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x05); + db(0x61); db(0x00); db(0xfd); db(0x40); db(0x20); db(0x0d); db(0x06); db(0x80); + db(0x00); db(0x00); db(0x02); db(0x10); db(0x4e); db(0x90); db(0x43); db(0xed); db(0x00); db(0x00); db(0x13); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c); db(0x00); db(0x05); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x07); db(0xf6); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); @@ -560,7 +565,7 @@ db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x06); db(0xea); db(0x4e); db(0xae); db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x76); db(0x4a); db(0x82); db(0x67); db(0x8c); db(0x41); db(0xfa); db(0x06); db(0xd8); - db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); db(0xfd); db(0x16); + db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); db(0xfd); db(0x2e); db(0x2b); db(0x40); db(0x02); db(0x08); db(0x67); db(0x00); db(0x02); db(0x42); db(0x60); db(0x00); db(0xff); db(0x76); db(0x4a); db(0xad); db(0x02); db(0x0c); db(0x66); db(0x48); db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0x00); @@ -569,94 +574,94 @@ db(0xfe); db(0xec); db(0x24); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x76); db(0x4a); db(0x82); db(0x67); db(0x00); db(0xff); db(0x4c); db(0x41); db(0xfa); db(0x06); db(0xa3); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); - db(0xfc); db(0xd4); db(0x2b); db(0x40); db(0x02); db(0x0c); db(0x67); db(0x00); + db(0xfc); db(0xec); db(0x2b); db(0x40); db(0x02); db(0x0c); db(0x67); db(0x00); db(0x02); db(0x00); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x00); - db(0x61); db(0x00); db(0xfc); db(0x20); db(0x4e); db(0x90); db(0x60); db(0x00); + db(0x61); db(0x00); db(0xfc); db(0x38); db(0x4e); db(0x90); db(0x60); db(0x00); db(0xff); db(0x28); db(0x0c); db(0x47); db(0x00); db(0x24); db(0x65); db(0x12); db(0x53); db(0xab); db(0x00); db(0x34); db(0x6a); db(0x0c); db(0x20); db(0x4b); - db(0x61); db(0x00); db(0xfd); db(0xc8); db(0x70); db(0x32); db(0x27); db(0x40); + db(0x61); db(0x00); db(0xfd); db(0xb4); db(0x70); db(0x32); db(0x27); db(0x40); db(0x00); db(0x34); db(0x22); db(0x6d); db(0x02); db(0x08); db(0x45); db(0xed); db(0x01); db(0x3c); db(0x33); db(0x7c); db(0x00); db(0x0b); db(0x00); db(0x1c); db(0x23); db(0x7c); db(0x00); db(0x00); db(0x00); db(0x16); db(0x00); db(0x24); - db(0x23); db(0x4a); db(0x00); db(0x28); db(0x10); db(0x3a); db(0xfd); db(0x78); + db(0x23); db(0x4a); db(0x00); db(0x28); db(0x10); db(0x2d); db(0x02); db(0x10); db(0x0c); db(0x47); db(0x00); db(0x27); db(0x65); db(0x00); db(0x01); db(0x62); db(0x08); db(0x00); db(0x00); db(0x01); db(0x67); db(0x00); db(0x01); db(0x5a); db(0x41); db(0xed); db(0x01); db(0x68); db(0x25); db(0x48); db(0x00); db(0x0a); db(0x15); db(0x7c); db(0x00); db(0x13); db(0x00); db(0x04); db(0x15); db(0x7c); db(0x00); db(0x03); db(0x00); db(0x05); db(0x42); db(0x90); db(0x42); db(0xa8); db(0x00); db(0x04); db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0xa8); - db(0x00); db(0x08); db(0x42); db(0x68); db(0x00); db(0x0c); db(0x22); db(0x3a); - db(0xfd); db(0x60); db(0x02); db(0x41); db(0x00); db(0x07); db(0x70); db(0x07); + db(0x00); db(0x08); db(0x42); db(0x68); db(0x00); db(0x0c); db(0x22); db(0x2d); + db(0x02); db(0x32); db(0x02); db(0x41); db(0x00); db(0x07); db(0x70); db(0x07); db(0x90); db(0x41); db(0xe1); db(0x48); db(0xe9); db(0x48); db(0x35); db(0x40); - db(0x00); db(0x08); db(0x31); db(0x7a); db(0xfd); db(0x34); db(0x00); db(0x0e); - db(0x42); db(0x68); db(0x00); db(0x10); db(0x31); db(0x7a); db(0xfd); db(0x2c); - db(0x00); db(0x12); db(0x42); db(0x68); db(0x00); db(0x14); db(0x31); db(0x7a); - db(0xfd); db(0x1a); db(0x00); db(0x16); db(0x42); db(0x68); db(0x00); db(0x18); - db(0x31); db(0x7a); db(0xfd); db(0x12); db(0x00); db(0x1a); db(0x43); db(0xed); + db(0x00); db(0x08); db(0x31); db(0x6d); db(0x02); db(0x1a); db(0x00); db(0x0e); + db(0x42); db(0x68); db(0x00); db(0x10); db(0x31); db(0x6d); db(0x02); db(0x1c); + db(0x00); db(0x12); db(0x42); db(0x68); db(0x00); db(0x14); db(0x31); db(0x6d); + db(0x02); db(0x14); db(0x00); db(0x16); db(0x42); db(0x68); db(0x00); db(0x18); + db(0x31); db(0x6d); db(0x02); db(0x16); db(0x00); db(0x1a); db(0x43); db(0xed); db(0x01); db(0x88); db(0x21); db(0x49); db(0x00); db(0x1c); db(0x22); db(0xfc); - db(0x80); db(0x03); db(0xa0); db(0x06); db(0x30); db(0x3a); db(0xfd); db(0x18); + db(0x80); db(0x03); db(0xa0); db(0x06); db(0x30); db(0x2d); db(0x02); db(0x30); db(0x48); db(0xc0); db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x22); db(0xfc); - db(0x80); db(0x03); db(0xa0); db(0x07); db(0x22); db(0xfa); db(0xfd); db(0x0a); - db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfc); db(0xf2); db(0x6b); db(0x08); + db(0x80); db(0x03); db(0xa0); db(0x07); db(0x22); db(0xed); db(0x02); db(0x32); + db(0x70); db(0x00); db(0x30); db(0x2d); db(0x02); db(0x20); db(0x6b); db(0x08); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x09); db(0x22); db(0xc0); - db(0x30); db(0x3a); db(0xfc); db(0xe6); db(0x6b); db(0x08); db(0x22); db(0xfc); - db(0x80); db(0x03); db(0xa0); db(0x0a); db(0x22); db(0xc0); db(0x30); db(0x3a); - db(0xfc); db(0xce); db(0x6b); db(0x14); db(0x22); db(0xfc); db(0x80); db(0x03); - db(0xa0); db(0x02); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfc); db(0xc6); + db(0x30); db(0x2d); db(0x02); db(0x22); db(0x6b); db(0x08); db(0x22); db(0xfc); + db(0x80); db(0x03); db(0xa0); db(0x0a); db(0x22); db(0xc0); db(0x30); db(0x2d); + db(0x02); db(0x18); db(0x6b); db(0x14); db(0x22); db(0xfc); db(0x80); db(0x03); + db(0xa0); db(0x02); db(0x22); db(0xc0); db(0x30); db(0x2d); db(0x02); db(0x1e); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x01); db(0x22); db(0xc0); - db(0x30); db(0x3a); db(0xfc); db(0xc0); db(0x6b); db(0x10); db(0x22); db(0xfc); - db(0x80); db(0x03); db(0xa0); db(0x03); db(0x30); db(0x3a); db(0xfc); db(0xba); - db(0x48); db(0xc0); db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x3a); - db(0xfc); db(0xac); db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03); - db(0xa0); db(0x04); db(0x30); db(0x3a); db(0xfc); db(0xa6); db(0x48); db(0xc0); - db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x3a); db(0xfc); db(0x98); + db(0x30); db(0x2d); db(0x02); db(0x24); db(0x6b); db(0x10); db(0x22); db(0xfc); + db(0x80); db(0x03); db(0xa0); db(0x03); db(0x30); db(0x2d); db(0x02); db(0x2a); + db(0x48); db(0xc0); db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x2d); + db(0x02); db(0x26); db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03); + db(0xa0); db(0x04); db(0x30); db(0x3a); db(0x02); db(0x2a); db(0x48); db(0xc0); + db(0xe1); db(0x80); db(0x22); db(0xc0); db(0x30); db(0x2d); db(0x02); db(0x28); db(0x6b); db(0x10); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x05); - db(0x30); db(0x3a); db(0xfc); db(0x92); db(0x48); db(0xc0); db(0xe1); db(0x80); - db(0x22); db(0xc0); db(0x70); db(0x00); db(0x30); db(0x3a); db(0xfc); db(0x8e); + db(0x30); db(0x2d); db(0x02); db(0x2e); db(0x48); db(0xc0); db(0xe1); db(0x80); + db(0x22); db(0xc0); db(0x70); db(0x00); db(0x30); db(0x2d); db(0x02); db(0x36); db(0x6b); db(0x08); db(0x22); db(0xfc); db(0x80); db(0x03); db(0xa0); db(0x08); - db(0x22); db(0xc0); db(0x42); db(0x91); db(0x61); db(0x00); db(0xfc); db(0x40); - db(0x36); db(0x3c); db(0x00); db(0x68); db(0x74); db(0x01); db(0x28); db(0x3a); - db(0xfc); db(0x70); db(0x20); db(0x04); db(0xc0); db(0x82); db(0x22); db(0x2b); + db(0x22); db(0xc0); db(0x42); db(0x91); db(0x61); db(0x00); db(0xfc); db(0x58); + db(0x36); db(0x3c); db(0x00); db(0x68); db(0x74); db(0x01); db(0x28); db(0x2d); + db(0x02); db(0x32); db(0x20); db(0x04); db(0xc0); db(0x82); db(0x22); db(0x2b); db(0x00); db(0x04); db(0xc2); db(0x82); db(0xb2); db(0x80); db(0x67); db(0x22); db(0x42); db(0x92); db(0x35); db(0x7c); db(0x02); db(0x00); db(0x00); db(0x04); db(0x42); db(0xaa); db(0x00); db(0x0a); db(0x32); db(0x03); db(0x4a); db(0x00); db(0x66); db(0x04); db(0x08); db(0xc1); db(0x00); db(0x07); db(0x35); db(0x41); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08); db(0x61); db(0x00); - db(0xfc); db(0x06); db(0x52); db(0x43); db(0xd4); db(0x42); db(0x0c); db(0x42); + db(0xfc); db(0x1e); db(0x52); db(0x43); db(0xd4); db(0x42); db(0x0c); db(0x42); db(0x00); db(0x08); db(0x66); db(0xc6); db(0x27); db(0x44); db(0x00); db(0x04); - db(0x10); db(0x3a); db(0xfc); db(0x0c); db(0x08); db(0x00); db(0x00); db(0x00); + db(0x10); db(0x2d); db(0x02); db(0x10); db(0x08); db(0x00); db(0x00); db(0x00); db(0x67); db(0x00); db(0xfd); db(0x7e); db(0x42); db(0x92); db(0x35); db(0x7c); db(0x04); db(0x00); db(0x00); db(0x04); db(0x42); db(0x6a); db(0x00); db(0x06); db(0x42); db(0x6a); db(0x00); db(0x08); db(0x20); db(0x6b); db(0x00); db(0x14); - db(0x30); db(0x3a); db(0xfc); db(0x14); db(0x32); db(0x28); db(0x00); db(0x30); + db(0x30); db(0x2d); db(0x02); db(0x38); db(0x32); db(0x28); db(0x00); db(0x30); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x6a); db(0x02); db(0x70); db(0x00); - db(0x35); db(0x40); db(0x00); db(0x0a); db(0x30); db(0x3a); db(0xfc); db(0x02); + db(0x35); db(0x40); db(0x00); db(0x0a); db(0x30); db(0x2d); db(0x02); db(0x3a); db(0x32); db(0x28); db(0x00); db(0x2e); db(0xd2); db(0x41); db(0x90); db(0x41); db(0x6a); db(0x02); db(0x70); db(0x00); db(0x35); db(0x40); db(0x00); db(0x0c); - db(0x61); db(0x00); db(0xfb); db(0x78); db(0x60); db(0x00); db(0xfd); db(0x3a); + db(0x61); db(0x00); db(0xfb); db(0x90); db(0x60); db(0x00); db(0xfd); db(0x3a); db(0x4e); db(0x75); db(0x4a); db(0xa9); db(0x02); db(0x08); db(0x67); db(0x14); - db(0x4a); db(0xa9); db(0x02); db(0x0c); db(0x67); db(0x0e); db(0x30); db(0x3a); - db(0xfb); db(0xb0); db(0xb0); db(0x69); db(0x00); db(0x16); db(0x67); db(0x14); + db(0x4a); db(0xa9); db(0x02); db(0x0c); db(0x67); db(0x0e); db(0x30); db(0x29); + db(0x02); db(0x12); db(0xb0); db(0x69); db(0x00); db(0x16); db(0x67); db(0x14); db(0x33); db(0x40); db(0x00); db(0x16); db(0x2c); db(0x69); db(0x00); db(0x26); db(0x20); db(0x29); db(0x00); db(0x22); db(0x22); db(0x69); db(0x00); db(0x1e); db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x53); db(0x69); db(0x00); db(0x46); db(0x6a); db(0x12); db(0x33); db(0x7c); db(0x00); db(0x32); db(0x00); db(0x46); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x02); db(0x61); db(0x00); - db(0xf9); db(0xea); db(0x4e); db(0x90); db(0x41); db(0xf9); db(0x00); db(0xdf); + db(0xfa); db(0x02); db(0x4e); db(0x90); db(0x41); db(0xf9); db(0x00); db(0xdf); db(0xf0); db(0x00); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x00); db(0x06); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x11); - db(0x61); db(0x00); db(0xf9); db(0xd0); db(0x4e); db(0x90); db(0x08); db(0x00); + db(0x61); db(0x00); db(0xf9); db(0xe8); db(0x4e); db(0x90); db(0x08); db(0x00); db(0x00); db(0x00); db(0x67); db(0x42); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x20); db(0x3c); db(0x00); db(0x00); db(0x00); db(0x88); db(0x22); db(0x3c); db(0x00); db(0x01); db(0x00); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x4a); db(0x80); db(0x67); db(0x00); db(0x00); db(0x40); db(0x2a); db(0x40); db(0x2b); db(0x4e); db(0x00); db(0x14); db(0x30); db(0x3c); db(0xff); db(0x38); - db(0x72); db(0x0e); db(0x61); db(0x00); db(0xf9); db(0x9e); db(0x20); db(0x0d); + db(0x72); db(0x0e); db(0x61); db(0x00); db(0xf9); db(0xb6); db(0x20); db(0x0d); db(0x4e); db(0x90); db(0x41); db(0xfa); db(0x04); db(0x6c); db(0x43); db(0xfa); db(0x01); db(0x14); db(0x70); db(0xf6); db(0x22); db(0x3c); db(0x00); db(0x00); - db(0x27); db(0x10); db(0x61); db(0x00); db(0xed); db(0xa2); db(0x70); db(0x00); + db(0x27); db(0x10); db(0x61); db(0x00); db(0xed); db(0x7a); db(0x70); db(0x00); db(0x4c); db(0xdf); db(0x60); db(0x00); db(0x4e); db(0x75); db(0x30); db(0x3c); - db(0xff); db(0x38); db(0x72); db(0x0a); db(0x61); db(0x00); db(0xf9); db(0x74); + db(0xff); db(0x38); db(0x72); db(0x0a); db(0x61); db(0x00); db(0xf9); db(0x8c); db(0x4e); db(0x90); db(0x4e); db(0x75); db(0x61); db(0xf0); db(0x20); db(0x0d); db(0x67); db(0x1c); db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x20); db(0x2d); db(0x00); db(0x18); db(0x67); db(0x06); db(0x22); db(0x40); db(0x4e); db(0xae); @@ -674,7 +679,7 @@ db(0xff); db(0xd6); db(0x24); db(0x0a); db(0x76); db(0x20); db(0x22); db(0x04); db(0x4e); db(0xae); db(0xff); db(0xd6); db(0xb6); db(0x80); db(0x66); db(0x12); db(0x4a); db(0x6a); db(0x00); db(0x10); db(0x66); db(0xc4); db(0x30); db(0x3c); - db(0xff); db(0x38); db(0x72); db(0x10); db(0x61); db(0x00); db(0xf8); db(0xe4); + db(0xff); db(0x38); db(0x72); db(0x10); db(0x61); db(0x00); db(0xf8); db(0xfc); db(0x4e); db(0x90); db(0x22); db(0x04); db(0x67); db(0x04); db(0x4e); db(0xae); db(0xff); db(0xdc); db(0x4c); db(0xdf); db(0x7c); db(0x1c); db(0x4e); db(0x75); db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x41); db(0xfa); db(0x03); db(0x72); @@ -689,7 +694,7 @@ db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x4e); db(0x75); db(0x00); db(0x00); db(0x00); db(0x00); db(0x00); db(0x10); db(0x00); db(0x00); db(0x00); db(0x00); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x0d); db(0x61); db(0x00); - db(0xf8); db(0x72); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00); + db(0xf8); db(0x8a); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x00); db(0xfe); db(0xfc); db(0x2a); db(0x40); db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x93); db(0xc9); db(0x4e); db(0xae); db(0xfe); db(0xda); db(0x2b); db(0x40); db(0x00); db(0x08); db(0x43); db(0xfa); db(0x03); db(0x8e); db(0x70); db(0x00); @@ -702,9 +707,9 @@ db(0x41); db(0xfa); db(0x02); db(0xb0); db(0x22); db(0x08); db(0x74); db(0xfe); db(0x4e); db(0xae); db(0xff); db(0xac); db(0x4a); db(0x80); db(0x67); db(0x00); db(0xfe); db(0xa4); db(0x22); db(0x00); db(0x4e); db(0xae); db(0xff); db(0xa6); - db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x61); db(0x00); db(0xf8); db(0x20); + db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x61); db(0x00); db(0xf8); db(0x38); db(0x72); db(0x00); db(0x32); db(0x3c); db(0x00); db(0x34); db(0x61); db(0x00); - db(0xf8); db(0x64); db(0x28); db(0x40); db(0x4a); db(0x80); db(0x67); db(0x00); + db(0xf8); db(0x7c); db(0x28); db(0x40); db(0x4a); db(0x80); db(0x67); db(0x00); db(0xfe); db(0x84); db(0x70); db(0x00); db(0x08); db(0xc0); db(0x00); db(0x0d); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x72); db(0x00); db(0x20); db(0x2d); db(0x00); db(0x0c); db(0x41); db(0xfa); db(0x02); db(0x89); db(0x22); db(0x4c); @@ -718,7 +723,7 @@ db(0x2b); db(0x4d); db(0x00); db(0x2c); db(0x41); db(0xfa); db(0x01); db(0x60); db(0x2b); db(0x48); db(0x00); db(0x24); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x0f); - db(0x61); db(0x00); db(0xf7); db(0x88); db(0x4e); db(0x90); db(0x4a); db(0xad); + db(0x61); db(0x00); db(0xf7); db(0xa0); db(0x4e); db(0x90); db(0x4a); db(0xad); db(0x00); db(0x00); db(0x66); db(0x1c); db(0x70); db(0x00); db(0x74); db(0x00); db(0x14); db(0x2d); db(0x00); db(0x4c); db(0x05); db(0xc0); db(0x08); db(0xc0); db(0x00); db(0x0d); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x05); db(0x00); @@ -726,7 +731,7 @@ db(0x20); db(0x2d); db(0x00); db(0x00); db(0x67); db(0x00); db(0x00); db(0x76); db(0x72); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x2b); db(0x40); db(0x00); db(0x04); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x0c); - db(0x61); db(0x00); db(0xf7); db(0x48); db(0x4e); db(0x90); db(0x4a); db(0x80); + db(0x61); db(0x00); db(0xf7); db(0x60); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x40); db(0x4a); db(0xad); db(0x00); db(0x04); db(0x67); db(0x3a); db(0x39); db(0x7c); db(0x00); db(0x03); db(0x00); db(0x1c); db(0x42); db(0x2c); db(0x00); db(0x1f); db(0x42); db(0xac); db(0x00); db(0x20); db(0x29); db(0x6d); @@ -753,7 +758,7 @@ db(0x00); db(0x34); db(0x29); db(0x48); db(0x00); db(0x28); db(0x20); db(0x02); db(0x51); db(0x80); db(0x29); db(0x40); db(0x00); db(0x24); db(0x22); db(0x4c); db(0x4e); db(0xae); db(0xfe); db(0x38); db(0x30); db(0x3c); db(0xff); db(0x38); - db(0x72); db(0x0b); db(0x61); db(0x00); db(0xf6); db(0x6e); db(0x20); db(0x2c); + db(0x72); db(0x0b); db(0x61); db(0x00); db(0xf6); db(0x86); db(0x20); db(0x2c); db(0x00); db(0x20); db(0x4e); db(0x90); db(0x22); db(0x4a); db(0x20); db(0x02); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x4a); db(0xac); db(0x00); db(0x20); db(0x67); db(0x00); db(0xfe); db(0xda); db(0x41); db(0xed); db(0x00); db(0x30); @@ -767,17 +772,17 @@ db(0x4e); db(0xae); db(0xfe); db(0xbc); db(0x2c); db(0x5f); db(0x70); db(0x00); db(0x4e); db(0x75); db(0x2c); db(0x78); db(0x00); db(0x04); db(0x74); db(0xff); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x11); db(0x61); db(0x00); - db(0xf6); db(0x02); db(0x4e); db(0x90); db(0x08); db(0x00); db(0x00); db(0x01); + db(0xf6); db(0x1a); db(0x4e); db(0x90); db(0x08); db(0x00); db(0x00); db(0x01); db(0x67); db(0x38); db(0x74); db(0x00); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xee); db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x00); db(0x62); db(0x4e); db(0xae); db(0xfe); db(0xec); db(0x4a); db(0x80); db(0x67); db(0x1e); db(0x20); db(0x40); db(0x43); db(0xfa); db(0x00); db(0x22); db(0x24); db(0x68); db(0xff); db(0xe4); db(0x21); db(0x49); db(0xff); db(0xe4); db(0x22); db(0x48); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x65); db(0x61); db(0x00); - db(0xf5); db(0xca); db(0x4e); db(0x90); db(0x74); db(0x01); db(0x4e); db(0xae); + db(0xf5); db(0xe2); db(0x4e); db(0x90); db(0x74); db(0x01); db(0x4e); db(0xae); db(0xff); db(0x76); db(0x20); db(0x02); db(0x4e); db(0x75); db(0x59); db(0x8f); db(0x48); db(0xe7); db(0xc0); db(0x80); db(0x30); db(0x3c); db(0xff); db(0x38); - db(0x72); db(0x66); db(0x61); db(0x00); db(0xf5); db(0xae); db(0x4e); db(0x90); + db(0x72); db(0x66); db(0x61); db(0x00); db(0xf5); db(0xc6); db(0x4e); db(0x90); db(0x4c); db(0xdf); db(0x01); db(0x03); db(0x4e); db(0x75); db(0x69); db(0x6e); db(0x70); db(0x75); db(0x74); db(0x2e); db(0x64); db(0x65); db(0x76); db(0x69); db(0x63); db(0x65); db(0x00); db(0x74); db(0x69); db(0x6d); db(0x65); db(0x72); diff --git a/gayle.cpp b/gayle.cpp index dbdd29ee..fac017d3 100644 --- a/gayle.cpp +++ b/gayle.cpp @@ -200,7 +200,7 @@ static int pcmcia_card; static int pcmcia_readonly; static int pcmcia_type; static uae_u8 pcmcia_configuration[20]; -static bool pcmcia_configured; +static int pcmcia_configured; static int gayle_id_cnt; static uae_u8 gayle_irq, gayle_int, gayle_cs, gayle_cs_mask, gayle_cfg; @@ -234,14 +234,14 @@ static void ps (int offset, const TCHAR *src, int max) static void pcmcia_reset (void) { memset (pcmcia_configuration, 0, sizeof pcmcia_configuration); - pcmcia_configured = false; + pcmcia_configured = -1; if (PCMCIA_LOG > 0) write_log (_T("PCMCIA reset\n")); } static uae_u8 checkpcmciaideirq (void) { - if (!idedrive || pcmcia_type != PCMCIA_IDE || !pcmcia_configured) + if (!idedrive || pcmcia_type != PCMCIA_IDE || pcmcia_configured < 0) return 0; if (ideregs[PCMCIA_IDE_ID].ide_devcon & 2) return 0; @@ -1563,10 +1563,12 @@ static int pcmcia_common_mask; static uae_u8 *pcmcia_common; static uae_u8 *pcmcia_attrs; static int pcmcia_write_min, pcmcia_write_max; +static int pcmcia_oddevenflip; +static uae_u16 pcmcia_idedata; -static int get_pcmcmia_ide_reg (uaecptr addr) +static int get_pcmcmia_ide_reg (uaecptr addr, int width) { - int reg; + int reg = -1; addr &= 0x80000 - 1; if (addr < 0x20000) @@ -1574,24 +1576,43 @@ static int get_pcmcmia_ide_reg (uaecptr addr) if (addr >= 0x40000) return -1; addr -= 0x20000; - reg = addr & 15; + // 8BITODD + if (addr >= 0x10000) { + addr &= ~0x10000; + addr |= 1; + } ide = idedrive[PCMCIA_IDE_ID * 2]; if (ide->regs->ide_drv) ide = idedrive[PCMCIA_IDE_ID * 2 + 1]; - if (reg < 8) - return reg; - if (reg == 8) - reg = IDE_DATA; - else if (reg == 9) - reg = IDE_DATA; - else if (reg == 13) - reg = IDE_ERROR; - else if (reg == 14) - reg = IDE_DEVCON; - else if (reg == 15) - reg = IDE_DRVADDR; - else - reg = -1; + if (pcmcia_configured == 1) { + // IO mapped linear + reg = addr & 15; + if (reg < 8) + return reg; + if (reg == 8) + reg = IDE_DATA; + else if (reg == 9) + reg = IDE_DATA; + else if (reg == 13) + reg = IDE_ERROR; + else if (reg == 14) + reg = IDE_DEVCON; + else if (reg == 15) + reg = IDE_DRVADDR; + else + reg = -1; + } else if (pcmcia_configured == 2) { + // primary io mapped (PC) + if (addr >= 0x1f0 && addr <= 0x1f7) { + reg = addr - 0x1f0; + } else if (addr == 0x3f6) { + reg = IDE_DEVCON; + } else if (addr == 0x3f7) { + reg = IDE_DRVADDR; + } else { + reg = -1; + } + } return reg; } @@ -1614,16 +1635,16 @@ static uae_u32 gayle_attr_read (uaecptr addr) int offset = (addr - 0x200) / 2; return pcmcia_configuration[offset]; } - if (pcmcia_configured) { - int reg = get_pcmcmia_ide_reg (addr); + if (pcmcia_configured >= 0) { + int reg = get_pcmcmia_ide_reg (addr, 1); if (reg >= 0) { if (reg == 0) { - static uae_u16 data; - if (addr < 0x30000) - data = ide_get_data (); - else - return data & 0xff; - return (data >> 8) & 0xff; + if (addr >= 0x30000) { + return pcmcia_idedata & 0xff; + } else { + pcmcia_idedata = ide_get_data (); + return (pcmcia_idedata >> 8) & 0xff; + } } else { return ide_read_reg (reg); } @@ -1652,23 +1673,26 @@ static void gayle_attr_write (uaecptr addr, uae_u32 v) if (v & 0x80) { pcmcia_reset (); } else { - write_log (_T("PCMCIA IO configured = %02x\n"), v); - if ((v & 0x3f) != 1) - write_log (_T("WARNING: Only config index 1 is emulated!\n")); - pcmcia_configured = true; + int index = v & 0x3f; + if (index != 1 && index != 2) { + write_log (_T("WARNING: Only config index 1 and 2 emulated, attempted to select %d!\n"), index); + } else { + pcmcia_configured = index; + write_log (_T("PCMCIA IO configured = %02x\n"), v); + } } } } - if (pcmcia_configured) { - int reg = get_pcmcmia_ide_reg (addr); + if (pcmcia_configured >= 0) { + int reg = get_pcmcmia_ide_reg (addr, 1); if (reg >= 0) { if (reg == 0) { - static uae_u16 data; if (addr >= 0x30000) { - data = (v & 0xff) << 8; + pcmcia_idedata = (v & 0xff) << 8; } else { - data |= v & 0xff; - ide_put_data (data); + pcmcia_idedata &= 0xff00; + pcmcia_idedata |= v & 0xff; + ide_put_data (pcmcia_idedata); } return; } @@ -2066,11 +2090,12 @@ static uae_u32 REGPARAM2 gayle_attr_wget (uaecptr addr) special_mem |= S_READ; #endif - if (pcmcia_type == PCMCIA_IDE && pcmcia_configured) { - int reg = get_pcmcmia_ide_reg (addr); + if (pcmcia_type == PCMCIA_IDE && pcmcia_configured >= 0) { + int reg = get_pcmcmia_ide_reg (addr, 2); if (reg == IDE_DATA) { // 16-bit register - return ide_get_data (); + pcmcia_idedata = ide_get_data (); + return pcmcia_idedata; } } @@ -2099,11 +2124,12 @@ static void REGPARAM2 gayle_attr_wput (uaecptr addr, uae_u32 value) special_mem |= S_WRITE; #endif - if (pcmcia_type == PCMCIA_IDE && pcmcia_configured) { - int reg = get_pcmcmia_ide_reg (addr); + if (pcmcia_type == PCMCIA_IDE && pcmcia_configured >= 0) { + int reg = get_pcmcmia_ide_reg (addr, 2); if (reg == IDE_DATA) { // 16-bit register - ide_put_data (value); + pcmcia_idedata = value; + ide_put_data (pcmcia_idedata); return; } } diff --git a/include/autoconf.h b/include/autoconf.h index d1b8bbbc..8b3e485c 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -8,6 +8,9 @@ #define RTAREA_DEFAULT 0xf00000 #define RTAREA_BACKUP 0xef0000 +#define RTAREA_SIZE 0x10000 +#define RTAREA_TRAPS 0x2000 +#define RTAREA_RTG 0x3000 extern uae_u32 addr (int); extern void db (uae_u8); @@ -87,6 +90,6 @@ extern void expansion_init (void); extern void expansion_cleanup (void); extern void expansion_clear (void); -extern void uaegfx_install_code (void); +extern void uaegfx_install_code (uaecptr); extern uae_u32 emulib_target_getcpurate (uae_u32, uae_u32*); diff --git a/include/custom.h b/include/custom.h index aed4ca5f..e0129ed0 100644 --- a/include/custom.h +++ b/include/custom.h @@ -62,7 +62,6 @@ STATIC_INLINE int dmaen (unsigned int dmamask) #define SPCFLAG_COPPER 4 #define SPCFLAG_INT 8 #define SPCFLAG_BRK 16 -#define SPCFLAG_EXTRA_CYCLES 32 #define SPCFLAG_TRACE 64 #define SPCFLAG_DOTRACE 128 #define SPCFLAG_DOINT 256 /* arg, JIT fails without this.. */ diff --git a/include/inputdevice.h b/include/inputdevice.h index 8ffcfe7e..653e12c7 100644 --- a/include/inputdevice.h +++ b/include/inputdevice.h @@ -174,7 +174,7 @@ extern uae_u8 handle_joystick_buttons (uae_u8, uae_u8); extern int magicmouse_alive (void); extern int is_tablet (void); extern int inputdevice_is_tablet (void); -extern void input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp, uae_u32 moffset); +extern int input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp, uae_u32 moffset); extern void input_mousehack_mouseoffset (uaecptr pointerprefs); extern int mousehack_alive (void); extern void setmouseactive (int); @@ -255,6 +255,7 @@ extern void inputdevice_tablet_strobe (void); extern int input_getqualifiers (void); +extern void setsystime (void); #define JSEM_MODE_DEFAULT 0 #define JSEM_MODE_MOUSE 1 diff --git a/include/newcpu.h b/include/newcpu.h index 25025a81..11095658 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -391,6 +391,7 @@ extern void m68k_reset (int); extern int getDivu68kCycles (uae_u32 dividend, uae_u16 divisor); extern int getDivs68kCycles (uae_s32 dividend, uae_s16 divisor); extern void m68k_do_rte (void); +extern void protect_roms (bool); extern void mmu_op (uae_u32, uae_u32); extern void mmu_op30 (uaecptr, uae_u32, uae_u16, uaecptr); diff --git a/include/options.h b/include/options.h index 33926400..9c348c9f 100644 --- a/include/options.h +++ b/include/options.h @@ -407,6 +407,7 @@ struct uae_prefs { uae_u32 mbresmem_low_size; uae_u32 mbresmem_high_size; uae_u32 rtgmem_size; + bool rtg_hardwareinterrupt; int rtgmem_type; uae_u32 custom_memory_addrs[MAX_CUSTOM_MEMORY_ADDRS]; uae_u32 custom_memory_sizes[MAX_CUSTOM_MEMORY_ADDRS]; @@ -470,6 +471,7 @@ struct uae_prefs { bool win32_norecyclebin; int win32_guikey; int win32_kbledmode; + bool win32_blankmonitors; TCHAR win32_commandpathstart[MAX_DPATH]; TCHAR win32_commandpathend[MAX_DPATH]; TCHAR win32_parjoyport0[MAX_DPATH]; diff --git a/include/uae.h b/include/uae.h index 5b3c7b42..a6d3e58b 100644 --- a/include/uae.h +++ b/include/uae.h @@ -31,6 +31,7 @@ extern void fixtrailing (TCHAR *p); extern void fullpath (TCHAR *path, int size); extern void getpathpart (TCHAR *outpath, int size, const TCHAR *inpath); extern void getfilepart (TCHAR *out, int size, const TCHAR *path); +extern uae_u32 getlocaltime (void); extern int quit_program; extern bool console_emulation; diff --git a/inputdevice.cpp b/inputdevice.cpp index 0d515b3a..16d1c70b 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -1145,44 +1145,42 @@ int inputdevice_is_tablet (void) return v ? 1 : 0; } -static int getmhoffset (void) -{ - if (!uae_boot_rom) - return 0; - return get_long (rtarea_base + bootrom_header + 7 * 4) + bootrom_header; -} +static uaecptr mousehack_address; +static bool mousehack_enabled; static void mousehack_reset (void) { - int off; - dimensioninfo_width = dimensioninfo_height = 0; mouseoffset_x = mouseoffset_y = 0; dimensioninfo_dbl = 0; mousehack_alive_cnt = 0; vp_xoffset = vp_yoffset = 0; tablet_data = 0; - off = getmhoffset (); - if (off) - rtarea[off + MH_E] = 0; + if (mousehack_address) + put_byte (mousehack_address + MH_E, 0); + mousehack_address = 0; + mousehack_enabled = false; } -static void mousehack_enable (void) +static bool mousehack_enable (void) { - int off, mode; + int mode; if (!uae_boot_rom || currprefs.input_tablet == TABLET_OFF) - return; - off = getmhoffset (); - if (rtarea[off + MH_E]) - return; + return false; + if (mousehack_address && mousehack_enabled) + return true; mode = 0x80; if (currprefs.input_tablet == TABLET_MOUSEHACK) mode |= 1; if (inputdevice_is_tablet () > 0) mode |= 2; - write_log (_T("Mouse driver enabled (%s)\n"), ((mode & 3) == 3 ? _T("tablet+mousehack") : ((mode & 3) == 2) ? _T("tablet") : _T("mousehack"))); - rtarea[off + MH_E] = 0x80; + if (mousehack_address) { + write_log (_T("Mouse driver enabled (%s)\n"), ((mode & 3) == 3 ? _T("tablet+mousehack") : ((mode & 3) == 2) ? _T("tablet") : _T("mousehack"))); + put_byte (mousehack_address + MH_E, mode); + mousehack_enabled = true; + } + return true; } void input_mousehack_mouseoffset (uaecptr pointerprefs) @@ -1191,13 +1189,18 @@ void input_mousehack_mouseoffset (uaecptr pointerprefs) mouseoffset_y = (uae_s16)get_word (pointerprefs + 30); } -void input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp, uae_u32 moffset) +int input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecptr vp, uae_u32 moffset) { - if (mode == 0) { - uae_u8 v = rtarea[getmhoffset ()]; + if (mode == 4) { + return mousehack_enable () ? 1 : 0; + } else if (mode == 5) { + mousehack_address = m68k_dreg (regs, 0); + mousehack_enable (); + } else if (mode == 0) { + uae_u8 v = get_byte (mousehack_address + MH_E); v |= 0x40; - rtarea[getmhoffset ()] = v; - write_log (_T("Tablet driver running (%02x)\n"), v); + put_byte (mousehack_address + MH_E, v); + write_log (_T("Tablet driver running (%08x,%02x)\n"), mousehack_address, v); } else if (mode == 1) { int x1 = -1, y1 = -1, x2 = -1, y2 = -1; uae_u32 props = 0; @@ -1229,37 +1232,32 @@ void input_mousehack_status (int mode, uaecptr diminfo, uaecptr dispinfo, uaecpt else if (mousehack_alive_cnt > 0) mousehack_alive_cnt = 100; } + return 1; } void get_custom_mouse_limits (int *w, int *h, int *dx, int *dy, int dbl); void inputdevice_tablet_strobe (void) { - uae_u8 *p; - uae_u32 off; - mousehack_enable (); if (!uae_boot_rom) return; if (!tablet_data) return; - off = getmhoffset (); - p = rtarea + off; - p[MH_CNT]++; + if (mousehack_address) + put_byte (mousehack_address + MH_CNT, get_byte (mousehack_address + MH_CNT) + 1); } void inputdevice_tablet (int x, int y, int z, int pressure, uae_u32 buttonbits, int inproximity, int ax, int ay, int az) { uae_u8 *p; uae_u8 tmp[MH_END]; - uae_u32 off; mousehack_enable (); if (inputdevice_is_tablet () <= 0) return; //write_log (_T("%d %d %d %d %08X %d %d %d %d\n"), x, y, z, pressure, buttonbits, inproximity, ax, ay, az); - off = getmhoffset (); - p = rtarea + off; + p = get_real_address (mousehack_address); memcpy (tmp, p + MH_START, MH_END - MH_START); #if 0 @@ -1338,7 +1336,7 @@ void inputdevice_tablet (int x, int y, int z, int pressure, uae_u32 buttonbits, if (!memcmp (tmp, p + MH_START, MH_END - MH_START)) return; - rtarea[off + MH_E] = 0xc0 | 2; + p[MH_E] = 0xc0 | 2; p[MH_CNT]++; } @@ -1348,7 +1346,7 @@ void inputdevice_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay if (!uae_boot_rom) return; - p = rtarea + getmhoffset (); + p = get_real_address (mousehack_address); tablet_maxx = maxx; tablet_maxy = maxy; @@ -1379,11 +1377,11 @@ static void inputdevice_mh_abs (int x, int y) { uae_u8 *p; uae_u8 tmp[4]; - uae_u32 off; mousehack_enable (); - off = getmhoffset (); - p = rtarea + off; + if (!mousehack_address) + return; + p = get_real_address (mousehack_address); memcpy (tmp, p + MH_ABSX, sizeof tmp); @@ -1397,7 +1395,7 @@ static void inputdevice_mh_abs (int x, int y) if (!memcmp (tmp, p + MH_ABSX, sizeof tmp)) return; - rtarea[off + MH_E] = 0xc0 | 1; + p[MH_E] = 0xc0 | 1; p[MH_CNT]++; tablet_data = 1; } @@ -2546,6 +2544,7 @@ void inputdevice_handle_inputcode (void) { case AKS_ENTERGUI: gui_display (-1); + setsystime (); break; case AKS_SCREENSHOT_FILE: screenshot (1, 1); @@ -2560,15 +2559,19 @@ void inputdevice_handle_inputcode (void) #endif case AKS_FLOPPY0: gui_display (0); + setsystime (); break; case AKS_FLOPPY1: gui_display (1); + setsystime (); break; case AKS_FLOPPY2: gui_display (2); + setsystime (); break; case AKS_FLOPPY3: gui_display (3); + setsystime (); break; case AKS_EFLOPPY0: disk_eject (0); @@ -5763,27 +5766,48 @@ void inputdevice_swap_ports (struct uae_prefs *p, int devnum) } //memcpy (p->joystick_settings[dst], p->joystick_settings[src], sizeof (struct uae_input_device) * MAX_INPUT_DEVICES); -static void copydev (struct uae_input_device *dst, struct uae_input_device *src) +static void copydev (struct uae_input_device *dst, struct uae_input_device *src, int selectedwidget) { for (int i = 0; i < MAX_INPUT_DEVICES; i++) { for (int j = 0; j < MAX_INPUT_DEVICE_EVENTS; j++) { + if (j == selectedwidget || selectedwidget < 0) { + for (int k = 0; k < MAX_INPUT_SUB_EVENT_ALL; k++) { + xfree (dst[i].custom[j][k]); + } + } + } + if (selectedwidget < 0) { + xfree (dst[i].configname); + xfree (dst[i].name); + } + } + if (selectedwidget < 0) { + memcpy (dst, src, sizeof (struct uae_input_device) * MAX_INPUT_DEVICES); + } else { + int j = selectedwidget; + for (int i = 0; i < MAX_INPUT_DEVICES; i++) { for (int k = 0; k < MAX_INPUT_SUB_EVENT_ALL; k++) { - xfree (dst[i].custom[j][k]); + dst[i].eventid[j][k] = src[i].eventid[j][k]; + dst[i].custom[j][k] = src[i].custom[j][k]; + dst[i].flags[j][k] = src[i].flags[j][k]; + dst[i].port[j][k] = src[i].port[j][k]; } + dst[i].extra[j] = src[i].extra[j]; } - xfree (dst[i].configname); - xfree (dst[i].name); } - memcpy (dst, src, sizeof (struct uae_input_device) * MAX_INPUT_DEVICES); for (int i = 0; i < MAX_INPUT_DEVICES; i++) { for (int j = 0; j < MAX_INPUT_DEVICE_EVENTS; j++) { - for (int k = 0; k < MAX_INPUT_SUB_EVENT_ALL; k++) { - if (dst[i].custom) - dst[i].custom[j][k] = my_strdup (dst[i].custom[j][k]); + if (j == selectedwidget || selectedwidget < 0) { + for (int k = 0; k < MAX_INPUT_SUB_EVENT_ALL; k++) { + if (dst[i].custom) + dst[i].custom[j][k] = my_strdup (dst[i].custom[j][k]); + } } } - dst[i].configname = my_strdup (dst[i].configname); - dst[i].name = my_strdup (dst[i].name); + if (selectedwidget < 0) { + dst[i].configname = my_strdup (dst[i].configname); + dst[i].name = my_strdup (dst[i].name); + } } } @@ -5792,6 +5816,12 @@ static void copydev (struct uae_input_device *dst, struct uae_input_device *src) // +2 = default (pc keyboard) void inputdevice_copy_single_config (struct uae_prefs *p, int src, int dst, int devnum, int selectedwidget) { + if (selectedwidget >= 0) { + if (devnum < 0) + return; + if (gettype (devnum) != IDTYPE_KEYBOARD) + return; + } if (src >= MAX_INPUT_SETTINGS) { if (gettype (devnum) == IDTYPE_KEYBOARD) { p->input_keyboard_type = src > MAX_INPUT_SETTINGS ? 1 : 0; @@ -5803,11 +5833,11 @@ void inputdevice_copy_single_config (struct uae_prefs *p, int src, int dst, int return; if (src < MAX_INPUT_SETTINGS) { if (devnum < 0 || gettype (devnum) == IDTYPE_JOYSTICK) - copydev (p->joystick_settings[dst], p->joystick_settings[src]); + copydev (p->joystick_settings[dst], p->joystick_settings[src], selectedwidget); if (devnum < 0 || gettype (devnum) == IDTYPE_MOUSE) - copydev (p->mouse_settings[dst], p->mouse_settings[src]); + copydev (p->mouse_settings[dst], p->mouse_settings[src], selectedwidget); if (devnum < 0 || gettype (devnum) == IDTYPE_KEYBOARD) - copydev (p->keyboard_settings[dst], p->keyboard_settings[src]); + copydev (p->keyboard_settings[dst], p->keyboard_settings[src], selectedwidget); } } @@ -6171,6 +6201,7 @@ void warpmode (int mode) #endif changed_prefs.turbo_emulation = currprefs.turbo_emulation; config_changed = 1; + setsystime (); } void pausemode (int mode) @@ -6180,6 +6211,7 @@ void pausemode (int mode) else pause_emulation = mode; config_changed = 1; + setsystime (); } int jsem_isjoy (int port, const struct uae_prefs *p) diff --git a/inputrecord.cpp b/inputrecord.cpp index 72ff5a5b..fb3d0e3a 100644 --- a/inputrecord.cpp +++ b/inputrecord.cpp @@ -8,7 +8,7 @@ */ #define INPUTRECORD_DEBUG 1 -#define ENABLE_DEBUGGER 1 +#define ENABLE_DEBUGGER 0 #define HEADERSIZE 12 diff --git a/memory.cpp b/memory.cpp index a0ed858f..a9b728ac 100644 --- a/memory.cpp +++ b/memory.cpp @@ -917,6 +917,7 @@ static void a1000_handle_kickstart (int mode) { if (!a1000_bootrom) return; + protect_roms (false); if (mode == 0) { a1000_kickstart_mode = 0; memcpy (kickmemory, kickmemory + 262144, 262144); @@ -1511,6 +1512,7 @@ void a3000_fakekick (int map) { static uae_u8 *kickstore; + protect_roms (false); if (map) { uae_u8 *fkickmemory = a3000lmemory + allocated_a3000lmem - fkickmem_size; if (fkickmemory[2] == 0x4e && fkickmemory[3] == 0xf9 && fkickmemory[4] == 0x00) { @@ -1543,6 +1545,7 @@ void a3000_fakekick (int map) xfree (kickstore); kickstore = NULL; } + protect_roms (true); } static uae_char *kickstring = "exec.library"; diff --git a/newcpu.cpp b/newcpu.cpp index 6e5d8d43..c3022614 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -1087,13 +1087,15 @@ static void build_cpufunctbl (void) void fill_prefetch (void) { - if (currprefs.mmu_model) + if (currprefs.cpu_model >= 68020) return; regs.ir = x_get_word (m68k_getpc ()); regs.irc = x_get_word (m68k_getpc () + 2); } static void fill_prefetch_quick (void) { + if (currprefs.cpu_model >= 68020) + return; regs.ir = get_word (m68k_getpc ()); regs.irc = get_word (m68k_getpc () + 2); } @@ -3368,7 +3370,7 @@ void doint (void) set_special (SPCFLAG_DOINT); } -#define IDLETIME (currprefs.cpu_idle * sleep_resolution / 700) +#define IDLETIME (currprefs.cpu_idle * sleep_resolution / 1000) STATIC_INLINE int do_specialties (int cycles) { @@ -4366,7 +4368,9 @@ void m68k_go (int may_quit) currprefs.cpu_model >= 68020 && currprefs.cpu_cycle_exact ? m68k_run_2ce : currprefs.cpu_compatible ? m68k_run_2p : m68k_run_2; } + protect_roms (true); run_func (); + protect_roms (false); } in_m68k_go--; } @@ -5089,7 +5093,7 @@ uae_u8 *restore_cpu_extra (uae_u8 *src) currprefs.cpu_compatible = changed_prefs.cpu_compatible = (flags & 2) ? true : false; currprefs.cpu_frequency = changed_prefs.cpu_frequency = restore_u32 (); currprefs.cpu_clock_multiplier = changed_prefs.cpu_clock_multiplier = restore_u32 (); - currprefs.cachesize = changed_prefs.cachesize = (flags & 8) ? 8192 : 0; + //currprefs.cachesize = changed_prefs.cachesize = (flags & 8) ? 8192 : 0; currprefs.m68k_speed = changed_prefs.m68k_speed = 0; if (flags & 4) diff --git a/od-win32/blkdev_win32_ioctl.cpp b/od-win32/blkdev_win32_ioctl.cpp index 246824c5..f449f1b1 100644 --- a/od-win32/blkdev_win32_ioctl.cpp +++ b/od-win32/blkdev_win32_ioctl.cpp @@ -1247,18 +1247,23 @@ static int sys_cddev_open (struct dev_info_ioctl *ciw, int unitnum) write_log (_T("IOCTL: failed to open '%s', err=%d\n"), ciw->devname, GetLastError ()); goto error; } + write_log (_T("IOCTL: device '%s' (%s/%s/%s) opened succesfully (unit=%d,media=%d)\n"), + ciw->devname, ciw->di.vendorid, ciw->di.productid, ciw->di.revision, + unitnum, ciw->di.media_inserted); + if (!_tcsicmp (ciw->di.vendorid, _T("iomega")) && !_tcsicmp (ciw->di.productid, _T("rrd"))) { + write_log (_T("Device blacklisted\n")); + goto error2; + } uae_sem_init (&ciw->sub_sem, 0, 1); uae_sem_init (&ciw->sub_sem2, 0, 1); + //ciw->usesptiread = true; ioctl_command_stop (unitnum); update_device_info (unitnum); ciw->open = true; - //ciw->usesptiread = true; - write_log (_T("IOCTL: device '%s' (%s/%s/%s) opened succesfully (unit=%d,media=%d)\n"), - ciw->devname, ciw->di.vendorid, ciw->di.productid, ciw->di.revision, - unitnum, ciw->di.media_inserted); return 0; error: win32_error (ciw, unitnum, _T("CreateFile")); +error2: VirtualFree (ciw->tempbuffer, 0, MEM_RELEASE); ciw->tempbuffer = NULL; CloseHandle (ciw->h); diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 6d418eac..70dac721 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -146,7 +146,8 @@ static bool rawhid_found; static uae_s16 axisold[MAX_INPUT_DEVICES][256]; int no_rawinput = 0; -int dinput_enum_all; +int no_directinput = 1; +static int dinput_enum_all; int dinput_winmouse (void) { @@ -2569,24 +2570,26 @@ static int di_do_init (void) if (!rawhid_found) rawinput_enabled_hid = 0; - hr = DirectInput8Create (hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID *)&g_lpdi, NULL); - if (FAILED (hr)) { - write_log (_T("DirectInput8Create failed, %s\n"), DXError (hr)); - } else { - if (dinput_enum_all) { - write_log (_T("DirectInput enumeration..\n")); - g_lpdi->EnumDevices (DI8DEVCLASS_ALL, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); + if (!no_directinput) { + hr = DirectInput8Create (hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID *)&g_lpdi, NULL); + if (FAILED (hr)) { + write_log (_T("DirectInput8Create failed, %s\n"), DXError (hr)); } else { - if (!rawinput_enabled_keyboard) { - write_log (_T("DirectInput enumeration.. Keyboards..\n")); - g_lpdi->EnumDevices (DI8DEVCLASS_KEYBOARD, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); - } - if (!rawinput_enabled_mouse) { - write_log (_T("DirectInput enumeration.. Pointing devices..\n")); - g_lpdi->EnumDevices (DI8DEVCLASS_POINTER, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); + if (dinput_enum_all) { + write_log (_T("DirectInput enumeration..\n")); + g_lpdi->EnumDevices (DI8DEVCLASS_ALL, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); + } else { + if (!rawinput_enabled_keyboard) { + write_log (_T("DirectInput enumeration.. Keyboards..\n")); + g_lpdi->EnumDevices (DI8DEVCLASS_KEYBOARD, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); + } + if (!rawinput_enabled_mouse) { + write_log (_T("DirectInput enumeration.. Pointing devices..\n")); + g_lpdi->EnumDevices (DI8DEVCLASS_POINTER, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); + } + write_log (_T("DirectInput enumeration.. Game controllers..\n")); + g_lpdi->EnumDevices (DI8DEVCLASS_GAMECTRL, di_enumcallbackj, 0, DIEDFL_ATTACHEDONLY); } - write_log (_T("DirectInput enumeration.. Game controllers..\n")); - g_lpdi->EnumDevices (DI8DEVCLASS_GAMECTRL, di_enumcallbackj, 0, DIEDFL_ATTACHEDONLY); } } diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index 30858aed..afb144c3 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -2028,7 +2028,7 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int depth, int mmult) typedef HRESULT (WINAPI *LPDIRECT3DCREATE9EX)(UINT, IDirect3D9Ex**); LPDIRECT3DCREATE9EX d3dexp = NULL; int vsync = isvsync (); - struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0]; + struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[APMODE_RTG] : &currprefs.gfx_apmode[APMODE_NATIVE]; D3D_free2 (); if (!currprefs.gfx_api) { @@ -2117,7 +2117,7 @@ const TCHAR *D3D_init (HWND ahwnd, int w_w, int w_h, int depth, int mmult) vsync2 = 0; int hzmult = 0; if (isfullscreen () > 0) { - dpp.FullScreen_RefreshRateInHz = ap->gfx_refreshrate > 0 ? ap->gfx_refreshrate : 0; + dpp.FullScreen_RefreshRateInHz = getrefreshrate (modeex.Width, modeex.Height); modeex.RefreshRate = dpp.FullScreen_RefreshRateInHz; if (vsync > 0) { dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE; diff --git a/od-win32/mman.cpp b/od-win32/mman.cpp index 2ea23b41..982962b5 100644 --- a/od-win32/mman.cpp +++ b/od-win32/mman.cpp @@ -188,7 +188,7 @@ static void resetmem (void) if (!s->natmembase) continue; shmaddr = natmem_offset + ((uae_u8*)s->attached - (uae_u8*)s->natmembase); - result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, s->mode); + result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, PAGE_READWRITE); if (result != shmaddr) write_log (_T("NATMEM: realloc(%p,%d,%d) failed, err=%x\n"), shmaddr, size, s->mode, GetLastError ()); else @@ -411,12 +411,12 @@ int mprotect (void *addr, size_t len, int prot) void *shmat (int shmid, void *shmaddr, int shmflg) { void *result = (void *)-1; - BOOL got = FALSE; + BOOL got = FALSE, readonly = FALSE; int p96special = FALSE; - DWORD protect = PAGE_READWRITE; #ifdef NATMEM_OFFSET unsigned int size = shmids[shmid].size; + unsigned int readonlysize = size; if (shmids[shmid].attached) return shmids[shmid].attached; @@ -432,22 +432,28 @@ void *shmat (int shmid, void *shmaddr, int shmflg) shmaddr=natmem_offset + 0xf80000; got = TRUE; size += BARRIER; + readonly = TRUE; } if(!_tcscmp (shmids[shmid].name, _T("rom_a8"))) { shmaddr=natmem_offset + 0xa80000; got = TRUE; + readonly = TRUE; } if(!_tcscmp (shmids[shmid].name, _T("rom_e0"))) { shmaddr=natmem_offset + 0xe00000; got = TRUE; + readonly = TRUE; } if(!_tcscmp (shmids[shmid].name, _T("rom_f0"))) { shmaddr=natmem_offset + 0xf00000; got = TRUE; + readonly = TRUE; } if(!_tcscmp (shmids[shmid].name, _T("rtarea"))) { shmaddr=natmem_offset + rtarea_base; got = TRUE; + readonly = TRUE; + readonlysize = RTAREA_TRAPS; } if(!_tcscmp (shmids[shmid].name, _T("fast"))) { shmaddr=natmem_offset + 0x200000; @@ -571,14 +577,16 @@ void *shmat (int shmid, void *shmaddr, int shmflg) #endif if (shmids[shmid].key == shmid && shmids[shmid].size) { + DWORD protect = readonly ? PAGE_READONLY : PAGE_READWRITE; shmids[shmid].mode = protect; + shmids[shmid].rosize = readonlysize; shmids[shmid].natmembase = natmem_offset; if (shmaddr) virtualfreewithlock (shmaddr, size, MEM_DECOMMIT); - result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, protect); + result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, PAGE_READWRITE); if (result == NULL) virtualfreewithlock (shmaddr, 0, MEM_DECOMMIT); - result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, protect); + result = virtualallocwithlock (shmaddr, size, MEM_COMMIT, PAGE_READWRITE); if (result == NULL) { result = (void*)-1; write_log (_T("VirtualAlloc %08X - %08X %x (%dk) failed %d\n"), @@ -594,6 +602,25 @@ void *shmat (int shmid, void *shmaddr, int shmflg) return result; } +void protect_roms (bool protect) +{ + struct shmid_ds *shm; + + if (!currprefs.cachesize || currprefs.comptrustbyte || currprefs.comptrustword || currprefs.comptrustlong) + return; + for (int i = 0; i < MAX_SHMID; i++) { + DWORD old; + shm = &shmids[i]; + if (shm->mode != PAGE_READONLY) + continue; + if (!VirtualProtect (shm->attached, shm->rosize, protect ? PAGE_READONLY : PAGE_READWRITE, &old)) { + write_log (_T("VirtualProtect %08X - %08X %x (%dk) failed %d\n"), + (uae_u8*)shm->attached - natmem_offset, (uae_u8*)shm->attached - natmem_offset + shm->size, + shm->size, shm->size >> 10, GetLastError ()); + } + } +} + int shmdt (const void *shmaddr) { return 0; diff --git a/od-win32/picasso96_win.cpp b/od-win32/picasso96_win.cpp index b83b93ff..1fe6205a 100644 --- a/od-win32/picasso96_win.cpp +++ b/od-win32/picasso96_win.cpp @@ -660,7 +660,7 @@ static int doskip (void) void picasso_trigger_vblank (void) { - if (!ABI_interrupt || !uaegfx_base || !interrupt_enabled || currprefs.win32_rtgvblankrate < -1) + if (!ABI_interrupt || !uaegfx_base || !interrupt_enabled || !currprefs.rtg_hardwareinterrupt) return; put_long (uaegfx_base + CARD_IRQPTR, ABI_interrupt + PSSO_BoardInfo_SoftInterrupt); put_byte (uaegfx_base + CARD_IRQFLAG, 1); @@ -2156,7 +2156,7 @@ void picasso96_alloc (TrapContext *ctx) picasso96_alloc2 (ctx); } -static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI); +static void inituaegfxfuncs (uaecptr start, uaecptr ABI); static void inituaegfx (uaecptr ABI) { uae_u32 flags; @@ -2206,7 +2206,7 @@ static void inituaegfx (uaecptr ABI) hwsprite = 0; write_log (_T("P96: Hardware sprite support disabled\n")); } - if (currprefs.win32_rtgvblankrate >= -1 && !uaegfx_old) + if (currprefs.rtg_hardwareinterrupt && !uaegfx_old) flags |= BIF_VBLANKINTERRUPT; if (!(flags & BIF_INDISPLAYCHAIN)) { write_log (_T("P96: BIF_INDISPLAYCHAIN force-enabled!\n")); @@ -4020,7 +4020,7 @@ static bool flushpixels (void) break; } - if (!currprefs.gfx_api && (currprefs.leds_on_screen & STATUSLINE_RTG)) { + if (currprefs.leds_on_screen & STATUSLINE_RTG) { if (dst == NULL) { dst = gfx_lock_picasso (false, false); if (dst) @@ -4246,13 +4246,10 @@ static uae_u32 REGPARAM2 picasso_SetMemoryMode(TrapContext *ctx) if (ABI) \ put_long (ABI + func, start); -static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI) +static void inituaegfxfuncs (uaecptr start, uaecptr ABI) { - uaecptr old = here (); - uaecptr ptr; - if (uaegfx_old) - return 0; + return; org (start); dw (RTS); @@ -4406,11 +4403,8 @@ static uaecptr inituaegfxfuncs (uaecptr start, uaecptr ABI) write_log (_T("uaegfx.card magic code: %08X-%08X ABI=%08X\n"), start, here (), ABI); - if (ABI && currprefs.win32_rtgvblankrate >= -1) + if (ABI && currprefs.rtg_hardwareinterrupt) initvblankABI (uaegfx_base, ABI); - ptr = here (); - org (old); - return ptr; } void picasso_reset (void) @@ -4420,14 +4414,15 @@ void picasso_reset (void) uaegfx_active = 0; interrupt_enabled = 0; reserved_gfxmem = 0; - resetpalette(); + resetpalette (); + InitPicasso96 (); } -void uaegfx_install_code (void) +void uaegfx_install_code (uaecptr start) { - uaecptr start = here (); uaegfx_rom = start; - org (inituaegfxfuncs (start, 0)); + org (start); + inituaegfxfuncs (start, 0); } #define UAEGFX_VERSION 3 @@ -4513,7 +4508,7 @@ static uaecptr uaegfx_card_install (TrapContext *ctx, uae_u32 extrasize) put_long (uaegfx_base + CARD_RESLIST, uaegfx_base + CARD_SIZEOF); put_long (uaegfx_base + CARD_RESLISTSIZE, extrasize); - if (currprefs.win32_rtgvblankrate >= -1) + if (currprefs.rtg_hardwareinterrupt) initvblankirq (ctx, uaegfx_base); write_log (_T("uaegfx.card %d.%d init @%08X\n"), UAEGFX_VERSION, UAEGFX_REVISION, uaegfx_base); diff --git a/od-win32/posixemu.cpp b/od-win32/posixemu.cpp index 604bb24d..db0e5c13 100644 --- a/od-win32/posixemu.cpp +++ b/od-win32/posixemu.cpp @@ -34,6 +34,20 @@ extern HANDLE AVTask; +uae_u32 getlocaltime (void) +{ + SYSTEMTIME st; + FILETIME ft; + ULARGE_INTEGER t; + + GetLocalTime (&st); + SystemTimeToFileTime (&st, &ft); + t.LowPart = ft.dwLowDateTime; + t.HighPart = ft.dwHighDateTime; + t.QuadPart -= 11644473600000 * 10000; + return (uae_u32)(t.QuadPart / 10000000); +} + /* Our Win32 implementation of this function */ void gettimeofday (struct timeval *tv, void *blah) { diff --git a/od-win32/resources/resource b/od-win32/resources/resource index b6369370..8f081569 100644 --- a/od-win32/resources/resource +++ b/od-win32/resources/resource @@ -1060,6 +1060,8 @@ #define IDC_DF1WPTEXTQ 1794 #define IDC_RTG_Z2Z3 1794 #define IDC_RTG_BUFFERCNT 1795 +#define IDC_RTG_SCALE_ALLOW2 1796 +#define IDC_RTG_VBINTERRUPT 1796 #define IDC_INPUTMAPLIST 1797 #define IDC_PORT1_REMAP 1798 #define IDC_PORT0_REMAP 1799 @@ -1077,7 +1079,6 @@ #define IDC_RTG_DISPLAYSELECT 1809 #define IDC_MISCLIST 1810 #define IDC_STATENAME 1811 -#define IDC_EDIT1 1812 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 90116fbf..15ffe6df 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -997,7 +997,7 @@ BEGIN RTEXT "Memory: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,25,35,53,10,SS_NOTIFY | SS_CENTERIMAGE CONTROL "",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,31,60,20 EDITTEXT IDC_P96RAM,152,34,34,12,ES_CENTER | ES_READONLY - GROUPBOX "RTG Graphics Card",IDC_STATIC,5,1,291,145 + GROUPBOX "RTG Graphics Card",IDC_STATIC,5,1,291,157 CONTROL "Scale if smaller than display size setting",IDC_RTG_SCALE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,65,162,10 CONTROL "Match host and RTG color depth if possible",IDC_RTG_MATCH_DEPTH, @@ -1008,27 +1008,29 @@ BEGIN COMBOBOX IDC_RTG_32BIT,211,66,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CONTROL "Always scale in windowed mode",IDC_RTG_SCALE_ALLOW, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,77,162,10 - COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,211,126,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CTEXT "Aspect ratio:",IDC_STATIC,215,113,60,10,SS_CENTERIMAGE - CTEXT "Refresh rate:",IDC_STATIC,28,113,64,10,SS_CENTERIMAGE - COMBOBOX IDC_RTG_VBLANKRATE,21,128,68,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_SCALE_ASPECTRATIO,211,138,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CTEXT "Aspect ratio:",IDC_STATIC,215,125,60,10,SS_CENTERIMAGE + CTEXT "Refresh rate:",IDC_STATIC,28,125,64,10,SS_CENTERIMAGE + COMBOBOX IDC_RTG_VBLANKRATE,21,138,68,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CONTROL "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,171,120,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,180,120,10 CONTROL "uaenet.device [] Sana 2 compatible network device emulation. WinPcap required.",IDC_SANA2, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,183,77,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,192,77,10 CONTROL "A2065 Z2 [] A2065 Ethernet Zorro II card emulation. WinPcap required.",IDC_A2065, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,233,183,57,10 - GROUPBOX "Network",IDC_STATIC,126,153,169,66 - COMBOBOX IDC_NETDEVICE,132,199,156,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,183,102,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,233,192,57,10 + GROUPBOX "Network",IDC_STATIC,126,162,169,66 + COMBOBOX IDC_NETDEVICE,132,208,156,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,192,102,10 CONTROL "Catweasel Z2 emulation [] Catweasel MK2 Zorro II card emulation. Physical Windows compatible Catweasel card and drivers required.",IDC_CATWEASEL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,171,101,10 - GROUPBOX "Miscellaneous Expansions",IDC_STATIC,5,153,117,66 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,180,101,10 + GROUPBOX "Miscellaneous Expansions",IDC_STATIC,5,162,117,66 COMBOBOX IDC_RTG_Z2Z3,26,14,68,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CTEXT "Buffer mode:",IDC_STATIC,112,113,81,10,SS_CENTERIMAGE - COMBOBOX IDC_RTG_BUFFERCNT,111,126,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CTEXT "Buffer mode:",IDC_STATIC,112,125,81,10,SS_CENTERIMAGE + COMBOBOX IDC_RTG_BUFFERCNT,111,138,84,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CTEXT "Color modes:",IDC_STATIC,215,9,62,10,SS_CENTERIMAGE - COMBOBOX IDC_RTG_DISPLAYSELECT,11,94,279,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_DISPLAYSELECT,11,106,279,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CONTROL "Hardware vertical blank interrupt",IDC_RTG_VBINTERRUPT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,89,162,10 END IDD_INPUTMAP DIALOGEX 0, 0, 300, 240 diff --git a/od-win32/sys/mman.h b/od-win32/sys/mman.h index c79359e6..1e5d49b5 100644 --- a/od-win32/sys/mman.h +++ b/od-win32/sys/mman.h @@ -21,6 +21,7 @@ typedef USHORT ushort; struct shmid_ds { key_t key; size_t size; + size_t rosize; void *addr; TCHAR name[MAX_PATH]; void *attached; diff --git a/od-win32/uaeunp/uaeunp.vcxproj b/od-win32/uaeunp/uaeunp.vcxproj index 736155fa..c06a843a 100644 --- a/od-win32/uaeunp/uaeunp.vcxproj +++ b/od-win32/uaeunp/uaeunp.vcxproj @@ -43,6 +43,10 @@ d:\amiga\ $(Configuration)\ false + C:\dev\include;$(IncludePath) + C:\dev\lib;$(LibraryPath) + C:\dev\include;$(IncludePath) + C:\dev\lib;$(LibraryPath) diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 790b3afd..476b146b 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -91,7 +91,7 @@ #include "cloanto/RetroPlatformIPC.h" #endif -extern int harddrive_dangerous, do_rdbdump, no_rawinput; +extern int harddrive_dangerous, do_rdbdump, no_rawinput, no_directinput; extern int force_directsound; extern int log_a2065, a2065_promiscuous; extern int rawinput_enabled_hid, rawinput_log; @@ -462,6 +462,7 @@ void resumepaused (int priority) #ifdef RETROPLATFORM rp_pause (pause_emulation); #endif + setsystime (); } void setpaused (int priority) { @@ -1842,6 +1843,11 @@ static LRESULT CALLBACK HiddenWindowProc (HWND hWnd, UINT message, WPARAM wParam return DefWindowProc (hWnd, message, wParam, lParam); } +static LRESULT CALLBACK BlankWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + return DefWindowProc (hWnd, message, wParam, lParam); +} + int handle_msgpump (void) { int got = 0; @@ -1978,6 +1984,20 @@ static int WIN32_RegisterClasses (void) if (!RegisterClass (&wc)) return 0; + wc.style = 0; + wc.lpfnWndProc = BlankWindowProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = DLGWINDOWEXTRA; + wc.hInstance = hInst; + wc.hIcon = LoadIcon (GetModuleHandle (NULL), MAKEINTRESOURCE (IDI_APPICON)); + wc.hCursor = NULL; + wc.hbrBackground = CreateSolidBrush (g_dwBackgroundColor); + wc.lpszMenuName = 0; + wc.lpszClassName = _T("Blank"); + if (!RegisterClass (&wc)) + return 0; + + hHiddenWnd = CreateWindowEx (0, _T("Useless"), _T("You don't see me"), WS_POPUP, @@ -2870,6 +2890,7 @@ void target_default_options (struct uae_prefs *p, int type) p->win32_kbledmode = 1; p->win32_uaescsimode = UAESCSI_CDEMU; p->win32_borderless = 0; + p->win32_blankmonitors = false; p->win32_powersavedisabled = 1; p->sana2 = 0; p->win32_rtgmatchdepth = 1; @@ -2972,6 +2993,7 @@ void target_save_options (struct zfile *f, struct uae_prefs *p) else cfgfile_target_dwrite (f, _T("rtg_vblank"), _T("%d"), p->win32_rtgvblankrate); cfgfile_target_dwrite_bool (f, _T("borderless"), p->win32_borderless); + cfgfile_target_dwrite_bool (f, _T("blank_monitors"), p->win32_blankmonitors); cfgfile_target_dwrite_str (f, _T("uaescsimode"), scsimode[p->win32_uaescsimode]); cfgfile_target_dwrite_str (f, _T("statusbar"), statusbarmode[p->win32_statusbar]); cfgfile_target_write (f, _T("soundcard"), _T("%d"), p->win32_soundcard); @@ -3045,6 +3067,7 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR * || cfgfile_yesno (option, value, _T("logfile"), &p->win32_logfile) || cfgfile_yesno (option, value, _T("networking"), &p->socket_emu) || cfgfile_yesno (option, value, _T("borderless"), &p->win32_borderless) + || cfgfile_yesno (option, value, _T("blank_monitors"), &p->win32_blankmonitors) || cfgfile_yesno (option, value, _T("active_not_captured_pause"), &p->win32_active_nocapture_pause) || cfgfile_yesno (option, value, _T("active_not_captured_nosound"), &p->win32_active_nocapture_nosound) || cfgfile_yesno (option, value, _T("inactive_pause"), &p->win32_inactive_pause) @@ -4549,6 +4572,8 @@ extern int vsync_busy_wait_mode; extern int debug_rtg_blitter; extern int log_bsd; extern int inputdevice_logging; +extern int vsync_modechangetimeout; + extern DWORD_PTR cpu_affinity, cpu_paffinity; static DWORD_PTR original_affinity = -1; @@ -4675,6 +4700,10 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2) no_rawinput = 1; return 1; } + if (!_tcscmp (arg, _T("nodirectinput"))) { + no_directinput = 1; + return 1; + } if (!_tcscmp (arg, _T("rawhid"))) { rawinput_enabled_hid = 1; return 1; @@ -4827,6 +4856,10 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2) if (!np) return 0; + if (!_tcscmp (arg, _T("vsync_modechangetimeout"))) { + vsync_modechangetimeout = getval (np); + return 2; + } if (!_tcscmp (arg, _T("rtg_blitter"))) { debug_rtg_blitter = getval (np); return 2; diff --git a/od-win32/win32.h b/od-win32/win32.h index c3294bb6..1502845c 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -19,8 +19,8 @@ #define LANG_DLL 1 //#define WINUAEBETA _T("") -#define WINUAEBETA _T("5") -#define WINUAEDATE MAKEBD(2012, 6, 18) +#define WINUAEBETA _T("6") +#define WINUAEDATE MAKEBD(2012, 7, 10) #define WINUAEEXTRA _T("") //#define WINUAEEXTRA _T("AmiKit Preview") #define WINUAEREV _T("") diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index 57f641d5..bcf4cc9b 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -84,7 +84,6 @@ struct winuae_currentmode { int native_width, native_height, native_depth, pitch; int current_width, current_height, current_depth; int amiga_width, amiga_height; - int frequency; int initdone; int fullfill; int vsync; @@ -107,7 +106,9 @@ static int wasfullwindow_a, wasfullwindow_p; static int vblankbasewait1, vblankbasewait2, vblankbasewait3, vblankbasefull, vblankbaseadjust; static bool vblankbaselace; static int vblankbaselace_chipset; -static bool vblankthread_oddeven; +static bool vblankthread_oddeven, vblankthread_oddeven_got; +static int graphics_mode_changed; +int vsync_modechangetimeout = 10; int screen_is_picasso = 0; @@ -400,14 +401,39 @@ static int rgbformat_bits (RGBFTYPE t) : 0); } +int getrefreshrate (int width, int height) +{ + struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[APMODE_RTG] : &currprefs.gfx_apmode[APMODE_NATIVE]; + int freq = 0; + + if (ap->gfx_refreshrate <= 0) + return 0; + + struct MultiDisplay *md = getdisplay (&currprefs); + for (int i = 0; md->DisplayModes[i].depth >= 0; i++) { + struct PicassoResolution *pr = &md->DisplayModes[i]; + if (pr->res.width == width && pr->res.height == height) { + for (int j = 0; pr->refresh[j] > 0; j++) { + if (pr->refresh[j] == ap->gfx_refreshrate) + return ap->gfx_refreshrate; + if (pr->refresh[j] > freq && pr->refresh[j] < ap->gfx_refreshrate) + freq = pr->refresh[j]; + } + } + } + write_log (_T("Refresh rate %d not supported, using %d\n"), ap->gfx_refreshrate, freq); + return freq; +} + static int set_ddraw_2 (void) { HRESULT ddrval; int bits = (currentmode->current_depth + 7) & ~7; int width = currentmode->native_width; int height = currentmode->native_height; - int freq = currentmode->frequency; int dxfullscreen, wfullscreen, dd; + struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[APMODE_RTG] : &currprefs.gfx_apmode[APMODE_NATIVE]; + int freq = ap->gfx_refreshrate; dxfullscreen = (currentmode->flags & DM_DX_FULLSCREEN) ? TRUE : FALSE; wfullscreen = (currentmode->flags & DM_W_FULLSCREEN) ? TRUE : FALSE; @@ -429,25 +455,8 @@ static int set_ddraw_2 (void) if (dxfullscreen) { for (;;) { - int i, j, got = FALSE; HRESULT olderr; - if (freq > 0) { - struct MultiDisplay *md = getdisplay (&currprefs); - for (i = 0; md->DisplayModes[i].depth >= 0; i++) { - struct PicassoResolution *pr = &md->DisplayModes[i]; - if (pr->res.width == width && pr->res.height == height) { - for (j = 0; pr->refresh[j] > 0; j++) { - if (pr->refresh[j] == freq) - got = TRUE; - } - break; - } - } - if (got == FALSE) { - write_log (_T("set_ddraw: refresh rate %d not supported\n"), freq); - freq = 0; - } - } + freq = getrefreshrate (width, height); write_log (_T("set_ddraw: trying %dx%d, bits=%d, refreshrate=%d\n"), width, height, bits, freq); ddrval = DirectDraw_SetDisplayMode (width, height, bits, freq); if (SUCCEEDED (ddrval)) @@ -553,7 +562,7 @@ static void addmode (struct MultiDisplay *md, DEVMODE *dm, int rawmode) md->DisplayModes[i].res.height = h; md->DisplayModes[i].depth = d; md->DisplayModes[i].refresh[0] = freq; - md->DisplayModes[i].refreshtype[0] = rawmode; + md->DisplayModes[i].refreshtype[0] = (lace ? REFRESH_RATE_LACE : 0) | (rawmode ? REFRESH_RATE_RAW : 0); md->DisplayModes[i].refresh[1] = 0; md->DisplayModes[i].colormodes = ct; md->DisplayModes[i + 1].depth = -1; @@ -749,8 +758,8 @@ void sortdisplays (void) md->DisplayModes = xmalloc (struct PicassoResolution, MAX_PICASSO_MODES); md->DisplayModes[0].depth = -1; - write_log (_T("%s [%s]\n"), md->adaptername, md->adapterid); - write_log (_T("-: %s\n"), md->fullname); + write_log (_T("%s '%s' [%s]\n"), md->adaptername, md->adapterid, md->adapterkey); + write_log (_T("-: %s [%s]\n"), md->fullname, md->monitorid); for (int mode = 0; mode < 2; mode++) { DEVMODE dm; dm.dmSize = sizeof dm; @@ -1253,6 +1262,41 @@ void gfx_unlock_picasso (bool dorender) } } +static HWND blankwindows[MAX_DISPLAYS]; +static void closeblankwindows (void) +{ + for (int i = 0; i < MAX_DISPLAYS; i++) { + HWND h = blankwindows[i]; + if (h) { + ShowWindow (h, SW_HIDE); + DestroyWindow (h); + } + } +} +static void createblankwindows (void) +{ + struct MultiDisplay *mdx = getdisplay (&currprefs); + int i; + + if (!currprefs.win32_blankmonitors) + return; + + for (i = 0; Displays[i].monitorname; i++) { + struct MultiDisplay *md = &Displays[i]; + TCHAR name[100]; + if (mdx == md) + continue; + _stprintf (name, _T("WinUAE_Blank_%d"), i); + blankwindows[i] = CreateWindowEx ( + WS_EX_TOPMOST, + _T("Blank"), name, + WS_POPUP | WS_VISIBLE, + md->rect.left, md->rect.top, md->rect.right - md->rect.left, md->rect.bottom - md->rect.top, + NULL, + NULL, hInst, NULL); + } +} + static void close_hwnds (void) { screen_is_initialized = 0; @@ -1263,6 +1307,7 @@ static void close_hwnds (void) #ifdef RETROPLATFORM rp_set_hwnd (NULL); #endif + closeblankwindows (); if (hStatusWnd) { ShowWindow (hStatusWnd, SW_HIDE); DestroyWindow (hStatusWnd); @@ -1335,19 +1380,23 @@ static void update_gfxparams (void) if (screen_is_picasso) { currentmode->current_width = picasso96_state.Width; currentmode->current_height = picasso96_state.Height; - if (currprefs.win32_rtgvblankrate == 0) - currentmode->frequency = abs (currprefs.gfx_apmode[0].gfx_refreshrate); - else if (currprefs.win32_rtgvblankrate < 0) - currentmode->frequency = 0; - else - currentmode->frequency = abs (currprefs.gfx_apmode[1].gfx_refreshrate >= 50 ? currprefs.gfx_apmode[1].gfx_refreshrate : 50); + currprefs.gfx_apmode[1].gfx_interlaced = false; + if (currprefs.win32_rtgvblankrate == 0) { + currprefs.gfx_apmode[1].gfx_refreshrate = currprefs.gfx_apmode[0].gfx_refreshrate; + if (currprefs.gfx_apmode[0].gfx_interlaced) { + currprefs.gfx_apmode[1].gfx_refreshrate *= 2; + } + } else if (currprefs.win32_rtgvblankrate < 0) { + currprefs.gfx_apmode[1].gfx_refreshrate = 0; + } else { + currprefs.gfx_apmode[1].gfx_refreshrate = currprefs.win32_rtgvblankrate; + } if (currprefs.gfx_apmode[1].gfx_vsync) currentmode->vsync = 1 + currprefs.gfx_apmode[1].gfx_vsyncmode; } else { #endif currentmode->current_width = currprefs.gfx_size.width; currentmode->current_height = currprefs.gfx_size.height; - currentmode->frequency = abs (currprefs.gfx_apmode[0].gfx_refreshrate); if (currprefs.gfx_apmode[0].gfx_vsync) currentmode->vsync = 1 + currprefs.gfx_apmode[0].gfx_vsyncmode; #ifdef PICASSO96 @@ -1478,7 +1527,9 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_apmode[0].gfx_vsyncmode != changed_prefs.gfx_apmode[0].gfx_vsyncmode ? 2 | 16 : 0; c |= currprefs.gfx_apmode[1].gfx_vsyncmode != changed_prefs.gfx_apmode[1].gfx_vsyncmode ? 2 | 16 : 0; c |= currprefs.gfx_apmode[0].gfx_refreshrate != changed_prefs.gfx_apmode[0].gfx_refreshrate ? 2 | 16 : 0; +#if 0 c |= currprefs.gfx_apmode[1].gfx_refreshrate != changed_prefs.gfx_apmode[1].gfx_refreshrate ? 2 | 16 : 0; +#endif c |= currprefs.gfx_autoresolution != changed_prefs.gfx_autoresolution ? (2|8|16) : 0; c |= currprefs.gfx_api != changed_prefs.gfx_api ? (1|8|32) : 0; @@ -1518,14 +1569,15 @@ int check_prefs_changed_gfx (void) c |= currprefs.gfx_apmode[APMODE_NATIVE].gfx_display != changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display ? (2|4|8) : 0; c |= currprefs.gfx_apmode[APMODE_RTG].gfx_display != changed_prefs.gfx_apmode[APMODE_RTG].gfx_display ? (2|4|8) : 0; c |= currprefs.gfx_blackerthanblack != changed_prefs.gfx_blackerthanblack ? (2 | 8) : 0; - c |= currprefs.gfx_apmode[0].gfx_backbuffers != changed_prefs.gfx_apmode[0].gfx_backbuffers ? (2 | 8) : 0; - c |= currprefs.gfx_apmode[0].gfx_interlaced != changed_prefs.gfx_apmode[0].gfx_interlaced ? (2 | 8) : 0; - c |= currprefs.gfx_apmode[1].gfx_backbuffers != changed_prefs.gfx_apmode[1].gfx_backbuffers ? (2 | 8) : 0; + c |= currprefs.gfx_apmode[APMODE_NATIVE].gfx_backbuffers != changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_backbuffers ? (2 | 8) : 0; + c |= currprefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced != changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced ? (2 | 8) : 0; + c |= currprefs.gfx_apmode[APMODE_RTG].gfx_backbuffers != changed_prefs.gfx_apmode[APMODE_RTG].gfx_backbuffers ? (2 | 8) : 0; c |= currprefs.win32_alwaysontop != changed_prefs.win32_alwaysontop ? 32 : 0; c |= currprefs.win32_notaskbarbutton != changed_prefs.win32_notaskbarbutton ? 32 : 0; c |= currprefs.win32_nonotificationicon != changed_prefs.win32_nonotificationicon ? 32 : 0; c |= currprefs.win32_borderless != changed_prefs.win32_borderless ? 32 : 0; + c |= currprefs.win32_blankmonitors != changed_prefs.win32_blankmonitors ? 32 : 0; c |= currprefs.win32_statusbar != changed_prefs.win32_statusbar ? 32 : 0; c |= currprefs.win32_rtgmatchdepth != changed_prefs.win32_rtgmatchdepth ? 2 : 0; c |= currprefs.win32_rtgscaleifsmall != changed_prefs.win32_rtgscaleifsmall ? (2 | 8 | 64) : 0; @@ -1592,14 +1644,15 @@ int check_prefs_changed_gfx (void) currprefs.gfx_apmode[APMODE_NATIVE].gfx_display = changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_display; currprefs.gfx_apmode[APMODE_RTG].gfx_display = changed_prefs.gfx_apmode[APMODE_RTG].gfx_display; currprefs.gfx_blackerthanblack = changed_prefs.gfx_blackerthanblack; - currprefs.gfx_apmode[0].gfx_backbuffers = changed_prefs.gfx_apmode[0].gfx_backbuffers; - currprefs.gfx_apmode[0].gfx_interlaced = changed_prefs.gfx_apmode[0].gfx_interlaced; - currprefs.gfx_apmode[1].gfx_backbuffers = changed_prefs.gfx_apmode[1].gfx_backbuffers; + currprefs.gfx_apmode[APMODE_NATIVE].gfx_backbuffers = changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_backbuffers; + currprefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced = changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced; + currprefs.gfx_apmode[APMODE_RTG].gfx_backbuffers = changed_prefs.gfx_apmode[APMODE_RTG].gfx_backbuffers; currprefs.win32_alwaysontop = changed_prefs.win32_alwaysontop; currprefs.win32_nonotificationicon = changed_prefs.win32_nonotificationicon; currprefs.win32_notaskbarbutton = changed_prefs.win32_notaskbarbutton; currprefs.win32_borderless = changed_prefs.win32_borderless; + currprefs.win32_blankmonitors = changed_prefs.win32_blankmonitors; currprefs.win32_statusbar = changed_prefs.win32_statusbar; currprefs.win32_rtgmatchdepth = changed_prefs.win32_rtgmatchdepth; currprefs.win32_rtgscaleifsmall = changed_prefs.win32_rtgscaleifsmall; @@ -1624,10 +1677,12 @@ int check_prefs_changed_gfx (void) if ((c & 16) || ((c & 8) && keepfsmode)) { if (reopen (c & 2)) c |= 2; + graphics_mode_changed = 1; } if ((c & 32) || ((c & 2) && !keepfsmode)) { close_windows (); graphics_init (); + graphics_mode_changed = 1; } init_custom (); if (c & 4) { @@ -1933,7 +1988,9 @@ static int reopen (int full) currprefs.gfx_apmode[0].gfx_vsyncmode = changed_prefs.gfx_apmode[0].gfx_vsyncmode; currprefs.gfx_apmode[1].gfx_vsyncmode = changed_prefs.gfx_apmode[1].gfx_vsyncmode; currprefs.gfx_apmode[0].gfx_refreshrate = changed_prefs.gfx_apmode[0].gfx_refreshrate; +#if 0 currprefs.gfx_apmode[1].gfx_refreshrate = changed_prefs.gfx_apmode[1].gfx_refreshrate; +#endif config_changed = 1; if (!quick) @@ -1963,9 +2020,9 @@ bool vsync_switchmode (int hz) bool preferdouble = 0, preferlace = 0; bool lace = false; - if (currprefs.gfx_apmode[0].gfx_refreshrate > 85) { + if (currprefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate > 85) { preferdouble = 1; - } else if (currprefs.gfx_apmode[0].gfx_interlaced) { + } else if (currprefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced) { preferlace = 1; } @@ -2027,8 +2084,8 @@ bool vsync_switchmode (int hz) oldmode = found; oldhz = hz; if (!found) { - changed_prefs.gfx_apmode[0].gfx_vsync = 0; - if (currprefs.gfx_apmode[0].gfx_vsync != changed_prefs.gfx_apmode[0].gfx_vsync) { + changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_vsync = 0; + if (currprefs.gfx_apmode[APMODE_NATIVE].gfx_vsync != changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_vsync) { config_changed = 1; } write_log (_T("refresh rate changed to %d%s but no matching screenmode found, vsync disabled\n"), hz, lace ? _T("i") : _T("p")); @@ -2036,10 +2093,10 @@ bool vsync_switchmode (int hz) } else { newh = found->res.height; changed_prefs.gfx_size_fs.height = newh; - changed_prefs.gfx_apmode[0].gfx_refreshrate = hz; - changed_prefs.gfx_apmode[0].gfx_interlaced = lace; + changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate = hz; + changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced = lace; if (changed_prefs.gfx_size_fs.height != currprefs.gfx_size_fs.height || - changed_prefs.gfx_apmode[0].gfx_refreshrate != currprefs.gfx_apmode[0].gfx_refreshrate) { + changed_prefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate != currprefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate) { write_log (_T("refresh rate changed to %d%s, new screenmode %dx%d\n"), hz, lace ? _T("i") : _T("p"), w, newh); config_changed = 1; } @@ -2203,6 +2260,7 @@ int graphics_init (void) systray (hHiddenWnd, TRUE); systray (hHiddenWnd, FALSE); gfxmode_reset (); + graphics_mode_changed = 1; return open_windows (1); } @@ -2400,8 +2458,8 @@ static int getbestmode (int nextbest) struct PicassoResolution *pr = &md->DisplayModes[i]; int r = pr->res.width > pr->res.height ? 1 : 0; if (pr->res.width >= currentmode->native_width && pr->res.height >= currentmode->native_height && r == ratio) { - write_log (_T("FS: %dx%d -> %dx%d (%d)\n"), currentmode->native_width, currentmode->native_height, - pr->res.width, pr->res.height, ratio); + write_log (_T("FS: %dx%d -> %dx%d %d %d\n"), currentmode->native_width, currentmode->native_height, + pr->res.width, pr->res.height, ratio, index); currentmode->native_width = pr->res.width; currentmode->native_height = pr->res.height; currentmode->current_width = currentmode->native_width; @@ -2453,7 +2511,7 @@ double getcurrentvblankrate (void) static int maxscanline, minscanline, prevvblankpos; -static bool getvblankpos (int *vp) +static bool getvblankpos (int *vp, bool updateprev) { int sl; #if 0 @@ -2470,12 +2528,12 @@ static bool getvblankpos (int *vp) #if 0 t = read_processor_time () - t; write_log (_T("(%d:%d)"), t, sl); -#endif - prevvblankpos = sl; +#endif + if (updateprev && sl > prevvblankpos) + prevvblankpos = sl; if (sl > maxscanline) maxscanline = sl; if (sl > 0) { - vblankthread_oddeven = (sl & 1) != 0; if (sl < minscanline || minscanline < 0) minscanline = sl; } @@ -2483,9 +2541,9 @@ static bool getvblankpos (int *vp) return true; } -static bool getvblankpos2 (int *vp, int *flags) +static bool getvblankpos2 (int *vp, int *flags, bool updateprev) { - if (!getvblankpos (vp)) + if (!getvblankpos (vp, updateprev)) return false; if (*vp > 100 && flags) { if ((*vp) & 1) @@ -2503,11 +2561,11 @@ static bool waitvblankstate (bool state, int *maxvpos, int *flags) *flags = 0; for (;;) { int omax = maxscanline; - if (!getvblankpos2 (&vp, flags)) + if (!getvblankpos2 (&vp, flags, true)) return false; while (omax != maxscanline) { omax = maxscanline; - if (!getvblankpos2 (&vp, flags)) + if (!getvblankpos2 (&vp, flags, true)) return false; } if (maxvpos) @@ -2526,20 +2584,20 @@ static int timezeroonevblank (int startline, int endline) { int vp; for (;;) { - if (!getvblankpos (&vp)) + if (!getvblankpos (&vp, false)) return -1; if (vp > endline) break; } for (;;) { - if (!getvblankpos (&vp)) + if (!getvblankpos (&vp, false)) return -1; if (vp == startline) break; } frame_time_t start = read_processor_time (); for (;;) { - if (!getvblankpos (&vp)) + if (!getvblankpos (&vp, false)) return -1; if (vp >= endline) break; @@ -2554,9 +2612,9 @@ static int vblank_wait (void) for (;;) { int opos = prevvblankpos; - if (!getvblankpos (&vp)) + if (!getvblankpos (&vp, true)) return -2; - if (opos > (maxscanline + minscanline) / 2 && vp < (maxscanline + minscanline) / 3) + if (opos >= 0 && opos > (maxscanline + minscanline) / 2 && vp < (maxscanline + minscanline) / 3) return vp; if (vp <= 0) return vp; @@ -2570,15 +2628,15 @@ static bool vblank_getstate (bool *state, int *pvp) *state = false; opos = prevvblankpos; - if (!getvblankpos (&vp)) + if (!getvblankpos (&vp, true)) return false; if (pvp) *pvp = vp; - if (opos > (maxscanline + minscanline) / 2 && vp < (maxscanline + minscanline) / 3) { + if (opos >= 0 && opos > (maxscanline + minscanline) / 2 && vp < (maxscanline + minscanline) / 3) { *state = true; return true; } - if (vp <= 0) { + if (opos > vp && vp <= 0) { *state = true; return true; } @@ -2624,12 +2682,17 @@ static unsigned int __stdcall flipthread (void *dummy) static int frame_missed, frame_counted, frame_errors; static int frame_usage, frame_usage_avg, frame_usage_total; extern int log_vsync; -static bool dooddevenskip; +static int dooddevenskip; static volatile bool vblank_skipeveryother; static int vblank_flip_delay; +static int lacemismatch_post_frames = 5; +static int lacemismatch_pre_frames = 5; + static bool vblanklaceskip (void) { + if (graphics_mode_changed) + return false; if (vblankbaselace_chipset >= 0 && vblankbaselace) { if ((vblankbaselace_chipset && !vblankthread_oddeven) || (!vblankbaselace_chipset && vblankthread_oddeven)) return true; @@ -2645,7 +2708,8 @@ static bool vblanklaceskip_check (void) // write_log (_T("%d == %d\n"), vblankbaselace_chipset, vblankthread_oddeven); return false; } - write_log (_T("Interlaced frame type mismatch %d<>%d\n"), vblankbaselace_chipset, vblankthread_oddeven); + getvblankpos (&vp, false); + write_log (_T("Interlaced frame type mismatch %d<>%d (%d,%d)\n"), vblankbaselace_chipset, vblankthread_oddeven, vp, prevvblankpos); return true; } @@ -2673,7 +2737,7 @@ static unsigned int __stdcall vblankthread (void *dummy) } else if (mode == VBLANKTH_ACTIVE_START) { // do not start until vblank has passed int vp; - if (!getvblankpos (&vp)) { + if (!getvblankpos (&vp, false)) { // bad things happening vblankthread_mode = VBLANKTH_ACTIVE; continue; @@ -2682,15 +2746,40 @@ static unsigned int __stdcall vblankthread (void *dummy) sleep_millis (1); continue; } - ResetEvent (vblankwaitevent); + if (dooddevenskip == 1) { + frame_time_t rpt = read_processor_time (); + for (;;) { + sleep_millis (1); + if (!getvblankpos (&vp, false)) + break; + if (read_processor_time () - rpt > 2 * vblankbasefull) + break; + if (vp >= (maxscanline + minscanline) / 2) + break; + } + for (;;) { + sleep_millis (1); + if (!getvblankpos (&vp, false)) + break; + if (read_processor_time () - rpt > 2 * vblankbasefull) + break; + if (vp < (maxscanline + minscanline) / 2) + break; + } + } + if (dooddevenskip > 1) { + dooddevenskip++; + if (dooddevenskip > lacemismatch_post_frames) + dooddevenskip = 0; + } if (vp > maxscanline / 2) vp = maxscanline / 2; frame_time_t rpt = read_processor_time (); vblank_prev_time2 = rpt - (vblankbaseadjust + (vblankbasefull * vp / maxscanline) / (vblank_skipeveryother ? 2 : 1)); vblank_prev_time = vblank_prev_time2; firstvblankbasewait2 = false; - prevvblankpos = 0; + prevvblankpos = -1; vblank_found_flipdelay = 0; doflipped = false; if (vblank_skipeveryother) // wait for first vblank in skip frame mode (100Hz+) @@ -2700,7 +2789,7 @@ static unsigned int __stdcall vblankthread (void *dummy) } else if (mode == VBLANKTH_ACTIVE_SKIPFRAME) { int vp; sleep_millis (1); - getvblankpos (&vp); + getvblankpos (&vp, true); if (vp >= (maxscanline + minscanline) / 2) vblankthread_mode = VBLANKTH_ACTIVE_SKIPFRAME2; // something is wrong? @@ -2709,7 +2798,7 @@ static unsigned int __stdcall vblankthread (void *dummy) } else if (mode == VBLANKTH_ACTIVE_SKIPFRAME2) { int vp; sleep_millis (1); - getvblankpos (&vp); + getvblankpos (&vp, true); if (vp > 0 && vp < (maxscanline + minscanline) / 2) { prevvblankpos = 0; vblankthread_mode = VBLANKTH_ACTIVE; @@ -2724,20 +2813,15 @@ static unsigned int __stdcall vblankthread (void *dummy) bool vblank_found_rtg2 = false; bool vblank_found2 = false; frame_time_t thread_vblank_time2 = 0; - // immediate vblank if mismatched frame type - if (vblanklaceskip_check ()) { - vblank_found2 = true; - vblank_found_chipset = true; - end = true; - doflipped = true; - thread_vblank_time2 = vblank_prev_time; - } else if (t - vblank_prev_time2 > vblankbasewait2) { + + if (t - vblank_prev_time2 > vblankbasewait2) { int vp = 0; bool vb = false; bool ok; if (firstvblankbasewait2 == false) { firstvblankbasewait2 = true; vblank_getstate (&vb, &vp); + vblankthread_oddeven = (vp & 1) != 0; } if (!doflipped && ap->gfx_vflip > 0) { doflipevent (); @@ -2765,6 +2849,8 @@ static unsigned int __stdcall vblankthread (void *dummy) } vblank_found_rtg2 = true; vblank_found2 = true; + if (!dooddevenskip && vblanklaceskip_check ()) + dooddevenskip = 1; end = true; } if (t - vblank_prev_time2 > vblankbasewait3) @@ -2806,6 +2892,12 @@ static bool isthreadedvsync (void) frame_time_t vsync_busywait_end (int *flipdelay) { + if (graphics_mode_changed > 0) { + graphics_mode_changed++; + if (graphics_mode_changed >= vsync_modechangetimeout) + graphics_mode_changed = 0; + } + if (isthreadedvsync ()) { frame_time_t prev; @@ -2841,9 +2933,30 @@ frame_time_t vsync_busywait_end (int *flipdelay) } } +static bool vblank_sync_started; + bool vsync_isdone (void) { - return vblank_found_chipset || dooddevenskip; + if (isvsync () == 0) + return false; + if (!isthreadedvsync ()) { + int vp = -2; + getvblankpos (&vp, true); + if (!vblankthread_oddeven_got) { + // need to get odd/even state early + while (vp < 0) { + if (!getvblankpos (&vp, true)) + break; + } + vblankthread_oddeven = (vp & 1) != 0; + vblankthread_oddeven_got = true; + } + } + if (dooddevenskip) + return true; + if (vblank_found_chipset) + return true; + return false; } void vsync_busywait_start (void) @@ -2854,10 +2967,11 @@ void vsync_busywait_start (void) else if (vblankthread_mode != VBLANKTH_ACTIVE_WAIT) write_log (L"low latency vsync state mismatch %d\n", vblankthread_mode); changevblankthreadmode_fast (VBLANKTH_ACTIVE_START); + } else { + vblank_found_chipset = false; } } - int vsync_busywait_do (int *freetime, bool lace, bool oddeven) { int v; @@ -2867,7 +2981,7 @@ int vsync_busywait_do (int *freetime, bool lace, bool oddeven) frame_time_t prevtime = vblank_prev_time; struct apmode *ap = picasso_on ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0]; - dooddevenskip = false; + vblank_sync_started = true; if (lace) vblankbaselace_chipset = oddeven == true ? 1 : 0; else @@ -2914,29 +3028,56 @@ int vsync_busywait_do (int *freetime, bool lace, bool oddeven) int vp; vblank_flip_delay = 0; - dooddevenskip = false; - - if (vblanklaceskip_check ()) { - vblank_prev_time = read_processor_time () + vblankbasewait1; - dooddevenskip = true; - framelost = false; - v = -1; + vblankthread_oddeven_got = false; - } else if (currprefs.turbo_emulation) { + if (currprefs.turbo_emulation) { show_screen (); + dooddevenskip = 0; vblank_prev_time = read_processor_time (); framelost = true; v = -1; + prevvblankpos = -1; } else { + //write_log (L"%d\n", prevvblankpos); + + if (dooddevenskip > 0 && dooddevenskip != lacemismatch_pre_frames) { + dooddevenskip++; + if (dooddevenskip > lacemismatch_pre_frames + lacemismatch_post_frames) + dooddevenskip = 0; + } + + if (!dooddevenskip && vblanklaceskip_check ()) { + dooddevenskip = 1; + } + + if (ap->gfx_vflip != 0) { + show_screen (); + } + while (!framelost && read_processor_time () - prevtime < vblankbasewait1) { vsync_sleep (false); } - vp = vblank_wait (); + + if (dooddevenskip == lacemismatch_pre_frames) { + if (vblanklaceskip_check ()) { + for (;;) { + if (!getvblankpos (&vp, true)) + break; + if (vp > maxscanline * 2 / 3) + break; + } + vp = vblank_wait (); + dooddevenskip++; + } else { + dooddevenskip = 0; + } + } + if (vp >= -1) { vblank_prev_time = read_processor_time (); if (ap->gfx_vflip == 0) { @@ -2947,25 +3088,19 @@ int vsync_busywait_do (int *freetime, bool lace, bool oddeven) else if (vblank_flip_delay > vblankbasefull * 2 / 3) vblank_flip_delay = vblankbasefull * 2 / 3; } - for (;;) { - if (!getvblankpos (&vp)) - break; - if (vp > 0) - break; - sleep_millis (1); - } - if (ap->gfx_vflip != 0) { - show_screen (); - } + vblank_prev_time -= vblankbaseadjust; - vblank_prev_time -= (vblankbasefull * vp / maxscanline) / (vblank_skipeveryother ? 2 : 1 ); + if (vp > 0) { + vblank_prev_time -= (vblankbasefull * vp / maxscanline) / (vblank_skipeveryother ? 2 : 1 ); + vblank_sync_started = false; + } - v = framelost ? -1 : 1; + v = dooddevenskip || framelost ? -1 : 1; } + prevvblankpos = -1; framelost = false; } - getvblankpos (&vp); } if (v) { @@ -3235,6 +3370,7 @@ static int create_windows_2 (void) int cxborder = GetSystemMetrics (SM_CXBORDER); int gap = 3; int x, y, w, h; + struct MultiDisplay *md = getdisplay (&currprefs); if (hAmigaWnd) { RECT r; @@ -3257,13 +3393,13 @@ static int create_windows_2 (void) } if (fsw || dxfs) { - RECT rc = getdisplay (&currprefs)->rect; + RECT rc = md->rect; nx = rc.left; ny = rc.top; nw = rc.right - rc.left; nh = rc.bottom - rc.top; } else if (d3dfs) { - RECT rc = getdisplay (&currprefs)->rect; + RECT rc = md->rect; nw = currentmode->native_width; nh = currentmode->native_height; if (rc.left >= 0) @@ -3370,7 +3506,7 @@ static int create_windows_2 (void) } if (fsw) { - rc = getdisplay (&currprefs)->rect; + rc = md->rect; flags |= WS_EX_TOPMOST; style = WS_POPUP; currentmode->native_width = rc.right - rc.left; @@ -3408,7 +3544,7 @@ static int create_windows_2 (void) getbestmode (0); w = currentmode->native_width; h = currentmode->native_height; - rc = getdisplay (&currprefs)->rect; + rc = md->rect; if (rc.left >= 0) x = rc.left; else @@ -3447,6 +3583,7 @@ static int create_windows_2 (void) if (dxfs || d3dfs) SetCursorPos (x + w / 2, y + h / 2); addnotifications (hAmigaWnd, FALSE, FALSE); + createblankwindows (); if (hMainWnd != hAmigaWnd) { if (!currprefs.headless && !rp_isactive ()) ShowWindow (hMainWnd, firstwindow ? SW_SHOWDEFAULT : SW_SHOWNORMAL); diff --git a/od-win32/win32gfx.h b/od-win32/win32gfx.h index 4438dd0d..3e0f3aad 100644 --- a/od-win32/win32gfx.h +++ b/od-win32/win32gfx.h @@ -42,4 +42,5 @@ void centerdstrect (RECT *); struct MultiDisplay *getdisplay (struct uae_prefs *p); double getcurrentvblankrate (void); void vblank_reset (double freq); +extern int getrefreshrate (int width, int height); #endif diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 90312840..2e8dcf1a 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -3583,6 +3583,7 @@ static struct miscentry misclist[] = { { 0, 1, _T("RTG on-screen display"), NULL, &workprefs.leds_on_screen, STATUSLINE_RTG, STATUSLINE_RTG }, { 0, 0, _T("Create winuaelog.txt log"), &workprefs.win32_logfile }, { 0, 0, _T("Log illegal memory accesses"), &workprefs.illegal_mem }, + { 0, 0, _T("Blank unused displays"), &workprefs.win32_blankmonitors }, { 0, NULL } }; @@ -6155,11 +6156,12 @@ static void values_from_displaydlg (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l if (posn1 == CB_ERR) return; if (posn1 == 0) { - workprefs.gfx_apmode[0].gfx_refreshrate = 0; + workprefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate = 0; + workprefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced = dmode >= 0 && md->DisplayModes[dmode].lace; } else { posn1--; - workprefs.gfx_apmode[0].gfx_refreshrate = storedrefreshrates[posn1].rate; - workprefs.gfx_apmode[0].gfx_interlaced = (storedrefreshrates[posn1].type & REFRESH_RATE_LACE) != false; + workprefs.gfx_apmode[APMODE_NATIVE].gfx_refreshrate = storedrefreshrates[posn1].rate; + workprefs.gfx_apmode[APMODE_NATIVE].gfx_interlaced = (storedrefreshrates[posn1].type & REFRESH_RATE_LACE) != 0; } values_to_displaydlg (hDlg); } else if (LOWORD (wParam) == IDC_DA_MODE) { @@ -6837,13 +6839,13 @@ static void values_to_memorydlg (HWND hDlg) workprefs.win32_rtgvblankrate == 70 || workprefs.win32_rtgvblankrate == 75) { SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_SETCURSEL, - (workprefs.win32_rtgvblankrate == 0) ? 1 : - (workprefs.win32_rtgvblankrate == -1) ? 2 : + (workprefs.win32_rtgvblankrate == 0) ? 0 : + (workprefs.win32_rtgvblankrate == -1) ? 1 : (workprefs.win32_rtgvblankrate == -2) ? 0 : - (workprefs.win32_rtgvblankrate == 50) ? 3 : - (workprefs.win32_rtgvblankrate == 60) ? 4 : - (workprefs.win32_rtgvblankrate == 70) ? 5 : - (workprefs.win32_rtgvblankrate == 75) ? 6 : 0, 0); + (workprefs.win32_rtgvblankrate == 50) ? 2 : + (workprefs.win32_rtgvblankrate == 60) ? 3 : + (workprefs.win32_rtgvblankrate == 70) ? 4 : + (workprefs.win32_rtgvblankrate == 75) ? 5 : 0, 0); } else { TCHAR tmp[10]; _stprintf (tmp, _T("%d"), workprefs.win32_rtgvblankrate); @@ -6854,6 +6856,7 @@ static void values_to_memorydlg (HWND hDlg) CheckDlgButton (hDlg, IDC_RTG_SCALE, workprefs.win32_rtgscaleifsmall); CheckDlgButton (hDlg, IDC_RTG_SCALE_ALLOW, workprefs.win32_rtgallowscaling); CheckDlgButton (hDlg, IDC_RTG_MATCH_DEPTH, workprefs.win32_rtgmatchdepth); + CheckDlgButton (hDlg, IDC_RTG_VBINTERRUPT, workprefs.rtg_hardwareinterrupt); SendDlgItemMessage (hDlg, IDC_RTG_SCALE_ASPECTRATIO, CB_SETCURSEL, (workprefs.win32_rtgscaleaspectratio == 0) ? 0 : @@ -7061,9 +7064,8 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage (hDlg, IDC_RTG_SCALE_ASPECTRATIO, CB_ADDSTRING, 0, (LPARAM)_T("16:9")); SendDlgItemMessage (hDlg, IDC_RTG_SCALE_ASPECTRATIO, CB_ADDSTRING, 0, (LPARAM)_T("16:10")); SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_RESETCONTENT, 0, 0); - SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("Disabled")); SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("Chipset")); - SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("Real")); + SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("Default")); SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("50")); SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("60")); SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_ADDSTRING, 0, (LPARAM)_T("70")); @@ -7105,6 +7107,9 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP case IDC_RTG_SCALE_ALLOW: workprefs.win32_rtgallowscaling = ischecked (hDlg, IDC_RTG_SCALE_ALLOW); break; + case IDC_RTG_VBINTERRUPT: + workprefs.rtg_hardwareinterrupt = ischecked (hDlg, IDC_RTG_VBINTERRUPT); + break; case IDC_SOCKETS: workprefs.socket_emu = ischecked (hDlg, IDC_SOCKETS); break; @@ -7230,10 +7235,8 @@ static INT_PTR CALLBACK ExpansionDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LP v = SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_GETCURSEL, 0, 0L); if (v != CB_ERR) { if (v == 0) { - workprefs.win32_rtgvblankrate = -2; - } else if (v == 1) { workprefs.win32_rtgvblankrate = 0; - } else if (v == 2) { + } else if (v == 1) { workprefs.win32_rtgvblankrate = -1; } else { v = SendDlgItemMessage (hDlg, IDC_RTG_VBLANKRATE, CB_GETLBTEXT, (WPARAM)v, (LPARAM)tmp); @@ -9820,6 +9823,7 @@ static void floppytooltip (HWND hDlg, int num, uae_u32 crc32) id = floppybuttons[num][0]; if (id < 0) return; + memset (&ti, 0, sizeof ti); ti.cbSize = sizeof (TOOLINFO); ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND; ti.hwnd = hDlg; @@ -12281,17 +12285,6 @@ static void handlerawinput (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) } } -static void input_copy (HWND hDlg) -{ - int dst = workprefs.input_selected_setting; - LRESULT src = SendDlgItemMessage (hDlg, IDC_INPUTCOPYFROM, CB_GETCURSEL, 0, 0L); - if (src == CB_ERR) - return; - input_copy_from = src; - inputdevice_copy_single_config (&workprefs, (int)src, workprefs.input_selected_setting, input_selected_device, input_selected_widget); - init_inputdlg (hDlg); -} - static void input_toggleautofire (void) { int flags, evt; @@ -12392,6 +12385,22 @@ static void input_toggletoggle (void) name, custom, flags, -1, input_selected_sub_num); } +static void input_copy (HWND hDlg) +{ + int dst = workprefs.input_selected_setting; + LRESULT src = SendDlgItemMessage (hDlg, IDC_INPUTCOPYFROM, CB_GETCURSEL, 0, 0L); + if (src == CB_ERR) + return; + input_copy_from = src; + inputdevice_copy_single_config (&workprefs, (int)src, workprefs.input_selected_setting, input_selected_device, -1); + init_inputdlg (hDlg); +} + +static void input_restoredefault (void) +{ + inputdevice_copy_single_config (&workprefs, GAMEPORT_INPUT_SETTINGS, workprefs.input_selected_setting, input_selected_device, input_selected_widget); +} + static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { TCHAR name_buf[MAX_DPATH] = _T(""), desc_buf[128] = _T(""); @@ -12477,13 +12486,13 @@ static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM case WM_NOTIFY: if (((LPNMHDR) lParam)->idFrom == IDC_INPUTLIST) { - int row; + int column; nmlistview = (NM_LISTVIEW *) lParam; list = nmlistview->hdr.hwndFrom; switch (nmlistview->hdr.code) { - case NM_RDBLCLK: case NM_RCLICK: + case NM_RDBLCLK: input_selected_widget = -1; ListView_SetItemState (list, -1, 0, LVIS_SELECTED); update_listview_input (hDlg); @@ -12493,17 +12502,19 @@ static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM dblclick = 1; /* fall-through */ case NM_CLICK: - entry = listview_entry_from_click (list, &row); + entry = listview_entry_from_click (list, &column); if (entry >= 0) { int oldentry = input_selected_widget; input_selected_widget = entry; - if (row == 2 && entry == oldentry) + if (column == 0 && entry == oldentry && dblclick) { + input_restoredefault (); + } else if (column == 2 && entry == oldentry) { input_toggleautofire (); - if (row == 3 && entry == oldentry) + } else if (column == 3 && entry == oldentry) { input_toggletoggle (); - if (row == 4 && entry == oldentry) + } else if (column == 4 && entry == oldentry) { input_qualifiers (hDlg); - if (row == 5) { + } else if (column == 5) { input_selected_sub_num++; if (input_selected_sub_num >= MAX_INPUT_SUB_EVENT) input_selected_sub_num = 0; @@ -12512,7 +12523,7 @@ static INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM } else { input_selected_widget = -1; } - if (dblclick && row <= 1) + if (dblclick && column == 1) doinputcustom (hDlg, 0); update_listview_input (hDlg); init_inputdlg_2 (hDlg); @@ -13928,14 +13939,20 @@ static HWND updatePanel (int id) } hAccelTable = NULL; if (id < 0) { - if (isfullscreen () <= 0) { - RECT r; - if (GetWindowRect (hDlg, &r)) { - LONG left, top; - left = r.left; - top = r.top; + RECT r; + if (GetWindowRect (hDlg, &r)) { + LONG left, top; + left = r.left; + top = r.top; + if (isfullscreen () == 0) { regsetint (NULL, _T("GUIPosX"), left); regsetint (NULL, _T("GUIPosY"), top); + } else if (isfullscreen () < 0) { + regsetint (NULL, _T("GUIPosFWX"), left); + regsetint (NULL, _T("GUIPosFWY"), top); + } else if (isfullscreen () > 0) { + regsetint (NULL, _T("GUIPosFSX"), left); + regsetint (NULL, _T("GUIPosFSY"), top); } } ew (hDlg, IDHELP, FALSE); @@ -14122,18 +14139,15 @@ static void centerWindow (HWND hDlg) if (owner == NULL) owner = GetDesktopWindow (); - if (isfullscreen () <= 0) { + if (isfullscreen () == 0) { regqueryint (NULL, _T("GUIPosX"), &x); regqueryint (NULL, _T("GUIPosY"), &y); - } else { - GetWindowRect (owner, &rcOwner); - GetWindowRect (hDlg, &rcDlg); - CopyRect (&rc, &rcOwner); - OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top); - OffsetRect (&rc, -rc.left, -rc.top); - OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom); - x = rcOwner.left + (rc.right / 2); - y = rcOwner.top + (rc.bottom / 2); + } else if (isfullscreen () < 0) { + regqueryint (NULL, _T("GUIPosFWX"), &x); + regqueryint (NULL, _T("GUIPosFWY"), &y); + } else if (isfullscreen () > 0) { + regqueryint (NULL, _T("GUIPosFSX"), &x); + regqueryint (NULL, _T("GUIPosFSY"), &y); } SetForegroundWindow (hDlg); pt1.x = x; @@ -14142,8 +14156,22 @@ static void centerWindow (HWND hDlg) pt2.y = y + GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER); if (MonitorFromPoint (pt1, MONITOR_DEFAULTTONULL) == NULL || MonitorFromPoint (pt2, MONITOR_DEFAULTTONULL) == NULL) { if (isfullscreen () > 0) { - x = 0; - y = 0; + GetWindowRect (owner, &rcOwner); + GetWindowRect (hDlg, &rcDlg); + CopyRect (&rc, &rcOwner); + OffsetRect (&rcDlg, -rcDlg.left, -rcDlg.top); + OffsetRect (&rc, -rc.left, -rc.top); + OffsetRect (&rc, -rcDlg.right, -rcDlg.bottom); + x = rcOwner.left + (rc.right / 2); + y = rcOwner.top + (rc.bottom / 2); + pt1.x = x; + pt1.y = y; + pt2.x = x + 16; + pt2.y = y + GetSystemMetrics (SM_CYMENU) + GetSystemMetrics (SM_CYBORDER); + if (MonitorFromPoint (pt1, MONITOR_DEFAULTTONULL) == NULL || MonitorFromPoint (pt2, MONITOR_DEFAULTTONULL) == NULL) { + x = 0; + y = 0; + } } else { x = 16; y = 16; @@ -14788,7 +14816,7 @@ static int GetSettings (int all_options, HWND hwnd) dialog_rect.top = dialog_rect.left = 0; dialog_rect.right = tres->width; dialog_rect.bottom = tres->height; - freescaleresource(tres); + freescaleresource (tres); psresult = 0; if (dhwnd != NULL) { MSG msg; diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 7de837bd..93d606c9 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,7 +1,42 @@ - restore only single input target to default. -- hdd from command line -- no-buffer tearing updates + +Beta 6: + +- PC raw MFM decoding improved (uaeunp, Amiga/ST/PC multiformat PC images didn't decode properly) +- Interlace flag wasn't set if resolution had "i" flag but refresh rate didn't, caused blank screen in D3D modes. +- Set system time to host time (timer.device/TR_SETSYSTIME) when exiting GUI or unpausing if syncronize clock option is enabled. + Only works if at least one directory filesystem is in use. (Shares directory filesystem process to minimize resource usage) +- Interlaced host resolution field matching with emulated interlace rewritten, now simply waits extra field if fields + don't match. Can cause small sound glitches if small buffer but this is also much more reliable than old method. (Need tweaking) +- Small non-fastest CPU mode low latency vsync tweaks. +- Ignore CPU writes to DSKDAT. (Useless "DSKDAT: FIFO overflow!" log messages caused by some programs that poke DSKDAT). +- Added -nodirectinput command line parameter that completely disables directinput device enumeration. +- Gayle PCMCIA CF IDE emulation improvements, PCMCIA CF config #2 also supported (PC primary IDE IO addresses) +- GUI position is also saved in fullscreen mode, separate from windowed mode GUI coordinates. +- Some chipset mode on the fly configuration changes also reset RTG internal variables, causing blank screen when + returning back to RTG mode. (Very old bug, "SetSwitch() - Picasso96 0x0x0" in log) +- Fullscreen RTG mode refresh rate uses chipset mode refresh rate or rate directly set in Expansions panel. Automatically selects + lower available refresh rate if selected rate is unsupported. +- Added option to enable/disable RTG vblank interrupt emulation. Previously it was automatically enabled if Refresh rate option wasn't set to + disabled. Moved to separate GUI option because of above new feature and because some games don't like RTG board generated interrupts. +- Direct3D mode RTG OSD only updated when any part of RTG bitmap changed. +- Blank unused displays(s) (opens full screen topmost black window(s)) option added to misc panel. +- Only save minimal CPU context (registers and PC) during native/m68k code switching. Previously it saved lots of unneeded data, + including data that can be changed outside of CPU emulator. May also increase performance in some situations. + Finally explanation and fix for mysterious copper state corruption. +- CD image mounter: MDS image CD audio tracks didn't play if subchannel data was not included, MDS image data tracks that also + included subchannel data returned wrong data. +- Host MMU write protect ROM regions in JIT direct mode because JIT only checks destination address type when generating x86 code for + the first time. Badly crashing programs can corrupt loaded ROM image causing repeating red/black screen reset loop. (Another + mysterious previously reported problem solved) +- Restructured UAE boot ROM variable locations, ROM part write protected. +- Doubleclicking Input panel Input Source column resets clicked line back to default. (Currently keyboards only) +- Added uae-configuration harddrive attribute modification support: + Syntax: uaehfX_Z where X = unit number, Z = attribute name. (for example: "uaehf0_bootpri 10") + Attribute names: devicename, volumename, root, bootpri, read-only, filesys, controller. + Syntax is write-only. Use plain uaehfX to check current values. + Reset required to activate modified settings. Beta 5: diff --git a/traps.cpp b/traps.cpp index 23e87fa7..37d76466 100644 --- a/traps.cpp +++ b/traps.cpp @@ -179,11 +179,18 @@ void REGPARAM2 m68k_handle_trap (unsigned int trap_num) * Implementation of extended traps */ +struct TrapCPUContext +{ + uae_u32 regs[16]; + uae_u32 pc; + int intmask; +}; + struct TrapContext { /* Trap's working copy of 68k state. This is what the trap handler should * access to get arguments from 68k space. */ - struct regstruct regs; + //struct regstruct regs; /* Trap handler function that gets called on the trap context */ TrapHandler trap_handler; @@ -193,7 +200,8 @@ struct TrapContext uae_u32 trap_retval; /* Copy of 68k state at trap entry. */ - struct regstruct saved_regs; + //struct regstruct saved_regs; + struct TrapCPUContext saved_regs; /* Thread which effects the trap context. */ uae_thread_id thread; @@ -209,6 +217,19 @@ struct TrapContext uae_u32 call68k_retval; }; +static void copytocpucontext(struct TrapCPUContext *cpu) +{ + memcpy (cpu->regs, regs.regs, sizeof (regs.regs)); + cpu->intmask = regs.intmask; + cpu->pc = m68k_getpc (); +} +static void copyfromcpucontext(struct TrapCPUContext *cpu, uae_u32 pc) +{ + memcpy (regs.regs, cpu->regs, sizeof (regs.regs)); + regs.intmask = cpu->intmask; + m68k_setpc (pc); +} + /* 68k addresses which invoke the corresponding traps. */ static uaecptr m68k_call_trapaddr; @@ -244,15 +265,16 @@ static void *trap_thread (void *arg) /* Enter critical section - only one trap at a time, please! */ uae_sem_wait (&trap_mutex); - regs = context->saved_regs; + //regs = context->saved_regs; + /* Set PC to address of the exit handler, so that it will be called + * when the 68k context resumes. */ + copyfromcpucontext (&context->saved_regs, exit_trap_trapaddr); /* Don't allow an interrupt and thus potentially another * trap to be invoked while we hold the above mutex. * This is probably just being paranoid. */ regs.intmask = 7; - /* Set PC to address of the exit handler, so that it will be called - * when the 68k context resumes. */ - m68k_setpc (exit_trap_trapaddr); + //m68k_setpc (exit_trap_trapaddr); current_context = context; /* Switch back to 68k context */ @@ -278,7 +300,8 @@ static void trap_HandleExtendedTrap (TrapHandler handler_func, int has_retval) context->trap_handler = handler_func; context->trap_has_retval = has_retval; - context->saved_regs = regs; + //context->saved_regs = regs; + copytocpucontext (&context->saved_regs); /* Start thread to handle new trap context. */ uae_start_thread_fast (trap_thread, (void *)context, &context->thread); @@ -416,7 +439,8 @@ static uae_u32 REGPARAM2 exit_trap_handler (TrapContext *dummy_ctx) uae_wait_thread (context->thread); /* Restore 68k state saved at trap entry. */ - regs = context->saved_regs; + //regs = context->saved_regs; + copyfromcpucontext (&context->saved_regs, context->saved_regs.pc); /* If trap is supposed to return a value, then store * return value in D0. */ diff --git a/uaeunp.cpp b/uaeunp.cpp index e2bac91d..37cfbff0 100644 --- a/uaeunp.cpp +++ b/uaeunp.cpp @@ -701,7 +701,7 @@ int __cdecl wmain (int argc, wchar_t *argv[], wchar_t *envp[]) ok = 1; } if (!ok) { - _tprintf (_T("UAE unpacker uaeunp 0.8e by Toni Wilen (c)2011\n")); + _tprintf (_T("UAE unpacker uaeunp 0.8f by Toni Wilen (c)2012\n")); _tprintf (_T("\n")); _tprintf (_T("List: \"uaeunp (-l) \"\n")); _tprintf (_T("List all recursively: \"uaeunp -l **\"\n")); @@ -725,6 +725,10 @@ int __cdecl wmain (int argc, wchar_t *argv[], wchar_t *envp[]) /* +0.8f: + +- PCDOS raw MFM decoding improved (multiformat disks) + 0.8e: - DSQ extra header supported @@ -772,4 +776,4 @@ int __cdecl wmain (int argc, wchar_t *argv[], wchar_t *envp[]) - rdb_dump.dat added to rdb hardfiles, can be used to dump/backup rdb blocks -*/ \ No newline at end of file +*/