| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
area". If true, it will show the whole video area including border + blanking areas. [Angelo Salese]
Bulk replaced const mc6845_interface -> MC6845_INTERFACE, nw
(MESS)
SMC-777: enabled to show the border area in MC6845 interface, changed various video related function accordingly [Angelo Salese]
|
| |
|
| |
|
|
|
|
| |
to make next changes easier (no whatsnew)
|
|
|
|
|
|
|
|
|
|
|
|
| |
device_memory_interface::space() assert against NULL and
return a reference, and pushed references throughout all
address space usage in the system. Added a has_space()
method to check for those rare case when it is ambiguous.
[Aaron Giles]
Also reinstated the generic space and added fatal error
handlers if anyone tries to actually read/write from it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
READ/WRITE_DEVICE*_HANDLERs are now passed an
address_space &, and the 8-bit variants get a mem_mask
as well. This means they are now directly compatible
with the member function delegates. Added a generic
address space to the driver_device that can be used
when no specific address space is available. Also
added DECLARE_READ/WRITE_DEVICE*_HANDLER macros to
declare device callbacks with default mem_mask
parameters. [Aaron Giles]
|
|
|
|
| |
changed to be members of state classes (no whatsnew)
|
|
|
|
|
|
|
| |
and cputag_set_input_line_and_vector, replacing them
with machine.device("tag")->execute().set_input_line[_and_vector].
[Aaron Giles]
|
|
|
|
|
|
| |
Convert all cpu_get_pc() to safe_pc() and
cpu_getpreviouspc() to safe_basepc(). Removed the
old macros.
|
|
|
|
|
| |
Added DECLARE_DRIVER_INIT macro to define it H file, and
DRIVER_INIT_MEMBER for member declaration in C files
Updated all drivers accordingly (no whatsnew)
|
|
|
|
| |
DRIVER_INIT change (no whatsnew)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
You still need target() if you want to cast to another pointer size.
This should be rare, and in fact fixing these pointed out a few
cases where code was missing BYTE/WORD/DWORD_XOR_* macros. I flagged
these with:
// ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
For future fixing.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Normalized soundlatch helper function names.
Created delegates for machine/sound/video_start/reset callbacks and
added necessary infrastructure to use them going forward.
|
| |
|
|
|
|
|
|
| |
operations into methods on it. Converted the less-popular cases over
in drivers that used them, leaving the bank management APIs global
for now.
|
| |
|
| |
|
| |
|
|
|
|
| |
- Added 4th parameter to all address maps
- Added missing state classes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
almost certainly some regressions lurking. Let me know if
something seems busted.
Bitmaps are now strongly typed based on format. bitmap_t still
exists as an abstract base class, but it is almost never used.
Instead, format-specific bitmap classes are provided:
bitmap_ind8 == 8bpp indexed
bitmap_ind16 == 16bpp indexed
bitmap_ind32 == 32bpp indexed
bitmap_ind64 == 64bpp indexed
bitmap_rgb32 == 32bpp RGB
bitmap_argb32 == 32bpp ARGB
bitmap_yuy16 == 16bpp YUY
For each format, a generic pix() method is provided which
references pixels of the correct type. The old pix8/pix16/pix32/
pix64 methods still exist in the short term, but the only one
available is the one that matches the bitmap's pixel size. Note
also that the old RGB15 format bitmaps are no longer supported
at all.
Converted model1, megadriv, and stv drivers away from the RGB15
format bitmaps.
New auto_bitmap_<type>_alloc() macros are provided for allocating
the appropriate type of bitmap.
Screen update functions now must specify the correct bitmap type
as their input parameters. For static update functions the
SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and
SCREEN_UPDATE_IND16 macros. All existing drivers have been
updated to use the correct macros.
Screen update functions are now required for all screens; there
is no longer any default behavior of copying a "default" bitmap
to the screen (in fact the default bitmap has been deprecated).
Use one of the following to specify your screen_update callback:
MCFG_SCREEN_UPDATE_STATIC(name) - static functions
MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members
MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members
Because the target bitmap format can now be deduced from the
screen update function itself, the MCFG_SCREEN_FORMAT macro is
no longer necessary, and has been removed. If you specify a
screen update callback that takes a bitmap_ind16, then the screen
will be configured to use a 16bpp indexed bitmap, and if you
specify a callback that takes a bitmap_rgb32, then a 32bpp RGB
bitmap will be provided.
Extended the bitmap classes to support wrapping a subregion of
another bitmap, and cleaner allocation/resetting. The preferred
use of bitmaps now is to define them directly in drivers/devices
and use allocate() or wrap() to set them up, rather than
allocating them via auto_bitmap_*_alloc().
Several common devices needed overhauls or changes as a result
of the above changes:
* Reorganized the laserdisc base driver and all the laserdisc
drivers as modern C++ devices, cleaning the code up
considerably. Merged ldsound device into the laserdsc
device since modern devices are flexible enough to handle
it.
* Reorganized the v9938 device as a modern C++ device. Removed
v9938mod.c in favor of template functions in v9938.c directly.
* Added independent ind16 and rgb32 callbacks for TMS340x0 devices.
* All video devices are now hard-coded to either ind16 or rgb32
bitmaps. The most notable is the mc6845 which is rgb32, and
required changes to a number of consumers.
* Added screen_update methods to most video devices so they can be
directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating
tons of stub functions.
|
|
|
|
|
|
|
|
| |
parameters for the global SCREEN_UPDATE callback match the parameters
for the driver_device version. Added allocate() and deallocate()
methods to bitmap_t to permit cleaner handling of bitmaps in drivers
and modern devices. [Aaron Giles]
|
|
|
|
|
|
|
|
| |
macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill()
among other similar changes. Bitmap fields now only available via accessors.
Replaced sect_rect with &= and union_rect with |= operators for rectangle
classes. Some general cleanup as a result of these changes. [Aaron Giles]
|
|
|
|
|
|
|
|
|
| |
reference. Remove redundant machine parameter from SCREEN_EOF. Remove old
vestiges of driver_device video_eof override since it wasn't being used.
Update all multi-screen games to use separate functions for each screen
(calling into common code where appropriate). [Aaron Giles]
(nw: equivalent MESS changes are ready, will send along shortly)
|
| |
|
|
|
|
|
| |
Changed signature for callbacks to take an input_field_config
reference instead of pointer.
|
|
|
|
|
|
|
|
|
| |
Remove the old tokenizing helpers. Add basic classes for ports, fields,
settings, and dip locations as a first step. These will be fully cleaned
up later. Added machine() method to field to hide all the necessary
indirection. Changed custom/changed handlers into generic read/write
handlers, and added wrappers to convert them to device read/write
lines. [Aaron Giles]
|
|
|
|
| |
grossness remains, to be dealt with in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing modern devices and the legacy wrappers to work in this
environment. This in general greatly simplifies writing a modern
device. [Aaron Giles]
General notes:
* some more cleanup probably needs to happen behind this change,
but I needed to get it in before the next device modernization
or import from MESS :)
* new template function device_creator which automatically defines
the static function that creates the device; use this instead of
creating a static_alloc_device_config function
* added device_stop() method which is called at around the time
the previous device_t's destructor was called; if you auto_free
anything, do it here because the machine is gone when the
destructor is called
* changed the static_set_* calls to pass a device_t & instead of
a device_config *
* for many devices, the static config structure member names over-
lapped the device's names for devcb_* functions; in these cases
the members in the interface were renamed to have a _cb suffix
* changed the driver_enumerator to only cache 100 machine_configs
because caching them all took a ton of memory; fortunately this
implementation detail is completely hidden behind the
driver_enumerator interface
* got rid of the macros for creating derived classes; doing it
manually is now clean enough that it isn't worth hiding the
details in a macro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
driver_device classes have an m_ prefix on them. When we
eventually move functions using these into member functions,
we will be able to remove the state-> pointers, and having
the member variables prefixed will allow them to be
distinguished from local variables.
Some regex'es used (plus manually fixing the remaining stuff):
In src/mame/...
state->([a-zA-Z_][^_][a-zA-Z0-9_]*)
state->m_\1
state->([^m]_[a-zA-Z0-9_]*)
state->m_\1
state->m_save_item
state->save_item
state->m_save_pointer
state->save_pointer
(AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_])
\1m_\2
(AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_])
\1m_\2m_\3
(AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_])
\1m_\2
m__
m_
In src/mame/includes/...
(\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$
\1m_\2
(\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$
\1m_\2
|
|
|
|
|
|
|
|
|
|
|
| |
space->device().
S: space->cpu->
R: space->device\(\)\.
S: space->cpu
R: \&space->device\(\)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant machine items from address_space and device_t.
Neither machine nor m_machine are directly accessible anymore.
Instead a new getter machine() is available which returns a
machine reference. So:
space->machine->xxx ==> space->machine().xxx
device->machine->yyy ==> device->machine().yyy
Globally changed all running_machine pointers to running_machine
references. Any function/method that takes a running_machine takes
it as a required parameter (1 or 2 exceptions). Being consistent
here gets rid of a lot of odd &machine or *machine, but it does
mean a very large bulk change across the project.
Structs which have a running_machine * now have that variable
renamed to m_machine, and now have a shiny new machine() method
that works like the space and device methods above. Since most of
these are things that should eventually be devices anyway, consider
this a step in that direction.
98% of the update was done with regex searches. The changes are
architected such that the compiler will catch the remaining
errors:
// find things that use an embedded machine directly and replace
// with a machine() getter call
S: ->machine->
R: ->machine\(\)\.
// do the same if via a reference
S: \.machine->
R: \.machine\(\)\.
// convert function parameters to running_machine &
S: running_machine \*machine([^;])
R: running_machine \&machine\1
// replace machine-> with machine.
S: machine->
R: machine\.
// replace &machine() with machine()
S: \&([()->a-z0-9_]+machine\(\))
R: \1
// sanity check: look for this used as a cast
(running_machine &)
// and change to this:
*(running_machine *)
|
|
|
|
|
|
|
|
|
|
|
|
| |
space by index. Update functions and methods that accepted an
address space index to take an address_spacenum instead. Note that
this means you can't use a raw integer in ADDRESS_SPACE macros, so
instead of 0 use the enumerated AS_0.
Standardized the project on the shortened constants AS_* over the
older ADDRESS_SPACE_*. Removed the latter to prevent confusion.
Also centralized the location of these definitions to memory.h.
|
|
|
|
|
| |
[Atari Ace]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Screen update function is now per screen device
(it was before but was attached to machine driver)
MCFG_VIDEO_UPDATE -> MCFG_SCREEN_UPDATE
MCFG_VIDEO_EOF -> MCFG_SCREEN_EOF
EOF is now executed for all screens, so for all existing it
is defined just for one screen. This part will be updated in future.
Note that there are now screen_update and screen_eof virtual functions
for "modern" drivers which are called same as they did before.
All drivers are updated and in places where update function was separated per
screen I did name separate function.
This change will enable us to put screen definition fully into device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
timer_adjust_oneshot(t,...) => t->adjust(...)
timer_adjust_periodic(t,...) => t->adjust(...)
timer_reset(t,...) => t->reset(...)
timer_enable(t,...) => t->enable(...)
timer_enabled(t) => t->enabled()
timer_get_param(t) => t->param()
timer_get_ptr(t) => t->ptr()
timer_set_param(t,...) => t->set_param(...)
timer_set_ptr(t) => t->set_ptr(...)
timer_timeelapsed(t) => t->elapsed()
timer_timeleft(t) => t->remaining()
timer_starttime(t) => t->start()
timer_firetime(t) => t->expire()
Also remove some stray legacy cpuexec* macros that were
lurking in schedule.h):
cpuexec_describe_context(m) => m->describe_context()
cpuexec_boost_interleave(m,...) => m->scheduler().boot_interleave(...)
cpuexec_trigger(m,...) => m->scheduler().trigger(...)
cpuexec_triggertime(m,...) => m->scheduler().trigger(...)
Specific regex'es used:
timer_adjust_oneshot( *)\(( *)([^,;]+), *
\3->adjust\1\(\2
timer_adjust_periodic( *)\(( *)([^,;]+), *
\3->adjust\1\(\2
(->adjust.*), *0( *)\)
\1\2\)
timer_reset( *)\(( *)([^,;]+), *
\3->reset\1\(\2
(->reset *\(.*)attotime::never
\1
timer_enable( *)\(( *)([^,;]+), *
\3->enable\1\(\2
timer_enabled( *)\(( *)([^,;)]+)\)
\3->enabled\1\(\2\)
timer_get_param( *)\(( *)([^,;)]+)\)
\3->param\1\(\2\)
timer_get_ptr( *)\(( *)([^,;)]+)\)
\3->ptr\1\(\2\)
timer_timeelapsed( *)\(( *)([^,;)]+)\)
\3->elapsed\1\(\2\)
timer_timeleft( *)\(( *)([^,;)]+)\)
\3->remaining\1\(\2\)
timer_starttime( *)\(( *)([^,;)]+)\)
\3->start\1\(\2\)
timer_firetime( *)\(( *)([^,;)]+)\)
\3->expire\1\(\2\)
timer_set_param( *)\(( *)([^,;]+), *
\3->set_param\1\(\2
timer_set_ptr( *)\(( *)([^,;]+), *
\3->set_ptr\1\(\2
cpuexec_describe_context( *)\(( *)([^,;)]+)\)
\3->describe_context\1\(\2\)
\&m_machine->describe_context
m_machine.describe_context
cpuexec_boost_interleave( *)\(( *)([^,;]+), *
\3->scheduler().boost_interleave\1\(\2
cpuexec_trigger( *)\(( *)([^,;]+), *
\3->scheduler().trigger\1\(\2
cpuexec_triggertime( *)\(( *)([^,;]+), *
\3->scheduler().trigger\1\(\2
|
|
|
|
|
| |
They both already existed. No sense in having two names for the
same object type.
|
|
|
|
|
| |
There hasn't been a machine driver for many years.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
work just like required_device<> and optional_device<> for retrieving a
pointer by tag from an address space that specifies AM_SHARE("tag").
Also added templates required_shared_size<> and optional_shared_size<>
for retrieving the size of the AM_SHARE region.
Created a new generic NVRAM device. It can be configured to default to
0-fill, 1-fill, random-fill, or custom fill. In all cases, a same-named
memory region overrides the default fill. The address range where the
NVRAM can be found is now identified by an AM_SHARE() region of the
same tag as the NVRAM device. Drivers can also explicitly configure a
separately-allocated NVRAM region via nvram_device::set_base().
Replaced all instances of MDRV_NVRAM_HANDLER(generic_*) with
MDRV_NVRAM_ADD_*("nvram"). Replaced all AM_BASE_GENERIC/AM_SIZE_GENERIC(nvram)
with AM_SHARE("nvram"). For all remaining drivers that referenced the
generic.nvram directly, changed them to hold a required_shared_ptr<UINTx>
to the NVRAM in their driver state, and use that instead. Removed
nvram and nvram_size from the generic_ptrs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class with a new driver_device class, which is the base class for all
driver_data objects now. The new driver devices are added as the
first device in the device list, with a tag of "root"; all other
devices are now owned by the driver device.
Moved core callbacks (machine_start/_reset, sound_start/_reset,
video_start/_reset/_eof/_update, and palette_init) into device
configuration parameters on these new devices. The driver_device
base class overrides device_start(), ensures all other devices have
been started, and then calls, in order, the following overridable
methods:
find_devices() - new, used to locate devices prior to DRIVER_INIT
DRIVER_INIT function from the game driver
palette_init() - by default calls the MDRV_PALETTE_INIT function
driver_start() - new
machine_start() - by default calls the MDRV_MACHINE_START function
sound_start() - by default calls the MDRV_SOUND_START function
video_start() - by default calls the MDRV_VIDEO_START function
Similarly, the driver_device class overrides device_reset() and then
calls these methods in order:
driver_reset() - new
machine_reset() - by default calls the MDRV_MACHINE_RESET function
sound_reset() - by default calls the MDRV_SOUND_RESET function
video_reset() - by default calls the MDRV_VIDEO_RESET function
To accommodate these changes, initialization order is slightly
altered from before. The tilemap, video, sound, and debug systems
are now initialized prior to the devices' start. And the user
callbacks for DRIVER_INIT, PALETTE_INIT, MACHINE_START, SOUND_START,
and VIDEO_START are all called back-to-back. The net effect should
be similar, however.
Added methods (optional_device and required_device) to the new
driver_device class to find devices, intended to be used from the
find_devices() callback. See harddriv.h and beathead.h for examples
of usage.
Changed device_t::subtag to only prepend a prefix if the device is
not the 'root' device, in order to keep compatibility with existing
tag searching.
Changed device startup to actively reorder devices when they report
missing dependencies. This ensures that the reset functions get
called in the same order that the start functions did.
Bulk updated drivers as follows:
First removed the old static alloc function from the driver_data_t:
S: [ \t]*static driver_device \*alloc *\( *running_machine *\&machine *\) *\{ *return auto_alloc_clear *\( *\&machine *, *[a-zA-Z0-9_]+_state *\( *machine *\) *\); *\}[\r\n]*
R:
Then switched from driver_data_t to driver_device:
S: driver_data_t
R: driver_device
Then changed the constructors to pass the correct parameters:
S: ([a-zA-Z0-9_]+)_state *\( *running_machine *\&machine *\)([\r\n\t ]+): *driver_device *\( *machine *\)
R: \1_state\(running_machine \&machine, const driver_device_config_base \&config\)\2: driver_device\(machine, config\)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Renamed MACHINE_DRIVER_* to MACHINE_CONFIG_* to match the name
of the object it actually describes. The MDRV_* prefix may
eventually be bulk updated at some point, but not now.
2. MACHINE_CONFIG_START() now takes a driver_data_t-derived
class as a required second parameter. This means that
MDRV_DRIVER_DATA() is no longer required, and every "root"
machine config *must* specify a driver data class (or driver_data_t
itself if the driver has not yet been updated to use driver data).
3. New MACHINE_CONFIG_DERIVED() macro defines a machine_config
that is derived from another machine_config. This takes the place
of the very typical MACHINE_DRIVER_START()/MDRV_IMPORT_FROM()
combination.
4. New MACHINE_CONFIG_FRAGMENT() macro defines a partial
machine_config that can only be included in another "root"
machine_config. This is also used for machine_configs that are
specified as part of a device.
5. Changed MDRV_IMPORT_FROM() to MDRV_FRAGMENT_ADD() to more
accurately describe what is happening.
6. Added asserts to the above three macros to ensure they are
properly used.
Updated all machine drivers to use the new macros. Search & replace
lists below cover 99% of the changes, with just a few manual fixups.
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* driver data \*/[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* basic machine hardware \*/[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_DERIVED\( \1, \2 \)\r\n\r\n\t/\* basic machine hardware \*/
For all files outside of mame/drivers....
S: MACHINE_DRIVER_START
R: MACHINE_CONFIG_FRAGMENT in all non-drivers
For all files within mame/drivers....
S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)
R: MACHINE_CONFIG_START\( \1, driver_data_t \)
S: MDRV_IMPORT_FROM
R: MDRV_FRAGMENT_ADD
S: MACHINE_DRIVER_END
R: MACHINE_CONFIG_END
S: MACHINE_DRIVER_NAME
R: MACHINE_CONFIG_NAME
S: MACHINE_DRIVER_EXTERN
R: MACHINE_CONFIG_EXTERN
Final step: run mame -valid and fix the incorrect macros at the lines
where the asserts show up.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
First to go is devtag_get_device() (what a stupid name).
Use machine->device() instead.
This was strictly a bulk replace:
Search: devtag_get_device([ \t]*)\(([ \t]*)([^,]+),[ \t]*
Replace: \3->device\1\(\2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
designed to hold generic pointers that are commonly used. For
now, only generic_nvram has moved there. Added AM_BASE_GENERIC
and AM_SIZE_GENERIC macros for initializing generic pointers
in memory maps. Also added AM_BASE_SIZE_GENERIC to set both
base and size in one step.
Moved global variables out of machine/generic and into a private
data structure hanging off of the running_machine. Added newly-
needed machine parameters to coin_counter_w, coin_lockout_w, and
coin_lockout_global_w. Also added machine parameter to
set_led_state.
Added interface functions to get the number of dispensed tickets
and to increment the count, to remove the need for direct access
to these global variables. Also added functions to get the
current count on a particular coin counter and to determine the
lockout state.
Future checkins will move the remaining generic pointers (for
paletteram, videoram, spriteram, colorram, etc.) into the new
generic_pointers structure.
|