| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
note: hoarded dump removed too from coco_cart.xml, this will not be tolerated
|
| |
|
|
|
|
|
|
| |
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 *)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
calls on the device object.
Regex used:
state_save_register_device_item( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)
state_save_register_device_item_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)
state_save_register_device_item_2d_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)
state_save_register_device_item_bitmap( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\*\6\),\5\4\7\)
state_save_register_device_item_pointer( *)\(( *)([^,]+), *([^,]+),( *)([^,]+), *([^ )]+)( *)\)
\3->save_pointer\1\(\2NAME\(\6\),\5\7,\5\4\8\)
this->save_
save_
(save_item[^;]+), *0( *)\);
\1\2\);
(save_pointer[^;]+), *0( *)\);
\1\2\);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are still intact. The new state_manager class has templatized methods
for saving the various types, and through template specialization can
save more complex system types cleanly (like bitmaps and attotimes).
Added new mechanism to detect proper state save types. This is much
more strict and there will likely be some games/devices that fatalerror
at startup until they are remedied. Spot checking has caught the more
common situations.
The new state_manager is embedded directly in the running_machine,
allowing objects to register state saving in their constructors now.
Added NAME() macro which is a generalization of FUNC() and can be
used to wrap variables that are registered when directly using the
new methods as opposed to the previous macros. For example:
machine->state().save_item(NAME(global_item))
Added methods in the device_t class that implicitly register state
against the current device, making for a cleaner interface.
Just a couple of required regexes for now:
state_save_register_postload( *)\(( *)([^,;]+), *
\3->state().register_postload\1\(\2
state_save_register_presave( *)\(( *)([^,;]+), *
\3->state().register_presave\1\(\2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Also, changed the following MCFG macros to require a full
attotime specification:
MCFG_TIMER_ADD_PERIODIC
MCFG_QUANTUM_TIME
MCFG_WATCHDOG_TIME_INIT
|
|
|
|
|
| |
They both already existed. No sense in having two names for the
same object type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> To: submit@mamedev.org
> CC: atariace@hotmail.com
> Subject: [patch] Improve thread safety of FM sound cores
> Date: Sun, 7 Nov 2010 08:50:36 -0800
>
> Hi mamedev,
>
> Most of the FM sound cores still have some static state in them which
> means they are not multithread safe. This patch fixes this.
>
> ~aa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Nemesis, R. Belmont]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Created new central header "emu.h"; this should be included
by pretty much any driver or device as the first include. This
file in turn includes pretty much everything a driver or device
will need, minus any other devices it references. Note that
emu.h should *never* be included by another header file.
- Updated all files in the core (src/emu) to use emu.h.
- Removed a ton of redundant and poorly-tracked header includes
from within other header files.
- Temporarily changed driver.h to map to emu.h until we update
files outside of the core.
Added class wrapper around tagmap so it can be directly included
and accessed within objects that need it. Updated all users to
embed tagmap objects and changed them to call through the class.
Added nicer functions for finding devices, ports, and regions in
a machine:
machine->device("tag") -- return the named device, or NULL
machine->port("tag") -- return the named port, or NULL
machine->region("tag"[, &length[, &flags]]) -- return the
named region and optionally its length and flags
Made the device tag an astring. This required touching a lot of
code that printed the device to explicitly fetch the C-string
from it. (Thank you gcc for flagging that issue!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
osd_free(). They take the same parameters as malloc() and free().
Renamed mamecore.h -> emucore.h.
New C++-aware memory manager, implemented in emualloc.*. This is a
simple manager that allows you to add any type of object to a
resource pool. Most commonly, allocated objects are added, and so
a set of allocation macros is provided to allow you to manage
objects in a particular pool:
pool_alloc(p, t) = allocate object of type 't' and add to pool 'p'
pool_alloc_clear(p, t) = same as above, but clear the memory first
pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type
't' and add to pool 'p'
pool_alloc_array_clear(p, t, c) = same, but with clearing
pool_free(p, v) = free object 'v' and remove it from the pool
Note that pool_alloc[_clear] is roughly equivalent to "new t" and
pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also
note that pool_free works for single objects and arrays.
There is a single global_resource_pool defined which should be used
for any global allocations. It has equivalent macros to the pool_*
macros above that automatically target the global pool.
In addition, the memory module defines global new/delete overrides
that access file and line number parameters so that allocations can
be tracked. Currently this tracking is only done if MAME_DEBUG is
enabled. In debug builds, any unfreed memory will be printed at
the end of the session.
emualloc.h also has #defines to disable malloc/free/realloc/calloc.
Since emualloc.h is included by emucore.h, this means pretty much
all code within the emulator is forced to use the new allocators.
Although straight new/delete do work, their use is discouraged, as
any allocations made with them will not be tracked.
Changed the familar auto_alloc_* macros to map to the resource pool
model described above. The running_machine is now a class and contains
a resource pool which is automatically destructed upon deletion. If
you are a driver writer, all your allocations should be done with
auto_alloc_*.
Changed all drivers and files in the core using malloc/realloc or the
old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros
instead, or the global_alloc_* macros if necessary.
Added simple C++ wrappers for astring and bitmap_t, as these need
proper constructors/destructors to be used for auto_alloc_astring and
auto_alloc_bitmap.
Removed references to the winalloc prefix file. Most of its
functionality has moved into the core, save for the guard page
allocations, which are now implemented in osd_alloc and osd_free.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Date: Tue, Dec 22, 2009 at 4:44 PM
Subject: [patch] Fix srcclean/src2html bugs, misbalanced tokens and
visible whitespace errors
To: submit@mamedev.org
Cc: atariace@hotmail.com
Hi mamedev,
While experimenting with srcclean and src2html as indentation
validators, I stumbled across a couple of bugs. The first is that
srcclean doesn't properly handle /*...*//. It sees the last / char at
the end as the second / of an inline comment, where it might be a
division token or the start of either type of comment.
The second bug is that src2html improperly handles strings with
embedded quotes preceded by escaped backslashes, e.g. "ab\\\"cd". It
believes the string terminated in the middle, and the last quote
starts a new string. This issue is unlikely in actual code, but
should be handled correctly.
The first patch fixes these, and a some cases where there are
dangling/missing tokens which my validation tools are noticing. These
occur in some unused macros, dead code sections, and in some macros
that are deliberately misbalanced (v9938.c, psx.c). In the deliberate
cases, I balanced the braces by making exactly one open and one close
macro and using those throughout.
The second patch is then a set of visible whitespace "problems". Cases
where the closing brace isn't at the same indent level as the open
brace, and some cases where the indent level isn't a multiple of four.
In the case of ssv.c I folded the assignments into init_ssv() to
simplify the code and restore the brace balance, otherwise I kept to
simply adding or removing whitespace.
~aa
|
|
|
|
|
|
| |
- Moved LFO vars inside the chip struct
- Changed SSG-EG to update before channel calcs
|
| |
|
|
- Split YM2612/3834 to a separate file to avoid disturbing other OPN chips
- SSG-EG, envelope, LFO, and CSM behavior all improved to better match
tested behavior on real YM2612 chips
|