From 6cac97f4c33f5876a4499b077a473659d2d8e568 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 11 Feb 2017 20:18:31 +0200 Subject: [PATCH] 3410b1 --- arcadia.cpp | 64 ++- audio.cpp | 22 +- cfgfile.cpp | 36 +- cia.cpp | 16 +- cpuboard.cpp | 10 +- cpummu30.cpp | 2 +- custom.cpp | 110 +++-- disk.cpp | 14 + drawing.cpp | 2 +- expansion.cpp | 25 +- fpp.cpp | 2 +- gencpu.cpp | 42 +- idecontrollers.cpp | 18 +- include/arcadia.h | 5 +- include/cpu_prefetch.h | 34 +- include/disk.h | 2 + include/inputdevice.h | 2 +- include/newcpu.h | 6 +- include/options.h | 3 +- include/rommgr.h | 1 + include/scsi.h | 4 +- include/sndboard.h | 3 + include/uae/mman.h | 1 + inputdevice.cpp | 40 +- main.cpp | 6 +- memory.cpp | 17 +- newcpu.cpp | 196 +++++--- od-win32/direct3d.cpp | 33 +- od-win32/hardfile_win32.cpp | 164 ++++++- od-win32/mman.cpp | 7 +- od-win32/resources/resource.h | 2 + od-win32/resources/winuae.rc | 30 +- od-win32/resources/winuae_minimal.rc | 434 +++++++++--------- od-win32/serial_win32.cpp | 10 +- od-win32/sysconfig.h | 1 - od-win32/win32.cpp | 7 +- od-win32/win32.h | 6 +- od-win32/win32_filesys.cpp | 15 +- od-win32/win32gui.cpp | 81 +++- od-win32/winuae_msvc15/winuae_msvc.vcxproj | 4 + .../winuae_msvc15/winuae_msvc.vcxproj.filters | 12 + od-win32/winuaechangelog.txt | 57 +++ scsi.cpp | 12 +- sndboard.cpp | 144 ++++++ specialmonitors.cpp | 9 +- table68k | 12 +- 46 files changed, 1236 insertions(+), 487 deletions(-) diff --git a/arcadia.cpp b/arcadia.cpp index 8e5baa91..93e1bcfd 100644 --- a/arcadia.cpp +++ b/arcadia.cpp @@ -572,6 +572,7 @@ Port 2: int alg_flag; +int log_ld; #define ALG_NVRAM_SIZE 4096 #define ALG_NVRAM_MASK (ALG_NVRAM_SIZE - 1) @@ -676,7 +677,7 @@ static void ack(void) sb(0x0a); // ACK } -void alg_serial_read(uae_u16 w) +static void sony_serial_read(uae_u16 w) { w &= 0xff; switch (w) @@ -703,6 +704,8 @@ void alg_serial_read(uae_u16 w) ld_direction = 0; pausevideograb(0); ack(); + if (log_ld) + write_log(_T("LD: PLAY\n")); break; case 0x3b: // Fast foward play ';' ld_mode = LD_MODE_PLAY; @@ -714,6 +717,8 @@ void alg_serial_read(uae_u16 w) ld_direction = 0; ld_mode = LD_MODE_STOP; ack(); + if (log_ld) + write_log(_T("LD: STOP\n")); break; case 0x40: // '@' if (ld_mode == LD_MODE_SEARCH) { @@ -723,6 +728,8 @@ void alg_serial_read(uae_u16 w) ld_direction = 0; ack(); sb(0x01); // COMPLETION + if (log_ld) + write_log(_T("LD: SEARCH %d\n"), ld_value); } break; case 0x4a: // R-PLAY 'J' @@ -730,18 +737,24 @@ void alg_serial_read(uae_u16 w) pausevideograb(1); ld_direction = -1; ack(); + if (log_ld) + write_log(_T("LD: R-PLAY\n")); break; case 0x4b: // Fast reverse play 'K' ld_mode = LD_MODE_PLAY; pausevideograb(1); ld_direction = -2; ack(); + if (log_ld) + write_log(_T("LD: FAST R-PLAY\n")); break; case 0x4f: // STILL 'O' ld_mode = LD_MODE_STILL; ld_direction = 0; pausevideograb(1); ack(); + if (log_ld) + write_log(_T("LD: PAUSE\n")); break; case 0x43: // SEARCH 'C' ack(); @@ -749,34 +762,48 @@ void alg_serial_read(uae_u16 w) ld_direction = 0; pausevideograb(1); ld_value = 0; + if (log_ld) + write_log(_T("LD: SEARCH\n")); break; case 0x46: // CH-1 ON 'F' ack(); ld_audio |= 1; setvolumevideograb(100 - currprefs.sound_volume_genlock); + if (log_ld) + write_log(_T("LD: CH-1 ON\n")); break; case 0x48: // CH-2 ON 'H' ack(); ld_audio |= 2; setvolumevideograb(100 - currprefs.sound_volume_genlock); + if (log_ld) + write_log(_T("LD: CH-2 ON\n")); break; case 0x47: // CH-1 OFF 'G' ack(); ld_audio &= ~1; if (!ld_audio) setvolumevideograb(0); + if (log_ld) + write_log(_T("LD: CH-1 OFF\n")); break; case 0x49: // CH-2 OFF 'I' ack(); ld_audio &= ~2; if (!ld_audio) setvolumevideograb(0); + if (log_ld) + write_log(_T("LD: CH-2 OFF\n")); break; case 0x50: // INDEX ON 'P' ack(); + if (log_ld) + write_log(_T("LD: INDEX ON\n")); break; case 0x51: // INDEX OFF 'O' ack(); + if (log_ld) + write_log(_T("LD: INDEX OFF\n")); break; case 0x60: // ADDR INQ '`' { @@ -790,6 +817,8 @@ void alg_serial_read(uae_u16 w) sb(vv); m /= 10; } + if (log_ld > 1) + write_log(_T("LD: ADDR INQ %d\n"), ld_address); } break; case 0x67: // STATUS INQ 'g' @@ -798,6 +827,8 @@ void alg_serial_read(uae_u16 w) sb(0x40); sb((ld_mode == LD_MODE_SEARCH ? 0x02 : 0x00)); sb((ld_mode == LD_MODE_PLAY ? 0x01 : 0x00) | (ld_mode == LD_MODE_STILL ? 0x20 : 0x00) | (ld_mode == LD_MODE_STOP ? 0x40 : 0x00) | (ld_direction < 0 ? 0x80 : 0x00)); + if (log_ld > 1) + write_log(_T("LD: STATUS INQ\n")); break; } } @@ -840,7 +871,7 @@ static void alg_vsync(void) } } -int alg_serial_write(void) +static int sony_serial_write(void) { if (ser_buf_offset > 0) { uae_u16 v = alg_ser_buf[0]; @@ -853,6 +884,34 @@ int alg_serial_write(void) return -1; } +static void pioneer_serial_read(uae_u16 w) +{ + w &= 0xff; +} +static int pioneer_serial_write(void) +{ + return -1; +} + +void ld_serial_read(uae_u16 w) +{ + if (alg_flag || currprefs.genlock_image == 7) { + sony_serial_read(w); + } else if (currprefs.genlock_image == 8) { + pioneer_serial_read(w); + } +} + +int ld_serial_write(void) +{ + if (alg_flag || currprefs.genlock_image == 7) { + return sony_serial_write(); + } else if (currprefs.genlock_image == 8) { + return pioneer_serial_write(); + } + return -1; +} + /* Port 1: @@ -933,7 +992,6 @@ uae_u8 alg_joystick_buttons(uae_u8 pra, uae_u8 dra, uae_u8 v) return v; } - void alg_map_banks(void) { alg_flag = 1; diff --git a/audio.cpp b/audio.cpp index 757d5d69..bcbbc015 100644 --- a/audio.cpp +++ b/audio.cpp @@ -607,7 +607,7 @@ static void do_filter(int *data, int num) static void get_extra_channels(int *data1, int *data2, int sample1, int sample2) { int d1 = *data1 + sample1; - int d2 = *data2 + sample2; + int d2 = (data2 ? *data2 : 0) + sample2; if (d1 < -32768) d1 = -32768; if (d1 > 32767) @@ -619,10 +619,12 @@ static void get_extra_channels(int *data1, int *data2, int sample1, int sample2) int needswap = currprefs.sound_stereo_swap_paula ^ currprefs.sound_stereo_swap_ahi; if (needswap) { *data1 = d2; - *data2 = d1; + if (data2) + *data2 = d1; } else { *data1 = d1; - *data2 = d2; + if (data2) + *data2 = d2; } } @@ -1352,6 +1354,11 @@ static int isirq (int nr) return INTREQR () & (0x80 << nr); } +static void audio_setirq_event(uae_u32 nr) +{ + INTREQ_0 (0x8000 | (0x80 << nr)); +} + static void setirq (int nr, int which) { #if DEBUG_AUDIO > 0 @@ -1359,7 +1366,12 @@ static void setirq (int nr, int which) if (debugchannel (nr) && cdp->wlen > 1) write_log (_T("SETIRQ%d (%d,%d) PC=%08X\n"), nr, which, isirq (nr) ? 1 : 0, M68K_GETPC); #endif - INTREQ_0 (0x8000 | (0x80 << nr)); + // audio interrupts are delayed by 2 cycles + if (currprefs.cpu_memory_cycle_exact) { + event2_newevent_xx (-1, 2 * CYCLE_UNIT + CYCLE_UNIT / 2, nr, audio_setirq_event); + } else { + audio_setirq_event(nr); + } } static void newsample (int nr, sample8_t sample) @@ -2183,7 +2195,7 @@ void AUDxPER (int nr, uae_u16 v) /* smaller values would cause extremely high cpu usage */ per = PERIOD_MIN * CYCLE_UNIT; } - if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_cycle_exact && cdp->dmaenstore) { + if (per < PERIOD_MIN_NONCE * CYCLE_UNIT && !currprefs.cpu_memory_cycle_exact && cdp->dmaenstore) { /* DMAL emulation and low period can cause very very high cpu usage on slow performance PCs * Only do this hack if audio DMA is active. */ diff --git a/cfgfile.cpp b/cfgfile.cpp index 56e2286c..e4d9aa7e 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -211,7 +211,7 @@ static const TCHAR *cdmodes[] = { _T("disabled"), _T(""), _T("image"), _T("ioctl static const TCHAR *cdconmodes[] = { _T(""), _T("uae"), _T("ide"), _T("scsi"), _T("cdtv"), _T("cd32"), 0 }; static const TCHAR *specialmonitors[] = { _T("none"), _T("autodetect"), _T("a2024"), _T("graffiti"), _T("ham_e"), _T("ham_e_plus"), _T("videodac18"), _T("avideo12"), _T("avideo24"), _T("firecracker24"), _T("dctv"), _T("opalvision"), _T("colorburst"), 0 }; -static const TCHAR *genlockmodes[] = { _T("none"), _T("noise"), _T("testcard"), _T("image"), _T("video"), _T("stream"), _T("ld"), NULL }; +static const TCHAR *genlockmodes[] = { _T("none"), _T("noise"), _T("testcard"), _T("image"), _T("video"), _T("stream"), _T("ld"), _T("sony_ld"), _T("pioneer_ld"), NULL }; static const TCHAR *ppc_implementations[] = { _T("auto"), _T("dummy"), @@ -1007,6 +1007,11 @@ static void write_filesys_config (struct uae_prefs *p, struct zfile *f) _tcscat(tmp, tmpx); _tcscat(tmp3, tmpx); } + if (ci->lock) { + _tcscat(tmp, _T(",lock")); + _tcscat(tmp3, _T(",lock")); + } + if (ci->type == UAEDEV_HDF) cfgfile_write_str (f, _T("hardfile2"), tmp); #if 0 @@ -4296,6 +4301,9 @@ static int cfgfile_parse_newfilesys (struct uae_prefs *p, int nr, int type, TCHA getintval(&pflags, &uci.unit_special_flags, 0); } + if (cfgfile_option_find(tmpp2, _T("lock"))) + uci.lock = true; + if (cfgfile_option_find(tmpp2, _T("SCSI2"))) uci.unit_feature_level = HD_LEVEL_SCSI_2; else if (cfgfile_option_find(tmpp2, _T("SCSI1"))) @@ -6979,7 +6987,7 @@ void default_prefs (struct uae_prefs *p, bool reset, int type) p->input_tablet = TABLET_OFF; p->tablet_library = false; - p->input_mouse_untrap = MOUSEUNTRAP_MIDDLEBUTTON; + p->input_mouse_untrap = MOUSEUNTRAP_NONE; p->input_magic_mouse_cursor = 0; inputdevice_default_prefs (p); @@ -7162,27 +7170,43 @@ static void set_68020_compa (struct uae_prefs *p, int compa, int cd32) case 0: p->blitter_cycle_exact = 1; p->m68k_speed = 0; - if (p->cpu_model == 68020 && p->cachesize == 0) { + if ((p->cpu_model == 68020 || p->cpu_model == 68030) && p->cachesize == 0) { p->cpu_cycle_exact = 1; p->cpu_memory_cycle_exact = 1; - p->cpu_clock_multiplier = 4 << 8; + if (p->cpu_model == 68020) + p->cpu_clock_multiplier = 4 << 8; + else + p->cpu_clock_multiplier = 5 << 8; } break; case 1: + p->blitter_cycle_exact = 1; + p->m68k_speed = 0; + if ((p->cpu_model == 68020 || p->cpu_model == 68030) && p->cachesize == 0) { + p->cpu_memory_cycle_exact = 1; + if (p->cpu_model == 68020) + p->cpu_clock_multiplier = 4 << 8; + else + p->cpu_clock_multiplier = 5 << 8; + } + break; + case 2: p->cpu_compatible = true; p->m68k_speed = 0; break; - case 2: + case 3: p->cpu_compatible = 0; p->m68k_speed = -1; p->address_space_24 = 0; break; - case 3: + case 4: p->cpu_compatible = 0; p->address_space_24 = 0; p->cachesize = MAX_JIT_CACHE; break; } + if (p->cpu_model >= 68030) + p->address_space_24 = 0; } /* 0: cycle-exact diff --git a/cia.cpp b/cia.cpp index 451ae1e6..c3428f37 100644 --- a/cia.cpp +++ b/cia.cpp @@ -129,7 +129,7 @@ static void ICRA (uae_u32 data) { ciaaicr |= 0x40; #if 1 - if (currprefs.cpu_cycle_exact && !(ciaaicr & 0x20) && (cia_interrupt_disabled & 1)) { + if (currprefs.cpu_memory_cycle_exact && !(ciaaicr & 0x20) && (cia_interrupt_disabled & 1)) { cia_interrupt_delay |= 1; #if CIAB_DEBUG_IRQ write_log(_T("ciab interrupt disabled ICR=%02X PC=%x\n"), ciabicr, M68K_GETPC); @@ -145,7 +145,7 @@ static void ICRB (uae_u32 data) { ciabicr |= 0x40; #if 1 - if (currprefs.cpu_cycle_exact && !(ciabicr & 0x20) && (cia_interrupt_disabled & 2)) { + if (currprefs.cpu_memory_cycle_exact && !(ciabicr & 0x20) && (cia_interrupt_disabled & 2)) { cia_interrupt_delay |= 2; #if CIAB_DEBUG_IRQ write_log(_T("ciab interrupt disabled ICR=%02X PC=%x\n"), ciabicr, M68K_GETPC); @@ -170,7 +170,7 @@ static void RethinkICRA (void) #endif if (!(ciaaicr & 0x80)) { ciaaicr |= 0x80; - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { event2_newevent_xx (-1, DIV10 + 2 * CYCLE_UNIT + CYCLE_UNIT / 2, 0, ICRA); } else { ICRA (0x0008); @@ -187,7 +187,7 @@ static void RethinkICRB (void) #endif if (!(ciabicr & 0x80)) { ciabicr |= 0x80; - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { event2_newevent_xx (-1, DIV10 + 2 * CYCLE_UNIT + CYCLE_UNIT / 2, 0, ICRB); } else { ICRB (0); @@ -1782,7 +1782,7 @@ static void cia_wait_pre (int cianummask) return; #endif - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { cia_interrupt_disabled |= cianummask; } @@ -1800,7 +1800,7 @@ static void cia_wait_pre (int cianummask) } if (cycles) { - if (currprefs.cpu_cycle_exact) + if (currprefs.cpu_memory_cycle_exact) x_do_cycles_pre (cycles); else do_cycles (cycles); @@ -1824,7 +1824,7 @@ static void cia_wait_post (int cianummask, uae_u32 value) x_do_cycles_post (c, value); else do_cycles (c); - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { cia_interrupt_disabled &= ~cianummask; if ((cia_interrupt_delay & cianummask) & 1) { cia_interrupt_delay &= ~1; @@ -1836,7 +1836,7 @@ static void cia_wait_post (int cianummask, uae_u32 value) } } } - if (!currprefs.cpu_cycle_exact && cia_interrupt_delay) { + if (!currprefs.cpu_memory_cycle_exact && cia_interrupt_delay) { int v = cia_interrupt_delay; cia_interrupt_delay = 0; if (v & 1) diff --git a/cpuboard.cpp b/cpuboard.cpp index 9f5d03c5..19a6a745 100644 --- a/cpuboard.cpp +++ b/cpuboard.cpp @@ -2599,12 +2599,14 @@ bool cpuboard_autoconfig_init(struct autoconfig_info *aci) // 1230 MK IV / 1240/60 f0rom_size = 65536; earom_size = 131072; - // 12xx = 1x32k - for (int i = 0; i < 16384; i++) { + // 12xx = 1x32k but read full 64k. + for (int i = 0; i < 65536 / 2; i++) { uae_u8 b = 0xff; - zfile_fread(&b, 1, 1, autoconfig_rom); + if (!zfile_fread(&b, 1, 1, autoconfig_rom)) + break; blizzardf0_bank.baseaddr[i] = b; - zfile_fread(&b, 1, 1, autoconfig_rom); + if (!zfile_fread(&b, 1, 1, autoconfig_rom)) + break; blizzardea_bank.baseaddr[i] = b; } zfile_fclose(autoconfig_rom); diff --git a/cpummu30.cpp b/cpummu30.cpp index ac2a9519..f0a0eb76 100644 --- a/cpummu30.cpp +++ b/cpummu30.cpp @@ -2325,7 +2325,7 @@ void mmu030_set_funcs(void) { if (currprefs.mmu_model != 68030) return; - if (currprefs.cpu_cycle_exact || currprefs.cpu_compatible) { + if (currprefs.cpu_memory_cycle_exact || currprefs.cpu_compatible) { x_phys_get_iword = get_word_icache030; x_phys_get_ilong = get_long_icache030; } else { diff --git a/custom.cpp b/custom.cpp index 351864d5..8066d232 100644 --- a/custom.cpp +++ b/custom.cpp @@ -3512,7 +3512,7 @@ static void calcsprite (void) } } -static void decide_sprites (int hpos, bool usepointx) +static void decide_sprites(int spnr, int hpos, bool usepointx, bool quick) { int nrs[MAX_SPRITES * 2], posns[MAX_SPRITES * 2]; int count, i; @@ -3520,6 +3520,7 @@ static void decide_sprites (int hpos, bool usepointx) int width = sprite_width; int sscanmask = 0x100 << sprite_buffer_res; int gotdata = 0; + int startnr = 0, endnr = MAX_SPRITES - 1; if (thisline_decision.plfleft < 0 && !(bplcon3 & 2)) return; @@ -3533,12 +3534,18 @@ static void decide_sprites (int hpos, bool usepointx) if (nodraw () || hpos < 0x14 || nr_armed == 0 || point == last_sprite_point) return; - decide_diw (hpos); - decide_line (hpos); - calcsprite (); + if (spnr >= 0) { + startnr = spnr; + endnr = spnr; + } + if (!quick) { + decide_diw (hpos); + decide_line (hpos); + calcsprite (); + } count = 0; - for (i = 0; i < MAX_SPRITES; i++) { + for (i = startnr; i <= endnr; i++) { int xpos = spr[i].xpos; int sprxp = (fmode & 0x8000) ? (xpos & ~sscanmask) : xpos; int hw_xp = sprxp >> sprite_buffer_res; @@ -3611,9 +3618,17 @@ static void decide_sprites (int hpos, bool usepointx) } #endif } -static void decide_sprites(int hpos) +static void decide_sprites(int spnr, int hpos) { - decide_sprites(hpos, false); + decide_sprites(spnr, hpos, false, false); +} +static void maybe_decide_sprites(int spnr, int hpos) +{ + if (!spr[spnr].armed) + return; + if (!sprdata[spnr] && !sprdatb[spnr]) + return; + decide_sprites(spnr, hpos, true, true); } static int sprites_differ (struct draw_info *dip, struct draw_info *dip_old) @@ -3712,7 +3727,7 @@ static void finish_decisions (void) if (thisline_decision.plfleft >= 0 && thisline_decision.nr_planes > 0) record_diw_line (thisline_decision.plfleft, diwfirstword, diwlastword); - decide_sprites (hpos + 1); + decide_sprites(-1, hpos + 1); dip->last_sprite_entry = next_sprite_entry; dip->last_color_change = next_color_change; @@ -4554,7 +4569,7 @@ static uae_u16 DENISEID (int *missing) #endif if (currprefs.chipset_mask & CSMASK_ECS_DENISE) return 0xFFFC; - if (currprefs.cpu_model == 68000 && (currprefs.cpu_compatible || currprefs.cpu_cycle_exact)) + if (currprefs.cpu_model == 68000 && (currprefs.cpu_compatible || currprefs.cpu_memory_cycle_exact)) *missing = 1; return 0xFFFF; } @@ -4605,7 +4620,7 @@ static bool hsyncdelay (void) { if (!currprefs.genlock) return false; - if (currprefs.cpu_cycle_exact || currprefs.m68k_speed >= 0) + if (currprefs.cpu_memory_cycle_exact || currprefs.m68k_speed >= 0) return false; if (bplcon0 == (0x0100 | 0x0002)) { return true; @@ -4613,7 +4628,7 @@ static bool hsyncdelay (void) return false; } -#define CPU_ACCURATE (currprefs.cpu_model < 68020 || (currprefs.cpu_model == 68020 && currprefs.cpu_cycle_exact)) +#define CPU_ACCURATE (currprefs.cpu_model < 68020 || (currprefs.cpu_model == 68020 && currprefs.cpu_memory_cycle_exact)) // DFF006 = 0.W must be valid result but better do this only in 68000 modes (whdload black screen!) // HPOS is shifted by 3 cycles and VPOS increases when shifted HPOS==1 @@ -4714,7 +4729,7 @@ static void VHPOSW (uae_u16 v) write_log (_T("VHPOSW %04X PC=%08x\n"), v, M68K_GETPC); #endif - if (currprefs.cpu_cycle_exact && currprefs.cpu_model == 68000) { + if (currprefs.cpu_memory_cycle_exact && currprefs.cpu_model == 68000) { /* Special hack for Smooth Copper in CoolFridge / Upfront demo */ int chp = current_hpos_safe(); int hp = v & 0xff; @@ -5077,7 +5092,7 @@ int intlev (void) #define INT_PROCESSING_DELAY (3 * CYCLE_UNIT) STATIC_INLINE int use_eventmode (uae_u16 v) { - if (currprefs.cpu_cycle_exact && currprefs.cpu_model <= 68020) + if (currprefs.cpu_memory_cycle_exact && currprefs.cpu_model <= 68020) return 1; return 0; } @@ -5392,7 +5407,7 @@ static void BPLCON0_Denise (int hpos, uae_u16 v, bool immediate) #ifdef ECS_DENISE if (currprefs.chipset_mask & CSMASK_ECS_DENISE) { - decide_sprites (hpos); + decide_sprites(-1, hpos); sprres = expand_sprres (v, bplcon3); } #endif @@ -5477,7 +5492,7 @@ static void BPLCON3(int hpos, uae_u16 v) if (bplcon3 == v) return; decide_line (hpos); - decide_sprites (hpos); + decide_sprites(-1, hpos); bplcon3 = v; sprres = expand_sprres (bplcon0, bplcon3); record_register_change (hpos, 0x106, v); @@ -5718,7 +5733,7 @@ static void BLTALWM (int hpos, uae_u16 v) { maybe_blit (hpos, 2); blt_info.bltal static void BLTAPTH (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltapt & 0xffff) | ((uae_u32)v << 16); bltptxpos = hpos; bltptxc = 1; @@ -5729,7 +5744,7 @@ static void BLTAPTH (int hpos, uae_u16 v) static void BLTAPTL (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltapt & ~0xffff) | (v & 0xFFFE); bltptxpos = hpos; bltptxc = 1; @@ -5740,7 +5755,7 @@ static void BLTAPTL (int hpos, uae_u16 v) static void BLTBPTH (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltbpt & 0xffff) | ((uae_u32)v << 16); bltptxpos = hpos; bltptxc = 2; @@ -5751,7 +5766,7 @@ static void BLTBPTH (int hpos, uae_u16 v) static void BLTBPTL (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltbpt & ~0xffff) | (v & 0xFFFE); bltptxpos = hpos; bltptxc = 2; @@ -5762,7 +5777,7 @@ static void BLTBPTL (int hpos, uae_u16 v) static void BLTCPTH (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltcpt & 0xffff) | ((uae_u32)v << 16); bltptxpos = hpos; bltptxc = 3; @@ -5773,7 +5788,7 @@ static void BLTCPTH (int hpos, uae_u16 v) static void BLTCPTL (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltcpt & ~0xffff) | (v & 0xFFFE); bltptxpos = hpos; bltptxc = 3; @@ -5784,7 +5799,7 @@ static void BLTCPTL (int hpos, uae_u16 v) static void BLTDPTH (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltdpt & 0xffff) | ((uae_u32)v << 16); bltptxpos = hpos; bltptxc = 4; @@ -5795,7 +5810,7 @@ static void BLTDPTH (int hpos, uae_u16 v) static void BLTDPTL (int hpos, uae_u16 v) { maybe_blit (hpos, 0); - if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_cycle_exact) { + if (bltstate != BLT_done && currprefs.blitter_cycle_exact && currprefs.cpu_memory_cycle_exact) { bltptx = (bltdpt & ~0xffff) | (v & 0xFFFE); bltptxpos = hpos; bltptxc = 4; @@ -5993,12 +6008,12 @@ static void SPRxDATB_1(uae_u16 v, int num, int hpos) static void SPRxDATA (int hpos, uae_u16 v, int num) { - decide_sprites(hpos, true); + decide_sprites(-1, hpos, true, false); SPRxDATA_1(v, num, hpos); } static void SPRxDATB (int hpos, uae_u16 v, int num) { - decide_sprites(hpos, true); + decide_sprites(-1, hpos, true, false); SPRxDATB_1(v, num, hpos); } @@ -6010,7 +6025,7 @@ static void SPRxCTL (int hpos, uae_u16 v, int num) } #endif - decide_sprites(hpos); + decide_sprites(-1, hpos); SPRxCTL_1(v, num, hpos); } static void SPRxPOS (int hpos, uae_u16 v, int num) @@ -6022,7 +6037,7 @@ static void SPRxPOS (int hpos, uae_u16 v, int num) write_log(_T("%d:%d:SPR%dPOSC %06X\n"), vpos, hpos, num, s->pt); } #endif - decide_sprites(hpos); + decide_sprites(-1, hpos); oldvpos = s->vstart; SPRxPOS_1(v, num, hpos); // Superfrog flashing intro bees fix. @@ -6036,7 +6051,7 @@ static void SPRxPOS (int hpos, uae_u16 v, int num) static void SPRxPTH (int hpos, uae_u16 v, int num) { - decide_sprites (hpos); + decide_sprites(-1, hpos); if (hpos - 1 != spr[num].ptxhpos) { spr[num].pt &= 0xffff; spr[num].pt |= (uae_u32)v << 16; @@ -6049,7 +6064,7 @@ static void SPRxPTH (int hpos, uae_u16 v, int num) } static void SPRxPTL (int hpos, uae_u16 v, int num) { - decide_sprites (hpos); + decide_sprites(-1, hpos); if (hpos - 1 != spr[num].ptxhpos) { spr[num].pt &= ~0xffff; spr[num].pt |= v & ~1; @@ -6826,7 +6841,7 @@ static uae_u16 sprite_fetch(struct sprite *s, int dma, int hpos, int cycle, int { uae_u16 data = last_custom_value1; if (dma) { - if (cycle && currprefs.cpu_cycle_exact) + if (cycle && currprefs.cpu_memory_cycle_exact) s->ptxhpos = hpos; data = last_custom_value1 = chipmem_wget_indirect (s->pt); alloc_cycle (hpos, CYCLE_SPRITE); @@ -6850,7 +6865,7 @@ static uae_u16 sprite_fetch2(struct sprite *s, int hpos, int cycle, int mode) static void do_sprites_1(int num, int cycle, int hpos) { struct sprite *s = &spr[num]; - int dma, posctl = 0; + int posctl = 0; uae_u16 data; // fetch both sprite pairs even if DMA was switched off between sprites int isdma = dmaen (DMA_SPRITE) || ((num & 1) && spr[num & ~1].dmacycle); @@ -6894,7 +6909,9 @@ static void do_sprites_1(int num, int cycle, int hpos) if (!isdma) return; - dma = hpos < plfstrt_sprite || diwstate != DIW_waiting_stop; + int dma = hpos < plfstrt_sprite || diwstate != DIW_waiting_stop; + int sprxp = s->xpos >> (sprite_buffer_res + 1); + bool start_before_dma = hpos >= sprxp && sprxp >= 16; if (vpos == s->vstop || vpos == sprite_vblank_endline) { s->dmastate = 0; posctl = 1; @@ -6911,6 +6928,9 @@ static void do_sprites_1(int num, int cycle, int hpos) } //write_log (_T("%d:%d: %04X=%04X\n"), vpos, hpos, 0x140 + cycle * 2 + num * 8, data); if (cycle == 0) { + if (start_before_dma && s->armed) { + maybe_decide_sprites(num, hpos); + } SPRxPOS_1 (data, num, hpos); s->dmacycle = 1; } else { @@ -6934,20 +6954,27 @@ static void do_sprites_1(int num, int cycle, int hpos) #endif } if (s->dmastate && !posctl && dma) { - uae_u16 data; - - data = sprite_fetch (s, dma, hpos, cycle, 1); + uae_u16 data = sprite_fetch (s, dma, hpos, cycle, 1); #if SPRITE_DEBUG >= 256 if (vpos >= SPRITE_DEBUG_MINY && vpos <= SPRITE_DEBUG_MAXY && (SPRITE_DEBUG & (1 << num))) { write_log (_T("%d:%d:dma:P=%06X "), vpos, hpos, s->pt); } #endif if (cycle == 0) { + // if xpos is earlier than this cycle, decide it first. + if (start_before_dma) { + maybe_decide_sprites(num, hpos); + } SPRxDATA_1 (data, num, hpos); s->dmacycle = 1; } else { + // This is needed if xpos is between DATA and DATB fetches + // Test does not need to be accurate, only purpose is to + // not lose performance when sprites have "normal" positioning. + if (start_before_dma) { + maybe_decide_sprites(num, hpos); + } SPRxDATB_1 (data, num, hpos); - spr_arm (num, 1); } #ifdef AGA switch (sprite_width) @@ -7993,7 +8020,7 @@ static void events_dmal (int hp) { if (!dmal) return; - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { while (dmal) { if (dmal & 3) break; @@ -8020,7 +8047,7 @@ static void events_dmal_hsync (void) if (!dmal) return; dmal_hpos = 0; - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { for (int i = 0; i < 6 + 8; i += 2) { if (dmal & (3 << i)) { alloc_cycle_ext (i + 7, CYCLE_MISC); @@ -10180,8 +10207,8 @@ uae_u32 wait_cpu_cycle_read_ce020 (uaecptr addr, int mode) if (debug_dma) dr->dat = v; #endif - if (currprefs.cpu_model == 68020) - x_do_cycles_post (CYCLE_UNIT / 2, v); + + x_do_cycles_post (CYCLE_UNIT, v); regs.chipset_latch_rw = regs.chipset_latch_read = v; SETIFCHIP @@ -10251,8 +10278,7 @@ void wait_cpu_cycle_write_ce020 (uaecptr addr, int mode, uae_u32 v) else if (mode == 0) put_byte (addr, v); - if (currprefs.cpu_model == 68020) - x_do_cycles_post (CYCLE_UNIT / 2, v); + x_do_cycles_post (CYCLE_UNIT, v); regs.chipset_latch_rw = regs.chipset_latch_write = v; SETIFCHIP diff --git a/disk.cpp b/disk.cpp index 1a54c782..48d994ae 100644 --- a/disk.cpp +++ b/disk.cpp @@ -3664,6 +3664,18 @@ static void DISK_start (void) int tr = drv->cyl * 2 + side; trackid *ti = drv->trackdata + tr; + if (drv->dskchange_time == -1) { + drv->dskchange_time = -2; + write_log(_T("Accessing state restored non-existing disk '%s'!\n"), drv->newname); + if (gui_ask_disk(dr, drv->newname)) { + if (drive_insert(drv, &currprefs, dr, drv->newname, false, false)) { + write_log(_T("Replacement disk '%s' inserted.\n"), drv->newname); + drv->dskready_up_time = 0; + drv->dskchange_time = 0; + } + } + } + if (dskdmaen == DSKDMA_WRITE) { word = 0; drv->tracklen = longwritemode ? FLOPPY_WRITE_MAXLEN : FLOPPY_WRITE_LEN * drv->ddhd * 8 * 2; @@ -4443,6 +4455,8 @@ uae_u8 *restore_disk (int num,uae_u8 *src) drv->dskchange = true; } else { drv->dskchange_time = -1; + _tcscpy(drv->newname, changed_prefs.floppyslots[num].df); + write_log(_T("Disk image not found, faking inserted disk.\n")); } } } diff --git a/drawing.cpp b/drawing.cpp index 2499c097..9d248067 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -3961,7 +3961,7 @@ void vsync_handle_redraw (int long_field, int lof_changed, uae_u16 bplcon0p, uae if (framecnt == 0) init_drawing_frame (); - else if (currprefs.cpu_cycle_exact) + else if (currprefs.cpu_memory_cycle_exact) init_hardware_for_drawing_frame (); } else { if (isvsync_chipset ()) diff --git a/expansion.cpp b/expansion.cpp index 1c3b0c6d..8fb95547 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -4884,6 +4884,17 @@ const struct expansionromtype expansionroms[] = { false, 0, NULL, { 0x80, 2, 0x10, 0x00, 6502 >> 8, 6502 & 255, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, +#if 0 + { + _T("pmx"), _T("pmx"), NULL, + pmx_init, NULL, NULL, ROMTYPE_PMX | ROMTYPE_NOT, 0, 0, BOARD_AUTOCONFIG_Z2, true, + NULL, 0, + false, EXPANSIONTYPE_SOUND, + 0, 0, 0, false, NULL, + false, 0, NULL, + { 0xc1, 0x30, 0x00, 0x00, 0x0e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + }, +#endif /* Network */ { @@ -5272,6 +5283,7 @@ static const struct cpuboardsubtype mtec_sub[] = { NULL } }; + static const struct expansionboardsettings ivsvector_settings[] = { { // 0/1 @@ -5391,6 +5403,16 @@ static const struct cpuboardsubtype ivs_sub[] = { } }; +static const struct expansionboardsettings apollo_settings[] = { + { + _T("SCSI module installed"), + _T("scsi") + }, + { + NULL + } +}; + static const struct cpuboardsubtype apollo_sub[] = { { _T("Apollo 1240/1260"), @@ -5400,7 +5422,8 @@ static const struct cpuboardsubtype apollo_sub[] = { BOARD_MEMORY_HIGHMEM, 128 * 1024 * 1024, 0, - apollo_init_cpu, NULL, 2, 0 + apollo_init_cpu, NULL, 2, 0, + apollo_settings }, { NULL diff --git a/fpp.cpp b/fpp.cpp index 39f11077..1328f0f0 100644 --- a/fpp.cpp +++ b/fpp.cpp @@ -485,7 +485,7 @@ bool fpu_get_constant(fpdata *fpd, int cr) entry = FPP_CR_1E4096; break; default: // undefined, return 0.0 - write_log (_T("Undocumented FPU constant access (index %02x\n"), entry); + write_log (_T("Undocumented FPU constant access (index %02x)\n"), cr); valid = false; entry = FPP_CR_ZERO; break; diff --git a/gencpu.cpp b/gencpu.cpp index ee2a757a..68475877 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -95,7 +95,7 @@ static const char *srcblrmw, *srcwlrmw, *srcllrmw; static const char *dstblrmw, *dstwlrmw, *dstllrmw; static const char *srcbrmw, *srcwrmw, *srclrmw; static const char *dstbrmw, *dstwrmw, *dstlrmw; -static const char *prefetch_long, *prefetch_word; +static const char *prefetch_long, *prefetch_word, *prefetch_opcode; static const char *srcli, *srcwi, *srcbi, *nextl, *nextw; static const char *srcld, *dstld; static const char *srcwd, *dstwd; @@ -245,16 +245,23 @@ static void get_prefetch_020 (void) { if (!isprefetch020() || no_prefetch_ce020) return; - printf ("\tregs.irc = %s (%d);\n", prefetch_word, m68k_pc_offset); + printf ("\tregs.irc = %s (%d);\n", prefetch_opcode, m68k_pc_offset); } static void get_prefetch_020_continue(void) { if (!isprefetch020()) return; - if (using_ce020) - printf("\tcontinue_ce020_prefetch();\n"); - else - printf ("\tcontinue_020_prefetch();\n"); + if (using_ce020) { + if (using_ce020 > 1) + printf("\tcontinue_ce030_prefetch();\n"); + else + printf("\tcontinue_ce020_prefetch();\n"); + } else { + if (using_prefetch_020 > 1) + printf ("\tcontinue_030_prefetch();\n"); + else + printf ("\tcontinue_020_prefetch();\n"); + } } static void returntail (bool iswrite) @@ -289,7 +296,7 @@ static void returntail (bool iswrite) if (total_ce020 > 0) addcycles_ce020 (total_ce020); - //printf ("\tregs.irc = %s;\n", prefetch_word); + //printf ("\tregs.irc = %s;\n", prefetch_opcode); if (0 && total_ce020 >= 2) { printf ("\top_cycles = get_cycles () - op_cycles;\n"); printf ("\top_cycles /= cpucycleunit;\n"); @@ -926,10 +933,9 @@ static void addopcycles_ce20 (int h, int t, int c, int subhead) } if (1) { if (h > 0) { - printf ("\tif (regs.ce020memcycles > %d * cpucycleunit)\n", h); - printf ("\t\tregs.ce020memcycles = %d * cpucycleunit;\n", h); + printf ("\tlimit_cycles_ce020(%d);\n", h); } else { - printf ("\tregs.ce020memcycles = 0;\n"); + printf ("\tlimit_all_cycles_ce020();\n"); } } } @@ -974,7 +980,7 @@ static void addopcycles_ce20 (int h, int t, int c, int subhead) if (h < 0) h = 0; - //c = 0; + c = 0; // HACK // c = internal cycles needed after head cycles and before tail cycles. Not total cycles. addcycles_ce020 ("op", h, t, c - h - t, -subhead); @@ -1018,7 +1024,7 @@ static void addcycles_ea_ce020 (const char *ea, int h, int t, int c, int oph) c = c - h - t; - //c = 0; + c = 0; // HACK if (!oph) { printf ("\t/* ea H:%d,T:%d,C:%d %s */\n", h, t, c, ea); @@ -1035,10 +1041,9 @@ static void addcycles_ea_ce020 (const char *ea, int h, int t, int c, int oph) } if (h) { - printf ("\tif (regs.ce020memcycles > %d * cpucycleunit)\n", h); - printf ("\t\tregs.ce020memcycles = %d * cpucycleunit;\n", h); + printf ("\tlimit_cycles_ce020(%d);\n", h); } else { - printf ("\tregs.ce020memcycles = 0;\n"); + printf ("\tlimit_all_cycles_ce020();\n"); } if (1 && c > 0) { @@ -2757,6 +2762,7 @@ static void resetvars (void) got_ea_ce020 = false; prefetch_long = NULL; + prefetch_opcode = NULL; srcli = NULL; srcbi = NULL; disp000 = "get_disp_ea_000"; @@ -2813,6 +2819,7 @@ static void resetvars (void) disp020 = "x_get_disp_ea_ce020"; prefetch_word = "get_word_ce020_prefetch"; prefetch_long = "get_long_ce020_prefetch"; + prefetch_opcode = "get_word_ce020_prefetch_opcode"; srcli = "x_get_ilong"; srcwi = "x_get_iword"; srcbi = "x_get_ibyte"; @@ -2830,6 +2837,7 @@ static void resetvars (void) disp020 = "x_get_disp_ea_ce030"; prefetch_long = "get_long_ce030_prefetch"; prefetch_word = "get_word_ce030_prefetch"; + prefetch_opcode = "get_word_ce030_prefetch_opcode"; srcli = "x_get_ilong"; srcwi = "x_get_iword"; srcbi = "x_get_ibyte"; @@ -3069,6 +3077,8 @@ static void resetvars (void) dstwlrmw = dstw; dstllrmw = dstl; } + if (!prefetch_opcode) + prefetch_opcode = prefetch_word; } @@ -3612,8 +3622,10 @@ static void gen_opcode (unsigned int opcode) sync_m68k_pc (); } else { + int prefetch_done = 0, flags; int dualprefetch = curi->dmode == absl && (curi->smode != Dreg && curi->smode != Areg && curi->smode != imm); + genamode (curi, curi->smode, "srcreg", curi->size, "src", 1, 0, 0); flags = GF_MOVE | GF_APDI; //if (curi->size == sz_long && (curi->smode == Dreg || curi->smode == Areg)) diff --git a/idecontrollers.cpp b/idecontrollers.cpp index 93c37f73..a3c934ef 100644 --- a/idecontrollers.cpp +++ b/idecontrollers.cpp @@ -636,7 +636,7 @@ static uae_u32 ide_read_byte(struct ide_board *board, uaecptr addr) v = board->rom[(addr - APOLLO_ROM_OFFSET) & board->rom_mask]; } else if (board->configured) { if ((addr & 0xc000) == 0x4000) { - v = apollo_scsi_bget(oaddr); + v = apollo_scsi_bget(oaddr, board->userdata); } else if (addr < 0x4000) { int regnum = get_apollo_reg(addr, board); if (regnum >= 0) { @@ -881,9 +881,9 @@ static uae_u32 ide_read_word(struct ide_board *board, uaecptr addr) } else if (board->type == APOLLO_IDE) { if ((addr & 0xc000) == 0x4000) { - v = apollo_scsi_bget(addr); + v = apollo_scsi_bget(addr, board->userdata); v <<= 8; - v |= apollo_scsi_bget(addr + 1); + v |= apollo_scsi_bget(addr + 1, board->userdata); } else if (addr < 0x4000) { int regnum = get_apollo_reg(addr, board); if (regnum == IDE_DATA) { @@ -1074,7 +1074,7 @@ static void ide_write_byte(struct ide_board *board, uaecptr addr, uae_u8 v) } else if (board->type == APOLLO_IDE) { if ((addr & 0xc000) == 0x4000) { - apollo_scsi_bput(oaddr, v); + apollo_scsi_bput(oaddr, v, board->userdata); } else if (addr < 0x4000) { int regnum = get_apollo_reg(addr, board); if (regnum >= 0) { @@ -1225,8 +1225,8 @@ static void ide_write_word(struct ide_board *board, uaecptr addr, uae_u16 v) } else if (board->type == APOLLO_IDE) { if ((addr & 0xc000) == 0x4000) { - apollo_scsi_bput(addr, v >> 8); - apollo_scsi_bput(addr + 1, v); + apollo_scsi_bput(addr, v >> 8, board->userdata); + apollo_scsi_bput(addr + 1, v, board->userdata); } else if (addr < 0x4000) { int regnum = get_apollo_reg(addr, board); if (regnum == IDE_DATA) { @@ -1619,6 +1619,12 @@ static bool apollo_init(struct autoconfig_info *aci, bool cpuboard) if (!ide) return false; + if (cpuboard) { + ide->userdata = currprefs.cpuboard_settings & 3; + } else { + ide->userdata = aci->rc->autoboot_disabled ? 2 : 0; + } + ide->configured = 0; ide->bank = &ide_bank_generic; ide->rom_size = 32768; diff --git a/include/arcadia.h b/include/arcadia.h index 57f051fb..0b7fa4b6 100644 --- a/include/arcadia.h +++ b/include/arcadia.h @@ -28,14 +28,15 @@ extern int arcadia_flag, arcadia_coin[2]; extern int alg_flag; extern void alg_map_banks(void); -extern void alg_serial_read(uae_u16 v); -extern int alg_serial_write(void); extern bool alg_ld_active(void); extern uae_u16 alg_potgor(uae_u16); extern uae_u16 alg_joydat(int, uae_u16); extern uae_u8 alg_joystick_buttons(uae_u8, uae_u8, uae_u8); +extern void ld_serial_read(uae_u16 v); +extern int ld_serial_write(void); + #endif /* ARCADIA */ #endif /* UAE_ARCADIA_H */ diff --git a/include/cpu_prefetch.h b/include/cpu_prefetch.h index 1e199af9..7699bc21 100644 --- a/include/cpu_prefetch.h +++ b/include/cpu_prefetch.h @@ -32,12 +32,19 @@ STATIC_INLINE uae_u32 get_long_020_prefetch (int o) #ifdef CPUEMU_21 -#define CE020_INITCYCLES() \ - int head = 0, tail = 0, cycles = 0; \ - unsigned int cu = get_cycles (); -#define CE020_SAVECYCLES(h,t,c) \ - head = h; tail = t; cycles = c; -#define CE020_COUNTCYCLES() +STATIC_INLINE void limit_cycles_ce020(int clocks) +{ + int cycs = clocks * cpucycleunit; + int diff = regs.ce020endcycle - regs.ce020startcycle; + if (diff <= cycs) + return; + regs.ce020startcycle = regs.ce020endcycle - cycs; +} + +STATIC_INLINE void limit_all_cycles_ce020(void) +{ + regs.ce020startcycle = regs.ce020endcycle; +} // only for CPU internal cycles STATIC_INLINE void do_cycles_ce020_internal(int clocks) @@ -47,6 +54,16 @@ STATIC_INLINE void do_cycles_ce020_internal(int clocks) return; } int cycs = clocks * cpucycleunit; + int diff = regs.ce020endcycle - regs.ce020startcycle; + if (diff > 0) { + if (diff >= cycs) { + regs.ce020startcycle += cycs; + return; + } + regs.ce020startcycle = regs.ce020endcycle; + cycs -= diff; + } +#if 0 if (regs.ce020memcycles > 0) { if (regs.ce020memcycles >= cycs) { regs.ce020memcycles -= cycs; @@ -55,6 +72,7 @@ STATIC_INLINE void do_cycles_ce020_internal(int clocks) cycs = cycs - regs.ce020memcycles; } regs.ce020memcycles = 0; +#endif x_do_cycles (cycs); } @@ -115,6 +133,7 @@ STATIC_INLINE void put_byte_ce020 (uaecptr addr, uae_u32 v) extern void continue_ce020_prefetch(void); extern uae_u32 get_word_ce020_prefetch(int); +extern uae_u32 get_word_ce020_prefetch_opcode(int); STATIC_INLINE uae_u32 get_long_ce020_prefetch (int o) { @@ -157,6 +176,7 @@ STATIC_INLINE void m68k_do_rts_ce020 (void) #ifdef CPUEMU_22 +extern void continue_030_prefetch(void); extern uae_u32 get_word_030_prefetch(int); STATIC_INLINE void put_long_030(uaecptr addr, uae_u32 v) @@ -221,7 +241,9 @@ STATIC_INLINE void m68k_do_rts_030(void) #ifdef CPUEMU_23 +extern void continue_ce030_prefetch(void); extern uae_u32 get_word_ce030_prefetch(int); +extern uae_u32 get_word_ce030_prefetch_opcode(int); STATIC_INLINE void put_long_ce030 (uaecptr addr, uae_u32 v) { diff --git a/include/disk.h b/include/disk.h index ae993a3b..348b81c5 100644 --- a/include/disk.h +++ b/include/disk.h @@ -86,6 +86,8 @@ extern void DISK_reinsert (int num); extern int disk_prevnext (int drive, int dir); extern int disk_prevnext_name (TCHAR *img, int dir); +extern bool gui_ask_disk(int drv, TCHAR*); + extern void DSKLEN (uae_u16 v, int hpos); extern uae_u16 DSKBYTR (int hpos); extern void DSKSYNC (int, uae_u16); diff --git a/include/inputdevice.h b/include/inputdevice.h index 8fe5702a..52efc323 100644 --- a/include/inputdevice.h +++ b/include/inputdevice.h @@ -197,7 +197,7 @@ extern int inputdevice_get_device_status (int devnum); extern void inputdevice_set_device_status (int devnum, int enabled); extern int inputdevice_get_device_total (int type); extern int inputdevice_get_widget_num (int devnum); -extern int inputdevice_get_widget_type (int devnum, int num, TCHAR *name); +extern int inputdevice_get_widget_type (int devnum, int num, TCHAR *name, bool inccode); extern int send_input_event (int nr, int state, int max, int autofire); extern int input_get_default_mouse (struct uae_input_device *uid, int num, int port, int af, bool gp, bool wheel, bool joymouseswap); diff --git a/include/newcpu.h b/include/newcpu.h index 5d6020fd..8aa7a38f 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -218,7 +218,11 @@ struct regstruct int pipeline_pos; int pipeline_r8[2]; int pipeline_stop; - int ce020memcycles; + + int ce020endcycle; + int ce020startcycle; + int ce020prefetchendcycle; + int ce020extracycles; bool ce020memcycle_data; int ce020_tail; diff --git a/include/options.h b/include/options.h index 33ab811b..29863b78 100644 --- a/include/options.h +++ b/include/options.h @@ -16,7 +16,7 @@ #define UAEMAJOR 3 #define UAEMINOR 4 -#define UAESUBREV 0 +#define UAESUBREV 1 typedef enum { KBD_LANG_US, KBD_LANG_DK, KBD_LANG_DE, KBD_LANG_SE, KBD_LANG_FR, KBD_LANG_IT, KBD_LANG_ES } KbdLang; @@ -189,6 +189,7 @@ struct uaedev_config_info { TCHAR volname[MAX_DPATH]; TCHAR rootdir[MAX_DPATH]; bool readonly; + bool lock; int bootpri; TCHAR filesys[MAX_DPATH]; int lowcyl; diff --git a/include/rommgr.h b/include/rommgr.h index 67714024..0a81e22f 100644 --- a/include/rommgr.h +++ b/include/rommgr.h @@ -147,6 +147,7 @@ extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size); #define ROMTYPE_ARIADNE 0x0010005d #define ROMTYPE_HARDFRAME 0x0010005e #define ROMTYPE_ATEAM 0x0010005f +#define ROMTYPE_PMX 0x00100060 #define ROMTYPE_NOT 0x00800000 #define ROMTYPE_QUAD 0x01000000 diff --git a/include/scsi.h b/include/scsi.h index 0636614b..4baf06a8 100644 --- a/include/scsi.h +++ b/include/scsi.h @@ -161,8 +161,8 @@ uae_u32 soft_scsi_get(uaecptr addr, int size); void ncr80_rethink(void); -void apollo_scsi_bput(uaecptr addr, uae_u8 v); -uae_u8 apollo_scsi_bget(uaecptr addr); +void apollo_scsi_bput(uaecptr addr, uae_u8 v, uae_u32 config); +uae_u8 apollo_scsi_bget(uaecptr addr, uae_u32 config); void apollo_add_scsi_unit(int ch, struct uaedev_config_info *ci, struct romconfig *rc); void ivsvector_scsi_bput(uaecptr addr, uae_u8 v); diff --git a/include/sndboard.h b/include/sndboard.h index 11e3bbdb..93f46501 100644 --- a/include/sndboard.h +++ b/include/sndboard.h @@ -17,5 +17,8 @@ bool uaesndboard_init_z3(struct autoconfig_info *aci); void uaesndboard_free(void); void uaesndboard_reset(void); +bool pmx_init(struct autoconfig_info *aci); +void pmx_free(void); +void pmx_reset(void); #endif /* UAE_SNDBOARD_H */ diff --git a/include/uae/mman.h b/include/uae/mman.h index 53fc8cc0..91a2c6e8 100644 --- a/include/uae/mman.h +++ b/include/uae/mman.h @@ -39,6 +39,7 @@ struct uae_mman_data uae_u32 readonlysize; bool maprom; bool directsupport; + bool hasbarrier; }; bool uae_mman_info(addrbank *ab, struct uae_mman_data *md); diff --git a/inputdevice.cpp b/inputdevice.cpp index 3975948d..4cf32289 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -116,6 +116,7 @@ struct uae_input_device2 { #define INPUT_MATCH_CONFIG_NAME_ONLY 1 #define INPUT_MATCH_FRIENDLY_NAME_ONLY 2 #define INPUT_MATCH_BOTH 4 +#define INPUT_MATCH_ALL 7 static struct uae_input_device2 joysticks2[MAX_INPUT_DEVICES]; static struct uae_input_device2 mice2[MAX_INPUT_DEVICES]; @@ -1933,7 +1934,7 @@ void inputdevice_parse_jport_custom(struct uae_prefs *pr, int index, int port, T if (outname[0] != 0) _tcscat(outname, _T(", ")); const TCHAR *ps = ie->shortname ? ie->shortname : ie->name; - if (inputdevice_get_widget_type(devnum, num, tmp)) { + if (inputdevice_get_widget_type(devnum, num, tmp, false)) { if (tmp[0]) { _tcscat(outname, tmp); _tcscat(outname, _T("=")); @@ -6635,7 +6636,7 @@ static void disableifempty (struct uae_prefs *prefs) prefs->internalevent_settings[0]->enabled = true; } -static void matchdevices(struct uae_prefs *p, struct inputdevice_functions *inf, struct uae_input_device *uid) +static void matchdevices(struct uae_prefs *p, struct inputdevice_functions *inf, struct uae_input_device *uid, int match_mask) { int i, j; @@ -6656,10 +6657,10 @@ static void matchdevices(struct uae_prefs *p, struct inputdevice_functions *inf, if (fullmatch) { if (!bname1 || aname1) continue; - if (!(p->input_device_match_mask & INPUT_MATCH_BOTH)) + if (!(match_mask & INPUT_MATCH_BOTH)) continue; } else { - if (!(p->input_device_match_mask & INPUT_MATCH_CONFIG_NAME_ONLY)) + if (!(match_mask & INPUT_MATCH_CONFIG_NAME_ONLY)) continue; } @@ -6698,7 +6699,7 @@ static void matchdevices(struct uae_prefs *p, struct inputdevice_functions *inf, if (match == -2) { for (j = 0; j < MAX_INPUT_DEVICES; j++) { TCHAR *bname2 = uid[j].configname; - if (aname2 && bname2 && (p->input_device_match_mask & INPUT_MATCH_CONFIG_NAME_ONLY) && !_tcscmp (aname2, bname2)) { + if (aname2 && bname2 && (match_mask & INPUT_MATCH_CONFIG_NAME_ONLY) && !_tcscmp (aname2, bname2)) { match = j; break; } @@ -6708,7 +6709,7 @@ static void matchdevices(struct uae_prefs *p, struct inputdevice_functions *inf, // no match, try friendly names only for (j = 0; j < MAX_INPUT_DEVICES; j++) { TCHAR *bname1 = uid[j].name; - if (aname1 && bname1 && (p->input_device_match_mask & INPUT_MATCH_FRIENDLY_NAME_ONLY) && !_tcscmp (aname1, bname1)) { + if (aname1 && bname1 && (match_mask & INPUT_MATCH_FRIENDLY_NAME_ONLY) && !_tcscmp (aname1, bname1)) { match = j; break; } @@ -6741,9 +6742,9 @@ static void matchdevices_all (struct uae_prefs *prefs) { int i; for (i = 0; i < MAX_INPUT_SETTINGS; i++) { - matchdevices(prefs, &idev[IDTYPE_MOUSE], prefs->mouse_settings[i]); - matchdevices(prefs, &idev[IDTYPE_JOYSTICK], prefs->joystick_settings[i]); - matchdevices(prefs, &idev[IDTYPE_KEYBOARD], prefs->keyboard_settings[i]); + matchdevices(prefs, &idev[IDTYPE_MOUSE], prefs->mouse_settings[i], prefs->input_device_match_mask); + matchdevices(prefs, &idev[IDTYPE_JOYSTICK], prefs->joystick_settings[i], prefs->input_device_match_mask); + matchdevices(prefs, &idev[IDTYPE_KEYBOARD], prefs->keyboard_settings[i], INPUT_MATCH_ALL); } } @@ -6774,7 +6775,7 @@ bool inputdevice_set_gameports_mapping (struct uae_prefs *prefs, int devnum, int keyboards = prefs->keyboard_settings[input_selected_setting]; sub = 0; - if (inputdevice_get_widget_type (devnum, num, NULL) != IDEV_WIDGET_KEY) { + if (inputdevice_get_widget_type (devnum, num, NULL, false) != IDEV_WIDGET_KEY) { for (sub = 0; sub < MAX_INPUT_SUB_EVENT; sub++) { int port2 = 0; int evt = inputdevice_get_mapping (devnum, num, NULL, &port2, NULL, NULL, sub); @@ -6994,9 +6995,9 @@ void inputdevice_devicechange (struct uae_prefs *prefs) idev[IDTYPE_JOYSTICK].init (); idev[IDTYPE_MOUSE].init (); idev[IDTYPE_KEYBOARD].init (); - matchdevices (prefs, &idev[IDTYPE_MOUSE], mice); - matchdevices (prefs, &idev[IDTYPE_JOYSTICK], joysticks); - matchdevices (prefs, &idev[IDTYPE_KEYBOARD], keyboards); + matchdevices (prefs, &idev[IDTYPE_MOUSE], mice, prefs->input_device_match_mask); + matchdevices (prefs, &idev[IDTYPE_JOYSTICK], joysticks, prefs->input_device_match_mask); + matchdevices (prefs, &idev[IDTYPE_KEYBOARD], keyboards, INPUT_MATCH_ALL); // find out which one was removed or inserted for (int j = 0; j <= IDTYPE_KEYBOARD; j++) { @@ -7833,10 +7834,17 @@ int inputdevice_set_mapping (int devnum, int num, const TCHAR *name, TCHAR *cust return 0; } -int inputdevice_get_widget_type (int devnum, int num, TCHAR *name) +int inputdevice_get_widget_type (int devnum, int num, TCHAR *name, bool inccode) { + uae_u32 code = 0; const struct inputdevice_functions *idf = getidf (devnum); - return idf->get_widget_type (inputdevice_get_device_index (devnum), num, name, 0); + int r = idf->get_widget_type (inputdevice_get_device_index (devnum), num, name, &code); + if (r && inccode && &idev[IDTYPE_KEYBOARD] == idf) { + TCHAR *p = name + _tcslen(name); + if (_tcsncmp(name, _T("KEY_"), 4)) + _stprintf(p, _T(" [0x%02X]"), code); + } + return r; } static int config_change; @@ -8493,7 +8501,7 @@ void warpmode (int mode) currprefs.turbo_emulation = fr; } if (currprefs.turbo_emulation) { - if (!currprefs.cpu_cycle_exact && !currprefs.blitter_cycle_exact) + if (!currprefs.cpu_memory_cycle_exact && !currprefs.blitter_cycle_exact) changed_prefs.gfx_framerate = currprefs.gfx_framerate = 10; pause_sound (); } else { diff --git a/main.cpp b/main.cpp index e9ad1341..9cebae5e 100644 --- a/main.cpp +++ b/main.cpp @@ -296,6 +296,10 @@ void fixup_cpu (struct uae_prefs *p) error_log (_T("JIT is not compatible with unimplemented CPU/FPU instruction emulation.")); p->fpu_no_unimplemented = p->int_no_unimplemented = false; } + if (p->cachesize && p->compfpu && p->fpu_softfloat) { + error_log (_T("JIT FPU emulation is not compatible with softfloat FPU emulation.")); + p->fpu_softfloat = false; + } #if 0 if (p->cpu_cycle_exact && p->m68k_speed < 0 && currprefs.cpu_model <= 68020) @@ -652,7 +656,7 @@ void fixup_prefs (struct uae_prefs *p, bool userconfig) p->uaeserial = 0; #endif #if defined (CPUEMU_13) - if (p->cpu_cycle_exact) { + if (p->cpu_memory_cycle_exact) { if (p->gfx_framerate > 1) { error_log (_T("Cycle-exact requires disabled frameskip.")); p->gfx_framerate = 1; diff --git a/memory.cpp b/memory.cpp index c024d4a9..fd2d2d27 100644 --- a/memory.cpp +++ b/memory.cpp @@ -1809,8 +1809,11 @@ bool mapped_malloc (addrbank *ab) return true; } ab->baseaddr = xcalloc (uae_u8, ab->reserved_size + 4); - if (ab->baseaddr) + if (ab->baseaddr) { + // fill end of ram with ILLEGAL to catch direct PC falling out of RAM. + put_long_host(ab->baseaddr + ab->reserved_size, 0x4afc4afc); ab->allocated_size = ab->reserved_size; + } #if MAPPED_MALLOC_DEBUG write_log(_T("mapped_malloc nodirect %s %p\n"), ab->name, ab->baseaddr); #endif @@ -1846,8 +1849,13 @@ bool mapped_malloc (addrbank *ab) x->next->prev = x; shm_start = x; ab->baseaddr = x->native_address; - if (ab->baseaddr) + if (ab->baseaddr) { + if (md.hasbarrier) { + // fill end of ram with ILLEGAL to catch direct PC falling out of RAM. + put_long_host(ab->baseaddr + ab->reserved_size, 0x4afc4afc); + } ab->allocated_size = ab->reserved_size; + } ab->flags |= ABFLAG_DIRECTMAP; #if MAPPED_MALLOC_DEBUG write_log(_T("mapped_malloc direct %s %p\n"), ab->name, ab->baseaddr); @@ -2222,7 +2230,10 @@ void map_overlay (int chip) map_banks (&chipmem_dummy_bank, start, dummy, 0); } } else { - map_banks(cb, 0, 32, chipmem_bank.allocated_size); + int mapsize = 32; + if ((chipmem_bank.allocated_size >> 16) > mapsize) + mapsize = chipmem_bank.allocated_size >> 16; + map_banks(cb, 0, mapsize, chipmem_bank.allocated_size); } } else { map_banks (cb, 0, chipmem_bank.allocated_size >> 16, 0); diff --git a/newcpu.cpp b/newcpu.cpp index aaecfc1b..b60427c2 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -37,7 +37,7 @@ #include "inputrecord.h" #include "inputdevice.h" #include "audio.h" -#include "md-fpp.h" +#include "fpp.h" #include "statusline.h" #include "uae/ppc.h" #include "cpuboard.h" @@ -1511,7 +1511,7 @@ static void update_68k_cycles (void) cpucycleunit /= 2; } else if (currprefs.cpu_frequency) { cpucycleunit = CYCLE_UNIT * baseclock / currprefs.cpu_frequency; - } else if (currprefs.cpu_cycle_exact && currprefs.cpu_clock_multiplier == 0) { + } else if (currprefs.cpu_memory_cycle_exact && currprefs.cpu_clock_multiplier == 0) { if (currprefs.cpu_model >= 68040) { cpucycleunit = CYCLE_UNIT / 16; } if (currprefs.cpu_model == 68030) { @@ -1560,7 +1560,8 @@ static int check_prefs_changed_cpu2(void) || currprefs.fpu_no_unimplemented != changed_prefs.fpu_no_unimplemented || currprefs.cpu_compatible != changed_prefs.cpu_compatible || currprefs.cpu_cycle_exact != changed_prefs.cpu_cycle_exact - || currprefs.cpu_memory_cycle_exact != changed_prefs.cpu_memory_cycle_exact) { + || currprefs.cpu_memory_cycle_exact != changed_prefs.cpu_memory_cycle_exact + || currprefs.fpu_softfloat != changed_prefs.fpu_softfloat) { cpu_prefs_changed_flag |= 1; } if (changed @@ -1787,24 +1788,24 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode case sz_single: { fpdata fp; - to_single(&fp, get_ilong_debug(pc)); - _stprintf(buffer, _T("#%s"), fp_print(&fp)); + fpp_to_single(&fp, get_ilong_debug(pc)); + _stprintf(buffer, _T("#%s"), fpp_print(&fp)); pc += 4; } break; case sz_double: { fpdata fp; - to_double(&fp, get_ilong_debug(pc), get_ilong_debug(pc + 4)); - _stprintf(buffer, _T("#%s"), fp_print(&fp)); + fpp_to_double(&fp, get_ilong_debug(pc), get_ilong_debug(pc + 4)); + _stprintf(buffer, _T("#%s"), fpp_print(&fp)); pc += 8; } break; case sz_extended: { fpdata fp; - to_exten(&fp, get_ilong_debug(pc), get_ilong_debug(pc + 4), get_ilong_debug(pc + 8)); - _stprintf(buffer, _T("#%s"), fp_print(&fp)); + fpp_to_exten(&fp, get_ilong_debug(pc), get_ilong_debug(pc + 4), get_ilong_debug(pc + 8)); + _stprintf(buffer, _T("#%s"), fpp_print(&fp)); pc += 12; break; } @@ -3010,6 +3011,15 @@ void REGPARAM2 ExceptionL (int nr, uaecptr address) ExceptionX (nr, address); } +static void bus_error(void) +{ + TRY (prb2) { + Exception (2); + } CATCH (prb2) { + cpu_halt (CPU_HALT_BUS_ERROR_DOUBLE_FAULT); + } ENDTRY +} + static void do_interrupt (int nr) { if (debug_dma) @@ -3153,7 +3163,8 @@ static void m68k_reset2(bool hardreset) if (kickstart_rom) regs.pcr |= 2; /* disable FPU */ } - regs.ce020memcycles = 0; +// regs.ce020memcycles = 0; + regs.ce020startcycle = regs.ce020endcycle = 0; fill_prefetch (); } @@ -3264,6 +3275,12 @@ uae_u32 REGPARAM2 op_illg (uae_u32 opcode) int inrom = in_rom (pc); int inrt = in_rtarea (pc); + if ((opcode == 0x4afc || opcode == 0xfc4a) && !valid_address(pc, 4) && valid_address(pc - 4, 4)) { + // PC fell off the end of RAM + bus_error(); + return 4; + } + if (cloanto_rom && (opcode & 0xF100) == 0x7100) { m68k_dreg (regs, (opcode >> 9) & 7) = (uae_s8)(opcode & 0xFF); m68k_incpc_normal (2); @@ -4109,15 +4126,6 @@ static void out_cd32io (uae_u32 pc) #endif -static void bus_error(void) -{ - TRY (prb2) { - Exception (2); - } CATCH (prb2) { - cpu_halt (CPU_HALT_BUS_ERROR_DOUBLE_FAULT); - } ENDTRY -} - #ifndef CPUEMU_11 static void m68k_run_1 (void) @@ -5234,10 +5242,19 @@ static void m68k_run_2p (void) inprec_playdebug_cpu (1); } - x_do_cycles (cpu_cycles); + if (currprefs.cpu_memory_cycle_exact) { - cpu_cycles = (*cpufunctbl[r->opcode])(r->opcode); - cpu_cycles = adjust_cycles (cpu_cycles); + (*cpufunctbl[r->opcode])(r->opcode); + cpu_cycles = 0; + + } else { + + x_do_cycles (cpu_cycles); + + cpu_cycles = (*cpufunctbl[r->opcode])(r->opcode); + cpu_cycles = adjust_cycles (cpu_cycles); + + } cont: if (r->spcflags) { if (do_specialties (cpu_cycles)) @@ -5505,6 +5522,7 @@ void m68k_go (int may_quit) if (cpu_prefs_changed_flag & 1) { uaecptr pc = m68k_getpc(); prefs_changed_cpu(); + fpu_modechange(); build_cpufunctbl(); m68k_setpc_normal(pc); fill_prefetch(); @@ -6495,7 +6513,8 @@ uae_u8 *restore_cpu (uae_u8 *src) } } if (model >= 68020) { - regs.ce020memcycles = restore_u32 (); + restore_u32 (); // regs.ce020memcycles + regs.ce020startcycle = regs.ce020endcycle = 0; restore_u32 (); } } @@ -6842,7 +6861,7 @@ uae_u8 *save_cpu (int *len, uae_u8 *dstptr) save_u32(regs.prefetch020[i]); } if (currprefs.cpu_model >= 68020) { - save_u32 (regs.ce020memcycles); + save_u32 (0); //save_u32 (regs.ce020memcycles); save_u32 (0); } save_u32 (regs.chipset_latch_rw); @@ -7115,9 +7134,36 @@ void mem_access_delay_word_write (uaecptr addr, uae_u32 v) put_word (addr, v); } +static void start_020_cycle(void) +{ + regs.ce020startcycle = get_cycles(); +} + +static void start_020_cycle_prefetch(bool opcode) +{ + regs.ce020startcycle = get_cycles(); + // back to back prefetch cycles require 2 extra cycles (maybe) + if (opcode && regs.ce020startcycle == regs.ce020prefetchendcycle && currprefs.cpu_cycle_exact) { + x_do_cycles(2 * cpucycleunit); + regs.ce020startcycle = get_cycles(); + } +} +static void end_020_cycle(void) +{ + regs.ce020endcycle = get_cycles(); +} +static void end_020_cycle_prefetch(bool opcode) +{ + regs.ce020endcycle = get_cycles(); + if (opcode) { + regs.ce020prefetchendcycle = regs.ce020endcycle; + } else { + regs.ce020prefetchendcycle = regs.ce020startcycle; + } +} // this one is really simple and easy -static void fill_icache020 (uae_u32 addr, uae_u32 (*fetch)(uaecptr)) +static void fill_icache020 (uae_u32 addr, uae_u32 (*fetch)(uaecptr), bool opcode) { int index; uae_u32 tag; @@ -7137,18 +7183,22 @@ static void fill_icache020 (uae_u32 addr, uae_u32 (*fetch)(uaecptr)) return; } // cache miss +#if 0 // Prefetch apparently can be queued by bus controller // even if bus controller is currently processing // previous data access. // Other combinations are not possible. - if (!regs.ce020memcycle_data) + if (!regs.ce020memcycle_data) { + if (regs.ce020memcycles > 0) + x_do_cycles (regs.ce020memcycles); regs.ce020memcycles = 0; - regs.ce020memcycle_data = false; - unsigned long cycs = get_cycles (); + } +#endif + + start_020_cycle_prefetch(opcode); data = fetch (addr); - // add as available "free" internal CPU time. - cycs = get_cycles () - cycs; - regs.ce020memcycles += cycs; + end_020_cycle_prefetch(opcode); + if (!(regs.cacr & 2)) { c->tag = tag; c->valid = !!(regs.cacr & 1); @@ -7245,7 +7295,7 @@ static void pipeline_020(uae_u16 w, uaecptr pc) #endif -uae_u32 get_word_ce020_prefetch (int o) +static uae_u32 get_word_ce020_prefetch_2 (int o, bool opcode) { uae_u32 pc = m68k_getpc () + o; uae_u32 v; @@ -7258,7 +7308,7 @@ uae_u32 get_word_ce020_prefetch (int o) regs.prefetch020[0] = regs.prefetch020[1]; // branch instruction detected in pipeline: stop fetches until branch executed. if (!MORE_ACCURATE_68020_PIPELINE || regs.pipeline_stop >= 0) { - fill_icache020 (pc + 2 + 4, mem_access_delay_longi_read_ce020); + fill_icache020 (pc + 2 + 4, mem_access_delay_longi_read_ce020, opcode); regs.prefetch020[1] = regs.cacheholdingdata020; } regs.db = regs.prefetch020[0] >> 16; @@ -7273,6 +7323,16 @@ uae_u32 get_word_ce020_prefetch (int o) return v; } +uae_u32 get_word_ce020_prefetch (int o) +{ + return get_word_ce020_prefetch_2(o, false); +} + +uae_u32 get_word_ce020_prefetch_opcode (int o) +{ + return get_word_ce020_prefetch_2(o, true); +} + uae_u32 get_word_020_prefetch (int o) { uae_u32 pc = m68k_getpc () + o; @@ -7285,7 +7345,7 @@ uae_u32 get_word_020_prefetch (int o) #endif regs.prefetch020[0] = regs.prefetch020[1]; if (!MORE_ACCURATE_68020_PIPELINE || regs.pipeline_stop >= 0) { - fill_icache020 (pc + 2 + 4, currprefs.cpu_memory_cycle_exact ? mem_access_delay_longi_read_ce020 : get_longi); + fill_icache020 (pc + 2 + 4, currprefs.cpu_memory_cycle_exact ? mem_access_delay_longi_read_ce020 : get_longi, false); regs.prefetch020[1] = regs.cacheholdingdata020; } regs.db = regs.prefetch020[0] >> 16; @@ -7301,6 +7361,7 @@ uae_u32 get_word_020_prefetch (int o) // these are also used by 68030. +#if 0 #define RESET_CE020_CYCLES \ regs.ce020memcycles = 0; \ regs.ce020memcycle_data = true; @@ -7308,12 +7369,12 @@ uae_u32 get_word_020_prefetch (int o) unsigned long cycs = get_cycles () #define ADD_CE020_CYCLES \ regs.ce020memcycles += get_cycles () - cycs +#endif uae_u32 mem_access_delay_long_read_ce020 (uaecptr addr) { uae_u32 v; - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7343,7 +7404,7 @@ uae_u32 mem_access_delay_long_read_ce020 (uaecptr addr) v = get_long (addr); break; } - ADD_CE020_CYCLES; + end_020_cycle(); return v; } @@ -7385,8 +7446,7 @@ uae_u32 mem_access_delay_longi_read_ce020 (uaecptr addr) uae_u32 mem_access_delay_word_read_ce020 (uaecptr addr) { uae_u32 v; - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7410,15 +7470,14 @@ uae_u32 mem_access_delay_word_read_ce020 (uaecptr addr) v = get_word (addr); break; } - ADD_CE020_CYCLES; + end_020_cycle(); return v; } uae_u32 mem_access_delay_byte_read_ce020 (uaecptr addr) { uae_u32 v; - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7434,14 +7493,13 @@ uae_u32 mem_access_delay_byte_read_ce020 (uaecptr addr) v = get_byte (addr); break; } - ADD_CE020_CYCLES; + end_020_cycle(); return v; } void mem_access_delay_byte_write_ce020 (uaecptr addr, uae_u32 v) { - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7457,13 +7515,12 @@ void mem_access_delay_byte_write_ce020 (uaecptr addr, uae_u32 v) put_byte (addr, v); break; } - ADD_CE020_CYCLES; + end_020_cycle(); } void mem_access_delay_word_write_ce020 (uaecptr addr, uae_u32 v) { - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7487,13 +7544,12 @@ void mem_access_delay_word_write_ce020 (uaecptr addr, uae_u32 v) put_word (addr, v); break; } - ADD_CE020_CYCLES; + end_020_cycle(); } void mem_access_delay_long_write_ce020 (uaecptr addr, uae_u32 v) { - RESET_CE020_CYCLES; - STORE_CE020_CYCLES; + start_020_cycle(); switch (ce_banktype[addr >> 16]) { case CE_MEMBANK_CHIP16: @@ -7523,7 +7579,7 @@ void mem_access_delay_long_write_ce020 (uaecptr addr, uae_u32 v) put_long (addr, v); break; } - ADD_CE020_CYCLES; + end_020_cycle(); } @@ -7573,14 +7629,10 @@ static void fill_icache030 (uae_u32 addr) // cache miss if (currprefs.cpu_cycle_exact) { - if (!regs.ce020memcycle_data) - regs.ce020memcycles = 0; regs.ce020memcycle_data = false; - unsigned long cycs = get_cycles (); + start_020_cycle_prefetch(false); data = mem_access_delay_longi_read_ce020 (addr); - // add as available "free" internal CPU time. - cycs = get_cycles () - cycs; - regs.ce020memcycles += cycs; + end_020_cycle_prefetch(false); } else if (currprefs.cpu_memory_cycle_exact) { data = mem_access_delay_longi_read_ce020 (addr); } else { @@ -7788,7 +7840,7 @@ uae_u32 read_dcache030 (uaecptr addr, int size) return 0; } -uae_u32 get_word_ce030_prefetch (int o) +static uae_u32 get_word_ce030_prefetch_2 (int o) { uae_u32 pc = m68k_getpc () + o; uae_u32 v; @@ -7814,6 +7866,15 @@ uae_u32 get_word_ce030_prefetch (int o) return v; } +uae_u32 get_word_ce030_prefetch (int o) +{ + return get_word_ce030_prefetch_2(o); +} +uae_u32 get_word_ce030_prefetch_opcode (int o) +{ + return get_word_ce030_prefetch_2(o); +} + uae_u32 get_word_030_prefetch(int o) { uae_u32 pc = m68k_getpc() + o; @@ -8269,7 +8330,7 @@ void fill_prefetch_030_ntx (void) #endif if (currprefs.cpu_cycle_exact) - regs.irc = get_word_ce030_prefetch (0); + regs.irc = get_word_ce030_prefetch_opcode (0); else regs.irc = get_word_030_prefetch(0); } @@ -8284,12 +8345,12 @@ void fill_prefetch_020_ntx(void) regs.pipeline_stop = 0; regs.pipeline_r8[0] = regs.pipeline_r8[1] = -1; - fill_icache020 (pc, fetch); + fill_icache020 (pc, fetch, true); if (currprefs.cpu_cycle_exact) do_cycles_ce020_internal(2); regs.prefetch020[0] = regs.cacheholdingdata020; - fill_icache020 (pc + 4, fetch); + fill_icache020 (pc + 4, fetch, true); if (currprefs.cpu_cycle_exact) do_cycles_ce020_internal(2); regs.prefetch020[1] = regs.cacheholdingdata020; @@ -8305,7 +8366,7 @@ void fill_prefetch_020_ntx(void) #endif if (currprefs.cpu_cycle_exact) - regs.irc = get_word_ce020_prefetch (0); + regs.irc = get_word_ce020_prefetch_opcode (0); else regs.irc = get_word_020_prefetch (0); } @@ -8320,6 +8381,15 @@ void continue_020_prefetch(void) fill_prefetch_020_ntx(); } +void continue_ce030_prefetch(void) +{ + fill_prefetch_030_ntx(); +} +void continue_030_prefetch(void) +{ + fill_prefetch_030_ntx(); +} + void fill_prefetch_020(void) { fill_prefetch_020_ntx(); diff --git a/od-win32/direct3d.cpp b/od-win32/direct3d.cpp index ac9c1f21..2ad8953d 100644 --- a/od-win32/direct3d.cpp +++ b/od-win32/direct3d.cpp @@ -1071,12 +1071,12 @@ static int psEffect_SetTextures (LPDIRECT3DTEXTURE9 lpSource, struct shaderdata } } if (s->m_TargetDimsEffectHandle) { - D3DXVECTOR4 fDims2; - fDims2.x = s->targettex_width; - fDims2.y = s->targettex_height; - fDims2.z = 1; - fDims2.w = 1; - hr = s->pEffect->SetVector(s->m_TargetDimsEffectHandle, &fDims2); + D3DXVECTOR4 fDimsTarget; + fDimsTarget.x = s->targettex_width; + fDimsTarget.y = s->targettex_height; + fDimsTarget.z = 1; + fDimsTarget.w = 1; + hr = s->pEffect->SetVector(s->m_TargetDimsEffectHandle, &fDimsTarget); if (FAILED(hr)) { write_log(_T("%s: SetTextures:SetVector:Target %s\n"), D3DHEAD, D3D_ErrorString(hr)); return 0; @@ -3053,6 +3053,27 @@ static void D3D_render2 (void) if (FAILED (hr = postEffect->SetTexture (postSourceTextureHandle, srctex))) write_log (_T("%s: SetTexture(srctex) failed: %s\n"), D3DHEAD, D3D_ErrorString (hr)); + if (s->m_SourceDimsEffectHandle) { + D3DXVECTOR4 fDimsSource; + fDimsSource.x = (FLOAT)Desc.Width; + fDimsSource.y = (FLOAT)Desc.Height; + fDimsSource.z = 1; fDimsSource.w = 1; + hr = postEffect->SetVector(s->m_SourceDimsEffectHandle, &fDimsSource); + if (FAILED(hr)) { + write_log(_T("%s: SetTextures:SetVector:Source %s\n"), D3DHEAD, D3D_ErrorString(hr)); + } + } + if (s->m_TargetDimsEffectHandle) { + D3DXVECTOR4 fDimsTarget; + fDimsTarget.x = s->targettex_width; + fDimsTarget.y = s->targettex_height; + fDimsTarget.z = 1; fDimsTarget.w = 1; + hr = postEffect->SetVector(s->m_TargetDimsEffectHandle, &fDimsTarget); + if (FAILED(hr)) { + write_log(_T("%s: SetTextures:SetVector:Target %s\n"), D3DHEAD, D3D_ErrorString(hr)); + } + } + if (after >= 0) { if (FAILED (hr = d3ddev->GetRenderTarget (0, &lpRenderTarget))) write_log (_T("%s: GetRenderTarget: %s\n"), D3DHEAD, D3D_ErrorString (hr)); diff --git a/od-win32/hardfile_win32.cpp b/od-win32/hardfile_win32.cpp index a43ba450..d33f7802 100644 --- a/od-win32/hardfile_win32.cpp +++ b/od-win32/hardfile_win32.cpp @@ -36,12 +36,16 @@ static int usefloppydrives = 0; static int num_drives; static bool drives_enumerated; +#define MAX_LOCKED_VOLUMES 8 + struct hardfilehandle { int zfile; struct zfile *zf; HANDLE h; BOOL firstwrite; + HANDLE locked_volumes[MAX_LOCKED_VOLUMES]; + bool dismounted; }; struct uae_driveinfo { @@ -79,7 +83,7 @@ int harddrive_dangerous; // = 0x1234dead; // test only! int do_rdbdump; static struct uae_driveinfo uae_drives[MAX_FILESYSTEM_UNITS]; -#if 1 +#if 0 static void fixdrive (struct hardfiledata *hfd) { uae_u8 data[512]; @@ -195,7 +199,7 @@ static int ismounted (const TCHAR *name, HANDLE hd) return 0; mounted = 0; h = FindFirstVolume (volname, sizeof volname / sizeof (TCHAR)); - while (h && !mounted) { + while (h != INVALID_HANDLE_VALUE && !mounted) { HANDLE d; if (volname[_tcslen (volname) - 1] == '\\') volname[_tcslen (volname) - 1] = 0; @@ -243,7 +247,7 @@ static int ismounted (const TCHAR *name, HANDLE hd) } CloseHandle (d); } else { - write_log (_T("'%s': %d\n"), volname, GetLastError ()); + hdf_log2 (_T("'%s': %d\n"), volname, GetLastError ()); } if (!FindNextVolume (h, volname, sizeof volname / sizeof (TCHAR))) break; @@ -548,6 +552,109 @@ static bool getdeviceinfo (HANDLE hDevice, struct uae_driveinfo *udi) return true; } +static void lock_drive(struct hardfiledata *hfd, const TCHAR *name, HANDLE drvhandle) +{ + DWORD written; + TCHAR volname[MAX_DPATH]; + DWORD sign, pstyle; + bool ntfs_found = false; + + if (!hfd->ci.lock) + return; + + // single partition FAT drives seem to lock this way, without need for administrator privileges + if (DeviceIoControl(drvhandle, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &written, NULL)) { + if (DeviceIoControl(drvhandle, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &written, NULL)) { + write_log(_T("'%s' locked and dismounted successfully.\n"), name); + hfd->handle->dismounted = true; + return; + } + } + + if (!getsignfromhandle (drvhandle, &sign, &pstyle)) + return; + HANDLE h = FindFirstVolume (volname, sizeof volname / sizeof (TCHAR)); + while (h != INVALID_HANDLE_VALUE) { + bool isntfs = false; + if (volname[_tcslen (volname) - 1] == '\\') + volname[_tcslen (volname) - 1] = 0; + HANDLE d = CreateFile (volname, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (d != INVALID_HANDLE_VALUE) { + if (DeviceIoControl (d, FSCTL_IS_VOLUME_MOUNTED, NULL, 0, NULL, 0, &written, NULL)) { + VOLUME_DISK_EXTENTS *vde; + NTFS_VOLUME_DATA_BUFFER ntfs; + if (DeviceIoControl (d, FSCTL_GET_NTFS_VOLUME_DATA, NULL, 0, &ntfs, sizeof ntfs, &written, NULL)) { + isntfs = true; + } + DWORD outsize = sizeof (VOLUME_DISK_EXTENTS) + sizeof (DISK_EXTENT) * 32; + vde = (VOLUME_DISK_EXTENTS*)xmalloc (uae_u8, outsize); + if (DeviceIoControl (d, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, NULL, 0, vde, outsize, &written, NULL)) { + for (int i = 0; i < vde->NumberOfDiskExtents; i++) { + int mounted = 0; + TCHAR pdrv[MAX_DPATH]; + _stprintf (pdrv, _T("\\\\.\\PhysicalDrive%d"), vde->Extents[i].DiskNumber); + HANDLE ph = CreateFile (pdrv, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (ph != INVALID_HANDLE_VALUE) { + DWORD sign2, pstyle2; + if (getsignfromhandle (ph, &sign2, &pstyle2)) { + if (sign == sign2 && pstyle == PARTITION_STYLE_MBR) { + if (isntfs) + ntfs_found = true; + mounted = isntfs ? -1 : 1; + } + } + CloseHandle(ph); + if (mounted > 0) { + for (int j = 0; j < MAX_LOCKED_VOLUMES; j++) { + if (hfd->handle->locked_volumes[j] == INVALID_HANDLE_VALUE) { + write_log(_T("%d: Partition found: PhysicalDrive%d: Extent %d Start=%I64X Len=%I64X\n"), i, + j, vde->Extents[i].DiskNumber, vde->Extents[i].StartingOffset.QuadPart, vde->Extents[i].ExtentLength.QuadPart); + hfd->handle->locked_volumes[j] = d; + d = INVALID_HANDLE_VALUE; + break; + } + } + } + } + } + } else { + write_log (_T("IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returned %08x\n"), GetLastError ()); + } + } + if (d != INVALID_HANDLE_VALUE) + CloseHandle (d); + } + if (!FindNextVolume (h, volname, sizeof volname / sizeof (TCHAR))) + break; + } + FindVolumeClose(h); + + if (ntfs_found) { + write_log(_T("Not locked: At least one NTFS partition detected.\n")); + } + + for (int i = 0; i < MAX_LOCKED_VOLUMES; i++) { + HANDLE d = hfd->handle->locked_volumes[i]; + if (d != INVALID_HANDLE_VALUE) { + if (ntfs_found) { + CloseHandle(d); + hfd->handle->locked_volumes[i] = INVALID_HANDLE_VALUE; + } else { + if (DeviceIoControl(d, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &written, NULL)) { + if (DeviceIoControl(d, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &written, NULL)) { + write_log(_T("ID=%d locked and dismounted successfully.\n"), i, name); + } else { + write_log (_T("WARNING: ID=%d FSCTL_DISMOUNT_VOLUME returned %d\n"), i, GetLastError()); + } + } else { + write_log (_T("WARNING: ID=%d FSCTL_LOCK_VOLUME returned %d\n"), i, GetLastError()); + } + } + } + } +} + int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) { HANDLE h = INVALID_HANDLE_VALUE; @@ -569,6 +676,9 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) goto end; } hfd->handle = xcalloc (struct hardfilehandle, 1); + for(int i = 0; i < MAX_LOCKED_VOLUMES; i++) { + hfd->handle->locked_volumes[i] = INVALID_HANDLE_VALUE; + } hfd->handle->h = INVALID_HANDLE_VALUE; hfd_log (_T("hfd attempting to open: '%s'\n"), name); if (name[0] == ':') { @@ -576,15 +686,15 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) TCHAR *p = _tcschr (name + 1, ':'); if (p) { *p++ = 0; - if (!drives_enumerated) { - // do not scan for drives if open succeeds and it is a harddrive - // to prevent spinup of sleeping drives - h = CreateFile (p, - GENERIC_READ, - FILE_SHARE_READ, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL); - DWORD err = GetLastError (); - if (h == INVALID_HANDLE_VALUE && err == ERROR_FILE_NOT_FOUND) + // do not scan for drives if open succeeds and it is a harddrive + // to prevent spinup of sleeping drives + h = CreateFile (p, + GENERIC_READ, + FILE_SHARE_READ, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL); + DWORD err = GetLastError (); + if (h == INVALID_HANDLE_VALUE && err == ERROR_FILE_NOT_FOUND) { + if (!drives_enumerated) goto emptyreal; } } @@ -612,7 +722,6 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) udi = &uae_drives[drvnum]; } if (udi != NULL) { - DWORD r; hfd->flags = HFD_FLAGS_REALDRIVE; if (udi) { if (udi->nomedia) @@ -646,8 +755,6 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) ret = -1; goto end; } - if (!DeviceIoControl (h, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &r, NULL)) - write_log (_T("WARNING: '%s' FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n"), name, GetLastError ()); //queryidentifydevice (hfd); _tcsncpy (hfd->vendor_id, udi->vendor_id, 8); @@ -674,8 +781,6 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) hfd->handle->h = h; if (h == INVALID_HANDLE_VALUE) goto end; - if (!DeviceIoControl(h, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &r, NULL)) - write_log (_T("WARNING: '%s' FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n"), name, GetLastError ()); } #if 0 @@ -695,6 +800,8 @@ int hdf_open_target (struct hardfiledata *hfd, const TCHAR *pname) hfd->warned = -1; #endif } + lock_drive(hfd, name, h); + hfd->handle_valid = HDF_HANDLE_WIN32; hfd->emptyname = my_strdup (name); @@ -793,8 +900,13 @@ static void freehandle (struct hardfilehandle *h) { if (!h) return; + for (int i = 0; i < MAX_LOCKED_VOLUMES; i++) { + if (h->locked_volumes[i] != INVALID_HANDLE_VALUE) { + CloseHandle(h->locked_volumes[i]); + } + } if (!h->zfile && h->h != INVALID_HANDLE_VALUE) - CloseHandle (h->h); + CloseHandle(h->h); if (h->zfile && h->zf) zfile_fclose (h->zf); h->zf = NULL; @@ -802,6 +914,11 @@ static void freehandle (struct hardfilehandle *h) h->zfile = 0; } +HANDLE hdf_get_real_handle(struct hardfilehandle *h) +{ + return h->h; +} + void hdf_close_target (struct hardfiledata *hfd) { freehandle (hfd->handle); @@ -1239,7 +1356,7 @@ static int getstorageproperty (PUCHAR outBuf, int returnedLength, struct uae_dri write_log (_T("too short STORAGE_DEVICE_DESCRIPTOR only %d bytes\n"), size); return -2; } - if (devDesc->DeviceType != INQ_DASD && devDesc->DeviceType != INQ_ROMD && devDesc->DeviceType != INQ_OPTD) { + if (devDesc->DeviceType != INQ_DASD && devDesc->DeviceType != INQ_ROMD && devDesc->DeviceType != INQ_OPTD && devDesc->DeviceType != INQ_OMEM) { write_log (_T("not a direct access device, ignored (type=%d)\n"), devDesc->DeviceType); return -2; } @@ -2038,6 +2155,7 @@ int harddrive_to_hdf (HWND hDlg, struct uae_prefs *p, int idx) HWND hwnd, hwndprogress, hwndprogresstxt; MSG msg; int pct, cnt; + DWORD r; cache = VirtualAlloc (NULL, COPY_CACHE_SIZE, MEM_COMMIT, PAGE_READWRITE); if (!cache) @@ -2056,6 +2174,12 @@ int harddrive_to_hdf (HWND hDlg, struct uae_prefs *p, int idx) CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | FILE_FLAG_NO_BUFFERING, NULL); if (hdst == INVALID_HANDLE_VALUE) goto err; + if (!DeviceIoControl(h, FSCTL_ALLOW_EXTENDED_DASD_IO, NULL, 0, NULL, 0, &r, NULL)) { + write_log (_T("WARNING: '%s' FSCTL_ALLOW_EXTENDED_DASD_IO returned %d\n"), path, GetLastError ()); + } + if (!DeviceIoControl(h, FSCTL_LOCK_VOLUME , NULL, 0, NULL, 0, &r, NULL)) { + write_log (_T("WARNING: '%s' FSCTL_LOCK_VOLUME returned %d\n"), path, GetLastError ()); + } li.QuadPart = size; ret = SetFilePointer (hdst, li.LowPart, &li.HighPart, FILE_BEGIN); if (ret == INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR) @@ -2068,7 +2192,7 @@ int harddrive_to_hdf (HWND hDlg, struct uae_prefs *p, int idx) SetFilePointer (h, 0, &li.HighPart, FILE_BEGIN); progressdialogreturn = -1; progressdialogactive = 1; - hwnd = CreateDialog (hUIDLL ? hUIDLL : hInst, MAKEINTRESOURCE (IDD_PROGRESSBAR), hDlg, ProgressDialogProc); + hwnd = CustomCreateDialog(IDD_PROGRESSBAR, hDlg, ProgressDialogProc); if (hwnd == NULL) goto err; hwndprogress = GetDlgItem (hwnd, IDC_PROGRESSBAR); diff --git a/od-win32/mman.cpp b/od-win32/mman.cpp index 9140cdad..c15ff786 100644 --- a/od-win32/mman.cpp +++ b/od-win32/mman.cpp @@ -734,7 +734,9 @@ bool uae_mman_info(addrbank *ab, struct uae_mman_data *md) } else if (!_tcscmp(ab->label, _T("chip"))) { start = 0; got = true; - if (!expansion_get_autoconfig_by_address(&currprefs, 0x00200000) || currprefs.chipmem_size < 2 * 1024 * 1024) + if (!expansion_get_autoconfig_by_address(&currprefs, 0x00200000) && currprefs.chipmem_size == 2 * 1024 * 1024) + barrier = true; + if (currprefs.chipmem_size > 2 * 1024 * 1024) barrier = true; } else if (!_tcscmp(ab->label, _T("kick"))) { start = 0xf80000; @@ -867,6 +869,7 @@ bool uae_mman_info(addrbank *ab, struct uae_mman_data *md) md->readonly = readonly; md->readonlysize = readonlysize; md->maprom = maprom; + md->hasbarrier = barrier; if (start_rtg && end_rtg) { if (start < start_rtg || start + size > end_rtg) @@ -876,7 +879,7 @@ bool uae_mman_info(addrbank *ab, struct uae_mman_data *md) directsupport = false; } md->directsupport = directsupport; - if (barrier) { + if (md->hasbarrier) { md->size += BARRIER; } } diff --git a/od-win32/resources/resource.h b/od-win32/resources/resource.h index 07a0b648..5c0e594f 100644 --- a/od-win32/resources/resource.h +++ b/od-win32/resources/resource.h @@ -546,6 +546,7 @@ #define IDC_16BIT 1231 #define IDC_PPC_CPUIDLE 1231 #define IDC_11KHZ 1232 +#define IDC_FPU_SOFTFLOAT 1232 #define IDC_22KHZ 1233 #define IDC_SPEED_x86 1233 #define IDC_44KHZ 1234 @@ -1145,6 +1146,7 @@ #define IDC_HDFINFO 1779 #define IDC_DBG_AUTOSET 1780 #define IDC_HF_SPARSE 1780 +#define IDC_HDF_LOCK 1780 #define IDC_DBG_DASM2 1781 #define IDC_HF_DYNAMIC 1781 #define IDC_DBG_MEM2 1782 diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 6c893aab..37435b69 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -309,6 +309,7 @@ BEGIN CONTROL "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,143,299,72,10 CONTROL "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,221,299,72,10 CONTROL "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,299,68,11 + CONTROL "Softfloat FPU emulation",IDC_FPU_SOFTFLOAT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,285,115,10 END IDD_FLOPPY DIALOGEX 0, 0, 396, 261 @@ -929,7 +930,7 @@ BEGIN EDITTEXT IDC_HDFINFO,5,29,385,12,ES_CENTER | ES_READONLY EDITTEXT IDC_HDFINFO2,5,46,385,12,ES_CENTER | ES_READONLY DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,5,67,158,14 - EDITTEXT IDC_PATH_NAME,178,67,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE + EDITTEXT IDC_PATH_NAME,178,67,41,15,ES_AUTOHSCROLL | NOT WS_VISIBLE CONTROL "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,315,71,60,10 COMBOBOX IDC_HDF_CONTROLLER_UNIT,65,90,97,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HDF_CONTROLLER_TYPE,178,90,97,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP @@ -937,6 +938,7 @@ BEGIN COMBOBOX IDC_HDF_CONTROLLER,8,113,218,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "Add hard drive",IDOK,236,113,73,14 PUSHBUTTON "Cancel",IDCANCEL,316,113,73,14 + CONTROL "Lock",IDC_HDF_LOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,243,71,61,10 END IDD_MISC2 DIALOGEX 0, 0, 396, 278 @@ -1090,7 +1092,7 @@ BEGIN END IDD_PROGRESSBAR DIALOGEX 0, 0, 396, 58 -STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Processing..." FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN @@ -1231,16 +1233,16 @@ BEGIN CONTROL "",IDC_LISTDIALOG_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,302,171 END -IDD_CDDRIVE DIALOGEX 0, 0, 395, 109 +IDD_CDDRIVE DIALOGEX 0, 0, 395, 125 STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "CD Settings" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN RTEXT "HD Controller:",IDC_STATIC,7,90,65,10,SS_CENTERIMAGE - COMBOBOX IDC_HDF_CONTROLLER,80,89,122,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HDF_CONTROLLER_UNIT,208,89,25,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "Add CD Drive",IDOK,238,89,73,14 - PUSHBUTTON "Cancel",IDCANCEL,318,89,73,14 + COMBOBOX IDC_HDF_CONTROLLER,80,89,154,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_HDF_CONTROLLER_UNIT,239,89,71,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "Add CD Drive",IDOK,121,108,73,14 + PUSHBUTTON "Cancel",IDCANCEL,201,108,73,14 CONTROL "",IDC_CDLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,4,4,387,77 END @@ -1256,8 +1258,8 @@ BEGIN PUSHBUTTON "Eject",IDC_TAPE_EJECT,278,36,105,15 RTEXT "HD Controller:",IDC_STATIC,7,60,65,10,SS_CENTERIMAGE COMBOBOX IDC_HDF_CONTROLLER,79,58,148,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HDF_CONTROLLER_UNIT,235,58,31,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - CONTROL "Read/write",IDC_TAPE_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,277,58,67,10 + COMBOBOX IDC_HDF_CONTROLLER_UNIT,235,58,52,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CONTROL "Read/write",IDC_TAPE_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,58,84,10 DEFPUSHBUTTON "Add Tape Drive",IDOK,106,75,88,14 PUSHBUTTON "Cancel",IDCANCEL,200,76,88,14 END @@ -1318,8 +1320,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,4,0,0 - PRODUCTVERSION 3,4,0,0 + FILEVERSION 3,4,1,0 + PRODUCTVERSION 3,4,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -1335,12 +1337,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "WinUAE" - VALUE "FileVersion", "3.4.0.0" + VALUE "FileVersion", "3.4.1.0" VALUE "InternalName", "WinUAE" - VALUE "LegalCopyright", "© 1996-2016 under the GNU Public License (GPL)" + VALUE "LegalCopyright", "© 1996-2017 under the GNU Public License (GPL)" VALUE "OriginalFilename", "WinUAE.exe" VALUE "ProductName", "WinUAE" - VALUE "ProductVersion", "3.4.0.0" + VALUE "ProductVersion", "3.4.1.0" END END BLOCK "VarFileInfo" diff --git a/od-win32/resources/winuae_minimal.rc b/od-win32/resources/winuae_minimal.rc index e153eb8d..537e8ef1 100644 --- a/od-win32/resources/winuae_minimal.rc +++ b/od-win32/resources/winuae_minimal.rc @@ -102,6 +102,17 @@ END // Dialog // +IDD_BOARDS DIALOGEX 0, 0, 396, 259 +STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD +EXSTYLE WS_EX_CONTEXTHELP +FONT 8, "MS Sans Serif", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_BOARDLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,2,18,390,220 + CONTROL "Custom board order",IDC_AUTOCONFIGCUSTOMSORT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,242,99,12 + PUSHBUTTON "Move up",IDC_BOARDS_UP,114,241,78,14 + PUSHBUTTON "Move down",IDC_BOARDS_DOWN,203,241,78,14 +END + IDD_KICKSTART DIALOGEX 0, 0, 396, 259 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTEXTHELP @@ -162,6 +173,7 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,154,139,10 CONTROL "VGA mode resolution autoswitch [] Automatically selects between hires and superhires in programmed display modes, keeping correct aspect ratio.",IDC_AUTORESOLUTIONVGA, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,154,124,10 + CONTROL "Monochrome video out",IDC_GRAYSCALE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,167,139,10 RTEXT "Resolution:",IDC_STATIC,24,192,110,8,SS_CENTERIMAGE COMBOBOX IDC_LORES,142,191,127,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP RTEXT "Resolution autoswitch:",IDC_STATIC,92,212,110,8,SS_CENTERIMAGE @@ -191,10 +203,9 @@ BEGIN CONTROL "Double, frames",IDC_LM_IDOUBLED,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,251,90,10 CONTROL "Double, fields",IDC_LM_IDOUBLED2,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,264,90,10 CONTROL "Double, fields+",IDC_LM_IDOUBLED3,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_TABSTOP,299,277,90,10 - CONTROL "Monochrome video out",IDC_GRAYSCALE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,167,139,10 END -IDD_MEMORY DIALOGEX 0, 0, 396, 246 +IDD_MEMORY DIALOGEX 0, 0, 396, 266 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD EXSTYLE WS_EX_CONTEXTHELP FONT 8, "MS Sans Serif", 0, 0, 0x1 @@ -216,19 +227,25 @@ BEGIN CONTROL "",IDC_Z3CHIPMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,248,71,60,20 EDITTEXT IDC_Z3CHIPRAM,311,76,40,12,ES_CENTER | ES_READONLY EDITTEXT IDC_MAX32RAM,14,99,366,12,ES_CENTER | ES_READONLY - GROUPBOX "Advanced Memory Settings",IDC_STATIC,1,134,393,107 - RTEXT "Motherboard Fast:",IDC_STATIC,116,149,129,10,SS_CENTERIMAGE - CONTROL "",IDC_MBMEM1,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,251,145,68,20 - EDITTEXT IDC_MBRAM1,326,148,40,12,ES_CENTER | ES_READONLY - RTEXT "Processor Slot Fast:",IDC_STATIC,116,172,129,10,SS_CENTERIMAGE - CONTROL "",IDC_MBMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,251,168,68,20 - EDITTEXT IDC_MBRAM2,326,171,40,12,ES_CENTER | ES_READONLY - RTEXT "Second Z2 Fast RAM board:",IDC_STATIC,129,194,116,15,SS_CENTERIMAGE - CONTROL "",IDC_FASTMEM2,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,251,193,68,20 - EDITTEXT IDC_FASTRAM2,326,196,40,12,ES_CENTER | ES_READONLY - RTEXT "Z3 mapping mode:",IDC_STATIC,149,219,93,15,SS_CENTERIMAGE - COMBOBOX IDC_Z3MAPPING,249,220,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Autoconfig Z2 Fast RAM",IDC_FASTMEMAUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,194,120,10 + GROUPBOX "Advanced Memory Settings",IDC_STATIC,1,128,393,137 + COMBOBOX IDC_MEMORYSELECT,14,151,228,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_MEMORYMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,253,145,68,20 + EDITTEXT IDC_MEMORYRAM,328,148,40,12,ES_CENTER | ES_READONLY + RTEXT "Manufacturer",IDC_STATIC,12,175,57,15,SS_CENTERIMAGE + EDITTEXT IDC_AUTOCONFIG_MANUFACTURER,78,175,45,13,ES_AUTOHSCROLL + RTEXT "Product",IDC_STATIC,133,175,55,15,SS_CENTERIMAGE + EDITTEXT IDC_AUTOCONFIG_PRODUCT,196,175,45,13,ES_AUTOHSCROLL + RTEXT "Autoconfig data",IDC_STATIC,11,195,57,15,SS_CENTERIMAGE + EDITTEXT IDC_AUTOCONFIG_DATA,78,194,164,13,ES_AUTOHSCROLL + CONTROL "Edit Autoconfig data",IDC_FASTMEMAUTOCONFIGUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,177,103,8 + CONTROL "Manual configuration",IDC_FASTMEMNOAUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,195,103,8 + RTEXT "Memory board",IDC_STATIC,15,216,53,15,SS_CENTERIMAGE + COMBOBOX IDC_MEMORYBOARDSELECT,77,216,165,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Z3 mapping mode:",IDC_STATIC,263,215,115,15,SS_CENTERIMAGE + RTEXT "Address range",IDC_STATIC,10,237,57,15,SS_CENTERIMAGE + EDITTEXT IDC_RAM_ADDRESS,77,237,79,13,ES_AUTOHSCROLL + EDITTEXT IDC_RAM_ADDRESS2,164,237,79,13,ES_AUTOHSCROLL + COMBOBOX IDC_Z3MAPPING,262,237,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END IDD_CPU DIALOGEX 0, 0, 396, 317 @@ -237,20 +254,29 @@ FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN GROUPBOX "CPU",IDC_STATIC,1,1,129,184,BS_LEFT CONTROL "68000",IDC_CPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,19,63,10 - CONTROL "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,33,63,10 - CONTROL "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,46,63,10 - CONTROL "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,60,63,10 - CONTROL "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,74,63,10 - CONTROL "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,88,63,10 - CONTROL "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,108,119,12 + CONTROL "68010",IDC_CPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,32,63,10 + CONTROL "68020",IDC_CPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,45,63,10 + CONTROL "68030",IDC_CPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,58,63,10 + CONTROL "68040",IDC_CPU4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,71,63,10 + CONTROL "68060",IDC_CPU5,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,84,63,10 + CONTROL "24-bit addressing",IDC_COMPATIBLE24,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,107,119,12 CONTROL "More compatible [] 68000: emulate prefetch. 68020+: emulate prefetch partially. More compatible but slower.",IDC_COMPATIBLE, "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,121,118,11 CONTROL "JIT [] Enable just-in-time CPU emulator. Significantly increases the speed of the CPU emulation. Requires 68020 or higher CPU.",IDC_JITENABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,135,120,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,134,120,11 CONTROL "MMU [] 68030, 68040 and 68060 MMU emulation. Not compatible with JIT.",IDC_MMUENABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,148,120,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,147,120,11 CONTROL "Unimplemented CPU emu [] Emulate 68060 unimplemented integer instructions",IDC_CPU_UNIMPLEMENTED, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,161,118,10 + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,160,118,10 + GROUPBOX "FPU",IDC_STATIC,1,188,129,128,BS_LEFT + CONTROL "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,204,87,10 + CONTROL "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,217,87,10 + CONTROL "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,230,87,10 + CONTROL "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,243,93,10 + CONTROL "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,259,117,10 + CONTROL "Unimplemented FPU emu [] Emulate FPU unimplemented instructions",IDC_FPU_UNIMPLEMENTED, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,272,116,10 GROUPBOX "CPU Emulation Speed",IDC_STATIC,136,1,258,97 CONTROL "Fastest possible",IDC_CS_HOST,"Button",BS_AUTORADIOBUTTON | BS_LEFT | WS_GROUP | WS_TABSTOP,143,19,195,10 CONTROL "Approximate A500/A1200 or cycle-exact",IDC_CS_68000, @@ -264,34 +290,25 @@ BEGIN RTEXT "CPU Frequency",IDC_STATIC,139,121,67,10,SS_CENTERIMAGE COMBOBOX IDC_CPU_FREQUENCY,215,120,89,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_CPU_FREQUENCY2,312,119,70,15 - GROUPBOX "FPU",IDC_STATIC,1,188,129,128,BS_LEFT - CONTROL "None",IDC_FPU0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,202,87,10 - CONTROL "68881",IDC_FPU1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,216,87,10 - CONTROL "68882",IDC_FPU2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,229,87,10 - CONTROL "CPU internal",IDC_FPU3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,243,93,10 - CONTROL "More compatible [] More compatible but slower FPU emulation.",IDC_COMPATIBLE_FPU, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,259,117,10 - CONTROL "Unimplemented FPU emu [] Emulate FPU unimplemented instructions",IDC_FPU_UNIMPLEMENTED, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,8,272,116,10 + GROUPBOX "PPC CPU options",IDC_STATIC,136,144,258,57 + CONTROL "PPC CPU emulation (Blizzard PPC / CyberStorm PPC) [] Automatically configure CyberStorm PPC or Blizzard PPC setup.",IDC_CPU_PPC, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,145,161,236,10 + RTEXT "Stopped M68K CPU idle mode",IDC_STATIC,180,183,121,9 + CONTROL "",IDC_PPC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,308,177,69,21 + GROUPBOX "x86 Bridgeboard CPU options",IDC_STATIC,136,202,258,42 + RTEXT "CPU Speed",IDC_STATIC,147,221,55,9,SS_CENTERIMAGE + EDITTEXT IDC_CPUTEXT_x86,224,220,39,12,ES_CENTER | ES_READONLY + CONTROL "",IDC_SPEED_x86,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,278,215,108,20 GROUPBOX "Advanced JIT Settings",IDC_STATIC,136,245,258,70 RTEXT "Cache size:",IDC_STATIC,143,261,66,10,SS_CENTERIMAGE CONTROL "Slider1",IDC_CACHE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,212,255,115,20 EDITTEXT IDC_CACHETEXT,331,260,30,12,ES_CENTER | ES_READONLY - CONTROL "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,281,84,11 - CONTROL "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,281,71,11 CONTROL "FPU support",IDC_JITFPU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,143,281,71,11 - CONTROL "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,299,68,11 + CONTROL "Constant jump",IDC_CONSTJUMP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,221,281,71,11 + CONTROL "Hard flush",IDC_HARDFLUSH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,281,84,11 CONTROL "Direct",IDC_TRUST0,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,143,299,72,10 CONTROL "Indirect",IDC_TRUST1,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,221,299,72,10 - CONTROL "PPC CPU emulation (Blizzard PPC / CyberStorm PPC) [] Automatically configure CyberStorm PPC or Blizzard PPC setup.",IDC_CPU_PPC, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,145,161,236,10 - GROUPBOX "PPC CPU options",IDC_STATIC,136,144,258,57 - RTEXT "Stopped M68K CPU idle mode",IDC_STATIC,180,183,121,9 - CONTROL "",IDC_PPC_CPUIDLE,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,308,177,69,21 - CONTROL "",IDC_SPEED_x86,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,278,215,108,20 - RTEXT "CPU Speed",IDC_STATIC,147,221,55,9,SS_CENTERIMAGE - GROUPBOX "x86 Bridgeboard CPU options",IDC_STATIC,136,202,258,42 - EDITTEXT IDC_CPUTEXT_x86,224,220,39,12,ES_CENTER | ES_READONLY + CONTROL "No flags",IDC_NOFLAGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,299,299,68,11 END IDD_FLOPPY DIALOGEX 0, 0, 396, 261 @@ -362,17 +379,17 @@ BEGIN PUSHBUTTON "&Properties",IDC_EDIT,267,172,60,15 PUSHBUTTON "Remove",IDC_REMOVE,334,172,60,15 GROUPBOX "Options",IDC_STATIC,1,189,393,66 - CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,200,201,11 + CONTROL "Add PC drives at startup",IDC_MAPDRIVES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,200,201,11 CONTROL "Include removable drives..",IDC_MAPDRIVES_REMOVABLE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,213,201,11 - CONTROL "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,227,201,11 - CONTROL "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,241,201,11 - CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,200,167,11 - CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,213,167,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,213,201,11 + CONTROL "Include network drives..",IDC_MAPDRIVES_NET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,226,201,11 + CONTROL "CDFS automount CD/DVD drives",IDC_MAPDRIVES_CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,239,201,11 + CONTROL "Disable UAEFSDB-support",IDC_NOUAEFSDB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,200,167,11 + CONTROL "Don't use Windows Recycle Bin",IDC_NORECYCLEBIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,213,167,11 CONTROL "Automount removable drives [] Windows side insert or removal will immediately mount/remove it on Amiga side.",IDC_MAPDRIVES_AUTO, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,227,167,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,226,167,11 CONTROL "Limit size of directory drives to 1G [] Workaround for example old installers that calculate free space incorrectly if drive is large.",IDC_MAPDRIVES_LIMIT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,222,241,167,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,220,239,167,11 GROUPBOX "Optical media options",IDC_STATIC,1,256,393,59 LTEXT "CD drive/image",IDC_STATIC,5,268,70,10,SS_CENTERIMAGE PUSHBUTTON "Select image file",IDC_CD_SELECT,177,266,98,15 @@ -421,11 +438,13 @@ BEGIN COMBOBOX IDC_SOUNDFILTER,279,186,96,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Floppy Drive Sound Emulation",IDC_STATIC,1,209,278,91 CONTROL "",IDC_SOUNDDRIVEVOLUME,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,20,227,107,19 - EDITTEXT IDC_SOUNDDRIVEVOLUME2,144,231,48,12,ES_CENTER | ES_READONLY + EDITTEXT IDC_SOUNDDRIVEVOLUME2,145,231,48,12,ES_CENTER | ES_READONLY + LTEXT "Empty drive",IDC_STATIC,205,231,60,15,SS_CENTERIMAGE CONTROL "",IDC_SOUNDDRIVEVOLUMEX,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,20,254,107,19 - EDITTEXT IDC_SOUNDDRIVEVOLUMEX2,144,258,48,12,ES_CENTER | ES_READONLY - COMBOBOX IDC_SOUNDDRIVE,205,231,66,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_SOUNDDRIVESELECT,18,281,253,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_SOUNDDRIVEVOLUMEX2,145,258,48,12,ES_CENTER | ES_READONLY + LTEXT "Disk in drive",IDC_STATIC,205,258,60,15,SS_CENTERIMAGE + COMBOBOX IDC_SOUNDDRIVESELECT,18,281,175,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SOUNDDRIVE,205,281,66,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Drivers",IDC_STATIC,285,213,109,87 CONTROL "DirectSound",IDC_SOUND_DS,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,234,98,10 CONTROL "WASAPI",IDC_SOUND_WASAPI,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,292,248,98,10 @@ -477,10 +496,10 @@ BEGIN GROUPBOX "Serial Port",IDC_STATIC,1,137,393,51 COMBOBOX IDC_SERIAL,67,150,317,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Shared",IDC_SER_SHARED,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,32,171,66,12 - CONTROL "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,106,171,66,12 + CONTROL "RTS/CTS",IDC_SER_CTSRTS,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,107,171,66,12 CONTROL "Direct []Use when emulating serial-link games on two PCs running WinUAE",IDC_SER_DIRECT, - "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,181,171,83,12 - CONTROL "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,275,171,108,12 + "Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,182,171,83,12 + CONTROL "uaeserial.device",IDC_UAESERIAL,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,274,171,108,12 GROUPBOX "MIDI",IDC_STATIC,1,191,393,54,BS_LEFT RTEXT "Out:",IDC_MIDI,22,202,32,15,SS_CENTERIMAGE COMBOBOX IDC_MIDIOUTLIST,58,204,145,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -507,24 +526,25 @@ BEGIN COMBOBOX IDC_PORT1_JOYSMODE,136,74,106,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Remap / Test [] Remap or test Port 2 configuration.",IDC_PORT1_REMAP,310,74,78,14 PUSHBUTTON "Swap ports [] Swap ports 1 and 2.",IDC_SWAP,45,100,78,14 + CONTROL "Mouse/Joystick autoswitching [] Press button to automatically insert inactive input device in to joystick/mouse port",IDC_PORT_AUTOSWITCH, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,102,172,11 LTEXT "Emulated parallel port joystick adapter",IDC_STATIC,10,124,179,15,SS_CENTERIMAGE COMBOBOX IDC_PORT2_JOYS,45,142,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Remap / Test [] Remap or test Parallel port joystick port 1 configurarion.",IDC_PORT2_REMAP,310,159,78,14 COMBOBOX IDC_PORT3_JOYS,45,178,342,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Remap / Test [] Remap or test Parallel port joystick port 2 configurarion.",IDC_PORT3_REMAP,310,194,78,14 GROUPBOX "Mouse extra settings",IDC_STATIC,1,219,393,68 - RTEXT "Mouse speed:",IDC_STATIC,19,237,82,10,SS_CENTERIMAGE - EDITTEXT IDC_INPUTSPEEDM,115,237,25,13,ES_NUMBER - CONTROL "Magic Mouse",IDC_PORT_MOUSETRICK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,195,235,160,11 - RTEXT "Magic Mouse cursor mode:",IDC_STATIC,45,254,138,10,SS_CENTERIMAGE - COMBOBOX IDC_PORT_TABLET_CURSOR,195,251,119,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "Mouse speed:",IDC_STATIC,13,237,70,10,SS_CENTERIMAGE + EDITTEXT IDC_INPUTSPEEDM,97,237,25,13,ES_NUMBER CONTROL "Install virtual mouse driver",IDC_PORT_TABLET,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,270,116,11 + RTEXT "Mouse untrap mode:",IDC_STATIC,143,237,110,10,SS_CENTERIMAGE + COMBOBOX IDC_MOUSE_UNTRAPMODE,268,234,119,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "Magic Mouse cursor mode:",IDC_STATIC,143,253,110,10,SS_CENTERIMAGE + COMBOBOX IDC_PORT_TABLET_CURSOR,268,251,119,130,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Full tablet input emulation",IDC_PORT_TABLET_FULL, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,140,270,106,11 CONTROL "Tablet.library emulation",IDC_PORT_TABLET_LIBRARY, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,267,271,117,11 - CONTROL "Mouse/Joystick autoswitching [] Press button to automatically insert inactive input device in to joystick/mouse port",IDC_PORT_AUTOSWITCH, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,136,102,172,11 END IDD_CONTRIBUTORS DIALOGEX 0, 0, 530, 345 @@ -555,7 +575,6 @@ BEGIN PUSHBUTTON "Contributors",IDC_CONTRIBUTORS,132,100,80,15 CONTROL "",IDC_AMIGAHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,116,168,112,24 CONTROL "",IDC_WINUAEHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,231,168,112,24 - CONTROL "",IDC_THEROOTS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,117,225,112,24 CONTROL "",IDC_CAPS,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,174,196,112,24 CONTROL "",IDC_ABIME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,60,196,112,24 CONTROL "",IDC_CLOANTOHOME,"RICHEDIT",TCS_SCROLLOPPOSITE | TCS_RAGGEDRIGHT | TCS_MULTISELECT | WS_DISABLED,2,168,112,24 @@ -627,18 +646,18 @@ BEGIN EDITTEXT IDC_RESERVED,347,111,40,15,ES_NUMBER RTEXT "Block size:",IDC_BLOCKSIZE_TEXT,299,132,45,10 EDITTEXT IDC_BLOCKSIZE,347,130,40,15,ES_NUMBER - PUSHBUTTON "RDB mode",IDC_HDF_RDB,135,109,75,14 LTEXT "HD Controller:",IDC_STATIC,10,113,54,10,SS_CENTERIMAGE + PUSHBUTTON "RDB mode",IDC_HDF_RDB,135,109,75,14 + COMBOBOX IDC_HDF_FEATURE_LEVEL,214,109,75,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HDF_CONTROLLER,6,131,152,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HDF_CONTROLLER_UNIT,163,131,63,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_HDF_CONTROLLER_TYPE,231,131,58,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HDF_FEATURE_LEVEL,214,109,75,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_HDFINFO,5,150,385,12,ES_CENTER | ES_READONLY EDITTEXT IDC_HDFINFO2,5,166,385,12,ES_CENTER | ES_READONLY GROUPBOX "New hard disk image file",IDC_STATIC,2,190,392,62 PUSHBUTTON "Create",IDC_HF_CREATE,58,206,80,14 COMBOBOX IDC_HF_TYPE,58,230,80,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_HF_SIZE,154,206,61,15,ES_NUMBER + EDITTEXT IDC_HF_SIZE,154,206,61,15 LTEXT "MB",IDC_STATIC,220,209,53,10,SS_CENTERIMAGE EDITTEXT IDC_HF_DOSTYPE,154,229,61,15 LTEXT "DOS type",IDC_STATIC,222,231,51,10,SS_CENTERIMAGE @@ -683,7 +702,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,201,57,48,15 END -IDD_CHIPSET DIALOGEX 0, 0, 396, 192 +IDD_CHIPSET DIALOGEX 0, 0, 396, 287 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN @@ -700,19 +719,20 @@ BEGIN "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,114,31,86,10 CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,47,86,10 + CONTROL "Cycle-exact (Full) [] The most compatible A500/A1200 emulation mode.",IDC_CYCLEEXACT, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,12,68,194,10 CONTROL "Cycle-exact (DMA/Memory accesses)",IDC_CYCLEEXACTMEMORY, "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,12,81,194,10 RTEXT "Chipset Extra:",IDC_STATIC,72,108,71,15,SS_CENTERIMAGE COMBOBOX IDC_CS_EXT,148,109,49,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Options",IDC_STATIC,221,0,173,137 + CONTROL "Keyboard connected",IDC_KEYBOARD_CONNECTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,15,150,10 CONTROL "Immediate Blitter [] Faster but less compatible blitter emulation.",IDC_BLITIMM, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,16,150,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,47,150,10 CONTROL "Wait for Blitter [] Compatibility hack for programs that don't wait for the blitter correctly, causing graphics corruption if CPU is too fast.",IDC_BLITWAIT, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,29,150,10 - CONTROL "Genlock connected [] Allow boot sequence to detect genlock. Genlock is not emulated.",IDC_GENLOCK, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,234,42,150,10 - LTEXT "Video port display hardware:",IDC_STATIC,237,97,117,15,SS_CENTERIMAGE - COMBOBOX IDC_MONITOREMU,237,115,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,234,60,150,10 + LTEXT "Video port display hardware:",IDC_STATIC,237,91,117,15,SS_CENTERIMAGE + COMBOBOX IDC_MONITOREMU,237,109,147,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Collision Level",IDC_STATIC,1,141,393,48 CONTROL "None [] Collision hardware emulation disabled.",IDC_COLLISION0, "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,47,157,101,10 @@ -722,11 +742,16 @@ BEGIN "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,157,181,10 CONTROL "Full [] 100% collision hardware emulation. Only very few games need this option. Slowest.",IDC_COLLISION3, "Button",BS_AUTORADIOBUTTON | WS_TABSTOP,182,172,181,10 - LTEXT "Genlock emulation mode",IDC_STATIC,237,59,117,15,SS_CENTERIMAGE - COMBOBOX IDC_GENLOCKMODE,237,77,103,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_GENLOCKMIX,346,77,38,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Cycle-exact (Full) [] The most compatible A500/A1200 emulation mode.",IDC_CYCLEEXACT, - "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,12,68,194,10 + GROUPBOX "Genlock",IDC_STATIC,0,195,393,85 + CONTROL "Genlock connected [] Allow boot sequence to detect genlock.",IDC_GENLOCK, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,211,109,10 + COMBOBOX IDC_GENLOCKMODE,129,209,192,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_GENLOCKMIX,330,209,54,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Include alpha channel in screenshots and video captures.",IDC_GENLOCK_ALPHA, + "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,227,214,10 + COMBOBOX IDC_GENLOCKFILE,12,258,356,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "...",IDC_GENLOCKFILESELECT,375,257,10,15 + CONTROL "Keep aspect ratio",IDC_GENLOCK_KEEP_ASPECT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_GROUP | WS_TABSTOP,13,242,214,10 END IDD_CHIPSET2 DIALOGEX 0, 0, 396, 305 @@ -736,41 +761,44 @@ BEGIN CONTROL "Compatible Settings",IDC_CS_COMPATIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,6,234,10 GROUPBOX "Battery Backed Up Real Time Clock",IDC_STATIC,1,22,394,31 CONTROL "None",IDC_CS_RTC1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,15,36,57,10 - CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,90,36,77,10 - CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,171,36,67,10 - CONTROL "A2000 MSM6242B",IDC_CS_RTC4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,242,36,78,10 + CONTROL "MSM6242B",IDC_CS_RTC2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,80,36,77,10 + CONTROL "RF5C01A",IDC_CS_RTC3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,165,36,67,10 + CONTROL "A2000 MSM6242B",IDC_CS_RTC4,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,240,36,78,10 EDITTEXT IDC_CS_RTCADJUST,325,34,64,13,ES_AUTOHSCROLL GROUPBOX "CIA-A TOD Clock Source",IDC_STATIC,1,56,394,29 CONTROL "Vertical Sync",IDC_CS_CIAA_TOD1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,41,68,86,10 CONTROL "Power Supply 50Hz",IDC_CS_CIAA_TOD2,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,133,68,109,10 - CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,249,68,116,10 + CONTROL "Power Supply 60Hz",IDC_CS_CIAA_TOD3,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,248,68,116,10 GROUPBOX "Chipset Features",IDC_STATIC,0,88,395,128 - CONTROL "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,102,104,11 - CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,116,104,11 + CONTROL "CIA ROM Overlay",IDC_CS_CIAOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,104,104,11 + CONTROL "CD32 CD",IDC_CS_CD32CD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,117,104,11 CONTROL "CDTV CD",IDC_CS_CDTVCD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,130,105,11 CONTROL "A600/A1200 IDE",IDC_CS_IDE1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,143,104,11 - CONTROL "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,157,104,11 - CONTROL "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,171,104,11 - CONTROL "CIA TOD bug",IDC_CS_CIATODBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,184,104,11 - CONTROL "1M Chip / 0.5M+0.5M",IDC_CS_1MCHIPJUMPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,197,104,11 - CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,102,121,11 - CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,116,121,11 - CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,129,121,11 + CONTROL "ROM Mirror (E0)",IDC_CS_KSMIRROR_E0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,156,104,11 + CONTROL "KB Reset Warning",IDC_CS_RESETWARNING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,169,104,11 + CONTROL "CIA TOD bug",IDC_CS_CIATODBUG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,182,104,11 + CONTROL "1M Chip / 0.5M+0.5M",IDC_CS_1MCHIPJUMPER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,195,104,11 + CONTROL "A1000 Boot RAM/ROM",IDC_CS_A1000RAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,104,121,11 + CONTROL "CD32 C2P",IDC_CS_CD32C2P,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,117,121,11 + CONTROL "CDTV SRAM",IDC_CS_CDTVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,130,121,11 CONTROL "A4000/A4000T IDE",IDC_CS_IDE2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,143,121,11 - CONTROL "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,157,121,11 - CONTROL "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,171,121,11 - CONTROL "Z3 Autoconfig",IDC_CS_Z3AUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,184,104,11 - CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,102,125,11 - CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,116,125,11 - CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,129,125,11 + CONTROL "ROM Mirror (A8)",IDC_CS_KSMIRROR_A8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,156,121,11 + CONTROL "No-EHB Denise",IDC_CS_NOEHB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,169,121,11 + CONTROL "Z3 Autoconfig",IDC_CS_Z3AUTOCONFIG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,182,104,11 + CONTROL "Custom register byte write bug",IDC_CS_BYTECUSTOMWRITEBUG, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,195,130,11 + CONTROL "DF0: ID Hardware",IDC_CS_DF0IDHW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,104,125,11 + CONTROL "CD32 NVRAM",IDC_CS_CD32NVRAM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,117,125,11 + CONTROL "CDTV SRAM Expansion",IDC_CS_CDTVRAMEXP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,130,125,11 CONTROL "CDTV-CR",IDC_CS_CDTVCR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,143,123,11 CONTROL "PCMCIA",IDC_CS_PCMCIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,156,125,11 - CONTROL "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,170,125,11 - CONTROL "A1000 Agnus (8361/8367)",IDC_CS_DIPAGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,184,125,11 + CONTROL "C00000 is Fast RAM",IDC_CS_SLOWISFAST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,169,125,11 + CONTROL "A1000 Agnus (8361/8367)",IDC_CS_DIPAGNUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,182,125,11 + CONTROL "Composite color burst",IDC_CS_COMPOSITECOLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,195,125,12 GROUPBOX "Internal SCSI Hardware",IDC_STATIC,0,218,395,39 CONTROL "A3000 WD33C93 SCSI",IDC_CS_DMAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,236,108,11 - CONTROL "CDTV WD33C93 SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,236,121,11 - CONTROL "A4000T NCR53C710 SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,236,125,11 + CONTROL "A4000T NCR53C710 SCSI",IDC_CS_DMAC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,236,125,11 + CONTROL "CDTV WD33C93 SCSI",IDC_CS_CDTVSCSI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,263,236,121,11 GROUPBOX "Chipset Revision",IDC_STATIC,1,259,393,46 CONTROL "Ramsey revision:",IDC_CS_RAMSEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,34,275,97,11 CONTROL "Fat Gary revision:",IDC_CS_FATGARY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,34,289,97,11 @@ -780,9 +808,6 @@ BEGIN CONTROL "Denise/Lisa revision:",IDC_CS_DENISE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,289,107,11 EDITTEXT IDC_CS_AGNUSREV,311,274,45,13,ES_AUTOHSCROLL EDITTEXT IDC_CS_DENISEREV,311,289,45,13,ES_AUTOHSCROLL - CONTROL "Custom register byte write bug",IDC_CS_BYTECUSTOMWRITEBUG, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,197,130,11 - CONTROL "Composite color burst",IDC_CS_COMPOSITECOLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,264,196,125,12 END IDD_AVIOUTPUT DIALOGEX 0, 0, 396, 260 @@ -894,7 +919,7 @@ BEGIN PUSHBUTTON "Delete",IDC_FILTERPRESETDELETE,325,272,55,14 END -IDD_HARDDRIVE DIALOGEX 0, 0, 396, 109 +IDD_HARDDRIVE DIALOGEX 0, 0, 397, 136 STYLE DS_LOCALEDIT | DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Harddrive Settings" FONT 8, "MS Sans Serif", 0, 0, 0x0 @@ -903,13 +928,15 @@ BEGIN COMBOBOX IDC_HARDDRIVE,49,9,339,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_HDFINFO,5,29,385,12,ES_CENTER | ES_READONLY EDITTEXT IDC_HDFINFO2,5,46,385,12,ES_CENTER | ES_READONLY - DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,40,67,115,14 - EDITTEXT IDC_PATH_NAME,188,67,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE + DEFPUSHBUTTON "Create hard disk image file",IDC_HARDDRIVE_IMAGE,5,67,158,14 + EDITTEXT IDC_PATH_NAME,178,67,97,15,ES_AUTOHSCROLL | NOT WS_VISIBLE CONTROL "Read/write",IDC_HDF_RW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,315,71,60,10 - COMBOBOX IDC_HDF_CONTROLLER,8,89,164,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_HDF_CONTROLLER_UNIT,179,89,25,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - DEFPUSHBUTTON "Add hard drive",IDOK,236,87,73,14 - PUSHBUTTON "Cancel",IDCANCEL,316,87,73,14 + COMBOBOX IDC_HDF_CONTROLLER_UNIT,65,90,97,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_HDF_CONTROLLER_TYPE,178,90,97,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_HDF_FEATURE_LEVEL,291,90,97,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_HDF_CONTROLLER,8,113,218,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + DEFPUSHBUTTON "Add hard drive",IDOK,236,113,73,14 + PUSHBUTTON "Cancel",IDCANCEL,316,113,73,14 END IDD_MISC2 DIALOGEX 0, 0, 396, 278 @@ -957,9 +984,6 @@ EXSTYLE WS_EX_ACCEPTFILES | WS_EX_CONTROLPARENT CAPTION "WinUAE Properties" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - CONTROL "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,3,5,110,321,WS_EX_CLIENTEDGE - GROUPBOX "",IDC_PANEL_FRAME_OUTER,116,2,409,324 - GROUPBOX "",IDC_PANEL_FRAME,119,5,402,318,NOT WS_VISIBLE PUSHBUTTON "Reset",IDC_RESETAMIGA,3,328,47,14 PUSHBUTTON "Quit",IDC_QUITEMU,55,328,47,14 PUSHBUTTON "Restart",IDC_RESTARTEMU,107,328,47,14,NOT WS_VISIBLE @@ -967,6 +991,9 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,375,328,47,14 PUSHBUTTON "Cancel",IDCANCEL,427,328,47,14 PUSHBUTTON "Help",IDHELP,479,328,47,14,WS_DISABLED + GROUPBOX "",IDC_PANEL_FRAME_OUTER,116,2,409,324 + GROUPBOX "",IDC_PANEL_FRAME,119,5,402,318,NOT WS_VISIBLE + CONTROL "",IDC_PANELTREE,"SysTreeView32",TVS_HASLINES | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,3,5,110,321,WS_EX_CLIENTEDGE END IDD_PATHS DIALOGEX 0, 0, 396, 303 @@ -1134,6 +1161,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN GROUPBOX "RTG Graphics Card",IDC_STATIC,1,0,393,189 COMBOBOX IDC_RTG_Z2Z3,26,14,215,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_NUM,248,14,37,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP RTEXT "VRAM size: [] Graphics card memory. Required for RTG (Picasso96) emulation.",IDC_GFXCARDTEXT,2,35,76,10,SS_NOTIFY | SS_CENTERIMAGE CONTROL "",IDC_P96MEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,88,31,103,20 EDITTEXT IDC_P96RAM,201,34,40,12,ES_CENTER | ES_READONLY @@ -1147,11 +1175,11 @@ BEGIN CONTROL "Hardware vertical blank interrupt",IDC_RTG_VBINTERRUPT, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,106,157,10 CONTROL "Hardware sprite emulation",IDC_RTG_HWSPRITE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,207,106,148,10 - CTEXT "Color modes:",IDC_STATIC,295,9,83,10,SS_CENTERIMAGE - COMBOBOX IDC_RTG_8BIT,296,23,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_RTG_16BIT,296,40,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_RTG_24BIT,296,58,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_RTG_32BIT,296,75,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + CTEXT "Color modes:",IDC_STATIC,295,18,83,10,SS_CENTERIMAGE + COMBOBOX IDC_RTG_8BIT,296,33,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_16BIT,296,50,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_24BIT,296,68,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_RTG_32BIT,296,85,82,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_RTG_DISPLAYSELECT,11,125,371,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP CTEXT "Refresh rate:",IDC_STATIC,30,149,83,10,SS_CENTERIMAGE COMBOBOX IDC_RTG_VBLANKRATE,29,162,84,150,CBS_DROPDOWN | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP @@ -1170,13 +1198,14 @@ BEGIN CONTROL "",IDC_INPUTMAPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,1,1,418,257 EDITTEXT IDC_INPUTMAPOUT,1,261,418,14,ES_AUTOHSCROLL | ES_READONLY | WS_DISABLED EDITTEXT IDC_INPUTMAPOUTM,1,277,418,29,ES_MULTILINE | ES_READONLY | WS_DISABLED - COMBOBOX IDC_INPUTMAPADD,2,309,345,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Add",IDC_INPUTMAP_CUSTOM,351,308,66,14 - PUSHBUTTON "Test",IDC_INPUTMAP_TEST,2,324,80,14 - PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,86,324,80,14 - PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,170,324,80,14 - PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,254,324,80,14 - PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,338,324,80,14 + COMBOBOX IDC_INPUTMAPADD,2,309,247,150,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Add Event",IDC_INPUTMAP_CUSTOM,253,308,79,14 + PUSHBUTTON "Autofire",IDC_INPUTMAP_SPECIALS,338,308,79,14 + PUSHBUTTON "Test",IDC_INPUTMAP_TEST,1,325,80,14 + PUSHBUTTON "Remap",IDC_INPUTMAP_CAPTURE,85,325,80,14 + PUSHBUTTON "Delete",IDC_INPUTMAP_DELETE,169,325,80,14 + PUSHBUTTON "Delete all",IDC_INPUTMAP_DELETEALL,253,325,80,14 + PUSHBUTTON "Exit",IDC_INPUTMAP_EXIT,338,325,79,14 END IDD_INFOBOX DIALOGEX 0, 0, 420, 68 @@ -1193,7 +1222,7 @@ END IDD_LIST DIALOGEX 0, 0, 316, 206 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Select Qualifiers" +CAPTION "Options" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "OK",IDOK,205,185,50,14 @@ -1243,55 +1272,42 @@ BEGIN EDITTEXT IDC_DISKINFOBOX,5,4,481,292,ES_MULTILINE | ES_READONLY | WS_VSCROLL END -IDD_EXPANSION2 DIALOGEX 0, 0, 396, 315 +IDD_EXPANSION2 DIALOGEX 0, 0, 396, 248 STYLE DS_LOCALEDIT | DS_SETFONT | DS_3DLOOK | DS_CONTROL | WS_CHILD FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN - RTEXT "Accelerator board memory:",IDC_STATIC,155,144,104,15,SS_CENTERIMAGE - CONTROL "",IDC_CPUBOARDMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,269,141,68,20 - EDITTEXT IDC_CPUBOARDRAM,343,146,40,12,ES_CENTER | ES_READONLY - COMBOBOX IDC_CPUBOARD_TYPE,13,117,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_CPUBOARD_SUBTYPE,13,136,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Expansion Board Settings",IDC_STATIC,1,6,394,88 - COMBOBOX IDC_SCSIROMSELECTNUM,175,42,22,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SCSIROMSELECTCAT,12,23,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SCSIROMSELECT,12,42,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - CONTROL "Autoboot disabled",IDC_SCSIROMFILEAUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,62,99,12 - RTEXT "SCSI controller ID:",IDC_STATIC,241,23,110,15,SS_CENTERIMAGE + COMBOBOX IDC_SCSIROMSUBSELECT,12,59,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_EXPANSIONBOARDITEMSELECTOR,12,76,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SCSIROMSELECTNUM,175,42,22,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + RTEXT "Controller ID:",IDC_STATIC,241,23,110,15,SS_CENTERIMAGE COMBOBOX IDC_SCSIROMID,356,24,29,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_SCSIROMFILE,202,42,171,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "...",IDC_SCSIROMCHOOSER,376,42,10,15 - COMBOBOX IDC_SCSIROMSUBSELECT,12,59,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - LTEXT "Accelerator board ROM file:",IDC_STATIC,203,104,170,15,SS_CENTERIMAGE - COMBOBOX IDC_CPUBOARDROMFILE,202,119,169,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + CONTROL "Autoboot disabled",IDC_SCSIROMFILEAUTOBOOT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,62,99,12 + CONTROL "",IDC_EXPANSIONBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,76,99,12 + COMBOBOX IDC_SCSIROMFILE,202,42,171,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Accelerator Board Settings",IDC_STATIC,1,97,394,91 + COMBOBOX IDC_CPUBOARD_TYPE,13,118,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_CPUBOARD_SUBTYPE,13,137,117,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_ACCELERATORBOARDITEMSELECTOR,12,169,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + RTEXT "Accelerator board memory:",IDC_STATIC,155,145,104,15,SS_CENTERIMAGE + LTEXT "Accelerator board ROM file:",IDC_STATIC,203,105,170,15,SS_CENTERIMAGE + COMBOBOX IDC_CPUBOARDROMFILE,202,120,169,75,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "...",IDC_CPUBOARDROMCHOOSER,376,119,10,15 - GROUPBOX "Accelerator Board Settings",IDC_STATIC,1,96,394,97 - GROUPBOX "Miscellaneous Expansions",IDC_STATIC,1,199,172,113 - CONTROL "Catweasel Z2 emulation [] Catweasel MK2 Zorro II card emulation. Physical Windows compatible Catweasel card and drivers required.",IDC_CATWEASEL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,218,147,11 - CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,231,147,11 - CONTROL "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,244,151,11 - CONTROL "Toccata Z2 sound card emulation",IDC_CS_TOCCATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,257,151,11 - CONTROL "Toccata Paula/CD audio mix",IDC_CS_TOCCATAMIXER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,270,151,11 - GROUPBOX "Network",IDC_STATIC,181,199,213,113 + CONTROL "",IDC_CPUBOARDMEM,"msctls_trackbar32",TBS_AUTOTICKS | TBS_TOP | WS_TABSTOP,269,143,68,20 + EDITTEXT IDC_CPUBOARDRAM,343,147,40,12,ES_CENTER | ES_READONLY + CONTROL "",IDC_ACCELERATORBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,170,99,12 + GROUPBOX "Miscellaneous Expansions",IDC_STATIC,1,192,394,51 CONTROL "bsdsocket.library [] bsdsocket network library emulation.",IDC_SOCKETS, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,217,187,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,207,187,11 + CONTROL "uaescsi.device",IDC_SCSIDEVICE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,223,147,11 CONTROL "uaenet.device [] Sana 2 compatible network device emulation.",IDC_SANA2, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,231,187,11 - CONTROL "A2065 Z2 [] A2065 Ethernet Zorro II card emulation.",IDC_A2065, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,244,187,11 - COMBOBOX IDC_NETDEVICE,202,274,178,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Include host SCSI devices",IDC_CS_SCSIMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,296,147,11 - CONTROL "Realtek 8029 PCI [] Realtek 8029 PCI NIC emulation",IDC_NE2000, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,257,187,11 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,207,187,11 + CONTROL "CD32 Full Motion Video cartridge",IDC_CS_CD32FMV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,193,223,151,11 CONTROL "Enabled",IDC_SCSIROMSELECTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,43,99,12 - COMBOBOX IDC_SCSIROMSELECTCAT,12,23,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - CONTROL "ES1370 PCI sound card",IDC_CS_ES1370,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,283,151,11 - CONTROL "FM801 PCI sound card",IDC_CS_FM801,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,296,151,11 - COMBOBOX IDC_EXPANSIONBOARDITEMSELECTOR,12,76,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_EXPANSIONBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,76,99,12 COMBOBOX IDC_EXPANSIONBOARDSELECTOR,202,76,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_ACCELERATORBOARDITEMSELECTOR,12,168,157,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_ACCELERATORBOARDCHECKBOX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,202,169,99,12 COMBOBOX IDC_ACCELERATORBOARDSELECTOR,202,169,171,75,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP END @@ -1302,8 +1318,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,3,0,0 - PRODUCTVERSION 3,3,0,0 + FILEVERSION 3,4,0,0 + PRODUCTVERSION 3,4,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -1319,12 +1335,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "WinUAE" - VALUE "FileVersion", "3.3.0.0" + VALUE "FileVersion", "3.4.0.0" VALUE "InternalName", "WinUAE" VALUE "LegalCopyright", "© 1996-2016 under the GNU Public License (GPL)" VALUE "OriginalFilename", "WinUAE.exe" VALUE "ProductName", "WinUAE" - VALUE "ProductVersion", "3.3.0.0" + VALUE "ProductVersion", "3.4.0.0" END END BLOCK "VarFileInfo" @@ -1430,6 +1446,10 @@ END #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN + IDD_BOARDS, DIALOG + BEGIN + END + IDD_KICKSTART, DIALOG BEGIN BOTTOMMARGIN, 258 @@ -1441,6 +1461,7 @@ BEGIN IDD_MEMORY, DIALOG BEGIN + BOTTOMMARGIN, 265 END IDD_CPU, DIALOG @@ -1504,6 +1525,7 @@ BEGIN IDD_CHIPSET, DIALOG BEGIN + BOTTOMMARGIN, 280 END IDD_CHIPSET2, DIALOG @@ -1524,6 +1546,7 @@ BEGIN IDD_HARDDRIVE, DIALOG BEGIN + RIGHTMARGIN, 396 END IDD_MISC2, DIALOG @@ -1602,6 +1625,31 @@ END #endif // APSTUDIO_INVOKED +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -1636,6 +1684,7 @@ BEGIN IDS_GAMEPORTS "Game ports" IDS_EXPANSION "RTG board" IDS_EXPANSION2 "Expansions" + IDS_BOARD "Hardware info" END STRINGTABLE @@ -1987,7 +2036,7 @@ BEGIN IDS_WSTYLE_STANDARD "Standard" IDS_WSTYLE_EXTENDED "Extended" IDS_MISCLISTITEMS1 "Untrap = middle button\nShow GUI on startup\nUse CTRL-F11 to quit\nDon't show taskbar button\nDon't show notification icon\n" - IDS_MISCLISTITEMS2 "Always on top\nDisable screensaver\nSynchronize clock\nOne second reboot pause\nFaster RTG\nClipboard sharing\nAllow native code\n" + IDS_MISCLISTITEMS2 "Main window always on top\nGUI window always on top\nDisable screensaver\nSynchronize clock\nOne second reboot pause\nFaster RTG\nClipboard sharing\nAllow native code\n" IDS_MISCLISTITEMS3 "Native on-screen display\nRTG on-screen display\nCreate winuaelog.txt log\nLog illegal memory accesses\nBlank unused displays\nStart mouse uncaptured\nStart minimized\nMinimize when focus is lost\nBlack frame insertion\nMaster floppy write protection\nMaster harddrive write protection\nHide all UAE autoconfig boards\n" IDS_JOYMODE_WHEELMOUSE "Wheel Mouse" IDS_NUMSG_KS68030PLUS "The selected system ROM requires a 68030 or higher CPU." @@ -2013,47 +2062,14 @@ BEGIN "PPC native OS booted with incompatible UAE boot ROM enabled.\nSelect ROM panel ""New UAE (128k, ROM, Indirect)"" option\nor disable all UAE expansions.\n" IDS_AUTOSCALE_OVERSCAN_BLANK "Overscan blanking" IDS_SCREEN_ADAPTIVE_SYNC "Variable Sync" + IDS_NUMSG_NOMEMORY "Out of memory or too much Z3 autoconfig space configured.\nIf 64-bit, make sure RTG board is first in board list." + IDS_EXPANSION_CATEGORY "Built-in expansions\nSCSI controllers\nIDE controllers\nSASI controllers\nCustom controllers\nPCI bridgeboards\nx86 bridgeboards\nGraphics boards\nSound cards\nNetwork adapters\nDisk controllers" END #endif // English resources ///////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////// -// Finnish (Finland) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FIN) -LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Finnish (Finland) resources -///////////////////////////////////////////////////////////////////////////// - - #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// diff --git a/od-win32/serial_win32.cpp b/od-win32/serial_win32.cpp index aa20471e..9a77eae5 100644 --- a/od-win32/serial_win32.cpp +++ b/od-win32/serial_win32.cpp @@ -387,8 +387,8 @@ static void checksend(void) return; #ifdef ARCADIA - if (alg_flag) { - alg_serial_read(serdatshift); + if (alg_flag || currprefs.genlock_image >= 7) { + ld_serial_read(serdatshift); } #endif #ifdef SERIAL_MAP @@ -486,7 +486,7 @@ static void serdatcopy(void) } // if someone uses serial port as some kind of timer.. - if (currprefs.cpu_cycle_exact) { + if (currprefs.cpu_memory_cycle_exact) { int per; bits = 16 + 1; @@ -521,8 +521,8 @@ void serial_hsynchandler (void) hsyncstuff(); #endif #ifdef ARCADIA - if (alg_flag && !data_in_serdatr) { - int ch = alg_serial_write(); + if ((alg_flag || currprefs.genlock_image >= 7) && !data_in_serdatr) { + int ch = ld_serial_write(); if (ch >= 0) { serdatr = ch | 0x100; data_in_serdatr = 1; diff --git a/od-win32/sysconfig.h b/od-win32/sysconfig.h index baba2e57..9af217ed 100644 --- a/od-win32/sysconfig.h +++ b/od-win32/sysconfig.h @@ -20,7 +20,6 @@ #endif #define WINDOWS #define ZLIB_WINAPI -//#define USE_SOFT_LONG_DOUBLE #define PACKAGE_STRING "WinUAE" #ifndef UAE_MINI diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index b8c61391..bca67af2 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -2974,7 +2974,7 @@ void logging_init (void) SystemInfo.wProcessorArchitecture, SystemInfo.wProcessorLevel, SystemInfo.wProcessorRevision, SystemInfo.dwNumberOfProcessors, filedate, os_touch); write_log (_T("\n(c) 1995-2001 Bernd Schmidt - Core UAE concept and implementation.") - _T("\n(c) 1998-2016 Toni Wilen - Win32 port, core code updates.") + _T("\n(c) 1998-2017 Toni Wilen - Win32 port, core code updates.") _T("\n(c) 1996-2001 Brian King - Win32 port, Picasso96 RTG, and GUI.") _T("\n(c) 1996-1999 Mathias Ortmann - Win32 port and bsdsocket support.") _T("\n(c) 2000-2001 Bernd Meyer - JIT engine.") @@ -5433,6 +5433,7 @@ extern int fakemodewaitms; extern float sound_sync_multiplier; extern int log_cd32; extern int scanline_adjust; +extern int log_ld; extern DWORD_PTR cpu_affinity, cpu_paffinity; static DWORD_PTR original_affinity = -1; @@ -5810,6 +5811,10 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2) slirp_debug = getval (np); return 2; } + if (!_tcscmp (arg, _T("ldlog"))) { + log_ld = getval (np); + return 2; + } if (!_tcscmp (arg, _T("vsyncbusywait"))) { vsync_busy_wait_mode = getval (np); return 2; diff --git a/od-win32/win32.h b/od-win32/win32.h index b3b7f215..c3a8e5a1 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -15,17 +15,17 @@ #define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100) #define GETBDD(x) ((x) % 100) -#define WINUAEPUBLICBETA 0 +#define WINUAEPUBLICBETA 1 #define LANG_DLL 1 #define LANG_DLL_FULL_VERSION_MATCH 1 #if WINUAEPUBLICBETA -#define WINUAEBETA _T("0") +#define WINUAEBETA _T("1") #else #define WINUAEBETA _T("") #endif -#define WINUAEDATE MAKEBD(2016, 12, 21) +#define WINUAEDATE MAKEBD(2017, 2, 11) //#define WINUAEEXTRA _T("AmiKit Preview") //#define WINUAEEXTRA _T("Amiga Forever Edition") diff --git a/od-win32/win32_filesys.cpp b/od-win32/win32_filesys.cpp index 0268857b..45d9c7fb 100644 --- a/od-win32/win32_filesys.cpp +++ b/od-win32/win32_filesys.cpp @@ -120,11 +120,13 @@ static int getidfromhandle (HANDLE h) return drvnum; } +HANDLE hdf_get_real_handle(struct hardfilehandle *h); + static int hfdcheck (TCHAR drive) { HANDLE h; TCHAR tmp[16]; - int disknum, i; + int disknum; _stprintf (tmp, _T("\\\\.\\%c:"), drive); h = CreateFile (tmp, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -132,14 +134,19 @@ static int hfdcheck (TCHAR drive) return 0; disknum = getidfromhandle (h); CloseHandle (h); - for (i = 0; i < MAX_FILESYSTEM_UNITS; i++) { +#if 0 + for (int i = 0; i < MAX_FILESYSTEM_UNITS; i++) { struct hardfiledata *hfd = get_hardfile_data (i); int reopen = 0; if (!hfd || !(hfd->flags & HFD_FLAGS_REALDRIVE) || !hfd->handle_valid) continue; - if (getidfromhandle (hfd->handle) == disknum) - return 1; + HANDLE h2 = hdf_get_real_handle(hfd->handle); + if (h2) { + if (getidfromhandle (h2) == disknum) + return 1; + } } +#endif return 0; } diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 7d79b1b1..0f05e7f1 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -1899,7 +1899,7 @@ static int scan_roms_2 (UAEREG *fkey, const TCHAR *path, bool deepscan, int leve ret = 1; } else if (deepscan && (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { if (recursiveromscan < 0 || recursiveromscan > level) { - if (_tcsicmp(find_data.cFileName, _T(".")) && _tcsicmp(find_data.cFileName, _T(".."))) { + if (find_data.cFileName[0] != '.') { _tcscat(tmppath, _T("\\")); scan_roms_2(fkey, tmppath, deepscan, level + 1); } @@ -2470,7 +2470,7 @@ static void selectgenlock(struct uae_prefs *prefs, HWND hDlg, int id, const TCHA _tcscpy(prefs->genlock_image_file, full_path); fullpath(prefs->genlock_image_file, sizeof prefs->genlock_image_file / sizeof(TCHAR)); DISK_history_add(prefs->genlock_image_file, -1, HISTORY_GENLOCK_IMAGE, 0); - } else if (workprefs.genlock_image == 4 || workprefs.genlock_image == 6) { + } else if (workprefs.genlock_image == 4 || workprefs.genlock_image >= 6) { _tcscpy(prefs->genlock_video_file, full_path); fullpath(prefs->genlock_video_file, sizeof prefs->genlock_video_file / sizeof(TCHAR)); DISK_history_add(prefs->genlock_video_file, -1, HISTORY_GENLOCK_VIDEO, 0); @@ -2528,6 +2528,8 @@ static void setdpath (const TCHAR *name, const TCHAR *path) // flag = 18 for Tape image // flag = 20 for genlock image // flag = 21 for genlock video +// flag = 22 for floppy replacement (missing statefile) + int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs, TCHAR *path_out, int *multi) { static int previousfilter[20]; @@ -2560,6 +2562,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs { case 0: case 1: + case 22: getfilter (flag, _T("FloppyPath"), previousfilter, filtername); fetch_path (_T("FloppyPath"), init_path, sizeof (init_path) / sizeof (TCHAR)); guid = &diskselectionguids[0]; @@ -2648,6 +2651,13 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs memcpy (szFilter + _tcslen (szFilter), DISK_FORMAT_STRING, sizeof (DISK_FORMAT_STRING) + sizeof (TCHAR)); defext = _T("adf"); break; + case 22: + _tcscpy(szTitle, prefs->floppyslots[wParam - IDC_DF0].df); + WIN32GUI_LoadUIString (IDS_ADF, szFormat, MAX_DPATH); + _stprintf (szFilter, _T("%s "), szFormat); + memcpy (szFilter + _tcslen (szFilter), DISK_FORMAT_STRING, sizeof (DISK_FORMAT_STRING) + sizeof (TCHAR)); + defext = _T("adf"); + break; case 1: WIN32GUI_LoadUIString (IDS_CHOOSEBLANK, szTitle, MAX_DPATH); WIN32GUI_LoadUIString (IDS_ADF, szFormat, MAX_DPATH); @@ -2977,7 +2987,7 @@ int DiskSelection_2 (HWND hDlg, WPARAM wParam, int flag, struct uae_prefs *prefs break; } if (!nosavepath || 1) { - if (flag == 0 || flag == 1) { + if (flag == 0 || flag == 1 || flag == 22) { amiga_path = _tcsstr (openFileName.lpstrFile, openFileName.lpstrFileTitle); if (amiga_path && amiga_path != openFileName.lpstrFile) { *amiga_path = 0; @@ -4108,7 +4118,7 @@ static int inputmap_handle (HWND list, int currentdevnum, int currentwidgetnum, } } if (list) { - inputdevice_get_widget_type (devnum, j, name); + inputdevice_get_widget_type (devnum, j, name, false); TCHAR target[MAX_DPATH]; _tcscpy (target, name); _tcscat (target, _T(", ")); @@ -4510,7 +4520,7 @@ void InitializeListView (HWND hDlg) for (i = 0; input_total_devices && i < inputdevice_get_widget_num (input_selected_device); i++) { TCHAR name[100]; - inputdevice_get_widget_type (input_selected_device, i, name); + inputdevice_get_widget_type (input_selected_device, i, name, true); lvstruct.mask = LVIF_TEXT | LVIF_PARAM; lvstruct.pszText = name; lvstruct.lParam = 0; @@ -6122,11 +6132,11 @@ static struct amigamodels amodels[] = { { 4, IDS_QS_MODEL_A500P }, // "Amiga 500+" { 4, IDS_QS_MODEL_A600 }, // "Amiga 600" { 4, IDS_QS_MODEL_A1000 }, // "Amiga 1000" - { 4, IDS_QS_MODEL_A1200 }, // "Amiga 1200" + { 5, IDS_QS_MODEL_A1200 }, // "Amiga 1200" { 2, IDS_QS_MODEL_A3000 }, // "Amiga 3000" { 1, IDS_QS_MODEL_A4000 }, // "Amiga 4000" { 0, }, //{ 1, IDS_QS_MODEL_A4000T }, // "Amiga 4000T" - { 3, IDS_QS_MODEL_CD32 }, // "CD32" + { 4, IDS_QS_MODEL_CD32 }, // "CD32" { 4, IDS_QS_MODEL_CDTV }, // "CDTV" { 4, IDS_QS_MODEL_ARCADIA }, // "Arcadia" { 1, IDS_QS_MODEL_UAE }, // "Expanded UAE example configuration" @@ -6703,8 +6713,8 @@ static void enable_for_chipsetdlg (HWND hDlg) ew(hDlg, IDC_GENLOCKMIX, workprefs.genlock ? TRUE : FALSE); ew(hDlg, IDC_GENLOCK_ALPHA, workprefs.genlock ? TRUE : FALSE); ew(hDlg, IDC_GENLOCK_KEEP_ASPECT, workprefs.genlock ? TRUE : FALSE); - ew(hDlg, IDC_GENLOCKFILE, workprefs.genlock && (workprefs.genlock_image ==6 || (workprefs.genlock_image >= 3 && workprefs.genlock_image < 5)) ? TRUE : FALSE); - ew(hDlg, IDC_GENLOCKFILESELECT, workprefs.genlock && (workprefs.genlock_image ==6 || (workprefs.genlock_image >= 3 && workprefs.genlock_image < 5)) ? TRUE : FALSE); + ew(hDlg, IDC_GENLOCKFILE, workprefs.genlock && (workprefs.genlock_image >= 6 || (workprefs.genlock_image >= 3 && workprefs.genlock_image < 5)) ? TRUE : FALSE); + ew(hDlg, IDC_GENLOCKFILESELECT, workprefs.genlock && (workprefs.genlock_image >= 6 || (workprefs.genlock_image >= 3 && workprefs.genlock_image < 5)) ? TRUE : FALSE); } static const int fakerefreshrates[] = { 50, 60, 100, 120, 0 }; @@ -7800,7 +7810,7 @@ static void setgenlock(HWND hDlg) setautocomplete(hDlg, IDC_GENLOCKFILE); if (workprefs.genlock_image == 3) { addhistorymenu(hDlg, workprefs.genlock_image_file, IDC_GENLOCKFILE, HISTORY_GENLOCK_IMAGE, true); - } else if (workprefs.genlock_image == 4 || workprefs.genlock_image == 6) { + } else if (workprefs.genlock_image == 4 || workprefs.genlock_image >= 6) { addhistorymenu(hDlg, workprefs.genlock_video_file, IDC_GENLOCKFILE, HISTORY_GENLOCK_VIDEO, true); } } @@ -7842,6 +7852,8 @@ static INT_PTR CALLBACK ChipsetDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Video file")); SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Capture device")); SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("American Laser Games LaserDisc Player")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Sony LaserDisc Player")); + SendDlgItemMessage(hDlg, IDC_GENLOCKMODE, CB_ADDSTRING, 0, (LPARAM)_T("Pioneer LaserDisc Player")); SendDlgItemMessage(hDlg, IDC_GENLOCKMIX, CB_RESETCONTENT, 0, 0); for (int i = 0; i <= 10; i++) { @@ -11300,6 +11312,7 @@ static void enable_for_cpudlg (HWND hDlg) ew (hDlg, IDC_COMPATIBLE, !workprefs.cpu_memory_cycle_exact && !(workprefs.cachesize && workprefs.cpu_model >= 68040)); ew (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_model > 0); ew (hDlg, IDC_FPU_UNIMPLEMENTED, workprefs.fpu_model && !workprefs.cachesize); + ew (hDlg, IDC_FPU_SOFTFLOAT, workprefs.fpu_model && (!workprefs.compfpu || !workprefs.cachesize)); ew (hDlg, IDC_CPU_UNIMPLEMENTED, workprefs.cpu_model == 68060 && !workprefs.cachesize); #if 0 ew (hDlg, IDC_CPU_MULTIPLIER, workprefs.cpu_cycle_exact); @@ -11346,6 +11359,7 @@ static void values_to_cpudlg (HWND hDlg) CheckDlgButton (hDlg, IDC_COMPATIBLE24, workprefs.address_space_24); CheckDlgButton (hDlg, IDC_COMPATIBLE_FPU, workprefs.fpu_strict); CheckDlgButton (hDlg, IDC_FPU_UNIMPLEMENTED, !workprefs.fpu_no_unimplemented || workprefs.cachesize); + CheckDlgButton (hDlg, IDC_FPU_SOFTFLOAT, workprefs.fpu_softfloat); CheckDlgButton (hDlg, IDC_CPU_UNIMPLEMENTED, !workprefs.int_no_unimplemented || workprefs.cachesize); SendDlgItemMessage (hDlg, IDC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.cpu_idle == 0 ? 0 : 12 - workprefs.cpu_idle / 15); SendDlgItemMessage (hDlg, IDC_PPC_CPUIDLE, TBM_SETPOS, TRUE, workprefs.ppc_cpu_idle); @@ -11405,6 +11419,7 @@ static void values_from_cpudlg (HWND hDlg) workprefs.cpu_compatible = workprefs.cpu_memory_cycle_exact | (ischecked (hDlg, IDC_COMPATIBLE) ? 1 : 0); workprefs.fpu_strict = ischecked (hDlg, IDC_COMPATIBLE_FPU) ? 1 : 0; workprefs.fpu_no_unimplemented = ischecked (hDlg, IDC_FPU_UNIMPLEMENTED) ? 0 : 1; + workprefs.fpu_softfloat = ischecked (hDlg, IDC_FPU_SOFTFLOAT) ? 1 : 0; workprefs.int_no_unimplemented = ischecked (hDlg, IDC_CPU_UNIMPLEMENTED) ? 0 : 1; workprefs.address_space_24 = ischecked (hDlg, IDC_COMPATIBLE24) ? 1 : 0; workprefs.m68k_speed = ischecked (hDlg, IDC_CS_HOST) ? -1 : 0; @@ -11500,8 +11515,13 @@ static void values_from_cpudlg (HWND hDlg) workprefs.comptrustlong = trust_prev; workprefs.comptrustnaddr = trust_prev; } - if (!workprefs.cachesize) + if (!workprefs.cachesize) { setchecked (hDlg, IDC_JITENABLE, false); + } + if (workprefs.cachesize && workprefs.compfpu && workprefs.fpu_softfloat) { + workprefs.fpu_softfloat = false; + setchecked(hDlg, IDC_FPU_SOFTFLOAT, false); + } if (oldcache == 0 && workprefs.cachesize > 0) { canbang = 1; } @@ -12838,6 +12858,8 @@ static INT_PTR CALLBACK TapeDriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara if (posn != CB_ERR) { current_tapedlg.ci.controller_type = posn % HD_CONTROLLER_NEXT_UNIT; current_tapedlg.ci.controller_type_unit = posn / HD_CONTROLLER_NEXT_UNIT; + if (current_tapedlg.ci.controller_type == HD_CONTROLLER_TYPE_PCMCIA) + current_tapedlg.ci.controller_type_unit = 1; inithdcontroller(hDlg, current_tapedlg.ci.controller_type, current_tapedlg.ci.controller_type_unit, UAEDEV_TAPE); SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER_UNIT, CB_SETCURSEL, current_tapedlg.ci.controller_type != HD_CONTROLLER_TYPE_PCMCIA ? current_tapedlg.ci.controller_unit : current_tapedlg.ci.controller_type_unit, 0); } @@ -12952,6 +12974,8 @@ static INT_PTR CALLBACK CDDriveSettingsProc (HWND hDlg, UINT msg, WPARAM wParam, if (posn != CB_ERR) { current_cddlg.ci.controller_type = posn % HD_CONTROLLER_NEXT_UNIT; current_cddlg.ci.controller_type_unit = posn / HD_CONTROLLER_NEXT_UNIT; + if (current_cddlg.ci.controller_type == HD_CONTROLLER_TYPE_PCMCIA) + current_cddlg.ci.controller_type_unit = 1; inithdcontroller(hDlg, current_cddlg.ci.controller_type, current_cddlg.ci.controller_type_unit, UAEDEV_CD); SendDlgItemMessage(hDlg, IDC_HDF_CONTROLLER_UNIT, CB_SETCURSEL, current_cddlg.ci.controller_type != HD_CONTROLLER_TYPE_PCMCIA ? current_cddlg.ci.controller_unit : current_cddlg.ci.controller_type_unit, 0); } @@ -13090,6 +13114,8 @@ static INT_PTR CALLBACK HardfileSettingsProc (HWND hDlg, UINT msg, WPARAM wParam if (posn != CB_ERR) { current_hfdlg.ci.controller_type = posn % HD_CONTROLLER_NEXT_UNIT; current_hfdlg.ci.controller_type_unit = posn / HD_CONTROLLER_NEXT_UNIT; + if (current_hfdlg.ci.controller_type == HD_CONTROLLER_TYPE_PCMCIA) + current_hfdlg.ci.controller_type_unit = 1; inithdcontroller(hDlg, current_hfdlg.ci.controller_type, current_hfdlg.ci.controller_type_unit, UAEDEV_HDF); sethardfile(hDlg); } @@ -13273,6 +13299,7 @@ static INT_PTR CALLBACK HarddriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara sethardfiletypes(hDlg); inithdcontroller(hDlg, current_hfdlg.ci.controller_type, current_hfdlg.ci.controller_type_unit, UAEDEV_HDF); CheckDlgButton (hDlg, IDC_HDF_RW, !current_hfdlg.ci.readonly); + CheckDlgButton (hDlg, IDC_HDF_LOCK, current_hfdlg.ci.lock); SendDlgItemMessage (hDlg, IDC_HARDDRIVE, CB_RESETCONTENT, 0, 0); ew (hDlg, IDC_HARDDRIVE_IMAGE, FALSE); ew (hDlg, IDOK, FALSE); @@ -13321,6 +13348,14 @@ static INT_PTR CALLBACK HarddriveSettingsProc (HWND hDlg, UINT msg, WPARAM wPara current_hfdlg.ci.readonly = (ischecked (hDlg, IDC_HDF_RW) && !dang) ? false : true; } break; + case IDC_HDF_LOCK: + posn = SendDlgItemMessage (hDlg, IDC_HARDDRIVE, CB_GETCURSEL, 0, 0); + if (posn != CB_ERR) { + int dang = 1; + hdf_getnameharddrive (posn, 1, NULL, &dang); + current_hfdlg.ci.lock = ischecked (hDlg, IDC_HDF_LOCK); + } + break; } } if (LOWORD (wParam) == IDC_HARDDRIVE) { @@ -14165,6 +14200,14 @@ static int getfloppybox (HWND hDlg, int f_text, TCHAR *out, int maxlen, int type return out[0] ? 1 : 0; } +bool gui_ask_disk(int drv, TCHAR *name) +{ + _tcscpy(changed_prefs.floppyslots[drv].df, name); + DiskSelection (hAmigaWnd, IDC_DF0 + drv, 22, &changed_prefs, 0); + _tcscpy(name, changed_prefs.floppyslots[drv].df); + return true; +} + static void getfloppyname (HWND hDlg, int n, int cd, int f_text) { TCHAR tmp[MAX_DPATH]; @@ -16110,7 +16153,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw int od = input_selected_device; input_selected_device = devnum; input_selected_widget = wtype; - int type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL); + int type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL, false); if (inputmap == 3) { // ports panel / add custom int mode; @@ -16170,7 +16213,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw found = 0; for (int i = 0; i < wcnt; i++) { input_selected_widget = widgets[i]; - type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL); + type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL, false); if (type == IDEV_WIDGET_BUTTONAXIS) { found = 1; break; @@ -16179,7 +16222,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw if (!found) { for (int i = 0; i < wcnt; i++) { input_selected_widget = widgets[i]; - type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL); + type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL, false); if (type == IDEV_WIDGET_AXIS) { found = 2; break; @@ -16188,7 +16231,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw } for (int i = 0; i < wcnt; i++) { - int typex = inputdevice_get_widget_type (input_selected_device, widgets[i], NULL); + int typex = inputdevice_get_widget_type (input_selected_device, widgets[i], NULL, false); if (typex == IDEV_WIDGET_AXIS) { if (!found) { found = 1; @@ -16206,7 +16249,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw if (!found) { for (int i = 0; i < wcnt; i++) { input_selected_widget = widgets[i]; - type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL); + type = inputdevice_get_widget_type (input_selected_device, input_selected_widget, NULL, false); if (type == IDEV_WIDGET_BUTTON || type == IDEV_WIDGET_KEY) { found = 1; break; @@ -16230,7 +16273,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw (type == IDEV_WIDGET_AXIS && prevtype == IDEV_WIDGET_AXIS)) { for (int i = 0; i < wcnt; i++) { wtype = widgets[i]; - if (inputdevice_get_widget_type (input_selected_device, wtype, NULL) == IDEV_WIDGET_AXIS) { + if (inputdevice_get_widget_type (input_selected_device, wtype, NULL, false) == IDEV_WIDGET_AXIS) { inputdevice_set_gameports_mapping (&workprefs, input_selected_device, prevwidget, -1, 0, inputmap_port, workprefs.input_selected_setting); inputdevice_set_gameports_mapping (&workprefs, input_selected_device, wtype, axistable2[0], 0, inputmap_port, workprefs.input_selected_setting); evtnum = -1; @@ -16261,7 +16304,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw ListView_SetItemState (h, inputmap_index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); TCHAR tmp[256]; tmp[0] = 0; - inputdevice_get_widget_type (input_selected_device, input_selected_widget, tmp); + inputdevice_get_widget_type (input_selected_device, input_selected_widget, tmp, false); _tcscat (tmp, _T(", ")); _tcscat (tmp, inputdevice_get_device_name2 (input_selected_device)); SetWindowText (GetDlgItem (hDlg, IDC_INPUTMAPOUT), tmp); @@ -16307,7 +16350,7 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw } TCHAR tmp[256]; tmp[0] = 0; - inputdevice_get_widget_type (input_selected_device, input_selected_widget, tmp); + inputdevice_get_widget_type (input_selected_device, input_selected_widget, tmp, false); _tcscat (tmp, _T(", ")); _tcscat (tmp, inputdevice_get_device_name2 (input_selected_device)); SetWindowText (GetDlgItem (hDlg, IDC_INPUTMAPOUT), tmp); diff --git a/od-win32/winuae_msvc15/winuae_msvc.vcxproj b/od-win32/winuae_msvc15/winuae_msvc.vcxproj index 080fb8f3..56b62ecc 100644 --- a/od-win32/winuae_msvc15/winuae_msvc.vcxproj +++ b/od-win32/winuae_msvc15/winuae_msvc.vcxproj @@ -845,6 +845,8 @@ + + @@ -892,6 +894,8 @@ + + diff --git a/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters b/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters index b0f75ca7..7f7bcc18 100644 --- a/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters +++ b/od-win32/winuae_msvc15/winuae_msvc.vcxproj.filters @@ -826,6 +826,18 @@ win32 + + common + + + common + + + qemu + + + qemu + diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index 79ab3e13..88f6e438 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -4,6 +4,63 @@ JIT Direct current rules are less complex now. It automatically switches off onl - RTG VRAM is outside of reserved natmem space. Workaround: Move RTG in earlier position using Hardware info GUI panel. Note that in 64-bit version RTG VRAM must be inside of reserved natmem space. (Outside = error message and return back to GUI) +Beta 1: + +- Quickstart Blizzard modes (except if JIT enabled) enabled 24-bit addressing which caused new autoconfig/fallback mode + support to think Blizzard is in 68020 fallback mode, disabling autoconfig. +- Added Apollo 1240/1260 SCSI module installed on/off option. +- IDE Identify drive command didn't reset multiple sector offset value. If previous read was partial multiple transfer, + identity drive returned previously read data block. +- Added Lock drive option to real harddrive mount dialog. If checked, all partitions in selected drive will be locked + and unmounted when emulation is running, enabling full read/write access even if drive has Windows mounted FAT partition(s). + Lock will be ignored if drive has one or more NTFS partitions. +- Lots of softfloat FPU mode and normal FPU mode fixes and updates. (Andreas Grabher and me) +- Softfloat FPU mode added to GUI, supports on the fly switching. +- Implemented accurate 68020+ T0 trace mode emulation. (Original one has not been changed for ages..) +- Fixed crash when sound card audio play started and mono sound channel mode and "Include CD and FMV audio" was ticked. +- 271b3 "Blitter final D write don't increase "nasty" count" That is not true, I think this was only added to fix demo + that randomly glitches on real hardware too.. Fixes intro Himalaya by Avalanche. +- Added illegal instruction at the end of each memory bank allocation, just outside of last available byte to force + exception if execution falls of the edge of memory. This can happen if "more compatible" is not checked. + Currently this causes bus error exception. May become halt in the future. +- Audio interrupts are delayed by 2 cycles, logic analyzer confirmed. Emulated only in cycle-exact mode. (Mission Elevator) +- Emulated sprite special case when DMA mode sprite's start X-coordinate is less than sprite's DMA slot position. +- Fixed AGA HAM6/8 behavior when BPLCON4 XOR value is non-zero. Planes 6 and 7 never affect palette selection if HAM8, + Planes 4 to 7 if HAM6. If HAM control bits select hold mode, selected direct R/G/B value bypasses XOR operation. + (Thanks to Dissident for test cases) +- AGA EHB plane 6 half-brite selection bit is taken before BPLCON4 XOR adjustment. (Same) +- HAM mode and BPLCON4 BPLAM bit changes or HAM mode and BPLCON4 sprite bank bit changes and sprites in same scanline + may have caused wrong sprite or HAM colors. +- >2M chip RAM didn't work in non-JIT compatible modes. +- Added -ldlog 1/2 command line parameter, logs all laserdisc commands. +- Recursive mode ROM scanner now skips directories starting with dot. +- HDF creator used old style dialog type. +- 68030 CE/prefetch mode cache access fix. +- JIT direct broke 512k and 1M chip RAM size detection. +- If statefile is loaded with one or more floppy images that can't be opened: keep fake disk in drive (like previously) + and ask for new disk path when missing disk is accessed for the first time. (access = read or write attempt) + Old disk path is shown in disk dialog title bar. +- SCSI emulation SCSI buffer re-sizing didn't handle READ(6) zero size length correctly. +- Added memory cycle-exact Quickstart step for A1200 and CD32 configurations. Less CPU heavy than full cycle-exact and + usually not much more worse (or better). At least not until 68020 CE gets better. +- Memory cycle exact mode incorrectly counted internal CPU cycles partially. +- Memory cycle exact mode also enables more accurate custom chipset mode. +- 68020 CE mode adjustments, fixed Chip RAM access speed (was too fast previously), removed all extra cycle + counting temporarily. Work in progress. +- Include key scancode in Input panel key events. + +Softfloat FPU mode is now officially supported, Andreas Grabher (Previous) implemented required 6888x-specific +features to softfloat support library. Only needed if "weird" features are required (denormals and unnormals, invalid +operands) or extended precision (that WinUAE does not support due to MSVC not supporting it) or accurate status register +flags or 100% accurate rounding/NaN handling, FMOD/FREM quotient etc. + +Arithmetic exceptions are not yet supported. Trigonometric and logarithmic functions are currently implemented +using normal native C-library functions and won't return 100% same results as real 6888x. + +Not compatible with JIT FPU emulation. + +3.4.0 + Beta 20: - Selecting item from HDF "history" drop down worked strangely depending on Windows version. diff --git a/scsi.cpp b/scsi.cpp index b6f917f2..0176dad4 100644 --- a/scsi.cpp +++ b/scsi.cpp @@ -151,7 +151,7 @@ bool scsi_emulate_analyze (struct scsi_data *sd) data_len = 8; break; case 0x08: // READ(6) - data_len2 = sd->cmd[4] * sd->blocksize; + data_len2 = (sd->cmd[4] == 0 ? 256 : sd->cmd[4]) * sd->blocksize; scsi_grow_buffer(sd, data_len2); break; case 0x28: // READ(10) @@ -169,7 +169,7 @@ bool scsi_emulate_analyze (struct scsi_data *sd) case 0x0a: // WRITE(6) if (sd->device_type == UAEDEV_CD) goto nocmd; - data_len = sd->cmd[4] * sd->blocksize; + data_len = (sd->cmd[4] == 0 ? 256 : sd->cmd[4]) * sd->blocksize; scsi_grow_buffer(sd, data_len); break; case 0x2a: // WRITE(10) @@ -1271,7 +1271,7 @@ static void raw_scsi_set_ack(struct raw_scsi *rs, bool ack) // APOLLO SOFTSCSI -void apollo_scsi_bput(uaecptr addr, uae_u8 v) +void apollo_scsi_bput(uaecptr addr, uae_u8 v, uae_u32 config) { struct soft_scsi *as = getscsiboard(addr); if (!as) @@ -1294,7 +1294,7 @@ void apollo_scsi_bput(uaecptr addr, uae_u8 v) //write_log(_T("apollo scsi put %04x = %02x\n"), addr, v); } -uae_u8 apollo_scsi_bget(uaecptr addr) +uae_u8 apollo_scsi_bget(uaecptr addr, uae_u32 config) { struct soft_scsi *as = getscsiboard(addr); if (!as) @@ -1307,7 +1307,9 @@ uae_u8 apollo_scsi_bget(uaecptr addr) v = raw_scsi_get_data(rs, true); } else if (bank == 0x800 && (addr & 1)) { uae_u8 t = raw_scsi_get_signal_phase(rs); - v = 1; // disable switch off + v = 0; + if (config & 1) // scsi module installed + v |= 1; if (t & SCSI_IO_BUSY) v |= 128; if (t & SCSI_IO_SEL) diff --git a/sndboard.cpp b/sndboard.cpp index 0a532ee3..a60a139f 100644 --- a/sndboard.cpp +++ b/sndboard.cpp @@ -1021,6 +1021,150 @@ void uaesndboard_reset(void) } +// PMX + +struct pmx_data +{ + bool enabled; + int configured; + uae_u8 acmemory[128]; + int streamid; + struct romconfig *rc; + int reset_delay; + uae_u16 status; + bool dreq; + uae_u16 regs[16]; +}; +static struct pmx_data pmx[MAX_DUPLICATE_SOUND_BOARDS]; + +static void pmx_reset_chip(struct pmx_data *data) +{ + for (int i = 0; i < 16; i++) { + data->regs[i] = 0; + } + data->regs[0] = 0x4000; + data->regs[1] = 0x000c; +} + +static void REGPARAM2 pmx_bput(uaecptr addr, uae_u32 v) +{ + struct pmx_data *data = &pmx[0]; + v &= 0xff; + write_log(_T("PMXBPUT %08x %02x %08x\n"), addr, v, M68K_GETPC); +} + +static void REGPARAM2 pmx_wput(uaecptr addr, uae_u32 v) +{ + struct pmx_data *data = &pmx[0]; + int reg = -1; + v &= 0xffff; + if (addr & 0x8000) { + reg = (addr >> 2) & 15; + data->regs[reg] = v; + } else { + data->status = v; + if (v & 0x8000) { + data->dreq = true; + data->reset_delay = 10; + } + } + write_log(_T("PMXWPUT %d %08x %04x %08x\n"), reg, addr, v, M68K_GETPC); +} + +static void REGPARAM2 pmx_lput(uaecptr addr, uae_u32 v) +{ + write_log(_T("PMXLPUT %08x %08x %08x\n"), addr, v, M68K_GETPC); +} + +static uae_u32 REGPARAM2 pmx_bget(uaecptr addr) +{ + struct pmx_data *data = &pmx[0]; + uae_u8 v = 0; + data->dreq = !data->dreq; + if (!data->dreq) + v |= 1 << 3; + write_log(_T("PMXBGET %08x %02x %08x\n"), addr, v, M68K_GETPC); + return v; +} +static uae_u32 REGPARAM2 pmx_wget(uaecptr addr) +{ + struct pmx_data *data = &pmx[0]; + uae_u16 v = 0; + int reg = -1; + if (addr & 0x8000) { + reg = (addr >> 2) & 15; + v = data->regs[reg]; + if (reg == 1) { + v &= ~0x03f0; + v |= 0x0060; ;//revision + } + } else { + v = data->status; + } + write_log(_T("PMXWGET %d %08x %04x %08x\n"), reg, addr, v, M68K_GETPC); + return v; +} +static uae_u32 REGPARAM2 pmx_lget(uaecptr addr) +{ + write_log(_T("PMXLGET %08x %08x\n"), addr, M68K_GETPC); + return 0; +} + +static addrbank pmx_bank = { + pmx_lget, pmx_wget, pmx_bget, + pmx_lput, pmx_wput, pmx_bput, + default_xlate, default_check, NULL, _T("*"), _T("PMX"), + dummy_lgeti, dummy_wgeti, + ABFLAG_IO | ABFLAG_SAFE, S_READ, S_WRITE +}; + +bool pmx_init (struct autoconfig_info *aci) +{ + struct pmx_data *data = &pmx[0]; + const struct expansionromtype *ert = get_device_expansion_rom(ROMTYPE_PMX); + if (!ert) + return false; + + aci->addrbank = &pmx_bank; + aci->autoconfig_automatic = true; + + if (!aci->doinit) { + aci->autoconfigp = ert->autoconfig; + return true; + } + + data->configured = 0; + data->streamid = 0; + memset(data->acmemory, 0xff, sizeof data->acmemory); + data->rc = aci->rc; + data->enabled = true; + for (int i = 0; i < 16; i++) { + uae_u8 b = ert->autoconfig[i]; + ew(data->acmemory, i * 4, b); + } + memcpy(aci->autoconfig_raw, data->acmemory, sizeof data->acmemory); + return true; +} + +void pmx_free(void) +{ + for (int j = 0; j < MAX_DUPLICATE_SOUND_BOARDS; j++) { + struct pmx_data *data = &pmx[j]; + data->enabled = false; + } + sndboard_rethink(); +} + +void pmx_reset(void) +{ + for (int j = 0; j < MAX_DUPLICATE_SOUND_BOARDS; j++) { + struct pmx_data *data = &pmx[j]; + if (data->enabled) { + } + } + sndboard_rethink(); +} + // TOCCATA #define DEBUG_TOCCATA 0 diff --git a/specialmonitors.cpp b/specialmonitors.cpp index cea37649..7034c7d6 100755 --- a/specialmonitors.cpp +++ b/specialmonitors.cpp @@ -2358,7 +2358,7 @@ static bool do_genlock(struct vidbuffer *src, struct vidbuffer *dst, bool double else { genlock_error = true; } - } else if (currprefs.genlock_image == 4 || currprefs.genlock_image == 6) { + } else if (currprefs.genlock_image == 4 || currprefs.genlock_image >= 6) { if (currprefs.genlock_video_file[0]) { genlock_blank = false; if ((!genlock_video && !genlock_error) || _tcsicmp(currprefs.genlock_video_file, genlock_video_file)) { @@ -2377,6 +2377,9 @@ static bool do_genlock(struct vidbuffer *src, struct vidbuffer *dst, bool double } genlock_blank = false; } + if (currprefs.genlock_image >= 7) { + genlock_blank = false; + } } else { genlock_error = true; } @@ -2427,13 +2430,13 @@ skip: genlock_image_data = NULL; } #if VIDEOGRAB - if (genlock_video && currprefs.genlock_image != 4 && currprefs.genlock_image != 5 && currprefs.genlock_image != 6) { + if (genlock_video && currprefs.genlock_image != 4 && currprefs.genlock_image != 5 && currprefs.genlock_image < 6) { uninitvideograb(); genlock_video = false; } isvideograb_status(); #endif - if (currprefs.genlock_image != 4 && currprefs.genlock_image != 5 && currprefs.genlock_image != 6) { + if (currprefs.genlock_image != 4 && currprefs.genlock_image != 5 && currprefs.genlock_image < 6) { genlock_video_file[0] = 0; } if (currprefs.genlock_image != 3) { diff --git a/table68k b/table68k index c8aa0850..24405726 100644 --- a/table68k +++ b/table68k @@ -329,9 +329,9 @@ - 0 0 2 fea 1000 rrr0 11ss sSSS:000:?????:?????:13: DIVU.W s[Dreg],Dr -- 2 0 54 +- 2 0 20 1000 rrr0 11ss sSSS:000:?????:?????:13: DIVU.W s[!Areg,Dreg],Dr -- 0 0 54 fea +- 0 0 20 fea 1000 rrr1 00dd dDDD:000:XxZxC:X-Z--:13: SBCD.B d[Dreg],Dr - 0 0 4 @@ -351,9 +351,9 @@ - 2 1 11 1000 rrr1 11ss sSSS:000:?????:?????:13: DIVS.W s[Dreg],Dr -- 2 0 54 +- 2 0 20 1000 rrr1 11ss sSSS:000:?????:?????:13: DIVS.W s[!Areg,Dreg],Dr -- 0 0 54 fea +- 0 0 20 fea 1001 rrr0 zzss sSSS:000:XNZVC:-----:13: SUB.z s[Areg,Dreg],Dr - 2 0 2 @@ -400,7 +400,7 @@ 1100 rrr0 zzss sSSS:000:-NZ00:-----:13: AND.z s[!Areg,Dreg],Dr - 0 1 3 fea 1100 rrr0 11ss sSSS:000:-NZ00:-----:13: MULU.W s[!Areg],Dr -- 2 0 25 fea +- 2 0 12 fea 1100 rrr1 00dd dDDD:000:XxZxC:X-Z--:13: ABCD.B d[Dreg],Dr - 0 0 4 @@ -416,7 +416,7 @@ 1100 rrr1 10dd dDDD:000:-----:-----:33: EXG.L Dr,d[Areg] - 4 0 4 1100 rrr1 11ss sSSS:000:-NZ00:-----:13: MULS.W s[!Areg],Dr -- 2 0 25 fea +- 2 0 12 fea 1101 rrr0 zzss sSSS:000:XNZVC:-----:13: ADD.z s[Areg,Dreg],Dr - 2 0 2 -- 2.47.3