From 4cb7fcf2ce1f3c8b55ea8479642019de398a067e Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 15 Jan 2011 16:38:45 +0200 Subject: [PATCH] 2310b11 --- custom.cpp | 7 +++++++ gayle.cpp | 30 +++++++++++++++++++++--------- inputdevice.cpp | 1 - od-win32/blkdev_win32_spti.cpp | 9 +++++---- od-win32/keyboard_win32.cpp | 2 +- od-win32/picasso96_win.cpp | 1 + od-win32/rp.cpp | 13 ++++++++----- od-win32/win32.h | 4 ++-- od-win32/winuaechangelog.txt | 10 ++++++++++ 9 files changed, 55 insertions(+), 22 deletions(-) diff --git a/custom.cpp b/custom.cpp index 1b278a12..95ae58ca 100644 --- a/custom.cpp +++ b/custom.cpp @@ -3618,6 +3618,13 @@ static void BPLxPTL (int hpos, uae_u16 v, int num) { decide_line (hpos); decide_fetch (hpos); + /* chipset feature: BPLxPTL write and next cycle doing DMA fetch using same pointer register -> + * this write goes nowhere (same happens with all DMA channels, not just BPL) + * (intro MoreNewStuffy by PlasmaForce) + */ + /* only detect copper accesses to prevent too fast CPU mode glitches */ + if (copper_access && is_bitplane_dma (hpos + 1) == num + 1) + return; bplpt[num] = (bplpt[num] & 0xffff0000) | (v & 0x0000fffe); bplptx[num] = (bplptx[num] & 0xffff0000) | (v & 0x0000fffe); //write_log (L"%d:%d:BPL%dPTL %08X COP=%08x\n", hpos, vpos, num, bplpt[num], cop_state.ip); diff --git a/gayle.cpp b/gayle.cpp index 1155da6f..41400ca5 100644 --- a/gayle.cpp +++ b/gayle.cpp @@ -3,7 +3,7 @@ * * Gayle (and motherboard resources) memory bank * -* (c) 2006 - 2008 Toni Wilen +* (c) 2006 - 2011 Toni Wilen */ #define GAYLE_LOG 0 @@ -482,6 +482,15 @@ static void ide_identify_drive (void) } } +static void ide_execute_drive_diagnostics (void) +{ + ide_error = 1; + ide_sector = ide_nsector = 1; + ide_select = 0; + ide_lcyl = ide_hcyl = 0; + ide->status &= ~IDE_STATUS_BSY; +} + static void ide_initialize_drive_parameters (void) { if (ide->hdhfd.size) { @@ -669,6 +678,8 @@ static void ide_do_command (uae_u8 cmd) ide_recalibrate (); } else if (cmd == 0xec) { /* identify drive */ ide_identify_drive (); + } else if (cmd == 0x90) { /* execute drive diagnostics */ + ide_execute_drive_diagnostics (); } else if (cmd == 0x91) { /* initialize drive parameters */ ide_initialize_drive_parameters (); } else if (cmd == 0xc6) { /* set multiple mode */ @@ -746,16 +757,16 @@ static uae_u16 ide_get_data (void) v = ide->secbuf[ide->data_offset + 1] | (ide->secbuf[ide->data_offset + 0] << 8); ide->data_offset += 2; - if (ide->data_size >= 0) - ide->data_size -= 2; - else + if (ide->data_size < 0) { ide->data_size += 2; - if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) { - irq = 1; - ide->data_offset = 0; + } else { + ide->data_size -= 2; + if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) { + irq = 1; + ide->data_offset = 0; + } } if (ide->data_size == 0) { - irq = 1; ide->status &= ~IDE_STATUS_DRQ; if (IDE_LOG > 1) write_log (L"IDE%d read finished\n", ide->num); @@ -807,7 +818,6 @@ static void ide_put_data (uae_u16 v) ide->status &= ~IDE_STATUS_DRQ; if (IDE_LOG > 1) write_log (L"IDE%d write finished\n", ide->num); - irq = 1; } if (irq) ide_interrupt (); @@ -953,6 +963,8 @@ static void ide_write (uaecptr addr, uae_u32 val) case IDE_DRVADDR: break; case IDE_DEVCON: + if ((ide_devcon & 4) == 0 && (val & 4) != 0) + ide_execute_drive_diagnostics (); ide_devcon = val; break; case IDE_DATA: diff --git a/inputdevice.cpp b/inputdevice.cpp index 9dfb1bb9..94e5887a 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -3865,7 +3865,6 @@ static void remove_custom_config (struct uae_prefs *prefs, bool nocustom, int in } } - // prepare port for custom mapping, remove all current Amiga side device mappings void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index) { diff --git a/od-win32/blkdev_win32_spti.cpp b/od-win32/blkdev_win32_spti.cpp index 6b8e60f2..0db2036b 100644 --- a/od-win32/blkdev_win32_spti.cpp +++ b/od-win32/blkdev_win32_spti.cpp @@ -90,8 +90,8 @@ static struct dev_info_spti *unitcheck (int unitnum) if (unittable[unitnum] <= 0) return NULL; unitnum = unittable[unitnum] - 1; - if (dev_info[unitnum].drvletter == 0) - return NULL; +// if (dev_info[unitnum].drvletter == 0) +// return NULL; return &dev_info[unitnum]; } @@ -533,9 +533,10 @@ static int open_scsi_device2 (struct dev_info_spti *di, int unitnum) di->inquirydata = xmalloc (uae_u8, INQUIRY_SIZE); memcpy (di->inquirydata, inqdata, INQUIRY_SIZE); xfree (dev); - update_device_info (unitnum); di->open = true; - blkdev_cd_change (unitnum, di->drvletter ? di->drvlettername : di->name); + update_device_info (unitnum); + if (di->type == INQ_ROMD) + blkdev_cd_change (unitnum, di->drvletter ? di->drvlettername : di->name); return 1; } xfree (dev); diff --git a/od-win32/keyboard_win32.cpp b/od-win32/keyboard_win32.cpp index 8f325089..c7331300 100644 --- a/od-win32/keyboard_win32.cpp +++ b/od-win32/keyboard_win32.cpp @@ -177,7 +177,7 @@ static struct uae_input_device_kbr_default keytrans[] = { { -1, 0 } }; -static int kb_np[] = { DIK_NUMPAD4, -1, DIK_NUMPAD6, -1, DIK_NUMPAD8, -1, DIK_NUMPAD2, -1, DIK_NUMPAD0, DIK_NUMPAD5, -1, DIK_DECIMAL, DIK_NUMPADENTER, -1, -1 }; +static int kb_np[] = { DIK_NUMPAD4, -1, DIK_NUMPAD6, -1, DIK_NUMPAD8, -1, DIK_NUMPAD2, -1, DIK_NUMPAD0, DIK_NUMPAD5, -1, DIK_DECIMAL, -1, DIK_NUMPADENTER, -1, -1 }; static int kb_ck[] = { DIK_LEFT, -1, DIK_RIGHT, -1, DIK_UP, -1, DIK_DOWN, -1, DIK_RCONTROL, DIK_RMENU, -1, DIK_RSHIFT, -1, -1 }; static int kb_se[] = { DIK_A, -1, DIK_D, -1, DIK_W, -1, DIK_S, -1, DIK_LMENU, -1, DIK_LSHIFT, -1, -1 }; static int kb_np3[] = { DIK_NUMPAD4, -1, DIK_NUMPAD6, -1, DIK_NUMPAD8, -1, DIK_NUMPAD2, -1, DIK_NUMPAD0, DIK_NUMPAD5, -1, DIK_DECIMAL, -1, DIK_NUMPADENTER, -1, -1 }; diff --git a/od-win32/picasso96_win.cpp b/od-win32/picasso96_win.cpp index 074fad26..e6c69856 100644 --- a/od-win32/picasso96_win.cpp +++ b/od-win32/picasso96_win.cpp @@ -862,6 +862,7 @@ static void setconvert (void) else alloc_colors_rgb (5, 6, 5, 11, 5, 0, 0, 0, 0, 0, p96rc, p96gc, p96bc); gfx_set_picasso_colors (picasso96_state.RGBFormat); + picasso_palette (); if (host_mode != ohost_mode || picasso96_state.RGBFormat != orgbformat) { write_log (L"RTG conversion: Depth=%d HostRGBF=%d P96RGBF=%d Mode=%d\n", d, host_mode, picasso96_state.RGBFormat, v); ohost_mode = host_mode; diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index 82b6f5ed..374beed9 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -356,10 +356,10 @@ static void get_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) if (WIN32GFX_IsPicassoScreen ()) { full = p->gfx_pfullscreen; - sm->lClipTop = 0; - sm->lClipLeft = 0; - sm->lClipHeight = picasso96_state.Height; - sm->lClipWidth = picasso96_state.Width; + sm->lClipTop = -1; + sm->lClipLeft = -1; + sm->lClipWidth = -1;//picasso96_state.Width; + sm->lClipHeight = -1;//picasso96_state.Height; } else { @@ -523,6 +523,7 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) } p->gfx_pfullscreen = fs; p->gfx_afullscreen = fs; + p->win32_rtgscaleifsmall = fs == 2; #if 1 if (fs) { p->gfx_filter_aspect = -1; @@ -532,17 +533,19 @@ static void set_screenmode (struct RPScreenMode *sm, struct uae_prefs *p) p->gfx_filter_keep_aspect = 0; } #endif + write_log(L"%dx%d %dx%d\n", sm->lClipLeft, sm->lClipTop, sm->lClipWidth, sm->lClipHeight); +#if 1 p->gfx_xcenter_pos = sm->lClipLeft; p->gfx_ycenter_pos = sm->lClipTop; if (sm->lClipWidth > 0) p->gfx_xcenter_size = sm->lClipWidth; if (sm->lClipHeight > 0) p->gfx_ycenter_size = sm->lClipHeight; - if (p->gfx_xcenter_pos >= 0 || p->gfx_ycenter_pos >= 0) p->gfx_filter_autoscale = AUTOSCALE_MANUAL; else p->gfx_filter_autoscale = AUTOSCALE_STATIC_NOMINAL; +#endif //p->gfx_filter = rp_filter_default; p->gfx_filter_horiz_zoom_mult = 1000 / hmult; diff --git a/od-win32/win32.h b/od-win32/win32.h index 83bfc2b0..b016fdb5 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,8 +18,8 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define WINUAEBETA L"10" -#define WINUAEDATE MAKEBD(2011, 1, 9) +#define WINUAEBETA L"11" +#define WINUAEDATE MAKEBD(2011, 1, 15) #define WINUAEEXTRA L"" #define WINUAEREV L"" diff --git a/od-win32/winuaechangelog.txt b/od-win32/winuaechangelog.txt index d1d6487c..ebebc976 100644 --- a/od-win32/winuaechangelog.txt +++ b/od-win32/winuaechangelog.txt @@ -1,4 +1,14 @@ +- random RTG color errors when switching to/from fullscreen 8-bit RTG modes +- emulate chipset feature where custom dma pointer register write is ignored if next cycle uses same register for Agnus DMA access + (bitplanes added, sprites partially supported previously) fixes intro MoreNewStuffy by PlasmaForce +- added execute drive diagnostics IDE command to Gayle IDE emulation (used by AROS ata.device) +- some spurious IDE interrupts removed (AROS ata.device complained) +- SPTI+SCSI SCAN ignored all detected non-CD devices (2.2.1) +- joystick layout A: numpad enter was mapped to button 2, it should have been button 3 and only if gamepad joystick enabled + +Beta 10: + - fast multicore systems filesystem slowdown fix (always been there but "slower" CPUs didn't trigger it so easily) - last scanline was invisible in filtered doubled modes - sprite dma does not switch immediately off when DMACON sprite bit is cleared (Magic Demo / Diabolics) -- 2.47.3