Commit Graph

108 Commits

Author SHA1 Message Date
Scott Stone
a4098e8a3a Some cleanup of some observed #include redundancy from source files which use emu.h (nw) 2012-02-06 01:30:22 +00:00
Aaron Giles
ed0207f126 Move devices into a proper hierarchy and handle naming
and paths consistently for devices, I/O ports, memory
regions, memory banks, and memory shares. [Aaron Giles]

NOTE: there are likely regressions lurking here, mostly
due to devices not being properly found. I have temporarily
added more logging to -verbose to help understand what's
going on. Please let me know ASAP if anything that is being
actively worked on got broken.

As before, the driver device is the root device and all 
other devices are owned by it. Previously all devices
were kept in a single master list, and the hierarchy was
purely logical. With this change, each device owns its
own list of subdevices, and the hierarchy is explicitly
manifest. This means when a device is removed, all of its
subdevices are automatically removed as well.

A side effect of this is that walking the device list is
no longer simple. To address this, a new set of iterator
classes is provided, which walks the device tree in a depth
first manner. There is a general device_iterator class for
walking all devices, plus templates for a device_type_iterator
and a device_interface_iterator which are used to build
iterators for identifying only devices of a given type or
with a given interface. Typedefs for commonly-used cases
(e.g., screen_device_iterator, memory_interface_iterator)
are provided. Iterators can also provide counts, and can
perform indexed lookups.

All device name lookups are now done relative to another 
device. The maching_config and running_machine classes now
have a root_device() method to get the root of the hierarchy. 
The  existing machine->device("name") is now equivalent to
machine->root_device().subdevice("name").

A proper and normalized device path structure is now
supported. Device names that start with a colon are
treated as absolute paths from the root device. Device
names can also use a caret (^) to refer to the owning
device. Querying the device's tag() returns the device's
full path from the root. A new method basetag() returns
just the final tag.

The new pathing system is built on top of the 
device_t::subtag() method, so anyone using that will 
automatically support the new pathing rules. Each device
has its own internal map to cache successful lookups so
that subsequent lookups should be very fast.

Updated every place I could find that referenced devices,
memory regions, I/O ports, memory banks and memory shares
to leverage subtag/subdevice (or siblingtag/siblingdevice
which are built on top).

Removed the device_list class, as it doesn't apply any
more. Moved some of its methods into running_machine
instead.

Simplified the device callback system since the new 
pathing can describe all of the special-case devices that
were previously handled manually.

Changed the core output function callbacks to be delegates.

Completely rewrote the validity checking mechanism. The
validity checker is now a proper C++ class, and temporarily
takes over the error and warning outputs. All errors and 
warnings are collected during a session, and then output in
a consistent manner, with an explicit driver and source file
listed for each one, as well as additional device and/or
I/O port contexts where appropriate. Validity checkers 
should no longer explicitly output this information, just
the error, assuming that the context is provided.

Rewrote the software_list_device as a modern device, getting
rid of the software_list_config abstraction and simplifying
things.

Changed the way FLAC compiles so that it works like other
external libraries, and also compiles successfully for MSVC
builds.
2012-01-24 20:18:55 +00:00
Aaron Giles
af94c692bb Switch to using delegates for some callbacks:
- non-device timer callbacks
 - machine state changing callbacks
 - configuration callbacks
 - per-screen VBLANK callbacks
 - DRC backend callbacks

For the timer case only, I added wrappers for the old-style functions.
Over time, drivers should switch to device timers instead, reducing the
number of timers that are directly allocated through the scheduler.
2011-04-27 20:34:45 +00:00
Aaron Giles
919913f118 Collapsed device_config and device_t into one class. Updated all
existing modern devices and the legacy wrappers to work in this
environment. This in general greatly simplifies writing a modern
device. [Aaron Giles]

