Commit Graph

11844 Commits

Author SHA1 Message Date
Aaron Giles
8409f7d323 Final bulk rename for 0.142: ensure that all members of
driver_device classes have an m_ prefix on them. When we
eventually move functions using these into member functions,
we will be able to remove the state-> pointers, and having
the member variables prefixed will allow them to be
distinguished from local variables.

Some regex'es used (plus manually fixing the remaining stuff):

In src/mame/...

state->([a-zA-Z_][^_][a-zA-Z0-9_]*)
state->m_\1

state->([^m]_[a-zA-Z0-9_]*)
state->m_\1

state->m_save_item
state->save_item

state->m_save_pointer
state->save_pointer

(AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_])
\1m_\2

(AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_])
\1m_\2m_\3

(AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_])
\1m_\2

m__
m_


In src/mame/includes/...

(\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$
\1m_\2

(\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$
\1m_\2
2011-04-01 06:50:56 +00:00
Scott Stone
86afc9b913 Mapping change for all "pinball" titles. (no whatsnew)
Comment:
This is a simple replace of:
ADDRESS_MAP_UNMAP_HIGH
to
AM_RANGE(0x0000, 0xffff) AM_NOP (or ffffff for 16-bit cpus)

Until the pinball drivers begin to be worked on and considering how slowly most of these drivers run while essentially doing nothing but displaying a picture, this change greatly increases the performance allowing for quicker regression checks.
2011-04-01 04:32:38 +00:00
Scott Stone
b065e54637 Some commenting of excessive mame_printf_debug usages for a few drivers currently not in active development. (no whatsnew) 2011-03-31 19:29:08 +00:00
Miodrag Milanovic
33c28764d1 Fixed compiling tools in MAME and MESS side (no whatsnew) 2011-03-31 13:21:58 +00:00
Aaron Giles
e86777d670 MT#04286 - explicitly construct adpcm_state which is embedded in the legacy
device state for Seibu ADPCM. Legacy device tokens are just allocated as a
dumb blob of bytes, so constructors for embedded objects are never called.
2011-03-31 06:26:41 +00:00
Aaron Giles
bcf9e72cc5 MT#04288.
Use a named memory area instead of either generic spriteram or
a state-specific spriteram to allow sei_crtc.c to find the 
spriteram for games that use it.
2011-03-31 06:11:26 +00:00
Aaron Giles
346a02cccf Fix MT#04291
Added new macro MACHINE_CONFIG_DERIVED_CLASS() which works just like
MACHINE_CONFIG_DERIVED() except you can specify an alternate driver_device
class. Used this in the 8080bw.c games which require an _8080bw_state, but
derive from mw8080bw_root which has the base class mw8080bw_state.
2011-03-31 06:00:53 +00:00
Aaron Giles
bf65492d5e MT#04287,04289 -- hook up bootleg video systems properly 2011-03-31 05:31:28 +00:00
Angelo Salese
bc045a00bd Improved TODO list for dec0, not worth 2011-03-30 23:58:44 +00:00
Angelo Salese
340571e69c Fix compile 2011-03-30 23:25:35 +00:00
Angelo Salese
00f3454dae fixed multiwidth sprites in decmxc06.c, removed code which appeared to serve no purpose other than to break the birdtry gfxdecode in machine/dec0.c [David Haywood] 2011-03-30 22:49:02 +00:00
Wilbert Pol
446be9ae42 Fix osx compile. 2011-03-30 20:29:36 +00:00
Olivier Galibert
9300bf632c The scripts did an interesting number on the sdl/debugwin.c file :-) 2011-03-30 20:13:55 +00:00
smf-
00fb8baaff fixed build. 2011-03-30 18:45:05 +00:00
Curt Coder
9ce28237de Imported uPD1990A RTC from MESS. (no whatsnew) 2011-03-30 18:36:47 +00:00
Scott Stone
9809123a38 NEW CLONE NOT WORKING
=====================
Fashion Gambler (Set 2)  [Team Europe]
2011-03-30 17:59:38 +00:00
Angelo Salese
49eeca47b4 Implemented karnov style sprites in its own file, shared with karnov and dec8 drivers [David Haywood] 2011-03-30 15:42:18 +00:00
Aaron Giles
9443be8017 Minor cleanups. 2011-03-30 07:16:02 +00:00
Aaron Giles
28fdb61512 Move overridable device->rom_region(), device->machine_config_additions(), and
device->input_ports() to protected methods. Added non-virtual wrappers around
them.
2011-03-30 06:27:49 +00:00
Aaron Giles
ee8ae2b1d8 Make the symbol table use a simple_list for its cache. 2011-03-29 17:01:49 +00:00
Aaron Giles
e79aa8fec8 Add template specializations for device/state/memory interfaces that are
non-const, so that the generic one doesn't get selected. Should fix some
recent performance regressions.
2011-03-29 17:01:21 +00:00
Aaron Giles
1b5697945d If we get an error parsing options, see if there was no command and what
looks like an invalid system name. In that case, provide suggestions
for the system name instead of reporting the options error.
2011-03-29 16:43:54 +00:00
Aaron Giles
340fda9b68 Two hash_collections can only match if they have at least one matching hash. 2011-03-29 16:38:53 +00:00
Aaron Giles
17e077da3a Remove redundant item cpu from address_space, in favor of
space->device().

S: space->cpu->
R: space->device\(\)\.

S: space->cpu
R: \&space->device\(\)
2011-03-29 16:31:32 +00:00
Aaron Giles
2ad5072023 BIG update.
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 *)
2011-03-29 15:50:04 +00:00
Curt Coder
b72cf3c570 Imported MSM6255 LCD controller device from MESS. (no whatsnew) 2011-03-29 07:19:09 +00:00
Scott Stone
ea0681da07 Converted Stadium Hero, Cobra-Command, Psycho-Nics Oscar to use the common deco sprite functions [David Haywood] 2011-03-28 23:18:31 +00:00
Angelo Salese
b0b5ca8b43 Converted Vapor Trail to use the common deco sprite functions [David Haywood] 2011-03-28 22:40:24 +00:00
Angelo Salese
b5e083afa3 Converted Act Fancer to use common deco sprite code [David Haywood] 2011-03-28 22:05:15 +00:00
Angelo Salese
01c56fd81f started moving common deco MXC06 sprite controller code to it's own device files, reducing code duplication [David Haywood] 2011-03-28 21:41:32 +00:00
Wilbert Pol
f3916bed57 Fix osx compile. 2011-03-28 20:50:41 +00:00
Curt Coder
399c6e8c26 Imported some common C++ devices from MESS to emu folder. 2011-03-28 20:15:05 +00:00
Michaël Banaan Ananas
90306a806f gamename revert: http://www.mametesters.org/view.php?id=4295 2011-03-28 17:27:36 +00:00
Angelo Salese
82a14bf9fd Converted Pocket Gal to use the common deco video routines [David Haywood] 2011-03-28 16:53:26 +00:00
Miodrag Milanovic
da5fb6dd0d Another fix for SDL build, not seen by win32 build (no whatsnew) 2011-03-28 12:00:04 +00:00
Miodrag Milanovic
09b83b1c61 Fix compile for SDL build (no whatsnew) 2011-03-28 11:24:52 +00:00
Aaron Giles
9801970e5f Fix address_space::unmap_write to pass ROW_WRITE instead of ROW_READWRITE
Fixes Amiga breakage.
2011-03-28 09:12:22 +00:00
Aaron Giles
af071893a6 Cleanup of machine.h. Shuffled some fields around, and moved several
to private member variables with accessors:

