| Commit message (Collapse) | Author | Files | Lines |
|
able to do this within a netlist.
|
|
|
|
|
|
- cleaned some parts of nl_brdrline.cpp (removed test points)
- changed MB4391 function to pow2 to shorten sounds a bit
- changed trigger inputs in vicdual.cpp to fit more to the sounds i remember.
- moved trigger mapping from vicdual to nl_brdrline
|
|
* netlist: Explicitly trim connection names.
* Hook up Borderline netlist, provided by 'beta-tester'
* brdrline: Add static solver, using dynamic timestep, update driver flags.
|
|
removed read* and write* macros (nw)
|
|
MACHINE_CONFIG macros. [Ryan Holtz]
-sound/asc, lmc1992, nes_apu, samples, video/ppu2c0x, ppu2c0x_vt: Removed MCFG macros. [Ryan Holtz]
-audio/astrof, carnival, cclimber, cinemat, depthch, invinco, pulsar, spacefb, targ, tranqgun, turbo, vicdual
vicdual-97271p, zaxxon: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-drivers/8080bw, astinvad, atarist, blockade, cham24, circus, cosmic, equites, famibox, gottlieb, gotya, gridlee,
homerun, m10, m14, m63, mcr, meadows, mmagic, multigam, mw8080bw, nes, nes_vt, ninjakd2, playch10,
safarir, segag80v, starcrus, starfire, suna8, super80, tankbatt, tattack, thief, tmnt, tnzs, triplhnt, vsnes: Removed MACHINE_CONFIG macros. [Ryan Holtz]
-machine/genpin, mm1kb: Removed MACHINE_CONFIG macros. [Ryan Holtz]
|
|
audio/galaxian: Move configuration to driver files (nw)
|
|
side effect of making machine-config overrides of these much"
This reverts commit c83e2a853d4e1643fcc85b68ada3c6f7f33adea4.
Revert "fix compile. (nw)"
This reverts commit a259ba3e366f442a22a9341755ff58163869860c.
GCC is being bad and allowing invalid C++ that other compilers reject.
|
|
of making machine-config overrides of these much
uglier, but this is intended to discourage ongoing use, and will be gradually eliminated.
|
|
Current syntax: MCFG_DEVICE_REPLACE(tag_or_finder, TYPE, ...)
Next-generation syntax: TYPE(config.replace(), tag_or_finder, ...)
(nw) Kill off some more low-value macros that aren't needed any more,
and get rid of the token-pasting voodoo and casts in the discrete sound
macros.
|
|
Start replacing special device macros with additional constructors,
starting with ISA, INTELLEC 4 and RS-232 buses.
Allow an object finder to take on the target of another object finder.
(For a combination of the previous two things in action, see either the
INTELLEC 4 driver, or the Apple 2 PC Exporter card. Also check out
looping over a device finder array to instantiate devices in some
places. Lots of things no longer need to pass tags around.)
Start supplying default clocks for things that have a standard clock or
have all clocks internal.
Eliminate the separate DEV versions of the DEVCB_ macros. Previously,
the plain versions were a shortcut for DEVICE_SELF as the target. You
can now supply a string tag (relative to current device being
configured), an object finder (takes on the base and relative tag), or
a reference to a device/interface (only do this if you know the device
won't be replaced out from under it, but that's a safe assumption for
your subdevices). In almost all cases, you can get the effect you want
by supplying *this as the target.
Eliminate sound and CPU versions of macros. They serve no useful
purpose, provide no extra checks, make error messages longer, add
indirection, and mislead newbies into thinking there's a difference.
Remove a lot of now-unnecessary ":" prefixes binding things relative to
machine root.
Clean up some miscellaneous rot.
Examples of new functionality in use in (some more subtle than others):
* src/mame/drivers/intellec4.cpp
* src/mame/drivers/tranz330.cpp
* src/mame/drivers/osboren1.cpp
* src/mame/drivers/zorba.cpp
* src/mame/devices/smioc.cpp
* src/devices/bus/a2bus/pc_xporter.cpp
* src/devices/bus/isa/isa.h
* src/devices/bus/isa/isa.h
* src/devices/bus/intellec4/intellec4.h
|
|
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.
|
|
UTF-8 will be nuked, and cleaning it up by hand is annoying
|
|
Tomaselli]
|
|
(nw) This is a pretty minimal change. The point where the root device is added has been moved
from the MACHINE_CONFIG_START macro to the constructor of the machine configuration class (made
possible by giving drivers their own device types). This isn't the final change in this area.
The root device is still being handled specially in that its configuration comes from the game
driver structure. This needs to be harmonised with regular devices. But that's a job for
another day.
|
|
names, (nw)
Added license for Paul Forgey
|
|
|
|
|
|
|
|
|
|
audio drivers which I created. Also inserted D. Renaud were appropriate.
Left FIXMEs were I think the copyright holder could actually be D. R.
(nw)
|
|
|
|
|
|
|
|
|
|
need clean compile. (nw)
|
|
discrete_device is modern one (nw)
|
|
|
|
|
|
|
|
read/write handlers to take an address_space & instead
of an address_space *. Also update pretty much all other
functions to take a reference where appropriate.
[Aaron Giles]
|
|
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)
|
|
reading is now done using the FLAC wrapper. There is now a
samples_iterator class to centralize the logic for handling
the sample list walking.
Also redid the cheesy half-baked votrax device since it relied
on some old samples-based handling. Until we have a real
implementation, it would be good to route the various clients
through the current one to at least wire it up properly, even
if it just plays samples in the end. Will look into that
shortly.
|
|
* Remove hardcoded ".wav" sample extensions from within drivers
* Update samples.c to check for both .flac and .wav extensions when loading a sample
* Made sample loading failure a bit more verbose (various zips contained 0 byte samples, I assume to keep clrmame happy or something)
* Fixed memory allocation with 8-bit flac samples
Act Fancer: fixed background tilemap size, corrects level boss bg
(partial fix for MT #4585) [David Haywood]
|
|
languages down dark alleys, knocks them over and goes through their pockets for loose grammar!"
Hand-checked the most popular English word misspellings and made the appropriate changes. Nearly all of the changes made were in commented areas. (no whatsnew)
|
|
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 *)
|
|
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
|
|
timers into the scheduler. Retain TIMER devices as a separate wrapper
in timer.c/.h. Inline wrappers are currently provided for all timer
operations; a future update will bulk clean these up.
Rather than using macros which hide generation of a string-ified name
for callback functions, the new methods require passing both a function
pointer plus a name string. A new macro FUNC() can be used to output
both, and another macro MFUNC() can be used to output a stub-wrapped
class member as a callback.
Also added a time() method on the machine, so that machine->time() gives
the current emulated time. A wrapper for timer_get_time is currently
provided but will be bulk replaced in the future.
For this update, convert all classic timer_alloc, timer_set,
timer_pulse, and timer_call_after_resynch calls into method calls on
the scheduler.
For new device timers, added methods to the device_t class that make
creating and managing these much simpler. Modern devices were updated
to use these.
Here are the regexes used; some manual cleanup (compiler-caught) will
be needed since regex doesn't handle nested parentheses cleanly
1. Convert timer_call_after_resynch calls
timer_call_after_resynch( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().synchronize\1\(\2FUNC(\6), \5, \4\)
2. Clean up trailing 0, NULL parameters
(synchronize[^;]+), 0, NULL\)
\1)
3. Clean up trailing NULL parameters
(synchronize[^;]+), NULL\)
\1)
4. Clean up completely empty parameter lists
synchronize\(FUNC\(NULL\)\)
synchronize()
5. Convert timer_set calls
timer_set( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_set\1\(\2\4, FUNC(\7), \6, \5\)
6. Clean up trailing 0, NULL parameters
(timer_set[^;]+), 0, NULL\)
\1)
7. Clean up trailing NULL parameters
(timer_set[^;]+), NULL\)
\1)
8. Convert timer_set calls
timer_pulse( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_pulse\1\(\2\4, FUNC(\7), \6, \5\)
9. Clean up trailing 0, NULL parameters
(timer_pulse[^;]+), 0, NULL\)
\1)
10. Clean up trailing NULL parameters
(timer_pulse[^;]+), NULL\)
\1)
11. Convert timer_alloc calls
timer_alloc( *)\(( *)([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_alloc\1\(\2FUNC(\4), \5\)
12. Clean up trailing NULL parameters
(timer_alloc[^;]+), NULL\)
\1)
13. Clean up trailing 0 parameters
(timer_alloc[^;]+), 0\)
\1)
14. Fix oddities introduced
\&m_machine->scheduler()
m_machine.scheduler()
|
|
global functions which are now superceded by the operators and
methods on the class. [Aaron Giles]
Required mappings are:
attotime_make(a,b) => attotime(a,b)
attotime_to_double(t) => t.as_double()
double_to_attotime(d) => attotime::from_double(d)
attotime_to_attoseconds(t) => t.as_attoseconds()
attotime_to_ticks(t,f) => t.as_ticks(f)
ticks_to_attotime(t,f) => attotime::from_ticks(t,f)
attotime_add(a,b) => a + b
attotime_add_attoseconds(a,b) => a + attotime(0, b)
attotime_sub(a,b) => a - b
attotime_sub_attoseconds(a,b) => a - attotime(0, b)
attotime_compare(a,b) == 0 => a == b
attotime_compare(a,b) != 0 => a != b
attotime_compare(a,b) < 0 => a < b
attotime_compare(a,b) <= 0 => a <= b
attotime_compare(a,b) > 0 => a > b
attotime_compare(a,b) >= 0 => a >= b
attotime_mul(a,f) => a * f
attotime_div(a,f) => a / f
attotime_min(a,b) => min(a,b)
attotime_max(a,b) => max(a,b)
attotime_is_never(t) => t.is_never()
attotime_string(t,p) => t.as_string(p)
In addition, some existing #defines still exist but will go away:
attotime_zero => attotime::zero
attotime_never => attotime::never
ATTOTIME_IN_SEC(s) => attotime::from_seconds(s)
ATTOTIME_IN_MSEC(m) => attotime::from_msec(m)
ATTOTIME_IN_USEC(u) => attotime::from_usec(u)
ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n)
ATTOTIME_IN_HZ(h) => attotime::from_hz(h)
|
|
- Former modules are now classes being derived from discrete_base_node
- Moved all context variables to be private class members.
- For "standard nodes", DISCRETE_CLASS_STEP_RESET provides a simple
way to implement a node.
- All information around a node (additional info struct, constants
and input mappings may be defined on a class level centralizing
all information. An example is dss_inverter_osc.
- Significantly simplified the task handling.
- Fixed a bug which would not buffer secondary outputs.
- All lists in sound/disc_* are now based on
dynamic_array_t (discrete.h)
- Changed all drivers to reflect the changes.
- Custom modules are now just another node class.
- No performance hit observed due to these changes.
|
|
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.
|
|
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.
|
|
|
|
|
|
DISCRETE_ADJUSTMENT_TAG to replace it. Updated all callers.
Removed input_port_by_index, as it is no longer needed.
|