Commit Graph

7706 Commits

Author SHA1 Message Date
Aaron Giles
8e261f62c8 Re-enabled malloc/free but routed them to the file+line versions. 2010-01-08 08:24:22 +00:00
Aaron Giles
ab68710ce5 Oops, forgot these files. 2010-01-08 06:11:00 +00:00
Aaron Giles
91a1b8d634 NOTE: This change requires two new osd functions: osd_malloc() and
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.
2010-01-08 06:05:29 +00:00
Fabio Priuli
26ef635515 Fix for MT03623: laserbat, catnmous: Massive slowdown
Fix for MT03620: quasar: Massive slowdown 

Please credit Quench for these fixes
2010-01-07 23:07:06 +00:00
Fabio Priuli
ddcba0be55 on behalf of Atari Ace: [patch] Eliminate taitoair view struct 2010-01-07 22:52:26 +00:00
Fabio Priuli
3b7a8c389c Misc Taito wip:
* 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
2010-01-07 22:32:22 +00:00
smf-
6c5d471f03 The starting value for an output port is now the default value, which is based on whether it is active high or low. So the device will be called the first time the line becomes active.
Changed the eeprom device to assume that the reset and clock are cleared until it's told otherwise.
Reverted the eeprom workround in cps1
2010-01-07 19:51:57 +00:00
Angelo Salese
dafd05d0ea Decoded sprite gfx format in Cyber Tank, also hooked up a debug viewer (disabled by default) 2010-01-07 19:32:25 +00:00
Angelo Salese
cf2dd90ce9 Fixed bitplane order in Cyber Tank [Angelo Salese] 2010-01-07 17:34:53 +00:00
Angelo Salese
14af2fba77 new not working
---------------

Bega's Battle [Angelo Salese]
2010-01-07 15:50:40 +00:00
Phil Bennett
9da4e99ec5 Tagged screenpl and clones as GAME_NOT_WORKING (no whatsnew) 2010-01-07 15:45:33 +00:00
Phil Bennett
7ca8ec9cc9 Hooked up TMS34020 in Metal Maniax [Phil Bennett] 2010-01-07 13:55:56 +00:00
Curt Coder
a37b9332fa VIA6522: Refactored interface to use READ/WRITE_LINE. 2010-01-07 13:06:45 +00:00
Fabio Priuli
10b94ff0a7 added driver data struct to taitoair.c and taito_b.c
more taito drivers will follow...
2010-01-07 07:30:37 +00:00
Fabio Priuli
426df9c91c Fix for MT03626: raiders, spacefrt: Background star field is missing 2010-01-07 07:22:44 +00:00
Brian Troha
b5423e802e new clone added: Mega Blast (US)
Verified dump from an actual PCB.. but still only a byte difference.

