mirror of
https://github.com/holub/mame
synced 2025-10-09 01:39:48 +03:00
cleanup (nw)
This commit is contained in:
parent
22c7a00d57
commit
91fcff1b6d
@ -1017,7 +1017,7 @@ bool device_image_interface::load_internal(const std::string &path, bool is_crea
|
||||
m_create_args = create_args;
|
||||
|
||||
if (m_init_phase==false) {
|
||||
m_err = (image_error_t)finish_load();
|
||||
m_err = (finish_load()==IMAGE_INIT_PASS) ? IMAGE_ERROR_SUCCESS : IMAGE_ERROR_INTERNAL;
|
||||
if (m_err)
|
||||
goto done;
|
||||
}
|
||||
@ -1103,7 +1103,7 @@ bool device_image_interface::finish_load()
|
||||
if (m_created)
|
||||
{
|
||||
err = call_create(m_create_format, m_create_args);
|
||||
if (err)
|
||||
if (err == IMAGE_INIT_FAIL)
|
||||
{
|
||||
if (!m_err)
|
||||
m_err = IMAGE_ERROR_UNSPECIFIED;
|
||||
@ -1113,7 +1113,7 @@ bool device_image_interface::finish_load()
|
||||
{
|
||||
// using device load
|
||||
err = call_load();
|
||||
if (err)
|
||||
if (err == IMAGE_INIT_FAIL)
|
||||
{
|
||||
if (!m_err)
|
||||
m_err = IMAGE_ERROR_UNSPECIFIED;
|
||||
|
@ -147,8 +147,8 @@ public:
|
||||
|
||||
virtual void device_compute_hash(util::hash_collection &hashes, const void *data, size_t length, const char *types) const;
|
||||
|
||||
virtual bool call_load() { return false; }
|
||||
virtual bool call_create(int format_type, util::option_resolution *format_options) { return false; }
|
||||
virtual bool call_load() { return IMAGE_INIT_PASS; }
|
||||
virtual bool call_create(int format_type, util::option_resolution *format_options) { return IMAGE_INIT_PASS; }
|
||||
virtual void call_unload() { }
|
||||
virtual std::string call_display() { return std::string(); }
|
||||
virtual device_image_partialhash_func get_partial_hash() const { return nullptr; }
|
||||
|
@ -8,7 +8,7 @@
|
||||
memory
|
||||
-------------------------------------------------*/
|
||||
|
||||
int z80bin_load_file(device_image_interface *image, address_space &space, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr )
|
||||
bool z80bin_load_file(device_image_interface *image, address_space &space, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr )
|
||||
{
|
||||
int ch;
|
||||
UINT16 args[3];
|
||||
|
@ -13,6 +13,6 @@
|
||||
#ifndef __Z80_BIN__
|
||||
#define __Z80_BIN__
|
||||
|
||||
int z80bin_load_file(device_image_interface *image, address_space &space, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr );
|
||||
bool z80bin_load_file(device_image_interface *image, address_space &space, const char *file_type, UINT16 *exec_addr, UINT16 *start_addr, UINT16 *end_addr );
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user