summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2019-03-22 20:10:18 -0400
committer arbee <rb6502@users.noreply.github.com>2019-03-22 20:10:18 -0400
commit517858416d578350f5b9ac1316f3fbfe624b77a8 (patch)
tree55e1076fafb47686866ae4cea31b51b00cda1c8b
parent9e1f0db8980db568e93621c638db24bcb72e6bbb (diff)
apollo: Updates and resurrection [Hans Ostermeyer]
- Fix typo'd constant in m68kmmu that prevented trapping user accesses to kernel space - Remove need for intrusive m68k modifications - Fix crash in 3c505 networking - Fix Domain/OS booting in Normal mode
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/devices/bus/isa/3c505.cpp4
-rw-r--r--src/devices/cpu/m68000/m68000.h1
-rw-r--r--src/devices/cpu/m68000/m68kmmu.h2
-rw-r--r--src/mame/drivers/apollo.cpp2
-rw-r--r--src/mame/includes/apollo.h18
-rw-r--r--src/mame/machine/apollo.cpp8
-rw-r--r--src/mame/machine/apollo_kbd.cpp19
8 files changed, 23 insertions, 32 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index b42862bcbba..032e5d6f474 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -1559,7 +1559,6 @@ files {
MAME_DIR .. "src/mame/drivers/apollo.cpp",
MAME_DIR .. "src/mame/includes/apollo.h",
MAME_DIR .. "src/mame/machine/apollo.cpp",
- MAME_DIR .. "src/mame/machine/apollo_dbg.cpp",
MAME_DIR .. "src/mame/machine/apollo_kbd.cpp",
MAME_DIR .. "src/mame/machine/apollo_kbd.h",
MAME_DIR .. "src/mame/video/apollo.cpp",
diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp
index 71548dcbdaa..37cd5ef346a 100644
--- a/src/devices/bus/isa/3c505.cpp
+++ b/src/devices/bus/isa/3c505.cpp
@@ -1644,7 +1644,9 @@ READ16_MEMBER(threecom3c505_device::read)
// omit excessive logging
if (data == last_data)
{
- uint32_t pc = space.device().state().pcbase();
+ // FIXME: space.device().state().pcbase() will crash mame with SIGSEGV (since mame0197)
+ uint32_t pc = 0; // space.device().state().pcbase();
+
if (pc == last_pc)
{
return data;
diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h
index 5fa4a469122..0ee41f348b5 100644
--- a/src/devices/cpu/m68000/m68000.h
+++ b/src/devices/cpu/m68000/m68000.h
@@ -148,6 +148,7 @@ public:
void set_tas_write_callback(write8_delegate callback);
uint16_t get_fc();
void set_hmmu_enable(int enable);
+ int get_pmmu_enable() {return m_pmmu_enabled;};
void set_fpu_enable(int enable);
void set_buserror_details(uint32_t fault_addr, uint8_t rw, uint8_t fc);
diff --git a/src/devices/cpu/m68000/m68kmmu.h b/src/devices/cpu/m68000/m68kmmu.h
index 114d89ff5c1..99481039b0f 100644
--- a/src/devices/cpu/m68000/m68kmmu.h
+++ b/src/devices/cpu/m68000/m68kmmu.h
@@ -33,7 +33,7 @@ static constexpr uint32_t M68K_MMU_DF_WP = 0x00000004;
static constexpr uint32_t M68K_MMU_DF_USED = 0x00000008;
static constexpr uint32_t M68K_MMU_DF_MODIFIED = 0x00000010;
static constexpr uint32_t M68K_MMU_DF_CI = 0x00000040;
-static constexpr uint32_t M68K_MMU_DF_SUPERVISOR = 0000000100;
+static constexpr uint32_t M68K_MMU_DF_SUPERVISOR = 0x00000100;
static constexpr uint32_t M68K_MMU_DF_ADDR_MASK = 0xfffffff0;
static constexpr uint32_t M68K_MMU_DF_IND_ADDR_MASK = 0xfffffffc;
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index eb071504cbc..9bf3f638ea5 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -1057,7 +1057,7 @@ MACHINE_CONFIG_START(apollo_state::dn3500)
#ifdef APOLLO_XXL
apollo_stdio_device &stdio(APOLLO_STDIO(config, APOLLO_STDIO_TAG, 0));
- stdio.tx_callback().set(m_sio, FUNC(apollo_sio::rx_b_w));
+ stdio.tx_cb().set(m_sio, FUNC(apollo_sio::rx_b_w));
#endif
MACHINE_CONFIG_END
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h
index a0be6cfa14a..de0ff49865e 100644
--- a/src/mame/includes/apollo.h
+++ b/src/mame/includes/apollo.h
@@ -90,11 +90,6 @@ uint8_t apollo_get_ram_config_byte(void);
//apollo_get_node_id - get the node id
uint32_t apollo_get_node_id(void);
-#if 0
- // should be called by the CPU core before executing each instruction
-int apollo_instruction_hook(m68000_base_device *device, offs_t curpc);
-#endif
-
void apollo_set_cache_status_register(device_t *device,uint8_t mask, uint8_t data);
/*----------- machine/apollo.cpp -----------*/
@@ -265,7 +260,6 @@ public:
void select_dma_channel(int channel, bool state);
DECLARE_WRITE_LINE_MEMBER(apollo_reset_instr_callback);
- DECLARE_READ32_MEMBER(apollo_instruction_hook);
void common(machine_config &config);
void apollo(machine_config &config);
@@ -687,14 +681,14 @@ public:
private:
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// serial overrides
- virtual void rcv_complete(); // Rx completed receiving byte
- virtual void tra_complete(); // Tx completed sending byte
- virtual void tra_callback(); // Tx send bit
+ virtual void rcv_complete() override; // Rx completed receiving byte
+ virtual void tra_complete() override; // Tx completed sending byte
+ virtual void tra_callback() override; // Tx send bit
TIMER_CALLBACK_MEMBER( poll_timer );
void xmit_char(uint8_t data);
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index a28cd843c4d..2cdbd251a08 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -106,7 +106,7 @@ INPUT_PORTS_START( apollo_config )
// PORT_CONFNAME(APOLLO_CONF_IDLE_SLEEP, 0x00, "Idle Sleep")
// PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
// PORT_CONFSETTING(APOLLO_CONF_IDLE_SLEEP, DEF_STR ( On ) )
-
+#ifdef APOLLO_XXL
PORT_CONFNAME(APOLLO_CONF_TRAP_TRACE, 0x00, "Trap Trace")
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
PORT_CONFSETTING(APOLLO_CONF_TRAP_TRACE, DEF_STR ( On ) )
@@ -114,7 +114,7 @@ INPUT_PORTS_START( apollo_config )
PORT_CONFNAME(APOLLO_CONF_FPU_TRACE, 0x00, "FPU Trace")
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
PORT_CONFSETTING(APOLLO_CONF_FPU_TRACE, DEF_STR ( On ) )
-#ifdef APOLLO_XXL
+
PORT_CONFNAME(APOLLO_CONF_DISK_TRACE, 0x00, "Disk Trace")
PORT_CONFSETTING(0x00, DEF_STR ( Off ) )
PORT_CONFSETTING(APOLLO_CONF_DISK_TRACE, DEF_STR ( On ) )
@@ -256,11 +256,11 @@ WRITE16_MEMBER(apollo_state::apollo_csr_control_register_w)
// disable FPU (i.e. FPU opcodes in CPU)
apollo_set_cpu_has_fpu(m_maincpu, 0);
- if (!apollo_is_dn3000())
+ if (!apollo_is_dn3000() && !m_maincpu->get_pmmu_enable())
{
// hack: set APOLLO_CSR_SR_FP_TRAP in cpu status register for /sau7/self_test
// APOLLO_CSR_SR_FP_TRAP in status register should be set by next fmove instruction
- // cpu_status_register |= APOLLO_CSR_SR_FP_TRAP;
+ cpu_status_register |= APOLLO_CSR_SR_FP_TRAP;
}
}
diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp
index a3d99e7ce2e..54302827fea 100644
--- a/src/mame/machine/apollo_kbd.cpp
+++ b/src/mame/machine/apollo_kbd.cpp
@@ -381,15 +381,10 @@ void apollo_kbd_device::mouse::read_mouse()
}
else
{
- int b = m_device->m_io_mouse[0]->read();
- int x = m_device->m_io_mouse[1]->read();
- int y = m_device->m_io_mouse[2]->read();
-
- /* sign extend values < 0 */
- if (x & 0x80)
- x |= 0xffffff00;
- if (y & 0x80)
- y |= 0xffffff00;
+ char b = m_device->m_io_mouse[0]->read();
+ char x = m_device->m_io_mouse[1]->read();
+ char y = m_device->m_io_mouse[2]->read();
+
y = -y;
if (m_last_b < 0)
@@ -436,9 +431,9 @@ void apollo_kbd_device::mouse::read_mouse()
// mouse data submitted; update current mouse state
m_last_b = b;
- m_last_x += dx;
- m_last_y += dy;
- m_tx_pending = 100; // mouse data packet will take 40 ms
+ m_last_x = x;
+ m_last_y = y;
+ m_tx_pending = 50; // mouse data packet will take 40 ms
}
}
}