]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
imported winuaesrc1430b8.zip
authorToni Wilen <twilen@winuae.net>
Fri, 6 Jul 2007 14:11:49 +0000 (17:11 +0300)
committerToni Wilen <twilen@winuae.net>
Mon, 22 Feb 2010 19:34:33 +0000 (21:34 +0200)
13 files changed:
a2091.c
ar.c
audio.c
blitter.c
hardfile.c
include/zarchive.h
memory.c
od-win32/resources/winuae.rc
od-win32/win32.h
od-win32/win32gui.c
od-win32/winuaechangelog.txt
zfile.c
zfile_archive.c

diff --git a/a2091.c b/a2091.c
index cf5327fc6d72dc4a3f326b72a2853ade750287bd..74c5423974b5a7b36c316473e694266e63e8644f 100755 (executable)
--- a/a2091.c
+++ b/a2091.c
@@ -1144,6 +1144,8 @@ static void ew (int addr, uae_u32 value)
 
 static void freescsi(struct scsi_data *sd)
 {
+    if (!sd)
+       return;
     hdf_hd_close(sd->hfd);
     scsi_free(sd);
 }
diff --git a/ar.c b/ar.c
index 5f784e666239a81d109fd5769e26df61781312fb..e8f7ff9a0c471304678bf2b6206a1700eafb16d4 100755 (executable)
--- a/ar.c
+++ b/ar.c
   * - 0xc00000
   * - 0x080000
   *
-  * CIA-A: 0xb40000
-  * CIA-B: 0xb40001
+  * CIA-A: 0xb40000 (0x000, 0x100,...)
+  * CIA-B: 0xb40001 (0x001, 0x101,...)
   * Custom: 0xe40000
   */
 
+ /* X-Power 500:
+  *
+  * ROM: 0xe20000 (128k)
+  * RAM: 0xf20000 (64k)
+  * CIA-A: 0xf2fc00 (00,02,04,...)
+  * CIA-B: 0xf2fc01 (01,03,05,...)
+  * Custom: 0xf2fc00 (from 0x20->)
+  */
+
+ /* Nordic Power:
+  *
+  * ROM: 0xf00000 (64k)
+  * RAM: 0xf40000 (32k)
+  * CIA-A: 0xf47c00 (00,02,04,...)
+  * CIA-B: 0xf47c01 (01,03,05,...)
+  * Custom: 0xf47c00 (from 0x20->)
+  */
+
 #include "sysconfig.h"
 #include "sysdeps.h"
 
@@ -195,6 +213,7 @@ static char *cart_memnames3[] = { NULL, NULL, NULL, "superiv_3" };
 
 uae_u8 ar_custom[2*256];
 uae_u8 ar_ciaa[16], ar_ciab[16];
+static int hrtmon_ciadiv = 256;
 
 int hrtmon_flag = ACTION_REPLAY_INACTIVE;
 static int cart_type;
@@ -205,6 +224,7 @@ static uae_u8 *armemory_rom = 0, *armemory_ram = 0;
 static uae_u32 hrtmem_mask, hrtmem2_mask, hrtmem3_mask;
 static uae_u8 *hrtmon_custom, *hrtmon_ciaa, *hrtmon_ciab;
 uae_u32 hrtmem_start, hrtmem2_start, hrtmem3_start, hrtmem_size, hrtmem2_size, hrtmem2_size2, hrtmem3_size;
+static int hrtmem_rom;
 static int triggered_once;
 
 static void hrtmon_unmap_banks(void);
@@ -370,6 +390,8 @@ static void REGPARAM2 hrtmem_lput (uaecptr addr, uae_u32 l)
     addr &= hrtmem_mask;
     if (cart_type == CART_AR1200 && addr < 0x80000)
        return;
+    if (hrtmem_rom)
+       return;
     m = (uae_u32 *)(hrtmemory + addr);
     do_put_mem_long (m, l);
 }
@@ -381,6 +403,8 @@ static void REGPARAM2 hrtmem_wput (uaecptr addr, uae_u32 w)
     addr &= hrtmem_mask;
     if (cart_type == CART_AR1200 && addr < 0x80000)
        return;
+    if (hrtmem_rom)
+       return;
     m = (uae_u16 *)(hrtmemory + addr);
     do_put_mem_word (m, (uae_u16)w);
 }
@@ -390,6 +414,8 @@ static void REGPARAM2 hrtmem_bput (uaecptr addr, uae_u32 b)
     addr &= hrtmem_mask;
     if (cart_type == CART_AR1200 && addr < 0x80000)
        return;