machine->m_respool     ==> machine->respool()
machine->config        ==> machine->config()
machine->gamedrv       ==> machine->system()
machine->m_regionlist  ==> machine->first_region()
machine->sample_rate   ==> machine->sample_rate()

Also converted internal lists to use simple_list.
2011-03-28 09:10:17 +00:00
Angelo Salese
58f70e9184 Converted Stadium Hero driver to use the common Deco video functions [David Haywood] 2011-03-28 01:47:19 +00:00
Angelo Salese
b40cf676fc Converted Act Fancer, Trio the Punch and Mad Motor to use the common deco video functions [David Haywood] 2011-03-27 23:33:36 +00:00
Angelo Salese
41562709b6 some work on the 3 games in dec8.c which use the bac06 tilemaps[David Haywood] 2011-03-27 20:09:30 +00:00
Michaël Banaan Ananas
eb209b150f (DELUXE -> Deluxe) 2011-03-27 18:44:10 +00:00
Michaël Banaan Ananas
0cefe1d8ba fix compile 2011-03-27 18:40:28 +00:00
Fabio Priuli
b6e9cb012a uiimage.c: Improved File Manager usage (in the internal UI) by catching char inputs and searching for matching names among files and directories [Fabio Priuli] 2011-03-27 18:07:22 +00:00
Aaron Giles
a80dcb629b Deprecate the old memory_install_* macros. Dynamic installation is now handled
directly by calling methods on the address_space, which have been expanded with
aliases to cover all previous situations. In addition, variants with no mirror
or mask value are provided to cover the common cases:

memory_install_read*_handler(space, begin, end, mirror, mask, handler) ==>
    space->install_legacy_read_handler(begin, end [, mirror, mask], FUNC(handler))

memory_install_write*_handler(space, begin, end, mirror, mask, handler) ==>
    space->install_legacy_write_handler(begin, end [, mirror, mask], FUNC(handler))

memory_install_readwrite*_handler(space, begin, end, mirror, mask, rhandler, whandler) ==>
    space->install_legacy_readwrite_handler(begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler))

memory_install_read*_device_handler(space, device, begin, end, mirror, mask, handler) ==>
    space->install_legacy_read_handler(*device, begin, end [, mirror, mask], FUNC(handler))

memory_install_write*_device_handler(space, device, begin, end, mirror, mask, handler) ==>
    space->install_legacy_write_handler(*device, begin, end [, mirror, mask], FUNC(handler))

memory_install_readwrite*_device_handler(space, device, begin, end, mirror, mask, rhandler, whandler) ==>
    space->install_legacy_readwrite_handler(*device, begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler))

