| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
src/tools).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* use plural names for output finders when there are multiple outputs (nw)
* use plural names for output finders when there are multiple outputs (nw)
* use plural names for output finders when there are multiple outputs (nw)
|
|
|
|
|
|
| |
* Replace set_led_value and set_lamp_value with output_finders. [Wilbert Pol]
* segaufo: keep the 2 bit lamp outputs
|
|
|
|
| |
[Ryan Holtz]
|
| |
|
|
|
|
|
| |
Also, a lot more freedom happened, that's going to be more visible
soon.
|
|
|
|
|
|
|
|
|
|
| |
prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD
anymore due to the prototype change. So creating a device then
configuring through a fragment doesn't work as-is. The simplest
solution is just to add a MCFG_DEVICE_MODIFY at the start of the
fragment with the correct tag.
|
|
|
|
|
|
|
|
| |
These humble 16-pin logic devices were commonly used in 8-bit arcade games to control coin counters/lockouts, IRQ flipflops, graphics banking, slave CPU reset lines, discrete audio triggers, screen flipping, serial EEPROMs and much else. Over 100 drivers and a few bus devices have been updated to use the new implementation, and a great deal of research has gone into documenting the physical location of these devices on actual PCBs in the source. Write handlers have been provided for both orthodox and somewhat less conventional memory mappings.
Incidental to this update, coin counters and/or lockouts have been added to Atari System 1 games, Basketball, Gauntlet, Gyruss, Hana Yayoi, Hole Land, Jr. Pac-Man, Mahjong Sisters, Pooyan, Roc'n Rope, Squash, Thunder Hoop, Time Limit, Time Pilot '84 and many others. This also cleans up coin counter behavior in Sauro and Rally Bike.
(nw) The purpose of committing this change, which has been several months in the making, early in the 0.189GIT cycle will be to allow time for fixing potential regressions; I've fixed a number of drivers that lost sound from this for various reasons (hnayayoi.cpp having missing or garbage ADPCM was particularly painful, since the three games in that driver all work slightly differently), but I can't test all affected drivers exhaustively. @Tafoid, don't bother running automated screen capture comparison tests on this, as many drivers are now expected to have the screen flipped for the first few seconds after reset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make device_creator a variable template and get rid of the ampersands
* Remove screen.h and speaker.h from emu.h and add where necessary
* Centralise instantiations of screen and speaker finder templates
* Add/standardise #include guards in many hearers
* Remove many redundant #includes
* Order #includesr to help catch headers that can't be #included alone
(nw) This changes #include order to be prefix, unit header if applicable
then other stuff roughly in order from most dependent to least dependent
library. This helps catch headers that don't #include things that they
use.
|
|
|
|
|
| |
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
|
|
|
|
|
|
|
| |
SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa
* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
|
|
|
|
| |
fix start project for custom builds in Visual Studio (nw)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
optional_device<palette_device> m_palette out of driver.* (nw)
|
|
|
| |
note: Aaron please give more descriptive text for release log I have no more strength :)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
to 8-bit handlers to match the others. To ease
pain, added DECLARE_READ/WRITE_HANDLER macros that
set up a default parameter. Also updated devcb so
that the handlers can be called with or without the
mem_mask. [Aaron Giles]
|
|
|
|
| |
changed to be members of state classes (no whatsnew)
|
|
|
|
|
|
|
|
| |
This update passes validity checks but will certainly have
a number of drivers failing at startup because all pointers
are defaulted to required by the automated scripts used.
Will fix problems once we get a regression run to find out
which drivers need attention.
|
| |
|
|
|
| |
Tomorrow and next days just bug fixing from my side, no big changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Converted controls to Positional type.
Started Discrete sounds. (Motor 2 & 3, Crash sounds implemented)
Optimized speed of DISCRETE_DAC_R1 [Derrick Renaud]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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\)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defined new class driver_data_t, which all driver_data classes must
derive from. Updated all class definitions to inherit from the new
class, and to call it in the constructor. Also changed the alloc()
signature to return a driver_data_t pointer instead of a void *.
Renamed and hid machine->driver_data as machine->m_driver_data.
Added a new templatized method machine->driver_data<class> which returns
a properly downcast'ed version of the driver data. Updated all code
which looked like this:
mydriver_state *state = (mydriver_state *)machine->driver_data;
to this:
mydriver_state *state = machine->driver_data<mydriver_state>();
The new function does a downcast<> which in debug builds dynamically
verifies that you're actually casting to the right type.
Changed atarigen_state to be a base class from which all the related
Atari drivers derive their state from.
For MESS: this was mostly a bulk search/replace, in 4 steps in
src/mame:
1. Add ": public driver_data_t" to each driver state class definition:
Search: (class [a-z0-9_]+_state)$
Replace: \1 : public driver_data_t
2. Change the static alloc function to return a driver_data_t *:
Search: static void \*alloc\(
Replace: static driver_data_t \*alloc\(
3. Change the constructor to initialize driver_data_t:
Search: ([a-z0-9_]+_state\(running_machine \&machine\)) { }
Replace: \1\r\n\t\t: driver_data_t(machine) { }
4. Replace the state fetchers to use the new templatized function:
Search: \(([a-z0-9_]+_state) \*\)(.*)machine->driver_data
Replace: \2machine->driver_data<\1>()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constructor and a static allocation function.
Changed MDRV_DRIVER_DATA to reference driver_data::alloc
instead of just providing a size. This function is called
to allocate the driver data. This allows objects to be
embedded in the state data and be properly initialized.
Ideally, new driver_data constructors should perform
initialization actions in the constructor, but for now
most just use auto_alloc_clear() to blast everything to
zero.
Moved driver data allocation after device list construction
so that devices can be found when the driver data is
constructed.
|
|
|
|
|
|
| |
* drop almost completely the use of generic sizes with struct members
* reduce as much as possible accesses to cputag calls during emulation (they are now mainly concentrated at MACHINE_START & DRIVER_INIT)
unfortunately I had been away for half a day and I have found only now rev 7446 (which could have been used in many of these cases). too late to use the new macro, sorry (almost 3AM here)
|
|
|
|
|
| |
copsnrob.c, cop01.c, cosmic.c, cntsteer.c, dacholer.c and dec8.c
Also, removed a memory_set_bankptr I forgot in cultures.c
|
|
|