mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
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
This commit is contained in:
parent
9e1f0db898
commit
517858416d
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
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();
|
||||
|
||||
/* sign extend values < 0 */
|
||||
if (x & 0x80)
|
||||
x |= 0xffffff00;
|
||||
if (y & 0x80)
|
||||
y |= 0xffffff00;
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user