memory_install_read_port(space, begin, end, mirror, mask, port) ==>
    space->install_read_port(begin, end [, mirror, mask], port)

memory_install_read_bank(space, begin, end, mirror, mask, bank) ==>
    space->install_read_bank(begin, end [, mirror, mask], bank)

memory_install_rom(space, begin, end, mirror, mask, ptr) ==>
    space->install_rom(begin, end [, mirror, mask], ptr)

memory_install_ram(space, begin, end, mirror, mask, ptr) ==>
    space->install_ram(begin, end [, mirror, mask], ptr)

memory_unmap_read(space, begin, end, mirror, mask) ==>
    space->unmap_read(begin, end [, mirror, mask])

memory_nop_read(space, begin, end, mirror, mask) ==>
    space->nop_read(begin, end [, mirror, mask])


Below are the bulk search & replace regex'es used for this

memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\)
\4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\)

memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\)
\4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\)

memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\)
\4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\)

memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\)
\4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\)

memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\)
\4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\)
\4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\)



memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\)
\4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\)

memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\)
\4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\)

memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\)
\4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\)

memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\)
\4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\)

memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)

memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\)
\3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\)



memory_install_read_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_read_port\1\(\2\4,

memory_install_read_port( *)\(( *)([^,]+), *
\3->install_read_port\1\(\2

memory_install_write_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_write_port\1\(\2\4,

memory_install_write_port( *)\(( *)([^,]+), *
\3->install_write_port\1\(\2

memory_install_readwrite_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_readwrite_port\1\(\2\4,

memory_install_readwrite_port( *)\(( *)([^,]+), *
\3->install_readwrite_port\1\(\2



memory_install_read_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_read_bank\1\(\2\4,

memory_install_read_bank( *)\(( *)([^,]+), *
\3->install_read_bank\1\(\2

memory_install_write_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_write_bank\1\(\2\4,

memory_install_write_bank( *)\(( *)([^,]+), *
\3->install_write_bank\1\(\2

memory_install_readwrite_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_readwrite_bank\1\(\2\4,

memory_install_readwrite_bank( *)\(( *)([^,]+), *
\3->install_readwrite_bank\1\(\2



memory_install_rom( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_rom\1\(\2\4,

memory_install_rom( *)\(( *)([^,]+), *
\3->install_rom\1\(\2

memory_install_ram( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_ram\1\(\2\4,

memory_install_ram( *)\(( *)([^,]+), *
\3->install_ram\1\(\2

memory_install_writeonly( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *,
\3->install_writeonly\1\(\2\4,

memory_install_writeonly( *)\(( *)([^,]+), *
\3->install_writeonly\1\(\2



memory_unmap_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->unmap_read\1\(\2\4\)

memory_unmap_read( *)\(( *)([^,]+), *
\3->unmap_read\1\(\2

memory_unmap_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->unmap_write\1\(\2\4\)

memory_unmap_write( *)\(( *)([^,]+), *
\3->unmap_write\1\(\2

memory_unmap_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->unmap_readwrite\1\(\2\4\)

memory_unmap_readwrite( *)\(( *)([^,]+), *
\3->unmap_readwrite\1\(\2



memory_nop_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->nop_read\1\(\2\4\)

memory_nop_read( *)\(( *)([^,]+), *
\3->nop_read\1\(\2

memory_nop_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->nop_write\1\(\2\4\)

memory_nop_write( *)\(( *)([^,]+), *
\3->nop_write\1\(\2

memory_nop_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\)
\3->nop_readwrite\1\(\2\4\)

memory_nop_readwrite( *)\(( *)([^,]+), *
\3->nop_readwrite\1\(\2
2011-03-27 17:34:05 +00:00
Angelo Salese
0b87c6e06a Converted DECO BAC06 tilemap (used by dec0.c) to be a device, reducing code duplication [David Haywood] 2011-03-27 13:38:52 +00:00
Fabio Priuli
5cb1e6132c megatech.xml: removed bogus attribute (we don't use merge to mark clones) 2011-03-27 11:42:21 +00:00
Fabio Priuli
ea0eaa46da clifront.c: fixed typos, not worth mention 2011-03-27 11:41:34 +00:00
Fabio Priuli
4f82940c9d romload.c: only giving a warning when loading a rom whose size is not multiple of the group size, instead of error-ing out
As I wrote to the list a couple of months ago, there are many console protos which have been compiled from sources and have been released with odd sizes. This allows to load them in MESS from softlist (they are not bad dumps, strictly speaking, given they have never been burned on a cart...)

I hope there are no objections (a clear message is still written to the console, but the loading proceeds instead of stopping)
2011-03-27 10:07:31 +00:00
Aaron Giles
202d7680a4 Created new enum type address_spacenum for specifying an address
space by index. Update functions and methods that accepted an
address space index to take an address_spacenum instead. Note that
this means you can't use a raw integer in ADDRESS_SPACE macros, so
instead of 0 use the enumerated AS_0.

Standardized the project on the shortened constants AS_* over the
older ADDRESS_SPACE_*. Removed the latter to prevent confusion.
Also centralized the location of these definitions to memory.h.
2011-03-27 07:37:24 +00:00