diff options
author | 2023-03-30 20:23:35 -0400 | |
---|---|---|
committer | 2023-03-30 20:40:34 -0400 | |
commit | 6f7e4141ea14acaaf9cb973c66788fabb3457023 (patch) | |
tree | b7d89cfdacecbe34257c15c199a85b0a806850db /src/devices/bus/ti99/peb | |
parent | 7579c2f89dbcd509e4083bd578d2864d342caad4 (diff) |
API change for device_image_interface
- Remove the seterror method for recording error messages and conditions. Condition codes have been made return values for call_load, call_create and various related callbacks. Error messages (which many devices weren't generating) are now displayed through osd_printf_error.
- Eliminate the image_init_result and image_verify_result pass/fail enumeration types. Update many functions that were returning these enumerations or simply bools to return std::error_condition instead. In some cases, this type is now passed down from internal parsing/loading functions which were already returning it. In various other cases, the former default UNSPECIFIED has been used as a catchall for I/O errors; anticipated future refactorings should make these error returns more specific.
- Expand the image_error categories to include INVALIDLENGTH, NOSOFTWARE and BADSOFTWARE. The first is largely self-explanatory. The second is generated by the core to indicate failure to find software items in lists. The third is provided for devices to indicate semantic errors in software list entries.
- Change the return type of floppy_image_device::identify to a pair so the potential error condition can be passed along to the UI without storing it in a member variable.
- Move device_image_interface::message down into snapshot_image_device and change its implementation to use string_format instead of printf.
- Correct a typo in the shortname of the generic snapshot device.
Diffstat (limited to 'src/devices/bus/ti99/peb')
-rw-r--r-- | src/devices/bus/ti99/peb/ti_rs232.cpp | 8 | ||||
-rw-r--r-- | src/devices/bus/ti99/peb/ti_rs232.h | 4 | ||||
-rw-r--r-- | src/devices/bus/ti99/peb/tipi.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/ti99/peb/tipi.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/bus/ti99/peb/ti_rs232.cpp b/src/devices/bus/ti99/peb/ti_rs232.cpp index 841acf44ac7..aa74804b1a0 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.cpp +++ b/src/devices/bus/ti99/peb/ti_rs232.cpp @@ -186,14 +186,14 @@ ti_pio_attached_device::ti_pio_attached_device(const machine_config &mconfig, co /* Initialize rs232 unit and open image */ -image_init_result ti_rs232_attached_device::call_load() +std::error_condition ti_rs232_attached_device::call_load() { m_uart->set_clock(true); // The following line may cause trouble in the init phase // card->incoming_dtr(devnumber, (m_file!=nullptr)? ASSERT_LINE : CLEAR_LINE); - return image_init_result::PASS; // OK + return std::error_condition(); // OK } void ti_rs232_attached_device::call_unload() @@ -204,7 +204,7 @@ void ti_rs232_attached_device::call_unload() /* Initialize pio unit and open image */ -image_init_result ti_pio_attached_device::call_load() +std::error_condition ti_pio_attached_device::call_load() { ti_rs232_pio_device* card = static_cast<ti_rs232_pio_device*>(owner()); @@ -218,7 +218,7 @@ image_init_result ti_pio_attached_device::call_load() else card->m_pio_handshakein = true; - return image_init_result::PASS; // OK + return std::error_condition(); // OK } /* diff --git a/src/devices/bus/ti99/peb/ti_rs232.h b/src/devices/bus/ti99/peb/ti_rs232.h index e7970538504..43d04013b64 100644 --- a/src/devices/bus/ti99/peb/ti_rs232.h +++ b/src/devices/bus/ti99/peb/ti_rs232.h @@ -146,7 +146,7 @@ public: protected: void device_start() override { } - image_init_result call_load() override; + std::error_condition call_load() override; void call_unload() override; private: @@ -174,7 +174,7 @@ public: protected: void device_start() override { } - image_init_result call_load() override; + std::error_condition call_load() override; void call_unload() override; }; diff --git a/src/devices/bus/ti99/peb/tipi.cpp b/src/devices/bus/ti99/peb/tipi.cpp index 92f45710d33..61ad7b61e12 100644 --- a/src/devices/bus/ti99/peb/tipi.cpp +++ b/src/devices/bus/ti99/peb/tipi.cpp @@ -675,9 +675,9 @@ tipi_attached_device::tipi_attached_device(const machine_config &mconfig, const /* Initialize connection */ -image_init_result tipi_attached_device::call_load() +std::error_condition tipi_attached_device::call_load() { - return image_init_result::PASS; // OK + return std::error_condition(); // OK } void tipi_attached_device::call_unload() diff --git a/src/devices/bus/ti99/peb/tipi.h b/src/devices/bus/ti99/peb/tipi.h index 3703e246599..814a0f435ce 100644 --- a/src/devices/bus/ti99/peb/tipi.h +++ b/src/devices/bus/ti99/peb/tipi.h @@ -116,7 +116,7 @@ public: protected: void device_start() override { } void call_unload() override; - image_init_result call_load() override; + std::error_condition call_load() override; }; |