Skip to content

Commit

Permalink
3100b15 [WinUAE 94f9bf0]
Browse files Browse the repository at this point in the history
  • Loading branch information
FrodeSolheim committed Apr 6, 2015
1 parent d91b1eb commit 5e7cc11
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 61 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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'`
Expand Down
18 changes: 13 additions & 5 deletions src/a2091.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
5 changes: 4 additions & 1 deletion src/cfgfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
120 changes: 107 additions & 13 deletions src/cpuboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -915,7 +919,6 @@ void blizzardppc_irq(int level)
cpuboard_rethink();
}


static uae_u32 REGPARAM2 blizzardio_bget(uaecptr addr)
{
uae_u8 v = 0;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 ||
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down
28 changes: 23 additions & 5 deletions src/expansion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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
}
Expand Down
19 changes: 11 additions & 8 deletions src/filesys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/include/autoconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 5e7cc11

Please sign in to comment.