summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/debug/debugcmd.cpp21
-rw-r--r--src/emu/debug/debugcon.cpp6
-rw-r--r--src/emu/diimage.cpp50
-rw-r--r--src/emu/diimage.h5
-rw-r--r--src/emu/dinetwork.cpp6
-rw-r--r--src/emu/dipalette.cpp3
-rw-r--r--src/emu/emucore.h12
-rw-r--r--src/emu/emupal.cpp9
-rw-r--r--src/emu/inputdev.cpp6
-rw-r--r--src/emu/ioport.cpp18
-rw-r--r--src/emu/machine.cpp13
-rw-r--r--src/emu/natkeyboard.h4
-rw-r--r--src/emu/render.cpp12
-rw-r--r--src/emu/screen.h1
-rw-r--r--src/emu/tilemap.cpp8
-rw-r--r--src/emu/tilemap.h4
-rw-r--r--src/emu/video/generic.cpp12
-rw-r--r--src/emu/xtal.cpp2
18 files changed, 105 insertions, 87 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index c61afae5126..cd9d9dcf743 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -2034,14 +2034,14 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
if (params.size() > 4 && !validate_number_parameter(params[4], ascii))
return;
- u64 rowsize = 16;
- if (params.size() > 5 && !validate_number_parameter(params[5], rowsize))
- return;
-
address_space *space;
if (!validate_cpu_space_parameter((params.size() > 6) ? params[6].c_str() : nullptr, ref, space))
return;
+ u64 rowsize = space->byte_to_address(16);
+ if (params.size() > 5 && !validate_number_parameter(params[5], rowsize))
+ return;
+
int shift = space->addr_shift();
u64 granularity = shift > 0 ? 2 : 1 << -shift;
@@ -2060,9 +2060,9 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
m_console.printf("Invalid width! (must be at least %d)\n", granularity);
return;
}
- if (rowsize == 0 || (rowsize % width) != 0)
+ if (rowsize == 0 || (rowsize % space->byte_to_address(width)) != 0)
{
- m_console.printf("Invalid row size! (must be a positive multiple of %d)\n", width);
+ m_console.printf("Invalid row size! (must be a positive multiple of %d)\n", space->byte_to_address(width));
return;
}
@@ -2081,10 +2081,7 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
util::ovectorstream output;
output.reserve(200);
- if (shift > 0)
- width <<= shift;
- else if(shift < 0)
- width >>= -shift;
+ const unsigned delta = (shift >= 0) ? (width << shift) : (width >> -shift);
auto dis = space->device().machine().disable_side_effects();
bool be = space->endianness() == ENDIANNESS_BIG;
@@ -2098,7 +2095,7 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
util::stream_format(output, "%0*X: ", space->logaddrchars(), i);
/* print the bytes */
- for (u64 j = 0; j < rowsize; j += width)
+ for (u64 j = 0; j < rowsize; j += delta)
{
if (i + j <= endoffset)
{
@@ -2134,7 +2131,7 @@ void debugger_commands::execute_dump(int ref, const std::vector<std::string> &pa
if (ascii)
{
util::stream_format(output, " ");
- for (u64 j = 0; j < rowsize && (i + j) <= endoffset; j += width)
+ for (u64 j = 0; j < rowsize && (i + j) <= endoffset; j += delta)
{
offs_t curaddr = i + j;
if (space->device().memory().translate(space->spacenum(), TRANSLATE_READ_DEBUG, curaddr))
diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp
index 0fc33d32f10..8faf4f0de02 100644
--- a/src/emu/debug/debugcon.cpp
+++ b/src/emu/debug/debugcon.cpp
@@ -399,8 +399,10 @@ CMDERR debugger_console::validate_command(const char *command)
void debugger_console::register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function<void(int, const std::vector<std::string> &)> handler)
{
- assert_always(m_machine.phase() == machine_phase::INIT, "Can only call register_command() at init time!");
- assert_always((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0, "Cannot call register_command() when debugger is not running");
+ if (m_machine.phase() != machine_phase::INIT)
+ throw emu_fatalerror("Can only call debugger_console::register_command() at init time!");
+ if (!(m_machine.debug_flags & DEBUG_FLAG_ENABLED))
+ throw emu_fatalerror("Cannot call debugger_console::register_command() when debugger is not running");
debug_command *cmd = auto_alloc_clear(m_machine, <debug_command>());
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index 69417db74db..953e89dc42c 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -27,26 +27,27 @@
//**************************************************************************
const image_device_type_info device_image_interface::m_device_info_array[] =
{
- { IO_UNKNOWN, "unknown", "unkn" },
- { IO_CARTSLOT, "cartridge", "cart" }, /* 0 */
- { IO_FLOPPY, "floppydisk", "flop" }, /* 1 */
- { IO_HARDDISK, "harddisk", "hard" }, /* 2 */
- { IO_CYLINDER, "cylinder", "cyln" }, /* 3 */
- { IO_CASSETTE, "cassette", "cass" }, /* 4 */
- { IO_PUNCHCARD, "punchcard", "pcrd" }, /* 5 */
- { IO_PUNCHTAPE, "punchtape", "ptap" }, /* 6 */
- { IO_PRINTER, "printout", "prin" }, /* 7 */
- { IO_SERIAL, "serial", "serl" }, /* 8 */
- { IO_PARALLEL, "parallel", "parl" }, /* 9 */
- { IO_SNAPSHOT, "snapshot", "dump" }, /* 10 */
- { IO_QUICKLOAD, "quickload", "quik" }, /* 11 */
- { IO_MEMCARD, "memcard", "memc" }, /* 12 */
- { IO_CDROM, "cdrom", "cdrm" }, /* 13 */
- { IO_MAGTAPE, "magtape", "magt" }, /* 14 */
- { IO_ROM, "romimage", "rom" }, /* 15 */
- { IO_MIDIIN, "midiin", "min" }, /* 16 */
- { IO_MIDIOUT, "midiout", "mout" }, /* 17 */
- { IO_PICTURE, "picture", "pic" } /* 18 */
+ { IO_UNKNOWN, "unknown", "unkn" }, /* 0 */
+ { IO_CARTSLOT, "cartridge", "cart" }, /* 1 */
+ { IO_FLOPPY, "floppydisk", "flop" }, /* 2 */
+ { IO_HARDDISK, "harddisk", "hard" }, /* 3 */
+ { IO_CYLINDER, "cylinder", "cyln" }, /* 4 */
+ { IO_CASSETTE, "cassette", "cass" }, /* 5 */
+ { IO_PUNCHCARD, "punchcard", "pcrd" }, /* 6 */
+ { IO_PUNCHTAPE, "punchtape", "ptap" }, /* 7 */
+ { IO_PRINTER, "printout", "prin" }, /* 8 */
+ { IO_SERIAL, "serial", "serl" }, /* 9 */
+ { IO_PARALLEL, "parallel", "parl" }, /* 10 */
+ { IO_SNAPSHOT, "snapshot", "dump" }, /* 11 */
+ { IO_QUICKLOAD, "quickload", "quik" }, /* 12 */
+ { IO_MEMCARD, "memcard", "memc" }, /* 13 */
+ { IO_CDROM, "cdrom", "cdrm" }, /* 14 */
+ { IO_MAGTAPE, "magtape", "magt" }, /* 15 */
+ { IO_ROM, "romimage", "rom" }, /* 16 */
+ { IO_MIDIIN, "midiin", "min" }, /* 17 */
+ { IO_MIDIOUT, "midiout", "mout" }, /* 18 */
+ { IO_PICTURE, "picture", "pic" }, /* 19 */
+ { IO_VIDEO, "vidfile", "vid" } /* 20 */
};
@@ -625,7 +626,8 @@ bool device_image_interface::support_command_line_image_creation() const
void device_image_interface::battery_load(void *buffer, int length, int fill)
{
- assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
+ if (!buffer || (length <= 0))
+ throw emu_fatalerror("device_image_interface::battery_load: Must specify sensical buffer/length");
osd_file::error filerr;
int bytes_read = 0;
@@ -643,7 +645,8 @@ void device_image_interface::battery_load(void *buffer, int length, int fill)
void device_image_interface::battery_load(void *buffer, int length, void *def_buffer)
{
- assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
+ if (!buffer || (length <= 0))
+ throw emu_fatalerror("device_image_interface::battery_load: Must specify sensical buffer/length");
osd_file::error filerr;
int bytes_read = 0;
@@ -670,7 +673,8 @@ void device_image_interface::battery_load(void *buffer, int length, void *def_bu
void device_image_interface::battery_save(const void *buffer, int length)
{
- assert_always(buffer && (length > 0), "Must specify sensical buffer/length");
+ if (!buffer || (length <= 0))
+ throw emu_fatalerror("device_image_interface::battery_save: Must specify sensical buffer/length");
if (!device().machine().options().nvram_save())
return;
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index fb2a317d60a..437546f27c6 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -51,7 +51,8 @@ enum iodevice_t
IO_MIDIIN, /* 17 - MIDI In port */
IO_MIDIOUT, /* 18 - MIDI Out port */
IO_PICTURE, /* 19 - A single-frame image */
- IO_COUNT /* 20 - Total Number of IO_devices for searching */
+ IO_VIDEO, /* 20 - A video file */
+ IO_COUNT /* 21 - Total Number of IO_devices for searching */
};
enum image_error_t
@@ -243,7 +244,7 @@ protected:
void clear_error();
- void check_for_file() const { assert_always(m_file, "Illegal operation on unmounted image"); }
+ void check_for_file() const { if (!m_file) throw emu_fatalerror("%s(%s): Illegal operation on unmounted image", device().shortname(), device().tag()); }
void setup_working_directory();
bool try_change_working_directory(const std::string &subdir);
diff --git a/src/emu/dinetwork.cpp b/src/emu/dinetwork.cpp
index cc1c4402759..0e9c0610566 100644
--- a/src/emu/dinetwork.cpp
+++ b/src/emu/dinetwork.cpp
@@ -31,7 +31,8 @@ void device_network_interface::interface_post_start()
int device_network_interface::send(u8 *buf, int len)
{
// TODO: enable this check when other devices implement delayed transmit
- //assert_always(!m_send_timer->enabled(), "attempted to transmit while transmit already in progress");
+ //if (m_send_timer->enabled())
+ //throw emu_fatalerror("%s(%s): attempted to transmit while transmit already in progress", device().shortname(), device().tag());
int result = 0;
@@ -65,7 +66,8 @@ TIMER_CALLBACK_MEMBER(device_network_interface::send_complete)
void device_network_interface::recv_cb(u8 *buf, int len)
{
- assert_always(!m_recv_timer->enabled(), "attempted to receive while receive already in progress");
+ if (m_recv_timer->enabled())
+ throw emu_fatalerror("%s(%s): attempted to receive while receive already in progress", device().shortname(), device().tag());
int result = 0;
diff --git a/src/emu/dipalette.cpp b/src/emu/dipalette.cpp
index 76c0c0f1c82..b5ceeb05d4c 100644
--- a/src/emu/dipalette.cpp
+++ b/src/emu/dipalette.cpp
@@ -345,7 +345,8 @@ void device_palette_interface::allocate_palette(u32 numentries)
m_shadow_group = numgroups++;
if (palette_hilights_enabled())
m_hilight_group = numgroups++;
- assert_always(numentries * numgroups <= 65536, "Palette has more than 65536 colors.");
+ if (numentries * numgroups > 65536)
+ throw emu_fatalerror("%s(%s): Palette has more than 65536 colors.", device().shortname(), device().tag());
// allocate a palette object containing all the colors and groups
m_palette = palette_t::alloc(numentries, numgroups);
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index 07a48404ab3..4c8b9c96056 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -220,18 +220,6 @@ inline TYPE &operator|=(TYPE &a, TYPE b) { return a = a | b; }
#define FUNC(x) &x, #x
-// standard assertion macros
-#undef assert_always
-
-#if defined(MAME_DEBUG_FAST)
-#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("%s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
-#elif defined(MAME_DEBUG)
-#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("%s\nCaused by assert: %s:%d: %s", msg, __FILE__, __LINE__, #x); } while (0)
-#else
-#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("%s (%s:%d)", msg, __FILE__, __LINE__); } while (0)
-#endif
-
-
// macros to convert radians to degrees and degrees to radians
template <typename T> constexpr auto RADIAN_TO_DEGREE(T const &x) { return (180.0 / M_PI) * x; }
template <typename T> constexpr auto DEGREE_TO_RADIAN(T const &x) { return (M_PI / 180.0) * x; }
diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp
index f401a4b8cb4..6d0955f3484 100644
--- a/src/emu/emupal.cpp
+++ b/src/emu/emupal.cpp
@@ -506,7 +506,8 @@ void palette_device::device_start()
const memory_share *share_ext = memshare(tag_ext.c_str());
// make sure we have specified a format
- assert_always(m_raw_to_rgb.bytes_per_entry() > 0, "Palette has memory share but no format specified");
+ if (m_raw_to_rgb.bytes_per_entry() <= 0)
+ throw emu_fatalerror("palette_device(%s): Palette has memory share but no format specified", tag());
// determine bytes per entry and configure
int bytes_per_entry = m_raw_to_rgb.bytes_per_entry();
@@ -522,7 +523,8 @@ void palette_device::device_start()
if (m_membits_supplied)
{
// forcing width only makes sense when narrower than the native bus width
- assert_always(m_membits < share->bitwidth(), "Improper use of MCFG_PALETTE_MEMBITS");
+ if (m_membits >= share->bitwidth())
+ throw emu_fatalerror("palette_device(%s): Improper use of MCFG_PALETTE_MEMBITS", tag());
m_paletteram.set_membits(m_membits);
if (share_ext != nullptr)
m_paletteram_ext.set_membits(m_membits);
@@ -532,7 +534,8 @@ void palette_device::device_start()
if (m_endianness_supplied)
{
// forcing endianness only makes sense when the RAM is narrower than the palette format and not split
- assert_always((share_ext == nullptr && m_paletteram.membits() / 8 < bytes_per_entry), "Improper use of MCFG_PALETTE_ENDIANNESS");
+ if (share_ext || (m_paletteram.membits() / 8) >= bytes_per_entry)
+ throw emu_fatalerror("palette_device(%s): Improper use of MCFG_PALETTE_ENDIANNESS", tag());
m_paletteram.set_endianness(m_endianness);
}
}
diff --git a/src/emu/inputdev.cpp b/src/emu/inputdev.cpp
index 62aa1428b21..a9e8fee7491 100644
--- a/src/emu/inputdev.cpp
+++ b/src/emu/inputdev.cpp
@@ -277,7 +277,8 @@ input_device::~input_device()
input_item_id input_device::add_item(const char *name, input_item_id itemid, item_get_state_func getstate, void *internal)
{
- assert_always(machine().phase() == machine_phase::INIT, "Can only call input_device::add_item at init time!");
+ if (machine().phase() != machine_phase::INIT)
+ throw emu_fatalerror("Can only call input_device::add_item at init time!");
assert(name != nullptr);
assert(itemid > ITEM_ID_INVALID && itemid < ITEM_ID_MAXIMUM);
assert(getstate != nullptr);
@@ -494,7 +495,8 @@ input_class::~input_class()
input_device *input_class::add_device(const char *name, const char *id, void *internal)
{
- assert_always(machine().phase() == machine_phase::INIT, "Can only call input_class::add_device at init time!");
+ if (machine().phase() != machine_phase::INIT)
+ throw emu_fatalerror("Can only call input_class::add_device at init time!");
assert(name != nullptr);
assert(id != nullptr);
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index c65a5cb582b..e74502439fe 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -1468,7 +1468,8 @@ ioport_field *ioport_port::field(ioport_value mask) const
ioport_value ioport_port::read()
{
- assert_always(manager().safe_to_read(), "Input ports cannot be read at init time!");
+ if (!manager().safe_to_read())
+ throw emu_fatalerror("Input ports cannot be read at init time!");
// start with the digital state
ioport_value result = m_live->digital;
@@ -2716,7 +2717,8 @@ void ioport_manager::record_init()
// open the record file
osd_file::error filerr = m_record_file.open(filename);
- assert_always(filerr == osd_file::error::NONE, "Failed to open file for recording");
+ if (filerr != osd_file::error::NONE)
+ throw emu_fatalerror("ioport_manager::record_init: Failed to open file for recording");
// get the base time
system_time systime;
@@ -2738,15 +2740,18 @@ void ioport_manager::record_init()
}
-void ioport_manager::timecode_init() {
+void ioport_manager::timecode_init()
+{
// check if option -record_timecode is enabled
- if (!machine().options().record_timecode()) {
+ if (!machine().options().record_timecode())
+ {
machine().video().set_timecode_enabled(false);
return;
}
// if no file, nothing to do
const char *record_filename = machine().options().record();
- if (record_filename[0] == 0) {
+ if (record_filename[0] == 0)
+ {
machine().video().set_timecode_enabled(false);
return;
}
@@ -2759,7 +2764,8 @@ void ioport_manager::timecode_init() {
osd_printf_info("Record input timecode file: %s\n", record_filename);
osd_file::error filerr = m_timecode_file.open(filename.c_str());
- assert_always(filerr == osd_file::error::NONE, "Failed to open file for input timecode recording");
+ if (filerr != osd_file::error::NONE)
+ throw emu_fatalerror("ioport_manager::timecode_init: Failed to open file for input timecode recording");
m_timecode_file.puts(std::string("# ==========================================\n").c_str());
m_timecode_file.puts(std::string("# TIMECODE FILE FOR VIDEO PREVIEW GENERATION\n").c_str());
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 0ca233a5d38..68bf7dc74d9 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -299,7 +299,8 @@ int running_machine::run(bool quiet)
{
m_logfile = std::make_unique<emu_file>(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
osd_file::error filerr = m_logfile->open("error.log");
- assert_always(filerr == osd_file::error::NONE, "unable to open log file");
+ if (filerr != osd_file::error::NONE)
+ throw emu_fatalerror("running_machine::run: unable to open log file");
using namespace std::placeholders;
add_logerror_callback(std::bind(&running_machine::logfile_callback, this, _1));
@@ -771,9 +772,10 @@ void running_machine::toggle_pause()
void running_machine::add_notifier(machine_notification event, machine_notify_delegate callback, bool first)
{
- assert_always(m_current_phase == machine_phase::INIT, "Can only call add_notifier at init time!");
+ if (m_current_phase != machine_phase::INIT)
+ throw emu_fatalerror("Can only call running_machine::add_notifier at init time!");
- if(first)
+ if (first)
m_notifier_list[event].push_front(std::make_unique<notifier_callback_item>(callback));
// exit notifiers are added to the head, and executed in reverse order
@@ -793,8 +795,9 @@ void running_machine::add_notifier(machine_notification event, machine_notify_de
void running_machine::add_logerror_callback(logerror_callback callback)
{
- assert_always(m_current_phase == machine_phase::INIT, "Can only call add_logerror_callback at init time!");
- m_string_buffer.reserve(1024);
+ if (m_current_phase != machine_phase::INIT)
+ throw emu_fatalerror("Can only call running_machine::add_logerror_callback at init time!");
+ m_string_buffer.reserve(1024);
m_logerror_list.push_back(std::make_unique<logerror_callback_item>(callback));
}
diff --git a/src/emu/natkeyboard.h b/src/emu/natkeyboard.h
index d8cc9cfb8ff..41b33ace105 100644
--- a/src/emu/natkeyboard.h
+++ b/src/emu/natkeyboard.h
@@ -72,8 +72,8 @@ private:
// internal keyboard code information
struct keycode_map_entry
{
- std::array<ioport_field *, SHIFT_COUNT + 1> field;
- unsigned shift;
+ std::array<ioport_field *, SHIFT_COUNT + 1> field;
+ unsigned shift;
};
typedef std::unordered_map<char32_t, keycode_map_entry> keycode_map;
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 415906b3809..58d2c2961c9 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -460,7 +460,8 @@ void render_texture::get_scaled(u32 dwidth, u32 dheight, render_texinfo &texinfo
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
lowest = scalenum;
- assert_always(lowest != -1, "Too many live texture instances!");
+ if (-1 == lowest)
+ throw emu_fatalerror("render_texture::get_scaled: Too many live texture instances!");
// throw out any existing entries
scaled = &m_scaled[lowest];
@@ -2711,7 +2712,8 @@ bool render_target::remove_clear_extent(const render_bounds &bounds)
// make a copy of this extent
memmove(&ext[ext[1] + 2], &ext[0], (last - ext) * sizeof(*ext));
last += ext[1] + 2;
- assert_always(last < max, "Ran out of clear extents!\n");
+ if (last >= max)
+ throw emu_fatalerror("render_target::remove_clear_extent: Ran out of clear extents!");
// split the extent between pieces
ext[ext[1] + 2] = -(-ext[0] - diff);
@@ -2731,7 +2733,8 @@ bool render_target::remove_clear_extent(const render_bounds &bounds)
// make a copy of this extent
memmove(&ext[ext[1] + 2], &ext[0], (last - ext) * sizeof(*ext));
last += ext[1] + 2;
- assert_always(last < max, "Ran out of clear extents!\n");
+ if (last >= max)
+ throw emu_fatalerror("render_target::remove_clear_extent: Ran out of clear extents!");
// split the extent between pieces
ext[ext[1] + 2] = -diff;
@@ -2756,7 +2759,8 @@ bool render_target::remove_clear_extent(const render_bounds &bounds)
memmove(&xext[2], &xext[0], (last - xext) * sizeof(*xext));
last += 2;
linelast += 2;
- assert_always(last < max, "Ran out of clear extents!\n");
+ if (last >= max)
+ throw emu_fatalerror("render_target::remove_clear_extent: Ran out of clear extents!");
// split this extent into three parts
xext[0] = boundsx0 - x0;
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 98d049be8ae..0ae11f85b9b 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -209,6 +209,7 @@ public:
void set_native_aspect() { assert(!configured()); m_phys_aspect = std::make_pair(~0U, ~0U); }
void set_raw(u32 pixclock, u16 htotal, u16 hbend, u16 hbstart, u16 vtotal, u16 vbend, u16 vbstart)
{
+ assert(pixclock != 0);
m_clock = pixclock;
m_refresh = HZ_TO_ATTOSECONDS(pixclock) * htotal * vtotal;
m_vblank = m_refresh / vtotal * (vtotal - (vbstart - vbend));
diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp
index df63d06c5c8..083b4b4ef5a 100644
--- a/src/emu/tilemap.cpp
+++ b/src/emu/tilemap.cpp
@@ -9,9 +9,10 @@
***************************************************************************/
#include "emu.h"
-#include "screen.h"
#include "tilemap.h"
+#include "screen.h"
+
//**************************************************************************
// INLINE FUNCTIONS
@@ -896,7 +897,6 @@ u8 tilemap_t::tile_apply_bitmask(const u8 *maskdata, u32 x0, u32 y0, u8 category
void tilemap_t::configure_blit_parameters(blit_parameters &blit, bitmap_ind8 &priority_bitmap, const rectangle &cliprect, u32 flags, u8 priority, u8 priority_mask)
{
// set the target bitmap
- assert(priority_bitmap.cliprect().contains(cliprect));
blit.priority = &priority_bitmap;
blit.cliprect = cliprect;
@@ -947,6 +947,8 @@ void tilemap_t::draw_common(screen_device &screen, _BitmapClass &dest, const rec
g_profiler.start(PROFILER_TILEMAP_DRAW);
// configure the blit parameters based on the input parameters
+ assert(dest.cliprect().contains(cliprect));
+ assert(screen.cliprect().contains(cliprect));
blit_parameters blit;
configure_blit_parameters(blit, screen.priority(), cliprect, flags, priority, priority_mask);
@@ -1082,6 +1084,8 @@ void tilemap_t::draw_roz_common(screen_device &screen, _BitmapClass &dest, const
g_profiler.start(PROFILER_TILEMAP_DRAW_ROZ);
// configure the blit parameters
+ assert(dest.cliprect().contains(cliprect));
+ assert(screen.cliprect().contains(cliprect));
blit_parameters blit;
configure_blit_parameters(blit, screen.priority(), cliprect, flags, priority, priority_mask);
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index 185311c389a..a116f019c6c 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -298,11 +298,11 @@
***************************************************************************/
-#pragma once
-
#ifndef MAME_EMU_TILEMAP_H
#define MAME_EMU_TILEMAP_H
+#pragma once
+
//**************************************************************************
// CONSTANTS
diff --git a/src/emu/video/generic.cpp b/src/emu/video/generic.cpp
index 44d8f124a38..b43c9d8fa9d 100644
--- a/src/emu/video/generic.cpp
+++ b/src/emu/video/generic.cpp
@@ -143,9 +143,9 @@ const gfx_layout gfx_16x16x4_packed_lsb =
GFXLAYOUT_RAW(gfx_16x16x8_raw, 16, 16, 16*8, 16*16*8);
/*
- 16x16; grouped of 4 8x8 tiles (row align)
- 0 1
- 2 3
+ 16x16; grouped of 4 8x8 tiles (row align)
+ 0 1
+ 2 3
*/
const gfx_layout gfx_8x8x4_row_2x2_group_packed_msb =
{
@@ -173,9 +173,9 @@ const gfx_layout gfx_8x8x4_row_2x2_group_packed_lsb =
};
/*
- 16x16; grouped of 4 8x8 tiles (col align)
- 0 2
- 1 3
+ 16x16; grouped of 4 8x8 tiles (col align)
+ 0 2
+ 1 3
*/
const gfx_layout gfx_8x8x4_col_2x2_group_packed_msb =
{
diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp
index 5a0f52b0819..e0b6c0c2229 100644
--- a/src/emu/xtal.cpp
+++ b/src/emu/xtal.cpp
@@ -331,7 +331,7 @@ const double XTAL::known_xtals[] = {
29'491'200, /* 29.4912_MHz_XTAL Xerox Alto-II system clock (tagged 29.4MHz in the schematics) */
30'000'000, /* 30_MHz_XTAL Impera Magic Card */
30'209'800, /* 30.2098_MHz_XTAL Philips CD-i NTSC (1920x NTSC line rate) */
- 30'476'100, /* 30.4761_MHz_XTAL Taito JC */
+ 30'476'180, /* 30.47618_MHz_XTAL Taito F3, JC, Under Fire */
30'800'000, /* 30.8_MHz_XTAL 15IE-00-013 */
31'279'500, /* 31.2795_MHz_XTAL Wyse WY-30+ */
31'684'000, /* 31.684_MHz_XTAL TeleVideo TVI-955 132-column display clock */