]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
2300b14
authorToni Wilen <twilen@winuae.net>
Tue, 31 Aug 2010 15:26:27 +0000 (18:26 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 31 Aug 2010 15:26:27 +0000 (18:26 +0300)
20 files changed:
blkdev.cpp
disk.cpp
epsonprinter.cpp
gencpu.cpp
hardfile.cpp
include/cpu_prefetch.h
include/newcpu.h
include/options.h
newcpu.cpp
od-win32/lib/prowizard.lib
od-win32/resources/resource
od-win32/resources/winuae.rc
od-win32/win32.cpp
od-win32/win32.h
od-win32/win32gfx.cpp
od-win32/win32gui.cpp
od-win32/winuaechangelog.txt
prowizard/rippers/EurekaPacker.c
prowizard/rippers/KefrensSoundMachine.c
prowizard/rippers/NoisePacker1.c

index 38573421c0c4034ed2672a858780b35964ddf709..8c549f594de3511b42e124f6cda6ef55cc5b69c8 100644 (file)
@@ -336,13 +336,16 @@ static int get_standard_cd_unit2 (cd_standard_unit csu)
        int unitnum = 0;
        int isaudio = 0;
        if (currprefs.cdslots[unitnum].name[0] || currprefs.cdslots[unitnum].inuse) {
-               device_func_init (SCSI_UNIT_IOCTL);
-               if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu)) {
-                       device_func_init (SCSI_UNIT_IMAGE);
-                       if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu))
-                               goto fallback;
+               if (currprefs.cdslots[unitnum].name[0]) {
+                       device_func_init (SCSI_UNIT_IOCTL);
+                       if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu)) {
+                               device_func_init (SCSI_UNIT_IMAGE);
+                               if (!sys_command_open_internal (unitnum, currprefs.cdslots[unitnum].name, csu))
+                                       goto fallback;
+                       }
+               } else {
+                       goto fallback;
                }
-               getunitinfo (unitnum, 0, csu, &isaudio);
                return unitnum;
        }
        device_func_init (SCSI_UNIT_IOCTL);