+    if (hrtmem_rom)
+       return;
     hrtmemory[addr] = b;
 }
 static int REGPARAM2 hrtmem_check (uaecptr addr, uae_u32 size)
@@ -940,12 +966,13 @@ static void hrtmon_go (void)
     cartridge_enter();
     hrtmon_flag = ACTION_REPLAY_ACTIVE;
     set_special (&regs, SPCFLAG_ACTION_REPLAY);
-    memcpy (hrtmon_custom, ar_custom, 2 * 256);
+    if (hrtmon_custom)
+       memcpy (hrtmon_custom, ar_custom, 2 * 256);
     for (i = 0; i < 16; i++) {
        if (hrtmon_ciaa)
-           hrtmon_ciaa[i * 256 + 1] = ar_ciaa[i];
+           hrtmon_ciaa[i * hrtmon_ciadiv + 1] = ar_ciaa[i];
        if (hrtmon_ciab)
-           hrtmon_ciab[i * 256 + 0] = ar_ciab[i];
+           hrtmon_ciab[i * hrtmon_ciadiv + 0] = ar_ciab[i];
     }
     if (cart_type == CART_AR1200) {
         old = get_long((uaecptr)(regs.vbr + 0x8));
@@ -1477,18 +1504,42 @@ int action_replay_unload(int in_memory_reset)
     return 1;
 }
 
