mirror of
https://github.com/holub/mame
synced 2025-06-08 13:53:52 +03:00
(nw) misc cleanup:
* Fix path for coleco cartridge bus header * Remove some assert_always * Fix some comments that seem to have been victims of scripted editing
This commit is contained in:
parent
2d37c75ce0
commit
36cbaa12b1
@ -761,7 +761,7 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
--
|
--
|
||||||
--@src/devices/bus/coleco/exp.h,BUSES["COLECO_CART"] = true
|
--@src/devices/bus/coleco/cartridge/exp.h,BUSES["COLECO_CART"] = true
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
if (BUSES["COLECO_CART"]~=null) then
|
if (BUSES["COLECO_CART"]~=null) then
|
||||||
|
@ -104,7 +104,8 @@ int nscsi_cdrom_device::to_msf(int frame)
|
|||||||
|
|
||||||
void nscsi_cdrom_device::set_block_size(u32 block_size)
|
void nscsi_cdrom_device::set_block_size(u32 block_size)
|
||||||
{
|
{
|
||||||
assert_always(bytes_per_sector % block_size == 0, "block size must be a factor of sector size");
|
if (bytes_per_sector % block_size)
|
||||||
|
throw emu_fatalerror("nscsi_cdrom_device(%s): block size must be a factor of sector size", tag());
|
||||||
|
|
||||||
bytes_per_block = block_size;
|
bytes_per_block = block_size;
|
||||||
};
|
};
|
||||||
|
@ -297,6 +297,6 @@ void sms_light_phaser_device::device_timer(emu_timer &timer, device_timer_id id,
|
|||||||
sensor_check();
|
sensor_check();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert_always(false, "Unknown id in sms_light_phaser_device::device_timer");
|
throw emu_fatalerror("sms_light_phaser_device(%s): Unknown timer ID", tag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ void sms_sports_pad_device::device_timer(emu_timer &timer, device_timer_id id, i
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert_always(false, "Unknown id in sms_sports_pad_device::device_timer");
|
throw emu_fatalerror("sms_sports_pad_device(%s): Unknown timer ID", tag());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1514,7 +1514,8 @@ void ti99_cartridge_device::rpk::close()
|
|||||||
if (socket.second->persistent_ram())
|
if (socket.second->persistent_ram())
|
||||||
{
|
{
|
||||||
// try to open the battery file and write it if possible
|
// try to open the battery file and write it if possible
|
||||||
assert_always(socket.second->get_contents() && (socket.second->get_content_length() > 0), "Buffer is null or length is 0");
|
if (!socket.second->get_contents() || (socket.second->get_content_length() <= 0))
|
||||||
|
throw emu_fatalerror("ti99_cartridge_device::rpk::close: Buffer is null or length is 0");
|
||||||
|
|
||||||
emu_file file(m_options.nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
emu_file file(m_options.nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
|
||||||
osd_file::error filerr = file.open(socket.second->get_pathname());
|
osd_file::error filerr = file.open(socket.second->get_pathname());
|
||||||
@ -1699,12 +1700,13 @@ std::unique_ptr<ti99_cartridge_device::rpk_socket> ti99_cartridge_device::rpk_re
|
|||||||
LOGMASKED(LOG_RPK, "[RPK handler] Loading NVRAM contents from '%s'\n", ram_pname.c_str());
|
LOGMASKED(LOG_RPK, "[RPK handler] Loading NVRAM contents from '%s'\n", ram_pname.c_str());
|
||||||
|
|
||||||
// Load the NVRAM contents
|
// Load the NVRAM contents
|
||||||
int bytes_read = 0;
|
if (!contents || (length <= 0))
|
||||||
assert_always(contents && (length > 0), "Buffer is null or length is 0");
|
throw emu_fatalerror("ti99_cartridge_device::rpk_reader::load_ram_resource: Buffer is null or length is 0");
|
||||||
|
|
||||||
// try to open the battery file and read it if possible
|
// try to open the battery file and read it if possible
|
||||||
emu_file file(options.nvram_directory(), OPEN_FLAG_READ);
|
emu_file file(options.nvram_directory(), OPEN_FLAG_READ);
|
||||||
osd_file::error filerr = file.open(ram_pname);
|
osd_file::error filerr = file.open(ram_pname);
|
||||||
|
int bytes_read = 0;
|
||||||
if (filerr == osd_file::error::NONE)
|
if (filerr == osd_file::error::NONE)
|
||||||
bytes_read = file.read(contents, length);
|
bytes_read = file.read(contents, length);
|
||||||
|
|
||||||
|
@ -58,7 +58,8 @@ base_28fxxx_device::base_28fxxx_device(const machine_config &mconfig, device_typ
|
|||||||
, m_program_power(CLEAR_LINE)
|
, m_program_power(CLEAR_LINE)
|
||||||
, m_state(STATE_READ_MEMORY)
|
, m_state(STATE_READ_MEMORY)
|
||||||
{
|
{
|
||||||
assert_always((m_size & (m_size - 1)) == 0, "memory size must be an exact power of two");
|
if (m_size & (m_size - 1))
|
||||||
|
throw emu_fatalerror("%s(%s): memory size must be an exact power of two", type.shortname(), tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
intel_28f010_device::intel_28f010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||||
|
@ -253,7 +253,7 @@ void mekd5_state::device_timer(emu_timer &timer, device_timer_id id, int param,
|
|||||||
m_kpd_pia->cb2_w(0);
|
m_kpd_pia->cb2_w(0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert_always(false, "Unknown id in mekd5_state::device_timer");
|
throw emu_fatalerror("Unknown id in mekd5_state::device_timer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "emu.h"
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
#include "emupal.h"
|
#include "emupal.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user