Commit Graph

9 Commits

Author SHA1 Message Date
Aaron Giles
6a955fc076 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Remove more Machine globals, #include "deprecat.h"

Hi mamedev,

The attached patch goes through and converts a number of Machine
globals to machine locals, and then removes #include "deprecat.h" if
appropriate.  The script that generated it is included, since the
patch itself is rather large and would have been time consuming to
produce otherwise.

The script doesn't convert cases of Machine that aren't in common
macros.  I'll try to tackle those later if someone doesn't beat me to
it.

~aa
2008-04-24 06:15:00 +00:00
Aaron Giles
eeee1cb437 Rewrote core memory handlers as inline functions. These should be easier to
trace through in a debug build, yet should operate the same as before.

Created a complete set of functions for all databus sizes (8,16,32,64) and
all endiannesses. A few functions are redundant, but it is now very clear
which functions to use in which scenarios. It is also now possible to rely
on being able to access values of 8, 16, 32 or 64 bits via the built-in
accessors without fear of crashing.

Updated all cores using 8-bit handlers to explicitly call the 8-bit handlers
with the appropriate endianness.

Fixed a few games which were calling n-bit handlers directly to use the
generic forms. In the future, this is all the access drivers will have.
2008-04-09 07:31:47 +00:00
Aaron Giles
aa16ee779d Changed debugger-related code to be based off a new makefile define (DEBUGGER) which sets
a new compile-time define (ENABLE_DEBUGGER). This means that MAME_DEBUG no longer means
"enable debugger", it simply enables debugging features such as assertions and debug code
in drivers.

Also removed the various levels of opbase protection in memory.h and always just turned 
on full bounds checking.

Fixed build break due to missing ampoker.lay -> ampoker2.lay renaming.
2008-02-02 08:57:39 +00:00
Zsolt Vasvari
4930b2dbfd - Added deprecat.h that contains some deprecated/discouraged contructs (see below)
The idea is to create extra work if a driver wants to use these and hopefully
  gives an incentive to look for an alternate solution
- Added #include of deprecat.h that rely on these contructs
- Removed a bunch of unneccassary #include's from these files
2008-01-25 09:30:43 +00:00
Aaron Giles
fe41f9bd01 Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers.
Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1.

Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER and CPUINFO_INT_CLOCK_DIVIDER.

Updated a number of drivers to use cpunum_get_clock() instead of Machine->drv->cpu[x].clock.

***** Raw input clock speeds should now be specified for all CPUs in the MACHINE_DRIVER. *****

Removed explicit divisors from all drivers using the following CPU types, 
which were already specifying non-1 values for CPUINFO_INT_CLOCK_DIVIDER:
 * COP4x0
 * I8039/8048 families
 * M68(7)05, HD63705
 * M6809E
 * PIC16C5X
 * TMS32010
 * TMS340x0

In a few cases, it appears that the divisor was not being used, so I guessed in those cases whether or not
the specified clock speed was raw.
2008-01-14 00:42:14 +00:00
Aaron Giles
ee9f88963c Copyright cleanup:
- removed years from copyright notices
 - removed redundant (c) from copyright notices
 - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
2008-01-06 00:47:40 +00:00
Aaron Giles
460437f8d1 (From Atari Ace)
The attached patch adjusts most conditional logging in MAME to use the
idiom "do { if (VERBOSE) logerror x; } while (0)".   This has the
benefit that the compiler checks the syntax of the logging even in the
case it will be eliminated, and in fact a number of cases here needed
adjustments to compile because of this.
2007-12-31 02:04:39 +00:00
Aaron Giles
625c8308b9 (From Barry Rodewald)
Here is a fix I've done to the Z80 CPU core that removes the increasing 
of the R register from each IX/IY related (FD xx or DD xx) instruction.

This corrects the amount the R register should increased to to 2, 
instead of 3.  Documentation I've read suggests that the R register is 
increased by 1 for each instruction with no prefix, and by 2 for each 
instruction with a prefix (DD, FD, ED, CB, DD CB and FD CB).  This fixes

some protected cassette loaders in the MESS Amstrad CPC driver, and 
maybe others, which require the R register to be correct for the next 
routine to be decoded correctly.  I'd doubt that there is much, if any, 
noticeable impact for MAME, as the R register is really only useful to a

program as a simple random number generator (or seed).

I've tested the fix with Pacman, in MAME, and when it comes across a LD 
IX,xxxx or ADD IX,xx it will increase R by 2, whereas previously, it 
increased R by 3.
2007-12-31 01:58:34 +00:00
Aaron Giles
7b77f12186 Initial checkin of MAME 0.121. 2007-12-17 15:19:59 +00:00