From: Toni Wilen Date: Sat, 12 May 2007 10:16:14 +0000 (+0300) Subject: imported winuaesrc1420.zip X-Git-Tag: 2100~223 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9355dfc71c55b4d156610c363598082619b16d52;p=francis%2Fwinuae.git imported winuaesrc1420.zip --- diff --git a/a2091.c b/a2091.c index f84602dc..d44eba7f 100755 --- a/a2091.c +++ b/a2091.c @@ -11,6 +11,8 @@ #define A3000_DEBUG 0 #define WD33C93_DEBUG 1 +#define HAVE_DRIVE_ID -1 + #include "sysconfig.h" #include "sysdeps.h" @@ -184,11 +186,22 @@ static void set_status(uae_u8 status) INT2(); } +static void wd_cmd_trans_info(void) +{ +#if WD33C93_DEBUG > 0 + write_log("%s TRANS_INFO\n", WD33C93); +#endif +} + static void wd_cmd_sel(void) { #if WD33C93_DEBUG > 0 write_log("%s select, ID=%d\n", WD33C93, wdregs[WD_DESTINATION_ID]); #endif + if (wdregs[WD_DESTINATION_ID] == HAVE_DRIVE_ID) { + set_status(0x10 | 8 | 2); + return; + } set_status(0x42); } @@ -200,7 +213,7 @@ static void wd_cmd_abort(void) set_status(0x22); } -static void putwd(uae_u8 d) +void wdscsi_put(uae_u8 d) { #if WD33C93_DEBUG > 1 write_log("%s REG %02.2X (%d) = %02.2X (%d)\n", WD33C93, sasr, sasr, d, d); @@ -217,11 +230,27 @@ static void putwd(uae_u8 d) case WD_CMD_SEL: wd_cmd_sel(); break; + case WD_CMD_TRANS_INFO: + wd_cmd_trans_info(); + break; + default: + write_log("%s unimplemented/unknown command %02.X\n", WD33C93, d); + break; } } incsasr(); } -static uae_u8 getwd(void) + +void wdscsi_sasr(uae_u8 b) +{ + sasr = b; +} +uae_u8 wdscsi_getauxstatus(void) +{ + return auxstatus; +} + +uae_u8 wdscsi_get(void) { uae_u8 v; @@ -240,8 +269,12 @@ static uae_u32 dmac_bget2 (uaecptr addr) if (addr < 0x40) return dmacmemory[addr]; - if (addr >= ROM_OFFSET) - return rom[addr & ROM_MASK]; + if (addr >= ROM_OFFSET) { + //write_log("%08x %08x\n", addr, M68K_GETPC); + if (rom) + return rom[addr & ROM_MASK]; + return 0; + } switch (addr) { @@ -254,10 +287,10 @@ static uae_u32 dmac_bget2 (uaecptr addr) v = dmac_cntr; break; case 0x91: - v = auxstatus; + v = wdscsi_getauxstatus(); break; case 0x93: - v = getwd(); + v = wdscsi_get(); break; /* XT IO */ case 0xa1: @@ -328,10 +361,10 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b) dmac_dawr |= b << 0; break; case 0x91: - sasr = b; + wdscsi_sasr(b); break; case 0x93: - putwd(b); + wdscsi_put(b); break; case 0xe0: case 0xe1: @@ -568,7 +601,7 @@ static void mbdmac_write (uae_u32 addr, uae_u32 val) sasr = val; break; case 0x43: - putwd(val); + wdscsi_put(val); break; } } @@ -633,7 +666,7 @@ static uae_u32 mbdmac_read (uae_u32 addr) v = sasr; break; case 0x43: - v = getwd(); + v = wdscsi_get(); break; } #if A3000_DEBUG > 0 @@ -735,18 +768,16 @@ void a2091_init (void) ew (0x00, 0xc0 | 0x01 | 0x10); /* A590/A2091 hardware id */ ew (0x04, 0x03); - ew (0x08, 0x40); /* commodore's manufacturer id */ ew (0x10, 0x02); ew (0x14, 0x02); /* rom vector */ ew (0x28, ROM_VECTOR >> 8); ew (0x2c, ROM_VECTOR); - /* KS autoconfig handles the rest */ - map_banks (&dmaca2091_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000); if (!rom) { fetch_datapath (path, sizeof path); strcat (path, "roms\\a2091_rev7.rom"); + //strcat (path, "roms\\gururom.rom"); write_log("A590/A2091 ROM path: '%s'\n", path); z = zfile_fopen(path, "rb"); if (z) { @@ -755,4 +786,5 @@ void a2091_init (void) zfile_fclose(z); } } + map_banks (&dmaca2091_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000); } diff --git a/cdtv.c b/cdtv.c index 0bdcb8ef..32611217 100755 --- a/cdtv.c +++ b/cdtv.c @@ -26,6 +26,7 @@ #include "gui.h" #include "zfile.h" #include "threaddep/thread.h" +#include "a2091.h" #define AUDIO_STATUS_NOT_SUPPORTED 0x00 #define AUDIO_STATUS_IN_PROGRESS 0x11 @@ -525,7 +526,51 @@ static void cdrom_command_thread(uae_u8 b) #define ISTR_INT_P (1 << 4) #define ISTR_E_INT (1 << 5) -extern uae_u8 *ioctl_command_rawread (int unitnum, int sector); +static uae_u8 *read_raw(int sector, int size) +{ + int osector = sector; + static struct zfile *f; + static int track; + int trackcnt; + char fname[MAX_DPATH]; + static uae_u8 buf[4096]; + uae_u32 prevlsn = 0; + uae_u8 *s = cdrom_toc + 4; + + memset(buf, 0, sizeof buf); + trackcnt = 0; + for (;;) { + uae_u32 msf = (s[8] << 16) | (s[9] << 8) | s[10]; + uae_u32 lsn = msf2lsn (msf); + if (s[3] >= 0xa0) { + s += 11; + continue; + } + if (sector < lsn - prevlsn) + break; + trackcnt++; + sector -= lsn - prevlsn; + prevlsn = lsn; + s += 11; + } + if (track != trackcnt) { + sprintf(fname, "track%d.bin", trackcnt); + zfile_fclose(f); + f = zfile_fopen(fname, "rb"); + if (!f) + write_log("failed to open '%s'\n", fname); + else + write_log("opened '%s'\n", fname); + track = trackcnt; + } + if (f) { + write_log("%dx%d=%d\n", sector, size, sector * size); + zfile_fseek (f, sector * size, SEEK_SET); + zfile_fread (buf, size, 1, f); + return buf; + } + return sys_command_cd_rawread (DF_IOCTL, unitnum, osector, size); +} static void dma_do_thread(void) { @@ -538,7 +583,7 @@ static void dma_do_thread(void) if (!p || readsector != (cdrom_offset / cdtv_sectorsize)) { readsector = cdrom_offset / cdtv_sectorsize; if (cdtv_sectorsize == 2336) - p = sys_command_cd_rawread (DF_IOCTL, unitnum, readsector, cdtv_sectorsize); + p = read_raw (readsector, cdtv_sectorsize); else p = sys_command_cd_read (DF_IOCTL, unitnum, readsector); if (!p) { @@ -873,6 +918,14 @@ static uae_u32 dmac_bget2 (uaecptr addr) case 0x43: v = dmac_cntr; break; + case 0x91: + if (currprefs.cs_cdtvscsi) + v = wdscsi_getauxstatus(); + break; + case 0x93: + if (currprefs.cs_cdtvscsi) + v = wdscsi_get(); + break; case 0xa1: if (cdrom_command_cnt_out < 0) { cd_error = 1; @@ -1001,6 +1054,14 @@ static void dmac_bput2 (uaecptr addr, uae_u32 b) dmac_dawr &= 0xff00; dmac_dawr |= b << 0; break; + case 0x91: + if (currprefs.cs_cdtvscsi) + wdscsi_sasr (b); + break; + case 0x93: + if (currprefs.cs_cdtvscsi) + wdscsi_put (b); + break; case 0xa1: cdrom_command(b); break; diff --git a/cfgfile.c b/cfgfile.c index d285a283..4b51e2f0 100755 --- a/cfgfile.c +++ b/cfgfile.c @@ -514,7 +514,9 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write (f, "a1000ram=%s\n", p->cs_a1000ram ? "true" : "false"); cfgfile_write (f, "fatgary=%d\n", p->cs_fatgaryrev); cfgfile_write (f, "ramsey=%d\n", p->cs_ramseyrev); + cfgfile_write (f, "scsi_cdtv=%s\n", p->cs_cdtvscsi ? "true" : "false"); cfgfile_write (f, "scsi_a2091=%s\n", p->cs_a2091 ? "true" : "false"); + cfgfile_write (f, "scsi_a4091=%s\n", p->cs_a4091 ? "true" : "false"); cfgfile_write (f, "scsi_a3000=%s\n", p->cs_mbdmac ? "true" : "false"); cfgfile_write (f, "fastmem_size=%d\n", p->fastmem_size / 0x100000); @@ -1161,6 +1163,8 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu || cfgfile_yesno (option, value, "cdtvcd", &p->cs_cdtvcd) || cfgfile_yesno (option, value, "cdtvram", &p->cs_cdtvram) || cfgfile_yesno (option, value, "a1000ram", &p->cs_a1000ram) + || cfgfile_yesno (option, value, "scsi_cdtv", &p->cs_cdtvscsi) + || cfgfile_yesno (option, value, "scsi_a4091", &p->cs_a4091) || cfgfile_yesno (option, value, "scsi_a2091", &p->cs_a2091) || cfgfile_yesno (option, value, "scsi_a3000", &p->cs_mbdmac) @@ -2708,6 +2712,7 @@ void default_prefs (struct uae_prefs *p, int type) p->cs_deniserev = -1; p->cs_mbdmac = 0; p->cs_a2091 = 0; + p->cs_a4091 = 0; p->cs_cd32c2p = p->cs_cd32cd = p->cs_cd32nvram = 0; p->cs_cdtvcd = p->cs_cdtvram = p->cs_cdtvcard = 0; p->cs_pcmcia = 0; @@ -2831,6 +2836,7 @@ static void buildin_default_prefs (struct uae_prefs *p) p->tod_hack = 0; p->maprom = 0; p->cachesize = 0; + p->socket_emu = 0; p->chipmem_size = 0x00080000; p->bogomem_size = 0x00080000; @@ -2848,6 +2854,7 @@ static void buildin_default_prefs (struct uae_prefs *p) p->cs_deniserev = -1; p->cs_mbdmac = 0; p->cs_a2091 = 0; + p->cs_a4091 = 0; p->cs_cd32c2p = p->cs_cd32cd = p->cs_cd32nvram = 0; p->cs_cdtvcd = p->cs_cdtvram = p->cs_cdtvcard = 0; p->cs_ide = 0; @@ -3294,7 +3301,7 @@ int build_in_chipset_prefs (struct uae_prefs *p) p->cs_fatgaryrev = 0; p->cs_ramseyrev = 0x0f; p->cs_ide = 2; - p->cs_mbdmac = 2; + p->cs_mbdmac = 0; break; case 13: // A4000T p->cs_rtc = 2; diff --git a/cia.c b/cia.c index fbf954cc..3276640c 100755 --- a/cia.c +++ b/cia.c @@ -1067,7 +1067,7 @@ static void cia_wait_post (void) do_cycles (2 * CYCLE_UNIT / 2); } -uae_u32 REGPARAM2 cia_bget (uaecptr addr) +static uae_u32 REGPARAM2 cia_bget (uaecptr addr) { int r = (addr & 0xf00) >> 8; uae_u8 v; @@ -1101,7 +1101,7 @@ uae_u32 REGPARAM2 cia_bget (uaecptr addr) return v; } -uae_u32 REGPARAM2 cia_wget (uaecptr addr) +static uae_u32 REGPARAM2 cia_wget (uaecptr addr) { int r = (addr & 0xf00) >> 8; uae_u16 v; @@ -1136,7 +1136,7 @@ uae_u32 REGPARAM2 cia_wget (uaecptr addr) return v; } -uae_u32 REGPARAM2 cia_lget (uaecptr addr) +static uae_u32 REGPARAM2 cia_lget (uaecptr addr) { uae_u32 v; #ifdef JIT @@ -1160,7 +1160,7 @@ static uae_u32 REGPARAM2 cia_lgeti (uaecptr addr) return cia_lget(addr); } -void REGPARAM2 cia_bput (uaecptr addr, uae_u32 value) +static void REGPARAM2 cia_bput (uaecptr addr, uae_u32 value) { int r = (addr & 0xf00) >> 8; @@ -1179,9 +1179,10 @@ void REGPARAM2 cia_bput (uaecptr addr, uae_u32 value) cia_wait_post (); } -void REGPARAM2 cia_wput (uaecptr addr, uae_u32 value) +static void REGPARAM2 cia_wput (uaecptr addr, uae_u32 value) { int r = (addr & 0xf00) >> 8; + #ifdef JIT special_mem |= S_WRITE; #endif @@ -1197,7 +1198,7 @@ void REGPARAM2 cia_wput (uaecptr addr, uae_u32 value) cia_wait_post (); } -void REGPARAM2 cia_lput (uaecptr addr, uae_u32 value) +static void REGPARAM2 cia_lput (uaecptr addr, uae_u32 value) { #ifdef JIT special_mem |= S_WRITE; @@ -1243,17 +1244,17 @@ void rtc_hardreset(void) } } -uae_u32 REGPARAM2 clock_lget (uaecptr addr) +static uae_u32 REGPARAM2 clock_lget (uaecptr addr) { return (clock_wget (addr) << 16) | clock_wget (addr + 2); } -uae_u32 REGPARAM2 clock_wget (uaecptr addr) +static uae_u32 REGPARAM2 clock_wget (uaecptr addr) { return (clock_bget (addr) << 8) | clock_bget (addr + 1); } -uae_u32 REGPARAM2 clock_bget (uaecptr addr) +static uae_u32 REGPARAM2 clock_bget (uaecptr addr) { time_t t = time(0); struct tm *ct; @@ -1323,19 +1324,19 @@ uae_u32 REGPARAM2 clock_bget (uaecptr addr) return 0; } -void REGPARAM2 clock_lput (uaecptr addr, uae_u32 value) +static void REGPARAM2 clock_lput (uaecptr addr, uae_u32 value) { clock_wput (addr, value >> 16); clock_wput (addr + 2, value); } -void REGPARAM2 clock_wput (uaecptr addr, uae_u32 value) +static void REGPARAM2 clock_wput (uaecptr addr, uae_u32 value) { clock_bput (addr, value >> 8); clock_bput (addr + 1, value); } -void REGPARAM2 clock_bput (uaecptr addr, uae_u32 value) +static void REGPARAM2 clock_bput (uaecptr addr, uae_u32 value) { #ifdef JIT special_mem |= S_WRITE; diff --git a/custom.c b/custom.c index 9ee2b16d..c23f725f 100755 --- a/custom.c +++ b/custom.c @@ -59,6 +59,7 @@ #include "gayle.h" #include "gfxfilter.h" #include "a2091.h" +#include "ncr_scsi.h" STATIC_INLINE int nocustom(void) { @@ -4630,6 +4631,9 @@ void customreset (void) #ifdef A2091 a2091_reset (); #endif +#ifdef NCR + ncr_reset (); +#endif #ifdef JIT compemu_reset (); #endif diff --git a/expansion.c b/expansion.c index 926170eb..8dc7b283 100755 --- a/expansion.c +++ b/expansion.c @@ -23,6 +23,7 @@ #include "catweasel.h" #include "cdtv.h" #include "a2091.h" +#include "ncr_scsi.h" #include "debug.h" #define MAX_EXPANSION_BOARDS 8 @@ -1095,6 +1096,10 @@ static void expamem_init_a2091 (void) { a2091_init(); } +static void expamem_init_a4091 (void) +{ + ncr_init(); +} void expamem_reset (void) { @@ -1133,6 +1138,12 @@ void expamem_reset (void) card_map[cardno++] = NULL; } #endif +#ifdef NCR + if (currprefs.cs_a4091) { + card_init[cardno] = expamem_init_a4091; + card_map[cardno++] = NULL; + } +#endif #ifdef A2091 if (currprefs.cs_a2091) { card_init[cardno] = expamem_init_a2091; diff --git a/gayle.c b/gayle.c index f4a0dff7..8ec62d28 100755 --- a/gayle.c +++ b/gayle.c @@ -686,7 +686,7 @@ addrbank gayle_bank = { dummy_lgeti, dummy_wgeti, ABFLAG_IO }; -static int isa4000(uaecptr addr) +static int isa4000t(uaecptr addr) { if (currprefs.cs_mbdmac != 2) return 0; @@ -712,9 +712,9 @@ static uae_u32 REGPARAM2 gayle_wget (uaecptr addr) #ifdef JIT special_mem |= S_READ; #endif - if (isa4000(addr)) { + if (isa4000t(addr)) { addr -= NCR_OFFSET; - return (ncr_bget(addr) << 8) | ncr_bget(addr + 1); + return (ncr_bget2(addr) << 8) | ncr_bget2(addr + 1); } ide_reg = get_ide_reg(addr); if (ide_reg == IDE_DATA) @@ -728,9 +728,9 @@ static uae_u32 REGPARAM2 gayle_bget (uaecptr addr) #ifdef JIT special_mem |= S_READ; #endif - if (isa4000(addr)) { + if (isa4000t(addr)) { addr -= NCR_OFFSET; - return ncr_bget(addr); + return ncr_bget2(addr); } return gayle_read (addr); } @@ -749,10 +749,10 @@ static void REGPARAM2 gayle_wput (uaecptr addr, uae_u32 value) #ifdef JIT special_mem |= S_WRITE; #endif - if (isa4000(addr)) { + if (isa4000t(addr)) { addr -= NCR_OFFSET; - ncr_bput(addr, value >> 8); - ncr_bput(addr + 1, value); + ncr_bput2(addr, value >> 8); + ncr_bput2(addr + 1, value); return; } ide_reg = get_ide_reg(addr); @@ -769,9 +769,9 @@ static void REGPARAM2 gayle_bput (uaecptr addr, uae_u32 value) #ifdef JIT special_mem |= S_WRITE; #endif - if (isa4000(addr)) { + if (isa4000t(addr)) { addr -= NCR_OFFSET; - ncr_bput(addr, value); + ncr_bput2(addr, value); return; } gayle_write (addr, value); @@ -1342,6 +1342,7 @@ static void initide(void) void gayle_reset (int hardreset) { + static char bankname[100]; initide(); if (hardreset) { ramsey_config = 0; @@ -1349,6 +1350,12 @@ void gayle_reset (int hardreset) gary_timeout = 0; gary_toenb = 0; } + strcpy(bankname, "Gayle (low)"); + if (currprefs.cs_ide == 2) + strcpy(bankname, "A4000 IDE"); + if (currprefs.cs_mbdmac == 2) + strcat(bankname," + NCR53C710 SCSI"); + gayle_bank.name = bankname; } uae_u8 *restore_gayle(uae_u8 *src) diff --git a/include/a2091.h b/include/a2091.h index 51358fc3..cddf3b7c 100755 --- a/include/a2091.h +++ b/include/a2091.h @@ -8,4 +8,8 @@ extern void a2091_reset (void); extern void rethink_a2091 (void); +extern void wdscsi_put(uae_u8); +extern uae_u8 wdscsi_get(void); +extern uae_u8 wdscsi_getauxstatus(void); +extern void wdscsi_sasr(uae_u8); #endif diff --git a/include/ncr_scsi.h b/include/ncr_scsi.h index 714d6a6d..b4e15a25 100755 --- a/include/ncr_scsi.h +++ b/include/ncr_scsi.h @@ -1,2 +1,6 @@ -void ncr_bput(uacptr, uae_u32); -uae_u32 ncr_bget(uaecptr); +void ncr_bput2(uacptr, uae_u32); +uae_u32 ncr_bget2(uaecptr); + +extern void ncr_init(void); +extern void ncr_free(void); +extern void ncr_reset(void); diff --git a/include/options.h b/include/options.h index ff5de731..78703607 100755 --- a/include/options.h +++ b/include/options.h @@ -207,7 +207,8 @@ struct uae_prefs { int cs_agnusrev; int cs_deniserev; int cs_mbdmac; - int cs_a2091; + int cs_cdtvscsi; + int cs_a2091, cs_a4091; int cs_df0idhw; char df[4][MAX_DPATH]; diff --git a/inputdevice.c b/inputdevice.c index 6bbf045b..08a69f3b 100755 --- a/inputdevice.c +++ b/inputdevice.c @@ -1228,6 +1228,12 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor) uae_u16 p5dir = 0x0200 << (i * 4); /* output enable P5 */ uae_u16 p5dat = 0x0100 << (i * 4); /* data P5 */ + if (currprefs.cs_cdtvcd) { + /* CDTV P9 is not floating */ + if (!(potgo_value & p9dir)) + potgor |= p9dat; + } + if (mouse_port[i]) { /* official Commodore mouse has pull-up resistors in button lines * NOTE: 3rd party mice may not have pullups! */ @@ -1236,6 +1242,7 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor) if (!(potgo_value & p9dir)) potgor |= p9dat; } + if (potgo_hsync < 0) { /* first 10 or so lines after potgo has started * forces input-lines to zero diff --git a/main.c b/main.c index be6832ca..545c666b 100755 --- a/main.c +++ b/main.c @@ -43,6 +43,7 @@ #include "filesys.h" #include "parallel.h" #include "a2091.h" +#include "ncr_scsi.h" #ifdef USE_SDL #include "SDL.h" @@ -597,6 +598,9 @@ void do_leave_program (void) #ifdef A2091 a2091_free (); #endif +#ifdef NCR + ncr_free (); +#endif #ifdef CD32 akiko_free (); #endif diff --git a/memory.c b/memory.c index d6fbabcc..4f7fd84a 100755 --- a/memory.c +++ b/memory.c @@ -2283,11 +2283,12 @@ void memory_reset (void) } if (rd->cloanto) cloanto_rom = 1; - if ((rd->cpu & 4) && currprefs.cs_compatible) { /* A4000 ROM = need some mb resources */ + if ((rd->cpu & 4) && currprefs.cs_compatible) { /* A4000 ROM = need ramsey, gary and ide */ if (currprefs.cs_ramseyrev < 0) changed_prefs.cs_ramseyrev = currprefs.cs_ramseyrev = 0x0f; changed_prefs.cs_fatgaryrev = currprefs.cs_fatgaryrev = 0; - changed_prefs.cs_mbdmac = currprefs.cs_mbdmac = 2; + if (currprefs.cs_ide != 2) + changed_prefs.cs_ide = currprefs.cs_ide = -1; } } } @@ -2306,7 +2307,7 @@ void memory_reset (void) bnk = allocated_chipmem >> 16; if (bnk < 0x20 + (currprefs.fastmem_size >> 16)) bnk = 0x20 + (currprefs.fastmem_size >> 16); - map_banks (&dummy_bank, bnk, (currprefs.chipset_mask & CSMASK_AGA ? 0xBF : 0xA0) - bnk, 0); + map_banks (&dummy_bank, bnk, (((currprefs.chipset_mask & CSMASK_AGA) || currprefs.cs_ide == 1) ? 0xBF : 0xA0) - bnk, 0); if (currprefs.chipset_mask & CSMASK_AGA) map_banks (&dummy_bank, 0xc0, 0xd8 - 0xc0, 0); @@ -2319,12 +2320,17 @@ void memory_reset (void) map_banks (&bogomem_bank, 0xC0, t, 0); } if (currprefs.cs_ide) { - map_banks (&gayle_bank, 0xD8, 6, 0); if(currprefs.cs_ide == 1) { + map_banks (&gayle_bank, 0xD8, 6, 0); map_banks (&gayle2_bank, 0xDD, 2, 0); // map_banks (&gayle_attr_bank, 0xA0, 8, 0); only if PCMCIA card inserted */ - } else if (currprefs.cs_ide == 2) { - map_banks (&gayle_bank, 0xDD, 2, 0); + } + if (currprefs.cs_ide == 2 || currprefs.cs_mbdmac == 2) { + map_banks (&gayle_bank, 0xDD, 1, 0); + } + if (currprefs.cs_ide < 0) { + map_banks (&gayle_bank, 0xD8, 6, 0); + map_banks (&gayle_bank, 0xDD, 1, 0); } } if (currprefs.cs_rtc) diff --git a/ncr_scsi.c b/ncr_scsi.c index 57c34108..f319cec0 100755 --- a/ncr_scsi.c +++ b/ncr_scsi.c @@ -12,34 +12,356 @@ #include "sysdeps.h" #include "options.h" - +#include "uae.h" #include "memory.h" #include "custom.h" #include "newcpu.h" #include "ncr_scsi.h" +#include "zfile.h" -#define NCR "NCR53C710" +#define NCRNAME "NCR53C710" #define NCR_REGS 0x40 +#define ROM_VECTOR 0x8080 +#define ROM_OFFSET 0x8000 +#define ROM_SIZE 32768 +#define ROM_MASK (ROM_SIZE - 1) +#define BOARD_SIZE (65536 * 2) + +static uae_u8 *rom; +static int configured; +static uae_u8 acmemory[100]; + static uae_u8 ncrregs[NCR_REGS]; -void ncr_bput(uaecptr addr, uae_u32 val) +struct ncrscsi { + char *name; + int be, le; +}; + +static struct ncrscsi regsinfo[] = +{ + "SCNTL0", 0, 3, + "SCNTL1", 1, 2, + "SDID", 2, 1, + "SIEN", 3, 0, + "SCID", 4, 7, + "SXFER", 5, 6, + "SODL", 6, 5, + "SOCL", 7, 4, + "SFBR", 8, 11, + "SIDL", 9, 10, + "SBDL", 10, -1, + "SBCL", 11, 8, + "DSTAT", 12, 15, + "SSTAT0", 13, 14, + "SSTAT1", 14, 13, + "SSTAT2", 15, 12, + "DSA0", 16, 19, + "DSA1", 17, 18, + "DSA2", 18, 17, + "DSA3", 19, 16, + "CTEST0", 20, 23, + "CTEST1", 21, 22, + "CTEST2", 22, 21, + "CTEST3", 23, 20, + "CTEST4", 24, 27, + "CTEST5", 25, 26, + "CTEST6", 26, 25, + "CTEST7", 27, 24, + "TEMP0", 28, 31, + "TEMP1", 29, 30, + "TEMP2", 30, 29, + "TEMP3", 31, 28, + "DFIFO", 32, 35, + "ISTAT", 33, 34, + "CTEST8", 34, 33, + "LCRC", 35, 32, + "DBC0", 36, 39, + "DBC1", 37, 38, + "DBC2", 38, 37, + "DCMD", 39, 36, + "DNAD0", 40, 43, + "DNAD1", 41, 42, + "DNAD2", 42, 41, + "DNAD3", 43, 40, + "DSP0", 44, 47, + "DSP1", 45, 46, + "DSP2", 46, 45, + "DSP3", 47, 44, + "DSPS0", 48, 51, + "DSPS1", 49, 50, + "DSPS2", 50, 49, + "DSPS3", 51, 48, + "SCRATCH0", 52, 55, + "SCRATCH1", 53, 54, + "SCRATCH2", 54, 53, + "SCRATCH3", 55, 52, + "DMODE", 56, 59, + "DIEN", 57, 58, + "DWT", 58, 57, + "DCNTL", 59, 56, + "ADDER0", 60, 63, + "ADDER1", 61, 62, + "ADDER2", 62, 61, + "ADDER3", 63, 60, + NULL +}; + +static char *regname(uaecptr addr) +{ + int i; + + for (i = 0; regsinfo[i].name; i++) { + if (regsinfo[i].le == addr) + return regsinfo[i].name; + } + return "?"; +} + +static uae_u8 read_rom(uaecptr addr) +{ + int off; + uae_u8 v; + + addr -= 0x8080; + off = (addr & (BOARD_SIZE - 1)) / 4; + off += 0x80; + + if ((addr & 2)) + v = (rom[off] & 0x0f) << 4; + else + v = (rom[off] & 0xf0); + write_log("%08.8X:%04.4X = %02.2X PC=%08X\n", addr, off, v, M68K_GETPC); + return v; +} + +void ncr_bput2(uaecptr addr, uae_u32 val) { addr &= 0xffff; if (addr >= NCR_REGS) return; - write_log("%s write %04.4X = %02.2X\n", NCR, addr, val & 0xff); + switch (addr) + { + case 0x02: // SCNTL1 + break; + case 0x22 : // ISTAT + break; + } + write_log("%s write %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), val & 0xff, M68K_GETPC); ncrregs[addr] = val; } -uae_u32 ncr_bget(uaecptr addr) +uae_u32 ncr_bget2(uaecptr addr) { uae_u32 v; addr &= 0xffff; + if (rom && addr >= ROM_OFFSET) + return read_rom(addr); if (addr >= NCR_REGS) return 0; v = ncrregs[addr]; - write_log("%s read %04.4X\n", NCR, addr); + switch (addr) + { + case 0x22: // ISTAT + if (ncrregs[0x02] & 0x08) + v |= 0x02; // SIP + if (ncrregs[0x07]) // have ID? + v |= 0x08; // CONNECTED + ncrregs[addr] &= 0x40; + break; + case 0x21: // CTEST8 + v &= 0x0f; + v |= 0x20; + break; + } + + write_log("%s read %04.4X (%s) = %02.2X PC=%08.8X\n", NCRNAME, addr, regname(addr), v, M68K_GETPC); + return v; +} + +static addrbank ncr_bank; + +static uae_u32 REGPARAM2 ncr_lget (uaecptr addr) +{ + uae_u32 v; +#ifdef JIT + special_mem |= S_READ; +#endif + addr &= 65535; + v = (ncr_bget2 (addr) << 24) | (ncr_bget2 (addr + 1) << 16) | + (ncr_bget2 (addr + 2) << 8) | (ncr_bget2 (addr + 3)); +#ifdef NCR_DEBUG + if (addr >= 0x40 && addr < ROM_OFFSET) + write_log ("ncr_lget %08.8X=%08.8X PC=%08.8X\n", addr, v, M68K_GETPC); +#endif return v; } + +static uae_u32 REGPARAM2 ncr_wget (uaecptr addr) +{ + uae_u32 v; +#ifdef JIT + special_mem |= S_READ; +#endif + addr &= 65535; + v = (ncr_bget2 (addr) << 8) | ncr_bget2 (addr + 1); +#if NCR_DEBUG > 0 + if (addr >= 0x40 && addr < ROM_OFFSET) + write_log ("ncr_wget %08.8X=%04.4X PC=%08.8X\n", addr, v, M68K_GETPC); +#endif + return v; +} + +static uae_u32 REGPARAM2 ncr_bget (uaecptr addr) +{ + uae_u32 v; +#ifdef JIT + special_mem |= S_READ; +#endif + addr &= 65535; + if (!configured) { + if (addr >= sizeof acmemory) + return 0; + return acmemory[addr]; + } + v = ncr_bget2 (addr); + return v; +} + +static void REGPARAM2 ncr_lput (uaecptr addr, uae_u32 l) +{ +#ifdef JIT + special_mem |= S_WRITE; +#endif + addr &= 65535; +#if NCR_DEBUG > 0 + if (addr >= 0x40 && addr < ROM_OFFSET) + write_log ("ncr_lput %08.8X=%08.8X PC=%08.8X\n", addr, l, M68K_GETPC); +#endif + ncr_bput2 (addr, l >> 24); + ncr_bput2 (addr + 1, l >> 16); + ncr_bput2 (addr + 2, l >> 8); + ncr_bput2 (addr + 3, l); +} + +static void REGPARAM2 ncr_wput (uaecptr addr, uae_u32 w) +{ +#ifdef JIT + special_mem |= S_WRITE; +#endif + addr &= 65535; +#if NCR_DEBUG > 0 + if (addr >= 0x40 && addr < ROM_OFFSET) + write_log ("ncr_wput %04.4X=%04.4X PC=%08.8X\n", addr, w & 65535, M68K_GETPC); +#endif + ncr_bput2 (addr, w >> 8); + ncr_bput2 (addr + 1, w); +} + +static void REGPARAM2 ncr_bput (uaecptr addr, uae_u32 b) +{ +#ifdef JIT + special_mem |= S_WRITE; +#endif + b &= 0xff; + addr &= 65535; + if (addr == 0x48) { + map_banks (&ncr_bank, b, BOARD_SIZE >> 16, BOARD_SIZE); + write_log ("A4091 autoconfigured at %02.2X0000\n", b); + configured = 1; + expamem_next(); + return; + } + if (addr == 0x4c) { + write_log ("A4091 DMAC AUTOCONFIG SHUT-UP!\n"); + configured = 1; + expamem_next(); + return; + } + if (!configured) + return; + ncr_bput2 (addr, b); +} + +static uae_u32 REGPARAM2 ncr_wgeti (uaecptr addr) +{ + uae_u32 v = 0xffff; +#ifdef JIT + special_mem |= S_READ; +#endif + addr &= 65535; + if (addr >= ROM_OFFSET) + v = (rom[addr & ROM_MASK] << 8) | rom[(addr + 1) & ROM_MASK]; + return v; +} +static uae_u32 REGPARAM2 ncr_lgeti (uaecptr addr) +{ + uae_u32 v = 0xffff; +#ifdef JIT + special_mem |= S_READ; +#endif + addr &= 65535; + v = (ncr_wgeti(addr) << 16) | ncr_wgeti(addr + 2); + return v; +} + +static addrbank ncr_bank = { + ncr_lget, ncr_wget, ncr_bget, + ncr_lput, ncr_wput, ncr_bput, + default_xlate, default_check, NULL, "A4091", + ncr_lgeti, ncr_wgeti, ABFLAG_IO +}; + +static void ew (int addr, uae_u32 value) +{ + addr &= 0xffff; + if (addr == 00 || addr == 02 || addr == 0x40 || addr == 0x42) { + acmemory[addr] = (value & 0xf0); + acmemory[addr + 2] = (value & 0x0f) << 4; + } else { + acmemory[addr] = ~(value & 0xf0); + acmemory[addr + 2] = ~((value & 0x0f) << 4); + } +} + +void ncr_free (void) +{ +} + +void ncr_reset (void) +{ + configured = 0; +} + +void ncr_init (void) +{ + struct zfile *z; + char path[MAX_DPATH]; + + configured = 0; + memset (acmemory, 0xff, 100); + ew (0x00, 0xc0 | 0x02 | 0x10); + /* A4091 hardware id */ + ew (0x04, 0x54); + /* commodore's manufacturer id */ + ew (0x10, 0x02); + ew (0x14, 0x02); + /* rom vector */ + ew (0x28, ROM_VECTOR >> 8); + ew (0x2c, ROM_VECTOR); + if (!rom) { + fetch_datapath (path, sizeof path); + strcat (path, "roms\\a4091.rom"); + write_log("A4091 ROM path: '%s'\n", path); + z = zfile_fopen(path, "rb"); + if (z) { + rom = xmalloc (ROM_SIZE); + zfile_fread (rom, ROM_SIZE, 1, z); + zfile_fclose(z); + } + } + map_banks (&ncr_bank, 0xe80000 >> 16, 0x10000 >> 16, 0x10000); +} + diff --git a/od-win32/WinUAE_Install.nsi b/od-win32/WinUAE_Install.nsi index ee2afd7a..93374d98 100755 --- a/od-win32/WinUAE_Install.nsi +++ b/od-win32/WinUAE_Install.nsi @@ -1,5 +1,5 @@ !define PRODUCT_NAME "WinUAE" -!define PRODUCT_VERSION "1.4.1" +!define PRODUCT_VERSION "1.4.2" !define PRODUCT_PUBLISHER "Toni Wilen" !define PRODUCT_WEB_SITE "http://www.winuae.net/" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\winuae.exe" diff --git a/od-win32/debug_win32.c b/od-win32/debug_win32.c index bec95691..6ec71e7f 100755 --- a/od-win32/debug_win32.c +++ b/od-win32/debug_win32.c @@ -813,7 +813,7 @@ static LRESULT CALLBACK ListboxProc(HWND hWnd, UINT message, WPARAM wParam, LPAR WNDPROC oldproc; HWND hinput, hsbar; RECT rc, r; - int i, itemheight, count, height, bottom, width, id; + int i, itemheight, count, height, bottom, width, id, top; PAINTSTRUCT ps; DRAWITEMSTRUCT dis; HFONT oldfont, font; @@ -851,8 +851,9 @@ static LRESULT CALLBACK ListboxProc(HWND hWnd, UINT message, WPARAM wParam, LPAR dis.itemState = 0; dis.hwndItem = hWnd; dis.hDC = compdc; - for (i = 0; i < count && rc.top < height; i++) { - dis.itemID = i; + top = SendMessage(hWnd, LB_GETTOPINDEX, 0, 0); + for (i = top; i < count && rc.top < height; i++) { + dis.itemID = i; dis.rcItem = rc; dis.itemData = SendMessage(hWnd, LB_GETITEMDATA, i, 0); SendMessage(hDbgWnd, WM_DRAWITEM, id, (LPARAM)&dis); diff --git a/od-win32/picasso96_win.c b/od-win32/picasso96_win.c index 76c724e5..05b6a71c 100755 --- a/od-win32/picasso96_win.c +++ b/od-win32/picasso96_win.c @@ -588,8 +588,8 @@ static void do_fillrect(uae_u8 *src, unsigned int x, unsigned int y, int psiz = GetBytesPerPixel (picasso_vidinfo.rgbformat); if (picasso96_state.RGBFormat != RGBFB_CHUNKY) { - write_log ("ERROR - do_fillrect() calling abort 1!\n"); - abort (); + write_log ("ERROR - do_fillrect() failure1 (%d)\n", picasso96_state.RGBFormat); + goto out; } while (height-- > 0) @@ -606,8 +606,8 @@ static void do_fillrect(uae_u8 *src, unsigned int x, unsigned int y, *((uae_u32 *)dst + i) = picasso_vidinfo.clut[src[i]]; break; default: - write_log ("ERROR - do_fillrect() calling abort 2!\n"); - abort (); + write_log ("ERROR - do_fillrect() failure2 (%d), psize\n"); + goto out; break; } dst += picasso_vidinfo.rowbytes; diff --git a/od-win32/resources/resource b/od-win32/resources/resource index ef81d129..ece2489e 100755 --- a/od-win32/resources/resource +++ b/od-win32/resources/resource @@ -730,11 +730,13 @@ #define IDC_AVIOUTPUT_OPTIONS 1649 #define IDC_STATE_RATE_TEXT 1649 #define IDC_DISKLISTREMOVE 1649 +#define IDC_DF0QENABLE 1649 #define IDC_SOUNDCARD 1650 #define IDC_CS_SOUND0 1650 #define IDC_UPBM 1650 #define IDC_DISKLISTREMOVE2 1650 #define IDC_DISKLISTINSERT 1650 +#define IDC_DF0QENABLE2 1650 #define IDC_SOUNDCARDLIST 1651 #define IDC_CS_SOUND1 1651 #define IDC_SOUNDFREQ 1652 @@ -862,7 +864,6 @@ #define IDC_CS_AGNUSREV2 1738 #define IDC_CS_DENISEREV 1738 #define IDC_DBG_OUTPUT1 1739 -#define IDC_CS_DMAC2 1739 #define IDC_DBG_HELP 1740 #define IDC_DBG_INPUT 1741 #define IDC_DBG_DREG 1742 @@ -892,6 +893,7 @@ #define IDC_DBG_CUSTOM 1766 #define IDC_DBG_MISCCPU 1767 #define IDC_CS_A2091 1768 +#define IDC_CS_DMAC2 1769 #define ID__FLOPPYDRIVES 40004 #define ID_FLOPPYDRIVES_DF0 40005 #define ID_ST_CONFIGURATION 40010 @@ -921,7 +923,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 253 #define _APS_NEXT_COMMAND_VALUE 40029 -#define _APS_NEXT_CONTROL_VALUE 1769 +#define _APS_NEXT_CONTROL_VALUE 1770 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index c11cf0ff..bd328a2a 100755 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -730,11 +730,13 @@ #define IDC_AVIOUTPUT_OPTIONS 1649 #define IDC_STATE_RATE_TEXT 1649 #define IDC_DISKLISTREMOVE 1649 +#define IDC_DF0QENABLE 1649 #define IDC_SOUNDCARD 1650 #define IDC_CS_SOUND0 1650 #define IDC_UPBM 1650 #define IDC_DISKLISTREMOVE2 1650 #define IDC_DISKLISTINSERT 1650 +#define IDC_DF1QENABLE 1650 #define IDC_SOUNDCARDLIST 1651 #define IDC_CS_SOUND1 1651 #define IDC_SOUNDFREQ 1652 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 683c2d1d..2d0d47c6 100755 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -774,13 +774,11 @@ BEGIN RTEXT "Configuration:",IDC_STATIC,5,105,55,10,SS_CENTERIMAGE COMBOBOX IDC_QUICKSTART_HOSTCONFIG,65,103,225,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Emulated Floppy Drives",IDC_QUICKSTART_DF,3,126,294,84 - LTEXT "Floppy drive DF0:",IDC_STATIC,10,138,64,10,SS_CENTERIMAGE - PUSHBUTTON "Select disk image",IDC_DF0QQ,82,135,98,15 + PUSHBUTTON "Select disk image",IDC_DF0QQ,82,136,98,15 RTEXT "Write-protected",IDC_STATIC,180,139,58,10,SS_CENTERIMAGE CONTROL "",IDC_DF0WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,245,137,10,15 PUSHBUTTON "Eject",IDC_EJECT0Q,260,136,30,15 COMBOBOX IDC_DF0TEXTQ,9,154,282,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - LTEXT "Floppy drive DF1:",IDC_STATIC,10,176,63,10,SS_CENTERIMAGE PUSHBUTTON "Select disk image",IDC_DF1QQ,82,172,98,15 RTEXT "Write-protected",IDC_STATIC,180,175,58,10,SS_CENTERIMAGE CONTROL "",IDC_DF1WPQ,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,245,173,10,15 @@ -789,6 +787,8 @@ BEGIN PUSHBUTTON "Set configuration",IDC_QUICKSTART_SETCONFIG,9,219,72,15,NOT WS_VISIBLE GROUPBOX "Mode",IDC_STATIC,190,211,107,27,BS_LEFT CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10 + CONTROL "Floppy drive DF0:",IDC_DF0QENABLE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,9,136,66,15 + CONTROL "Floppy drive DF1:",IDC_DF1QENABLE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | BS_FLAT,9,172,66,15 END IDD_FRONTEND DIALOGEX 0, 0, 420, 242 @@ -846,7 +846,7 @@ BEGIN LISTBOX IDC_DBG_FPREG,372,218,81,66,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT LISTBOX IDC_DBG_FPSR,372,285,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT LISTBOX IDC_DBG_MISCCPU,372,320,81,34,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT - CONTROL "",IDC_DBG_STATUS,"msctls_statusbar32",CCS_BOTTOM | SBARS_SIZEGRIP,0,355,453,12 + CONTROL "",IDC_DBG_STATUS,"msctls_statusbar32",0x103,0,355,453,12 LISTBOX IDC_DBG_BRKPTS,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL LISTBOX IDC_DBG_MCUSTOM,372,79,81,138,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT LISTBOX IDC_DBG_MISC,1,79,370,262,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL diff --git a/od-win32/sysconfig.h b/od-win32/sysconfig.h index b84d1b5f..610af279 100755 --- a/od-win32/sysconfig.h +++ b/od-win32/sysconfig.h @@ -52,6 +52,7 @@ #define LOGITECHLCD /* Logitech G15 LCD */ #define SAVESTATE /* State file support */ #define A2091 /* A590/A2091 SCSI */ +#define NCR /* A4000T/A4091 SCSI */ #else diff --git a/od-win32/win32.c b/od-win32/win32.c index 5cbfbcf7..5d66e3ce 100755 --- a/od-win32/win32.c +++ b/od-win32/win32.c @@ -2580,19 +2580,23 @@ static void getstartpaths(int start_data) strcat (tmp2, "Amiga Files\\"); strcpy (tmp, tmp2); strcat(tmp, "WinUAE"); + CreateDirectory(tmp2, NULL); + CreateDirectory(tmp, NULL); strcpy(start_path_new, tmp2); v = GetFileAttributes(tmp); - if (v != INVALID_FILE_ATTRIBUTES && (v & FILE_ATTRIBUTE_DIRECTORY)) { - if (start_data == 0) { - if (path_done == 0) { - strcpy (start_path_af, tmp2); - strcpy (start_path_data, start_path_af); - strcat (start_path_data, "WinUAE"); - path_done = 1; + if (v != INVALID_FILE_ATTRIBUTES) { + if (v & FILE_ATTRIBUTE_DIRECTORY) { + if (start_data == 0) { + if (path_done == 0) { + strcpy (start_path_af, tmp2); + strcpy (start_path_data, start_path_af); + strcat (start_path_data, "WinUAE"); + path_done = 1; + } + start_data = 1; } - start_data = 1; + af_path_2005 = 2; } - af_path_2005 = 2; } } } diff --git a/od-win32/win32.h b/od-win32/win32.h index 06497246..dac951ef 100755 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,9 +15,9 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEBETA 11 -#define WINUAEPUBLICBETA 1 -#define WINUAEDATE MAKEBD(2007, 5, 6) +#define WINUAEBETA 0 +#define WINUAEPUBLICBETA 0 +#define WINUAEDATE MAKEBD(2007, 5, 12) //#define WINUAEEXTRA "" #define IHF_WINDOWHIDDEN 6 diff --git a/od-win32/win32_scale2x.c b/od-win32/win32_scale2x.c index 277cb525..925de4cd 100755 --- a/od-win32/win32_scale2x.c +++ b/od-win32/win32_scale2x.c @@ -15,8 +15,7 @@ struct uae_filter uaefilters[] = { - { UAE_FILTER_NULL, 0, "Null filter", "null", - { 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 } }, + { UAE_FILTER_NULL, 0, "Null filter", "null", 0, UAE_FILTER_MODE_16_16 | UAE_FILTER_MODE_32_32, 0, 0, 0 }, { UAE_FILTER_DIRECT3D, 0, "Direct3D", "direct3d", 1, 0, 0, 0, 0 }, diff --git a/od-win32/win32gfx.c b/od-win32/win32gfx.c index e5db6f41..faf2e393 100755 --- a/od-win32/win32gfx.c +++ b/od-win32/win32gfx.c @@ -2105,9 +2105,9 @@ static BOOL doInit (void) updatemodes (); } - if (colortype == RGBFB_NONE && !(currentmode->flags & DM_OVERLAY)) { + if (colortype == RGBFB_NONE) { fs_warning = IDS_UNSUPPORTEDSCREENMODE_1; - } else if (colortype == RGBFB_CLUT && !(currentmode->flags & DM_OVERLAY)) { + } else if (colortype == RGBFB_CLUT && DirectDraw_GetSurfaceBitCount() != 8) { fs_warning = IDS_UNSUPPORTEDSCREENMODE_2; } else if (currentmode->current_width >= GetSystemMetrics(SM_CXVIRTUALSCREEN) || currentmode->current_height >= GetSystemMetrics(SM_CYVIRTUALSCREEN)) { diff --git a/od-win32/win32gui.c b/od-win32/win32gui.c index bf980ec8..6e1ec125 100755 --- a/od-win32/win32gui.c +++ b/od-win32/win32gui.c @@ -6495,18 +6495,18 @@ static void out_floppyspeed (HWND hDlg) SetDlgItemText (hDlg, IDC_FLOPPYSPDTEXT, txt); } -#define BUTTONSPERFLOPPY 6 +#define BUTTONSPERFLOPPY 7 static int floppybuttons[][BUTTONSPERFLOPPY] = { - { IDC_DF0TEXT,IDC_DF0,IDC_EJECT0,IDC_DF0TYPE,IDC_DF0WP,IDC_SAVEIMAGE0 }, - { IDC_DF1TEXT,IDC_DF1,IDC_EJECT1,IDC_DF1TYPE,IDC_DF1WP,IDC_SAVEIMAGE1 }, - { IDC_DF2TEXT,IDC_DF2,IDC_EJECT2,IDC_DF2TYPE,IDC_DF2WP,IDC_SAVEIMAGE2 }, - { IDC_DF3TEXT,IDC_DF3,IDC_EJECT3,IDC_DF3TYPE,IDC_DF3WP,IDC_SAVEIMAGE3 } + { IDC_DF0TEXT,IDC_DF0,IDC_EJECT0,IDC_DF0TYPE,IDC_DF0WP,IDC_SAVEIMAGE0,-1 }, + { IDC_DF1TEXT,IDC_DF1,IDC_EJECT1,IDC_DF1TYPE,IDC_DF1WP,IDC_SAVEIMAGE1,-1 }, + { IDC_DF2TEXT,IDC_DF2,IDC_EJECT2,IDC_DF2TYPE,IDC_DF2WP,IDC_SAVEIMAGE2,-1 }, + { IDC_DF3TEXT,IDC_DF3,IDC_EJECT3,IDC_DF3TYPE,IDC_DF3WP,IDC_SAVEIMAGE3,-1 } }; static int floppybuttonsq[][BUTTONSPERFLOPPY] = { - { IDC_DF0TEXTQ,IDC_DF0QQ,IDC_EJECT0Q,-1,IDC_DF0WPQ,-1 }, - { IDC_DF1TEXTQ,IDC_DF1QQ,IDC_EJECT1Q,-1,IDC_DF1WPQ,-1 }, - { -1,-1,-1,-1,-1,-1 }, - { -1,-1,-1,-1,-1,-1 } + { IDC_DF0TEXTQ,IDC_DF0QQ,IDC_EJECT0Q,-1,IDC_DF0WPQ,-1,IDC_DF0QENABLE }, + { IDC_DF1TEXTQ,IDC_DF1QQ,IDC_EJECT1Q,-1,IDC_DF1WPQ,-1,IDC_DF1QENABLE }, + { -1,-1,-1,-1,-1,-1,-1 }, + { -1,-1,-1,-1,-1,-1,-1 } }; static void floppytooltip (HWND hDlg, int num, uae_u32 crc32) @@ -6618,6 +6618,7 @@ static void addfloppytype (HWND hDlg, int n) int f_type = floppybuttons[n][3]; int f_wp = floppybuttons[n][4]; int f_si = floppybuttons[n][5]; + int f_enable = floppybuttons[n][6]; if (currentpage == QUICKSTART_ID) { f_text = floppybuttonsq[n][0]; @@ -6626,6 +6627,7 @@ static void addfloppytype (HWND hDlg, int n) f_eject = floppybuttonsq[n][2]; f_wp = floppybuttonsq[n][4]; f_si = -1; + f_enable = floppybuttonsq[n][6]; } if (nn <= 0) @@ -6643,6 +6645,9 @@ static void addfloppytype (HWND hDlg, int n) ew (hDlg, f_eject, TRUE); if (f_drive >= 0) ew (hDlg, f_drive, state); + if (f_enable >= 0) { + ew (hDlg, f_enable, FALSE); + } chk = disk_getwriteprotect (workprefs.df[n]) && state == TRUE ? BST_CHECKED : 0; if (f_wp >= 0) CheckDlgButton(hDlg, f_wp, chk); @@ -8066,7 +8071,7 @@ static int filterpreset_selected = -1, filterpreset_builtin = -1; static void enable_for_hw3ddlg (HWND hDlg) { int v = workprefs.gfx_filter ? TRUE : FALSE; - int vv = FALSE, vv2 = FALSE, vv3 = FALSE; + int vv = FALSE, vv2 = FALSE, vv3 = FALSE, vv4 = FALSE; struct uae_filter *uf; int i; @@ -8085,13 +8090,15 @@ static void enable_for_hw3ddlg (HWND hDlg) vv2 = TRUE; if (v && (uf->x[0] && !uf->yuv)) vv3 = TRUE; + if (v && uf->x[0]) + vv4 = TRUE; ew (hDlg, IDC_FILTERENABLE, TRUE); ew (hDlg, IDC_FILTERMODE, v); CheckDlgButton(hDlg, IDC_FILTERENABLE, v); ew (hDlg, IDC_FILTERHZ, v); ew (hDlg, IDC_FILTERVZ, v); - ew (hDlg, IDC_FILTERHZMULT, vv && !vv2); - ew (hDlg, IDC_FILTERVZMULT, vv && !vv2); + ew (hDlg, IDC_FILTERHZMULT, vv && !vv4); + ew (hDlg, IDC_FILTERVZMULT, vv && !vv4); ew (hDlg, IDC_FILTERHO, v); ew (hDlg, IDC_FILTERVO, v); ew (hDlg, IDC_FILTERSLR, vv3); diff --git a/od-win32/winuae_msvc/winuae_msvc.vcproj b/od-win32/winuae_msvc/winuae_msvc.vcproj index 8b9dbc21..4bf2a969 100755 --- a/od-win32/winuae_msvc/winuae_msvc.vcproj +++ b/od-win32/winuae_msvc/winuae_msvc.vcproj @@ -2385,10 +2385,6 @@ RelativePath="..\resources\drive_startup.wav" > - - diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 82fd6c84..0c48f196 100755 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,11 @@ +Beta 12: + +- CDTV right button/second firebutton pin state fixed (CDPD IV) + (logic high when inactive, not floating like with other models) +- Quickstart DF0:/DF1: text changed (future improvement), no + functional changes yet + Beta 11: - fixed randomly lost CDTV CD transfer finished interrupt in