-static int superiv_init(struct zfile *f)
+static int superiv_init(struct romdata *rd, struct zfile *f)
 {
     uae_u32 chip = currprefs.chipmem_size - 0x10000;
+    int subtype = rd->id;
 
     cart_type = CART_SUPER4;
-    hrtmem_start = 0xd00000;
-    hrtmem_size = 0x40000;
-    hrtmem2_start = 0xb00000;
-    hrtmem2_size =  0x100000;
-    hrtmem2_size2 = 0x0c0000;
-    hrtmem3_start = 0xe00000;
-    hrtmem3_size = 0x80000;
+
+    hrtmon_custom = 0;
+    hrtmon_ciaa = 0;
+    hrtmon_ciab = 0;
+
+    if (subtype == 65) { /* xpower */
+       hrtmem_start = 0xe20000;
+       hrtmem_size = 0x20000;
+       hrtmem2_start = 0xf20000;
+       hrtmem2_size =  0x10000;
+       hrtmem_rom = 1;
+       hrtmon_ciadiv = 2;
+    } else if (subtype == 66 || subtype == 67) { /* nordic */
+       hrtmem_start = 0xf00000;
+       hrtmem_size = 0x10000;
+       hrtmem2_start = 0xf40000;
+       hrtmem2_size =  0x10000;
+       hrtmem_rom = 1;
+       hrtmon_ciadiv = 2;
+    } else { /* super4 */
+       hrtmem_start = 0xd00000;
+       hrtmem_size = 0x40000;
+       hrtmem2_start = 0xb00000;
+       hrtmem2_size =  0x100000;
+       hrtmem2_size2 = 0x0c0000;
+       hrtmem3_start = 0xe00000;
+       hrtmem3_size = 0x80000;
+    }
+    if (hrtmem2_size && !hrtmem2_size2)
+       hrtmem2_size2 = hrtmem2_size;
 
     hrtmemory = mapped_malloc (hrtmem_size, cart_memnames[cart_type]);
     memset (hrtmemory, 0x00, hrtmem_size);
@@ -1501,23 +1552,41 @@ static int superiv_init(struct zfile *f)
     hrtmem_mask = hrtmem_size - 1;
     hrtmem2_mask = hrtmem2_size - 1;
     hrtmem3_mask = hrtmem3_size - 1;
-    hrtmemory2 = mapped_malloc (hrtmem2_size, cart_memnames2[cart_type]);
-    memset(hrtmemory2, 0, hrtmem2_size);
-    hrtmemory3 = mapped_malloc (hrtmem3_size, cart_memnames3[cart_type]);
-    memset(hrtmemory3, 0, hrtmem3_size);
+    if (hrtmem2_size) {
+       hrtmemory2 = mapped_malloc (hrtmem2_size, cart_memnames2[cart_type]);
+       memset(hrtmemory2, 0, hrtmem2_size);
+    }
+    if (hrtmem3_size) {
+       hrtmemory3 = mapped_malloc (hrtmem3_size, cart_memnames3[cart_type]);
+        memset(hrtmemory3, 0, hrtmem3_size);
+    }
     hrtmem3_bank.baseaddr = hrtmemory3;
     hrtmem2_bank.baseaddr = hrtmemory2;
     hrtmem_bank.baseaddr = hrtmemory;
 
-    hrtmon_custom = hrtmemory3 + 0x040000;
-    hrtmon_ciaa = hrtmemory2 + 0x040000;
-    hrtmon_ciab = hrtmemory2 + 0x040001;
-
-    chip += 0x30000;
-    hrtmemory2[0x80] = chip >> 24;
-    hrtmemory2[0x81] = chip >> 16;
-    hrtmemory2[0x82] = chip >> 8;
-    hrtmemory2[0x83] = chip >> 0;
+    if (subtype == 65) {
+       hrtmon_custom = hrtmemory2 + 0xfc00;
+       hrtmon_ciaa = hrtmemory2 + 0xfc00;
+       hrtmon_ciab = hrtmemory2 + 0xfc01;
+       chip += 0x30000;
+       hrtmemory2[0xfc80] = chip >> 24;
+       hrtmemory2[0xfc81] = chip >> 16;
+       hrtmemory2[0xfc82] = chip >> 8;
+       hrtmemory2[0xfc83] = chip >> 0;
+    } else if (subtype == 66 || subtype == 67) {
+       hrtmon_custom = hrtmemory2 + 0x7c00;
+       hrtmon_ciaa = hrtmemory2 + 0x7c00;
+       hrtmon_ciab = hrtmemory2 + 0x7c01;
+    } else {
+       hrtmon_custom = hrtmemory3 + 0x040000;
+       hrtmon_ciaa = hrtmemory2 + 0x040000;
+       hrtmon_ciab = hrtmemory2 + 0x040001;
+       chip += 0x30000;
+       hrtmemory2[0x80] = chip >> 24;
+       hrtmemory2[0x81] = chip >> 16;
+       hrtmemory2[0x82] = chip >> 8;
+       hrtmemory2[0x83] = chip >> 0;
+    }
 
     hrtmon_flag = ACTION_REPLAY_IDLE;
     write_log("%s installed at %08.8X\n", cart_memnames[cart_type], hrtmem_start);
@@ -1543,7 +1612,7 @@ int action_replay_load(void)
        return 0;
     rd = getromdatabypath(currprefs.cartfile);
     if (rd && rd->id == 62)
-       return superiv_init(NULL);
+       return superiv_init(rd, NULL);
     f = zfile_fopen(currprefs.cartfile,"rb");
     if (!f) {
        write_log("failed to load '%s' cartridge ROM\n", currprefs.cartfile);
@@ -1554,7 +1623,7 @@ int action_replay_load(void)
        write_log("Unknown cartridge ROM\n");
     } else {
        if (rd->type & ROMTYPE_SUPERIV) {
-           return superiv_init(f);
+           return superiv_init(rd, f);
        }
     }
     zfile_fseek(f, 0, SEEK_END);
@@ -1632,8 +1701,11 @@ void action_replay_cleanup()
     hrtmemory3 = 0;
     hrtmem_size = 0;
     hrtmem2_size = 0;
+    hrtmem2_size2 = 0;
     hrtmem3_size = 0;
     cart_type = 0;
+    hrtmem_rom = 0;
+    hrtmon_ciadiv = 256;
 }
 
 #ifndef FALSE
diff --git a/audio.c b/audio.c
index 055f707e49217506afbc4b91af15c3650d8c9e0f..a6bd8a579a288e0bbd685215a780ef6f0048eb56 100755 (executable)
--- a/audio.c
+++ b/audio.c
@@ -1082,11 +1082,11 @@ static int isirq (int nr)
     return INTREQR() & (0x80 << nr);
 }
 
-static void setirq (int nr, int debug)
+static void setirq (int nr)
 {
 #ifdef DEBUG_AUDIO
     if (debugchannel (nr))
-       write_log ("SETIRQ %d %08.8X (%d)\n", nr, M68K_GETPC, debug);
+       write_log ("SETIRQ %d %08.8X\n", nr, M68K_GETPC);
 #endif
     INTREQ (0x8000 | (0x80 << nr));
 }
@@ -1125,7 +1125,7 @@ static void state23 (struct audio_channel_data *cdp)
     }
 }
 
