it was originally allocated.
Changed machine->region() to return a pointer to the now-public
region_info class.
Added new member function space() to the device_config, along with
shorter constants to be used (AS_PROGRAM, AS_DATA, AS_IO). With no
parameters, space() returns the first address space, which is
commonly the only space present. Updated a few devices that referenced
the old space[] array to call the new function instead.
Added #define to emualloc to ensure delete can't be freely used.
---------- Forwarded message ----------
From: Oliver Stöneberg <oliverst@online.de>
Date: Thu, Dec 31, 2009 at 2:45 PM
Subject: mameconfig version in -listxml
To: submit@mamedev.org
This patch adds the mameconfig version to the -listxml output
- Renamed set kkgalax to ckongmc
- Changed descriptions for ckongg and ckongmc
- Fixed dip switches and inputs for ckongg and ckongmc
- Updated ckongmc memory map
---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Sat, Jan 2, 2010 at 10:13 AM
Subject: RF5C68 addition
To: submit@mamedev.org
Hi,
Here is a small update for the RF5C68 PCM core. For the FM Towns MESS
driver, there needs to be some way to tell when a PCM sample has ended
or looped, as the system can generate an interrupt at this point,
usually to end the sample playback on the specified channel. From the
RF5C68(A) datasheet, there appears to be no obvious way for an IRQ
signal to be sent, so I figure the PCM IRQ setup must be external to
the PCM chip itself.
Thus, I've added a simple callback, which should be called when the
end of a sample is reached, and with a parameter for the device
itself, and the channel on which the sample has ended.
Example of the result, with callback implemented:
http://mahlemiut.marpirc.net/mess_raiden.mp3 (sound effects are done
by the RF5C68, music is CD-DA).
Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
- 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!)
---------------
Track & Field (NZ Bootleg?) [Siftware, Tafoid]
Comments: I've set up the roms in the order I believe they should be. Everything but the maincpu roms mirror that of Track and Field and I have to assume the decryption used for T&F is not the same for this game.
Added driver data struct to ninjaw.c, slapshot.c, warriorb.c, wgp.c
There is still some TC0100SCN issue when reloading, which corrupts tilemap2, hence no save states in the latter drivers atm
useable as a stack object. Also designed the interfaces to allow
for chaining operations. And added a casting operator to const
char * for seamless use in most functions that take plain old C
strings.
Changed all uses of astring to use the object directly on the
stack or embedded in objects instead of explicitly allocating
and deallocating it. Removed a lot of annoying memory management
code as a result.
Changed interfaces that accepted/returned an astring * to
use an astring & instead.
Removed auto_alloc_astring(machine). Use
auto_alloc(machine, astring) instead.
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.
* added driver data struct to taito_l.c & opwolf.c
* added driver data struct + save states to asuka.c (cadash was not supporting saves), rainbow.c, rastan.c, taito_f2.c, taito_h.c, taito_o.c, taito_z.c, topspeed.c & volfied.c
not worth mentions:
* renamed a couple of megablst clones for consistency (as per stephh's remark)
* slightly changed tnzs RAM/ROM banks behaviour to avoid writes on ROM banks