New Clone Added
----------------------------------
Mega Blast (US) [D. Beneke, hap, Smitdogg, Dumping Union]
2010-01-06 22:25:31 +00:00
Brian Troha
b0e6440261 fixes rom names for a Phraze Craze set in merit.c 2010-01-06 22:15:02 +00:00
Phil Bennett
7e07a8f26d Fixed compile warning 2010-01-06 21:34:31 +00:00
mariuszw1
ca942831df New games added or promoted from NOT_WORKING
--------------------------------------------
Second Chance [Siftware]
2010-01-06 21:17:19 +00:00
Phil Bennett
5be4dc8d54 Added some missing header declarations and static qualifiers. Added validity.h to the core for consistency as well as an explicit foo.h in each foo.c. [Atari Ace]
---------- 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
2010-01-06 21:09:25 +00:00
Phil Bennett
5373335aca Fix compile 2010-01-06 20:43:39 +00:00
Phil Bennett
f7e0c31d80 Metal Maniax improvements [Phil Bennett/luigi30]
* Fixed frame buffer display
* Started to add the other CPUs
* Added PCB layouts for layers 1 and 2
2010-01-06 20:37:21 +00:00
smf-
8d88859471 moved the fix for the crash when you toggle cheats inside cheat.c, to avoid duplicating the checks and looking up whether cheats are enabled. 2010-01-06 17:30:05 +00:00
Fabio Priuli
49b2d89ab2 Fix for MT03621: Hitting F6 without -cheat trigger causes crash
now cheat toggling has no effect if there is no OPTION_CHEAT among mame_options().
2010-01-06 16:03:02 +00:00
Paul Priest
ca5e8764f2 Fix compilation. No whatsnew. 2010-01-06 15:58:47 +00:00
Fabio Priuli
2691e9502c Removed unneeded line I forgot to delete from previous commit 2010-01-06 15:19:37 +00:00
Fabio Priuli
a2cb3afaae Fix for MT03637: dino, punisher, wof and clones: NVRAM saves correctly, but doesn't reload any changes made
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)
2010-01-06 15:12:52 +00:00
Fabio Priuli
a406d628ff Replaced all occurrences of cputag_get_cpu with devtag_get_device: the former function was just an alias and now cpus are no different from other devices
Removed cputag_get_cpu and cputag_reset (another alias, not even used in the source) from cpuexec.h
2010-01-06 13:26:30 +00:00
Paul Priest
fb8599a36c Make unidasm compile and link again. Make exception-aware (hopefully).
Note kludge of defining osd_break_into_debugger() since it is referenced from emu_fatalerror.
2010-01-06 12:37:59 +00:00
Fabio Priuli
40b9b17009 Converted taitosnd (aka tc0140syt) to be a device and updated the related drivers to use the new code 2010-01-06 11:42:34 +00:00
Fabio Priuli
2336b51f2f Forgot to commit these:
- added driver data struct & save states to gradius3.c
2010-01-06 11:38:48 +00:00
Miodrag Milanovic
fd4e438cdb [PIT8253] Corrected timer update, makes at586 show correct speed (no whatsnew needed) 2010-01-06 09:54:04 +00:00
Fabio Priuli
005ca1d374 misc Konami wip:
* 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
2010-01-05 23:24:07 +00:00
Brian Troha
70ad60b7a3 Adds missing sample rom to Gals Panic 4 (Korea) [Brian Troha, Dumping Union] 2010-01-05 23:10:22 +00:00
Bryan McPhail
5f80816033 fix zeroize protection simulation in lieu of proper dongle dump. 2010-01-05 22:50:03 +00:00
Roberto Zandona
3ce444c242 03485: mikie, mikiej, mikiehs: [possible] Possible priority issue on game completion 2010-01-05 22:16:04 +00:00
Brian Troha
975597bfa5 new clone added: Super Bar by Promat
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]
2010-01-05 22:06:49 +00:00
Aaron Giles
5885e973db Makefile changes:
- 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
2010-01-05 22:01:10 +00:00
Paul Priest
b71ecca85e Oops, revert accidental removal of some IPT_UNKNOWNs. No whatsnew. 2010-01-05 21:17:03 +00:00
Paul Priest
49a12ffcd4 Add support for Mahjong panel for mjgtaste. Makes this the default input and alters the default eeprom accordingly to match factory default. Note that you need to change both the game and the controller setting from the driver configuration when switching input sources since the two are mutually exclusive. [PsikyoFan] 2010-01-05 21:11:34 +00:00
Paul Priest
63820d05ae 00892: Fix warning message and missing level/credits in S1945iii last boss [PsikyoFan]
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
2010-01-05 21:08:43 +00:00
Phil Bennett
0b07893b18 New games marked as GAME_NOT_WORKING
------------------------------------
Vortex [tormod, Team Europe, Smitdogg, The Dumping Union]


This one appears to use an encrypted 8080. Do any decryption gurus fancy a challenge? :)
2010-01-05 13:36:56 +00:00
Phil Bennett
52613ad118 Changed berlwall, arkanoid, bakubrkr, mgcrystl to use YM2149 [Corrado Tomaselli]
Verified and corrected clocks in halleys and exctsccr [Corrado Tomaselli]

New clones added
----------------

Exciting Soccer (Japan set 2) [Corrado Tomaselli]
2010-01-05 12:48:14 +00:00
Andrew Gardner
ff1891ea23 hng64: Hacked 3d acknowledge in a slightly different manner. Sams64 games now show 3d. [Andrew Gardner]
NOTES NOT IN WHATSNEW:
This makes all games in hng64.c display a good amount of 3d.
The read handler I modified definitely seems to have something to do with
the missing 3d in these games.  It's only read if the frame being drawn
is missing geometry.  My new hack is a lucky guess, but hopefully we'll
figure out what this function is really looking for sometime soon.

Snaps here: http://www.mameworld.info/ajg/
2010-01-05 05:36:06 +00:00
Angelo Salese
7c1429be20 Added newer set 3, dumped by Grull Osgo 2010-01-04 21:09:15 +00:00
Angelo Salese
33f4b9edb4 Fixed a bunch of minor quirks, and fixed gfxs 2010-01-04 20:45:53 +00:00
Angelo Salese
e29d6587ac new not working
---------------

Quarter Horse [Ruben Panossian, Angelo Salese]

============================================

Same HW as Dwarfs Den, yay...
2010-01-04 20:31:35 +00:00
Angelo Salese
e0b72fd796 new not working
---------------

Monza GP [Tomasz Slanina]

================================

roms at current/m/monzagp.zip
2010-01-04 19:37:50 +00:00
Angelo Salese
113e36effd new not working
---------------

Vega [David Haywood]

================================

roms at current/v/vega.zip
2010-01-04 16:40:47 +00:00
Roberto Zandona
26b96a6751 added 2 opcodes 2010-01-04 13:49:21 +00:00