summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/pdp1.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-08-01 18:46:56 +1000
committer Vas Crabb <vas@vastheman.com>2016-08-01 18:47:22 +1000
commit15e7be7ac8e4127e9fc0f9b5c248f4a73ba85703 (patch)
tree71346f2c2d1ac08e0e9c9f4dea8f2537af380143 /src/mame/drivers/pdp1.cpp
parentc4c05c9735a5b956de128d6017027658b6c61a8e (diff)
Turn image init/validate into scoped enums to avoid accidental casts to/from integer and boolean types
The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
Diffstat (limited to 'src/mame/drivers/pdp1.cpp')
-rw-r--r--src/mame/drivers/pdp1.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index d1da0c11fb5..ab18705b760 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -679,7 +679,7 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual bool call_load() override;
+ virtual image_init_result call_load() override;
virtual void call_unload() override;
protected:
// device-level overrides
@@ -712,7 +712,7 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "tap,rim"; }
- virtual bool call_load() override;
+ virtual image_init_result call_load() override;
virtual void call_unload() override;
protected:
// device-level overrides
@@ -746,7 +746,7 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "typ"; }
- virtual bool call_load() override;
+ virtual image_init_result call_load() override;
virtual void call_unload() override;
protected:
// device-level overrides
@@ -779,7 +779,7 @@ public:
virtual bool is_reset_on_load() const override { return 0; }
virtual const char *file_extensions() const override { return "drm"; }
- virtual bool call_load() override;
+ virtual image_init_result call_load() override;
virtual void call_unload() override;
protected:
// device-level overrides
@@ -798,7 +798,7 @@ pdp1_cylinder_image_device::pdp1_cylinder_image_device(const machine_config &mco
/*
Open a perforated tape image
*/
-bool pdp1_readtape_image_device::call_load()
+image_init_result pdp1_readtape_image_device::call_load()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
@@ -825,7 +825,7 @@ bool pdp1_readtape_image_device::call_load()
}
}
- return IMAGE_INIT_PASS;
+ return image_init_result::PASS;
}
void pdp1_readtape_image_device::call_unload()
@@ -1032,14 +1032,14 @@ static void iot_rrb(device_t *device, int op2, int nac, int mb, int *io, int ac)
}
-bool pdp1_punchtape_image_device::call_load()
+image_init_result pdp1_punchtape_image_device::call_load()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
/* punch unit */
state->m_tape_puncher.fd = this;
- return IMAGE_INIT_PASS;
+ return image_init_result::PASS;
}
void pdp1_punchtape_image_device::call_unload()
@@ -1143,7 +1143,7 @@ static void iot_ppb(device_t *device, int op2, int nac, int mb, int *io, int ac)
/*
Open a file for typewriter output
*/
-bool pdp1_printer_image_device::call_load()
+image_init_result pdp1_printer_image_device::call_load()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
/* open file */
@@ -1151,7 +1151,7 @@ bool pdp1_printer_image_device::call_load()
state->m_io_status |= io_st_tyo;
- return IMAGE_INIT_PASS;
+ return image_init_result::PASS;
}
void pdp1_printer_image_device::call_unload()
@@ -1479,13 +1479,13 @@ void pdp1_state::parallel_drum_init(pdp1_state *state)
/*
Open a file for drum
*/
-bool pdp1_cylinder_image_device::call_load()
+image_init_result pdp1_cylinder_image_device::call_load()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
/* open file */
state->m_parallel_drum.fd = this;
- return IMAGE_INIT_PASS;
+ return image_init_result::PASS;
}
void pdp1_cylinder_image_device::call_unload()