General notes:
 * some more cleanup probably needs to happen behind this change,
   but I needed to get it in before the next device modernization 
   or import from MESS  :)

 * new template function device_creator which automatically defines
   the static function that creates the device; use this instead of
   creating a static_alloc_device_config function

 * added device_stop() method which is called at around the time
   the previous device_t's destructor was called; if you auto_free
   anything, do it here because the machine is gone when the 
   destructor is called

 * changed the static_set_* calls to pass a device_t & instead of
   a device_config *

 * for many devices, the static config structure member names over-
   lapped the device's names for devcb_* functions; in these cases
   the members in the interface were renamed to have a _cb suffix

 * changed the driver_enumerator to only cache 100 machine_configs
   because caching them all took a ton of memory; fortunately this
   implementation detail is completely hidden behind the 
   driver_enumerator interface

 * got rid of the macros for creating derived classes; doing it
   manually is now clean enough that it isn't worth hiding the
   details in a macro
2011-04-27 05:11:18 +00:00
Aaron Giles
fecfc465df Switch from m_machine to machine() everywhere. In some cases this
meant adding a machine() accessor but it's worth it for consistency.
This will allow future changes from reference to pointer to happen
transparently for devices. [Aaron Giles]

Simple S&R:
m_machine( *[^ (!=;])
machine()\1
2011-04-18 20:06:43 +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
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
Aaron Giles
06ee6804dd Converted core_options to a class. Removed a bunch of marginal
functionality in favor of alternate mechanisms. Errors are
now reported via an astring rather than via callbacks. Every
option must now specify a type (command, integer, float, string,
boolean, etc). Command behavior has changed so that only one
command is permitted. [Aaron Giles]

Changed fileio system to accept just a raw searchpath instead of
an options/option name combination. [Aaron Giles]

Created emu_options class dervied from core_options which wraps
core emulator options. Added mechanisms to cleanly change the
system name and add/remove system-specific options, versus the
old way using callbacks. Also added read accessors for all the
options, to ensure consistency in how parameters are handled.
Changed most core systems to access emu_options instead of
core_options. Also changed machine->options() to return emu_options.
[Aaron Giles]
 
Created cli_options class derived from emu_options which adds the
command-line specific options. Updated clifront code to leverage
the new class and the new core behaviors. cli_execute() now accepts
a cli_options object when called. [Aaron Giles]

Updated both SDL and Windows to have their own options classes,
derived from cli_options, which add the OSD-specific options on
top of everything else. Added accessors for all the options so
that queries are strongly typed and simplified. [Aaron Giles]

Out of whatsnew: I've surely screwed up some stuff, though I have
smoke tested a bunch of things. Let me know if you hit anything odd.
Also I know this change will impact the WINUI stuff, please let me 
know if there are issues. All the functionality necessary should 
still be present. If it's not obvious, please talk to me before 
adding stuff to the core_options class.
2011-03-03 17:05:24 +00:00
Aaron Giles
1b54456be5 mame_file is now emu_file and is a class. It is required
to pass a core_options object to the constructor, along with
a search path. This required pushing either a running_machine
or a core_options through some code that wasn't previously
ready to handle it. emu_files can be reused over multiple 
open/close sessions, and a lot of core code cleaned up
nicely as things were converted to them.

Also created a file_enumerator class for iterating over files
in a searchpath. This replaces the old mame_openpath functions.

Changed machine->options() to return a reference.

Removed public nvram_open() and fixed jchan/kaneko16 to
stop directly saving NVRAM.

Removed most of the mame_options() calls; this will soon go 
away entirely, so don't add any more.

Added core_options to device_validity_check() so they can be
used to validate things.
2011-02-12 03:47:37 +00:00
Fabio Priuli
c1dcd436fd cheat.c: added support for cheats with software list shortnames [Fabio Priuli] 2011-01-12 14:55:40 +00:00
Aaron Giles
92b3dd111f Cleanup & version bump. 2010-11-08 09:08:55 +00:00
Aaron Giles
a2ce61ac6c Converted the expression engine to C++, did the usual cleanup. 2010-11-01 07:48:02 +00:00
Aaron Giles
354eec3124 C++-ified the cheat engine. 2010-10-27 05:16:06 +00:00
Aaron Giles
3beb0ec246 Converted render.c objects into C++ objects. Updated all callers. 2010-10-13 06:20:10 +00:00
Aaron Giles
0e09afc1a8 Added bool operator to astring, returning true if the string is
not empty. Conveniently, this creates ambiguity if you write
astring == NULL. Rooted out remaining cases where we were doing
that and fixed them.
2010-08-21 19:23:48 +00:00
Aaron Giles
5f174240f1 Fix crash when loading cheats, plus a bit of minor cleanup. 2010-08-21 19:05:14 +00:00
Aaron Giles
30662dcdef Cleanups and version bump. 2010-07-06 17:30:28 +00:00
Miodrag Milanovic
48d8e3d3cf Update cheat loading to support image devices (moved implementation from MESS), use only CRC of first found image. [Miodrag Milanovic] 2010-07-02 12:21:03 +00:00
Aaron Giles
733b797a3d Split mame.c into mame.c and machine.c, the latter containing the
running_machine definition and implementation.

Moved global machine-level operations and accessors into methods on the
running_machine class. For the most part, this doesn't affect drivers
except for a few occasional bits:

  mame_get_phase() == machine->phase()
  add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...)
  add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...)
  mame_get_base_datetime() == machine->base_datetime()
  mame_get_current_datetime() == machine->current_datetime()

