| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionality in favor of alternate mechanisms. Errors are
now reported via an astring rather than via callbacks. Every
option must now specify a type (command, integer, float, string,
boolean, etc). Command behavior has changed so that only one
command is permitted. [Aaron Giles]
Changed fileio system to accept just a raw searchpath instead of
an options/option name combination. [Aaron Giles]
Created emu_options class dervied from core_options which wraps
core emulator options. Added mechanisms to cleanly change the
system name and add/remove system-specific options, versus the
old way using callbacks. Also added read accessors for all the
options, to ensure consistency in how parameters are handled.
Changed most core systems to access emu_options instead of
core_options. Also changed machine->options() to return emu_options.
[Aaron Giles]
Created cli_options class derived from emu_options which adds the
command-line specific options. Updated clifront code to leverage
the new class and the new core behaviors. cli_execute() now accepts
a cli_options object when called. [Aaron Giles]
Updated both SDL and Windows to have their own options classes,
derived from cli_options, which add the OSD-specific options on
top of everything else. Added accessors for all the options so
that queries are strongly typed and simplified. [Aaron Giles]
Out of whatsnew: I've surely screwed up some stuff, though I have
smoke tested a bunch of things. Let me know if you hit anything odd.
Also I know this change will impact the WINUI stuff, please let me
know if there are issues. All the functionality necessary should
still be present. If it's not obvious, please talk to me before
adding stuff to the core_options class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to pass a core_options object to the constructor, along with
a search path. This required pushing either a running_machine
or a core_options through some code that wasn't previously
ready to handle it. emu_files can be reused over multiple
open/close sessions, and a lot of core code cleaned up
nicely as things were converted to them.
Also created a file_enumerator class for iterating over files
in a searchpath. This replaces the old mame_openpath functions.
Changed machine->options() to return a reference.
Removed public nvram_open() and fixed jchan/kaneko16 to
stop directly saving NVRAM.
Removed most of the mame_options() calls; this will soon go
away entirely, so don't add any more.
Added core_options to device_validity_check() so they can be
used to validate things.
|
| |
|
|
|
|
| |
data in order to better inform the user as to the reason their emulation may not work as expected. [Alex Jackson]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into one file, and separated the speaker device into its own file.
Generalized the concept of dynamically assigned inputs and re-wired the
speaker to work this way, so it is now treated just like any other
sound device. Added methods to the device_sound_interface for controlling
output gain and mapping device inputs/outputs to stream inputs/outputs.
Also made the sound_stream_update() method pure virtual, so all modern
sound devices must use the new mechanism for stream updates.
Primary changes outside of the core are:
stream_update(stream) == stream->update()
stream_create(device,...) == machine->sound().stream_alloc(*device,...)
sound_global_enable(machine,enable) == machine->sound().system_enable(enable)
Beyond this, the patterns are relatively obvious for the remaining calls.
|
| |
|
|
|
|
| |
GAME_MECHANICAL and change screen to red.
|
|
|
|
| |
UI to show a message when attempting to use a game with this flag.
|
|
|
|
|
| |
Converted global video routines into a video_manager.
Moved video manager initialization earlier in startup.
|
| |
|
|
|
|
| |
(found 1 case so far).
|
| |
|
|
|
|
|
| |
adds a small epsilon value to the wrap width to allow for FP computation
tweaks.
|
|
|
|
|
| |
Make UI backgrounds a bit more opaque.
Fix crash when passing NULL filename to OSD code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if it owns a given font (based on the name), and if it does, it is
responsible for generating bitmaps on the fly as characters are requested.
Added new option -uifont to specify the UI font. It can be set to a filename,
in which case a BDF font will be loaded. It can also be set to a font name
(assuming the OSD support is present), in which case the OSD font by that
name is used. The default value is 'default' which can be used by the OSD
to substitute a default font or by the OSD, which will default to ui.bdf
as before. In all cases, it falls back to the built-in font by default if
none of the previous options works.
On Windows, the OSD will default to Tahoma as the font name. Also on
Windows, font names can be specified with [b] to indicate bold or [i] to
indicate italic.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create a stack class that started the profiler in the constructor
and stopped it in the destructor). Sadly, doing that causes gcc to
call out to hook up the unwind chain, and this tanks performance
quite badly, even when the profiler is off.
Since I had already class-ified profiler.c, I decided to keep the old
way of doing things but wrap it in the newer classes. So at least it
wasn't a complete waste of my time.
Search & replace:
profiler_mark_start -> g_profiler.start
profiler_mark_end -> g_profiler.end
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cpu_get_clock -> device_get_clock
cpu_set_clock -> device_set_clock
cpu_get_clockscale -> device_get_clock_scale
cpu_set_clockscale -> device_set_clock_scale
Search: device_get_clock([ \t]*)\(([ \t]*)([^)]+)
Replace: \3->unscaled_clock\1\(\2
Search: device_set_clock([ \t]*)\(([ \t]*)([^,]+),[ \t]*
Replace: \3->set_unscaled_clock\1\(\2
Search: device_get_clock_scale([ \t]*)\(([ \t]*)([^)]+)
Replace: \3->clock_scale\1\(\2
Search: device_set_clock_scale([ \t]*)\(([ \t]*)([^,]+),[ \t]*
Replace: \3->set_clock_scale\1\(\2
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
devices. Debugger now creates one for each device. C++-ified most
debugger operations to hang off the debugging class, and updated
most callers. This still needs a little cleanup, but it fixes most
issues introduced when the CPUs were moved to their own devices.
Got rid of cpu_count, cpu_first, cpu_next, etc. as they were badly
broken. Also removed cpu_is_executing, cpu_is_suspended,
cpu_get_local_time, and cpu_abort_timeslice.
Some minor name changes:
state_value() -> state()
state_set_value() -> set_state()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DECLARE_LEGACY_CPU_DEVICE and DEFINE_LEGACY_CPU_DEVICE. Changed CPUs
to be their own device types, rather than all of type CPU with a
special internal subtype. Note that as part of this process I removed
the CPU_ prefix from the ALL-CAPS device name, so CPU_Z80 is just
plain old Z80 now. This required changing a couple of names like
8080 to I8080 so that there was an alphabetic first character.
Added memory interfaces to the list of fast-access interfaces. To do
this properly I had to add a separate method to devices which is
called immediately after construction, when it is possible to perform
dynamic_casts on fully-constructed objects. (This is just internal,
no changes necessary to the devices themselves.)
Some additional notes:
* SH2 and SH4 had typedefs that conflicted with their CPU_-less names
so I bulk renamed to structures to sh2_state and sh4_state; RB, feel
free to choose alternate names if you don't like 'em
* SCSP was caught doing something to the 3rd indexed CPU. Since several
systems that use SCSP don't even have 3 CPUs, I had no idea what
this was supposed to do, so I changed to it reference "audiocpu"
assuming that stv was the assumed target. This is really gross and
should be a configuration parameter, not a hard-coded assumption.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
running_machine definition and implementation.
Moved global machine-level operations and accessors into methods on the
running_machine class. For the most part, this doesn't affect drivers
except for a few occasional bits:
mame_get_phase() == machine->phase()
add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...)
add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...)
mame_get_base_datetime() == machine->base_datetime()
mame_get_current_datetime() == machine->current_datetime()
Cleaned up the region_info class, removing most global region accessors
except for memory_region() and memory_region_length(). Again, this doesn't
generally affect drivers.
|
|
|
|
|
|
|
|
|
|
|
|
| |
this object which can be called multiple times to append new devices
after the initial machine configuration is set up. Updated member
variables to match new naming convention.
Changed the running_machine to take a constructed machine_config
object in the constructor, instead of creating one itself, for
consistency. Also added machine->total_colors() as a shortcut to
machine->config->m_total_colors.
|
|
|
| |
- Implemented more image device calls, and did some cleanup (no whatsnew)
|
|
|
|
|
| |
- Moved image related UI from MESS to emu core
- Reimplemented filename related image device calls
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
| |
input code. A clean compile is probably required. No whatsnew needed.
Brief explaination: ui_active is a variable which helps systems with keyboard input devices (mainly MESS computers, but it might be handy when MAME fully emulates games like Typing of the Dead) to determine if keys like 'P', 'TAB', 'ESC', etc. should be interpreted as UI actions (pause, enter menu, quit emu...) or as inputs in the emulated keyboard.
this change is to allow for additional OSD-specific inputs (which are defined osd/ sources) to check for ui_active before getting detected, in case they collide with emulated inputs
|
|
|
|
|
| |
if the user has enabled newui. No effect in MAME and, hence, no whatsnew mention needed.
While at it, I also associated ESC to Menu bar toggling when in newui (like many other emulators for Windows), given that user would quit MESS with File > Exit in the menu bar.
|
|
|
| |
using osd_malloc() instead. Fixed other memory leaks as well. [Oliver Stoneberg]
|
|
|
|
|
|
| |
Added inline tag() function to return a const char * version. Updated
callers to use this instead of directly accessing tag.cstr() which
was awkward.
|
|
|
|
|
|
| |
- removed ui_use_new_ui check used by MESS code
- moved ui_mess_handler_ingame call in proper place, so device UI callbacks works again
- removed toggle of menu bar (MESS related)
|
| |
|
| |
|
|
|
|
| |
- Moved OSD file functions and clipboard access functions into OSD core
|
|
|
|
|
|
|
| |
hardware modifications
- Removed GAME_COMPUTER it is distinct by IPT_KEYBOARD
- Added GAME_NO_SOUND_HW (to mark that there is no sound hardware) and marked drivers in dotrikun.c, minivadr.c and tgtpanic.c as such
- Added GAME_CAN_SHARE_ROMS - to mark that there can be other driver using same ROM as this one but with different hardware (common in computer/console world)
|
| |
|
|
|
|
| |
- Removed MESS dependent checks
|
|
|
|
| |
- Made GAME_COMPUTER type visible for all, and removed ifdefs for it.
- Made GAME_NO_SOUND check done on MESS too.
|
|
|
|
|
|
| |
- all ui functions now expect a render_container
- removed all macros referencing render_container_get_ui
- ui_menu_alloc now is passed a container to which to render the menu.
This is a first round of changes to allow using ui_* functions in a more generic way.
|
|
|
|
|
| |
just call through to the get info function. Removed old macros that
wrapped calls.
|
|
|
|
|
|
|
| |
- Fixed compiling CPU core of V30MZ (only used by MESS)
- Fixed MESS dependent code of wave.c
- Added include of emu.h in sid (used only by MESS)
no whatsnew needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.
There is a new class 'running_device' which represents the
state of a live device. A list of these running_devices sits
in machine->devicelist and is created when a running_machine
is instantiated.
To access the configuration state, use device->baseconfig()
which returns a reference to the configuration.
The list of running_devices in machine->devicelist has a 1:1
correspondance with the list of device configurations in
machine->config->devicelist, and most navigation options work
equally on either (scanning by class, type, etc.)
For the most part, drivers will now deal with running_device
objects instead of const device_config objects. In fact, in
order to do this patch, I did the following global search &
replace:
const device_config -> running_device
device->static_config -> device->baseconfig().static_config
device->inline_config -> device->baseconfig().inline_config
and then fixed up the compiler errors that fell out.
Some specifics:
Removed device_get_info_* functions and replaced them with
methods called get_config_*.
Added methods for get_runtime_* to access runtime state from
the running_device.
DEVICE_GET_INFO callbacks are only passed a device_config *.
This means they have no access to the token or runtime state
at all. For most cases this is fine.
Added new DEVICE_GET_RUNTIME_INFO callback that is passed
the running_device for accessing data that is live at runtime.
In the future this will go away to make room for a cleaner
mechanism.
Cleaned up the handoff of memory regions from the memory
subsystem to the devices.
|
|
|
|
|
|
|
|
| |
along with a tagmap. Changed memory regions, input ports, and devices
to use this class. For devices, converted typenext and classnext
fields into methods which dynamically search for the next item.
Changed a number of macros to use the features of the class, removing
the need for a bunch of helper functions.
|