diff options
author | 2010-06-08 06:09:57 +0000 | |
---|---|---|
committer | 2010-06-08 06:09:57 +0000 | |
commit | 100564d41225bfd2fa163c0174557ed979285b4e (patch) | |
tree | 0be83fbde1ddb95633293c9faee60d0f2bc6ace1 /src/emu/ui.c | |
parent | 962dca9f57d61cdea65ee32c6362bf3d0d1e2dae (diff) |
WARNING: There are likely to be regressions in both functionality and
performance as a result of this change. Do not panic; report issues to the
list in the short term and I will look into them. There are probably also
some details I forgot to mention. Please ask questions if anything is not
clear.
NOTE: This is a major internal change to the way devices are handled in
MAME. There is a small impact on drivers, but the bulk of the changes are
to the devices themselves. Full documentation on the new device handling
is in progress at http://mamedev.org/devwiki/index.php/MAME_Device_Basics
Defined two new casting helpers: [Aaron Giles]
downcast<type>(value) should be used for safe and efficient downcasting
from a base class to a derived class. It wraps static_cast<> by adding
an assert that a matching dynamic_cast<> returns the same result in
debug builds.
crosscast<type>(value) should be used for safe casting from one type to
another in multiple inheritance scenarios. It compiles to a
dynamic_cast<> plus an assert on the result. Since it does not optimize
down to static_cast<>, you should prefer downcast<> over crosscast<>
when you can.
Redefined running_device to be a proper C++ class (now called device_t).
Same for device_config (still called device_config). All devices and
device_configs must now be derived from these base classes. This means
each device type now has a pair of its own unique classes that describe
the device. Drivers are encouraged to use the specific device types
instead of the generic running_device or device_t classes. Drivers that
have a state class defined in their header file are encouraged to use
initializers off the constructor to locate devices. [Aaron Giles]
Removed the following fields from the device and device configuration
classes as they never were necessary or provided any use: device class,
device family, source file, version, credits. [Aaron Giles]
Added templatized variant of machine->device() which performs a downcast
as part of the device fetch. Thus machine->device<timer_device>("timer")
will locate a device named "timer", downcast it to a timer_device, and
assert if the downcast fails. [Aaron Giles]
Removed most publically accessible members of running_device/device_t in
favor of inline accessor functions. The only remaining public member is
machine. Thus all references to device->type are now device->type(), etc.
[Aaron Giles]
Created a number of device interface classes which are designed to be mix-
ins for the device classes, providing specific extended functionality and
information. There are standard interface classes for sound, execution,
state, nvram, memory, and disassembly. Devices can opt into 0 or more of
these classes. [Aaron Giles]
Converted the classic CPU device to a standard device that uses the
execution, state, memory, and disassembly interfaces. Used this new class
(cpu_device) to implement the existing CPU device interface. In the future
it will be possible to convert each CPU core to its own device type, but
for now they are still all CPU devices with a cpu_type() that specifies
exactly which kind of CPU. [Aaron Giles]
Created a new header devlegcy.h which wraps the old device interface using
some special template classes. To use these with an existing device,
simply remove from the device header the DEVICE_GET_INFO() declaration and
the #define mapping the ALL_CAPS name to the DEVICE_GET_INFO. In their
place #include "devlegcy.h" and use the DECLARE_LEGACY_DEVICE() macro.
In addition, there is a DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping
existing sound devices into new-style devices, and a
DECLARE_LEGACY_NVRAM_DEVICE() for wrapping NVRAM devices. Also moved the
token and inline_config members to the legacy device class, as these are
not used in modern devices. [Aaron Giles]
Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER)
from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to
simply SCREEN. The various global functions that were previously used to
access information or modify the state of these devices are now replaced
by methods on the device classes. Specifically:
video_screen_configure() == screen->configure()
video_screen_set_visarea() == screen->set_visible_area()
video_screen_update_partial() == screen->update_partial()
video_screen_update_now() == screen->update_now()
video_screen_get_vpos() == screen->vpos()
video_screen_get_hpos() == screen->hpos()
video_screen_get_vblank() == screen->vblank()
video_screen_get_hblank() == screen->hblank()
video_screen_get_width() == screen->width()
video_screen_get_height() == screen->height()
video_screen_get_visible_area() == screen->visible_area()
video_screen_get_time_until_pos() == screen->time_until_pos()
video_screen_get_time_until_vblank_start() ==
screen->time_until_vblank_start()
video_screen_get_time_until_vblank_end() ==
screen->time_until_vblank_end()
video_screen_get_time_until_update() == screen->time_until_update()
video_screen_get_scan_period() == screen->scan_period()
video_screen_get_frame_period() == screen->frame_period()
video_screen_get_frame_number() == screen->frame_number()
timer_device_adjust_oneshot() == timer->adjust()
timer_device_adjust_periodic() == timer->adjust()
timer_device_reset() == timer->reset()
timer_device_enable() == timer->enable()
timer_device_enabled() == timer->enabled()
timer_device_get_param() == timer->param()
timer_device_set_param() == timer->set_param()
timer_device_get_ptr() == timer->get_ptr()
timer_device_set_ptr() == timer->set_ptr()
timer_device_timeelapsed() == timer->time_elapsed()
timer_device_timeleft() == timer->time_left()
timer_device_starttime() == timer->start_time()
timer_device_firetime() == timer->fire_time()
Updated all drivers that use the above functions to fetch the specific
device type (timer_device or screen_device) and call the appropriate
method. [Aaron Giles]
Changed machine->primary_screen and the 'screen' parameter to VIDEO_UPDATE
to specifically pass in a screen_device object. [Aaron Giles]
Defined a new custom interface for the Z80 daisy chain. This interface
behaves like the standard interfaces, and can be added to any device that
implements the Z80 daisy chain behavior. Converted all existing Z80 daisy
chain devices to new-style devices that inherit this interface.
[Aaron Giles]
Changed the way CPU state tables are built up. Previously, these were data
structures defined by a CPU core which described all the registers and how
to output them. This functionality is now part of the state interface and
is implemented via the device_state_entry class. Updated all CPU cores
which were using the old data structure to use the new form. The syntax is
currently awkward, but will be cleaner for CPUs that are native new
devices. [Aaron Giles]
Converted the okim6295 and eeprom devices to the new model. These were
necessary because they both require multiple interfaces to operate and it
didn't make sense to create legacy device templates for these single cases.
(okim6295 needs the sound interface and the memory interface, while eeprom
requires both the nvram and memory interfaces). [Aaron Giles]
Changed parameters in a few callback functions from pointers to references
in situations where they are guaranteed to never be NULL. [Aaron Giles]
Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU. Changed
it to MDRV_DEVICE_DISABLE() instead. Updated drivers. [Aaron Giles]
Reorganized the token parsing for machine configurations. The core parsing
code knows how to create/replace/remove devices, but all device token
parsing is now handled in the device_config class, which in turn will make
use of any interface classes or device-specific token handling for custom
token processing. [Aaron Giles]
Moved many validity checks out of validity.c and into the device interface
classes. For example, address space validation is now part of the memory
interface class. [Aaron Giles]
Consolidated address space parameters (bus width, endianness, etc.) into
a single address_space_config class. Updated all code that queried for
address space parameters to use the new mechanism. [Aaron Giles]
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 150 |
1 files changed, 73 insertions, 77 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index 439607f33c8..1703e1f1080 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -165,8 +165,8 @@ static INT32 slider_overxoffset(running_machine *machine, void *arg, astring *st static INT32 slider_overyoffset(running_machine *machine, void *arg, astring *string, INT32 newval); static INT32 slider_flicker(running_machine *machine, void *arg, astring *string, INT32 newval); static INT32 slider_beam(running_machine *machine, void *arg, astring *string, INT32 newval); -static char *slider_get_screen_desc(running_device *screen); -static char *slider_get_laserdisc_desc(running_device *screen); +static char *slider_get_screen_desc(screen_device &screen); +static char *slider_get_laserdisc_desc(device_t *screen); #ifdef MAME_DEBUG static INT32 slider_crossscale(running_machine *machine, void *arg, astring *string, INT32 newval); static INT32 slider_crossoffset(running_machine *machine, void *arg, astring *string, INT32 newval); @@ -1002,9 +1002,9 @@ static astring &warnings_string(running_machine *machine, astring &string) astring &game_info_astring(running_machine *machine, astring &string) { - int scrcount = video_screen_count(machine->config); - running_device *scandevice; - running_device *device; + int scrcount = screen_count(*machine->config); + device_t *scandevice; + device_t *device; int found_sound = FALSE; int count; @@ -1015,13 +1015,13 @@ astring &game_info_astring(running_machine *machine, astring &string) for (device = machine->firstcpu; device != NULL; device = scandevice) { /* get cpu specific clock that takes internal multiplier/dividers into account */ - int clock = cpu_get_clock(device); + int clock = device->clock(); /* count how many identical CPUs we have */ count = 1; for (scandevice = device->typenext(); scandevice != NULL; scandevice = scandevice->typenext()) { - if (cpu_get_type(device) != cpu_get_type(scandevice) || device->clock != scandevice->clock) + if (cpu_get_type(device) != cpu_get_type(scandevice) || device->clock() != scandevice->clock()) break; count++; } @@ -1039,7 +1039,8 @@ astring &game_info_astring(running_machine *machine, astring &string) } /* loop over all sound chips */ - for (device = sound_first(machine); device != NULL; device = scandevice) + device_sound_interface *sound; + for (bool gotone = machine->devicelist.first(sound); gotone; gotone = sound->next(sound)) { /* append the Sound: string */ if (!found_sound) @@ -1048,23 +1049,26 @@ astring &game_info_astring(running_machine *machine, astring &string) /* count how many identical sound chips we have */ count = 1; - for (scandevice = device->typenext(); scandevice != NULL; scandevice = scandevice->typenext()) + device_sound_interface *scan = sound; + for (bool gotanother = scan->next(scan); gotanother; gotanother = scan->next(scan)) { - if (sound_get_type(device) != sound_get_type(scandevice) || device->clock != scandevice->clock) + if (sound->device().type() != scan->device().type() || sound->device().clock() != scan->device().clock()) break; count++; + sound = scan; } /* if more than one, prepend a #x in front of the CPU name */ if (count > 1) string.catprintf("%d" UTF8_MULTIPLY, count); - string.cat(device->name()); + string.cat(sound->device().name()); /* display clock in kHz or MHz */ - if (device->clock >= 1000000) - string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", device->clock / 1000000, device->clock % 1000000); - else if (device->clock != 0) - string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", device->clock / 1000, device->clock % 1000); + int clock = sound->device().clock(); + if (clock >= 1000000) + string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); + else if (clock != 0) + string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); else string.cat("\n"); } @@ -1075,27 +1079,25 @@ astring &game_info_astring(running_machine *machine, astring &string) string.cat("None\n"); else { - for (running_device *screen = video_screen_first(machine); screen != NULL; screen = video_screen_next(screen)) + for (screen_device *screen = screen_first(*machine); screen != NULL; screen = screen_next(screen)) { - const screen_config *scrconfig = (const screen_config *)screen->baseconfig().inline_config; - if (scrcount > 1) { - string.cat(slider_get_screen_desc(screen)); + string.cat(slider_get_screen_desc(*screen)); string.cat(": "); } - if (scrconfig->type == SCREEN_TYPE_VECTOR) + if (screen->screen_type() == SCREEN_TYPE_VECTOR) string.cat("Vector\n"); else { - const rectangle *visarea = video_screen_get_visible_area(screen); + const rectangle &visarea = screen->visible_area(); string.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", - visarea->max_x - visarea->min_x + 1, - visarea->max_y - visarea->min_y + 1, + visarea.max_x - visarea.min_x + 1, + visarea.max_y - visarea.min_y + 1, (machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H", - ATTOSECONDS_TO_HZ(video_screen_get_frame_period(screen).attoseconds)); + ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); } } } @@ -1590,7 +1592,7 @@ static slider_state *slider_init(running_machine *machine) { const input_field_config *field; const input_port_config *port; - running_device *device; + device_t *device; slider_state *listhead = NULL; slider_state **tailptr = &listhead; astring string; @@ -1616,7 +1618,7 @@ static slider_state *slider_init(running_machine *machine) } /* add analog adjusters */ - for (port = machine->portlist.first(); port != NULL; port = port->next) + for (port = machine->portlist.first(); port != NULL; port = port->next()) for (field = port->fieldlist; field != NULL; field = field->next) if (field->type == IPT_ADJUSTER) { @@ -1638,52 +1640,51 @@ static slider_state *slider_init(running_machine *machine) } /* add screen parameters */ - for (device = video_screen_first(machine); device != NULL; device = video_screen_next(device)) + for (screen_device *screen = screen_first(*machine); screen != NULL; screen = screen_next(screen)) { - const screen_config *scrconfig = (const screen_config *)device->baseconfig().inline_config; - int defxscale = floor(scrconfig->xscale * 1000.0f + 0.5f); - int defyscale = floor(scrconfig->yscale * 1000.0f + 0.5f); - int defxoffset = floor(scrconfig->xoffset * 1000.0f + 0.5f); - int defyoffset = floor(scrconfig->yoffset * 1000.0f + 0.5f); - void *param = (void *)device; + int defxscale = floor(screen->config().xscale() * 1000.0f + 0.5f); + int defyscale = floor(screen->config().yscale() * 1000.0f + 0.5f); + int defxoffset = floor(screen->config().xoffset() * 1000.0f + 0.5f); + int defyoffset = floor(screen->config().yoffset() * 1000.0f + 0.5f); + void *param = (void *)screen; /* add refresh rate tweaker */ if (options_get_bool(mame_options(), OPTION_CHEAT)) { - string.printf("%s Refresh Rate", slider_get_screen_desc(device)); + string.printf("%s Refresh Rate", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, -10000, 0, 10000, 1000, slider_refresh, param); tailptr = &(*tailptr)->next; } /* add standard brightness/contrast/gamma controls per-screen */ - string.printf("%s Brightness", slider_get_screen_desc(device)); + string.printf("%s Brightness", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, 100, 1000, 2000, 10, slider_brightness, param); tailptr = &(*tailptr)->next; - string.printf("%s Contrast", slider_get_screen_desc(device)); + string.printf("%s Contrast", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, 100, 1000, 2000, 50, slider_contrast, param); tailptr = &(*tailptr)->next; - string.printf("%s Gamma", slider_get_screen_desc(device)); + string.printf("%s Gamma", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, 100, 1000, 3000, 50, slider_gamma, param); tailptr = &(*tailptr)->next; /* add scale and offset controls per-screen */ - string.printf("%s Horiz Stretch", slider_get_screen_desc(device)); - *tailptr = slider_alloc(machine, string, 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_xscale, param); + string.printf("%s Horiz Stretch", slider_get_screen_desc(*screen)); + *tailptr = slider_alloc(machine, string, 500, defxscale, 1500, 2, slider_xscale, param); tailptr = &(*tailptr)->next; - string.printf("%s Horiz Position", slider_get_screen_desc(device)); + string.printf("%s Horiz Position", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, -500, defxoffset, 500, 2, slider_xoffset, param); tailptr = &(*tailptr)->next; - string.printf("%s Vert Stretch", slider_get_screen_desc(device)); - *tailptr = slider_alloc(machine, string, 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_yscale, param); + string.printf("%s Vert Stretch", slider_get_screen_desc(*screen)); + *tailptr = slider_alloc(machine, string, 500, defyscale, 1500, 2, slider_yscale, param); tailptr = &(*tailptr)->next; - string.printf("%s Vert Position", slider_get_screen_desc(device)); + string.printf("%s Vert Position", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, string, -500, defyoffset, 500, 2, slider_yoffset, param); tailptr = &(*tailptr)->next; } for (device = machine->devicelist.first(LASERDISC); device != NULL; device = device->typenext()) { - const laserdisc_config *config = (const laserdisc_config *)device->baseconfig().inline_config; + const laserdisc_config *config = (const laserdisc_config *)downcast<const legacy_device_config_base &>(device->baseconfig()).inline_config(); if (config->overupdate != NULL) { int defxscale = floor(config->overscalex * 1000.0f + 0.5f); @@ -1708,10 +1709,8 @@ static slider_state *slider_init(running_machine *machine) } } - for (device = video_screen_first(machine); device != NULL; device = video_screen_next(device)) - { - const screen_config *scrconfig = (const screen_config *)device->baseconfig().inline_config; - if (scrconfig->type == SCREEN_TYPE_VECTOR) + for (screen_device *screen = screen_first(*machine); screen != NULL; screen = screen_next(screen)) + if (screen->screen_type() == SCREEN_TYPE_VECTOR) { /* add flicker control */ *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL); @@ -1720,11 +1719,10 @@ static slider_state *slider_init(running_machine *machine) tailptr = &(*tailptr)->next; break; } - } #ifdef MAME_DEBUG /* add crosshair adjusters */ - for (port = machine->portlist.first(); port != NULL; port = port->next) + for (port = machine->portlist.first(); port != NULL; port = port->next()) for (field = port->fieldlist; field != NULL; field = field->next) if (field->crossaxis != CROSSHAIR_AXIS_NONE && field->player == 0) { @@ -1801,7 +1799,7 @@ static INT32 slider_adjuster(running_machine *machine, void *arg, astring *strin static INT32 slider_overclock(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *cpu = (running_device *)arg; + device_t *cpu = (device_t *)arg; if (newval != SLIDER_NOCHANGE) cpu_set_clockscale(cpu, (float)newval * 0.001f); if (string != NULL) @@ -1816,22 +1814,20 @@ static INT32 slider_overclock(running_machine *machine, void *arg, astring *stri static INT32 slider_refresh(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; - const screen_config *scrconfig = (const screen_config *)screen->baseconfig().inline_config; - double defrefresh = ATTOSECONDS_TO_HZ(scrconfig->refresh); + screen_device *screen = reinterpret_cast<screen_device *>(arg); + double defrefresh = ATTOSECONDS_TO_HZ(screen->config().refresh()); double refresh; if (newval != SLIDER_NOCHANGE) { - int width = video_screen_get_width(screen); - int height = video_screen_get_height(screen); - const rectangle *visarea = video_screen_get_visible_area(screen); - - video_screen_configure(screen, width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001)); + int width = screen->width(); + int height = screen->height(); + const rectangle &visarea = screen->visible_area(); + screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001)); } if (string != NULL) - string->printf("%.3ffps", ATTOSECONDS_TO_HZ(video_screen_get_frame_period(machine->primary_screen).attoseconds)); - refresh = ATTOSECONDS_TO_HZ(video_screen_get_frame_period(machine->primary_screen).attoseconds); + string->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine->primary_screen->frame_period().attoseconds)); + refresh = ATTOSECONDS_TO_HZ(machine->primary_screen->frame_period().attoseconds); return floor((refresh - defrefresh) * 1000.0f + 0.5f); } @@ -1843,7 +1839,7 @@ static INT32 slider_refresh(running_machine *machine, void *arg, astring *string static INT32 slider_brightness(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1866,7 +1862,7 @@ static INT32 slider_brightness(running_machine *machine, void *arg, astring *str static INT32 slider_contrast(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1888,7 +1884,7 @@ static INT32 slider_contrast(running_machine *machine, void *arg, astring *strin static INT32 slider_gamma(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1911,7 +1907,7 @@ static INT32 slider_gamma(running_machine *machine, void *arg, astring *string, static INT32 slider_xscale(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1934,7 +1930,7 @@ static INT32 slider_xscale(running_machine *machine, void *arg, astring *string, static INT32 slider_yscale(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1957,7 +1953,7 @@ static INT32 slider_yscale(running_machine *machine, void *arg, astring *string, static INT32 slider_xoffset(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -1980,7 +1976,7 @@ static INT32 slider_xoffset(running_machine *machine, void *arg, astring *string static INT32 slider_yoffset(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *screen = (running_device *)arg; + screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container *container = render_container_get_screen(screen); render_container_user_settings settings; @@ -2003,7 +1999,7 @@ static INT32 slider_yoffset(running_machine *machine, void *arg, astring *string static INT32 slider_overxscale(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *laserdisc = (running_device *)arg; + device_t *laserdisc = (device_t *)arg; laserdisc_config settings; laserdisc_get_config(laserdisc, &settings); @@ -2025,7 +2021,7 @@ static INT32 slider_overxscale(running_machine *machine, void *arg, astring *str static INT32 slider_overyscale(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *laserdisc = (running_device *)arg; + device_t *laserdisc = (device_t *)arg; laserdisc_config settings; laserdisc_get_config(laserdisc, &settings); @@ -2047,7 +2043,7 @@ static INT32 slider_overyscale(running_machine *machine, void *arg, astring *str static INT32 slider_overxoffset(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *laserdisc = (running_device *)arg; + device_t *laserdisc = (device_t *)arg; laserdisc_config settings; laserdisc_get_config(laserdisc, &settings); @@ -2069,7 +2065,7 @@ static INT32 slider_overxoffset(running_machine *machine, void *arg, astring *st static INT32 slider_overyoffset(running_machine *machine, void *arg, astring *string, INT32 newval) { - running_device *laserdisc = (running_device *)arg; + device_t *laserdisc = (device_t *)arg; laserdisc_config settings; laserdisc_get_config(laserdisc, &settings); @@ -2119,13 +2115,13 @@ static INT32 slider_beam(running_machine *machine, void *arg, astring *string, I description for a given screen -------------------------------------------------*/ -static char *slider_get_screen_desc(running_device *screen) +static char *slider_get_screen_desc(screen_device &screen) { - int screen_count = video_screen_count(screen->machine->config); + int scrcount = screen_count(*screen.machine->config); static char descbuf[256]; - if (screen_count > 1) - sprintf(descbuf, "Screen '%s'", screen->tag()); + if (scrcount > 1) + sprintf(descbuf, "Screen '%s'", screen.tag()); else strcpy(descbuf, "Screen"); @@ -2138,7 +2134,7 @@ static char *slider_get_screen_desc(running_device *screen) description for a given laseridsc -------------------------------------------------*/ -static char *slider_get_laserdisc_desc(running_device *laserdisc) +static char *slider_get_laserdisc_desc(device_t *laserdisc) { int ldcount = laserdisc->machine->devicelist.count(LASERDISC); static char descbuf[256]; |