Cleaned up the region_info class, removing most global region accessors
except for memory_region() and memory_region_length(). Again, this doesn't
generally affect drivers.
2010-06-30 03:46:21 +00:00
Scott Stone
cb93774e22 Disable many unused variables as identifed by cppcheck. [Oliver Stöneberg] 2010-04-23 23:21:39 +00:00
Couriersud
77cc6538e1 UI menu interface changes
- all ui functions now expect a render_container
- removed all macros referencing render_container_get_ui
- ui_menu_alloc now is passed a container to which to render the menu.
This is a first round of changes to allow using ui_* functions in a more generic way.
2010-01-27 23:52:28 +00:00
Aaron Giles
d51551f303 Fix cheat crash and comment display. 2010-01-11 02:37:17 +00:00
Aaron Giles
4498faacd9 First round of an attempted cleanup of header files in the system.
- 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!)
2010-01-10 00:29:26 +00:00
Aaron Giles
838b3b13c2 Oops, forgot this. 2010-01-08 17:19:41 +00:00
Aaron Giles
a92de5930c Extended the astring class wrapper into something useful, and
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.
2010-01-08 17:18:54 +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
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
Aaron Giles
e47035e834 Cleanups and version bump. 2009-09-10 08:39:42 +00:00
Aaron Giles
8f9ec7de59 Hooked up F6 again as a global cheat enable/disable. [Pugsy] 2009-09-10 07:17:35 +00:00
Aaron Giles
8fbe10c91f Cleanups and version bump. 2009-09-07 01:34:34 +00:00
Aaron Giles
a0dc0e0196 Added new function mame_fclose_and_open_next() which will close a file
and then keep searching the searchpath for the next valid file. Did some
internal rearranging in fileio.c to make this work.

Changed cheat search so that it loads *all* cheat files in all search
paths. Note that it is easy to end up with duplicate entries this way.
Some currently disabled code is present which filters out duplicates,
but the logic for doing this is quite unclear with the presence of
text-only cheats, which is why the code is disabled for now.
2009-09-03 15:54:07 +00:00
Aaron Giles
214379d953 > From: Pugsy [mailto:pugsy@gmx.net]
> Sent: Sunday, August 30, 2009 6:00 PM
> To: submit@mamedev.org
> Cc: upstephh_wip@yahoo.com
> Subject: Added display of cheat comments
> 
> Hi
> 
> One more cheat engine related change. This diff was made against u3
> with the last two diffs I sent
> already applied.
> 
> This patch reintroduces the display of the individual cheat comments,
> in the old cheat engine this
> worked by showing SET,ON or OFF in reverse video to show there was a
> comment available which could
> be displayed by pressing Shift + Enter. I've done things slightly
> different though as I've added a
> display comment key of SPACE along with a different way of showing that
> a comment is available.
> 
> It now works automatically as soon as you move over a cheat with a
> comment it uses popmessage to
> display the comment. As soon as you move or press any key (other than
> space) it nulls the
> popmessage, and by pressing space it will redisplay the comment which
> is handy if the comment is a
> lengthy one.
> 
> To see it in action look at the bottom two cheats in mslug (or any
> neogeo game for that matter).
> 
> Martin 'Pugsy' Pugh
> 
> 
> MAME Cheat File Maintainer http://mamecheat.co.uk
> Gamebase64 Team Member http://www.gamebase64.com
>
2009-09-03 09:15:18 +00:00
Aaron Giles
959fcd6269 From: Pugsy [pugsy@gmx.net]
Sent: Friday, August 28, 2009 5:20 PM
To: submit@mamedev.org
Cc: upstephh_wip@yahoo.com
Subject: Add 'Reload All' to cheat menus

Hi

This update I made against u3 with the last diff I sent already applied. What this does is to add a
'Reload All' option to the cheat menus. This allows you to edit/replace the XMLs and see the changes
quickly, without this patch you have to exit and restart MAME to see any cheat file changes.

Martin 'Pugsy' Pugh


MAME Cheat File Maintainer http://mamecheat.co.uk
Gamebase64 Team Member http://www.gamebase64.com
2009-09-03 09:01:59 +00:00
Aaron Giles
4176a014ac From Pugsy:
> 
> Currently MESS supports single system cheat xmls
> 
> eg ALL cheats for any SNES game must be in snes.xml, this means that
> there will be a lot of cheats
> that are not applicable to the  game being played.
> 
> This change reverts MESS to a close approximation of how it used to
> handle cheats. It will get the
> crc32 of the image and load only the appropriate cheats to go with that
> image/game by loading
> crc32.xml (eg. DEADBEEF.xml).
> 
> 
> These changes are within  ifdef MESS structures so should have no
> affect on MAME, and my testing has
> not encountered any problems.
> 
> Diff File attached
2009-08-19 16:45:49 +00:00
Aaron Giles
e692918b34 Added casts to ensure proper values are passed to the ctype.h functions.
[Juergen Buchmueller]
2009-06-25 08:04:39 +00:00
Aaron Giles
ab7d486957 Cleanups and version bump. 2009-05-28 15:59:16 +00:00
Aaron Giles
de269aeb45 Sent: Monday, May 11, 2009 10:32 PM
To: submit@mamedev.org
Subject: LSHIFT/<< expression diff fix

Tafoid pointed out that it's currently impossible to use '<<' in a 
cheat xml file, this fix adds an alternate LSHIFT to cheat.c and
express.c and also adds the working '>>' as an alternate RSHIFT to 
express.c (not needed in cheat.c as >> parses fine)

diff file attached
2009-05-15 05:29:09 +00:00
Aaron Giles
ad4910a8a8 Bulk change alert.
This update changes the way we handle memory allocation. Rather
than allocating in terms of bytes, allocations are now done in
terms of objects. This is done via new set of macros that replace
the malloc_or_die() macro:

  alloc_or_die(t) - allocate memory for an object of type 't'
  alloc_array_or_die(t,c) - allocate memory for an array of 'c' objects of type 't'
  alloc_clear_or_die(t) - same as alloc_or_die but memset's the memory to 0
  alloc_array_clear_or_die(t,c) - same as alloc_array_or_die but memset's the memory to 0

All original callers of malloc_or_die have been updated to call these
new macros. If you just need an array of bytes, you can use
alloc_array_or_die(UINT8, numbytes).

Made a similar change to the auto_* allocation macros. In addition,
added 'machine' as a required parameter to the auto-allocation macros,
as the resource pools will eventually be owned by the machine object.
The new macros are:

  auto_alloc(m,t) - allocate memory for an object of type 't'
  auto_alloc_array(m,t,c) - allocate memory for an array of 'c' objects of type 't'
  auto_alloc_clear(m,t) - allocate and memset
  auto_alloc_array_clear(m,t,c) - allocate and memset

All original calls or auto_malloc have been updated to use the new
macros. In addition, auto_realloc(), auto_strdup(), auto_astring_alloc(),
and auto_bitmap_alloc() have been updated to take a machine parameter.

Changed validity check allocations to not rely on auto_alloc* anymore
because they are not done in the context of a machine.

One final change that is included is the removal of SMH_BANKn macros.
Just use SMH_BANK(n) instead, which is what the previous macros mapped
to anyhow.
2009-04-26 23:54:37 +00:00
Aaron Giles
9549910dbc Sent: Saturday, March 21, 2009 3:27 PM
To: submit@mamedev.org
Subject: Simple cheat fix

Attached a very simple fix for a very stupid cut and paste error in my original submission..sorry.

