CSA Magnum 40 autoboot disable jumper.

This commit is contained in:
Toni Wilen 2018-03-11 12:37:13 +02:00
parent 021fa79196
commit d350d60264
3 changed files with 38 additions and 23 deletions

View File

@ -1128,7 +1128,7 @@ static uae_u32 REGPARAM2 blizzardio_bget(uaecptr addr)
uae_u8 v = 0;
//write_log(_T("CS IO XBGET %08x=%02X PC=%08x\n"), addr, v & 0xff, M68K_GETPC);
if (is_magnum40(&currprefs)) {
if (regs.s && (addr & 0xff0f) == 0x0c0c) {
if ((addr & 0xff0f) == 0x0c0c) {
int reg = (addr >> 4) & 7;
v = io_reg[reg];
if (reg >= 0 && reg <= 3)
@ -1236,7 +1236,7 @@ static void REGPARAM2 blizzardio_bput(uaecptr addr, uae_u32 v)
write_log(_T("CS IO XBPUT %08x %02x PC=%08x\n"), addr, v & 0xff, M68K_GETPC);
#endif
if (is_magnum40(&currprefs)) {
if (regs.s && (addr & 0xff0f) == 0x0c0c) {
if ((addr & 0xff0f) == 0x0c0c) {
int reg = (addr >> 4) & 7;
if (reg == 3 && ((v ^ io_reg[reg]) & 1)) {
maprom_state = v & 1;

View File

@ -5855,6 +5855,15 @@ static const struct cpuboardsubtype ivs_sub[] = {
}
};
static const struct expansionboardsettings magnum40_settings[] = {
{
_T("Autoboot disable"),
_T("autoboot")
},
{
NULL
}
};
static const struct expansionboardsettings zeus040_settings[] = {
{
_T("Autoboot disable (A3)"),
@ -5892,7 +5901,7 @@ static const struct cpuboardsubtype csa_sub[] = {
128 * 1024 * 1024,
0,
ncr710_magnum40_autoconfig_init, NULL, BOARD_AUTOCONFIG_Z2, 1,
NULL, NULL
magnum40_settings, NULL
},
{
NULL

View File

@ -378,29 +378,33 @@ int pci710_dma_rw(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len, DM
return 0;
}
static void check_timer(struct ncr_state *ncr)
{
if (ncr->state[1] & 1) {
int v = (ncr->state[5] << 16) | (ncr->state[6] << 8) | (ncr->state[7]);
if (v > 0) {
v -= 2304;
ncr->state[5] = (v >> 16) & 0xff;
ncr->state[6] = (v >> 8) & 0xff;
ncr->state[7] = (v >> 0) & 0xff;
}
if (v <= 0) {
ncr->state[0] |= 1;
ncr->state[5] = ncr->state[2];
ncr->state[6] = ncr->state[3];
ncr->state[7] = ncr->state[4];
}
}
if (ncr->state[0] & 1) {
set_irq2(ncr->id, 1);
}
}
void ncr_vsync(void)
{
for (int i = 0; ncr_units[i]; i++) {
if (ncr_units[i] == ncr_magnum40) {
struct ncr_state *ncr = ncr_units[i];
if (ncr->state[1] & 1) {
int v = (ncr->state[5] << 16) | (ncr->state[6] << 8) | (ncr->state[7]);
if (v > 0) {
v -= 2304;
ncr->state[5] = (v >> 16) & 0xff;
ncr->state[6] = (v >> 8) & 0xff;
ncr->state[7] = (v >> 0) & 0xff;
}
if (v <= 0) {
ncr->state[0] |= 1;
ncr->state[5] = ncr->state[2];
ncr->state[6] = ncr->state[3];
ncr->state[7] = ncr->state[4];
}
}
if (ncr->state[0] & 1) {
set_irq2(ncr->id, 1);
}
check_timer(ncr_magnum40);
}
}
@ -537,7 +541,9 @@ static uae_u32 ncr_bget2 (struct ncr_state *ncr, uaecptr addr)
switch(reg)
{
case 0x0c: // jumpers (68230 port C)
return 0x00;
if (currprefs.cpuboard_settings & 1)
v |= 0x80;
return v;
case 0x1a: // timer ZDS
return ncr->state[0] & 1;
}