diff --git a/ChangeLog b/ChangeLog index 2fe408358..b4f122c4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Version 2.5.31dev: * Fixed handling of configurations_dir and cache_dir options. +* Updated emulation core from WinUAE 3100b15. Version 2.5.30dev: diff --git a/configure.ac b/configure.ac index c00b0d4bd..442caa35d 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AM_INIT_AUTOMAKE([tar-ustar subdir-objects]) AC_SUBST([PACKAGE_SERIES], [devel]) -AC_DEFINE_UNQUOTED([UAE_BASE_VERSION], ["WinUAE 3100b14"], +AC_DEFINE_UNQUOTED([UAE_BASE_VERSION], ["WinUAE 3100b15"], [Which UAE core this version is based on.]) PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(\.*\)\..*\..*,\1,g'` diff --git a/src/a2091.cpp b/src/a2091.cpp index e04567c47..0c3b71e8b 100644 --- a/src/a2091.cpp +++ b/src/a2091.cpp @@ -3661,9 +3661,20 @@ static addrbank *gvp_init(struct romconfig *rc, bool series2, bool accel) int size = zfile_size(z); if (series2) { int total = 0; - while (total < 32768) { + int seekpos = 0; + int size = zfile_size(z); + if (size > 16384 + 4096) { + zfile_fread(wd->rom, 64, 1, z); + zfile_fseek(z, 16384, SEEK_SET); + zfile_fread(wd->rom + 64, 64, 1, z); + if (!memcmp(wd->rom, wd->rom + 64, 64)) + wd->rombankswitcher = true; + else + seekpos = 16384; + } + while (total < 32768 - 4096) { int prevtotal = total; - zfile_fseek(z, 0, SEEK_SET); + zfile_fseek(z, seekpos, SEEK_SET); total += zfile_fread(wd->rom + total, 1, wd->rom_size - total >= wd->rom_size ? wd->rom_size : wd->rom_size - total, z); if (prevtotal == total) break; @@ -3688,9 +3699,6 @@ static addrbank *gvp_init(struct romconfig *rc, bool series2, bool accel) } } zfile_fclose(z); - if (series2 && size > 16384) { - wd->rombankswitcher = 1; - } } else { isscsi = false; } diff --git a/src/cfgfile.cpp b/src/cfgfile.cpp index aebed4629..3fd3dc33b 100644 --- a/src/cfgfile.cpp +++ b/src/cfgfile.cpp @@ -203,7 +203,7 @@ static const TCHAR *maxvert[] = { _T("nointerlace"), _T("interlace"), 0 }; static const TCHAR *abspointers[] = { _T("none"), _T("mousehack"), _T("tablet"), 0 }; static const TCHAR *magiccursors[] = { _T("both"), _T("native"), _T("host"), 0 }; static const TCHAR *autoscale[] = { _T("none"), _T("auto"), _T("standard"), _T("max"), _T("scale"), _T("resize"), _T("center"), _T("manual"), - _T("integer"), _T("half-integer"), _T("integer_auto"), _T("half-integer_auto"), 0 }; + _T("integer"), _T("half-integer"), _T("integer_auto"), _T("half-integer_auto"), _T("separator"), _T("overscan_blanking"), 0 }; static const TCHAR *autoscale_rtg[] = { _T("resize"), _T("scale"), _T("center"), _T("integer"), 0 }; static const TCHAR *joyportmodes[] = { _T(""), _T("mouse"), _T("mousenowheel"), _T("djoy"), _T("gamepad"), _T("ajoy"), _T("cdtvjoy"), _T("cd32joy"), _T("lightpen"), 0 }; static const TCHAR *joyaf[] = { _T("none"), _T("normal"), _T("toggle"), _T("always"), 0 }; @@ -3989,6 +3989,8 @@ static int cfgfile_parse_filesys (struct uae_prefs *p, const TCHAR *option, TCHA bool cfgfile_board_enabled(struct uae_prefs *p, int romtype, int devnum) { int idx; + if (romtype == ROMTYPE_CPUBOARD && currprefs.cpuboard_type) + return true; struct boardromconfig *brc = get_device_rom(p, romtype, devnum, &idx); if (!brc) return false; @@ -4030,6 +4032,7 @@ static bool cfgfile_read_board_rom(struct uae_prefs *p, const TCHAR *option, con } _stprintf(buf, _T("%s_rom_file_id"), name); + buf2[0] = 0; if (cfgfile_rom (option, value, buf, buf2, MAX_DPATH / sizeof (TCHAR))) { if (buf2[0]) { brc = get_device_rom_new(p, ert->romtype, j, &idx); diff --git a/src/cpuboard.cpp b/src/cpuboard.cpp index 611106f01..c2de89efe 100644 --- a/src/cpuboard.cpp +++ b/src/cpuboard.cpp @@ -285,6 +285,10 @@ static bool is_kupke(void) { return ISCPUBOARD(BOARD_KUPKE, 0); } +static bool is_aca500(void) +{ + return ISCPUBOARD(BOARD_IC, BOARD_IC_ACA500); +} DECLARE_MEMORY_FUNCTIONS(blizzardio); static addrbank blizzardio_bank = { @@ -915,7 +919,6 @@ void blizzardppc_irq(int level) cpuboard_rethink(); } - static uae_u32 REGPARAM2 blizzardio_bget(uaecptr addr) { uae_u8 v = 0; @@ -966,6 +969,41 @@ static uae_u32 REGPARAM2 blizzardio_wget(uaecptr addr) if (is_csmk3() || is_blizzardppc()) { ;//write_log(_T("CS IO WGET %08x\n"), addr); //activate_debugger(); + } else if (is_aca500()) { + addr &= 0x3f000; + switch (addr) + { + case 0x03000: + return 0; + case 0x07000: + return 0; + case 0x0b000: + return 0; + case 0x0f000: + return 0; + case 0x13000: + return 0; + case 0x17000: + return 0; + case 0x1b000: + return 0x8000; + case 0x1f000: + return 0x8000; + case 0x23000: + return 0; + case 0x27000: + return 0; + case 0x2b000: + return 0; + case 0x2f000: + return 0; + case 0x33000: + return 0x8000; + case 0x37000: + return 0; + case 0x3b000: + return 0; + } } return 0; } @@ -1324,6 +1362,20 @@ void cpuboard_map(void) if (is_apollo()) { map_banks(&blizzardf0_bank, 0xf00000 >> 16, 131072 >> 16, 0); } + if (is_dkb()) { + if (cpuboard_size >= 4 * 1024 * 1024) { + if (cpuboard_size <= 0x4000000) { + map_banks(&blizzardram_bank, blizzardram_bank.start >> 16, 0x4000000 >> 16, cpuboard_size >> 16); + } else { + map_banks(&blizzardram_bank, blizzardram_bank.start >> 16, cpuboard_size >> 16, 0); + } + } + } + if (is_aca500()) { + map_banks(&blizzardf0_bank, 0xf00000 >> 16, 524288 >> 16, 0); + map_banks(&blizzardf0_bank, 0xa00000 >> 16, 524288 >> 16, 0); + map_banks(&blizzardio_bank, 0xb00000 >> 16, 262144 >> 16, 0); + } } void cpuboard_reset(void) @@ -1406,7 +1458,14 @@ void cpuboard_init(void) cpuboard_size = currprefs.cpuboardmem1_size; - if (is_a2630()) { + if (is_aca500()) { + + blizzardf0_bank.start = 0x00f00000; + blizzardf0_bank.allocated = 524288; + blizzardf0_bank.mask = blizzardf0_bank.allocated - 1; + mapped_malloc(&blizzardf0_bank); + + } else if (is_a2630()) { blizzardf0_bank.start = 0x00f00000; blizzardf0_bank.allocated = 131072; @@ -1417,6 +1476,15 @@ void cpuboard_init(void) blizzardea_bank.mask = blizzardea_bank.allocated - 1; mapped_malloc(&blizzardea_bank); + } else if (is_dkb()) { + + blizzardram_bank.start = 0x10000000; + blizzardram_bank.allocated = cpuboard_size; + blizzardram_bank.mask = blizzardram_bank.allocated - 1; + blizzardram_bank.startmask = 0x10000000; + blizzardram_bank.label = _T("dkb"); + mapped_malloc(&blizzardram_bank); + } else if (is_kupke()) { blizzardea_bank.allocated = 65536; @@ -1605,15 +1673,14 @@ void cpuboard_init(void) void cpuboard_overlay_override(void) { - if (!is_a2630()) - return; - if (!(a2630_io & 2)) - map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0); - if (mem25bit_bank.allocated) - map_banks(&chipmem_bank, (mem25bit_bank.start + mem25bit_bank.allocated) >> 16, (1024 * 1024) >> 16, 0); - else - map_banks(&chipmem_bank, 0x01000000 >> 16, (1024 * 1024) >> 16, 0); - + if (is_a2630()) { + if (!(a2630_io & 2)) + map_banks(&blizzardf0_bank, 0xf80000 >> 16, f0rom_size >> 16, 0); + if (mem25bit_bank.allocated) + map_banks(&chipmem_bank, (mem25bit_bank.start + mem25bit_bank.allocated) >> 16, (1024 * 1024) >> 16, 0); + else + map_banks(&chipmem_bank, 0x01000000 >> 16, (1024 * 1024) >> 16, 0); + } } void cpuboard_clear(void) @@ -1692,6 +1759,10 @@ bool cpuboard_jitdirectompatible(struct uae_prefs *p) bool cpuboard_32bit(struct uae_prefs *p) { int b = cpuboard_memorytype(p); + if (p->cpuboard_type) { + if (!(cpuboards[p->cpuboard_type].subtypes[p->cpuboard_subtype].deviceflags & EXPANSIONTYPE_24BIT)) + return true; + } return b == BOARD_MEMORY_HIGHMEM || b == BOARD_MEMORY_BLIZZARD_12xx || b == BOARD_MEMORY_BLIZZARD_PPC || @@ -1727,6 +1798,17 @@ void cpuboard_setboard(struct uae_prefs *p, int type, int subtype) } } +uaecptr cpuboard_get_reset_pc(uaecptr *stack) +{ + if (is_aca500()) { + *stack = get_long(0xa00000); + return get_long(0xa00004); + } else { + *stack = get_long(0); + return get_long(4); + } +} + bool cpuboard_io_special(int addr, uae_u32 *val, int size, bool write) { addr &= 65535; @@ -1929,6 +2011,9 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc) int boardid = cpuboards[currprefs.cpuboard_type].id; switch (boardid) { + case BOARD_IC: + break; + case BOARD_COMMODORE: switch(currprefs.cpuboard_subtype) { @@ -2082,7 +2167,7 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc) return &expamem_null; } } - + if (!autoconfig_rom && roms[0] != -1) { romwarning(roms); write_log (_T("ROM id %d not found for CPUBoard '%s' emulation\n"), roms[0], boardname); @@ -2097,7 +2182,16 @@ addrbank *cpuboard_autoconfig_init(struct romconfig *rc) protect_roms(false); cpuboard_non_byte_ea = true; - if (is_a2630()) { + if (is_aca500()) { + f0rom_size = 524288; + zfile_fread(blizzardf0_bank.baseaddr, f0rom_size, 1, autoconfig_rom); + autoconf = false; + if (zfile_needwrite(autoconfig_rom)) { + flashrom_file = autoconfig_rom; + autoconfig_rom = NULL; + } + flashrom = flash_new(blizzardf0_bank.baseaddr, f0rom_size, f0rom_size, 0xa4, flashrom_file); + } else if (is_a2630()) { f0rom_size = 131072; zfile_fread(blizzardf0_bank.baseaddr, 1, f0rom_size, autoconfig_rom); autoconf = false; diff --git a/src/expansion.cpp b/src/expansion.cpp index 6834e6d7c..16c822cda 100644 --- a/src/expansion.cpp +++ b/src/expansion.cpp @@ -2294,7 +2294,7 @@ const struct expansionromtype expansionroms[] = { _T("oktagon2008"), _T("Oktagon 2008"), _T("BSC/Alfa Data"), ncr_oktagon_autoconfig_init, oktagon_add_scsi_unit, ROMTYPE_OKTAGON, 0, 0, 2, false, NULL, 0, - false, EXPANSIONTYPE_SCSI + true, EXPANSIONTYPE_SCSI }, { _T("alfapower"), _T("AlfaPower/AT-Bus 2008"), _T("BSC/Alfa Data"), @@ -2427,7 +2427,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = { _T("A3001 Series I"), _T("A3001SI"), ROMTYPE_CB_A3001S1, 0, - gvp_add_ide_unit, EXPANSIONTYPE_IDE, + gvp_add_ide_unit, EXPANSIONTYPE_IDE | EXPANSIONTYPE_24BIT, BOARD_MEMORY_Z2, 8 * 1024 * 1024, 0, @@ -2437,7 +2437,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = { _T("A3001 Series II"), _T("A3001SII"), 0, 0, - gvp_add_ide_unit, EXPANSIONTYPE_IDE, + gvp_add_ide_unit, EXPANSIONTYPE_IDE | EXPANSIONTYPE_24BIT, BOARD_MEMORY_Z2, 8 * 1024 * 1024, 0, @@ -2447,7 +2447,7 @@ static const struct cpuboardsubtype gvpboard_sub[] = { _T("A530"), _T("GVPA530"), ROMTYPE_GVPS2, 0, - gvp_s2_add_scsi_unit, EXPANSIONTYPE_SCSI, + gvp_s2_add_scsi_unit, EXPANSIONTYPE_SCSI | EXPANSIONTYPE_24BIT, BOARD_MEMORY_Z2, 8 * 1024 * 1024, 0, @@ -2605,7 +2605,7 @@ static const struct cpuboardsubtype dbk_sub[] = { _T("DKB12x0"), ROMTYPE_CB_DKB12x0, 0, cpuboard_dkb_add_scsi_unit, EXPANSIONTYPE_SCSI, - BOARD_MEMORY_HIGHMEM, + 0, 128 * 1024 * 1024, 0, ncr_dkb_autoconfig_init, NULL, 2, 0 @@ -2655,6 +2655,17 @@ static const struct cpuboardsubtype kupkeboard_sub[] = { NULL } }; +static const struct cpuboardsubtype icboard_sub[] = { + { + _T("ACA 500"), + _T("aca500"), + ROMTYPE_CB_ACA500, 0, + NULL, EXPANSIONTYPE_24BIT + }, + { + NULL + } +}; static const struct cpuboardsubtype dummy_sub[] = { { NULL } @@ -2711,6 +2722,13 @@ const struct cpuboardtype cpuboards[] = { _T("Kupke"), kupkeboard_sub, 0 }, +#if 0 + { + BOARD_IC, + _T("Individual Computers"), + icboard_sub, 0 + }, +#endif { NULL } diff --git a/src/filesys.cpp b/src/filesys.cpp index 21fc7f27b..a8ad211d4 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -799,6 +799,7 @@ static void allocuci (struct uae_prefs *p, int nr, int idx) } static int cpuboard_hd; +static romconfig cpuboard_dummy; void add_cpuboard_unit(int unit, struct uaedev_config_info *uci, struct romconfig *rc) { @@ -820,16 +821,18 @@ void add_cpuboard_unit(int unit, struct uaedev_config_info *uci, struct romconfi static void add_cpuboard_unit_init(void) { + memset(&cpuboard_dummy, 0, sizeof cpuboard_dummy); + cpuboard_dummy.device_id = 7; if (currprefs.cpuboard_type) { struct romconfig *rc = get_device_romconfig(&currprefs, ROMTYPE_CPUBOARD, 0); - if (rc) { - const struct cpuboardtype *cbt = &cpuboards[currprefs.cpuboard_type]; - if (cbt->subtypes) { - if (cbt->subtypes[currprefs.cpuboard_subtype].add) { - struct uaedev_config_info ci = { 0 }; - write_log(_T("Initializing CPUBoard '%s' HD controller\n"), cbt->subtypes[currprefs.cpuboard_subtype].name); - cbt->subtypes[currprefs.cpuboard_subtype].add(-1, &ci, rc); - } + if (!rc) + rc = &cpuboard_dummy; + const struct cpuboardtype *cbt = &cpuboards[currprefs.cpuboard_type]; + if (cbt->subtypes) { + if (cbt->subtypes[currprefs.cpuboard_subtype].add) { + struct uaedev_config_info ci = { 0 }; + write_log(_T("Initializing CPUBoard '%s' HD controller\n"), cbt->subtypes[currprefs.cpuboard_subtype].name); + cbt->subtypes[currprefs.cpuboard_subtype].add(-1, &ci, rc); } } } diff --git a/src/include/autoconf.h b/src/include/autoconf.h index 892debef2..73c04d0b4 100644 --- a/src/include/autoconf.h +++ b/src/include/autoconf.h @@ -120,6 +120,7 @@ typedef void(*DEVICE_ADD)(int, struct uaedev_config_info*, struct romconfig*); typedef bool(*E8ACCESS)(int, uae_u32*, int, bool); #define EXPANSIONTYPE_SCSI 1 #define EXPANSIONTYPE_IDE 2 +#define EXPANSIONTYPE_24BIT 4 struct expansionboardsettings { const TCHAR *name; diff --git a/src/include/cpuboard.h b/src/include/cpuboard.h index 5f1936cea..76660cc44 100644 --- a/src/include/cpuboard.h +++ b/src/include/cpuboard.h @@ -24,6 +24,7 @@ extern bool is_ppc_cpu(struct uae_prefs *); extern bool cpuboard_io_special(int addr, uae_u32 *val, int size, bool write); extern void cpuboard_overlay_override(void); extern void cpuboard_setboard(struct uae_prefs *p, int type, int subtype); +extern uaecptr cpuboard_get_reset_pc(uaecptr *stack); extern bool ppc_interrupt(int new_m68k_ipl); @@ -71,5 +72,8 @@ void blizzardppc_irq(int level); #define BOARD_GVP_SUB_GFORCE030 3 #define BOARD_GVP_SUB_TEKMAGIC 4 #define BOARD_KUPKE 9 +#define BOARD_IC 10 +#define BOARD_IC_ACA500 0 + #endif /* UAE_CPUBOARD_H */ diff --git a/src/include/custom.h b/src/include/custom.h index b57555573..e87222f71 100644 --- a/src/include/custom.h +++ b/src/include/custom.h @@ -244,6 +244,7 @@ uae_u16 customhack_get (struct customhack *ch, int hpos); extern void alloc_cycle_ext (int, int); extern void alloc_cycle_blitter (int hpos, uaecptr *ptr, int); extern bool ispal (void); +extern bool isvga (void); extern int current_maxvpos (void); extern struct chipset_refresh *get_chipset_refresh (void); extern void compute_framesync (void); diff --git a/src/include/drawing.h b/src/include/drawing.h index 6fa83592c..6b920343e 100644 --- a/src/include/drawing.h +++ b/src/include/drawing.h @@ -295,6 +295,7 @@ extern bool draw_frame (struct vidbuffer*); extern int get_custom_limits (int *pw, int *ph, int *pdx, int *pdy, int *prealh); extern void store_custom_limits (int w, int h, int dx, int dy); extern void set_custom_limits (int w, int h, int dx, int dy); +extern void check_custom_limits (void); extern void get_custom_topedge (int *x, int *y, bool max); extern void get_custom_raw_limits (int *pw, int *ph, int *pdx, int *pdy); void get_custom_mouse_limits (int *pw, int *ph, int *pdx, int *pdy, int dbl); diff --git a/src/memory.cpp b/src/memory.cpp index 4f54fe75d..67f2339f3 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -899,7 +899,7 @@ MEMORY_FUNCTIONS(cardmem); MEMORY_FUNCTIONS(a3000lmem); MEMORY_FUNCTIONS(a3000hmem); -/* 25bit memory (0x10000000) */ +/* 25bit memory (0x01000000) */ MEMORY_FUNCTIONS(mem25bit); diff --git a/src/ncr9x_scsi.cpp b/src/ncr9x_scsi.cpp index 85230ad8c..b2f5b588f 100644 --- a/src/ncr9x_scsi.cpp +++ b/src/ncr9x_scsi.cpp @@ -604,6 +604,8 @@ static bool isncr(struct ncr9x_state *ncr, struct ncr9x_state **arr) static void ncr9x_io_bput(struct ncr9x_state *ncr, uaecptr addr, uae_u32 val) { int reg_shift = 2; + uaecptr oldaddr = addr; + addr &= ncr->board_mask; if (isncr(ncr, ncr_masoboshi_scsi)) { @@ -773,7 +775,7 @@ static void ncr9x_io_bput(struct ncr9x_state *ncr, uaecptr addr, uae_u32 val) if (ncr->dma_cnt == 0) esp_dma_enable(ncr->devobject.lsistate, 1); } - //write_log(_T("Blizzard DMA PUT %08x %02X\n"), addr, (uae_u8)val); + //write_log(_T("Blizzard DMA PUT %08x %02X\n"), oldaddr, (uae_u8)val); return; } } else if (ISCPUBOARD(BOARD_CYBERSTORM, BOARD_CYBERSTORM_SUB_MK1)) { @@ -833,7 +835,7 @@ static void ncr9x_io_bput(struct ncr9x_state *ncr, uaecptr addr, uae_u32 val) addr >>= reg_shift; addr &= IO_MASK; #if NCR_DEBUG > 1 - write_log(_T("ESP write %02X %02X %08X\n"), addr, val & 0xff, M68K_GETPC); + write_log(_T("ESP write %02X (%08X) %02X %08X\n"), addr, oldaddr, val & 0xff, M68K_GETPC); #endif esp_reg_write(ncr->devobject.lsistate, (addr), val); } @@ -844,6 +846,8 @@ static uae_u32 ncr9x_io_bget(struct ncr9x_state *ncr, uaecptr addr) { uae_u8 v = 0xff; int reg_shift = 2; + uaecptr oldaddr = addr; + addr &= ncr->board_mask; if (isncr(ncr, ncr_masoboshi_scsi)) { @@ -1007,7 +1011,7 @@ static uae_u32 ncr9x_io_bget(struct ncr9x_state *ncr, uaecptr addr) addr &= IO_MASK; v = esp_reg_read(ncr->devobject.lsistate, (addr)); #if NCR_DEBUG > 1 - write_log(_T("ESP read %02X %02X %08X\n"), addr, v, M68K_GETPC); + write_log(_T("ESP read %02X (%08X) %02X %08X\n"), addr, oldaddr, v, M68K_GETPC); #endif return v; } diff --git a/src/ncr_scsi.cpp b/src/ncr_scsi.cpp index a196010bf..3b51c2da0 100644 --- a/src/ncr_scsi.cpp +++ b/src/ncr_scsi.cpp @@ -455,22 +455,24 @@ static uae_u32 ncr_bget2 (struct ncr_state *ncr, uaecptr addr) static uae_u32 REGPARAM2 ncr_lget (struct ncr_state *ncr, uaecptr addr) { - uae_u32 v; + uae_u32 v = 0; #ifdef JIT special_mem |= S_READ; #endif - addr &= ncr->board_mask; - if (ncr == ncr_we) { - addr &= ~0x80; - v = (ncr_bget2(ncr, addr + 3) << 0) | (ncr_bget2(ncr, addr + 2) << 8) | - (ncr_bget2(ncr, addr + 1) << 16) | (ncr_bget2(ncr, addr + 0) << 24); - } else { - if (addr >= A4091_IO_ALT) { - v = (ncr_bget2 (ncr, addr + 3) << 0) | (ncr_bget2 (ncr, addr + 2) << 8) | - (ncr_bget2 (ncr, addr + 1) << 16) | (ncr_bget2 (ncr, addr + 0) << 24); + if (ncr) { + addr &= ncr->board_mask; + if (ncr == ncr_we) { + addr &= ~0x80; + v = (ncr_bget2(ncr, addr + 3) << 0) | (ncr_bget2(ncr, addr + 2) << 8) | + (ncr_bget2(ncr, addr + 1) << 16) | (ncr_bget2(ncr, addr + 0) << 24); } else { - v = (ncr_bget2 (ncr, addr + 3) << 0) | (ncr_bget2 (ncr, addr + 2) << 8) | - (ncr_bget2 (ncr, addr + 1) << 16) | (ncr_bget2 (ncr, addr + 0) << 24); + if (addr >= A4091_IO_ALT) { + v = (ncr_bget2 (ncr, addr + 3) << 0) | (ncr_bget2 (ncr, addr + 2) << 8) | + (ncr_bget2 (ncr, addr + 1) << 16) | (ncr_bget2 (ncr, addr + 0) << 24); + } else { + v = (ncr_bget2 (ncr, addr + 3) << 0) | (ncr_bget2 (ncr, addr + 2) << 8) | + (ncr_bget2 (ncr, addr + 1) << 16) | (ncr_bget2 (ncr, addr + 0) << 24); + } } } return v; @@ -478,28 +480,32 @@ static uae_u32 REGPARAM2 ncr_lget (struct ncr_state *ncr, uaecptr addr) static uae_u32 REGPARAM2 ncr_wget (struct ncr_state *ncr, uaecptr addr) { - uae_u32 v; + uae_u32 v = 0; #ifdef JIT special_mem |= S_READ; #endif - v = (ncr_bget2 (ncr, addr) << 8) | ncr_bget2 (ncr, addr + 1); + if (ncr) { + v = (ncr_bget2 (ncr, addr) << 8) | ncr_bget2 (ncr, addr + 1); + } return v; } static uae_u32 REGPARAM2 ncr_bget (struct ncr_state *ncr, uaecptr addr) { - uae_u32 v; + uae_u32 v = 0; #ifdef JIT special_mem |= S_READ; #endif - addr &= ncr->board_mask; - if (!ncr->configured) { - addr &= 65535; - if (addr >= sizeof ncr->acmemory) - return 0; - return ncr->acmemory[addr]; + if (ncr) { + addr &= ncr->board_mask; + if (!ncr->configured) { + addr &= 65535; + if (addr >= sizeof ncr->acmemory) + return 0; + return ncr->acmemory[addr]; + } + v = ncr_bget2 (ncr, addr); } - v = ncr_bget2 (ncr, addr); return v; } @@ -508,6 +514,8 @@ static void REGPARAM2 ncr_lput (struct ncr_state *ncr, uaecptr addr, uae_u32 l) #ifdef JIT special_mem |= S_WRITE; #endif + if (!ncr) + return; addr &= ncr->board_mask; if (ncr == ncr_we) { addr &= ~0x80; @@ -535,6 +543,8 @@ static void REGPARAM2 ncr_wput (struct ncr_state *ncr, uaecptr addr, uae_u32 w) #ifdef JIT special_mem |= S_WRITE; #endif + if (!ncr) + return; w &= 0xffff; addr &= ncr->board_mask; if (!ncr->configured) { @@ -560,6 +570,8 @@ static void REGPARAM2 ncr_bput (struct ncr_state *ncr, uaecptr addr, uae_u32 b) #ifdef JIT special_mem |= S_WRITE; #endif + if (!ncr) + return; b &= 0xff; addr &= ncr->board_mask; if (!ncr->configured) { diff --git a/src/newcpu.cpp b/src/newcpu.cpp index 22bfa6c9c..554495592 100644 --- a/src/newcpu.cpp +++ b/src/newcpu.cpp @@ -2890,8 +2890,14 @@ static void m68k_reset2(bool hardreset) } #endif regs.s = 1; - v = get_long (4); - m68k_areg (regs, 7) = get_long (0); + if (currprefs.cpuboard_type) { + uaecptr stack; + v = cpuboard_get_reset_pc(&stack); + m68k_areg (regs, 7) = stack; + } else { + v = get_long (4); + m68k_areg (regs, 7) = get_long (0); + } m68k_setpc_normal(v); regs.m = 0; regs.stopped = 0; diff --git a/src/od-win32/mman.cpp b/src/od-win32/mman.cpp index 1c148eee1..68bbd91e7 100644 --- a/src/od-win32/mman.cpp +++ b/src/od-win32/mman.cpp @@ -893,6 +893,9 @@ void *uae_shmat (addrbank *ab, int shmid, void *shmaddr, int shmflg) } else if (!_tcscmp(shmids[shmid].name, _T("ramsey_high"))) { shmaddr = natmem_offset + 0x08000000; got = TRUE; + } else if (!_tcscmp(shmids[shmid].name, _T("dkb"))) { + shmaddr = natmem_offset + 0x10000000; + got = TRUE; } else if (!_tcscmp(shmids[shmid].name, _T("fusionforty"))) { shmaddr = natmem_offset + 0x11000000; got = TRUE; diff --git a/src/zfile.cpp b/src/zfile.cpp index 13ac73410..0c52a6172 100644 --- a/src/zfile.cpp +++ b/src/zfile.cpp @@ -293,6 +293,8 @@ int zfile_gettype (struct zfile *z) return ZFILE_STATEFILE; if (strcasecmp (ext, _T("rom")) == 0) return ZFILE_ROM; + if (strcasecmp (ext, _T("bin")) == 0) + return ZFILE_ROM; if (strcasecmp (ext, _T("key")) == 0) return ZFILE_KEY; if (strcasecmp (ext, _T("nvr")) == 0)