summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/alto2/alto2cpu.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-11-01 00:47:41 +1100
committer Vas Crabb <vas@vastheman.com>2019-11-01 00:47:41 +1100
commit6f4c1f6e5b2525ac8b700b3a0754f5e99c4223e1 (patch)
tree4b0e0ac5cf1c3a7fd518a7d8f4d12f39291b2629 /src/devices/cpu/alto2/alto2cpu.cpp
parent0be348c7fbc8c0478f724ba098dabeb9eb3aab8c (diff)
Spring cleaning:
* Changed emu_fatalerror to use util::string_format semantics * Fixed some incorrectly marked up stuff in build scripts * Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now) * Fixed memory leaks in Xbox USB * There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it * Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave) * Got rid of device_slot_card_interface as it wasn't providing value * Added a helper template to reduce certain kinds of boilerplate in slots/buses * Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
Diffstat (limited to 'src/devices/cpu/alto2/alto2cpu.cpp')
-rw-r--r--src/devices/cpu/alto2/alto2cpu.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp
index 57ed58ddc03..bffe5071192 100644
--- a/src/devices/cpu/alto2/alto2cpu.cpp
+++ b/src/devices/cpu/alto2/alto2cpu.cpp
@@ -1093,14 +1093,6 @@ void alto2_cpu_device::execute_set_input(int inputnum, int state)
{
}
-void alto2_cpu_device::fatal(int exitcode, const char *format, ...)
-{
- va_list ap;
- va_start(ap, format);
- emu_fatalerror error(exitcode, format, ap);
- va_end(ap);
-}
-
/** @brief task names */
const char* alto2_cpu_device::task_name(int task)
{
@@ -1268,42 +1260,42 @@ void alto2_cpu_device::watch_write(uint32_t addr, uint32_t data)
/** @brief fatal exit on unitialized dynamic phase BUS source */
void alto2_cpu_device::bs_early_bad()
{
- fatal(9,"fatal: bad early bus source pointer for task %s, mpc:%05o bs:%s\n",
- task_name(m_task), m_mpc, bs_name(bs()));
+ throw emu_fatalerror(9,"fatal: bad early bus source pointer for task %s, mpc:%05o bs:%s\n",
+ task_name(m_task), m_mpc, bs_name(bs()));
}
/** @brief fatal exit on unitialized latching phase BUS source */
void alto2_cpu_device::bs_late_bad()
{
- fatal(9,"fatal: bad late bus source pointer for task %s, mpc:%05o bs: %s\n",
- task_name(m_task), m_mpc, bs_name(bs()));
+ throw emu_fatalerror(9,"fatal: bad late bus source pointer for task %s, mpc:%05o bs: %s\n",
+ task_name(m_task), m_mpc, bs_name(bs()));
}
/** @brief fatal exit on unitialized dynamic phase F1 function */
void alto2_cpu_device::f1_early_bad()
{
- fatal(9,"fatal: bad early f1 function pointer for task %s, mpc:%05o f1: %s\n",
- task_name(m_task), m_mpc, f1_name(f1()));
+ throw emu_fatalerror(9,"fatal: bad early f1 function pointer for task %s, mpc:%05o f1: %s\n",
+ task_name(m_task), m_mpc, f1_name(f1()));
}
/** @brief fatal exit on unitialized latching phase F1 function */
void alto2_cpu_device::f1_late_bad()
{
- fatal(9,"fatal: bad late f1 function pointer for task %s, mpc:%05o f1: %s\n",
- task_name(m_task), m_mpc, f1_name(f1()));
+ throw emu_fatalerror(9,"fatal: bad late f1 function pointer for task %s, mpc:%05o f1: %s\n",
+ task_name(m_task), m_mpc, f1_name(f1()));
}
/** @brief fatal exit on unitialized dynamic phase F2 function */
void alto2_cpu_device::f2_early_bad()
{
- fatal(9,"fatal: bad early f2 function pointer for task %s, mpc:%05o f2: %s\n",
- task_name(m_task), m_mpc, f2_name(f2()));
+ throw emu_fatalerror(9,"fatal: bad early f2 function pointer for task %s, mpc:%05o f2: %s\n",
+ task_name(m_task), m_mpc, f2_name(f2()));
}
/** @brief fatal exit on unitialized latching phase F2 function */
void alto2_cpu_device::f2_late_bad()
{
- fatal(9,"fatal: bad late f2 function pointer for task %s, mpc:%05o f2: %s\n",
+ throw emu_fatalerror(9,"fatal: bad late f2 function pointer for task %s, mpc:%05o f2: %s\n",
task_name(m_task), m_mpc, f2_name(f2()));
}
@@ -1768,7 +1760,7 @@ void alto2_cpu_device::f1_early_task()
return;
}
}
- fatal(3, "no tasks requesting service\n");
+ throw emu_fatalerror(3, "no tasks requesting service\n");
#endif /* !USE_PRIO_F9318 */
}