]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2500b21
authorToni Wilen <twilen@winuae.net>
Sun, 21 Oct 2012 15:47:09 +0000 (18:47 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 21 Oct 2012 15:47:09 +0000 (18:47 +0300)
37 files changed:
a2091.cpp
ar.cpp
blitter.cpp
cfgfile.cpp
cia.cpp
custom.cpp
disk.cpp
driveclick.cpp
filesys.asm
filesys.cpp
filesys_bootrom.cpp
gayle.cpp
include/ar.h
include/isofs_api.h
include/options.h
include/uae.h
include/zfile.h
inputdevice.cpp
isofs.cpp
main.cpp
memory.cpp
newcpu.cpp
od-win32/dinput.cpp
od-win32/dxwrap.cpp
od-win32/resources/winuae.rc
od-win32/rp.cpp
od-win32/rp.h
od-win32/sounddep/sound.cpp
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
od-win32/writelog.cpp
savestate.cpp
statusline.cpp
uaelib.cpp
zfile.cpp

index ad03b08df5d12f757986b3c1dc892e5dd5e163a8..27aa3ac944419acc54c03dbebd0099449ba1c3d8 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -1364,7 +1364,7 @@ void a2091_init (void)
                z = read_rom (&rd);
                if (z) {
                        int slotsize = 65536;
-                       write_log (_T("A590/A2091 BOOT ROM %d.%d "), rd->ver, rd->rev);
+                       write_log (_T("A590/A2091 BOOT ROM %d.%d\n"), rd->ver, rd->rev);
                        rom_size = rd->size;
                        rom = xmalloc (uae_u8, slotsize);
                        if (rl->rd->id == 56)
diff --git a/ar.cpp b/ar.cpp
index 4c2e032d0a135fae8414bcc6b1dc0d52bb72b959..a25e33133c57bd0cfb4e931ee3c4fd36018a858e 100644 (file)
--- a/ar.cpp
+++ b/ar.cpp
 #define write_log_debug
 #endif
 
+extern void activate_debugger (void);
+
 static TCHAR *cart_memnames[] = { NULL, _T("hrtmon"), _T("arhrtmon"), _T("superiv") };
 
 #define ARMODE_FREEZE 0 /* AR2/3 The action replay 'freeze' button has been pressed.  */
@@ -246,6 +248,7 @@ uae_u32 hrtmem_start, hrtmem2_start, hrtmem3_start, hrtmem_size, hrtmem2_size, h
 uae_u32 hrtmem_end, hrtmem2_end;
 static int hrtmem_rom;
 static int triggered_once;
+static bool action_replay_hardreset;
 
 static void hrtmon_unmap_banks (void);
 
@@ -330,7 +333,7 @@ static uae_u32 REGPARAM2 hrtmem2_bget (uaecptr addr)
                static int cnt = 60;
                cnt--;
                if (cnt == 0)
-                       uae_reset(0);
+                       uae_reset(0, 0);
        }
        addr -= hrtmem2_start & hrtmem2_mask;
        addr &= hrtmem2_mask;
@@ -566,7 +569,7 @@ STATIC_INLINE int ar3a (uaecptr addr, uae_u8 b, int writing)
        if (addr >= 8)
                return armemory_rom[addr];
 
-       if (action_replay_flag != ACTION_REPLAY_ACTIVE)
+       if (action_replay_flag == 0)
                return 0;
 #endif
 
@@ -585,12 +588,14 @@ STATIC_INLINE int ar3a (uaecptr addr, uae_u8 b, int writing)
                if (armode >= 2) {
                        if (armode == ARMODE_BREAKPOINT_AR2) {
                                write_log (_T("AR2: exit with breakpoint(s) active\n")); /* Correct for AR2 */
-                       } else if (armode == ARMODE_BREAKPOINT_AR3_RESET_AR2 )
+                       } else if (armode == ARMODE_BREAKPOINT_AR3_RESET_AR2 ) {
                                write_log (_T("AR3: exit waiting for breakpoint.\n")); /* Correct for AR3 (waiting for breakpoint)*/
-                       else
+                       } else {
                                write_log (_T("AR2/3: mode(%d) > 3 this shouldn't happen.\n"), armode);
-               } else
+                       }
+               } else {
                        write_log (_T("AR: exit with armode(%d)\n"), armode);
+               }
 
                set_special (SPCFLAG_ACTION_REPLAY);
                action_replay_flag = ACTION_REPLAY_HIDE;
@@ -639,7 +644,7 @@ void REGPARAM2 chipmem_lput_actionreplay23 (uaecptr addr, uae_u32 l)
        addr &= chipmem_mask;
        m = (uae_u32 *)(chipmemory + addr);
        do_put_mem_long (m, l);
-       if (addr >= 0x40 && addr < 0x200 && action_replay_flag == ACTION_REPLAY_WAITRESET)
+       if (addr == 8 && action_replay_flag == ACTION_REPLAY_WAITRESET)
                action_replay_chipwrite();
 }
 void REGPARAM2 chipmem_wput_actionreplay23 (uaecptr addr, uae_u32 w)
@@ -650,7 +655,7 @@ void REGPARAM2 chipmem_wput_actionreplay23 (uaecptr addr, uae_u32 w)
        addr &= chipmem_mask;
        m = (uae_u16 *)(chipmemory + addr);
        do_put_mem_word (m, w);
-       if (addr >= 0x40 && addr < 0x200 && action_replay_flag == ACTION_REPLAY_WAITRESET)
+       if (addr == 8 && action_replay_flag == ACTION_REPLAY_WAITRESET)
                action_replay_chipwrite();
 }
 
@@ -906,7 +911,7 @@ static void hide_cart (int hide)
 {
 #ifdef ACTION_REPLAY_HIDE_CARTRIDGE
        if(hide) {
-               action_replay_unmap_banks ();
+               ;//action_replay_unmap_banks ();
        } else {
                action_replay_map_banks ();
        }
@@ -922,6 +927,7 @@ static void hide_cart (int hide)
 
 static void action_replay_go (void)
 {
+       write_log (_T("AR GO %d\n"), armode);
        cartridge_enter();
        hide_cart (0);
        memcpy (armemory_ram + 0xf000, ar_custom, 2 * 256);
@@ -1037,7 +1043,8 @@ void action_replay_enter (void)
        }
        if (action_replay_flag == ACTION_REPLAY_DORESET) {
                write_log (_T("AR2/3: reset\n"));
-               armode = ARMODE_BREAKPOINT_AR3_RESET_AR2;
+               armode = action_replay_hardreset ? ARMODE_BREAKPOINT_AR3_RESET_AR2 : 2;
+               action_replay_hardreset = false;
        } else if (armode == ARMODE_FREEZE) {
                write_log (_T("AR2/3: activated (freeze)\n"));
        } else if (armode >= 2) {
@@ -1073,7 +1080,7 @@ void check_prefs_changed_carts (int in_memory_reset)
        }
 }
 
