currprefs.sound_volume = changed_prefs.sound_volume;
currprefs.sound_stereo_swap_paula = changed_prefs.sound_stereo_swap_paula;
currprefs.sound_stereo_swap_ahi = changed_prefs.sound_stereo_swap_ahi;
+
if (currprefs.produce_sound >= 2) {
if (!init_audio ()) {
if (! sound_available) {
*p2++ = '\0';
- if (value[0] == '0' && value[1] == 'x')
+ if (value[0] == '0' && toupper (value[1]) == 'X')
value += 2, base = 16;
*result = strtol (value, &endptr, base);
*p = p2;
if (*p2 != 0)
*p2++ = '\0';
- if (value[0] == '0' && value[1] == 'x')
+ if (value[0] == '0' && toupper (value[1]) == 'X')
value += 2, base = 16;
*result = strtol (value, &endptr, base);
*p = p2;
return uci;
}
+static void parse_addmem (struct uae_prefs *p, char *buf, int num)
+{
+ uae_u32 size = 0, addr = 0;
+
+ if (!getintval2 (&buf, &addr, ','))
+ return;
+ if (!getintval2 (&buf, &size, 0))
+ return;
+ if (addr & 0xffff)
+ return;
+ if ((size & 0xffff) || (size & 0xffff0000) == 0)
+ return;
+ p->custom_memory_addrs[num] = addr;
+ p->custom_memory_sizes[num] = size;
+}
+
static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *value)
{
int tmpval, dummy, i;
return 1;
}
+ if (cfgfile_string (option, value, "addmem1", tmpbuf, sizeof tmpbuf)) {
+ parse_addmem (p, tmpbuf, 0);
+ return 1;
+ }
+ if (cfgfile_string (option, value, "addmem2", tmpbuf, sizeof tmpbuf)) {
+ parse_addmem (p, tmpbuf, 1);
+ return 1;
+ }
+
if (cfgfile_strval (option, value, "chipset", &tmpval, csmode, 0)) {
set_chipset_mask (p, tmpval);
return 1;
p->chipmem_size = 0x00080000;
p->bogomem_size = 0x00080000;
p->gfxmem_size = 0x00000000;
+ p->custom_memory_addrs[0] = 0;
+ p->custom_memory_sizes[0] = 0;
+ p->custom_memory_addrs[1] = 0;
+ p->custom_memory_sizes[1] = 0;
p->nr_floppies = 2;
p->dfxtype[0] = DRV_35_DD;
while (int_labels[i].name || trap_labels[j].name) {
if (int_labels[i].name) {
console_out ("$%08X: %s \t $%08X\t", int_labels[i].adr + addr,
- int_labels[i].name, get_long (int_labels[i].adr + (int_labels[i].adr == 4 ? 0 : addr)));
+ int_labels[i].name, get_long (int_labels[i].adr + addr));
i++;
} else {
console_out ("\t\t\t\t");
int enforcermode = 0;
static int enforcer_hit = 0; /* set to 1 if displaying the hit */
-#define ENFORCER_BUF_SIZE 4096
+#define ENFORCER_BUF_SIZE 8192
static char enforcer_buf[ENFORCER_BUF_SIZE];
uae_u32 (REGPARAM3 *saved_chipmem_lget) (uaecptr addr);
}
#endif
+
#ifdef SAVESTATE
static size_t fast_filepos, z3_filepos, p96_filepos;
#endif
{
/* make sure there is always empty space between Z3 and P96 RAM */
p96ram_start = currprefs.z3fastmem_start + ((currprefs.z3fastmem_size + 0xffffff) & ~0xffffff);
- if (p96ram_start == currprefs.z3fastmem_start + currprefs.z3fastmem_size)
+ if (p96ram_start == currprefs.z3fastmem_start + currprefs.z3fastmem_size &&
+ (currprefs.z3fastmem_size < 512 * 1024 * 1024 || currprefs.gfxmem_size < 128 * 1024 * 1024))
p96ram_start += 0x1000000;
}
#include "ncr_scsi.h"
/*
-D80000 to D8FFFF 64 KB SPARE chip select
-D90000 to D9FFFF 64 KB ARCNET chip select
-DA0000 to DA3FFF 16 KB IDE drive
-DA4000 to DA4FFF 16 KB IDE reserved
-DA8000 to DAFFFF 32 KB Credit Card and IDE configregisters
-DB0000 to DBFFFF 64 KB Not used (reserved for external IDE)
-* DC0000 to DCFFFF 64 KB Real Time Clock (RTC)
-DD0000 to DDFFFF 64 KB A3000 DMA controller
-DD0000 to DD1FFF A4000 DMAC
-DD2000 to DDFFFF A4000 IDE
-DE0000 to DEFFFF 64 KB Motherboard resources
+600000 to 9FFFFF 4 MB Credit Card memory if CC present
+AOOOOO to A1FFFF 128 KB Credit Card Attributes
+A20000 to A3FFFF 128 KB Credit Card I/O
+A40000 to A5FFFF 128 KB Credit Card Bits
+A60000 to A7FFFF 128 KB PC I/O
+
+D80000 to D8FFFF 64 KB SPARE chip select
+D90000 to D9FFFF 64 KB ARCNET chip select
+DA0000 to DA3FFF 16 KB IDE drive
+DA4000 to DA4FFF 16 KB IDE reserved
+DA8000 to DAFFFF 32 KB Credit Card and IDE configregisters
+DB0000 to DBFFFF 64 KB Not used (reserved for external IDE)
+* DC0000 to DCFFFF 64 KB Real Time Clock (RTC)
+DD0000 to DDFFFF 64 KB A3000 DMA controller
+DD0000 to DD1FFF A4000 DMAC
+DD2000 to DDFFFF A4000 IDE
+DE0000 to DEFFFF 64 KB Motherboard resources
*/
#define NCR_OFFSET 0x40
}
}
+#define PCMCIA_COMMON_MAX 0x400000
+static int pcmcia_common_size, pcmcia_attrs_size;
+static uae_u8 *pcmcia_common;
+static uae_u8 *pcmcia_attrs;
+
static uae_u32 gayle_attr_read (uaecptr addr)
{
uae_u8 v = 0;
- write_log ("R: %x %x\n", addr, M68K_GETPC);
- addr &= 262144 - 1;
- switch (addr)
- {
- case 0:
- v = 0x91;
- break;
- case 2:
- v = 0x05;
- break;
- case 4:
- v = 0x23;
- break;
+ write_log ("PCMCIA ATTR R: %x %x\n", addr, M68K_GETPC);
+ addr &= 0x80000 - 1;
+ if (addr >= 0x40000) {
+ write_log ("GAYLE: Reset disabled\n");
+ gayle_irq |= GAYLE_IRQ_CCDET | GAYLE_IRQ_SC | GAYLE_CS_IRQ;
+ if (gayle_intena & GAYLE_CS_IRQ)
+ INTREQ_f (0x8000 | 0x0008);
+ return v;
}
+ if (addr >= pcmcia_attrs_size)
+ return v;
+ v = pcmcia_attrs[addr / 2];
return v;
}
static void gayle_attr_write (uaecptr addr, uae_u32 v)
{
- write_log ("W: %x=%x %x\n", addr, v, M68K_GETPC);
- addr &= 262144 - 1;
- if (addr == 0x40000) {
- if (v)
- write_log ("GAYLE: Reset active\n");
- else
- write_log ("GAYLE: Reset non-active\n");
+ write_log ("PCMCIA ATTR W: %x=%x %x\n", addr, v, M68K_GETPC);
+ addr &= 0x80000 - 1;
+ if (addr >= 0x40000) {
+ write_log ("GAYLE: Reset active\n");
+ } else if (addr < pcmcia_attrs_size) {
+ ;
}
}
+static void initsramattr (void)
+{
+ int wps = 1;
+ uae_u8 *p = pcmcia_attrs;
+
+ *p++ = 0x01; /* CISTPL_DEVICE */
+ *p++ = 3;
+ *p++ = (6 /* DTYPE_SRAM */ << 4) | (wps ? 8 : 0) | (3 /* DSPEED_150NS */);
+ *p++ = (4 << 3) | 4;
+ *p++ = 0xff;
+
+ *p++ = 0xff; /* CISTPL_END */
+}
+
+static void initpcmcia (void)
+{
+ pcmcia_common_size = 4 * 1024 * 1024;
+ xfree (pcmcia_common);
+ pcmcia_common = xcalloc (pcmcia_common_size, 1);
+ pcmcia_attrs_size = 256;
+ xfree (pcmcia_attrs);
+ pcmcia_attrs = xmalloc (pcmcia_attrs_size);
+ initsramattr();
+}
+
+static uae_u32 gayle_common_read (uaecptr addr)
+{
+ uae_u8 v = 0;
+ write_log ("PCMCIA COMMON R: %x %x\n", addr, M68K_GETPC);
+ addr &= PCMCIA_COMMON_MAX - 1;
+ if (addr < pcmcia_common_size)
+ v = pcmcia_common[addr];
+ return v;
+}
+static void gayle_common_write (uaecptr addr, uae_u32 v)
+{
+ write_log ("PCMCIA COMMON W: %x=%x %x\n", addr, v, M68K_GETPC);
+ addr &= PCMCIA_COMMON_MAX - 1;
+ if (addr < pcmcia_common_size)
+ pcmcia_common[addr] = v;
+}
+
+static uae_u32 REGPARAM3 gayle_common_lget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 gayle_common_wget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 gayle_common_bget (uaecptr) REGPARAM;
+static void REGPARAM3 gayle_common_lput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 gayle_common_wput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 gayle_common_bput (uaecptr, uae_u32) REGPARAM;
+
+addrbank gayle_common_bank = {
+ gayle_common_lget, gayle_common_wget, gayle_common_bget,
+ gayle_common_lput, gayle_common_wput, gayle_common_bput,
+ default_xlate, default_check, NULL, "Gayle PCMCIA Common",
+ dummy_lgeti, dummy_wgeti, ABFLAG_RAM
+};
+
+
static uae_u32 REGPARAM3 gayle_attr_lget (uaecptr) REGPARAM;
static uae_u32 REGPARAM3 gayle_attr_wget (uaecptr) REGPARAM;
static uae_u32 REGPARAM3 gayle_attr_bget (uaecptr) REGPARAM;
addrbank gayle_attr_bank = {
gayle_attr_lget, gayle_attr_wget, gayle_attr_bget,
gayle_attr_lput, gayle_attr_wput, gayle_attr_bput,
- default_xlate, default_check, NULL, "Gayle PCMCIA attribute",
- dummy_lgeti, dummy_wgeti, ABFLAG_IO
+ default_xlate, default_check, NULL, "Gayle PCMCIA Attribute/Misc",
+ dummy_lgeti, dummy_wgeti, ABFLAG_IO | ABFLAG_SAFE
};
static uae_u32 REGPARAM2 gayle_attr_lget (uaecptr addr)
#endif
return gayle_attr_read (addr);
}
-
static void REGPARAM2 gayle_attr_lput (uaecptr addr, uae_u32 value)
{
#ifdef JIT
gayle_attr_wput (addr, value >> 16);
gayle_attr_wput (addr + 2, value & 0xffff);
}
-
static void REGPARAM2 gayle_attr_wput (uaecptr addr, uae_u32 value)
{
#ifdef JIT
gayle_attr_bput (addr, value >> 8);
gayle_attr_bput (addr + 1, value & 0xff);
}
-
static void REGPARAM2 gayle_attr_bput (uaecptr addr, uae_u32 value)
{
#ifdef JIT
}
+static uae_u32 REGPARAM2 gayle_common_lget (uaecptr addr)
+{
+ uae_u32 v;
+#ifdef JIT
+ special_mem |= S_READ;
+#endif
+ v = gayle_common_wget (addr) << 16;
+ v |= gayle_common_wget (addr + 2);
+ return v;
+}
+static uae_u32 REGPARAM2 gayle_common_wget (uaecptr addr)
+{
+ uae_u16 v;
+#ifdef JIT
+ special_mem |= S_READ;
+#endif
+ v = gayle_common_bget (addr) << 8;
+ v |= gayle_common_bget (addr + 1);
+ return v;
+}
+static uae_u32 REGPARAM2 gayle_common_bget (uaecptr addr)
+{
+#ifdef JIT
+ special_mem |= S_READ;
+#endif
+ return gayle_common_read (addr);
+}
+static void REGPARAM2 gayle_common_lput (uaecptr addr, uae_u32 value)
+{
+#ifdef JIT
+ special_mem |= S_WRITE;
+#endif
+ gayle_common_wput (addr, value >> 16);
+ gayle_common_wput (addr + 2, value & 0xffff);
+}
+static void REGPARAM2 gayle_common_wput (uaecptr addr, uae_u32 value)
+{
+#ifdef JIT
+ special_mem |= S_WRITE;
+#endif
+ gayle_common_bput (addr, value >> 8);
+ gayle_common_bput (addr + 1, value & 0xff);
+}
+static void REGPARAM2 gayle_common_bput (uaecptr addr, uae_u32 value)
+{
+#ifdef JIT
+ special_mem |= S_WRITE;
+#endif
+ gayle_common_write (addr, value);
+}
+
+
static int rl (uae_u8 *p)
{
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3]);
ncr_reset ();
}
gayle_bank.name = bankname;
+
+ initpcmcia();
}
uae_u8 *restore_gayle (uae_u8 *src)
#define HD_CONTROLLER_SCSI4 9
#define HD_CONTROLLER_SCSI5 10
#define HD_CONTROLLER_SCSI6 11
+#define HD_CONTROLLER_PCMCIA_SRAM 12
+#define HD_CONTROLLER_PCMCIA_IDE 13
#define FILESYS_VIRTUAL 0
#define FILESYS_HARDFILE 1
extern addrbank gayle_bank;
extern addrbank gayle2_bank;
extern addrbank gayle_attr_bank;
+extern addrbank gayle_common_bank;
extern addrbank mbres_bank;
extern addrbank akiko_bank;
extern addrbank cardmem_bank;
extern void mapped_free (uae_u8 *);
extern void clearexec (void);
extern void mapkick (void);
-extern int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int *cloanto_rom);
extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
extern void init_shm(void);
extern void a3000_fakekick(int);
};
#define MAX_SPARE_DRIVES 20
+#define MAX_CUSTOM_MEMORY_ADDRS 2
#define CONFIG_TYPE_HARDWARE 1
#define CONFIG_TYPE_HOST 2
uae_u32 mbresmem_low_size;
uae_u32 mbresmem_high_size;
uae_u32 gfxmem_size;
+ uae_u32 custom_memory_addrs[MAX_CUSTOM_MEMORY_ADDRS];
+ uae_u32 custom_memory_sizes[MAX_CUSTOM_MEMORY_ADDRS];
int kickshifter;
int filesys_no_uaefsdb;
if (currprefs.start_debugger && debuggable ())
activate_debugger ();
- if (sound_available && currprefs.produce_sound > 1 && ! init_audio ()) {
- write_log ("Sound driver unavailable: Sound output disabled\n");
+ if (!init_audio ()) {
+ if (sound_available && currprefs.produce_sound > 1) {
+ write_log ("Sound driver unavailable: Sound output disabled\n");
+ }
currprefs.produce_sound = 0;
}
extendedkickmem_lget, extendedkickmem_wget, ABFLAG_ROM
};
+
+static uae_u32 allocated_custmem1, allocated_custmem2;
+static uae_u32 custmem1_mask, custmem2_mask;
+static uae_u8 *custmem1, *custmem2;
+
+static uae_u32 REGPARAM3 custmem1_lget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 custmem1_wget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 custmem1_bget (uaecptr) REGPARAM;
+static void REGPARAM3 custmem1_lput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 custmem1_wput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 custmem1_bput (uaecptr, uae_u32) REGPARAM;
+static int REGPARAM3 custmem1_check (uaecptr addr, uae_u32 size) REGPARAM;
+static uae_u8 *REGPARAM3 custmem1_xlate (uaecptr addr) REGPARAM;
+
+static uae_u32 REGPARAM2 custmem1_lget (uaecptr addr)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ m = custmem1 + addr;
+ return do_get_mem_long ((uae_u32 *)m);
+}
+static uae_u32 REGPARAM2 custmem1_wget (uaecptr addr)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ m = custmem1 + addr;
+ return do_get_mem_word ((uae_u16 *)m);
+}
+static uae_u32 REGPARAM2 custmem1_bget (uaecptr addr)
+{
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ return custmem1[addr];
+}
+static void REGPARAM2 custmem1_lput (uaecptr addr, uae_u32 l)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ m = custmem1 + addr;
+ do_put_mem_long ((uae_u32 *)m, l);
+}
+static void REGPARAM2 custmem1_wput (uaecptr addr, uae_u32 w)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ m = custmem1 + addr;
+ do_put_mem_word ((uae_u16 *)m, w);
+}
+static void REGPARAM2 custmem1_bput (uaecptr addr, uae_u32 b)
+{
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ custmem1[addr] = b;
+}
+static int REGPARAM2 custmem1_check (uaecptr addr, uae_u32 size)
+{
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ return (addr + size) <= currprefs.custom_memory_sizes[0];
+}
+static uae_u8 *REGPARAM2 custmem1_xlate (uaecptr addr)
+{
+ addr -= currprefs.custom_memory_addrs[0] & custmem1_mask;
+ addr &= custmem1_mask;
+ return custmem1 + addr;
+}
+
+static uae_u32 REGPARAM3 custmem2_lget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 custmem2_wget (uaecptr) REGPARAM;
+static uae_u32 REGPARAM3 custmem2_bget (uaecptr) REGPARAM;
+static void REGPARAM3 custmem2_lput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 custmem2_wput (uaecptr, uae_u32) REGPARAM;
+static void REGPARAM3 custmem2_bput (uaecptr, uae_u32) REGPARAM;
+static int REGPARAM3 custmem2_check (uaecptr addr, uae_u32 size) REGPARAM;
+static uae_u8 *REGPARAM3 custmem2_xlate (uaecptr addr) REGPARAM;
+
+static uae_u32 REGPARAM2 custmem2_lget (uaecptr addr)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ m = custmem2 + addr;
+ return do_get_mem_long ((uae_u32 *)m);
+}
+static uae_u32 REGPARAM2 custmem2_wget (uaecptr addr)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ m = custmem2 + addr;
+ return do_get_mem_word ((uae_u16 *)m);
+}
+static uae_u32 REGPARAM2 custmem2_bget (uaecptr addr)
+{
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ return custmem2[addr];
+}
+static void REGPARAM2 custmem2_lput (uaecptr addr, uae_u32 l)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ m = custmem2 + addr;
+ do_put_mem_long ((uae_u32 *)m, l);
+}
+static void REGPARAM2 custmem2_wput (uaecptr addr, uae_u32 w)
+{
+ uae_u8 *m;
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ m = custmem2 + addr;
+ do_put_mem_word ((uae_u16 *)m, w);
+}
+static void REGPARAM2 custmem2_bput (uaecptr addr, uae_u32 b)
+{
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ custmem2[addr] = b;
+}
+static int REGPARAM2 custmem2_check (uaecptr addr, uae_u32 size)
+{
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ return (addr + size) <= currprefs.custom_memory_sizes[1];
+}
+static uae_u8 *REGPARAM2 custmem2_xlate (uaecptr addr)
+{
+ addr -= currprefs.custom_memory_addrs[1] & custmem2_mask;
+ addr &= custmem2_mask;
+ return custmem2 + addr;
+}
+
+addrbank custmem1_bank = {
+ custmem1_lget, custmem1_wget, custmem1_bget,
+ custmem1_lput, custmem1_wput, custmem1_bput,
+ custmem1_xlate, custmem1_check, NULL, "Non-autoconfig RAM #1",
+ custmem1_lget, custmem1_wget, ABFLAG_RAM
+};
+addrbank custmem2_bank = {
+ custmem1_lget, custmem1_wget, custmem1_bget,
+ custmem1_lput, custmem1_wput, custmem1_bput,
+ custmem1_xlate, custmem1_check, NULL, "Non-autoconfig RAM #2",
+ custmem1_lget, custmem1_wget, ABFLAG_RAM
+};
+
#define fkickmem_size 524288
void a3000_fakekick(int map)
{
}
static char *kickstring = "exec.library";
-static int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int *cloanto_rom)
+static int read_kickstart (struct zfile *f, uae_u8 *mem, int size, int dochecksum, int *cloanto_rom, int noalias)
{
unsigned char buffer[20];
int i, j, oldpos;
notify_user (NUMSG_KSROMREADERROR);
return 0;
}
- if (i == size / 2)
+ if (!noalias && i == size / 2)
memcpy (mem + size / 2, mem, size / 2);
if (cr) {
}
zfile_fseek (f, 0, SEEK_END);
size = zfile_ftell (f);
+ extendedkickmem_size = 524288;
off = 0;
- if (size > 300000) {
- extendedkickmem_size = 524288;
+ if (currprefs.cs_cd32cd) {
+ extendedkickmem_type = EXTENDED_ROM_CD32;
+ if (size >= 524288 * 2)
+ off = 524288;
+ } else if (currprefs.cs_cdtvcd || currprefs.cs_cdtvram) {
+ extendedkickmem_type = EXTENDED_ROM_CDTV;
+ } else if (size > 300000) {
extendedkickmem_type = EXTENDED_ROM_CD32;
if (size >= 524288 * 2)
off = 524288;
} else {
- extendedkickmem_size = 262144;
extendedkickmem_type = EXTENDED_ROM_CDTV;
}
+
zfile_fseek (f, off, SEEK_SET);
switch (extendedkickmem_type) {
-
case EXTENDED_ROM_CDTV:
extendedkickmemory = (uae_u8 *) mapped_malloc (extendedkickmem_size, "rom_f0");
extendedkickmem_bank.baseaddr = (uae_u8 *) extendedkickmemory;
extendedkickmem_bank.baseaddr = (uae_u8 *) extendedkickmemory;
break;
}
- read_kickstart (f, extendedkickmemory, extendedkickmem_size, 0, 0);
+ read_kickstart (f, extendedkickmemory, extendedkickmem_size, 0, 0, 1);
extendedkickmem_mask = extendedkickmem_size - 1;
zfile_fclose (f);
return 1;
}
zfile_fseek (f, kspos, SEEK_SET);
}
- size = read_kickstart (f, kickmemory, maxsize, 1, &cloanto_rom);
+ size = read_kickstart (f, kickmemory, maxsize, 1, &cloanto_rom, 0);
if (size == 0)
goto err;
kickmem_mask = size - 1;
extendedkickmemory = (uae_u8 *) mapped_malloc (extendedkickmem_size, "rom_e0");
extendedkickmem_bank.baseaddr = (uae_u8 *) extendedkickmemory;
zfile_fseek (f, extpos, SEEK_SET);
- read_kickstart (f, extendedkickmemory, 0x80000, 0, 0);
+ read_kickstart (f, extendedkickmemory, 0x80000, 0, 0, 1);
extendedkickmem_mask = extendedkickmem_size - 1;
}
}
if (!canbang) {
nocanbang();
- return xmalloc (s + 4);
+ return xcalloc (s + 4, 1);
}
id = shmget (IPC_PRIVATE, s, 0x1ff, file);
}
cdtv_loadcardmem(cardmemory, allocated_cardmem);
}
+ if (allocated_custmem1 != currprefs.custom_memory_sizes[0]) {
+ if (custmem1)
+ mapped_free (custmem1);
+ custmem1 = 0;
+ allocated_custmem1 = currprefs.custom_memory_sizes[0];
+ custmem1_mask = allocated_custmem1 - 1;
+ if (allocated_custmem1) {
+ custmem1 = mapped_malloc (allocated_custmem1, "custmem1");
+ if (!custmem1)
+ allocated_custmem1 = 0;
+ }
+ }
+ if (allocated_custmem2 != currprefs.custom_memory_sizes[1]) {
+ if (custmem2)
+ mapped_free (custmem2);
+ custmem2 = 0;
+ allocated_custmem2 = currprefs.custom_memory_sizes[1];
+ custmem2_mask = allocated_custmem2 - 1;
+ if (allocated_custmem2) {
+ custmem2 = mapped_malloc (allocated_custmem2, "custmem2");
+ if (!custmem2)
+ allocated_custmem2 = 0;
+ }
+ }
+
if (savestate_state == STATE_RESTORE) {
restore_ram (bootrom_filepos, rtarea);
restore_ram (chip_filepos, chipmemory);
if (currprefs.cs_ide == 1) {
map_banks (&gayle_bank, 0xD8, 6, 0);
map_banks (&gayle2_bank, 0xDD, 2, 0);
- // map_banks (&gayle_attr_bank, 0xA0, 8, 0); only if PCMCIA card inserted */
+ //map_banks (&gayle_attr_bank, 0xA0, 8, 0); // only if PCMCIA card inserted
+ //map_banks (&gayle_common_bank, 0x60, 64, 0); // only if PCMCIA card inserted
}
if (currprefs.cs_ide == 2 || currprefs.cs_mbdmac == 2) {
map_banks (&gayle_bank, 0xDD, 1, 0);
break;
#ifdef CDTV
case EXTENDED_ROM_CDTV:
- map_banks (&extendedkickmem_bank, 0xF0, 4, 0);
+ map_banks (&extendedkickmem_bank, 0xF0, 8, 0);
break;
#endif
#ifdef CD32
map_banks (&kickmem_bank, 0xB0, 8, 0);
}
}
+
+ if (currprefs.custom_memory_sizes[0]) {
+ map_banks (&custmem1_bank,
+ currprefs.custom_memory_addrs[0] >> 16,
+ currprefs.custom_memory_sizes[0] >> 16, 0);
+ }
+ if (currprefs.custom_memory_sizes[1]) {
+ map_banks (&custmem2_bank,
+ currprefs.custom_memory_addrs[1] >> 16,
+ currprefs.custom_memory_sizes[1] >> 16, 0);
+ }
+
#ifdef ARCADIA
if (is_arcadia_rom (currprefs.romextfile) == ARCADIA_BIOS) {
if (strcmp (currprefs.romextfile, changed_prefs.romextfile) != 0)
a3000lmemory = a3000hmemory = 0;
bogomemory = 0;
cardmemory = 0;
+ custmem1 = 0;
+ custmem2 = 0;
kickmemory = mapped_malloc (0x80000, "kick");
memset (kickmemory, 0, 0x80000);
cdtv_savecardmem (cardmemory, allocated_cardmem);
mapped_free (cardmemory);
}
+ if (custmem1)
+ mapped_free (custmem1);
+ if (custmem2)
+ mapped_free (custmem2);
bogomemory = 0;
kickmemory = 0;
a1000_kickstart_mode = 0;
chipmemory = 0;
cardmemory = 0;
+ custmem1 = 0;
+ custmem2 = 0;
#ifdef ACTION_REPLAY
action_replay_cleanup();
if (s != INVALID_SOCKET) {
BEGINBLOCKING;
- s2 = accept(s,rp_name,&hlen);
+ s2 = accept(s, rp_name, &hlen);
if (s2 == INVALID_SOCKET) {
SETERRNO;
- if ((sb->ftable[sd-1] & SF_BLOCKING) && sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR) {
- if (sb->mtable[sd-1] || (wMsg = allocasyncmsg(sb,sd,s)) != 0) {
- if (sb->mtable[sd-1] == 0) {
+ if ((sb->ftable[sd - 1] & SF_BLOCKING) && sb->sb_errno == WSAEWOULDBLOCK - WSABASEERR) {
+ if (sb->mtable[sd - 1] || (wMsg = allocasyncmsg(sb, sd, s)) != 0) {
+ if (sb->mtable[sd - 1] == 0) {
WSAAsyncSelect(s,hWndSelector ? hAmigaWnd : bsd->hSockWnd, wMsg, FD_ACCEPT);
} else {
- setWSAAsyncSelect(sb,sd,s,FD_ACCEPT);
+ setWSAAsyncSelect(sb, sd, s, FD_ACCEPT);
}
WAITSIGNAL;
- if (sb->mtable[sd-1] == 0) {
+ if (sb->mtable[sd - 1] == 0) {
cancelasyncmsg(context, wMsg);
} else {
- setWSAAsyncSelect(sb,sd,s,0);
+ setWSAAsyncSelect(sb, sd, s, 0);
}
if (sb->eintr) {
return;
}
- s2 = accept(s,rp_name,&hlen);
+ s2 = accept(s, rp_name, &hlen);
if (s2 == INVALID_SOCKET) {
SETERRNO;
TRACE(("failed (%d)\n",sb->sb_errno));
} else {
sb->resultval = getsd(sb, s2);
- sb->ftable[sb->resultval-1] = sb->ftable[sd-1]; // new socket inherits the old socket's properties
+ sb->ftable[sb->resultval - 1] = sb->ftable[sd - 1]; // new socket inherits the old socket's properties
sb->resultval--;
if (rp_name != 0) { // 1.11.2002 XXX
if (hlen <= hlenuae) { // Fix for CNET BBS Part 2
- prepamigaaddr(rp_name,hlen);
+ prepamigaaddr(rp_name, hlen);
if (namelen != 0) {
- put_long (namelen,hlen);
+ put_long (namelen, hlen);
}
} else { // Copy only the number of bytes requested
if (hlenuae != 0) {
- prepamigaaddr(rp_name,hlenuae);
- memcpy(rp_nameuae,rp_name,hlenuae);
- put_long (namelen,hlenuae);
+ prepamigaaddr(rp_name, hlenuae);
+ memcpy(rp_nameuae, rp_name, hlenuae);
+ put_long (namelen, hlenuae);
}
}
}
- TRACE(("%d/%d\n",sb->resultval,hlen));
+ TRACE(("%d/%d\n", sb->resultval, hlen));
}
ENDBLOCKING;
SB;
} sockreq;
+// sockreg.sb may be gone if thread dies at right time.. fixme.. */
+
static BOOL HandleStuff(void)
{
BOOL quit = FALSE;
SB = NULL;
BOOL handled = TRUE;
+ int rv;
+
if (bsd->hSockReq) {
// 100ms sleepiness might need some tuning...
//if(WaitForSingleObject( hSockReq, 100 ) == WAIT_OBJECT_0 )
break;
case recvfrom_req:
if(sockreq.params.recvfrom_s.addr) {
- sockreq.sb->resultval = recvfrom( sockreq.s, sockreq.params.recvfrom_s.realpt, sockreq.params.recvfrom_s.len,
+ sockreq.sb->resultval = recvfrom(sockreq.s, sockreq.params.recvfrom_s.realpt, sockreq.params.recvfrom_s.len,
sockreq.params.recvfrom_s.flags, sockreq.params.recvfrom_s.rp_addr,
- sockreq.params.recvfrom_s.hlen );
+ sockreq.params.recvfrom_s.hlen);
} else {
- sockreq.sb->resultval = recv( sockreq.s, sockreq.params.recvfrom_s.realpt, sockreq.params.recvfrom_s.len,
- sockreq.params.recvfrom_s.flags );
+ sockreq.sb->resultval = recv(sockreq.s, sockreq.params.recvfrom_s.realpt, sockreq.params.recvfrom_s.len,
+ sockreq.params.recvfrom_s.flags);
}
break;
case abort_req:
*(sockreq.params.abort_s.newsock) = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if (*(sockreq.params.abort_s.newsock) != sb->sockAbort) {
- shutdown( sb->sockAbort, 1 );
+ shutdown(sb->sockAbort, 1);
closesocket(sb->sockAbort);
}
handled = FALSE; /* Don't bother the SETERRNO section after the switch() */
_TCHAR szGuestClass[(sizeof(g_szGuestWndClass)/sizeof(_TCHAR))+20];
_TCHAR *pszHostClass;
LRESULT lr;
+ int n;
if (!pInfo || !pszHostInfo)
return E_POINTER;
// the guest sends this message when the mouse is captured/released
// (the mouse is "captured" when its movements are restricted to the guest window area
// and the system cursor is not visible);
+// mouse capture changes requested by the host
+// (see the RPIPCHM_MOUSECAPTURE message) must not be notified;
// for consistency across different guests, a guest which sends RPIPCGM_MOUSECAPTURE
-// messages should also implement a keyboard-actuated mouse release functionality
+// messages should also implement a keyboard-actuated escape functionality
// (the preferred key for this purpose is included in the parameters sent from the
// host at startup time - see RPLaunchGuest() in RetroPlatformPlugin.h);
// note that in order not to interfere with the window dragging functionality,
//
#define RPIPCGM_VOLUME (WM_APP + 19)
+// Message:
+// RPIPCGM_ESCAPED
+// Description:
+// this message is sent to notify the host
+// that the escape key has been held down
+// Data sent:
+// none
+// Response:
+// none
+//
+#define RPIPCGM_ESCAPED (WM_APP + 20)
#define RPIPCHM_VOLUME (WM_APP + 209)
// Message:
-// RPIPCHM_RELEASEMOUSEKEY
+// RPIPCHM_ESCAPEKEY
// Description:
-// the host uses the RPIPCHM_RELEASEMOUSEKEY message
-// to change the release mouse key information
+// the host uses the RPIPCHM_ESCAPEKEY message
+// to change the escape key information
// Data sent:
-// WPARAM = VK_* identifier of the mouse-release key
-// (e.g. "0x1B" for the Esc key - see VK_* constants in winuser.h)
+// WPARAM = DirectInput DIK_* identifier of the escape key
+// (e.g. 1 for the Esc key - see DIK_* constants in dinput.h)
// LPARAM = milliseconds value
-// (amount of time the user has to hold the above key to release the mouse)
+// (amount of time the user has to hold the above key to trigger the escape functionality)
// Response:
// LRESULT = non-zero if the guest accepted the new settings
//
-#define RPIPCHM_RELEASEMOUSEKEY (WM_APP + 210)
+#define RPIPCHM_ESCAPEKEY (WM_APP + 210)
// Message:
// RPIPCHM_EVENT
//
#define RPIPCHM_EVENT (WM_APP + 211)
+// Message:
+// RPIPCHM_MOUSECAPTURE
+// Description:
+// the host uses this message to ask the guest
+// to capture or release the mouse
+// Data sent:
+// WPARAM = non-zero if the mouse should be captured,
+// zero if the mouse should be released
+// Response:
+// LRESULT = non-zero if the guest executed the command
+//
+#define RPIPCHM_MOUSECAPTURE (WM_APP + 212)
+
// ****************************************************************************
continue;
elements = DI_BUFFER;
hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0);
- if (hr == DI_OK) {
+ if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
if (supermouse && !did->superdevice)
continue;
for (j = 0; j < elements; j++) {
{
if (os_winnt && currprefs.win32_kbledmode) {
if((oldusbleds & KBLED_NUMLOCK) != (led & KBLED_NUMLOCK)) {
- keybd_event (VK_NUMLOCK, 0, KEYEVENTF_EXTENDEDKEY, 0);
- keybd_event (VK_NUMLOCK, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
+ keybd_event (VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY, 0);
+ keybd_event (VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
if((oldusbleds & KBLED_CAPSLOCK) != (led & KBLED_CAPSLOCK)) {
- keybd_event (VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY, 0);
- keybd_event (VK_CAPITAL, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
+ keybd_event (VK_CAPITAL, 0x3a, KEYEVENTF_EXTENDEDKEY, 0);
+ keybd_event (VK_CAPITAL, 0x3a, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
if((oldusbleds & KBLED_SCROLLLOCK) != (led & KBLED_SCROLLLOCK)) {
- keybd_event (VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY, 0);
- keybd_event (VK_SCROLL, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
+ keybd_event (VK_SCROLL, 0x46, KEYEVENTF_EXTENDEDKEY, 0);
+ keybd_event (VK_SCROLL, 0x46, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
oldusbleds = led;
} else if (os_winnt && kbhandle != INVALID_HANDLE_VALUE) {
}
else
{
- backslashstate=0;
- return DIK_BACKSLASH;
+ backslashstate=0;
+ return DIK_BACKSLASH;
}
}
}
}
elements = DI_KBBUFFER;
hr = IDirectInputDevice8_GetDeviceData(lpdi, sizeof(DIDEVICEOBJECTDATA), didod, &elements, 0);
- if (hr == DI_OK) {
+ if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
if (did->superdevice && (normalkb || rawkb))
continue;
for (j = 0; j < elements; j++) {
void wait_keyrelease (void)
{
- int i, j, maxcount = 10, found;
stopoutput++;
+#if 0
+ int i, j, maxcount = 10, found;
while (maxcount-- > 0) {
- sleep_millis (10);
read_kb ();
found = 0;
for (j = 0; j < MAX_INPUT_DEVICES; j++) {
}
if (!found)
break;
+ sleep_millis (10);
}
+#endif
release_keys ();
#if 0
for (;;) {
continue;
elements = DI_BUFFER;
hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0);
- if (hr == DI_OK) {
+ if (hr == DI_OK || hr == DI_BUFFEROVERFLOW) {
for (j = 0; j < elements; j++) {
int dimofs = didod[j].dwOfs;
int data = didod[j].dwData;
window_h = w_h;
tin_w = t_w;
tin_h = t_h;
- createtexture (t_w, t_h);
+ if (!createtexture (t_w, t_h)) {
+ sprintf (errmsg, "Direct3D: %d * %d texture creation failed.\n", t_w, t_h);
+ return errmsg;
+ }
if (currprefs.gfx_filter_scanlines > 0)
createsltexture ();
createscanlines (1);
* 1999.08.02 Brian King Creation
*
*/
-BYTE DirectDraw_GetBytesPerPixel(void)
+int DirectDraw_GetBytesPerPixel(void)
{
- int bpp;
- bpp = (DirectDrawState.lockable.lpdesc->ddpfPixelFormat.dwRGBBitCount + 7) >> 3;
- return bpp;
+ if(DirectDrawState.lockable.lpdesc)
+ return (DirectDrawState.lockable.lpdesc->ddpfPixelFormat.dwRGBBitCount + 7) >> 3;
+ return 0;
}
/*
DWORD DirectDraw_GetPrimaryBitCount( void );
void DirectDraw_GetPrimaryWidthHeight(int *w, int *h);
int DirectDraw_DetermineLocking( int wantfull );
-BYTE DirectDraw_GetBytesPerPixel( void );
+int DirectDraw_GetBytesPerPixel( void );
RGBFTYPE DirectDraw_GetSurfacePixelFormat( LPDDSURFACEDESC2 surface );
surface_type_e DirectDraw_GetLockableType( void );
int DirectDraw_SurfaceLock( surface_type_e surface_type );
// Letting the system decide doesn't seem to work on some systems (Win9x..)
LPBYTE address = (LPBYTE)0x10000000;
uae_u32 size;
- uae_u32 add = 0x11000000;
+ uae_u32 add = 0x10000000 + 128 * 1024 * 1024;
uae_u32 inc = 0x100000;
uae_u64 size64, total64;
uae_u64 totalphys64;
if (size64 < 8 * 1024 * 1024)
size64 = 8 * 1024 * 1024;
size = max_z3fastmem = (uae_u32)size64;
+ if (size < 1024 * 1024 * 1024)
+ max_z3fastmem = 512 * 1024 * 1024;
canbang = 0;
shm_start = 0;
if (blah)
break;
write_log ("NATMEM: %dM area failed to allocate, err=%d\n", (size + add) >> 20, GetLastError());
- size >>= 1;
+ size -= 128 * 1024 * 1024;
if (size < 0x10000000) {
write_log ("NATMEM: No special area could be allocated (2)!\n");
return;
write_log ("NATMEM: No special area could be allocated! (1)\n");
} else {
max_z3fastmem = size;
- write_log ("NATMEM: Our special area: 0x%p-0x%p (%dM)\n",
- natmem_offset, (uae_u8*)natmem_offset + size + add, (size + add) >> 20);
+ write_log ("NATMEM: Our special area: 0x%p-0x%p (%08x %dM)\n",
+ natmem_offset, (uae_u8*)natmem_offset + size + add,
+ size + add,
+ (size + add) >> 20);
canbang = 1;
allocated = 1;
}
shmaddr=natmem_offset + 0x00e00000;
got = TRUE;
}
+ if(!strcmp(shmids[shmid].name,"custmem1")) {
+ shmaddr=natmem_offset + currprefs.custom_memory_addrs[0];
+ got = TRUE;
+ }
+ if(!strcmp(shmids[shmid].name,"custmem2")) {
+ shmaddr=natmem_offset + currprefs.custom_memory_addrs[1];
+ got = TRUE;
+ }
}
#endif
static RPGUESTINFO guestinfo;
char *rp_param = NULL;
-int rp_rmousevkey = 0x01;
-int rp_rmouseholdtime = 600;
+int rp_rpescapekey = 0x01;
+int rp_rpescapeholdtime = 600;
int rp_screenmode = 0;
int rp_inputmode = 0;
int log_rp = 1;
case RPIPCHM_INPUTMODE: return "RPIPCHM_INPUTMODE";
case RPIPCHM_VOLUME: return "RPIPCHM_VOLUME";
case RPIPCHM_EVENT: return "RPIPCHM_EVENT";
+ case RPIPCHM_ESCAPEKEY: return "RPIPCHM_ESCAPEKEY";
+ case RPIPCHM_MOUSECAPTURE: return "RPIPCHM_MOUSECAPTURE";
default: return "UNKNOWN";
}
{
int res = currprefs.gfx_resolution;
+ if (currprefs.gfx_afullscreen)
+ return RP_SCREENMODE_FULLSCREEN;
if (res == 0)
return RP_SCREENMODE_1X;
if (res == 1)
if (ShowWindow (hAmigaWnd, SW_MINIMIZE))
return TRUE;
break;
+ case RPIPCHM_ESCAPEKEY:
+ rp_rpescapekey = wParam;
+ rp_rpescapeholdtime = lParam;
+ return TRUE;
+ case RPIPCHM_MOUSECAPTURE:
+ if (wParam)
+ setmouseactive (1);
+ else
+ setmouseactive (0);
+ return TRUE;
case RPIPCHM_DEVICEIMAGE:
{
RPDEVICEIMAGE *di = (RPDEVICEIMAGE*)pData;
res = 1 << res;
changed_prefs.gfx_size_win.width = default_width * res;
changed_prefs.gfx_size_win.height = default_height * res;
+ updatewinfsmode (&changed_prefs);
WIN32GFX_DisplayChangeRequested();
hwndset = 0;
return (LRESULT)INVALID_HANDLE_VALUE;
if (!initialized)
return;
- write_log ("rp_fixup_options(rmousevkey=%d,rmouseholdtime=%d,screenmode=%d,inputmode=%d)\n",
- rp_rmousevkey, rp_rmouseholdtime, rp_screenmode, rp_inputmode);
+ write_log ("rp_fixup_options(rpescapekey=%d,rpescapeholdtime=%d,screenmode=%d,inputmode=%d)\n",
+ rp_rpescapekey, rp_rpescapeholdtime, rp_screenmode, rp_inputmode);
res = 1 << currprefs.gfx_resolution;
default_width = currprefs.gfx_size_win.width / res;
p->gfx_linedbl = 1;
RPSendMessagex(RPIPCGM_FEATURES,
- RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_SCREEN2X |
+ RP_FEATURE_POWERLED | RP_FEATURE_SCREEN1X | RP_FEATURE_SCREEN2X | RP_FEATURE_FULLSCREEN |
RP_FEATURE_PAUSE | RP_FEATURE_TURBO | RP_FEATURE_INPUTMODE | RP_FEATURE_VOLUME,
0, NULL, 0, &guestinfo, NULL);
/* floppy drives */
RPSendMessagex(RPIPCGM_TURBO, RP_TURBO_CPU, active, NULL, 0, &guestinfo, NULL);
}
-void rp_set_hwnd (void)
+void rp_set_hwnd (HWND hWnd)
{
int rx;
if (!initialized)
return;
rx = get_x ();
hwndset = 1;
- RPSendMessagex(RPIPCGM_SCREENMODE, rx, (LPARAM)hAmigaWnd, NULL, 0, &guestinfo, NULL);
- rp_mousecapture (1);
+ RPSendMessagex(RPIPCGM_SCREENMODE, rx, (LPARAM)hWnd, NULL, 0, &guestinfo, NULL);
}
void rp_moved (int zorder)
uae_u64 t;
static int cnt;
+ if (!initialized)
+ return;
cnt--;
if (cnt > 0)
return;
return;
t = gett ();
if (t >= esctime) {
- setmouseactive (0);
+ RPSendMessagex(RPIPCGM_ESCAPED, 0, 0, NULL, 0, &guestinfo, NULL);
ignorerelease = 1;
esctime = 0;
}
if (!initialized)
goto end;
- if (scancode != rp_rmousevkey)
+ if (scancode != rp_rpescapekey)
goto end;
if (ignorerelease && !pressed) {
ignorerelease = 0;
if (!t)
goto end;
if (pressed) {
- esctime = t + rp_rmouseholdtime;
+ esctime = t + rp_rpescapeholdtime;
return 1;
}
my_kbd_handler (num, scancode, 1);
extern void rp_minimize (int);
extern void rp_mousecapture (int);
extern void rp_turbo (int);
-extern void rp_set_hwnd (void);
+extern void rp_set_hwnd (HWND);
extern void rp_moved (int);
extern int rp_checkesc (int, uae_u8*, int, int);
extern int rp_isactive (void);
extern void rp_hsync (void);
extern char *rp_param;
-extern int rp_rmousevkey;
-extern int rp_rmouseholdtime;
+extern int rp_rpescapekey;
+extern int rp_rpescapeholdtime;
extern int rp_screenmode;
extern int rp_inputmode;
void close_sound (void)
{
+ gui_data.sndbuf = 0;
+ gui_data.sndbuf_status = 3;
if (! have_sound)
return;
pause_sound ();
close_audio_ds ();
have_sound = 0;
- gui_data.sndbuf = 0;
}
int init_sound (void)
{
+ gui_data.sndbuf_status = 3;
+ gui_data.sndbuf = 0;
+ if (!sound_available)
+ return 0;
+ if (currprefs.produce_sound <= 1)
+ return 0;
if (have_sound)
return 1;
if (!open_sound ())
#endif
extern int harddrive_dangerous, do_rdbdump, aspi_allow_all, no_rawinput;
-int log_scsi, log_net;
+int log_scsi, log_net = 1;
extern FILE *debugfile;
extern int console_logging;
return 0;
case WM_CREATE:
+#ifdef RETROPLATFORM
+ rp_set_hwnd (hWnd);
+#endif
DragAcceptFiles (hWnd, TRUE);
return 0;
rp_param = my_strdup (np);
continue;
}
- if (!strcmp (arg, "-rprmousevkey")) {
+ if (!strcmp (arg, "-rpescapekey")) {
i++;
- rp_rmousevkey = getval (np);
+ rp_rpescapekey = getval (np);
continue;
}
- if (!strcmp (arg, "-rprmouseholdtime")) {
+ if (!strcmp (arg, "-rpescapeholdtime")) {
i++;
- rp_rmouseholdtime = getval (np);
+ rp_rpescapeholdtime = getval (np);
continue;
}
if (!strcmp (arg, "-rpscreenmode")) {
#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
#define GETBDD(x) ((x) % 100)
-#define WINUAEBETA 15
+#define WINUAEBETA 16
#define WINUAEPUBLICBETA 1
-#define WINUAEDATE MAKEBD(2007, 12, 2)
+#define WINUAEDATE MAKEBD(2007, 12, 12)
#define WINUAEEXTRA ""
#define WINUAEREV ""
pitch = DirectDraw_GetSurfacePitch ();
}
+ if (!dptr) /* weird things can happen */
+ goto end;
+
if (usedfilter->type == UAE_FILTER_SCALE2X ) { /* 16+32/2X */
if (amiga_depth == 16 && dst_depth == 16) {
changed_prefs.gfx_filter = usedfilter->type;
}
+end:
if (temp_needed) {
IDirectDrawSurface7_Unlock (dds, NULL);
DirectDraw_Blt (DirectDraw_GetLockableType(), &dr, temporary_surface, &sr, 0, NULL);
#include "sysconfig.h"
+#include <stdio.h>
+
#define HAVE_REMOTE
#define WPCAP
#include "pcap.h"
-#include <winspool.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <mmsystem.h>
-#include <ddraw.h>
-#include <commctrl.h>
-#include <commdlg.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <io.h>
-#include <setupapi.h>
#include <windows.h>
#include "packet32.h"
#include "sysdeps.h"
#include "options.h"
-
#include "threaddep/thread.h"
#include "win32_uaenet.h"
#include "win32.h"
UpdateWindow (hMainWnd);
}
ShowWindow (hAmigaWnd, SW_SHOWNORMAL);
-#ifdef RETROPLATFORM
- rp_set_hwnd ();
-#endif
UpdateWindow (hAmigaWnd);
return 1;
}
static int isromext(char *path)
{
- char *ext = strrchr (path, '.');
+ char *ext;
int i;
+ if (!path)
+ return 0;
+ ext = strrchr (path, '.');
if (!ext)
return 0;
ext++;
{IDC_THEROOTS, FALSE, "Back To The Roots", "http://www.back2roots.org/"},
{IDC_ABIME, FALSE, "abime.net", "http://www.abime.net/"},
{IDC_CAPS, FALSE, "SPS", "http://www.softpres.org/"},
- {IDC_AMIGASYS, FALSE, "AmigaSYS", "http://amigasys.fw.hu/"},
+ {IDC_AMIGASYS, FALSE, "AmigaSYS", "http://amigasys.extra.hu/"},
{IDC_AMIKIT, FALSE, "AmiKit", "http://amikit.amiga.sk/"},
{ -1, FALSE, NULL, NULL }
};
sprintf (buf, "%d", i + 1);
SendDlgItemMessage (hDlg, IDC_INPUTAMIGACNT, CB_ADDSTRING, 0, (LPARAM)buf);
}
- SendDlgItemMessage( hDlg, IDC_INPUTAMIGACNT, CB_SETCURSEL, input_selected_sub_num, 0 );
+ SendDlgItemMessage (hDlg, IDC_INPUTAMIGACNT, CB_SETCURSEL, input_selected_sub_num, 0);
SendDlgItemMessage (hDlg, IDC_INPUTDEVICE, CB_RESETCONTENT, 0, 0L);
for (i = 0; i < inputdevice_get_device_total (IDTYPE_JOYSTICK); i++) {
int v = workprefs.input_selected_setting == 0 ? FALSE : TRUE;
ew (hDlg, IDC_INPUTLIST, TRUE);
ew (hDlg, IDC_INPUTAMIGA, v);
- ew (hDlg, IDC_INPUTAMIGACNT, v);
+ ew (hDlg, IDC_INPUTAMIGACNT, TRUE);
ew (hDlg, IDC_INPUTDEADZONE, TRUE);
ew (hDlg, IDC_INPUTAUTOFIRERATE, v);
ew (hDlg, IDC_INPUTSPEEDA, v);
+Beta 16:
+
+- added 2 non-autoconfig ram configuration entries
+ addmem1/addmem2=<address>,<size>
+ Adds fast ram to specified address without autoconfiguring it. Size
+ must be power of 2 and min size is 64k. GUI support in future.
+- uaenet.device unit number >0 abortio fixed
+- 512M Z3Fast and 128M RTG RAM now works without overflowing allocated
+ JIT direct access memory (no garbage gfx modes in display prefs)
+- map extended ROM location depending on advanced chipset CDTV/CD32
+ settings (previously 256k = 0xF0, 512k = 0xE0)
+- Direct3D CreateTexture() return code was ignored, crashed if texture
+ creation failed for some reason (out of video memory?)
+
Beta 15:
- fullscreen switching should work correctly again
dev->opencnt = get_word (m68k_areg (&context->regs, 6) + 32);
if (dev->opencnt == 0) {
+ dev->unit = unit;
dev->sysdata = xcalloc (uaenet_getdatalenght(), 1);
if (!uaenet_open (dev->sysdata, pdev->td, dev, pdev->promiscuous)) {
xfree (dev->sysdata);
{
struct asyncreq *ar = get_async_request (dev, request, 1);
if (!ar) {
- write_log ("%s:%d: abort sync but no request %x found!\n", getdevname(), dev->unit, request);
+ write_log ("%s:%d: abort async but no request %x found!\n", getdevname(), dev->unit, request);
return;
}
if (log_net)
break;
case S2_ONLINE:
+#if 0
if (!dev->configured) {
io_error = S2ERR_BAD_STATE;
wire_error = S2WERR_NOT_CONFIGURED;
}
+#endif
if (!dev->adapter) {
io_error = S2ERR_OUTOFSERVICE;
wire_error = S2WERR_RCVREL_HDW_ERR;
static uae_u32 REGPARAM2 dev_abortio (TrapContext *context)
{
uae_u32 request = m68k_areg (&context->regs, 1);
- struct devstruct *dev = getdevstruct (get_long (request + 24));
+ struct priv_devstruct *pdev = getpdevstruct (request);
+ struct devstruct *dev;
- write_log ("%s abortio %08x\n", getdevname(), request);
+ if (!pdev) {
+ write_log ("%s abortio but no request %08x found!\n", getdevname(), request);
+ put_byte (request + 31, 32);
+ return get_byte (request + 31);
+ }
+ dev = getdevstruct (pdev->unit);
if (!dev) {
+ write_log ("%s (%d) abortio but no request %08x found!\n", getdevname(), pdev->unit, request);
put_byte (request + 31, 32);
return get_byte (request + 31);
}
+ if (log_net)
+ write_log ("%s:%d abortio %08x\n", getdevname(), dev->unit, request);
abort_async (dev, request);
return 0;
}
{
struct asyncreq *ar = get_async_request (dev, request, 1);
if (!ar) {
- write_log ("%s:%d: abort sync but no request %x found!\n", getdevname(), dev->unit, request);
+ write_log ("%s:%d: abort async but no request %x found!\n", getdevname(), dev->unit, request);
return;
}
if (log_uaeserial)
arcacc_mod = NULL;
}
-static int arcacc_init (void)
+static int arcacc_init (struct zfile *zf)
{
if (arcacc_mod)
return 1;
arcacc_mod = WIN32_LoadLibrary ("archiveaccess.dll");
if (!arcacc_mod) {
- write_log ("failed to open archiveaccess.dll\n");
+ write_log ("failed to open archiveaccess.dll ('%s')\n", zfile_getname (zf));
return 0;
}
aaOpenArchive = (aapOpenArchive) GetProcAddress (arcacc_mod, "aaOpenArchive");
struct zvolume *zv;
int skipsize = 0;
- if (!arcacc_init ())
+ if (!arcacc_init (z))
return NULL;
zv = zvolume_alloc(z, id, NULL);
id_r = arcacc_push (z);