Commit 023c2d2d authored by GnoStiC's avatar GnoStiC

puae 2.3.1

parent 24636373
...@@ -3605,6 +3605,13 @@ static void BPLxPTL (int hpos, uae_u16 v, int num) ...@@ -3605,6 +3605,13 @@ static void BPLxPTL (int hpos, uae_u16 v, int num)
{ {
decide_line (hpos); decide_line (hpos);
decide_fetch (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); bplpt[num] = (bplpt[num] & 0xffff0000) | (v & 0x0000fffe);
bplptx[num] = (bplptx[num] & 0xffff0000) | (v & 0x0000fffe); bplptx[num] = (bplptx[num] & 0xffff0000) | (v & 0x0000fffe);
//write_log ("%d:%d:BPL%dPTL %08X COP=%08x\n", hpos, vpos, num, bplpt[num], cop_state.ip); //write_log ("%d:%d:BPL%dPTL %08X COP=%08x\n", hpos, vpos, num, bplpt[num], cop_state.ip);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Gayle (and motherboard resources) memory bank * Gayle (and motherboard resources) memory bank
* *
* (c) 2006 - 2008 Toni Wilen * (c) 2006 - 2011 Toni Wilen
*/ */
#ifdef GAYLE #ifdef GAYLE
...@@ -480,6 +480,15 @@ static void ide_identify_drive (void) ...@@ -480,6 +480,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) static void ide_initialize_drive_parameters (void)
{ {
if (ide->hdhfd.size) { if (ide->hdhfd.size) {
...@@ -667,6 +676,8 @@ static void ide_do_command (uae_u8 cmd) ...@@ -667,6 +676,8 @@ static void ide_do_command (uae_u8 cmd)
ide_recalibrate (); ide_recalibrate ();
} else if (cmd == 0xec) { /* identify drive */ } else if (cmd == 0xec) { /* identify drive */
ide_identify_drive (); ide_identify_drive ();
} else if (cmd == 0x90) { /* execute drive diagnostics */
ide_execute_drive_diagnostics ();
} else if (cmd == 0x91) { /* initialize drive parameters */ } else if (cmd == 0x91) { /* initialize drive parameters */
ide_initialize_drive_parameters (); ide_initialize_drive_parameters ();
} else if (cmd == 0xc6) { /* set multiple mode */ } else if (cmd == 0xc6) { /* set multiple mode */
...@@ -744,16 +755,16 @@ static uae_u16 ide_get_data (void) ...@@ -744,16 +755,16 @@ static uae_u16 ide_get_data (void)
v = ide->secbuf[ide->data_offset + 1] | (ide->secbuf[ide->data_offset + 0] << 8); v = ide->secbuf[ide->data_offset + 1] | (ide->secbuf[ide->data_offset + 0] << 8);
ide->data_offset += 2; ide->data_offset += 2;
if (ide->data_size >= 0) if (ide->data_size < 0) {
ide->data_size -= 2;
else
ide->data_size += 2; ide->data_size += 2;
} else {
ide->data_size -= 2;
if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) { if (((ide->data_offset % ide->blocksize) == 0) && ((ide->data_offset / ide->blocksize) % ide->data_multi) == 0) {
irq = 1; irq = 1;
ide->data_offset = 0; ide->data_offset = 0;
} }
}
if (ide->data_size == 0) { if (ide->data_size == 0) {
irq = 1;
ide->status &= ~IDE_STATUS_DRQ; ide->status &= ~IDE_STATUS_DRQ;
if (IDE_LOG > 1) if (IDE_LOG > 1)
write_log ("IDE%d read finished\n", ide->num); write_log ("IDE%d read finished\n", ide->num);
...@@ -805,7 +816,6 @@ static void ide_put_data (uae_u16 v) ...@@ -805,7 +816,6 @@ static void ide_put_data (uae_u16 v)
ide->status &= ~IDE_STATUS_DRQ; ide->status &= ~IDE_STATUS_DRQ;
if (IDE_LOG > 1) if (IDE_LOG > 1)
write_log ("IDE%d write finished\n", ide->num); write_log ("IDE%d write finished\n", ide->num);
irq = 1;
} }
if (irq) if (irq)
ide_interrupt (); ide_interrupt ();
...@@ -951,6 +961,8 @@ static void ide_write (uaecptr addr, uae_u32 val) ...@@ -951,6 +961,8 @@ static void ide_write (uaecptr addr, uae_u32 val)
case IDE_DRVADDR: case IDE_DRVADDR:
break; break;
case IDE_DEVCON: case IDE_DEVCON:
if ((ide_devcon & 4) == 0 && (val & 4) != 0)
ide_execute_drive_diagnostics ();
ide_devcon = val; ide_devcon = val;
break; break;
case IDE_DATA: case IDE_DATA:
......
...@@ -28,6 +28,24 @@ ...@@ -28,6 +28,24 @@
#include "SDL.h" #include "SDL.h"
#endif #endif
// MacOSX < 10.5
#ifndef NSINTEGER_DEFINED
#define NSINTEGER_DEFINED
#ifdef __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#define NSIntegerMin LONG_MIN
#define NSIntegerMax LONG_MAX
#define NSUIntegerMax ULONG_MAX
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#define NSIntegerMin INT_MIN
#define NSIntegerMax INT_MAX
#define NSUIntegerMax UINT_MAX
#endif
#endif
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
/* The GTK GUI code seems to use 255 as max path length. Not sure why it /* The GTK GUI code seems to use 255 as max path length. Not sure why it
......
...@@ -3887,7 +3887,6 @@ static void remove_custom_config (struct uae_prefs *prefs, bool nocustom, int in ...@@ -3887,7 +3887,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 // prepare port for custom mapping, remove all current Amiga side device mappings
void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index) void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index)
{ {
......
...@@ -13,6 +13,24 @@ ...@@ -13,6 +13,24 @@
* Richard Drummond * Richard Drummond
*/ */
// MacOSX < 10.5
#ifndef NSINTEGER_DEFINED
#define NSINTEGER_DEFINED
#ifdef __LP64__ || NS_BUILD_32_LIKE_64
typedef long NSInteger;
typedef unsigned long NSUInteger;
#define NSIntegerMin LONG_MIN
#define NSIntegerMax LONG_MAX
#define NSUIntegerMax ULONG_MAX
#else
typedef int NSInteger;
typedef unsigned int NSUInteger;
#define NSIntegerMin INT_MIN
#define NSIntegerMax INT_MAX
#define NSUIntegerMax UINT_MAX
#endif
#endif
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
@interface EUAE_Main : NSObject @interface EUAE_Main : NSObject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment