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.



git-svn-id: svn://dspnet.fr/mame/trunk@9605 749742ba-7341-0410-aadc-df50b521781e
Added call to add device with parameters sent and his sub devices (no whatsnew)

git-svn-id: svn://dspnet.fr/mame/trunk@9606 749742ba-7341-0410-aadc-df50b521781e
MAME doesn't like uppercase ROM names.

git-svn-id: svn://dspnet.fr/mame/trunk@9607 749742ba-7341-0410-aadc-df50b521781e
New clones added
----------------
Marvel Vs. Capcom: Clash of Super Heroes (USA 971222) [Razoola]

git-svn-id: svn://dspnet.fr/mame/trunk@9608 749742ba-7341-0410-aadc-df50b521781e
less confusing names for slapfight bootlegs

git-svn-id: svn://dspnet.fr/mame/trunk@9609 749742ba-7341-0410-aadc-df50b521781e
(a77)

git-svn-id: svn://dspnet.fr/mame/trunk@9610 749742ba-7341-0410-aadc-df50b521781e
Fix compiling on non-windows SDL targets. (no whatsnew)


git-svn-id: svn://dspnet.fr/mame/trunk@9611 749742ba-7341-0410-aadc-df50b521781e
Unbreak kuniokunb (no whatsnew)

git-svn-id: svn://dspnet.fr/mame/trunk@9612 749742ba-7341-0410-aadc-df50b521781e
Turn off the bool warning.


git-svn-id: svn://dspnet.fr/mame/trunk@9613 749742ba-7341-0410-aadc-df50b521781e
Also unbreak Performan (no whatsnew)

git-svn-id: svn://dspnet.fr/mame/trunk@9614 749742ba-7341-0410-aadc-df50b521781e
Resurrect the old sampling profiler, and improve it to be useful:
 - always available now, just specify -profile <n> to enable it
 - supports stack walking to uniquely identify call chains; the <n> parameter
    to the -profile option specifies how deep to go
 - automatically turns off throttling and multithreading, and sets the number of
    processors available to 1 (since we only sample the main thread)
 - output now uses the common symbol lookup, which actually uses the PDB for
    MSVC builds and gives excellent results (may eventually figure out how to
    extract gcc symbols someday)
 - the top 30 unique call chains are output


git-svn-id: svn://dspnet.fr/mame/trunk@9615 749742ba-7341-0410-aadc-df50b521781e
Fix performance regression for PowerPC games. The timing made heavy use of
cpu_get_total_cycles() which is now slow. Better to use the legacy_cpu_device
directly and call device->total_cycles() which avoids the dynamic_cast to find
the execute interface from a generic device.

Also added cycles_to_attotime() and attotime_to_cycles() which is more often
what is requested. (Clocks are the raw input clock, while cycles are internal
clock after dividers/multipliers.)


git-svn-id: svn://dspnet.fr/mame/trunk@9616 749742ba-7341-0410-aadc-df50b521781e
Fixes to get OSX debugger working again. (no whatsnew)


git-svn-id: svn://dspnet.fr/mame/trunk@9617 749742ba-7341-0410-aadc-df50b521781e
Remove most other instances of cpu_get_total_cycles.


git-svn-id: svn://dspnet.fr/mame/trunk@9618 749742ba-7341-0410-aadc-df50b521781e
Remove the following functions:

  cpu_get_total_cycles()   == cpudevice->total_cycles()
  cpu_clocks_to_attotime() == cpudevice->cycles_to_attotime()
  cpu_attotime_to_clocks() == cpudevice->attotime_to_cycles()

In some cases, I updated existing code that fetched and cached 
devices to fetch them as cpu_device so that these can be called
without casting.

In other cases, I did the quick & dirty thing which was to downcast
a generic device to a cpu_device and then call the function.

Note that cpu_clocks_to_attotime() and cpu_attotime_to_clocks()
were previously mapping to the device-level functions
clocks_to_attotime() and attotime_to_clocks(). This was different
behavior than before the big devices change, so with this update
I have fixed it to match the previous behavior (i.e., map cycles
not clocks).

This may impact timing of drivers that used these functions on
CPUs that have clock dividers or multipliers.



git-svn-id: svn://dspnet.fr/mame/trunk@9619 749742ba-7341-0410-aadc-df50b521781e
correct dipswitch location order in World Rally to match actual dips as seen by the game / service menu

git-svn-id: svn://dspnet.fr/mame/trunk@9620 749742ba-7341-0410-aadc-df50b521781e
Use UINT64s for converting cycles <-> clocks.


git-svn-id: svn://dspnet.fr/mame/trunk@9621 749742ba-7341-0410-aadc-df50b521781e
namcos22.c: updated ridgerac, raveracw and acedrvrw to use keys instead of dipswitches for shifters [Fabio Priuli]

out of whatsnew: the code is maybe not the ideal solution, but dipswitches were neither, imho. test mode shows no change in functionalities compared to the old code, but the new implementation makes a lot easier the actual use of shifter in-game

git-svn-id: svn://dspnet.fr/mame/trunk@9622 749742ba-7341-0410-aadc-df50b521781e
New games marked as GAME_NOT_WORKING
------------------------------------
Raiden DX (Great Britain) [arcaderelics]

git-svn-id: svn://dspnet.fr/mame/trunk@9623 749742ba-7341-0410-aadc-df50b521781e
make the new dx set the parent, clean up setnames, change year to 94

git-svn-id: svn://dspnet.fr/mame/trunk@9624 749742ba-7341-0410-aadc-df50b521781e