Martin 'Pugsy' Pugh
2009-03-27 13:35:38 +00:00
Aaron Giles
3b302a8bae Cleanups and version bump. 2009-03-19 07:28:58 +00:00
Aaron Giles
c8585dd236 In addition to this change I added inline functions to define the
various cheat types and a table at the top to hopefully alleviate
confusion.


From: Pugsy [mailto:pugsy@gmx.net] 
Sent: Sunday, March 15, 2009 11:01 AM
To: submit@mamedev.org
Subject: Cheat.c changes

I've been having a look at cheat.c, the issue with one-shot 
list and one-shot select value cheats being indisguishable 
from perm cheats. I decided to have a look to see if I get 
it closer to the old way. I think I've managed it. I've 
attached a diff file..

It changes the One-Shot List or Selectable value cheats to display 
"Set" instead of "Off"
It stops the cheat options being activated in order when you are 
going through the possibilities These cheats are now activated by 
pressing ENTER after you have chosen an option This also pops up 
a message (examples):

		Activated
	Select Starting Stage  = 16 (0x10)

or
			Activated
	Select Temp. Current Shape PL1 = Yellow

Some simple examples to look at:
theroes "Select Starting Stage"
and
tetrist "Select Temp. Current Shape PL1"



Martin 'Pugsy' Pugh
2009-03-19 06:54:44 +00:00
Aaron Giles
5caef9210c From: Pugsy [pugsy@gmx.net]
Sent: Friday, March 13, 2009 8:59 AM
To: submit@mamedev.org
Subject: Fix for Mametesters Bug 2981

Hi

Some minor fixes (in attached diff file):-

1. Fixes this http://mametesters.org/mantis/view.php?id=2981 bug, Note I've NOT touched "#define MAX_ARGUMENTS                  32" - that
change is not required I've changed the cheat for the next beta xml cheat file release.

2. Minor typo in cidelsa.h, TAG starts with cpd rather than cdp, perhaps this should be maincpu though?

-#define CDP1802_TAG    "cpd1802"
+#define CDP1802_TAG    "cdp1802"




All the Best

Martin 'Pugsy' Pugh
2009-03-19 05:59:17 +00:00
Aaron Giles
eb539cce9d Many casts added to the core files, and various other tweaks
to make them compile as either C or C++.
2009-03-12 07:43:03 +00:00
Aaron Giles
5d89160f3b Further debugger cleanup. Symbol tables now have a global ref
as well as a per-symbol ref. Debugcpu is now clear of active
CPU references and global Machine references.
2008-11-22 16:50:00 +00:00
Aaron Giles
5816061f8e Debugger interfaces cleanup. Still more to do but this compiles and
works. Added callback parameters to the expression engine. Improved
CPU parsing so you can use a CPU tag or index in most commands that
take one. Switched to passing CPU and address space objects around
where appropriate. Lots of other minor tweaks.
2008-11-21 16:53:48 +00:00
Aaron Giles
0f3e79564d From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, September 21, 2008 10:45 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static qualifiers

Hi mamedev,

Another static function update from yours truly, almost entirely
affecting code added in the last few months to MAME.  The fixes are
the usual lot, changing enum definitions so they aren't declared,
decorating dead code/declarations with #if...#endif, and of course,
adding static where appropriate.  In addition, I fixed a bunch of
UNUSED_FUNCTON symbols to be spelled correctly (I didn't introduce
this).

~aa
2008-09-26 05:25:11 +00:00
Aaron Giles
aa2b6bd29a Cleanups and version bump. 2008-09-11 16:25:46 +00:00
Aaron Giles
89730e4d28 Added built-in "Off" states to the cheats with parameters. This is
also the default state, obviating the need for a default value. Removed
the "default" attribute as a result. Switching from "Off" to another
state first executes the "on" script followed by the "change" script.
Switching to "Off" from another state executes the "off" script. While
not off, the "run" script is executed each frame.
2008-09-06 06:57:47 +00:00
Aaron Giles
0523e9feb7 Cleanups and version bump. 2008-08-19 07:31:55 +00:00
Aaron Giles
de5cd6e5a8 Added cheat functions frombcd() and tobcd() to convert numbers to/from
BCD format. Changed "Activate" to "Set" in the menus.
2008-08-19 06:08:24 +00:00