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
Verified dump from an actual PCB.. but still only a byte difference.
New Clone Added
----------------------------------
Mega Blast (US) [D. Beneke, hap, Smitdogg, Dumping Union]
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sat, Dec 26, 2009 at 5:01 PM
Subject: [patch] Header/static cleanups
To: submit@mamedev.org
Cc: atariace@hotmail.com
- Hide quoted text -
Hi mamedev,
This patch add some missing header declarations and static qualifiers,
and adjusts a few names. In the core, it adds validity.h for
consistency as well as an explicit foo.h in each foo.c.
~aa
Fixed knights rom labels [Dlfrsilver]
Note: the eeprom bug seems a bit weird (only half of the games are affected) and I'm still not sure if the problem is in the input_port_write code (some mask issue?) or in cps1.c...
however, using a device write handler seems an acceptable workaround (and the issue is clearly mentioned in the source)
* moved a few routines (used for sorting graphics layers) to konicdev.c since they are shared by several drivers
* added driver data struct to ajax.c and aliens.c
* added driver data struct + save states to: asterix.c, bishi.c, blockhl.c, bottom9.c, chqflag.c, crimfght.c, dbz.c,
gbusters.c, gijoe.c, lethal.c, mainevt.c, moo.c, overdriv.c, parodius.c,
rollerg.c, rungun.c, simpsons.c, spy.c, surpratk.c, tail2nos.c, thunderx.c,
tmnt.c, ultraman.c, vendetta.c, xexex.c and xmen.c
* updated some Konami drivers above to separately allocate palette/extra/work RAM instead of appending them to maincpu ROM; also, reduced maincpu rom regions where appropriate
* replaced memory_set_bankptr with memory_set_bank where necessary
Added PCB layout for PROMAT bootleg hardward used by Wiggie Waggie and Super Bar [Brian Troha]
New Clone Added
-----------------------------
Super Bar [Brian Troha, David Haywood, Dumping Union]
- Changed INLINE to map to "static inline"
- (Windows only) Made -static-libgcc standard for both 32-bit and 64-bit
- (Windows only) Some fixes for MSVC builds
00266: Add dynamic bank configuration for pre/post line blending, fixes gradient in daraku and fades on special moves and adds (more) effects to soldivid
------------------------------------
Vortex [tormod, Team Europe, Smitdogg, The Dumping Union]
This one appears to use an encrypted 8080. Do any decryption gurus fancy a challenge? :)