diff options
author | 2019-09-16 04:00:44 +0200 | |
---|---|---|
committer | 2019-09-16 04:00:44 +0200 | |
commit | 1a2d6fbdf5d126bc58237bb2a896414dec264a24 (patch) | |
tree | 3459bbced08eee2d4edad112219d2a0fcc9882d5 | |
parent | 4d83176feb766d996c5a62ed8c88b0e5b13030ba (diff) |
Hookup ARM data abort line
-rw-r--r-- | hash/archimedes.xml | 38 | ||||
-rw-r--r-- | src/devices/cpu/arm/arm.cpp | 24 | ||||
-rw-r--r-- | src/devices/cpu/arm/arm.h | 2 | ||||
-rw-r--r-- | src/mame/machine/archimds.cpp | 12 |
4 files changed, 56 insertions, 20 deletions
diff --git a/hash/archimedes.xml b/hash/archimedes.xml index 5b496d91e8b..478b38ba398 100644 --- a/hash/archimedes.xml +++ b/hash/archimedes.xml @@ -218,7 +218,8 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland, has trainer --> + <!-- Black screen, trips unimplemented opcode, has trainer --> + <!-- (pressing any key returns to RiscOS with an Atomic logo quickly destroyed) --> <software name="aggress" supported="no"> <description>Aggressor</description> <year>1992</year> @@ -302,8 +303,8 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland --> - <software name="aliped" supported="no"> + <!-- boot OK, has RMW bugs during scroll, cannot pickup items? (key on top of stairs) --> + <software name="aliped" supported="partial"> <description>Aliped</description> <year>1990</year> <publisher>Archimedes World</publisher> @@ -314,7 +315,7 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland --> + <!-- boot OK, has RMW bugs during scroll, cannot pickup items? (key on top of stairs) --> <software name="alipeda" cloneof="aliped" supported="no"> <description>Aliped (Alt)</description> <year>1990</year> @@ -1076,11 +1077,12 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland --> + <!-- Throws "Internal error: abort on data transfer at &01D04E50" exception --> <software name="elite" supported="no"> <description>Elite</description> <year>1991</year> <publisher>Hybrid Technology</publisher> + <info name="usage" value="Requires 1MB RAM"/> <part name="flop1" interface="floppy_3_5"> <dataarea name="flop" size="814080"> <rom name="elite (1991)(hybrid technology).adf" size="814080" crc="c4c32b35" sha1="fde0f540e0d5732646c1eebb54629a162f40db91" /> @@ -1088,11 +1090,12 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland --> + <!-- Throws "Internal error: abort on data transfer at &01D04E50" exception --> <software name="elitea" cloneof="elite" supported="no"> <description>Elite (Alt)</description> <year>1991</year> <publisher>Hybrid Technology</publisher> + <info name="usage" value="Requires 1MB RAM"/> <part name="flop1" interface="floppy_3_5"> <dataarea name="flop" size="819200"> <rom name="archimedes elite (1991)(hybrid technology).adf" size="819200" crc="156d7bd6" sha1="49c495bc8001141fecce35469c3de976aae8b32b" /> @@ -1315,7 +1318,9 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- Most executables either jump to lalaland or exceptions with "unrecoverable error" --> + <!-- !Flight throws "No stack for trap handler" exception --> + <!-- !Shape and !World have a "fatal internal error (type=3)" --> + <!-- !View loads but cannot be put into view? --> <software name="flsimtkit" supported="no"> <description>Flight Sim Toolkit</description> <year>1991</year> @@ -1776,8 +1781,10 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- Attempting to change inputs causes a jump to lalaland, fire key not recognized by the game, using joystick actually routes to mouse (with wrong inputs) --> - <software name="losttmpl" supported="no"> + <!-- Changing inputs causes a "Sprite doesn't exist" if space key is pressed and a system hang --> + <!-- using "joystick 1" actually routes to mouse, need to select joystick 2 for actual joystick routing --> + <!-- mouse inputs are quite erratic --> + <software name="losttmpl" supported="partial"> <description>Legend of the Lost Temple</description> <year>1992</year> <publisher>Eterna</publisher> @@ -2650,7 +2657,7 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- "Internal error: branch through zero" exception, after tripping an unemulated COPRO opcode --> + <!-- "Internal error: undefined instruction at &181F190" exception with RiscOS reset. --> <software name="starf3k" supported="no"> <description>Star Fighter 3000</description> <year>1994</year> @@ -2669,8 +2676,8 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- jumps to lalaland when starting a game --> - <software name="starf3kd" supported="no"> + <!-- boot OK, requires that the BGM fully plays on "WFE" boot screen --> + <software name="starf3kd" supported="yes"> <description>Star Fighter 3000 (Demo)</description> <year>1994</year> <publisher>Fednet</publisher> @@ -2943,7 +2950,8 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- "Not enough memory in module area" when launched with !Boot, jumps to lalaland after some gameplay time --> + <!-- "Not enough memory in module area" when launched with !Boot --> + <!-- "No memory in system sprite area" when launched with Loader or Game --> <software name="whitema2" supported="no"> <description>White Magic 2</description> <year>1989</year> @@ -3496,12 +3504,14 @@ Zelanites: The Onslaught by Micro Power (RiscOS2) </part> </software> - <!-- Jumps to lalaland --> + <!-- "trap while in trap handler" at "TIME ZONE is loading" screen --> + <!-- Using alt method !Run2 with described steps causes "No stack for trap handler" --> <software name="timezone" supported="no"> <description>Time Zone</description> <year>19??</year> <publisher><homebrew></publisher> <info name="author" value="Cobra" /> + <info name="usage" value="Requires 2MB RAM, 1MB requires trick described in ZoneHelp file"/> <part name="flop1" interface="floppy_3_5"> <dataarea name="flop" size="819200"> <rom name="time zone (19xx)(cobra).adf" size="819200" crc="a21f92e4" sha1="371b30787a782cb1fe6cb6ad2217a832a06e1e96" /> diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index 2003421fa48..285c51d64fe 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -451,8 +451,8 @@ void arm_cpu_device::execute_run() void arm_cpu_device::HandleTrap(uint8_t vector) { - if (vector == 0x04) - printf("%08x\n",R15&0x3fffffc); +// if (vector == 0x04) +// printf("%08x\n",R15&0x3fffffc); uint32_t pc = R15+4; R15 = eARM_MODE_SVC; /* Set SVC mode so PC is saved to correct R14 bank */ @@ -462,6 +462,18 @@ void arm_cpu_device::HandleTrap(uint8_t vector) m_icount -= 2 * S_CYCLE + N_CYCLE; } +WRITE_LINE_MEMBER( arm_cpu_device::data_abort_w ) +{ + if (state) + { + //printf("%08x\n",R15 & 0x3fffffc); + R15 -= 4; + // TODO: it's really vector 0x10 + HandleTrap(0x10-4); + //machine().debug_break(); + } +} + void arm_cpu_device::arm_check_irq_state() { uint32_t pc = R15+4; /* save old pc (already incremented in pipeline) */ @@ -1522,7 +1534,7 @@ bool arm_cpu_device::HandleCoProVL86C020( uint32_t insn ) // TODO: check for user mode, throw access violation m_coproFPcr = GetRegister(rn); // TODO: check what it tries to do - printf("%08x: WFC write %08x\n", R15 & 0x3fffffc, m_coproFPcr); + //printf("%08x: WFC write %08x\n", R15 & 0x3fffffc, m_coproFPcr); } // RFC - Read Floating Point Control else if ( (insn&0x0fff0fff) == 0x0e500110) @@ -1532,10 +1544,10 @@ bool arm_cpu_device::HandleCoProVL86C020( uint32_t insn ) } else { - printf("%08x OPCODE\n",insn); + //printf("%08x OPCODE\n",insn); HandleTrap(0x04); - if ((insn & 0x0e000000) == 0x0e000000) - machine().debug_break(); + //if ((insn & 0x0e000000) == 0x0e000000) + // machine().debug_break(); // HandleFPU(insn); //printf("%08x: Unimplemented VL86C020 copro instruction %08x %d %d\n", R15 & 0x3ffffff, insn,rn,crn); diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h index bedd2b7b3f5..75f5a7a6d08 100644 --- a/src/devices/cpu/arm/arm.h +++ b/src/devices/cpu/arm/arm.h @@ -30,6 +30,7 @@ public: arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); void set_copro_type(copro_type type) { m_copro_type = type; } + DECLARE_WRITE_LINE_MEMBER( data_abort_w ); protected: enum @@ -72,6 +73,7 @@ protected: uint32_t m_coproRegister[16]; uint8_t m_pendingIrq; uint8_t m_pendingFiq; + uint8_t m_pendingDataAbort; address_space *m_program; std::function<u32 (offs_t)> m_pr32; endianness_t m_endian; diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp index 319c963afa5..d9025a28b58 100644 --- a/src/mame/machine/archimds.cpp +++ b/src/mame/machine/archimds.cpp @@ -322,6 +322,10 @@ void archimedes_state::archimedes_init() m_snd_timer->adjust(attotime::never); } +// TODO: access level permissions against current ARM mode +// 1x SVC can r/w, OS read only, punt if user mode +// 01 SVC and OS can r/w, user read only, punt otherwise +// 00 free for all READ32_MEMBER(archimedes_state::archimedes_memc_logical_r) { uint32_t page, poffs; @@ -350,6 +354,8 @@ READ32_MEMBER(archimedes_state::archimedes_memc_logical_r) else { //printf("ARCHIMEDES_MEMC: Reading unmapped page %02x\n",page); + if (!machine().side_effects_disabled()) + m_maincpu->data_abort_w(ASSERT_LINE); return 0xdeadbeef; } } @@ -367,6 +373,7 @@ WRITE32_MEMBER(archimedes_state::archimedes_memc_logical_w) // if the boot ROM is mapped, ignore writes if (m_memc_latchrom) { + // TODO: verify if this causes data abort or not return; } else @@ -383,6 +390,8 @@ WRITE32_MEMBER(archimedes_state::archimedes_memc_logical_w) } else { + if (!machine().side_effects_disabled()) + m_maincpu->data_abort_w(ASSERT_LINE); //printf("ARCHIMEDES_MEMC: Writing unmapped page %02x, what do we do?\n",page); } } @@ -423,6 +432,7 @@ READ32_MEMBER(archimedes_state::aristmk5_drame_memc_logical_r) In this state, DRAM memory space is disabled. ****************************************************************************************/ + // TODO: make this an override of above if(!(m_memc_pages[page] & 0x10) && (offset <= 0x3ff)) return 0xEAD0000A; return m_archimedes_memc_physmem[((m_memc_pages[page] * page_sizes[m_memc_pagesize]) + poffs)>>2]; @@ -430,6 +440,8 @@ READ32_MEMBER(archimedes_state::aristmk5_drame_memc_logical_r) else { //printf("ARCHIMEDES_MEMC: Reading unmapped page %02x\n",page); + if (!machine().side_effects_disabled()) + m_maincpu->data_abort_w(ASSERT_LINE); return 0xdeadbeef; } } |