diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index b70eecba28786..573c1b9e0954a 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -890,10 +890,6 @@ void running_machine::handle_saveload() // handle the result switch (saverr) { - case STATERR_ILLEGAL_REGISTRATIONS: - popmessage("Error: Unable to %s state %s %s due to illegal registrations. See error.log for details.", opname, preposname, m_saveload_pending_file); - break; - case STATERR_INVALID_HEADER: popmessage("Error: Unable to %s state %s %s due to an invalid header. Make sure the save state is correct for this system.", opname, preposname, m_saveload_pending_file); break; diff --git a/src/emu/save.cpp b/src/emu/save.cpp index ab1fc5a854d8b..d2f1f0e328ecc 100644 --- a/src/emu/save.cpp +++ b/src/emu/save.cpp @@ -68,7 +68,6 @@ enum save_manager::save_manager(running_machine &machine) : m_machine(machine) , m_reg_allowed(true) - , m_illegal_regs(0) { m_rewind = std::make_unique(*this); } @@ -187,9 +186,7 @@ void save_manager::save_memory(device_t *device, const char *module, const char if (!m_reg_allowed) { machine().logerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); - if (machine().system().flags & machine_flags::SUPPORTS_SAVE) - fatalerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); - m_illegal_regs++; + fatalerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name); return; } @@ -408,10 +405,6 @@ save_error save_manager::read_buffer(const void *buf, size_t size) template inline save_error save_manager::do_write(T check_space, U write_block, V start_header, W start_data) { - // if we have illegal registrations, return an error - if (m_illegal_regs > 0) - return STATERR_ILLEGAL_REGISTRATIONS; - // check for sufficient space size_t total_size = HEADER_SIZE; for (const auto &entry : m_entry_list) @@ -455,10 +448,6 @@ inline save_error save_manager::do_write(T check_space, U write_block, V start_h template inline save_error save_manager::do_read(T check_length, U read_block, V start_header, W start_data) { - // if we have illegal registrations, return an error - if (m_illegal_regs > 0) - return STATERR_ILLEGAL_REGISTRATIONS; - // check for sufficient space size_t total_size = HEADER_SIZE; for (const auto &entry : m_entry_list) @@ -663,10 +652,6 @@ save_error ram_state::load() // initialize m_data.seekg(0); - // if we have illegal registrations, return an error - if (m_save.m_illegal_regs > 0) - return STATERR_ILLEGAL_REGISTRATIONS; - // get the save manager to load state return m_save.read_stream(m_data); } @@ -916,11 +901,6 @@ void rewinder::report_error(save_error error, rewind_operation operation) switch (error) { // internal saveload failures - case STATERR_ILLEGAL_REGISTRATIONS: - m_save.machine().logerror("Rewind error: Unable to %s state due to illegal registrations.", opname); - m_save.machine().popmessage("Rewind error occured. See error.log for details."); - break; - case STATERR_INVALID_HEADER: m_save.machine().logerror("Rewind error: Unable to %s state due to an invalid header. " "Make sure the save state is correct for this machine.\n", opname); diff --git a/src/emu/save.h b/src/emu/save.h index 677f127853a4b..e473f40831752 100644 --- a/src/emu/save.h +++ b/src/emu/save.h @@ -34,7 +34,6 @@ enum save_error { STATERR_NONE, STATERR_NOT_FOUND, - STATERR_ILLEGAL_REGISTRATIONS, STATERR_INVALID_HEADER, STATERR_READ_ERROR, STATERR_WRITE_ERROR, @@ -334,7 +333,6 @@ class save_manager running_machine & m_machine; // reference to our machine std::unique_ptr m_rewind; // rewinder bool m_reg_allowed; // are registrations allowed? - s32 m_illegal_regs; // number of illegal registrations std::vector> m_entry_list; // list of registered entries std::vector> m_ramstate_list; // list of ram states