-void action_replay_reset (void)
+void action_replay_reset (bool hardreset)
 {
        if (hrtmemory) {
                if (isrestore ()) {
@@ -1101,9 +1108,11 @@ void action_replay_reset (void)
                        action_replay_flag = ACTION_REPLAY_ACTIVE;
                        hide_cart (0);
                } else {
-                       write_log_debug (_T("Setting flag to ACTION_REPLAY_WAITRESET\n"));
+                       write_log_debug (_T("Setting flag to ACTION_REPLAY_WAITRESET (%d)\n"), hardreset);
                        write_log_debug (_T("armode == %d\n"), armode);
                        action_replay_flag = ACTION_REPLAY_WAITRESET;
+                       if (hardreset)
+                               action_replay_hardreset = true;
                        hide_cart (0);
                }
        }
@@ -1147,6 +1156,7 @@ int action_replay_freeze (void)
 
 static void action_replay_chipwrite (void)
 {
+       write_log (_T("AR CW\n"));
        if (armodel == 2 || armodel == 3) {
                action_replay_flag = ACTION_REPLAY_DORESET;
                set_special (SPCFLAG_ACTION_REPLAY);
@@ -1192,9 +1202,10 @@ void hrtmon_breakenter(void)
 */
 
 
-/* Original AR3 only works with KS 1.3
-* this patch fixes that problem.
-*/
+/* Original AR3 v3.09 only works with KS 1.3
+ * v3.17 supports also KS 2.04 (v37.175)
+ * this patch handles other rom versions.
+ */
 
 static uae_u8 ar3patch1[] = {0x20,0xc9,0x51,0xc9,0xff,0xfc};
 static uae_u8 ar3patch2[] = {0x00,0xfc,0x01,0x44};
@@ -1222,7 +1233,7 @@ static void action_replay_patch (void)
        armemory_rom[off2 + 1] = (uae_u8)((off1 + kickmem_start + 2) >> 16);
        armemory_rom[off2 + 2] = (uae_u8)((off1 + kickmem_start + 2) >> 8);
        armemory_rom[off2 + 3] = (uae_u8)((off1 + kickmem_start + 2) >> 0);
-       write_log (_T("AR ROM patched for KS2.0+\n"));
+       write_log (_T("AR ROM patched for KS2.0+ (%x)\n"), off2);
 }
 
 /* Returns 0 if the checksum is OK.
index 71fe9efebcaeb4090e0fe8814a8ed14106ba34f3..d153ed17016542cd2db462acc3ef2dab5156a9f4 100644 (file)
@@ -1291,6 +1291,24 @@ void reset_blit (int bltcon)
        blit_modset ();
 }
 
+static bool waitingblits (void)
+{
+       static int warned = 10;
+
+       bool waited = false;
+       while (bltstate != BLT_done && dmaen (DMA_BLITTER)) {
+               waited = true;
+               x_do_cycles (8 * CYCLE_UNIT);
+       }
+       if (warned && waited) {
+               warned--;
+               write_log (_T("waiting_blits detected\n"));
+       }
+       if (bltstate == BLT_done)
+               return true;
+       return false;
+}
+
 static void do_blitter2 (int hpos, int copper)
 {
        int cycles;
@@ -1419,9 +1437,19 @@ static void do_blitter2 (int hpos, int copper)
 
        if (currprefs.immediate_blits) {
                blitter_doit ();
-       } else {
-               blit_cyclecounter = cycles * (blit_dmacount2 + (blit_nod ? 0 : 1)); 
-               event2_newevent (ev2_blitter, blit_cyclecounter, 0);
+               return;
+       }
+       
+       blit_cyclecounter = cycles * (blit_dmacount2 + (blit_nod ? 0 : 1)); 
+       event2_newevent (ev2_blitter, blit_cyclecounter, 0);
+
+       if (dmaen (DMA_BLITTER) && (currprefs.cpu_model >= 68020 || !currprefs.cpu_cycle_exact)) {
+               if (currprefs.waiting_blits) {
+                       // wait immediately if all cycles in use and blitter nastry
+                       if (blit_dmacount == blit_diag[0] && (regs.spcflags & SPCFLAG_BLTNASTY)) {
+                               waitingblits ();
+                       }
+               }
        }
 }
 
@@ -1460,16 +1488,7 @@ void maybe_blit (int hpos, int hack)
                                doit = true;
                }
                if (doit) {
-                       bool waited = false;
-                       while (bltstate != BLT_done && dmaen (DMA_BLITTER)) {
-                               waited = true;
-                               x_do_cycles (8 * CYCLE_UNIT);
-                       }
-                       if (warned && waited) {
-                               warned--;
-                               write_log (_T("waiting_blits detected\n"));
-                       }
-                       if (bltstate == BLT_done)
+                       if (waitingblits ())
                                return;
                }
        }
index 3e38bb5001a94f51526a0a3898e8a1885f3ae93a..35693fae26b81110dcd5a331e2f44636960f9ffe 100644 (file)
@@ -189,6 +189,7 @@ static const TCHAR *cdconmodes[] = { _T(""), _T("uae"), _T("ide"), _T("scsi"), _
 static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a2024"), _T("graffiti"), 0 };
 static const TCHAR *rtgtype[] = { _T("ZorroII"), _T("ZorroIII"), 0 };
 static const TCHAR *waitblits[] = { _T("disabled"), _T("automatic"), _T("noidleonly"), _T("always"), 0 };
+static const TCHAR *autoext2[] = { _T("disabled"), _T("copy"), _T("replace"), 0 };
 
 static const TCHAR *obsolete[] = {
        _T("accuracy"), _T("gfx_opengl"), _T("gfx_32bit_blits"), _T("32bit_blits"),
@@ -2571,7 +2572,6 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || cfgfile_yesno (option, value, _T("comp_lowopt"), &p->comp_lowopt)
                || cfgfile_yesno (option, value, _T("rtg_nocustom"), &p->picasso96_nocustom)
                || cfgfile_yesno (option, value, _T("floppy_write_protected"), &p->floppy_read_only)
-               || cfgfile_yesno (option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2)
                || cfgfile_yesno (option, value, _T("uaeserial"), &p->uaeserial))
                return 1;
 
@@ -2624,6 +2624,7 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, const TCHAR *option, TCH
                || cfgfile_strval (option, value, _T("parallel_matrix_emulation"), &p->parallel_matrix_emulation, epsonprinter, 0)
                || cfgfile_strval (option, value, _T("monitoremu"), &p->monitoremu, specialmonitors, 0)
                || cfgfile_strval (option, value, _T("waiting_blits"), &p->waiting_blits, waitblits, 0)
+               || cfgfile_strval (option, value, _T("floppy_auto_extended_adf"), &p->floppy_auto_ext2, autoext2, 0)
                || cfgfile_strboolval (option, value, _T("comp_flushmode"), &p->comp_hardflush, flushmode, 0))
                return 1;
 
diff --git a/cia.cpp b/cia.cpp
index 64dd8a142c3eb7967f0ff626e8cb682a99501729..56da618f25bfce4e0c3bae7a7db0252fffcb273c 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -590,7 +590,7 @@ static void resetwarning_check (void)
                        resetwarning_phase = -1;
                        kblostsynccnt = 0;
                        send_internalevent (INTERNALEVENT_KBRESET);
-                       uae_reset (0);
+                       uae_reset (0, 1);
                }
        }
        if (resetwarning_phase == 1) {
@@ -613,7 +613,7 @@ static void resetwarning_check (void)
                        resetwarning_phase = -1;
                        kblostsynccnt = 0;
                        send_internalevent (INTERNALEVENT_KBRESET);
-                       uae_reset (0);
+                       uae_reset (0, 1);
                }
        }
 }
@@ -953,6 +953,9 @@ static uae_u8 ReadCIAB (unsigned int addr)
 #endif
                return tmp;
        case 1:
+#ifdef ACTION_REPLAY
+               action_replay_ciaread ();
+#endif
 #if DONGLE_DEBUG > 0
                if (notinrom ())
                        write_log (_T("BFD100 R %02X %s\n"), ciabprb, debuginfo(0));
index c4cde54ee6ebcf43cff2d6b26d3e366ee59c0be6..e94b939b08af5f3e01658fe607806acc8e119760 100644 (file)
@@ -3271,8 +3271,8 @@ static uae_u32 REGPARAM2 timehack_helper (TrapContext *context)
        timehack_alive = 10;
 
        gettimeofday (&tv, NULL);
-       x_put_long (m68k_areg (regs, 0), tv.tv_sec - (((365 * 8 + 2) * 24) * 60 * 60));
-       x_put_long (m68k_areg (regs, 0) + 4, tv.tv_usec);
+       put_long (m68k_areg (regs, 0), tv.tv_sec - (((365 * 8 + 2) * 24) * 60 * 60));
+       put_long (m68k_areg (regs, 0) + 4, tv.tv_usec);
        return 0;
 #else
        return 2;
@@ -3882,7 +3882,7 @@ static void BPLCON0_Denise (int hpos, uae_u16 v, bool immediate)
        if (immediate) {
                record_register_change (hpos, 0x100, v);
        } else {
-               record_register_change (hpos, 0x100, (bplcon0d & ~(0x800 | 0x400 | 0x80)) | (v & (0x0800 | 0x400 | 0x80)));
+               record_register_change (hpos, 0x100, (bplcon0d & ~(0x800 | 0x400 | 0x80)) | (v & (0x0800 | 0x400 | 0x80 | 0x01)));
        }
 
        bplcon0d = v & ~0x80;
@@ -6541,7 +6541,7 @@ static void hsync_handler (void)
        if (vs) {
                vsync_handler_pre ();
                if (savestate_check ()) {
-                       uae_reset (0);
+                       uae_reset (0, 0);
                        return;
                }
        }
@@ -6764,7 +6764,7 @@ void custom_reset (int hardreset)
 
 #ifdef ACTION_REPLAY
        /* Doing this here ensures we can use the 'reset' command from within AR */
-       action_replay_reset ();
+       action_replay_reset (hardreset != 0);
 #endif
 #if defined(ENFORCER)
        enforcer_disable ();
index fc447993a54e5d8afc24db24f6b61817b22133fb..46d923d057ecad83b7dcfeb5781655278d217f65 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -2038,7 +2038,7 @@ static int drive_write_ext2 (uae_u16 *bigmfmbuf, struct zfile *diskfile, trackid
 
 static void drive_write_data (drive * drv);
 
-static bool convert_adf_to_ext2 (drive *drv)
+static bool convert_adf_to_ext2 (drive *drv, int mode)
 {
        TCHAR name[MAX_DPATH];
        bool hd = drv->ddhd == 2;
@@ -2049,18 +2049,33 @@ static bool convert_adf_to_ext2 (drive *drv)
        _tcscpy (name, currprefs.floppyslots[drv - floppy].df);
        if (!name[0])
                return false;
-       TCHAR *p = _tcsrchr (name, '.');
-       if (!p)
-               p = name + _tcslen (name);
-       _tcscpy (p, _T(".extended.adf"));
-       if (!disk_creatediskfile (name, 1, hd ? DRV_35_HD : DRV_35_DD, NULL, false, false, drv->diskfile))
+       if (mode == 1) {
+               TCHAR *p = _tcsrchr (name, '.');
+               if (!p)
+                       p = name + _tcslen (name);
+               _tcscpy (p, _T(".extended.adf"));
+               if (!disk_creatediskfile (name, 1, hd ? DRV_35_HD : DRV_35_DD, NULL, false, false, drv->diskfile))
+                       return false;
+       } else if (mode == 2) {
+               struct zfile *tmp = zfile_fopen_load_zfile (drv->diskfile);
+               if (!tmp)
+                       return false;
+               zfile_fclose (drv->diskfile);
+               drv->diskfile = NULL;
+               if (!disk_creatediskfile (name, 1, hd ? DRV_35_HD : DRV_35_DD, NULL, false, false, tmp)) {
+                       zfile_fclose (tmp);
+                       return false;
+               }
+       } else {
                return false;
-       f = zfile_fopen (name, _T("rb"), 0);
+       }
+       f = zfile_fopen (name, _T("r+b"));
        if (!f)
                return false;
        _tcscpy (currprefs.floppyslots[drv - floppy].df, name);
        _tcscpy (changed_prefs.floppyslots[drv - floppy].df, name);
        zfile_fclose (drv->diskfile);
+
        drv->diskfile = f;
        drv->filetype = ADF_EXT2;
        read_header_ext2 (drv->diskfile, drv->trackdata, &drv->num_tracks, &drv->ddhd);
@@ -2092,7 +2107,7 @@ static void drive_write_data (drive * drv)
        case ADF_NORMAL:
                if (drive_write_adf_amigados (drv)) {
                        if (currprefs.floppy_auto_ext2) {
-                               convert_adf_to_ext2 (drv);
+                               convert_adf_to_ext2 (drv, currprefs.floppy_auto_ext2);
                        } else {
                                static int warned;
                                if (!warned)
index b2e52d5326677fde4f0ac83f5f52cc42dbc8d5dc..48e610b19c713d7c557e8d7c9093055ea88edfbb 100644 (file)
@@ -248,7 +248,7 @@ static int driveclick_active (void)
        return 0;
 }
 
-STATIC_INLINE uae_s16 getsample (void)
+static uae_s16 getsample (void)
 {
        uae_s32 smp = 0;
        int div = 0, i;
@@ -259,8 +259,8 @@ STATIC_INLINE uae_s16 getsample (void)
                        struct drvsample *ds_spin = drv_has_disk[i] ? &drvs[i][DS_SPIN] : &drvs[i][DS_SPINND];
                        struct drvsample *ds_click = &drvs[i][DS_CLICK];
                        struct drvsample *ds_snatch = &drvs[i][DS_SNATCH];
-                       div += 2;
                        if (drv_spinning[i] || drv_starting[i]) {
+                               div++;
                                if (drv_starting[i] && drv_has_spun[i]) {
                                        if (ds_start->p && ds_start->pos < ds_start->len) {
                                                smp = ds_start->p[ds_start->pos >> DS_SHIFT];
@@ -287,6 +287,7 @@ STATIC_INLINE uae_s16 getsample (void)
                        }
                        if (ds_click->p && ds_click->pos < ds_click->len) {
                                smp += ds_click->p[ds_click->pos >> DS_SHIFT];
+                               div++;
                                ds_click->pos += sample_step;
                        }
                }
index 8c73ec3017fba38b574f46d359c029b783d47217..472d0a5b84b160763c8a7ea114614cf171e56b46 100644 (file)
@@ -2070,18 +2070,11 @@ mhloop
        move.b #3,5(a2) ;ie_SubClass = IESUBCLASS_NEWTABLET
        clr.l (a0) ;ient_CallBack
        clr.l 4(a0)
-       clr.w 6(a2) ;ie_Code
        clr.l 8(a0)
        clr.w 12(a0)
 
-       ;IEQUALIFIER_MIDBUTTON=0x1000/IEQUALIFIER_RBUTTON=0x2000/IEQUALIFIER_LEFTBUTTON=0x4000
-       move.l MH_BUTTONBITS+MH_DATA(a5),d1
-       and.w #7,d1
-       moveq #7,d0
-       sub.w d1,d0
-       lsl.w #8,d0
-       lsl.w #4,d0
-       move.w d0,8(a2) ;ie_Qualifier
+       clr.w 6(a2) ;ie_Code
+       bsr.w buttonstoqual
 
        move.w MH_X+MH_DATA(a5),12+2(a0) ;ient_TabletX
        clr.w 16(a0)
@@ -2133,7 +2126,7 @@ mhloop
        move.w MH_MAXAY++MH_DATA(a5),d0
        bmi.s .noay
        move.l #TABLETA_AngleY,(a1)+
-       move.w MH_AY++MH_DATA(pc),d0
+       move.w MH_AY+MH_DATA(a5),d0
        ext.l d0
        asl.l #8,d0
        move.l d0,(a1)+
@@ -2198,7 +2191,7 @@ mhloop
        clr.l (a2)
        move.w #$0400,4(a2) ;IECLASS_POINTERPOS
        clr.w 6(a2) ;ie_Code
-       clr.w 8(a2) ;ie_Qualifier
+       bsr.w buttonstoqual
 
        move.l MH_FOO_INTBASE(a3),a0
 
@@ -2227,6 +2220,25 @@ mhloop
 mhend
        rts
 
+buttonstoqual:
+       ;IEQUALIFIER_MIDBUTTON=0x1000/IEQUALIFIER_RBUTTON=0x2000/IEQUALIFIER_LEFTBUTTON=0x4000
+       move.l MH_BUTTONBITS+MH_DATA(a5),d1
+       moveq #0,d0
+       btst #0,d1
+       beq.s .btq1
+       bset #14,d0
+.btq1:
+       btst #1,d1
+       beq.s .btq2
+       bset #13,d0
+.btq2:
+       btst #2,d1
+       beq.s .btq3
+       bset #12,d0
+.btq3:
+       move.w d0,8(a2) ;ie_Qualifier
+       rts
+
 mousehackint:
        tst.l MH_IO(a1)
        beq.s .l1
index d8f1b1ca6ee853ff9e378fbb2e2cebfa6b520b19..9e5ea2157270971ed8389fb8ff07a581eb204723 100644 (file)
 #include "rp.h"
 #endif
 
-#define TRACING_ENABLED 0
+#define TRACING_ENABLED 1
+int log_filesys;
+
 #if TRACING_ENABLED
-#define TRACE(x) do { write_log x; } while(0)
+#define TRACE(x) if (log_filesys > 0) { write_log x; }
+#define TRACE2(x) if (log_filesys >= 2) { write_log x; }
+#define TRACE3(x) if (log_filesys >= 3) { write_log x; }
 #define DUMPLOCK(u,x) dumplock(u,x)
-#if TRACING_ENABLED > 1
-#define TRACE2(x) do { write_log x; } while(0)
-#else
-#define TRACE2(x)
-#endif
 #else
 #define TRACE(x)
 #define DUMPLOCK(u,x)
 #define TRACE2(x)
+#define TRACE3(x)
 #endif
 
 #define RTAREA_HEARTBEAT 0xFFFC
@@ -1253,6 +1253,8 @@ static void set_volume_name (Unit *unit, uae_u32 ctime)
 
 static int filesys_isvolume (Unit *unit)
 {
+       if (!unit->volume)
+               return 0;
        return get_byte (unit->volume + 44) || unit->ui.unknown_media;
 }
 
@@ -1632,12 +1634,19 @@ int hardfile_remount (int nr)
 bool filesys_do_disk_change (int cdunitnum, bool insert)
 {
        int nr = cdunitnum + cd_unit_offset;
-       if (!mountinfo.ui[nr].cd_open)
+       UnitInfo *ui = &mountinfo.ui[nr];
+       Unit *u = ui->self;
+
+       if (!ui->cd_open)
                return false;
        if (insert) {
+               if (filesys_isvolume (u))
+                       return false;
                filesys_insert (nr, NULL, _T("/"), true, MYVOLUMEINFO_CDFS | MYVOLUMEINFO_READONLY);
                return true;
        } else {
+               if (!filesys_isvolume (u))
+                       return false;
                filesys_eject (nr);
                return true;
        }
@@ -3230,16 +3239,23 @@ static void
        int fsdb_can = fsdb_cando (unit);
        TCHAR *xs;
        char *x, *x2;
+       bool ok = true;
 
        memset (&statbuf, 0, sizeof statbuf);
        /* No error checks - this had better work. */
        if (unit->volflags & MYVOLUMEINFO_ARCHIVE)
-               zfile_stat_archive (aino->nname, &statbuf);
+               ok = zfile_stat_archive (aino->nname, &statbuf) != 0;
        else if (unit->volflags & MYVOLUMEINFO_CDFS)
-               isofs_stat (unit->ui.cdfs_superblock, aino->uniq_external, &statbuf);
+               ok = isofs_stat (unit->ui.cdfs_superblock, aino->uniq_external, &statbuf);
        else
                stat (aino->nname, &statbuf);
 
+       if (!ok) {
+               PUT_PCK_RES1 (packet, DOS_FALSE);
+               PUT_PCK_RES2 (packet, ERROR_NOT_A_DOS_DISK);
+               return;
+       }
+
        if (aino->parent == 0) {
                /* Guru book says ST_ROOT = 1 (root directory, not currently used)
                * but some programs really expect 2 from root dir..
@@ -5400,7 +5416,7 @@ static uae_u32 REGPARAM2 exter_int_helper (TrapContext *context)
                                        lockend = get_long (lockend);
                                        cnt++;
                                }
-                               TRACE2((_T("message_lock: %d %x %x %x\n"), cnt, locks, lockend, m68k_areg (regs, 3)));
+                               TRACE3((_T("message_lock: %d %x %x %x\n"), cnt, locks, lockend, m68k_areg (regs, 3)));
                                put_long (lockend, get_long (m68k_areg (regs, 3)));
                                put_long (m68k_areg (regs, 3), locks);
                        }
@@ -5498,13 +5514,7 @@ static int handle_packet (Unit *unit, dpacket pck, uae_u32 msg)
        uae_s32 type = GET_PCK_TYPE (pck);
        PUT_PCK_RES2 (pck, 0);
 
-#if 0
-       if (unit->cdfs_superblock)
-               write_log(_T("unit=%x packet=%d\n"), unit, type);
-#endif
-#if TRACING_ENABLED > 1
-       write_log(_T("unit=%x packet=%d\n"), unit, type);
-#endif
+       TRACE((_T("unit=%x packet=%d\n"), unit, type));
        if (unit->inhibited && filesys_isvolume (unit)
                && type != ACTION_INHIBIT && type != ACTION_MORE_CACHE
                && type != ACTION_DISK_INFO) {
@@ -6286,6 +6296,17 @@ static int rdb_mount (UnitInfo *uip, int unit_no, int partnum, uaecptr parmpacke
        hfd->cylinders = rl (bufrdb + 64);
        hfd->sectors = rl (bufrdb + 68);
        hfd->heads = rl (bufrdb + 72);
+#if 0
+       {
+               int cyls, secs, heads;
+               getchsgeometry_hdf (hfd, hfd->virtsize, &cyls, &secs, &heads);
+               if (cyls * secs * heads > hfd->cylinders * hfd->sectors * hfd->heads) {
+                       hfd->cylinders = cyls;
+                       hfd->sectors = secs;
+                       hfd->heads = heads;
+               }
+       }
+#endif
        fileblock = rl (bufrdb + 32);
 
        buf = xmalloc (uae_u8, readblocksize);
@@ -7173,7 +7194,7 @@ static uae_u8 *restore_key (UnitInfo *ui, Unit *u, uae_u8 *src)
        }
        xfree (p);
        if (missing) {
-               xfree(k);
+               xfree (k);
        } else {
                k->next = u->keys;
                u->keys = k;
index bdc270b8cfbedb8792af2849dd04811f0daaf591..210863acdbe25a1d716738e329002e5eb7d68548 100644 (file)
@@ -3,11 +3,11 @@
  db(0x00); db(0x00); db(0x09); db(0xd0); 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(0xaa); db(0x00); db(0x00); db(0x00); db(0x00);
- db(0x00); db(0x00); db(0x14); db(0x96); db(0x43); db(0xfa); db(0x19); db(0xa1);
+ db(0x00); db(0x00); db(0x14); db(0xb0); db(0x43); db(0xfa); db(0x19); db(0xb9);
  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(0x18); db(0x8a); db(0x4e); db(0x90);
+ db(0x72); db(0x11); db(0x61); db(0x00); db(0x18); db(0xa2); 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);
  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(0xd8);
- db(0x61); db(0x00); db(0x17); db(0xa0); db(0x4c); db(0xdf); db(0x7e); db(0xff);
+ db(0x4e); db(0xae); db(0xfe); db(0x5c); db(0x61); db(0x00); db(0x13); db(0xf2);
+ db(0x61); db(0x00); db(0x17); db(0xb8); 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(0xec); db(0x61); db(0x00); db(0x17); db(0xe0);
- db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x19); db(0x02); db(0x70); db(0x24);
+ db(0x30); db(0x3c); db(0xff); db(0xec); db(0x61); db(0x00); db(0x17); db(0xf8);
+ db(0x2a); db(0x50); db(0x43); db(0xfa); db(0x19); db(0x1a); 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(0xf2); db(0x70); db(0x00);
+ db(0x66); db(0x0c); db(0x43); db(0xfa); db(0x19); db(0x0a); 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);
  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(0x17); db(0x08);
+ db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x17); db(0x20);
  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(0x16); db(0xe8);
+ db(0x30); db(0x3c); db(0xff); db(0x80); db(0x61); db(0x00); db(0x17); db(0x00);
  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(0x18); db(0x26);
- db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x17); db(0x9d);
+ db(0x22); db(0x04); db(0x74); db(0xfb); db(0x43); db(0xfa); db(0x18); db(0x3e);
+ db(0x4e); db(0xae); db(0xfd); db(0x96); db(0x41); db(0xfa); db(0x17); db(0xb5);
  db(0x43); db(0xfa); db(0x00); db(0x54); db(0x70); db(0x0a); db(0x61); db(0x00);
  db(0x0d); db(0x5e); db(0x22); db(0x40); db(0x72); db(0x01); db(0x30); db(0x3c);
- db(0xff); db(0x48); db(0x61); db(0x00); db(0x16); db(0xba); db(0x4e); db(0x90);
+ db(0xff); db(0x48); db(0x61); db(0x00); db(0x16); db(0xd2); 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(0x97); db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8);
+ db(0x17); db(0xaf); 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(0x17); db(0x48);
+ db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x41); db(0xfa); db(0x17); db(0x60);
  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(0x16); db(0x42); db(0x4e); db(0x90);
+ db(0xff); db(0x48); db(0x61); db(0x00); db(0x16); db(0x5a); db(0x4e); db(0x90);
  db(0x22); db(0x00); db(0x6b); db(0x04); db(0x61); db(0x00); db(0x08); db(0xec);
  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(0x16); db(0x28);
+ db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x16); db(0x40);
  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(0x16); db(0x12); db(0x70); db(0x02);
+ db(0xff); db(0x50); db(0x61); db(0x00); db(0x16); db(0x2a); 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);
  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(0x15); db(0x84); db(0x70); db(0x04); db(0x4e); db(0x90);
+ db(0x61); db(0x00); db(0x15); db(0x9c); 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(0xe0); db(0x30); db(0x3c); db(0xff); db(0x38);
- db(0x72); db(0x12); db(0x61); db(0x00); db(0x15); db(0x6a); db(0x4e); db(0x90);
+ db(0x72); db(0x12); db(0x61); db(0x00); db(0x15); db(0x82); db(0x4e); db(0x90);
  db(0x24); db(0x40); db(0x70); db(0x16); 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(0x13); db(0x7c); db(0x00); db(0x02); db(0x00); db(0x08); db(0x13); db(0x7c);
- db(0x00); db(0xf6); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x15); db(0xf7);
+ db(0x00); db(0xf6); db(0x00); db(0x09); db(0x41); db(0xfa); db(0x16); db(0x0f);
  db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x00); db(0x16);
  db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4a); db(0x00); db(0x0e);
  db(0x70); db(0x05); db(0x4e); db(0xae); db(0xff); db(0x58); db(0x4c); db(0xdf);
  db(0x4e); db(0x75); db(0x48); db(0xe7); db(0xc0); db(0xc0); db(0x61); db(0x00);
  db(0xfc); db(0x88); 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(0xca); db(0x23); db(0x48); db(0x00); db(0x0a);
+ db(0x41); db(0xfa); db(0x15); db(0xe2); db(0x23); db(0x48); db(0x00); db(0x0a);
  db(0x41); db(0xfa); db(0xfe); db(0xd2); db(0x23); db(0x48); db(0x00); db(0x0e);
  db(0x41); db(0xfa); db(0xfe); db(0xca); 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(0x61); db(0x00); db(0xff); db(0x72);
  db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x04); db(0x61); db(0x00);
- db(0x14); db(0xde); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x04);
+ db(0x14); db(0xf6); db(0x4e); db(0x90); db(0x4a); db(0x80); db(0x67); db(0x04);
  db(0x61); db(0x00); db(0x0b); db(0xc8); 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(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(0x4c); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x20); db(0x6b);
+ db(0x15); db(0x64); 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(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(0x9e); db(0x10); db(0x19); db(0x12); db(0x1a);
+ db(0x45); db(0xfa); db(0x14); db(0xb6); 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(0x74); db(0x25); db(0x48);
- db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x13); db(0xf0); db(0x25); db(0x48);
+ db(0x00); db(0x08); db(0x41); db(0xfa); db(0x14); db(0x8c); db(0x25); db(0x48);
+ db(0x00); db(0x0a); db(0x41); db(0xfa); db(0x14); db(0x08); 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(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(0xec); db(0x61); db(0x00); db(0x0f); db(0xea); db(0x2a); db(0x50);
- db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00); db(0x0f); db(0xe0);
+ db(0xff); db(0xec); db(0x61); db(0x00); db(0x10); db(0x02); db(0x2a); db(0x50);
+ db(0x30); db(0x3c); db(0xff); db(0x28); db(0x61); db(0x00); db(0x0f); db(0xf8);
  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(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(0x0f); db(0x98);
+ db(0x30); db(0x3c); db(0xff); db(0x20); db(0x61); db(0x00); db(0x0f); db(0xb0);
  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(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(0x0f); db(0x58);
+ db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00); db(0x0f); db(0x70);
  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(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(0xec); db(0x61); db(0x00);
- db(0x0e); db(0xee); db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28);
- db(0x61); db(0x00); db(0x0e); db(0xe4); db(0x22); db(0x48); db(0x20); db(0x5f);
+ db(0x0f); db(0x06); db(0x2a); db(0x50); db(0x30); db(0x3c); db(0xff); db(0x28);
+ db(0x61); db(0x00); db(0x0e); db(0xfc); 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(0x1a); db(0x20); db(0x28); db(0x01); db(0x90);
  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(0x0e); db(0xa4); db(0x4e); db(0x90); db(0x60); db(0x26);
+ db(0x61); db(0x00); db(0x0e); db(0xbc); 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(0x0e); db(0x8a); db(0x4e); db(0x90);
+ db(0xff); db(0x20); db(0x61); db(0x00); db(0x0e); db(0xa2); 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(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(0x94); db(0x30); db(0x3c); db(0xff); db(0x18); db(0x61); db(0x00);
- db(0x0e); db(0x3e); db(0x4e); db(0x90); db(0x20); db(0x03); db(0x16); db(0x29);
+ db(0x0e); db(0x56); 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(0x54); db(0x20); db(0x08); db(0xe4); db(0x88); db(0x27); db(0x40);
  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(0x6b); db(0x70); db(0x00);
+ db(0x00); db(0x04); db(0x43); db(0xfa); db(0x0e); db(0x83); 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(0x66); db(0x70); db(0x24); db(0x4e); db(0xae); db(0xfd); db(0xd8);
+ db(0x0e); db(0x7e); 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(0x54); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0x43); db(0xfa); db(0x0e); db(0x6c); 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(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(0x0c); db(0xce); db(0x70); db(0x03); db(0x4e); db(0x90); db(0x22); db(0x6b);
+ db(0x0c); db(0xe6); 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(0x8d); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0x43); db(0xfa); db(0x0d); db(0xa5); 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); db(0x7c); db(0x00);
  db(0x26); db(0x86); db(0x27); db(0x46); db(0x00); db(0x04); 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(0x66);
+ db(0x27); db(0x40); db(0x00); db(0xb0); db(0x41); db(0xfa); db(0x0c); db(0x7e);
  db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); db(0x02); db(0xae);
- db(0x27); db(0x40); db(0x00); db(0xa4); db(0x41); db(0xfa); db(0x0c); db(0x63);
+ db(0x27); db(0x40); db(0x00); db(0xa4); db(0x41); db(0xfa); db(0x0c); db(0x7b);
  db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00); db(0x02); db(0x9e);
  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(0x0c); db(0x20);
+ db(0x30); db(0x3c); db(0xff); db(0x40); db(0x61); db(0x00); db(0x0c); db(0x38);
  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(0x70);
  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(0x0b); db(0xcc); db(0x70); db(0x01); db(0x4e); db(0x90);
+ db(0x61); db(0x00); db(0x0b); db(0xe4); 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(0x0b); db(0xb4); db(0x70); db(0x02); db(0x4e); db(0x90);
+ db(0x61); db(0x00); db(0x0b); db(0xcc); 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); db(0x40); db(0x00);
  db(0x00); db(0x00); db(0x00); db(0x14); db(0x66); db(0x44); db(0x0c); db(0x6c);
  db(0x70); db(0x26); db(0x4e); db(0xae); db(0xff); db(0x2e); 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(0x0b); db(0x40);
+ db(0x30); db(0x3c); db(0xff); db(0x50); db(0x61); db(0x00); db(0x0b); db(0x58);
  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(0x2e);
  db(0x22); db(0x50); db(0x20); db(0x40); db(0x20); db(0x28); db(0x00); db(0x04);
  db(0x0c); db(0x85); db(0x00); db(0x00); db(0x00); db(0x14); db(0x65); db(0x00);
  db(0x00); db(0x0a); db(0x70); db(0x01); db(0x29); db(0x40); db(0x00); db(0x04);
  db(0x60); db(0x12); db(0x61); db(0x5e); db(0x30); db(0x3c); db(0xff); db(0x30);
- db(0x61); db(0x00); db(0x0a); db(0xec); db(0x4e); db(0x90); db(0x4a); db(0x80);
+ db(0x61); db(0x00); db(0x0b); db(0x04); 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(0xd6);
  db(0x28); db(0x43); db(0x61); db(0x04); db(0x60); db(0x00); db(0xfe); db(0xce);
  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(0x14); db(0x66); db(0x0e); db(0x30); db(0x3c);
- db(0xff); db(0x58); db(0x61); db(0x00); db(0x0a); db(0xaa); db(0x70); db(0x00);
+ db(0xff); db(0x58); db(0x61); db(0x00); db(0x0a); db(0xc2); 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); db(0x4e); db(0xee);
  db(0xfe); db(0x92); db(0x2f); db(0x05); db(0x7a); db(0xfc); db(0x24); db(0x53);
  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(0xa8); db(0x43); db(0xfa);
+ db(0x4e); db(0x75); db(0x41); db(0xfa); db(0x09); db(0xc0); 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(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(0x07); db(0xe0);
+ db(0xff); db(0x38); db(0x72); db(0x01); db(0x61); db(0x00); db(0x07); db(0xf8);
  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(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(0x07); db(0x84); db(0x20); db(0x0d); db(0x06); db(0x80);
+ db(0x61); db(0x00); db(0x07); db(0x9c); 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(0x08); db(0x04); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa);
- db(0x02); db(0xda); db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4d);
+ db(0x08); db(0x1c); db(0x23); db(0x48); db(0x00); db(0x0a); db(0x41); db(0xfa);
+ db(0x02); db(0xf4); db(0x23); db(0x48); db(0x00); db(0x12); db(0x23); db(0x4d);
  db(0x00); db(0x0e); db(0x70); db(0x05); db(0x4e); db(0xae); db(0xff); db(0x58);
  db(0x20); db(0x06); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x70); db(0x00);
  db(0x53); db(0xab); db(0x00); db(0x1c); db(0x6a); db(0x06); db(0x70); db(0x0a);
  db(0x27); db(0x40); db(0x00); db(0x1c); db(0x4a); db(0xab); db(0x00); db(0x14);
  db(0x66); db(0x16); db(0x4a); db(0xab); db(0x00); db(0x1c); db(0x66); db(0xe0);
- db(0x43); db(0xfa); db(0x08); db(0x31); db(0x70); db(0x00); db(0x4e); db(0xae);
+ db(0x43); db(0xfa); db(0x08); db(0x49); db(0x70); db(0x00); db(0x4e); db(0xae);
  db(0xfd); db(0xd8); db(0x27); db(0x40); db(0x00); db(0x14); db(0x67); db(0xd0);
  db(0x4a); db(0xab); db(0x00); db(0x18); db(0x66); db(0x18); db(0x4a); db(0xab);
- db(0x00); db(0x1c); db(0x66); db(0xc4); db(0x43); db(0xfa); db(0x08); db(0x27);
+ db(0x00); db(0x1c); db(0x66); db(0xc4); db(0x43); db(0xfa); db(0x08); db(0x3f);
  db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x27); db(0x40);
  db(0x00); db(0x18); db(0x67); db(0x00); db(0xff); db(0xb4); db(0x4a); db(0xad);
  db(0x02); db(0x08); db(0x66); db(0x38); db(0x4a); db(0xab); db(0x00); db(0x1c);
  db(0x66); db(0xa6); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xee);
- db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x06); db(0xf8); db(0x4e); db(0xae);
+ db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x07); db(0x10); 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(0xe6);
+ db(0x4a); db(0x82); db(0x67); db(0x8c); db(0x41); db(0xfa); db(0x06); db(0xfe);
  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(0x2b); db(0x40); db(0x02); db(0x08); db(0x67); db(0x00); db(0x02); db(0x32);
  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);
  db(0xff); db(0x68); db(0x4e); db(0xae); db(0xff); db(0x7c); db(0x41); db(0xee);
- db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x06); db(0xc5); db(0x4e); db(0xae);
+ db(0x01); db(0x5e); db(0x43); db(0xfa); db(0x06); db(0xdd); 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(0x00); db(0xff); db(0x4c); db(0x41); db(0xfa);
- db(0x06); db(0xb1); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); db(0x00);
+ db(0x06); db(0xc9); db(0x70); db(0x00); db(0x72); db(0x00); db(0x61); 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(0x06); db(0x7c); db(0x4e); db(0x90); db(0x60); db(0x00);
+ db(0x01); db(0xf0); db(0x30); db(0x3c); db(0xff); db(0x38); db(0x72); db(0x00);
+ db(0x61); db(0x00); db(0x06); db(0x94); 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(0xb4); db(0x70); db(0x32); db(0x27); db(0x40);
  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(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(0x0c); db(0x47); db(0x00); db(0x27); db(0x65); db(0x00); db(0x01); db(0x52);
+ db(0x08); db(0x00); db(0x00); db(0x01); db(0x67); db(0x00); db(0x01); db(0x4a);
  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(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(0x6d); db(0x02); db(0x1a); db(0x00); db(0x0e);
+ db(0x00); db(0x04); db(0x42); db(0xa8); db(0x00); db(0x08); db(0x42); db(0x68);
+ db(0x00); db(0x0c); db(0x42); db(0x6a); db(0x00); db(0x06); db(0x61); db(0x00);
+ db(0x01); db(0x72); 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(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(0xa0); db(0x04); db(0x30); db(0x2d); db(0x02); db(0x2c); 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(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(0x58);
+ db(0x22); db(0xc0); db(0x42); db(0x91); db(0x61); db(0x00); db(0xfc); db(0x68);
  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(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(0x1e); db(0x52); db(0x43); db(0xd4); db(0x42); db(0x0c); db(0x42);
+ db(0xfc); db(0x2e); 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(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(0x67); db(0x00); db(0xfd); db(0x8e); 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(0x61); db(0x00); db(0x00); db(0x38); db(0x20); db(0x6b); db(0x00); db(0x14);
  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(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(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(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(0x04); db(0x46); 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(0x04); db(0x2c); 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(0x03); db(0xfa); db(0x20); db(0x0d);
- db(0x4e); db(0x90); db(0x41); db(0xfa); db(0x04); db(0x7a); 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(0x32); 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(0x03); db(0xd0);
- 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);
- db(0xfe); db(0x62); db(0x22); db(0x4d); db(0x20); db(0x3c); db(0x00); db(0x00);
- db(0x00); db(0x88); db(0x4e); db(0xae); db(0xff); db(0x2e); db(0x70); db(0x00);
- db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x38); db(0x3e); db(0x2c); db(0x6d);
- db(0x00); db(0x18); db(0x41); db(0xfa); db(0x04); db(0x08); db(0x22); db(0x08);
- db(0x24); db(0x3c); db(0x00); db(0x00); db(0x03); db(0xed); db(0x4e); db(0xae);
- db(0xff); db(0xe2); db(0x28); db(0x00); db(0x67); db(0x4c); db(0x45); db(0xed);
- db(0x00); db(0x68); db(0x42); db(0x92); db(0x34); db(0xaa); db(0x00); db(0x02);
- db(0x24); db(0x0a); db(0x54); db(0x82); db(0x76); db(0x02); db(0x22); db(0x04);
- db(0x4e); db(0xae); db(0xff); db(0xd6); db(0xb6); db(0x80); db(0x66); db(0x32);
- db(0x0c); db(0x92); db(0x50); db(0x4e); db(0x54); db(0x52); db(0x66); db(0xe4);
- db(0x24); db(0x0a); db(0x76); db(0x04); db(0x22); db(0x04); db(0x4e); db(0xae);
- 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(0x03); db(0x40);
- 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(0x80);
- db(0x22); db(0x08); db(0x74); db(0xfe); db(0x4e); db(0xae); db(0xff); db(0xac);
- db(0x22); db(0x00); db(0x67); db(0x34); db(0x4e); db(0xae); db(0xff); db(0xa6);
- db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x45); db(0xed); db(0x00); db(0x38);
- db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6); db(0x15); db(0x40);
- db(0x00); db(0x14); db(0x41); db(0xfa); db(0x03); db(0x70); db(0x24); db(0x88);
- db(0x25); db(0x7c); db(0x00); db(0x00); db(0x00); db(0x12); db(0x00); db(0x0c);
- db(0x25); db(0x6d); db(0x00); db(0x08); db(0x00); db(0x10); db(0x2c); db(0x6d);
- db(0x00); db(0x18); db(0x22); db(0x0a); db(0x4e); db(0xae); db(0xfc); db(0x88);
- db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x4e); db(0x75); db(0x00); db(0x00);
+ db(0x61); db(0x00); db(0xfb); db(0xa0); db(0x60); db(0x00); db(0xfd); db(0x4a);
+ db(0x4e); db(0x75); db(0x22); db(0x2d); db(0x02); db(0x32); db(0x70); db(0x00);
+ db(0x08); db(0x01); db(0x00); db(0x00); db(0x67); db(0x04); db(0x08); db(0xc0);
+ db(0x00); db(0x0e); db(0x08); db(0x01); db(0x00); db(0x01); db(0x67); db(0x04);
+ db(0x08); db(0xc0); db(0x00); db(0x0d); db(0x08); db(0x01); db(0x00); db(0x02);
+ db(0x67); db(0x04); db(0x08); db(0xc0); db(0x00); db(0x0c); db(0x35); db(0x40);
+ db(0x00); db(0x08); 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(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(0x04); db(0x44); 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(0x04); db(0x2a); 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(0x03); db(0xf8);
+ db(0x20); db(0x0d); db(0x4e); db(0x90); db(0x41); db(0xfa); db(0x04); db(0x78);
+ db(0x43); db(0xfa); db(0x01); db(0x12); db(0x70); db(0xf6); db(0x22); db(0x3c);
+ db(0x00); db(0x00); db(0x27); db(0x10); db(0x61); db(0x00); db(0xed); db(0x18);
+ 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(0x03); db(0xce); 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); db(0xfe); db(0x62); db(0x22); db(0x4d); db(0x20); db(0x3c);
+ db(0x00); db(0x00); db(0x00); db(0x88); db(0x4e); db(0xae); db(0xff); db(0x2e);
+ db(0x70); db(0x00); db(0x4e); db(0x75); db(0x48); db(0xe7); db(0x38); db(0x3e);
+ db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x41); db(0xfa); db(0x04); db(0x06);
+ db(0x22); db(0x08); db(0x24); db(0x3c); db(0x00); db(0x00); db(0x03); db(0xed);
+ db(0x4e); db(0xae); db(0xff); db(0xe2); db(0x28); db(0x00); db(0x67); db(0x4c);
+ db(0x45); db(0xed); db(0x00); db(0x68); db(0x42); db(0x92); db(0x34); db(0xaa);
+ db(0x00); db(0x02); db(0x24); db(0x0a); db(0x54); db(0x82); db(0x76); db(0x02);
+ db(0x22); db(0x04); db(0x4e); db(0xae); db(0xff); db(0xd6); db(0xb6); db(0x80);
+ db(0x66); db(0x32); db(0x0c); db(0x92); db(0x50); db(0x4e); db(0x54); db(0x52);
+ db(0x66); db(0xe4); db(0x24); db(0x0a); db(0x76); db(0x04); db(0x22); db(0x04);
+ db(0x4e); db(0xae); 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(0x03); db(0x3e); 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(0x7e); db(0x22); db(0x08); db(0x74); db(0xfe); db(0x4e); db(0xae);
+ db(0xff); db(0xac); db(0x22); db(0x00); db(0x67); db(0x34); db(0x4e); db(0xae);
+ db(0xff); db(0xa6); db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x45); db(0xed);
+ db(0x00); db(0x38); db(0x70); db(0xff); db(0x4e); db(0xae); db(0xfe); db(0xb6);
+ db(0x15); db(0x40); db(0x00); db(0x14); db(0x41); db(0xfa); db(0x03); db(0x6e);
+ db(0x24); db(0x88); db(0x25); db(0x7c); db(0x00); db(0x00); db(0x00); db(0x12);
+ db(0x00); db(0x0c); db(0x25); db(0x6d); db(0x00); db(0x08); db(0x00); db(0x10);
+ db(0x2c); db(0x6d); db(0x00); db(0x18); db(0x22); db(0x0a); db(0x4e); db(0xae);
+ db(0xfc); db(0x88); db(0x2c); db(0x6d); db(0x00); db(0x14); db(0x4e); db(0x75);
  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(0x02); db(0xce); 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(0xfe); db(0xfe); 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(0xab); db(0x70); db(0x00);
  db(0x4e); db(0xae); db(0xfd); db(0xd8); db(0x2b); db(0x40); db(0x00); db(0x18);
- db(0x67); db(0x00); db(0xfe); db(0xda); db(0x2c); db(0x40); db(0x72); db(0x32);
+ db(0x67); db(0x00); db(0xfe); db(0xdc); db(0x2c); db(0x40); db(0x72); db(0x32);
  db(0x4e); db(0xae); db(0xff); db(0x3a); db(0x41); db(0xfa); db(0x02); db(0xd4);
  db(0x22); db(0x08); db(0x74); db(0xfe); db(0x4e); db(0xae); db(0xff); db(0xac);
  db(0x4a); db(0x80); db(0x67); db(0xea); db(0x22); db(0x00); db(0x4e); db(0xae);
  db(0xff); db(0xa6); db(0x72); db(0x32); db(0x4e); db(0xae); db(0xff); db(0x3a);
  db(0x41); db(0xfa); db(0x02); db(0xbe); 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(0x38);
+ db(0xfe); db(0xa6); 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(0x72); db(0x00); db(0x32); db(0x3c); db(0x00); db(0x34); db(0x61); 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(0xf8); db(0x64); db(0x28); db(0x40); db(0x4a); db(0x80); db(0x67); db(0x00);
+ db(0xfe); db(0x86); 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(0x97); db(0x22); db(0x4c);
  db(0x4e); db(0xae); db(0xfe); db(0x44); db(0x4a); db(0x80); db(0x66); db(0xe2);
  db(0x20); db(0x6c); db(0x00); db(0x14); db(0x0c); db(0x68); db(0x00); db(0x25);
- db(0x00); db(0x14); db(0x64); db(0x0c); db(0x61); db(0x00); db(0xfe); db(0x48);
+ db(0x00); db(0x14); db(0x64); db(0x0c); db(0x61); db(0x00); db(0xfe); db(0x4a);
  db(0x70); db(0x00); db(0x4e); db(0xae); db(0xfe); db(0xc2); db(0x60); db(0xf8);
- db(0x61); db(0x00); db(0xfe); db(0xe6); db(0x41); db(0xed); db(0x00); db(0x1c);
+ db(0x61); db(0x00); db(0xfe); db(0xe8); db(0x41); db(0xed); db(0x00); db(0x1c);
  db(0x29); db(0x48); db(0x00); db(0x28); db(0x70); db(0x01); db(0x29); db(0x40);
  db(0x00); db(0x24); db(0x39); db(0x7c); db(0x00); db(0x0c); db(0x00); db(0x1c);
  db(0x2b); db(0x4d); db(0x00); db(0x2c); db(0x41); db(0xfa); db(0x01); db(0x60);
  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);
- db(0x67); db(0x06); db(0x61); db(0x00); db(0xfe); db(0x1e); db(0x60); db(0xe4);
+ db(0x67); db(0x06); db(0x61); db(0x00); db(0xfe); db(0x20); db(0x60); db(0xe4);
  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(0x48); db(0xe7); db(0xc0); db(0x80); db(0x30); db(0x3c); db(0xff); db(0x38);
  db(0x72); db(0x66); db(0x61); db(0x00); db(0x00); db(0x0a); db(0x4e); db(0x90);
  db(0x4c); db(0xdf); db(0x01); db(0x03); db(0x4e); db(0x75); db(0x41); db(0xfa);
- db(0xe7); db(0x24); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff);
+ db(0xe7); db(0x0c); db(0x02); db(0x80); db(0x00); db(0x00); db(0xff); db(0xff);
  db(0xd1); db(0xc0); 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); db(0x2e); db(0x64);
index 536af365988b09bec719817be478575c4e423272..ac2e2b08d09b40be27f17e14587beae46b9c2209 100644 (file)
--- a/gayle.cpp
+++ b/gayle.cpp
@@ -323,7 +323,7 @@ static void gayle_cs_change (uae_u8 mask, int onoff)
                rethink_gayle ();
                if ((mask & GAYLE_CS_CCDET) && (gayle_irq & (GAYLE_IRQ_RESET | GAYLE_IRQ_BERR)) != (GAYLE_IRQ_RESET | GAYLE_IRQ_BERR)) {
                        if (gayle_irq & GAYLE_IRQ_RESET)
-                               uae_reset (0);
+                               uae_reset (0, 0);
                        if (gayle_irq & GAYLE_IRQ_BERR)
                                Exception (2);
                }
index 91360b5da5af8960f04417434eb18da2689a50c5..b6c2ef2e9164698b10702bdec4ea9ae0fb65a0e9 100644 (file)
@@ -36,7 +36,7 @@ extern int is_ar_pc_in_ram(void);
 extern void action_replay_enter (void);
 extern void action_replay_ciaread (void);
 extern void action_replay_hide (void);
-extern void action_replay_reset (void);
+extern void action_replay_reset (bool hardreset);
 extern int action_replay_load (void);
 extern int action_replay_unload (int in_memory_reset);
 
index 4487a11a031bde9d2afdc0653dd004cb3c28de49..62e6100876e285f6ba2a8b776b1202ce07ce5b4e 100644 (file)
@@ -20,7 +20,7 @@ bool isofs_mediainfo(void *sb, struct isofs_info*);
 struct cd_opendir_s *isofs_opendir(void *sb, uae_u64 uniq);
 void isofs_closedir(struct cd_opendir_s*);
 bool isofs_readdir(struct cd_opendir_s*, TCHAR*, uae_u64 *uniq);
-void isofs_stat(void *sb, uae_u64, struct _stat64*);
+bool isofs_stat(void *sb, uae_u64, struct _stat64*);
 void isofss_fill_file_attrs(void *sb, uae_u64, int*, int*, TCHAR**, uae_u64);
 bool isofs_exists(void *sb, uae_u64, const TCHAR*, uae_u64*);
 void isofs_dispose_inode(void *sb, uae_u64);
index 696f465a2d1825aad16a8ff51dfac2646615e141..74332020370cab61e0a3abf6806ce19b3b1edc76 100644 (file)
@@ -328,7 +328,7 @@ struct uae_prefs {
        int floppy_write_length;
        int floppy_random_bits_min;
        int floppy_random_bits_max;
-       bool floppy_auto_ext2;
+       int floppy_auto_ext2;
        bool tod_hack;
        uae_u32 maprom;
        int turbo_emulation;
index 653c6d467efc3f3488bc866fa623fbe4dbbe205e..f890e8a0efc2828f7c9b83e422f726e2245d6e70 100644 (file)
@@ -18,7 +18,7 @@ extern void sleep_millis_main (int ms);
 extern void sleep_millis_busy (int ms);
 extern int sleep_resolution;
 
-extern void uae_reset (int);
+extern void uae_reset (int, int);
 extern void uae_quit (void);
 extern void uae_restart (int, TCHAR*);
 extern void reset_all_systems (void);
index 39070e3d62c3b7e0d1f2d8fdff54119e87b5dafd..98c0cdf076f54ae03491c9656376cceeea08ec1b 100644 (file)
@@ -41,6 +41,7 @@ extern struct zfile *zfile_fopen (const TCHAR *, const TCHAR *, int mask, int in
 extern struct zfile *zfile_fopen_empty (struct zfile*, const TCHAR *name, uae_u64 size);
 extern struct zfile *zfile_fopen_empty (struct zfile*, const TCHAR *name);
 extern struct zfile *zfile_fopen_data (const TCHAR *name, uae_u64 size, const uae_u8 *data);
+extern struct zfile *zfile_fopen_load_zfile (struct zfile *f);
 extern uae_u8 *zfile_load_data (const TCHAR *name, const uae_u8 *data,int datalen, int *outlen);
 extern struct zfile *zfile_fopen_parent (struct zfile*, const TCHAR*, uae_u64 offset, uae_u64 size);
 
index 5d75ceea7bbc11579a3eda902fa00895e567e3c6..0f4881177f0c95426fab615cd7ed4116e58e8fa5 100644 (file)
@@ -1416,27 +1416,35 @@ void inputdevice_tablet_info (int maxx, int maxy, int maxz, int maxax, int maxay
 
 void getgfxoffset (int *dx, int *dy, int*,int*);
 
-static void inputdevice_mh_abs (int x, int y)
+static void inputdevice_mh_abs (int x, int y, uae_u32 buttonbits)
 {
        uae_u8 *p;
-       uae_u8 tmp[4];
+       uae_u8 tmp1[4], tmp2[4];
 
        mousehack_enable ();
        if (!mousehack_address)
                return;
        p = get_real_address (mousehack_address);
 
-       memcpy (tmp, p + MH_ABSX, sizeof tmp);
+       memcpy (tmp1, p + MH_ABSX, sizeof tmp1);
+       memcpy (tmp2, p + MH_BUTTONBITS, sizeof tmp2);
 
        x -= mouseoffset_x + 1;
        y -= mouseoffset_y + 2;
 
+       //write_log (_T("%dx%d %08x\n"), x, y, buttonbits);
+
        p[MH_ABSX] = x >> 8;
        p[MH_ABSX + 1] = x;
        p[MH_ABSY] = y >> 8;
        p[MH_ABSY + 1] = y;
 
-       if (!memcmp (tmp, p + MH_ABSX, sizeof tmp))
+       p[MH_BUTTONBITS + 0] = buttonbits >> 24;
+       p[MH_BUTTONBITS + 1] = buttonbits >> 16;
+       p[MH_BUTTONBITS + 2] = buttonbits >>  8;
+       p[MH_BUTTONBITS + 3] = buttonbits >>  0;
+
+       if (!memcmp (tmp1, p + MH_ABSX, sizeof tmp1) && !memcmp (tmp2, p + MH_BUTTONBITS, sizeof tmp2))
                return;
        p[MH_E] = 0xc0 | 1;
        p[MH_CNT]++;
@@ -1563,7 +1571,7 @@ static void inputdevice_mh_abs_v36 (int x, int y)
 }
 #endif
 
-static void mousehack_helper (void)
+static void mousehack_helper (uae_u32 buttonmask)
 {
        int x, y;
        int fdy, fdx, fmx, fmy;
@@ -1580,7 +1588,6 @@ static void mousehack_helper (void)
        y = lastmy;
        getgfxoffset (&fdx, &fdy, &fmx, &fmy);
 
-
 #ifdef PICASSO96
        if (picasso_on) {
                x -= picasso96_state.XOffset;
@@ -1607,7 +1614,7 @@ static void mousehack_helper (void)
                x = coord_native_to_amiga_x (x);
                y = coord_native_to_amiga_y (y) << 1;
        }
-       inputdevice_mh_abs (x, y);
+       inputdevice_mh_abs (x, y, buttonmask);
 }
 
 static int mouseedge_x, mouseedge_y, mouseedge_time;
@@ -2514,7 +2521,7 @@ void inputdevice_do_keyboard (int code, int state)
                                return;
                        memset (keybuf, 0, sizeof (keybuf));
                        send_internalevent (INTERNALEVENT_KBRESET);
-                       uae_reset (r);
+                       uae_reset (r, 1);
                }
                if (record_key ((uae_u8)((key << 1) | (key >> 7)))) {
                        if (inputdevice_logging & 1)
@@ -2685,10 +2692,10 @@ void inputdevice_handle_inputcode (void)
                uae_quit ();
                break;
        case AKS_SOFTRESET:
-               uae_reset (0);
+               uae_reset (0, 0);
                break;
        case AKS_HARDRESET:
-               uae_reset (1);
+               uae_reset (1, 1);
                break;
        case AKS_STATESAVEQUICK:
        case AKS_STATESAVEQUICK1:
@@ -6272,6 +6279,7 @@ void setjoybuttonstateall (int joy, uae_u32 buttonbits, uae_u32 buttonmask)
 void setmousebuttonstateall (int mouse, uae_u32 buttonbits, uae_u32 buttonmask)
 {
        int i;
+       uae_u32 obuttonmask = mice2[mouse].buttonmask;
 
        for (i = 0; i < ID_BUTTON_TOTAL; i++) {
                if (buttonmask & (1 << i))
@@ -6279,15 +6287,20 @@ void setmousebuttonstateall (int mouse, uae_u32 buttonbits, uae_u32 buttonmask)
                else if (buttonbits & (1 << i))
                        setbuttonstateall (&mice[mouse], &mice2[mouse], i, -1);
        }
+       if (obuttonmask != mice2[mouse].buttonmask)
+               mousehack_helper (mice2[mouse].buttonmask);
 }
 
 void setmousebuttonstate (int mouse, int button, int state)
 {
+       uae_u32 obuttonmask = mice2[mouse].buttonmask;
        if (testmode) {
                inputdevice_testrecord (IDTYPE_MOUSE, mouse, IDEV_WIDGET_BUTTON, button, state);
                return;
        }
        setbuttonstateall (&mice[mouse], &mice2[mouse], button, state);
+       if (obuttonmask != mice2[mouse].buttonmask)
+               mousehack_helper (mice2[mouse].buttonmask);
 }
 
 /* same for joystick axis (analog or digital)
@@ -6355,7 +6368,7 @@ void setmousestate (int mouse, int axis, int data, int isabs)
                        else
                                lastmy = data;
                        if (axis)
-                               mousehack_helper ();
+                               mousehack_helper (mice2[mouse].buttonmask);
                }
                return;
        }
@@ -6378,7 +6391,7 @@ void setmousestate (int mouse, int axis, int data, int isabs)
                else
                        lastmy = data;
                if (axis)
-                       mousehack_helper ();
+                       mousehack_helper (mice2[mouse].buttonmask);
                if (currprefs.input_tablet == TABLET_MOUSEHACK && mousehack_alive ())
                        return;
        }
index cb9ff4e1398729fec98455f8c53805b95d6f658a..1ee9266dfdffebd99f6d5b51e8ab8a841c4a82d5 100644 (file)
--- a/isofs.cpp
+++ b/isofs.cpp
@@ -2494,13 +2494,13 @@ void isofss_fill_file_attrs(void *sbp, uae_u64 parent, int *dir, int *flags, TCH
                *comment = my_strdup(inode->i_comment);
 }
 
-void isofs_stat(void *sbp, uae_u64 uniq, struct _stat64 *statbuf)
+bool isofs_stat(void *sbp, uae_u64 uniq, struct _stat64 *statbuf)
 {
        struct super_block *sb = (struct super_block*)sbp;
        struct inode *inode = find_inode(sb, uniq);
 
        if (!inode)
-               return;
+               return false;
 
        statbuf->st_mode = FILEFLAG_READ;
        statbuf->st_mtime = inode->i_mtime.tv_sec;
@@ -2509,6 +2509,7 @@ void isofs_stat(void *sbp, uae_u64 uniq, struct _stat64 *statbuf)
        } else {
                statbuf->st_size = inode->i_size;
        }
+       return true;
 }
 
 bool isofs_exists(void *sbp, uae_u64 parent, const TCHAR *name, uae_u64 *uniq)
index 1a31634c5c3e1c5919011549cd17e7ffbd8823a8..518862a5c31b16367975fd569155f3fb2bceeb88 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -513,7 +513,7 @@ static int restart_program;
 static TCHAR restart_config[MAX_DPATH];
 static int default_config;
 
-void uae_reset (int hardreset)
+void uae_reset (int hardreset, int keyboardreset)
 {
        if (debug_dma) {
                record_dma_reset ();
index a018b7e02264ee8c72c606e002cdd1716ac1d798..e893d288ed8bfc78057922814378e86b4bafdcd8 100644 (file)
@@ -1242,7 +1242,7 @@ uae_u8 *REGPARAM2 default_xlate (uaecptr a)
                        }
                        be_cnt++;
                        if (be_cnt > 1000) {
-                               uae_reset (0);
+                               uae_reset (0, 0);
                                be_cnt = 0;
                        } else {
                                regs.panic = 1;
@@ -2254,7 +2254,9 @@ static void allocate_memory (void)
 
        if (savestate_state == STATE_RESTORE) {
                if (bootrom_filepos) {
+                       protect_roms (false);
                        restore_ram (bootrom_filepos, rtarea);
+                       protect_roms (true);
                }
                restore_ram (chip_filepos, chipmemory);
                if (allocated_bogomem > 0)
@@ -2690,9 +2692,9 @@ void memory_reset (void)
        }
 #endif
 #endif
-       if (mem_hardreset)
+       if (mem_hardreset) {
                memory_clear ();
-
+       }
        write_log (_T("memory init end\n"));
 }
 
index 2659ad4afed0db89b126b904a4da5389f94697d4..227f189944a90b446bc58464f9ca5385d5635ff0 100644 (file)
@@ -2195,7 +2195,7 @@ kludge_me_do:
        newpc |= x_get_word (4 * nr + 2); // read low address
        if (newpc & 1) {
                if (nr == 2 || nr == 3)
-                       uae_reset (1); /* there is nothing else we can do.. */
+                       uae_reset (1, 0); /* there is nothing else we can do.. */
                else
                        exception3 (regs.ir, newpc);
                return;
@@ -2331,7 +2331,7 @@ kludge_me_do:
        newpc = get_long_mmu (regs.vbr + 4 * nr);
        if (newpc & 1) {
                if (nr == 2 || nr == 3)
-                       uae_reset (1); /* there is nothing else we can do.. */
+                       uae_reset (1, 0); /* there is nothing else we can do.. */
                else
                        exception3 (regs.ir, newpc);
                return;
@@ -2404,7 +2404,7 @@ static void Exception_normal (int nr)
                                                newpc = x_get_long (regs.vbr + 4 * nr);
                                                if (newpc & 1) {
                                                        if (nr == 2 || nr == 3)
-                                                               uae_reset (1); /* there is nothing else we can do.. */
+                                                               uae_reset (1, 0); /* there is nothing else we can do.. */
                                                        else
                                                                exception3 (regs.ir, newpc);
                                                        return;
@@ -2520,7 +2520,7 @@ kludge_me_do:
        newpc = x_get_long (regs.vbr + 4 * nr);
        if (newpc & 1) {
                if (nr == 2 || nr == 3)
-                       uae_reset (1); /* there is nothing else we can do.. */
+                       uae_reset (1, 0); /* there is nothing else we can do.. */
                else
                        exception3 (regs.ir, newpc);
                return;
@@ -4110,7 +4110,7 @@ retry:
                        m68k_reset (0);
                        m68k_setpc (0xf80002);
                        mmu_reset ();
-                       uae_reset (1);
+                       uae_reset (1, 0);
                        return;
                }
                goto retry;
@@ -4489,7 +4489,7 @@ void m68k_go (int may_quit)
                                /* system is very badly confused */
                                write_log (_T("double bus error or corrupted stack, forcing reboot..\n"));
                                regs.panic = 0;
-                               uae_reset (1);
+                               uae_reset (1, 0);
                        }
                }
 
index 4e4090961c7f59eb74de499a6721341d78d7099b..6747f71b74be7fa708a91e58f7bba1a508d2e3ce 100644 (file)
@@ -509,7 +509,7 @@ static int keyhack (int scancode, int pressed, int num)
        static byte backslashstate, apostrophstate;
 
 #ifdef RETROPLATFORM
-       if (rp_checkesc (scancode, di_keycodes[num], pressed, num))
+       if (rp_checkesc (scancode, pressed, num))
                return -1;
 #endif
 
index 16ec503fb4644bbaf5022659ea2e0ef3f7b2d7ab..f2e36bf1f1bdefed505937e2f16822c4c47136e3 100644 (file)
@@ -913,7 +913,7 @@ static void flip (void)
 {
        int result = 0;
        HRESULT ddrval = DD_OK;
-       DWORD flags = DDFLIP_DONOTWAIT;
+       DWORD flags = 0; // Why did I put DDFLIP_DONOTWAIT here?
        int vsync = isvsync ();
        bool novsync = false;
        struct apmode *ap = WIN32GFX_IsPicassoScreen () ? &currprefs.gfx_apmode[1] : &currprefs.gfx_apmode[0];
index 35961772e89b50d8337a543a389774642bfe1849..a6b45719f294b7b1df57d21d7f5508158e515b64 100644 (file)
@@ -192,7 +192,7 @@ BEGIN
     EDITTEXT        IDC_MBRAM2,240,171,40,12,ES_CENTER | ES_READONLY\r
 END\r
 \r
-IDD_CPU DIALOGEX 0, 0, 396, 288\r
+IDD_CPU DIALOGEX 0, 0, 396, 259\r
 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
 FONT 8, "MS Sans Serif", 0, 0, 0x0\r
 BEGIN\r
@@ -292,7 +292,7 @@ BEGIN
     CONTROL         "FFS",IDC_FLOPPY_FFS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,300,242,34,15\r
 END\r
 \r
-IDD_HARDDISK DIALOGEX 0, 0, 396, 318\r
+IDD_HARDDISK DIALOGEX 0, 0, 396, 315\r
 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD\r
 EXSTYLE WS_EX_CONTEXTHELP\r
 FONT 8, "MS Sans Serif", 0, 0, 0x1\r
@@ -303,24 +303,24 @@ BEGIN
     PUSHBUTTON      "Add Ha&rd Drive...",IDC_NEW_HD,267,157,127,15\r
     PUSHBUTTON      "&Properties",IDC_EDIT,267,176,60,15\r
     PUSHBUTTON      "Remove",IDC_REMOVE,334,176,60,15\r
-    GROUPBOX        "Options",IDC_STATIC,1,191,393,76\r
-    CONTROL         "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,201,11\r
+    GROUPBOX        "Options",IDC_STATIC,1,191,393,72\r
+    CONTROL         "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,204,201,11\r
     CONTROL         "Include removable drives..",IDC_MAPDRIVES_REMOVABLE,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,219,201,11\r
-    CONTROL         "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,233,201,11\r
-    CONTROL         "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,247,201,11\r
-    CONTROL         "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,206,167,11\r
-    CONTROL         "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,219,167,11\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,217,201,11\r
+    CONTROL         "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,231,201,11\r
+    CONTROL         "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,245,201,11\r
+    CONTROL         "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,204,167,11\r
+    CONTROL         "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,217,167,11\r
     CONTROL         "Automount removable drives [] Windows side insert or removal will immediately mount/remove it on Amiga side.",IDC_MAPDRIVES_AUTO,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,233,167,11\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,231,167,11\r
     CONTROL         "Limit size of directory drives to 1G [] Workaround for example old installers that calculate free space incorrectly if drive is large.",IDC_MAPDRIVES_LIMIT,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,247,167,11\r
-    GROUPBOX        "Optical media options",IDC_STATIC,1,270,393,48\r
-    LTEXT           "CD drive/image",IDC_STATIC,5,284,70,10,SS_CENTERIMAGE\r
-    PUSHBUTTON      "Select image file",IDC_CD_SELECT,177,282,98,15\r
-    COMBOBOX        IDC_CD_TYPE,282,283,71,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Eject",IDC_CD_EJECT,360,282,30,15\r
-    COMBOBOX        IDC_CD_TEXT,5,301,386,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,245,167,11\r
+    GROUPBOX        "Optical media options",IDC_STATIC,1,266,393,47\r
+    LTEXT           "CD drive/image",IDC_STATIC,5,280,70,10,SS_CENTERIMAGE\r
+    PUSHBUTTON      "Select image file",IDC_CD_SELECT,177,278,98,15\r
+    COMBOBOX        IDC_CD_TYPE,282,279,71,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    PUSHBUTTON      "Eject",IDC_CD_EJECT,360,278,30,15\r
+    COMBOBOX        IDC_CD_TEXT,5,297,386,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP\r
 END\r
 \r
 IDD_SOUND DIALOGEX 0, 0, 396, 288\r
index 82e174ffd1bc671e07996741d7c4d8cc7e20c642..bc3ab8bdd61651dc95594af4edcd0475ca69ecdb 100644 (file)
@@ -42,7 +42,7 @@ int rp_rpescapekey = 0x01;
 int rp_rpescapeholdtime = 600;
 int rp_screenmode = 0;
 int rp_inputmode = 0;
-int log_rp = 1;
+int log_rp = 2;
 static int rp_revision, rp_version, rp_build;
 static int max_horiz_dbl = RES_HIRES;
 static int max_vert_dbl = VRES_DOUBLE;
@@ -458,11 +458,11 @@ static BOOL RPSendMessagex (UINT uMessage, WPARAM wParam, LPARAM lParam,
        recursive++;
        cnt++;
        ncnt = cnt;
-       if (dolog)
+       if (dolog & 1)
                write_log (_T("RPSEND_%d->\n"), ncnt);
        v = RPSendMessage (uMessage, wParam, lParam, pData, dwDataSize, pInfo, plResult);
        recursive--;
-       if (dolog) {
+       if (dolog & 1) {
                write_log (_T("RPSEND_%d(%s [%d], %08x, %08x, %08x, %d)\n"), ncnt,
                        getmsg (uMessage), uMessage - WM_APP, wParam, lParam, pData, dwDataSize);
                if (v == FALSE)
@@ -516,10 +516,15 @@ static void fixup_size (struct uae_prefs *prefs)
        write_log(_T("-> %dx%d\n"), prefs->gfx_size_win.width, prefs->gfx_size_win.height);
 }
 
-static int getmult (int mult)
+static int getmult (int mult, bool *half)
 {
+       *half = false;
        if (mult >= 4 * 256)
                return 2;
+       if (mult == 256 + 128) {
+               *half = true;
+               return 1;
+       }
        if (mult == 2 * 256)
                return 1;
        if (mult >= 1 * 256)
@@ -547,6 +552,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        int hres, vres;
        int totalhdbl = -1, totalvdbl = -1;
        int hmult, vmult;
+       bool half;
 
        hres = p->gfx_resolution;
        vres = p->gfx_vresolution;
@@ -572,29 +578,30 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                totalhdbl = hres;
                if (hres > max_horiz_dbl)
                        hres = max_horiz_dbl;
-               hres += getmult (hmult);
+               hres += getmult (hmult, &half);
 
                totalvdbl = vres;
                if (vres > max_vert_dbl)
                        vres = max_vert_dbl;
-               vres += getmult (vmult);
+               vres += getmult (vmult, &half);
 
                if (hres > RES_SUPERHIRES)
                        hres = RES_SUPERHIRES;
                if (vres > VRES_QUAD)
                        vres = VRES_QUAD;
 
-               if (hres == RES_HIRES)
-                       m = RP_SCREENMODE_SCALE_2X;
-               else if (hres >= RES_SUPERHIRES)
-                       m = RP_SCREENMODE_SCALE_4X;
+               if (hres == RES_HIRES) {
+                       m = half ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_2X;
+               } else if (hres >= RES_SUPERHIRES) {
+                       m = half ? RP_SCREENMODE_SCALE_3X : RP_SCREENMODE_SCALE_4X;
+               }
 
-               if (log_rp)
-                       write_log (_T("GET_RPSM: hres=%d (%d) vres=%d (%d) full=%d xcpos=%d ycpos=%d w=%d h=%d vm=%d hm=%d\n"),
+               if (log_rp & 2)
+                       write_log (_T("GET_RPSM: hres=%d (%d) vres=%d (%d) full=%d xcpos=%d ycpos=%d w=%d h=%d vm=%d hm=%d half=%d\n"),
                                totalhdbl, hres, totalvdbl, vres, full,
                                p->gfx_xcenter_pos,  p->gfx_ycenter_pos,
                                p->gfx_size_win.width, p->gfx_size_win.height,
-                               hmult, vmult);
+                               hmult, vmult, half);
 
                sm->lClipLeft = p->gfx_xcenter_pos < 0 ? -1 : p->gfx_xcenter_pos;
                sm->lClipTop = p->gfx_ycenter_pos < 0 ? -1 : p->gfx_ycenter_pos;
@@ -630,7 +637,7 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        }
        sm->dwClipFlags = cf;
 
-       if (log_rp)
+       if (log_rp & 2)
                write_log (_T("GET_RPSM: %08X %dx%d %dx%d hres=%d (%d) vres=%d (%d) disp=%d fs=%d\n"),
                        sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
                        totalhdbl, hres, totalvdbl, vres, p->gfx_apmode[APMODE_NATIVE].gfx_display, full);
@@ -643,13 +650,14 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        int fs = 0;
        int hdbl = RES_HIRES, vdbl = VRES_DOUBLE;
        int hres, vres;
-       int hmult = 1, vmult = 1;
+       float hmult = 1, vmult = 1;
        struct MultiDisplay *disp;
        bool keepaspect = (sm->dwScreenMode & RP_SCREENMODE_SCALING_SUBPIXEL) && !(sm->dwScreenMode & RP_SCREENMODE_SCALING_STRETCH);
        bool stretch = (sm->dwScreenMode & RP_SCREENMODE_SCALING_STRETCH) != 0;
        bool forcesize = smm == RP_SCREENMODE_SCALE_TARGET && sm->lTargetWidth > 0 && sm->lTargetHeight > 0;
        bool integerscale = !(sm->dwScreenMode & RP_SCREENMODE_SCALING_SUBPIXEL) && !(sm->dwScreenMode & RP_SCREENMODE_SCALING_STRETCH) && smm >= RP_SCREENMODE_SCALE_TARGET;
        int width, height;
+       bool half;
 
        storeflags = sm->dwScreenMode;
        minimized = 0;
@@ -664,7 +672,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
        p->gfx_filter_autoscale = AUTOSCALE_CENTER;
        disp = getdisplay (p);
 
-       if (log_rp) {
+       if (log_rp & 2) {
                write_log (_T("SET_RPSM: %08X %dx%d %dx%d hres=%d vres=%d disp=%d fs=%d smm=%d\n"),
                        sm->dwScreenMode, sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight,
                        hdbl, vdbl, display, fs, smm);
@@ -674,32 +682,57 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 
        if (!WIN32GFX_IsPicassoScreen ()) {
 
-               hdbl = RES_LORES;
-               vdbl = VRES_NONDOUBLE;
-               if (smm == RP_SCREENMODE_SCALE_2X || smm == RP_SCREENMODE_SCALE_3X) {
+               if (smm == RP_SCREENMODE_SCALE_3X) {
+
                        hdbl = RES_HIRES;
                        vdbl = VRES_DOUBLE;
-               } else if (smm == RP_SCREENMODE_SCALE_4X) {
-                       hdbl = RES_SUPERHIRES;
-                       vdbl = VRES_DOUBLE;
-               }
-               if (smm > RP_SCREENMODE_SCALE_4X || smm == RP_SCREENMODE_SCALE_MAX) {
-                       hdbl = max_horiz_dbl;
-                       vdbl = max_vert_dbl;
-               }
+                       hmult = 1.5;
+                       vmult = 1.5;
+                       half = true;
+
+                       hres = hdbl;
+                       if (hres > max_horiz_dbl) {
+                               hmult *= 1 << (hres - max_horiz_dbl);
+                               hres = max_horiz_dbl;
+                       }
 
-               hres = hdbl;
-               if (hres > max_horiz_dbl) {
-                       hmult = 1 << (hres - max_horiz_dbl);
-                       hres = max_horiz_dbl;
-               }
-               p->gfx_resolution = hres;
+                       vres = vdbl;
+                       if (vres > max_vert_dbl) {
+                               vmult *= 1 << (vres - max_vert_dbl);
+                               vres = max_vert_dbl;
+                       }
+               } else {
 
-               vres = vdbl;
-               if (vres > max_vert_dbl) {
-                       vmult = 1 << (vres - max_vert_dbl);
-                       vres = max_vert_dbl;
+                       half = false;
+                       if (smm == RP_SCREENMODE_SCALE_2X) {
+                               hdbl = RES_HIRES;
+                               vdbl = VRES_DOUBLE;
+                       } else if (smm == RP_SCREENMODE_SCALE_4X) {
+                               hdbl = RES_SUPERHIRES;
+                               vdbl = VRES_QUAD;
+                       } else {
+                               hdbl = RES_LORES;
+                               vdbl = VRES_NONDOUBLE;
+                       }
+
+                       if (smm > RP_SCREENMODE_SCALE_4X || smm == RP_SCREENMODE_SCALE_MAX) {
+                               hdbl = max_horiz_dbl;
+                               vdbl = max_vert_dbl;
+                       }
+
+                       hres = hdbl;
+                       if (hres > max_horiz_dbl) {
+                               hmult = 1 << (hres - max_horiz_dbl);
+                               hres = max_horiz_dbl;
+                       }
+
+                       vres = vdbl;
+                       if (vres > max_vert_dbl) {
+                               vmult = 1 << (vres - max_vert_dbl);
+                               vres = max_vert_dbl;
+                       }
                }
+               p->gfx_resolution = hres;
                p->gfx_vresolution = vres;
 
                if (sm->lClipWidth <= 0)
@@ -710,7 +743,14 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                if (sm->lClipHeight <= 0) {
                        p->gfx_size_win.height = shift (AMIGA_HEIGHT_MAX, -vdbl);
                } else {
-                       p->gfx_size_win.height = sm->lClipHeight >> (VRES_MAX - vdbl);
+                       if (vdbl > VRES_MAX)
+                               p->gfx_size_win.height = sm->lClipHeight << (vdbl - VRES_MAX);
+                       else
+                               p->gfx_size_win.height = sm->lClipHeight >> (VRES_MAX - vdbl);
+               }
+               if (half) {
+                       p->gfx_size_win.width = p->gfx_size_win.width * 3 / 2;
+                       p->gfx_size_win.height = p->gfx_size_win.height * 3 / 2;
                }
 
                if (forcesize) {
@@ -761,8 +801,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                p->gfx_filter_keep_aspect = 0;
        }
 
-       if (log_rp)
-               write_log(_T("%dx%d %dx%d %dx%d %08x HM=%d VM=%d\n"),
+       if (log_rp & 2)
+               write_log(_T("%dx%d %dx%d %dx%d %08x HM=%.1f VM=%.1f\n"),
                        sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight, sm->lTargetWidth, sm->lTargetHeight, sm->dwClipFlags, hmult, vmult);
 
        if (!integerscale) {
@@ -797,8 +837,8 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                }
        }
 
-       p->gfx_filter_horiz_zoom_mult = hmult > 0 ? 1000 / hmult : hmult;
-       p->gfx_filter_vert_zoom_mult = vmult > 0 ? 1000 / vmult : vmult;
+       p->gfx_filter_horiz_zoom_mult = hmult > 0 ? (int)(1000.0 / hmult) : (int)hmult;
+       p->gfx_filter_vert_zoom_mult = vmult > 0 ? (int)(1000.0 / vmult) : (int)vmult;
 
        p->gfx_filter_scanlines = 0;
        p->gfx_scanlines = 0;
@@ -809,7 +849,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
                p->gfx_filter_scanlineratio = (1 << 4) | 1;
        }
 
-       if (log_rp)
+       if (log_rp & 2)
                write_log (_T("WW=%d WH=%d FW=%d FH=%d HM=%d VM=%d XP=%d YP=%d XS=%d YS=%d AS=%d AR=%d,%d\n"),
                        p->gfx_size_win.width, p->gfx_size_win.height,
                        p->gfx_size_fs.width, p->gfx_size_fs.height,
@@ -827,7 +867,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p)
 static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM lParam,
        LPCVOID pData, DWORD dwDataSize, LPARAM lMsgFunctionParam)
 {
-       if (log_rp) {
+       if (log_rp & 1) {
                write_log (_T("RPFUNC(%s [%d], %08x, %08x, %08x, %d, %08x)\n"),
                getmsg (uMessage), uMessage - WM_APP, wParam, lParam, pData, dwDataSize, lMsgFunctionParam);
                if (uMessage == RP_IPC_TO_GUEST_DEVICECONTENT) {
@@ -848,7 +888,7 @@ static LRESULT CALLBACK RPHostMsgFunction2 (UINT uMessage, WPARAM wParam, LPARAM
                uae_quit ();
                return TRUE;
        case RP_IPC_TO_GUEST_RESET:
-               uae_reset (wParam == RP_RESET_SOFT ? 0 : -1);
+               uae_reset (wParam == RP_RESET_SOFT ? 0 : -1, 1);
                return TRUE;
        case RP_IPC_TO_GUEST_TURBO:
                {
@@ -1097,7 +1137,7 @@ static void sendenum (void)
                        desc.dwInputDeviceFeatures = RP_FEATURE_INPUTDEVICE_JOYSTICK;
                        if (cnt == 0)
                                desc.dwInputDeviceFeatures |= RP_FEATURE_INPUTDEVICE_JOYPAD;
-                       if (log_rp)
+                       if (log_rp & 1)
                                write_log(_T("Enum%d: '%s' '%s'\n"), cnt, desc.szHostInputName, desc.szHostInputID);
                        RPSendMessagex (RP_IPC_TO_HOST_INPUTDEVICE, 0, 0, &desc, sizeof desc, &guestinfo, NULL);
                        cnt++;
@@ -1114,7 +1154,7 @@ static void sendenum (void)
        RPSendMessagex (RP_IPC_TO_HOST_INPUTDEVICE, 0, 0, &desc, sizeof desc, &guestinfo, NULL);
        cnt = 0;
        while ((cnt = rp_input_enum (&desc, cnt)) >= 0) {
-               if (log_rp)
+               if (log_rp & 1)
                        write_log(_T("Enum%d: '%s' '%s' (%x/%x)\n"),
                                cnt, desc.szHostInputName, desc.szHostInputID, desc.dwHostInputVendorID, desc.dwHostInputProductID);
                RPSendMessagex (RP_IPC_TO_HOST_INPUTDEVICE, 0, 0, &desc, sizeof desc, &guestinfo, NULL);
@@ -1130,7 +1170,7 @@ static void sendfeatures (void)
        feat |= RP_FEATURE_STATE | RP_FEATURE_SCANLINES | RP_FEATURE_DEVICEREADWRITE;
        feat |= RP_FEATURE_SCALING_SUBPIXEL | RP_FEATURE_SCALING_STRETCH;
        if (!WIN32GFX_IsPicassoScreen ())
-               feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN4X;
+               feat |= RP_FEATURE_SCREEN2X | RP_FEATURE_SCREEN3X | RP_FEATURE_SCREEN4X;
        feat |= RP_FEATURE_INPUTDEVICE_MOUSE;
        feat |= RP_FEATURE_INPUTDEVICE_JOYSTICK;
        feat |= RP_FEATURE_INPUTDEVICE_GAMEPAD;
@@ -1264,7 +1304,7 @@ static void rp_device_change (int dev, int num, int mode, bool readonly, const T
        dc.dwInputDevice = mode;
        if (content)
                _tcscpy (dc.szContent, content);
-       if (log_rp)
+       if (log_rp & 1)
                write_log (_T("RP_IPC_TO_HOST_DEVICECONTENT cat=%d num=%d type=%d '%s'\n"),
                dc.btDeviceCategory, dc.btDeviceNumber, dc.dwInputDevice, dc.szContent);
        RPSendMessagex (RP_IPC_TO_HOST_DEVICECONTENT, 0, 0, &dc, sizeof(struct RPDeviceContent), &guestinfo, NULL);
@@ -1298,7 +1338,7 @@ void rp_input_change (int num)
                        break;
                }
        }
-       if (log_rp)
+       if (log_rp & 1)
                write_log(_T("PORT%d: '%s':%d\n"), num, name, mode);
        rp_device_change (RP_DEVICECATEGORY_INPUTPORT, num, mode, false, name);
 }
@@ -1546,7 +1586,7 @@ void rp_rtg_switch (void)
 }
 
 static uae_u64 esctime;
-static int ignorerelease;
+static int releasetime, releasenum;
 
 static uae_u64 gett (void)
 {
@@ -1576,17 +1616,22 @@ void rp_vsync (void)
        }
        if (magicmouse_alive () != mousemagic)
                rp_mouse_magic (magicmouse_alive ());
-       if (!esctime)
+       if (!esctime && !releasetime)
                return;
        t = gett ();
-       if (t >= esctime) {
+       if (releasetime > 0) {
+               releasetime--;
+               if (!releasetime)
+                       my_kbd_handler (releasenum, rp_rpescapekey, 0);
+       }
+       if (esctime && t >= esctime) {
                RPSendMessagex (RP_IPC_TO_HOST_ESCAPED, 0, 0, NULL, 0, &guestinfo, NULL);
-               ignorerelease = 1;
+               releasetime = -1;
                esctime = 0;
        }
 }
 
-int rp_checkesc (int scancode, uae_u8 *codes, int pressed, int num)
+int rp_checkesc (int scancode, int pressed, int num)
 {
        uae_u64 t;
 
@@ -1594,11 +1639,11 @@ int rp_checkesc (int scancode, uae_u8 *codes, int pressed, int num)
                goto end;
        if (scancode != rp_rpescapekey)
                goto end;
-       if (ignorerelease && !pressed) {
-               ignorerelease = 0;
+       if (releasetime < 0 && !pressed) {
+               releasetime = 0;
                goto end;
        }
-       t = gett();
+       t = gett ();
        if (!t)
                goto end;
        if (pressed) {
@@ -1606,8 +1651,8 @@ int rp_checkesc (int scancode, uae_u8 *codes, int pressed, int num)
                return 1;
        }
        my_kbd_handler (num, scancode, 1);
-       my_kbd_handler (num, scancode, 0);
-       ignorerelease = 0;
+       releasetime = 10;
+       releasenum = num;
        esctime = 0;
        return 1;
 end:
index 9ff34bf8e0c1941452460bec2eff1687c3e4a819..02e283f597f2e52875616ae2ef342d827535acc9 100644 (file)
@@ -11,7 +11,7 @@ extern void rp_turbo_cpu (int);
 extern void rp_turbo_floppy (int);
 extern void rp_set_hwnd (HWND);
 extern void rp_set_enabledisable (int);
-extern int rp_checkesc (int, uae_u8*, int, int);
+extern int rp_checkesc (int, int, int);
 extern int rp_isactive (void);
 extern void rp_vsync (void);
 extern HWND rp_getparent (void);
index f2a8dee69d08d41fcb44232368857c1c4c5f5ed9..85ee1b295d04cdfefecb9d68ff43edecccb724ff 100644 (file)
@@ -510,6 +510,7 @@ void set_volume_sound_device (struct sound_data *sd, int volume, int mute)
                hr = IDirectSoundBuffer_SetVolume (s->lpDSBsecondary, vol);
                if (FAILED (hr))
                        write_log (_T("DS: SetVolume(%d) failed: %s\n"), vol, DXError (hr));
+#if 0
        } else if (sd->devicetype == SOUND_DEVICE_WASAPI) {
                if (s->pAudioVolume) {
                        float vol = 0.0;
@@ -522,11 +523,12 @@ void set_volume_sound_device (struct sound_data *sd, int volume, int mute)
                        if (FAILED (hr))
                                write_log (_T("pAudioVolume->SetMute(%d) failed: %08Xs\n"), mute, hr);
                }
+#endif
        } else if (sd->devicetype == SOUND_DEVICE_PA) {
                s->pavolume = volume;
        } else if (sd->devicetype == SOUND_DEVICE_XAUDIO2) {
                s->xmaster->SetVolume (mute ? 0.0 : (float)(100 - volume) / 100.0);
-       } else if (sd->devicetype == SOUND_DEVICE_WASAPI_EXCLUSIVE) {
+       } else if (sd->devicetype == SOUND_DEVICE_WASAPI_EXCLUSIVE || sd->devicetype == SOUND_DEVICE_WASAPI) {
                sd->softvolume = -1;
                hr = s->pAudioVolume->SetMasterVolume (1.0, NULL);
                if (FAILED (hr))
index b3087e6d3ca22679c9a404bfb39c577d7e678005..1e1aa3f50d5595f21dbd9deb049ece9b094ad510 100644 (file)
@@ -95,6 +95,7 @@ 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;
+extern int log_filesys;
 int log_scsi;
 int log_net;
 int log_vsync, debug_vsync_min_delay, debug_vsync_forced_delay;
@@ -1420,7 +1421,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                                                        if (nm->code == NM_CLICK) // POWER
                                                                inputdevice_add_inputcode (AKS_ENTERGUI, 1);
                                                        else
-                                                               uae_reset (0);
+                                                               uae_reset (0, 1);
                                                } else if (num == 3) {
                                                        if (pause_emulation) {
                                                                resumepaused (9);
@@ -1821,7 +1822,7 @@ static LRESULT CALLBACK HiddenWindowProc (HWND hWnd, UINT message, WPARAM wParam
                        uae_quit ();
                        break;
                case ID_ST_RESET:
-                       uae_reset (0);
+                       uae_reset (0, 1);
                        break;
 
                case ID_ST_CDEJECTALL:
@@ -4799,6 +4800,14 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2)
                log_scsiemu = 1;
                return 1;
        }
+       if (!_tcscmp (arg, _T("filesyslog"))) {
+               log_filesys = 1;
+               return 1;
+       }
+       if (!_tcscmp (arg, _T("filesyslog2"))) {
+               log_filesys = 2;
+               return 1;
+       }
        if (!_tcscmp (arg, _T("netlog"))) {
                log_net = 1;
                return 1;
index f1dc8af5796155a9f4a909c819ff130b9bbdfd8a..538e7b35e236a0c33c672bbc7453711862be5656 100644 (file)
@@ -19,8 +19,8 @@
 #define LANG_DLL 1
 
 //#define WINUAEBETA _T("")
-#define WINUAEBETA _T("20")
-#define WINUAEDATE MAKEBD(2012, 10, 7)
+#define WINUAEBETA _T("21")
+#define WINUAEDATE MAKEBD(2012, 10, 21)
 #define WINUAEEXTRA _T("")
 //#define WINUAEEXTRA _T("AmiKit Preview")
 #define WINUAEREV _T("")
index 6b64c6426f9c62441e0b1f27162e9bcd773b75a2..7b01d5c790829d6539f4e157bd1bb6a8fa1137ab 100644 (file)
@@ -9455,7 +9455,8 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
 {
        static int recursive = 0;
        LRESULT res, posn;
-       TCHAR tmp[MAX_DPATH];
+       TCHAR tmp[MAX_DPATH], fs[MAX_DPATH], dev[MAX_DPATH];
+       int hdctrlr;
 
        switch (msg) {
        case WM_DROPFILES:
@@ -9514,14 +9515,22 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam
                case IDC_HF_TYPE:
                        res = SendDlgItemMessage (hDlg, IDC_HF_TYPE, CB_GETCURSEL, 0, 0);
                        sethfdostype (hDlg, (int)res);
-                       ew (hDlg, IDC_HF_DOSTYPE, res >= 2);
+                       ew (hDlg, IDC_HF_DOSTYPE, res >= 4);
                        break;
                case IDC_HF_CREATE:
+                       _tcscpy (fs, current_hfdlg.fsfilename);
                        current_hfdlg = empty_hfdlg;
+                       _tcscpy (current_hfdlg.fsfilename, fs);
                        hardfilecreatehdf (hDlg, NULL);
                        break;
                case IDC_SELECTOR:
+                       _tcscpy (fs, current_hfdlg.fsfilename);
+                       _tcscpy (dev, current_hfdlg.devicename);
+                       hdctrlr = current_hfdlg.controller;
                        current_hfdlg = empty_hfdlg;
+                       _tcscpy (current_hfdlg.fsfilename, fs);
+                       _tcscpy (current_hfdlg.devicename, dev);
+                       current_hfdlg.controller = hdctrlr;
                        hardfileselecthdf (hDlg, NULL);
                        break;
                case IDC_FILESYS_SELECTOR:
@@ -15128,7 +15137,7 @@ static INT_PTR CALLBACK DialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM l
                        switch (LOWORD(wParam))
                        {
                        case IDC_RESETAMIGA:
-                               uae_reset (1);
+                               uae_reset (1, 1);
                                SendMessage (hDlg, WM_COMMAND, IDOK, 0);
                                return TRUE;
                        case IDC_QUITEMU:
@@ -15592,7 +15601,7 @@ static int GetSettings (int all_options, HWND hwnd)
        if (quit_program)
                psresult = -2;
        else if (qs_request_reset && quickstart)
-               uae_reset (qs_request_reset == 2 ? 1 : 0);
+               uae_reset (qs_request_reset == 2 ? 1 : 0, 1);
 
        qs_request_reset = 0;
        full_property_sheet = 0;
index cc8e586e5de045e0fa0fcff245a60ed534b3a0b9..9b13e1f9adbc4696c9a55496805800ce676e6469 100644 (file)
@@ -1,6 +1,25 @@
 
 - restore only single input target to default.
 
+Beta 21:
+
+- Use software volume also in WASAPI non-exclusive because WASAPI main volume control also affects waveOut used by CD audio.
+  (XP + DS also seems to affect waveout.. CDA really should use some more modern sound API, later...)
+- Floppy sound sample mixing volume fix, volume level got lower if more than one drive had enabled sounds.
+- Virtual mouse driver option IECLASS_POINTERPOS inputevent ie_Qualifier apparently needs to include mouse button state bits or
+  Magellan II's (AmiKit) menus won't stay open, possibly affects other programs too. (This is not documented in HRMs, hmm...).
+  "Start menu" still won't work but it is application bug because it also won't work if mouse is moved using Amiga + cursor keys.
+- CDFS crash fix when unsupported media (not unreadable but for example UDF-only DVD) was accessed.
+- Check and ignore possible duplicated CDFS CD insert or eject Windows message.
+- Compile time directory filesystem logging is now runtime option (-filesyslog and -filesyslog2)
+- Borderblank still didn't work correctly in all situations. (Aladdin AGA)
+- Fullscreen DirectDraw mode IDirectDrawSurface7_Flip "Was still drawing" fix. (I still have no idea what was I thinking of..)
+- Added "waiting blits" special case, when blitter is started and blit would use all available cycles: start waiting for the blit immediately.
+- Changing hardfile path does not anymore clear device name and filesystem text boxes.
+- Fixed crash when loading statefile with JIT enabled (b6 "ROM protection" should be disabled temporarily when loading UAE boot rom data..)
+- zlib updated to 1.2.7
+- Built-in AROS ROM updated.
+
 Beta 20:
 
 - Reduced Gayle based configuration CIA memory bank size to 4096 bytes, only accesses to bfdxxx and bfexxx goes to CIA chips if Gayle.
index 941a30f3373226c827dd3f62f6f0c12b4da31c6c..73631989f1a8e9430c61ea8c97e87b176dba52f7 100644 (file)
@@ -609,5 +609,5 @@ void jit_abort (const TCHAR *format,...)
        if (!happened)
                gui_message (_T("JIT: Serious error:\n%s"), buffer);
        happened = 1;
-       uae_reset (1);
+       uae_reset (1, 0);
 }
index da3c8ad847d4be0d85a15ef6631a9bdc2c667da7..f782d5b8463562e990a3196bd211011f3677ed92 100644 (file)
@@ -411,7 +411,9 @@ static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t
                && _tcscmp (name, _T("ZCRM")) != 0
                && _tcscmp (name, _T("PRAM")) != 0
                && _tcscmp (name, _T("A3K1")) != 0
-               && _tcscmp (name, _T("A3K2")) != 0)
+               && _tcscmp (name, _T("A3K2")) != 0
+               && _tcscmp (name, _T("BORO")) != 0
+       )
        {
                /* extra bytes at the end needed to handle old statefiles that now have new fields */
                mem = xcalloc (uae_u8, *totallen + 100);
@@ -1285,7 +1287,7 @@ void savestate_rewind (void)
        p += 4;
        if (p != p2) {
                gui_message (_T("reload failure, address mismatch %p != %p"), p, p2);
-               uae_reset (0);
+               uae_reset (0, 0);
                return;
        }
        inprec_setposition (st->inprecoffset, pos);
index 62a18dce4d1464cdbb2b3d37696f51ea789540e2..413b18a30f096a9e322bf03ee462f1835a4baf2e 100644 (file)
@@ -162,7 +162,7 @@ void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u
                } else if (led == LED_CPU) {
                        int idle = (gui_data.idle + 5) / 10;
                        pos = 1;
-                       on = framecnt && !picasso_on;
+                       //on = framecnt && !picasso_on;
                        on_rgb = 0xcc0000;
                        off_rgb = 0x000000;
                        num1 = idle / 100;
index 96a8e2b3842a38cbd67c73290ab109db6402b947..bc20ff6dda9a3d1b928bcf28825a96141a8dc3f1 100644 (file)
@@ -41,13 +41,13 @@ static uae_u32 emulib_GetVersion (void)
 */
 static uae_u32 emulib_HardReset (void)
 {
-       uae_reset(0);
+       uae_reset(1, 1);
        return 0;
 }
 
 static uae_u32 emulib_Reset (void)
 {
-       uae_reset(0);
+       uae_reset(0, 0);
        return 0;
 }
 
@@ -140,7 +140,7 @@ static uae_u32 REGPARAM2 emulib_ChgCMemSize (uae_u32 memsize)
        m68k_dreg (regs, 0) = 0;
 
        changed_prefs.chipmem_size = memsize;
-       uae_reset(0);
+       uae_reset(1, 1);
        return 1;
 }
 
@@ -158,7 +158,7 @@ static uae_u32 REGPARAM2 emulib_ChgSMemSize (uae_u32 memsize)
 
        m68k_dreg (regs, 0) = 0;
        changed_prefs.bogomem_size = memsize;
-       uae_reset (0);
+       uae_reset (1, 1);
        return 1;
 }
 
@@ -175,7 +175,7 @@ static uae_u32 REGPARAM2 emulib_ChgFMemSize (uae_u32 memsize)
        }
        m68k_dreg (regs, 0) = 0;
        changed_prefs.fastmem_size = memsize;
-       uae_reset (0);
+       uae_reset (1, 1);
        return 0;
 }
 
index f7252e5986867c164cfbbe90c678e2645cdac831..cae1a3ae35481dd46f753a497f5cde9903dcf35e 100644 (file)
--- a/zfile.cpp
+++ b/zfile.cpp
@@ -2054,6 +2054,16 @@ struct zfile *zfile_fopen_parent (struct zfile *z, const TCHAR *name, uae_u64 of
        return l;
 }
 
+struct zfile *zfile_fopen_load_zfile (struct zfile *f)
+{
+       struct zfile *l = zfile_fopen_empty (f, f->name, f->size);
+       if (!l)
+               return NULL;
+       zfile_fseek (f, 0, SEEK_SET);
+       zfile_fread (l->data, f->size, 1, f);
+       return l;
+}
+
 struct zfile *zfile_fopen_data (const TCHAR *name, uae_u64 size, const uae_u8 *data)
 {
        struct zfile *l;