-static void audio_handler (int nr, int timed)
+static void audio_handler (int nr)
 {
     struct audio_channel_data *cdp = audio_channel + nr;
 
@@ -1139,8 +1139,6 @@ static void audio_handler (int nr, int timed)
     switch (cdp->state)
     {
        case 0:
-           cdp->request_word = 0;
-           cdp->request_word_skip = 0;
            cdp->intreq2 = 0;
            cdp->vpos = vpos;
            if (cdp->dmaen) {
@@ -1153,15 +1151,19 @@ static void audio_handler (int nr, int timed)
                if (debugchannel (nr))
                    write_log ("%d:0>1: LEN=%d\n", nr, cdp->wlen);
 #endif
-               audio_handler (nr, timed);
+               cdp->request_word = 0;
+               cdp->request_word_skip = 0;
+               audio_handler (nr);
                return;
            } else if (!cdp->dmaen && cdp->request_word < 0 && !isirq (nr)) {
                cdp->evtime = 0;
                cdp->state = 2;
-               setirq (nr, 0);
-               audio_handler (nr, timed);
+               setirq (nr);
+               audio_handler (nr);
                return;
            }
+           cdp->request_word = 0;
+           cdp->request_word_skip = 0;
        return;
 
        case 1:
@@ -1184,7 +1186,7 @@ static void audio_handler (int nr, int timed)
                cdp->request_word = 2;
                return;
            }
-           setirq (nr, 1);
+           setirq (nr);
            if (!cdp->dmaen) {
                cdp->state = 0;
                cdp->request_word = 0;
@@ -1214,7 +1216,7 @@ static void audio_handler (int nr, int timed)
            /* Period attachment? */
            if (audap) {
                if (cdp->intreq2 && cdp->dmaen)
-                   setirq (nr, 2);
+                   setirq (nr);
                cdp->intreq2 = 0;
                cdp->request_word = 1;
                cdp->dat = cdp->dat2;
@@ -1242,10 +1244,10 @@ static void audio_handler (int nr, int timed)
                if (napnav)
                    cdp->request_word = 1;
                if (cdp->intreq2 && napnav)
-                   setirq (nr, 3);
+                   setirq (nr);
            } else {
                if (napnav)
-                   setirq (nr, 4);
+                   setirq (nr);
            }
            cdp->intreq2 = 0;
 
@@ -1508,13 +1510,13 @@ void update_audio (void)
        }
 
        if (audio_channel[0].evtime == 0)
-           audio_handler (0, 1);
+           audio_handler (0);
        if (audio_channel[1].evtime == 0)
-           audio_handler (1, 1);
+           audio_handler (1);
        if (audio_channel[2].evtime == 0)
-           audio_handler (2, 1);
+           audio_handler (2);
        if (audio_channel[3].evtime == 0)
-           audio_handler (3, 1);
+           audio_handler (3);
     }
 end:
     last_cycles = get_cycles () - n_cycles;
@@ -1602,7 +1604,7 @@ void audio_hsync (int dmaaction)
                handle2 = 1;
        }
        if (handle2)