index 1c7c034309c7d91d16b4a027a30ce654e30bb3cb..e80be580cce38423f105d5c7dfa1bd9bfaf7fa73 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -633,7 +633,7 @@ static void reset_drive (int num)
 static void update_drive_gui (int num)
 {
        drive *drv = floppy + num;
-       bool writ = dskdmaen == 3 && drv->state && !(selected & (1 << num));
+       bool writ = dskdmaen == 3 && drv->state && !((selected | disabled) & (1 << num));
 
        if (drv->state == gui_data.drive_motor[num]
        && drv->cyl == gui_data.drive_track[num]
@@ -1151,7 +1151,7 @@ static int drive_empty (drive * drv)
        return drv->diskfile == 0;
 }
 
-static void drive_step (drive * drv)
+static void drive_step (drive * drv, int step_direction)
 {
 #ifdef CATWEASEL
        if (drv->catweasel) {
@@ -1164,6 +1164,8 @@ static void drive_step (drive * drv)
                return;
        }
 #endif
+       if (!drive_empty (drv))
+               drv->dskchange = 0;
        if (drv->steplimit && get_cycles() - drv->steplimitcycle < MIN_STEPLIMIT_CYCLE) {
                if (disk_debug_logging > 1)
                        write_log (L" step ignored drive %d, %d",
@@ -1175,9 +1177,7 @@ static void drive_step (drive * drv)
        * (stupid trackloaders with CPU delay loops)
        */
        set_steplimit (drv);
-       if (!drive_empty (drv))
-               drv->dskchange = 0;
-       if (direction) {
+       if (step_direction) {
                if (drv->cyl) {
                        drv->cyl--;
 #ifdef DRIVESOUND
@@ -2376,11 +2376,12 @@ static TCHAR *tobin (uae_u8 v)
 
 void DISK_select (uae_u8 data)
 {
-       int step_pulse, lastselected, dr;
-       static uae_u8 prevdata;
-       static int step;
+       int step_pulse, prev_selected, dr;
+       static uae_u8 prev_data;
+       static int prev_step;
+
+       prev_selected = selected;
 
-       lastselected = selected;
        selected = (data >> 3) & 15;
        side = 1 - ((data >> 2) & 1);
        direction = (data >> 1) & 1;
@@ -2391,10 +2392,10 @@ void DISK_select (uae_u8 data)
 
 #ifdef AMAX
        if (currprefs.amaxromfile[0])
-               amax_disk_select (data, prevdata);
+               amax_disk_select (data, prev_data);
 #endif
 
-       if ((prevdata & 0x80) != (data & 0x80)) {
+       if ((prev_data & 0x80) != (data & 0x80)) {
                for (dr = 0; dr < 4; dr++) {
                        if (floppy[dr].indexhackmode > 1 && !(selected & (1 << dr))) {
                                floppy[dr].indexhack = 1;
@@ -2406,42 +2407,44 @@ void DISK_select (uae_u8 data)
 
        if (disk_debug_logging > 1) {
                write_log (L" %d%d%d%d% ", (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
-               if ((prevdata & 0x80) != (data & 0x80))
+               if ((prev_data & 0x80) != (data & 0x80))
                        write_log (L" dskmotor %d ", (data & 0x80) ? 1 : 0);
-               if ((prevdata & 0x02) != (data & 0x02))
+               if ((prev_data & 0x02) != (data & 0x02))
                        write_log (L" direct %d ", (data & 0x02) ? 1 : 0);
-               if ((prevdata & 0x04) != (data & 0x04))
+               if ((prev_data & 0x04) != (data & 0x04))
                        write_log (L" side %d ", (data & 0x04) ? 1 : 0);
        }
 
-       if (step != step_pulse) {
+       // step goes high and drive was selected when step pulse changes: step
+       if (prev_step != step_pulse) {
                if (disk_debug_logging > 1)
                        write_log (L" dskstep %d ", step_pulse);
-               step = step_pulse;
-               if (step && !savestate_state) {
+               prev_step = step_pulse;
+               if (prev_step && !savestate_state) {
                        for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
-                               if (!((selected | disabled) & (1 << dr))) {
-                                       drive_step (floppy + dr);
+                               if (!((prev_selected | disabled) & (1 << dr))) {
+                                       drive_step (floppy + dr, direction);
                                        if (floppy[dr].indexhackmode > 1 && (data & 0x80))
                                                floppy[dr].indexhack = 1;
                                }
                        }
                }
        }
+
        if (!savestate_state) {
                for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
                        drive *drv = floppy + dr;
                        /* motor on/off workings tested with small assembler code on real Amiga 1200. */
                        /* motor/id flipflop is set only when drive select goes from high to low */
-                       if (!(selected & (1 << dr)) && (lastselected & (1 << dr)) ) {
+                       if (!(selected & (1 << dr)) && (prev_selected & (1 << dr)) ) {
                                drv->drive_id_scnt++;
                                drv->drive_id_scnt &= 31;
                                drv->idbit = (drv->drive_id & (1L << (31 - drv->drive_id_scnt))) ? 1 : 0;
                                if (!(disabled & (1 << dr))) {
-                                       if ((prevdata & 0x80) == 0 || (data & 0x80) == 0) {
+                                       if ((prev_data & 0x80) == 0 || (data & 0x80) == 0) {
                                                /* motor off: if motor bit = 0 in prevdata or data -> turn motor on */
                                                drive_motor (drv, 0);
-                                       } else if (prevdata & 0x80) {
+                                       } else if (prev_data & 0x80) {
                                                /* motor on: if motor bit = 1 in prevdata only (motor flag state in data has no effect)
                                                -> turn motor off */
                                                drive_motor (drv, 1);
@@ -2461,7 +2464,7 @@ void DISK_select (uae_u8 data)
                floppy[dr].state = (!(selected & (1 << dr))) | !floppy[dr].motoroff;
                update_drive_gui (dr);
        }
-       prevdata = data;
+       prev_data = data;
        if (disk_debug_logging > 1)
                write_log (L"\n");
 }
index a390bec470cba9eebe5780b98bfaeafb9103a6e6..c75fd8fdf2587a9cce0dc8ae0904bc9f52f70449 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <math.h>
 
-//#define DEBUGPRINT L"c:\\d\\data_epsonq_raw_fixed_superscript_subscript_multi-strike.bin"
+//#define DEBUGPRINT L"C:\\Users\\twilen\\Desktop\\pages_1+2_raw.bin"
 int pngprint = 0;
 
 #ifdef C_LIBPNG
@@ -893,6 +893,9 @@ static void outputPage(void)
                printerDC = NULL;
                page = NULL;
                cpage = NULL;
+               if (curFont)
+                       DeleteObject (curFont);
+               curFont = NULL;
        }
 }
 
index a15a56557a5007d62d8eba3f92b464b147b60b5d..55502e44b2eaafa03f2b041e8e7e12fdd06d9db8 100644 (file)
@@ -2321,7 +2321,8 @@ static void gen_opcode (unsigned long int opcode)
                fill_prefetch_full ();
                break;
        case i_Bcc:
-               // bcc.s and bcc.w cycles confirmed
+               // bcc.b branch: idle cycle, prefetch, prefetch
+               // bcc.b not branch: 2 idle cycles, prefetch
                if (curi->size == sz_long) {
                        if (cpu_level < 2) {
                                addcycles000 (2);
index 86c8585d3666634721077003bfe0d6a17e0b7aff..1d38ce3d119ab592397d3f8c73886ccd904e61b9 100644 (file)
@@ -982,6 +982,7 @@ int scsi_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, uae_u
        case 0x00: /* TEST UNIT READY */
                if (nodisk (hfd))
                        goto nodisk;
+               scsi_len = 0;
                break;
        case 0x08: /* READ (6) */
                if (nodisk (hfd))
@@ -1209,6 +1210,7 @@ int scsi_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, uae_u
        case 0x35: /* SYNCRONIZE CACHE (10) */
                if (nodisk (hfd))
                        goto nodisk;
+               scsi_len = 0;
                break;
        case 0xa8: /* READ (12) */
                if (nodisk (hfd))
index d3596ebc7aa34fad0ada2dd14e5e698d075c89e5..db273c79489bd816b5017738d9be27f865f20ad4 100644 (file)
@@ -225,25 +225,7 @@ STATIC_INLINE void put_byte_ce020 (uaecptr addr, uae_u32 v)
        mem_access_delay_byte_write_ce020 (addr, v);
 }
 
-extern void fill_icache020 (uae_u32);
-
-STATIC_INLINE uae_u32 get_word_ce020_prefetch (int o)
-{
-       uae_u32 pc = m68k_getpc () + o;
-
-       for (;;) {
-               if (pc == regs.prefetch020addr) {
-                       uae_u32 v = regs.prefetch020data >> 16;
-                       return v;
-               }
-               if (pc == regs.prefetch020addr + 2) {
-                       uae_u32 v = regs.prefetch020data & 0xffff;
-                       fill_icache020 (pc + 2);
-                       return v;
-               }
-               fill_icache020 (pc);
-       }
-}
+extern uae_u32 get_word_ce020_prefetch (int);
 
 STATIC_INLINE uae_u32 get_long_ce020_prefetch (int o)
 {
@@ -281,7 +263,7 @@ STATIC_INLINE void m68k_do_rts_ce020 (void)
 
 #ifdef CPUEMU_21
 
-extern void fill_icache030 (uae_u32 addr);
+extern uae_u32 get_word_ce030_prefetch (int);
 extern void write_dcache030 (uaecptr, uae_u32, int);
 extern uae_u32 read_dcache030 (uaecptr, int);
 
@@ -313,24 +295,6 @@ STATIC_INLINE uae_u32 get_byte_ce030 (uaecptr addr)
        return read_dcache030 (addr, 0);
 }
 
-STATIC_INLINE uae_u32 get_word_ce030_prefetch (int o)
-{
-       uae_u32 pc = m68k_getpc () + o;
-
-       for (;;) {
-               if (pc == regs.prefetch020addr) {
-                       uae_u32 v = regs.prefetch020data >> 16;
-                       return v;
-               }
-               if (pc == regs.prefetch020addr + 2) {
-                       uae_u32 v = regs.prefetch020data & 0xffff;
-                       fill_icache030 (pc + 2);
-                       return v;
-               }
-               fill_icache030 (pc);
-       }
-}
-
 STATIC_INLINE uae_u32 get_long_ce030_prefetch (int o)
 {
        uae_u32 v;
index 011f76b5b0b02b0910223a3ce39b103b2b4f5e6b..a81f8a1b5cae76f06cda8e8823bc403b19b6636e 100644 (file)
@@ -84,6 +84,7 @@ typedef double fptype;
 #endif
 #endif
 
+#define CPU_PIPELINE_MAX 2
 #define CPU000_MEM_CYCLE 4
 #define CPU000_CLOCK_MULT 2
 #define CPU020_MEM_CYCLE 3
@@ -114,6 +115,7 @@ struct cache040
        uae_u32 tag[CACHELINES040];
 };
 
+
 struct regstruct
 {
        uae_u32 regs[16];
@@ -164,8 +166,8 @@ struct regstruct
        uae_u8 panic;
        uae_u32 panic_pc, panic_addr;
 
-       uae_u32 prefetch020data;
-       uae_u32 prefetch020addr;
+       uae_u32 prefetch020data[CPU_PIPELINE_MAX];
+       uae_u32 prefetch020addr[CPU_PIPELINE_MAX];
        int ce020memcycles;
 };
 
index 6585241ec9c5b55ecb954f67644e43b8b68f1740..64a42a31b342df61834236ebebb5bfb490e20a37 100644 (file)
@@ -353,6 +353,7 @@ struct uae_prefs {
        bool win32_alwaysontop;
        bool win32_powersavedisabled;
        bool win32_minimize_inactive;
+       int win32_statusbar;
 
        int win32_active_priority;
        int win32_inactive_priority;
index 1917686cf65e678fdb3e2932205ae0f9122101f5..8cffb8376171831c8dcdb75fe724f6836f5abb1a 100644 (file)
@@ -208,6 +208,9 @@ static void set_cpu_caches (void)
 {
        int i;
 
+       for (i = 0; i < CPU_PIPELINE_MAX; i++)
+               regs.prefetch020addr[i] = 0xffffffff;
+
 #ifdef JIT
        if (currprefs.cachesize) {
                if (currprefs.cpu_model < 68040) {
@@ -224,7 +227,6 @@ static void set_cpu_caches (void)
                if (regs.cacr & 0x08) { // clear instr cache
                        for (i = 0; i < CACHELINES020; i++)
                                caches020[i].valid = 0;
-                       regs.prefetch020addr = 0xff000000;
                }
                if (regs.cacr & 0x04) { // clear entry in instr cache
                        caches020[(regs.caar >> 2) & (CACHELINES020 - 1)].valid = 0;
@@ -239,7 +241,6 @@ static void set_cpu_caches (void)
                                icaches030[i].valid[2] = 0;
                                icaches030[i].valid[3] = 0;
                        }
-                       regs.prefetch020addr = 0xff000000;
                }
                if (regs.cacr & 0x04) { // clear entry in instr cache
                        icaches030[(regs.caar >> 4) & (CACHELINES030 - 1)].valid[(regs.caar >> 2) & 3] = 0;
@@ -266,7 +267,6 @@ static void set_cpu_caches (void)
                                caches040[i].valid[2] = 0;
                                caches040[i].valid[3] = 0;
                        }
-                       regs.prefetch020addr = 0xff000000;
                }
        }
 }
@@ -4268,8 +4268,8 @@ STATIC_INLINE void fill_cache040 (uae_u32 addr)
        for (i = 0; i < CACHELINES040; i++) {
                if (c->valid[i] && c->tag[i] == tag) {
                        // cache hit
-                       regs.prefetch020addr = addr;
-                       regs.prefetch020data = c->data[i][lws];
+                       regs.prefetch020addr[0] = addr;
+                       regs.prefetch020data[0] = c->data[i][lws];
                        return;
                }
        }
@@ -4284,12 +4284,12 @@ STATIC_INLINE void fill_cache040 (uae_u32 addr)
                        c->data[i][0] = data;
                }
        }
-       regs.prefetch020addr = addr;
-       regs.prefetch020data = data;
+       regs.prefetch020addr[0] = addr;
+       regs.prefetch020data[0] = data;
 }
 
 // this one is really simple and easy
-void fill_icache020 (uae_u32 addr)
+STATIC_INLINE void fill_icache020 (uae_u32 addr, int idx)
 {
        int index;
        uae_u32 tag;
@@ -4302,8 +4302,8 @@ void fill_icache020 (uae_u32 addr)
        c = &caches020[index];
        if (c->valid && c->tag == tag) {
                // cache hit
-               regs.prefetch020addr = addr;
-               regs.prefetch020data = c->data;
+               regs.prefetch020addr[idx] = addr;
+               regs.prefetch020data[idx] = c->data;
                return;
        }
        // cache miss
@@ -4313,8 +4313,39 @@ void fill_icache020 (uae_u32 addr)
                c->valid = !!(regs.cacr & 1);
                c->data = data;
        }
-       regs.prefetch020addr = addr;
-       regs.prefetch020data = data;
+       regs.prefetch020addr[idx] = addr;
+       regs.prefetch020data[idx] = data;
+}
+
+uae_u32 get_word_ce020_prefetch (int o)
+{
+       uae_u32 pc = m68k_getpc () + o;
+
+       for (;;) {
+               for (int i = 0; i < 2; i++) {
+                       if (pc == regs.prefetch020addr[0]) {
+                               uae_u32 v = regs.prefetch020data[0] >> 16;
+                               fill_icache020 (regs.prefetch020addr[0] + 4, 1);
+                               return v;
+                       }
+                       if (pc == regs.prefetch020addr[0] + 2) {
+                               uae_u32 v = regs.prefetch020data[0] & 0xffff;
+                               if (regs.prefetch020addr[1] == regs.prefetch020addr[0] + 4) {
+                                       regs.prefetch020addr[0] = regs.prefetch020addr[1];
+                                       regs.prefetch020data[0] = regs.prefetch020data[1];
+                                       fill_icache020 (regs.prefetch020addr[0] + 4, 1);
+                               } else {
+                                       fill_icache020 (pc + 4, 0);
+                                       fill_icache020 (regs.prefetch020addr[0] + 4, 1);
+                               }
+                               return v;
+                       }
+                       regs.prefetch020addr[0] = regs.prefetch020addr[1];
+                       regs.prefetch020data[0] = regs.prefetch020data[1];
+               }
+               fill_icache020 (pc + 0, 0);
+               fill_icache020 (pc + 4, 1);
+       }
 }
 
 // 68030 caches aren't so simple as 68020 cache..
@@ -4343,7 +4374,7 @@ STATIC_INLINE void update_cache030 (struct cache030 *c, uae_u32 val, uae_u32 tag
        c->data[lws] = val;
 }
 
-void fill_icache030 (uae_u32 addr)
+STATIC_INLINE void fill_icache030 (uae_u32 addr, int idx)
 {
        int lws;
        uae_u32 tag;
@@ -4354,8 +4385,8 @@ void fill_icache030 (uae_u32 addr)
        c = getcache030 (icaches030, addr, &tag, &lws);
        if (c->valid[lws] && c->tag == tag) {
                // cache hit
-               regs.prefetch020addr = addr;
-               regs.prefetch020data = c->data[lws];
+               regs.prefetch020addr[idx] = addr;
+               regs.prefetch020data[idx] = c->data[lws];
                return;
        }
        // cache miss
@@ -4372,8 +4403,8 @@ void fill_icache030 (uae_u32 addr)
                }
 #endif
        }
-       regs.prefetch020addr = addr;
-       regs.prefetch020data = data;
+       regs.prefetch020addr[idx] = addr;
+       regs.prefetch020data[idx] = data;
 }
 
 STATIC_INLINE bool cancache030 (uaecptr addr)
@@ -4521,6 +4552,38 @@ uae_u32 read_dcache030 (uaecptr addr, int size)
        return 0;
 }
 
+uae_u32 get_word_ce030_prefetch (int o)
+{
+       uae_u32 pc = m68k_getpc () + o;
+
+       for (;;) {
+               for (int i = 0; i < 2; i++) {
+                       if (pc == regs.prefetch020addr[0]) {
+                               uae_u32 v = regs.prefetch020data[0] >> 16;
+                               fill_icache030 (regs.prefetch020addr[0] + 4, 1);
+                               return v;
+                       }
+                       if (pc == regs.prefetch020addr[0] + 2) {
+                               uae_u32 v = regs.prefetch020data[0] & 0xffff;
+                               if (regs.prefetch020addr[1] == regs.prefetch020addr[0] + 4) {
+                                       regs.prefetch020addr[0] = regs.prefetch020addr[1];
+                                       regs.prefetch020data[0] = regs.prefetch020data[1];
+                                       fill_icache030 (regs.prefetch020addr[0] + 4, 1);
+                               } else {
+                                       fill_icache030 (pc + 4, 0);
+                                       fill_icache030 (regs.prefetch020addr[0] + 4, 1);
+                               }
+                               return v;
+                       }
+                       regs.prefetch020addr[0] = regs.prefetch020addr[1];
+                       regs.prefetch020data[0] = regs.prefetch020data[1];
+               }
+               fill_icache030 (pc + 0, 0);
+               fill_icache030 (pc + 4, 1);
+       }
+}
+
+
 void flush_dcache (uaecptr addr, int size)
 {
        if (!currprefs.cpu_cycle_exact)
index c2ddc8693fadfd04f4a1029ae67870788dce028f..2881840e8a43366e094f821436693d1009bc1116 100644 (file)
Binary files a/od-win32/lib/prowizard.lib and b/od-win32/lib/prowizard.lib differ
index ce6eb8d9653ee48956ff47f13d3d4852f8a16463..d161350890292025b09f270e740aa110099c1400 100644 (file)
 #define IDC_DXMODE                      1792
 #define IDC_RTG_VBLANKRATE              1793
 #define IDC_DF0WPTEXTQ                  1793
+#define IDC_DXMODE2                     1793
+#define IDC_WINDOWEDMODE                1793
 #define IDC_DF1WPTEXTQ                  1794
 #define IDC_INPUTMAPLIST                1797
 #define IDC_PORT1_REMAP                 1798
index 4cd76b47a75b0b05ca33e9378207684f46b1e763..fa65fddccdee72c9660bb49baec7e1228696f8be 100644 (file)
@@ -481,7 +481,7 @@ BEGIN
     GROUPBOX        "Miscellaneous Options",IDC_STATIC,8,2,290,136\r
     CONTROL         "Untrap = middle button",IDC_JULIAN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,19,110,10\r
     CONTROL         "Show GUI on startup",IDC_SHOWGUI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,43,109,10\r
-    CONTROL         "Native On-screen LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,80,109,10\r
+    CONTROL         "Native OSD",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,95,76,10\r
     CONTROL         "Don't show taskbar button",IDC_NOTASKBARBUTTON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,67,109,10\r
     CONTROL         "Use CTRL-F11 to quit",IDC_CTRLF11,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,55,110,10\r
     GROUPBOX        "Keyboard LEDs",IDC_STATIC,7,140,85,94\r
@@ -501,20 +501,22 @@ BEGIN
     COMBOBOX        IDC_STATE_BUFFERSIZE,248,217,38,65,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
     CONTROL         "Always on top",IDC_ALWAYSONTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,79,110,10\r
     CONTROL         "USB mode",IDC_KBLED_USB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,216,64,10\r
-    COMBOBOX        IDC_SCSIMODE,213,30,80,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_SCSIMODE,213,26,80,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
     COMBOBOX        IDC_LANGUAGE,153,117,122,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
     GROUPBOX        "Language",IDC_STATIC,138,107,154,27\r
     CONTROL         "Disable screensaver",IDC_POWERSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,91,109,10\r
-    COMBOBOX        IDC_DD_SURFACETYPE,213,63,79,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
-    RTEXT           "DirectDraw display buffer:",IDC_STATIC,195,50,92,10,SS_CENTERIMAGE\r
+    COMBOBOX        IDC_DD_SURFACETYPE,213,78,79,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+    RTEXT           "DirectDraw display buffer:",IDC_STATIC,112,79,97,10,SS_CENTERIMAGE\r
     RTEXT           "SCSI and CD/DVD access method:",IDC_STATIC,151,12,126,10,SS_CENTERIMAGE\r
     CONTROL         "Synchronize clock",IDC_CLOCKSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,103,111,10\r
     CONTROL         "Faster RTG [] Enables less accurate custom chipset emulation mode when Picasso96 is enabled.",IDC_FASTERRTG,\r
-                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,19,115,100,10\r
-    CONTROL         "RTG On-screen LEDs",IDC_SHOWLEDSRTG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,93,109,10\r
-    LTEXT           "Graphics API:",IDC_STATIC,136,49,62,10,SS_CENTERIMAGE\r
-    COMBOBOX        IDC_DXMODE,138,62,61,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
+                    "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,19,115,111,10\r
+    CONTROL         "RTG OSD",IDC_SHOWLEDSRTG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,227,95,63,10\r
+    RTEXT           "Graphics API:",IDC_STATIC,130,62,79,10,SS_CENTERIMAGE\r
+    COMBOBOX        IDC_DXMODE,213,60,79,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     CONTROL         "Minimize when focus is lost",IDC_FOCUSMINIMIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,31,110,10\r
+    RTEXT           "Windowed style:",IDC_STATIC,128,45,81,10,SS_CENTERIMAGE\r
+    COMBOBOX        IDC_WINDOWEDMODE,213,43,79,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
 END\r
 \r
 IDD_HARDFILE DIALOGEX 0, 0, 299, 249\r
index 6a1df5892fec22c402705cc38f1d95db68b938d1..3cac039d3fb8eb675cc959599774239181eb36b6 100644 (file)
@@ -846,6 +846,7 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
        int mx, my;
        int istablet = (GetMessageExtraInfo () & 0xFFFFFF00) == 0xFF515700;
        static int mm, minimized, recursive, ignoremousemove;
+       static bool ignorelbutton;
 
 #if MSGDEBUG > 1
        write_log (L"AWP: %x %x\n", hWnd, message);
@@ -868,6 +869,10 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                }
                dx_check ();
                break;
+       case WM_MOUSEACTIVATE:
+               if (isfocus () == 0)
+                       ignorelbutton = true;
+               break;
        case WM_ACTIVATEAPP:
                if (!wParam && isfullscreen () <= 0 && currprefs.win32_minimize_inactive)
                        minimizewindow ();
@@ -890,6 +895,16 @@ static LRESULT CALLBACK AmigaWindowProc (HWND hWnd, UINT message, WPARAM wParam,
        case WM_LBUTTONDOWN:
        case WM_LBUTTONDBLCLK:
                if (!mouseactive && !gui_active && (!mousehack_alive () || currprefs.input_tablet != TABLET_MOUSEHACK || (currprefs.input_tablet == TABLET_MOUSEHACK && !currprefs.input_magic_mouse) || isfullscreen () > 0)) {
+                       // borderless = do not capture with single-click
+                       if (ignorelbutton) {
+                               ignorelbutton = 0;
+                               return 0;
+                       }
+                       if (message == WM_LBUTTONDOWN && isfullscreen () == 0 && currprefs.win32_borderless && !rp_isactive ()) {
+                               // full-window drag
+                               SendMessage (hAmigaWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0);
+                               return 0;
+                       }
                        setmouseactive ((message == WM_LBUTTONDBLCLK || isfullscreen() > 0) ? 2 : 1);
                } else if (dinput_winmouse () >= 0 && isfocus ()) {
                        setmousebuttonstate (dinput_winmouse (), 0, 1);
@@ -1544,7 +1559,12 @@ static LRESULT CALLBACK MainWindowProc (HWND hWnd, UINT message, WPARAM wParam,
                                int port = lpDIS->itemID - 1;
                                int x = (lpDIS->rcItem.right - lpDIS->rcItem.left + 1) / 2 + lpDIS->rcItem.left - 1;
                                int y = (lpDIS->rcItem.bottom - lpDIS->rcItem.top + 1) / 2 + lpDIS->rcItem.top - 1;
-                               FillRect (lpDIS->hDC, &lpDIS->rcItem, (HBRUSH)(COLOR_3DFACE + 1));
+                               RECT r = lpDIS->rcItem;
+                               r.left++;
+                               r.right--;
+                               r.top++;
+                               r.bottom--;
+                               FillRect (lpDIS->hDC, &r, (HBRUSH)(COLOR_3DFACE + 1));
                                for (int i = 0; i < 2; i++) {
                                        int buttons = guijoybutton[port + i * 2];
                                        int m = i == 0 ? 1 : 2;
@@ -1729,7 +1749,7 @@ void handle_events (void)
        int was_paused = 0;
        static int cnt;
 
-       if (guijoychange && window_led_joy_start > 0) {
+       if (hStatusWnd && guijoychange && window_led_joy_start > 0) {
                guijoychange = false;
                for (int i = 0; i < window_led_joy_start; i++)
                        PostMessage (hStatusWnd, SB_SETTEXT, (WPARAM)((i + 1) | SBT_OWNERDRAW), (LPARAM)L"");
@@ -2694,6 +2714,7 @@ void target_default_options (struct uae_prefs *p, int type)
                p->win32_rtgvblankrate = 0;
                p->win32_commandpathstart[0] = 0;
                p->win32_commandpathend[0] = 0;
+               p->win32_statusbar = 1;
        }
        if (type == 1 || type == 0) {
                p->win32_uaescsimode = UAESCSI_CDEMU;
@@ -2708,7 +2729,8 @@ void target_default_options (struct uae_prefs *p, int type)
        }
 }
 
-static const TCHAR *scsimode[] = { L"SCSIEMU", L"SPTI", L"SPTI+SCSISCAN", L"AdaptecASPI", L"NeroASPI", L"FrogASPI", 0 };
+static const TCHAR *scsimode[] = { L"SCSIEMU", L"SPTI", L"SPTI+SCSISCAN", L"AdaptecASPI", L"NeroASPI", L"FrogASPI", NULL };
+static const TCHAR *statusbarmode[] = { L"none", L"normal", L"extended", NULL };
 
 void target_save_options (struct zfile *f, struct uae_prefs *p)
 {
@@ -2748,6 +2770,7 @@ void target_save_options (struct zfile *f, struct uae_prefs *p)
                cfgfile_target_dwrite (f, L"rtg_vblank", L"%d", p->win32_rtgvblankrate);
        cfgfile_target_dwrite_bool (f, L"borderless", p->win32_borderless);
        cfgfile_target_dwrite_str (f, L"uaescsimode", scsimode[p->win32_uaescsimode]);
+       cfgfile_target_dwrite_str (f, L"statusbar", statusbarmode[p->win32_statusbar]);
        cfgfile_target_dwrite (f, L"soundcard", L"%d", p->win32_soundcard);
        if (sound_devices[p->win32_soundcard].cfgname)
                cfgfile_target_dwrite_str (f, L"soundcardname", sound_devices[p->win32_soundcard].cfgname);
@@ -2942,6 +2965,9 @@ int target_parse_option (struct uae_prefs *p, const TCHAR *option, const TCHAR *
                return 1;
        }
 
+       if (cfgfile_strval (option, value, L"statusbar", &p->win32_statusbar, statusbarmode, 0))
+               return 1;
+
        if (cfgfile_intval (option, value, L"active_priority", &v, 1)) {
                p->win32_active_priority = fetchpri (v, 1);
                return 1;
index 24ed88794263f26ff7cc8b074347e3d5713cedd2..12184f17b476c9bc5cdcddecfe7f2904781fbbdc 100644 (file)
@@ -18,8 +18,8 @@
 #define WINUAEPUBLICBETA 1
 #define LANG_DLL 1
 
-#define WINUAEBETA L"13"
-#define WINUAEDATE MAKEBD(2010, 8, 27)
+#define WINUAEBETA L"14"
+#define WINUAEDATE MAKEBD(2010, 8, 31)
 #define WINUAEEXTRA L""
 #define WINUAEREV L""
 
index 9aefbd8b87a8cf999ba3ed418a16e990a52c3262..138746c73014f79f9efd2a9bff83847dcd49400f 100644 (file)
@@ -1308,6 +1308,7 @@ int check_prefs_changed_gfx (void)
        c |= currprefs.win32_alwaysontop != changed_prefs.win32_alwaysontop ? 32 : 0;
        c |= currprefs.win32_notaskbarbutton != changed_prefs.win32_notaskbarbutton ? 32 : 0;
        c |= currprefs.win32_borderless != changed_prefs.win32_borderless ? 32 : 0;
+       c |= currprefs.win32_statusbar != changed_prefs.win32_statusbar ? 32 : 0;
        c |= currprefs.win32_rtgmatchdepth != changed_prefs.win32_rtgmatchdepth ? 2 : 0;
        c |= currprefs.win32_rtgscaleifsmall != changed_prefs.win32_rtgscaleifsmall ? (2 | 8 | 64) : 0;
        c |= currprefs.win32_rtgallowscaling != changed_prefs.win32_rtgallowscaling ? (2 | 8 | 64) : 0;
@@ -1371,6 +1372,7 @@ int check_prefs_changed_gfx (void)
                currprefs.win32_alwaysontop = changed_prefs.win32_alwaysontop;
                currprefs.win32_notaskbarbutton = changed_prefs.win32_notaskbarbutton;
                currprefs.win32_borderless = changed_prefs.win32_borderless;
+               currprefs.win32_statusbar = changed_prefs.win32_statusbar;
                currprefs.win32_rtgmatchdepth = changed_prefs.win32_rtgmatchdepth;
                currprefs.win32_rtgscaleifsmall = changed_prefs.win32_rtgscaleifsmall;
                currprefs.win32_rtgallowscaling = changed_prefs.win32_rtgallowscaling;
@@ -1959,7 +1961,7 @@ static void createstatuswindow (void)
        HLOCAL hloc;
        LPINT lpParts;
        int drive_width, hd_width, cd_width, power_width, fps_width, idle_width, snd_width, joy_width;
-       int joys = 0;
+       int joys = currprefs.win32_statusbar > 1 ? 2 : 0;
        int num_parts = 11 + joys;
        double scaleX, scaleY;
        WINDOWINFO wi;
@@ -1969,6 +1971,8 @@ static void createstatuswindow (void)
                ShowWindow (hStatusWnd, SW_HIDE);
                DestroyWindow (hStatusWnd);
        }
+       if (currprefs.win32_statusbar == 0)
+               return;
        hStatusWnd = CreateWindowEx (
                0, STATUSCLASSNAME, (LPCTSTR) NULL, SBARS_TOOLTIPS | WS_CHILD | WS_VISIBLE,
                0, 0, 0, 0, hMainWnd, (HMENU) 1, hInst, NULL);
@@ -2141,7 +2145,7 @@ static int create_windows_2 (void)
        DWORD flags = 0;
        int borderless = currprefs.win32_borderless;
        DWORD style = NORMAL_WINDOW_STYLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
-       int cymenu = GetSystemMetrics (SM_CYMENU);
+       int cymenu = currprefs.win32_statusbar == 0 ? 0 : GetSystemMetrics (SM_CYMENU);
        int cyborder = GetSystemMetrics (SM_CYBORDER);
        int cxborder = GetSystemMetrics (SM_CXBORDER);
        int gap = 3;
index b85ac956444add1c58d7b25bcd310cc8966eb448..626e075683cc5d729c9bb2c4e4f44e5676b4b0ba 100644 (file)
@@ -7342,6 +7342,15 @@ static void values_to_miscdlg (HWND hDlg)
                SendDlgItemMessage (hDlg, IDC_DXMODE, CB_ADDSTRING, 0, (LPARAM)L"Direct3D");
                SendDlgItemMessage (hDlg, IDC_DXMODE, CB_SETCURSEL, workprefs.gfx_api, 0);
 
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_RESETCONTENT, 0, 0);
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_ADDSTRING, 0, (LPARAM)L"Borderless");
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_ADDSTRING, 0, (LPARAM)L"Minimal");
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_ADDSTRING, 0, (LPARAM)L"Standard");
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_ADDSTRING, 0, (LPARAM)L"Extended");
+               SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_SETCURSEL,
+                       workprefs.win32_borderless ? 0 : (workprefs.win32_statusbar + 1),
+                       0);
+
                SendDlgItemMessage (hDlg, IDC_DD_SURFACETYPE, CB_RESETCONTENT, 0, 0);
                SendDlgItemMessage (hDlg, IDC_DD_SURFACETYPE, CB_ADDSTRING, 0, (LPARAM)L"NonLocalVRAM");
                SendDlgItemMessage (hDlg, IDC_DD_SURFACETYPE, CB_ADDSTRING, 0, (LPARAM)L"DefaultRAM *");
@@ -7454,6 +7463,17 @@ static INT_PTR MiscDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
                                                enable_for_miscdlg (hDlg);
                                        }
                                break;
+                               case IDC_WINDOWEDMODE:
+                                       v = SendDlgItemMessage (hDlg, IDC_WINDOWEDMODE, CB_GETCURSEL, 0, 0L);
+                                       if (v != CB_ERR) {
+                                               workprefs.win32_borderless = 0;
+                                               workprefs.win32_statusbar = 0;
+                                               if (v == 0)
+                                                       workprefs.win32_borderless = 1;
+                                               if (v > 0)
+                                                       workprefs.win32_statusbar = v - 1;
+                                       }
+                               break;
                                case IDC_DD_SURFACETYPE:
                                        v = SendDlgItemMessage (hDlg, IDC_DD_SURFACETYPE, CB_GETCURSEL, 0, 0L);
                                        if (v != CB_ERR) {
@@ -13549,17 +13569,19 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int       currentpage)
        drvdrag = 0;
        if (currentpage < 0) {
                GetClientRect (hMainWnd, &r2);
-               GetClientRect (hStatusWnd, &r);
-               if (pt.y >= r2.bottom && pt.y < r2.bottom + r.bottom) {
-                       if (pt.x >= window_led_drives && pt.x < window_led_drives_end && window_led_drives > 0) {
-                               drv = pt.x - window_led_drives;
-                               drv /= (window_led_drives_end - window_led_drives) / 4;
-                               drvdrag = 1;
-                               if (drv < 0 || drv > 3)
-                                       drv = 0;
-                       }
-                       if (pt.x >= window_led_hd && pt.x < window_led_hd_end && window_led_hd > 0) {
-                               harddrive = 1;
+               if (hStatusWnd) {
+                       GetClientRect (hStatusWnd, &r);
+                       if (pt.y >= r2.bottom && pt.y < r2.bottom + r.bottom) {
+                               if (pt.x >= window_led_drives && pt.x < window_led_drives_end && window_led_drives > 0) {
+                                       drv = pt.x - window_led_drives;
+                                       drv /= (window_led_drives_end - window_led_drives) / 4;
+                                       drvdrag = 1;
+                                       if (drv < 0 || drv > 3)
+                                               drv = 0;
+                               }
+                               if (pt.x >= window_led_hd && pt.x < window_led_hd_end && window_led_hd > 0) {
+                                       harddrive = 1;
+                               }
                        }
                }
        } else if (currentpage == FLOPPY_ID || currentpage == QUICKSTART_ID) {
index 2dbcf6d0309e4cbba9d5e6022adbb8801d57cb85..43a758f2c545b757ec2680d67ca22b7b9781a056 100644 (file)
@@ -1,4 +1,23 @@
 
+Beta 14:
+
+- DSKSTEP and DSKSELx going inactive at the same time steps the rw-head normally
+  Fixes Euro Soccer stupid disk change detection.
+- uaehf.device HD_SCSICMD TEST UNIT READY returned an error (HDInstTools works again)
+- added 68020 CE-mode very approximate 2-stage CPU prefetch pipeline emulation (not that 68020
+  don't really have 2-stage prefetch but it still will be more compatible without major changes)
+  Fixes ATR and (partially) Last Ninja 3 CD32 graphics glitches, (missing blitter waits..)
+  also more compatible with self-modifying code
+- CD32/CDTV empty "image mode" tried to select physical drive
+- added windowed mode configuration GUI setting (borderless, minimal, normal, extended)
+  Extended is WIP and something you (and me?) should ignore
+- do not capture mouse if left mouse was clicked and WinUAE window had no focus
+  (now available via GUI = can't be totally useless anymore..)
+- borderless mode can be dragged by clicking mouse button once, only double click captures mouse
+- fixed epson printing emulation blank page when printing multiple text pages and later pages
+  didn't have any font or font style changes
+- more prowizard ripper updates
+
 Beta 13:
 
 - addaq.x #x,Ax and subaq.x #x,Ax had too long cycle count (this was really stupid bug)
@@ -21,9 +40,6 @@ Beta 13:
 - directories selected via "favorite menu" also sets default path
 - prowizard updates
 
-- added ugly joystick/mouse direction status bar pointers (design stolen from Vice and
-  future AF player skin) Not sure if this was good idea..
-
 Beta 12:
 
 - <drive letter>: without '\' in harddrive paths was detected as a relative path,
index 2893ab9db116145545b69a9fa563bcca3a8f825a..7475414eae2bca735900af0bb8718591da3fdd74 100644 (file)
@@ -1,8 +1,3 @@
-/* (27 dec 2001)
- *   added some checks to prevent readings outside of input file (in test 1)
- * (May 2002)
- *   added test_smps()
-*/
 /* testEUREKA() */
 /* Rip_EUREKA() */
 /* Depack_EUREKA() */
@@ -12,6 +7,13 @@
 #include "extern.h"
 
 
+/* (27 dec 2001)
+ *   added some checks to prevent readings outside of input file (in test 1)
+ * (May 2002)
+ *   added test_smps()
+ * (30/08/10)
+ *   changed #4.3 as the "remaining" patternlist isn't always 0x00
+*/
 short testEUREKA ( void )
 {
   /* test 1 */
@@ -84,9 +86,9 @@ short testEUREKA ( void )
   PW_k += 2; /* to be sure .. */
   while ( PW_k != 128 )
   {
-    if ( in_data[PW_Start_Address+952+PW_k] != 0 )
+    if ( in_data[PW_Start_Address+952+PW_k] > 0x64 )
     {
-/*printf ( "#4,3 (Start:%ld)\n" , PW_Start_Address );*/
+/*printf ( "#4,3 (Start:%ld)(PW_k:%ld)\n" , PW_Start_Address,PW_k );*/
       return BAD;
     }
     PW_k += 1;
index 3161c4c4dc351bb71d367453bfb1a927a74c48d9..f1e3827ad9aa891bcf70d4bd4eb6f0318970b0b3 100644 (file)
@@ -71,7 +71,7 @@ void Rip_KSM ( void )
   Save_Rip ( "Kefrens Sound Machine module", KSM );
   
   if ( Save_Status == GOOD )
-    PW_i += (OutputSize - 2);  /* -1 should do but call it "just to be sure" :) */
+    PW_i += 2;  /* -1 should do but call it "just to be sure" :) */
 }
 
 
@@ -89,6 +89,9 @@ void Rip_KSM ( void )
  *      - added transciption for sample names
  * Another Update : 26 nov 2003
  *      - used htonl() so that use of addy is now portable on 68k archs
+ * update 30/08/10
+ *      - patternlist with only one pattern fixed
+ *      - conversion to STK instead of PTK
 */
 
 #define ON  1
@@ -196,14 +199,13 @@ void Depack_KSM ( void )
     }
     else
     {
-      Whatever[1] = 0x01;
-      fwrite ( Whatever , 2 , 1 , out );
+      c1 = 0x00;
+      c2 = 0x01;
+      fwrite ( &c1 , 1 , 1 , out );
+      fwrite ( &c2 , 1 , 1 , out );
     }
     Where += 32;
   }
-  Whatever[129] = 0x01;
-  for ( i=0 ; i<16 ; i++ )
-    fwrite ( &Whatever[100] , 30 , 1 , out );
   /*printf ( "ok\n" );*/
 
   /* pattern list */
@@ -308,11 +310,11 @@ void Depack_KSM ( void )
 
 
   /* write ID */
-  Whatever[0] = 'M';
+  /*Whatever[0] = 'M';
   Whatever[1] = '.';
   Whatever[2] = 'K';
-  Whatever[3] = '.';
-  fwrite ( Whatever , 4 , 1 , out );
+  Whatever[3] = '.';*/
+  /*fwrite ( Whatever , 4 , 1 , out );*/
 
   /* pattern data */
   /*printf ( "Converting pattern datas " );*/
@@ -371,7 +373,7 @@ void Depack_KSM ( void )
 
 
   /* crap */
-  Crap ( "Kefrens SndMachine" , BAD , BAD , out );
+  /*Crap ( "Kefrens SndMachine" , BAD , BAD , out );*/
 
   fflush ( out );
   fclose ( out );
index 7c72c8a9a516a1b1c83fc360dabe663964023f94..5a3396b81d6a1fe69f955e605aff4202c3b198eb 100644 (file)
@@ -152,7 +152,7 @@ void Rip_Noisepacker1 ( void )
   Save_Rip ( "NoisePacker v1 module", Noisepacker1 );
   
   if ( Save_Status == GOOD )
-    PW_i += (OutputSize - 16);  /* 15 should do but call it "just to be sure" :) */
+    PW_i += 16;  /* 15 should do but call it "just to be sure" :) */
 }
 
 
@@ -165,6 +165,8 @@ void Rip_Noisepacker1 ( void )
  *                 Speed-up and Binary smaller.
  * Update:30/11/99
  *    - removed fopen() and attached funcs.
+ * update: 30/08/10
+ *    - Whatever wasn't cleaned up and was harmful when patternlist size was 1
 */
 void Depack_Noisepacker1 ( void )
 {
@@ -262,6 +264,7 @@ void Depack_Noisepacker1 ( void )
   /* write noisetracker byte */
   Whatever[0] = 0x7f;
   fwrite ( Whatever , 1 , 1 , out );
+  BZERO ( Whatever , 1024 );
 
   /* bypass 2 bytes ... seems always the same as in $02 */
   /* & bypass 2 other bytes which meaning is beside me */