-           audio_handler (nr, 0);
+           audio_handler (nr);
        handle |= handle2;
     }
     if (handle) {
@@ -1625,9 +1627,12 @@ void AUDxDAT (int nr, uae_u16 v)
     cdp->dat2 = v;
     cdp->request_word = -1;
     cdp->request_word_skip = 0;
-    if (cdp->state == 0) {
+    /* cpu >= 68020: another "too fast" memory/CPU hack */
+    if (cdp->state == 0 || currprefs.cpu_model >= 68020) {
        cdp->state = 2;
-       audio_handler (nr, 0);
+       if (currprefs.cpu_model >= 68020)
+           INTREQ (0x80 << nr);
+       audio_handler (nr);
        schedule_audio ();
        events_schedule ();
     }
index 771c16b5baba9ec804fa3011000bec8d04d9d4ff..42a844242e4ec9d7b3d2467bdb36c9ee195ac5d9 100755 (executable)
--- a/blitter.c
+++ b/blitter.c
@@ -149,7 +149,7 @@ static const int blit_cycle_diagram[][10] =
 static const int blit_cycle_diagram_fill[][10] =
 {
     { 0, 3, 0,5,0 },           /* 0 */
-    { 0, 3, 3,5,4 },           /* 1 */
+    { 0, 3, 0,5,4 },           /* 1 */
     { 0, 3, 0,3,0 },           /* 2 */
     { 2, 3, 3,5,4, 3,0 },      /* 3 */
     { 0, 3, 0,2,5 },           /* 4 */
index fd41ab45ad15ae69011a2718d271d3668142287b..3c3358bbc73d911fcb2a3b3fbafee26f0173c1dc 100755 (executable)
@@ -275,15 +275,15 @@ void hdf_hd_close(struct hd_hardfiledata *hfd)
 {
     if (!hfd)
        return;
-    if (hfd->hfd.handle_valid)
-       hdf_close(&hfd->hfd);
-       xfree(hfd->path);
+    hdf_close(&hfd->hfd);
+    xfree(hfd->path);
 }
 
 int hdf_hd_open(struct hd_hardfiledata *hfd, char *path, int blocksize, int readonly,
                       char *devname, int sectors, int surfaces, int reserved,
                       int bootpri, char *filesys)
 {
+    memset(hfd, 0, sizeof (struct hd_hardfiledata));
     hfd->bootpri = bootpri;
     hfd->hfd.blocksize = blocksize;
     if (!hdf_open(&hfd->hfd, path))
index a57a4bdefcaa9b3c88acf0825ccc6c027efc6181..3509c4ff83367ebd820fb0a77974e44f261bb85c 100755 (executable)
@@ -51,7 +51,7 @@ struct zvolume
 
 struct zarchive_info
 {
-    char *name;
+    const char *name;
     unsigned int size;
     int flags;
     char *comment;
index 036fc34014a8c90dcfa8e2e8480a80cc4a11ee88..410b1f8ba0c654823bd95ab3f3e98c5dfe3e5f42 100755 (executable)
--- a/memory.c
+++ b/memory.c
@@ -102,7 +102,7 @@ struct romdata *getromdatabypath(char *path)
     return NULL;
 }
 
-#define NEXT_ROM_ID 65
+#define NEXT_ROM_ID 68
 
 static struct romheader romheaders[] = {
     { "Freezer Cartridges", 1 },
@@ -182,27 +182,35 @@ static struct romdata roms[] = {
     { "A1000 bootstrap ROM", 0, 0, 0, 0, "A1000\0", 65536, 24, 0, 0, ROMTYPE_KICK, 0,
        0x0b1ad2d0, 0xBA93B8B8,0x5CA0D83A,0x68225CC3,0x3B95050D,0x72D2FDD7 },
 
-    { "Action Replay Mk I v1.00", 1, 0, 1, 0, "AR\0", 65536, 52, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk I v1.00", 1, 0, 1, 0, "AR\0", 65536, 52, 0, 0, ROMTYPE_AR, 1,
        0x2d921771, 0x1EAD9DDA,0x2DAD2914,0x6441F5EF,0x72183750,0x22E01248 },
-    { "Action Replay Mk I v1.50", 1, 50, 1, 50, "AR\0", 65536, 25, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk I v1.50", 1, 50, 1, 50, "AR\0", 65536, 25, 0, 0, ROMTYPE_AR, 1,
        0xd4ce0675, 0x843B433B,0x2C56640E,0x045D5FDC,0x854DC6B1,0xA4964E7C },
-    { "Action Replay Mk II v2.05", 2, 5, 2, 5, "AR\0", 131072, 26, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk II v2.05", 2, 5, 2, 5, "AR\0", 131072, 26, 0, 0, ROMTYPE_AR, 1,
        0x1287301f, 0xF6601DE8,0x888F0050,0x72BF562B,0x9F533BBC,0xAF1B0074 },
-    { "Action Replay Mk II v2.12", 2, 12, 2, 12, "AR\0", 131072, 27, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk II v2.12", 2, 12, 2, 12, "AR\0", 131072, 27, 0, 0, ROMTYPE_AR, 1,
        0x804d0361, 0x3194A07A,0x0A82D8B5,0xF2B6AEFA,0x3CA581D6,0x8BA8762B },
-    { "Action Replay Mk II v2.14", 2, 14, 2, 14, "AR\0", 131072, 28, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk II v2.14", 2, 14, 2, 14, "AR\0", 131072, 28, 0, 0, ROMTYPE_AR, 1,
        0x49650e4f, 0x255D6DF6,0x3A4EAB0A,0x838EB1A1,0x6A267B09,0x59DFF634 },
-    { "Action Replay Mk III v3.09", 3, 9, 3, 9, "AR\0", 262144, 29, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk III v3.09", 3, 9, 3, 9, "AR\0", 262144, 29, 0, 0, ROMTYPE_AR, 1,
        0x0ed9b5aa, 0x0FF3170A,0xBBF0CA64,0xC9DD93D6,0xEC0C7A01,0xB5436824 },
-    { "Action Replay Mk III v3.17", 3, 17, 3, 17, "AR\0", 262144, 30, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay Mk III v3.17", 3, 17, 3, 17, "AR\0", 262144, 30, 0, 0, ROMTYPE_AR, 1,
        0xc8a16406, 0x5D4987C2,0xE3FFEA8B,0x1B02E314,0x30EF190F,0x2DB76542 },
-    { "Action Replay 1200", 0, 0, 0, 0, "AR\0", 262144, 47, 0, 0, ROMTYPE_AR, 1,
+    { "Freezer: Action Replay 1200", 0, 0, 0, 0, "AR\0", 262144, 47, 0, 0, ROMTYPE_AR, 1,
        0x8d760101, 0x0F6AB834,0x2810094A,0xC0642F62,0xBA42F78B,0xC0B07E6A },
-    { "Action Cartridge Super IV Pro (+ROM)", 4, 3, 4, 3, "SUPERIV\0", 170368, 60, 0, 0, ROMTYPE_SUPERIV, 1,
+
+    { "Freezer: Action Cartridge Super IV Pro (+ROM)", 4, 3, 4, 3, "SUPERIV\0", 170368, 60, 0, 0, ROMTYPE_SUPERIV, 1,
        0xe668a0be, 0x633A6E65,0xA93580B8,0xDDB0BE9C,0x9A64D4A1,0x7D4B4801 },
-    { "Action Cartridge Super IV Pro", 0, 0, 0, 0, "SUPERIV\0", 0, 62, 0, 0, ROMTYPE_SUPERIV, 1,
+    { "Freezer: Action Cartridge Super IV Pro", 0, 0, 0, 0, "SUPERIV\0", 0, 62, 0, 0, ROMTYPE_SUPERIV, 1,
        0xffffffff, 0, 0, 0, 0, 0, "SuperIV" },
-    { "HRTMon (built-in)", 0, 0, 0, 0, "HRTMON\0", 0, 63, 0, 0, ROMTYPE_HRTMON, 1,
+    { "Freezer: X-Power Professional 500", 1, 2, 1, 2, "XPOWER\0", 131072, 65, 0, 0, ROMTYPE_SUPERIV, 1,
+       0x9e70c231, 0xa2977a1c,0x41a8ca7d,0x4af4a168,0x726da542,0x179d5963 },
+    /* only 2 bad dumps available */
+    { "Freezer: Nordic Power v?", 0, 0, 0, 0, "NPOWER\0", 65536, 66, 0, 0, ROMTYPE_SUPERIV, 1, },
+    { "Freezer: Nordic Power v?", 0, 0, 0, 0, "NPOWER\0", 65536, 67, 0, 0, ROMTYPE_SUPERIV, 1, },
+       //0xdd16cdec, 0xfd882967,0x87e2da5f,0x4ef6be32,0x5f7c9324,0xb5bd8e64 },
+
+    { "Freezer: HRTMon (built-in)", 0, 0, 0, 0, "HRTMON\0", 0, 63, 0, 0, ROMTYPE_HRTMON, 1,
        0xffffffff, 0, 0, 0, 0, 0, "HRTMon" },
 
     { "A590/A2091 SCSI boot ROM", 0, 0, 6, 0, "A590\0A2091\0", 16384, 53, 0, 0, ROMTYPE_A2091BOOT, 0,
index bf2bd35fa4f2b3a3e3a78f9bc4e6f48551f0597f..338864a0bad22bc3e3b00255d4cc3f7085ee06c1 100755 (executable)
@@ -575,7 +575,7 @@ BEGIN
     EDITTEXT        IDC_CS_DENISEREV,235,226,45,13,ES_AUTOHSCROLL\r
     CONTROL         "A590/A2091 SCSI",IDC_CS_A2091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,175,76,10\r
     CONTROL         "A4000T SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,175,88,10\r
-    LTEXT           "A4000/A4000T SCSI not yet implemented.",IDC_STATIC,25,161,224,8,SS_CENTERIMAGE\r
+    LTEXT           "A4091/A4000T SCSI not yet implemented.",IDC_STATIC,25,161,224,8,SS_CENTERIMAGE\r
     CONTROL         "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,146,92,10\r
     CONTROL         "A4091 SCSI",IDC_CS_A4091,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,187,76,10\r
     CONTROL         "CDTV SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,97,187,76,10\r
index b37abaae2d2e415fc878ba5e2f8cf381d66e2666..94dd8708b0a5bff5ddedd4a2a5af4c306f100d2d 100755 (executable)
@@ -15,9 +15,9 @@
 #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
 #define GETBDD(x) ((x) % 100)
 
-#define WINUAEBETA 7
+#define WINUAEBETA 8
 #define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 6, 27)
+#define WINUAEDATE MAKEBD(2007, 7, 6)
 #define WINUAEEXTRA ""
 #define WINUAEREV ""
 
index e6408f13826e8f4ee7f0b96727bf24601e98d345..dfa490dadae13caa521cd317ff44ff719cae40a9 100755 (executable)
 #include "uaeipc.h"
 #include "crc32.h"
 
-#define ARCHIVE_STRING "*.zip;*.7z;*.rar;*.lha;*.lzh;*.lzx\0"
+#define ARCHIVE_STRING "*.zip;*.7z;*.rar;*.lha;*.lzh;*.lzx"
 
-#define DISK_FORMAT_STRING "(*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe)\0*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe;*.ima;" ARCHIVE_STRING
-#define ROM_FORMAT_STRING "(*.rom;*.roz)\0*.rom;*.roz;" ARCHIVE_STRING
-#define USS_FORMAT_STRING_RESTORE "(*.uss)\0*.uss;*.gz;"  ARCHIVE_STRING
+#define DISK_FORMAT_STRING "(*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe)\0*.adf;*.adz;*.gz;*.dms;*.fdi;*.ipf;*.exe;*.ima;" ARCHIVE_STRING "\0"
+#define ROM_FORMAT_STRING "(*.rom;*.roz)\0*.rom;*.roz;" ARCHIVE_STRING "\0"
+#define USS_FORMAT_STRING_RESTORE "(*.uss)\0*.uss;*.gz;"  ARCHIVE_STRING "\0"
 #define USS_FORMAT_STRING_SAVE "(*.uss)\0*.uss\0"
 #define HDF_FORMAT_STRING "(*.hdf;*.rdf;*.hdz;*.rdz)\0*.hdf;*.rdf;*.hdz;*.rdz\0"
 #define INP_FORMAT_STRING "(*.inp)\0*.inp\0"
@@ -1061,8 +1061,8 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs
        openFileName.lpstrFilter = szFilter;
        break;
     case 6:
-       WIN32GUI_LoadUIString( IDS_SELECTROM, szTitle, MAX_DPATH);
-       WIN32GUI_LoadUIString( IDS_ROM, szFormat, MAX_DPATH);
+       WIN32GUI_LoadUIString(IDS_SELECTROM, szTitle, MAX_DPATH);
+       WIN32GUI_LoadUIString(IDS_ROM, szFormat, MAX_DPATH);
        sprintf(szFilter, "%s ", szFormat);
        memcpy(szFilter + strlen(szFilter), ROM_FORMAT_STRING, sizeof (ROM_FORMAT_STRING) + 1);
 
@@ -1129,7 +1129,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs
        break;
     case 11:
        WIN32GUI_LoadUIString(IDS_SELECTFLASH, szTitle, MAX_DPATH);
-       WIN32GUI_LoadUIString(IDS_FLASH, szFormat, MAX_DPATH );
+       WIN32GUI_LoadUIString(IDS_FLASH, szFormat, MAX_DPATH);
        sprintf(szFilter, "%s ", szFormat);
        memcpy(szFilter + strlen(szFilter), "(*.nvr)\0*.nvr\0", 15);
 
@@ -1159,9 +1159,11 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs
        break;
     case 14:
        strcpy (szTitle, "Select supported archive file");
+       sprintf (szFilter, "%s (%s)", "Archive", ARCHIVE_STRING);
+       strcpy (szFilter + strlen(szFilter) + 1, ARCHIVE_STRING);
 
        openFileName.lpstrFilter = NULL;
-       openFileName.lpstrDefExt = NULL;
+       openFileName.lpstrFilter = szFilter;
        openFileName.lpstrInitialDir = path_out;
        break;
     }
@@ -5539,8 +5541,7 @@ static void update_soundgui (HWND hDlg)
     char txt[20];
 
     bufsize = exact_log2 (workprefs.sound_maxbsiz / 1024);
-    sprintf (txt, "%d (%dms)",
-       bufsize, ((1000 * (workprefs.sound_maxbsiz >> 1) / workprefs.sound_freq) + 30) / 10 * 10);
+    sprintf (txt, "%d", bufsize);
     SetDlgItemText (hDlg, IDC_SOUNDBUFFERMEM, txt);
 
     SendDlgItemMessage( hDlg, IDC_SOUNDVOLUME, TBM_SETPOS, TRUE, 100 - workprefs.sound_volume);
@@ -9542,6 +9543,9 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int   currentpage)
                            list++;
                        }
                    }
+               } else if (currentpage == HARDDISK_ID) {
+                   add_filesys_config (&workprefs, -1, NULL, "", file, 0,
+                       0, 0, 0, 0, 0, NULL, 0, 0);
                } else {
                    strcpy (workprefs.df[drv], file);
                    disk_insert (drv, workprefs.df[drv]);
index 7237542ee7dbdb5e167c65668ccd2d270eba563a..6cc2a944c53f4884c9af4d78937926f5501ba389 100755 (executable)
@@ -1,4 +1,21 @@
 
+Beta 8:
+
+- plain executable mounted as a harddrive automatically creates
+  virtual s/startup-sequence (same as mounting executable as a floppy)
+- possible crash fix in SCSI emulation
+- X-Power Professional 500 cartridge support. (basically old version
+  of Action Cartridge Super IV)
+- Nordic Power cartridge "support" but only 2 bad non-working rom
+  dumps available (ROM chip fault, one data line stuck) And perhaps
+  suprisingly, perhaps not, Nordic Power is old version of X-Power :)
+- possible fix for audio problems when using audio.device (usually
+  when continuously starting and stopping short samples) in JIT mode.
+  (usual reason: too "fast" cpu/chipset access speed..)
+- removed sound latency value from GUI, it was wildly inaccurate
+
+WANTED: Nordic Power cartridge(s) (can be non-working)
+
 Beta 7:
 
 - rom scanner detects overdumped roms again
diff --git a/zfile.c b/zfile.c
index 3e9e708aa72e99241ca609ad8151a4f8fb0eed3a..5d9672c4b86361d4e3fcb20c1f026046c5a82391 100755 (executable)
--- a/zfile.c
+++ b/zfile.c
@@ -1166,7 +1166,10 @@ struct zvolume *zfile_fopen_archive(const char *filename)
     /* pointless but who cares? */
     if (!zv)
        zv = archive_directory_plain (zf);
-    zvolume_addtolist (zv);
+    if (zv)
+       zvolume_addtolist (zv);
+    else
+       zfile_fclose(zf);
     return zv;
 }
 
index e952012e1b711580264d6151fde0f45887f80215..5324bb5f61532a8571e1922b1b08249a0226aa12 100755 (executable)
@@ -784,11 +784,33 @@ void archive_access_close (void *handle, unsigned int id)
 }
 
 /* plain single file */
+
+static void addfile(struct zvolume *zv, const char *path, uae_u8 *data, int size)
+{
+    struct zarchive_info zai;
+    struct znode *zn;
+    struct zfile *z = zfile_fopen_empty (path, size);
+
+    zfile_fwrite(data, size, 1, z);
+    memset(&zai, 0, sizeof zai);
+    zai.name = path;
+    zai.size = size;
+    zn = zvolume_addfile_abs(zv, &zai);
+    if (zn)
+        zn->f = z;
+    else
+        zfile_fclose(z);
+}
+
+static uae_u8 exeheader[]={0x00,0x00,0x03,0xf3,0x00,0x00,0x00,0x00};
 struct zvolume *archive_directory_plain (struct zfile *z)
 {
     struct zvolume *zv;
+    struct znode *zn;
     struct zarchive_info zai;
     int i;
+    char *filename;
+    uae_u8 id[8];
 
     memset(&zai, 0, sizeof zai);
     zv = zvolume_alloc(z, ArchiveFormatPLAIN, NULL);
@@ -798,11 +820,21 @@ struct zvolume *archive_directory_plain (struct zfile *z)
            break;
        }
     }
-    zai.name = &z->name[i];
+    filename = &z->name[i];
+    memset(id, 0, sizeof id);
+    zai.name = filename;
     zfile_fseek(z, 0, SEEK_END);
     zai.size = zfile_ftell(z);
     zfile_fseek(z, 0, SEEK_SET);
-    zvolume_addfile_abs(zv, &zai);
+    zfile_fread(id, sizeof id, 1, z);
+    zfile_fseek(z, 0, SEEK_SET);
+    zn = zvolume_addfile_abs(zv, &zai);
+    if (!memcmp (id, exeheader, sizeof id)) {
+       uae_u8 *data = xmalloc(strlen(filename) + 2);
+       sprintf(data,"%s\n", filename);
+       addfile(zv, "s/startup-sequence", data, strlen(data));
+       xfree(data);
+    }
     return zv;
 }
 struct zfile *archive_access_plain (struct znode *zn)