CPU interface organization shuffle. The file cpuintrf.h now merely
describes the interface, but does not contain any implementation.
All remaining bits of implementation have been migrated either to
cpuexec.c or to debugcpu.c. Specifically, cpu_dasm() is now
debug_cpu_disassemble(), and cpu_set_dasm_override() is now
debug_cpu_set_dasm_override(). Also moved memory_address_physical()
to debug_cpu_translate(), since it was only ever used for
debugging. [Aaron Giles]

Changed all CPU and sound cores to use memory_find_address_space()
instead of cpu_get_address_space(). The former is reliable even
during early initialization when the CPU cores generally need it.
[Aaron Giles]

Removed the dummy CPU core and cpuintrf.c. [Aaron Giles]

Changed the core execution loop to directly call the execute function
instead of using the inline helper (which has been removed).
[Aaron Giles]

Updated all the sound core header files to declare their SND_GET_INFO
functions, which will be needed once the sound cores become proper
devices. It also makes a handful of other header declaration fixes in
emu/sound, and makes one SND_RESET routine static. Note: votrax.h is
a new include file altogether. [Atari Ace]

Correctly setup the MC6845 device in the Goldnpkr driver. Added common
device interface, merged witchcrd and sloco93 machine drivers, and
added/corrected the 50/60 Hz. DIP switches to all games. The 50hz mode
needs to be corrected. Some games as most bsuerte sets have the 50/60
Hz. DIP switch connection patched. [Roberto Fresca]

Cherry Bonus III (Version 1.40) improvements: [Roberto Fresca]
- Worked the remaining inputs.
- Mapped and documented all 5 DIP switches banks.
- Worked out the conditional DIPs.
- Added PORT_DIPLOCATION to all switches.
The game is working, but need a workaround for the status connection.
Each time the player press 'Take' to get the credits, a "call
attendant" msg appear and credits must be taken pressing 'Key Out'.

Improvements to New Lucky 8 Lines: [Roberto Fresca]
- Proper 3x PPI 8255 connections.
- Created a new AY8910 interface due to different ports addressing.
- Hooked all the input banks (8).
- Improved DIP switches with main game and D-UP rates, keyin values,
D-UP game type (reels/cards) and other options to both sets.
- Added PORT_DIPLOCATION to all DSW banks.
- Promoted both sets to working state.
The game has 2 sets of controls. Once coined, both players can switch
control through their own 'BIG' key. If the game boots with 'Coin Jam'
error, press RESET to normalize. Please delete your old .nv and .cfg
files before run this update.

Improved colors of New Lucky 8 Lines. [David Haywood]

Implemented GTE divider using reciprocal table derived by pSXAuthor,
this should allow the results to be calculated as inaccurately as the
real hardware. [smf]

Fixed AT28C16 so that a write isn't allowed to start if there is one
in progress and a write isn't started if the data is already correct.
This allows my dream horse to boot again. Further investigation is
needed. [smf]

Maps all docastle.c games' third CPU rom to 0x0000 so that MAME
doesn't log unmapped reads constantly. [smf, David Haywood]

Improvements to goldstar.c driver: [Roberto Fresca]
- Added another set of Cherry Bonus III.
- Reworked and cleaned ncb3, cb3a, lucky8 and lucky8a inputs.
- Added the 2nd set of controls to the above games.
- Removed the OKI references from machine driver and rom load for the
above games.
- Promoted ncb3 and cb3a to working status.
- Reparented sets.

Wrote a placeholder driver for an unknown "fruit" ROM set. Anything
might be wrong about it... [David Haywood, Angelo Salese]

Disassembled PCs are now forcibly aligned to the minimum opcode size
and explicitly masked. [Aaron Giles]

Normalized the CPU cores to always do while (icount > 0), in order
to remove the kludge in cpuexec.c that caused us to overeat by 1 cycle
to accommodate those cores that there looping while (icount >= 0).
[Aaron Giles]

Hooked up DSA/ESA instructions for PowerPC 602 (as no-ops for now).
Also hooked up PPC602 IBR. polystar gets a little farther but crashes
due to a TLB issue. [Aaron Giles]

Removed HAS_PPC* in favor of a single HAS_POWERPC, and a single
definition in cpu.mak for all PowerPC variants. [Aaron Giles]

Made xsleena run at perfect interleave and simplified the shared RAM.
Also moved to modern banking and cleaned up memory maps a bit.
[Aaron Giles]

Added two new Windows OSD options: -debugger_font and
-debugger_font_size, which control the font and size used in the
debugger text Windows. These default to "Lucida Console" and 9pt,
which is the same face as previously hard-coded but 1pt larger.
Personally, I prefer "Consolas" 9pt, which is one of the new "C" fonts
included with Windows Vista and later (also available for free
download on older systems). Note that only fixed-width fonts really
work here, for obvious reasons. [Aaron Giles]

Added new frontend option -listbrothers. This will list all "brothers"
of a given driver, meaning those drivers that come from the same
source file, along with their parent names if they are clones. If a
wildcard name is specified for the driver, then the first driver in a
given source file will trigger a list of his brothers, and any other
drivers in the same source file which match the wildcard will be
flagged. [Aaron Giles]

Fixed i86 core so that REP instructions with high interleave actually
make forward progress. Also fixed cpu.mak dependencies for i286.
[Aaron Giles]

Added polling hooks for SP0250 DRQ line. The callback is now optional.
If not provided, then the kick timer is not used. Converted gottlieb
speech driver to use polling for SP0250 DRQ line. [Aaron Giles]

Added kludge to 6502 core such that CLI followed by RTI does not allow
any interrupts through. In the future, the 6502 interrupt handling
needs further revisiting. [Aaron Giles]

Improved graphics and sound in Grand Prix '98 [David Haywood]

Added the ability for a ROMset to specify a default BIOS. Use
ROM_DEFAULT_BIOS("biosname") in the ROM definition. This can be used
to ensure a correct default BIOS for ROM versions that care.
[Aaron Giles]

atarisy1 changes: [Kevin Eshbach]
* Support for new Atari System 1 TTL Motherboard dump (previously
MAME would crash when using it and now it just seems to hang.)
* PROMs dumped from Atari System 1 TTL Motherboard (one PLA needs
dumping though.)
* Added notes on the Atari System 1 Motherboard and some of its
supported games

popeye.c improvements: [Kevin Eshbach]
* Corrected the rom names for Popeye
* Added save state support to Popeye
* Added the dip location to the encrypted Popeye and fixed the coin
settings according to the manual (unencrypted Popeye not changed)

ldplayer works again. Added MDRV_LASERDISC_GET_DISC callback hook
which allows for dynamically finding the CHD, rather than relying
on the DRIVER_INIT hackery that was there before. [Aaron Giles]

Added a work-around for 2 Minute Drill, to get it booting again.
[Angelo Salese]

Fixed rendering of slider controls so it doesn't overlap when menus
get large. [Aaron Giles]

Fixed speed-up for Vamf x1/2 (Europe) [Pierpaolo Prazzoli]

Cleaned up the profiler. Reduced its runtime overhead significantly by
inlining the check to see if it is running. Removed obsolete entries
and updated the text to more accurately describe each one. Added CPU
tags to the CPU names. Switched to using an astring for building the
final string. Unfortunately, still a bit too much overhead to leave
it on in all builds. [Aaron Giles]

Added NO_DUMPS for the VHS on hnxmasev, hnageman, av2mj1bb and
av2mj2rg. [Angelo Salese]

Fixed auto_malloc() to randomize its memory when allocated in the
debug build. This used to be the standard, but it seems to have been
removed when the pool allocation was moved into the library. Also
changed rand_memory() to use a fixed seed for consistent behavior.
[Aaron Giles]

Removed a couple of unnecessary typedefs from mamecore.h. Updated
romload to use an astring for accumulating errors (I always feared
busting that buffer with some huge romlist). [Aaron Giles]

Lots of improvements to the different Cherry Master hardware: added
new sets, created new machine drivers, fixed colors, added PPI
devices, created new 8255 and ay8910 interfaces, worked out inputs
and DIP switches from the scratch, fixed memory maps, merged the
cherrym2.c driver with goldstar.c and much more...
[Roberto Fresca, David Haywood]

Added savestate support to 4enraya. [MooglyGuy]

Changed videopkr MCS-48 P4 control register to the PROG line, which is
more likely. The way to toggle the PROG line is to read/write/and/or
to ports 4-7. Since the board doesn't list an 8243 port expander, it
is likely the "writes" to port 4 are really just a mechanism to get
the PROG line to toggle to clear the interrupt. [Aaron Giles]

Fixed Super Triv colors. [Pierpaolo Prazzoli]

Discovered numerous new opcodes for cb2001. [robiza]

Improved mgcs. It now runs through attract mode. It still locks up as
soon as one coins up though, due to the unemulated IGS029 protection.
[Luca Elia]

Fixed more stuff with Diamond Derby, game is playable but not yet
working (due of a subtle bug, see source) [Angelo Salese]

Slot Carnival: [Roberto Fresca]
- Added gfxdecode & palette length to the machine driver, so tiles
can be viewed through F4 in case of someone wants to help.
- Defined SND_CLOCK for the ay8910.

NOTE: As of this release, we have two more major changes. These should
be the last "huge" changes of this dev cycle.

The most major change is the final retirement of the global Machine
pointer, which has been part of MAME for many years. Frankly, I never
thought we'd hit this point so quickly, so my hats off to Atari Ace
who helped push through the final round of changes needed to make this
happen finally. As a result of this change, it should be possible in
the coming year to finally write a driver that runs two full machines
simultaneously.

The second big change is that the CPUs are now full-fledged devices,
and participate like all other devices in the system configuration.
This is mainly an internal structural change, but in the end removes
some redundant code and behavior. In a future dev cycle, a similar
thing will happen with the sound cores.

Starting now, the focus for MAME will be to iron out remaining issues
and release a 0.129 sometime around the 1st of the year. Please keep
reporting bugs to MAMETesters as you find things.

Made CPUs into proper devices. CPUs are now added in the machine
configuration just as any other device, and the standard CPU
configuration is performed via the inline configuration macros.
[Aaron Giles]

Changed cpu_type from an enumeration into a pointer to the CPU's
get_info function, very similar to device behavior. Updated all
drivers to #include the necessary header files for the CPU's they
reference. [Aaron Giles, Atari Ace]

Added function cpu_get_type() to return the CPU type. [Aaron Giles]

Changed several cpu_* functions over to the device_* equivalents,
specifically for get/set info and for reset. [Aaron Giles]

The device system now maintains a parallel list of devices based on
type and class, for faster iteration through all devices of a given
type or class. [Aaron Giles]

Cleaned up code that looped over CPUs via the machine->cpu array to
now loop using the type-based device list. [Aaron Giles]

Removed start/stop/reset/nvram functions from the device_config in
favor of grabbing them as needed. [Aaron Giles]

Cleaned up the generic interrupt_enable code to work with CPU devices
instead of numbers. [Aaron Giles]

Changed a number of APIs in the system to accept running_machine,
address_space, or device_config types, in order to remove the use of
the global Machine variable. Removed the global Machine variable now
that it is no longer directly references. [Atari Ace, Aaron Giles]

Added the concept of device "owner", for devices owned by other
devices. [Aaron Giles]

Modified laserdisc players to walk back to their global device state
via the owner, rather than brute-force searching for the first
instance and hoping that is the right one. [Aaron Giles]

Made the concept of a "clock" native to devices. The clock is now
specified when the device is added, and the clock is available in
the device_config directly via device->clock. Updated all devices
that have a clock to specify it when adding the device, rather than
as part of their configuration. As part of this work, also created
device-specific _ADD and _REMOVE macros to simplify configuration.
[Aaron Giles]

Defined a generic device execute function callback, though it
is not used yet. The long term plan is that any device with an
execute callback will be scheduled along with the CPUs. Now that
CPUs are devices, their scheduling will be moved over to this
logic eventually. [Aaron Giles]

Changed various NVRAM devices to fetch their default memory region
from the device->region rather than specifying it in the
configuration. [Aaron Giles]

Moved device startup to *before* the DRIVER_INIT is called. This
is to allow the DRIVER_INIT to configure devices that have been
properly allocated. So far I don't see any negative effects, but
be on the lookout if something weird shows up. [Aaron Giles]

Rewrote the device iteration logic to make use of the typenext
field and the newly-introduced classnext field for iterating more
efficiently through devices of a given type or class. [Aaron Giles]

Modified the parameters of the stream_update_func callback. As part of
this work, macro-ized all the callbacks to STREAM_UPDATE, and added
the sound device as a parameter. [Atari Ace]

Some PIC8259 updates: [Wilbert Pol]
- Fixed operation of edge-triggered interrupts
- INT output line is now cleared when an IRQ is acknowledged
- Implemented basic OCW3 features

Fixed proms in boobhack. [robiza]

Decoded some graphics and setup some RAM in the Virtual Combat driver.
[Andrew Gardner]

Cleaned up device and sound interfaces to match the CPU interfaces
when handling strings. Namely, the generic get_info functions
allocate a temporary string and the device in question copies its
string to the target, instead of assigning a const char *. Updated
all device and sound cores to operate this way. [Aaron Giles]

Added the concept of a cpu_state_table, which is supplied by the CPU
cores and which describes all the register state accessible to the
debugger and other subsystems. The format of the table is such that
most data can be simply fetched from memory without the further
involvement of the CPU core, including the display of common formats.
Extensibility points are available for custom display and for
importing/exporting the data to intermediate variables for more
complicated scenarios. Updated the ADSP21xx, TMS340x0, i86, Z80, Z180,
and 8085 cores to use this. [Aaron Giles]

Removed the old debugger register list, which was never used. Replaced
it with using ordering from the cpu_state_table. [Aaron Giles]

Renamed REG_PC -> REG_GENPC, REG_SP -> REG_GENSP, and
REG_PREVIOUSPC -> REG_GENPCBASE. Updated a few spots that were using
these directly. Moved these definitions into the end of the register
area rather than leaving them outside which put them in a weird range.
[Aaron Giles]

More cleanup. Added address-space-specific constants for the various
bus width and shift CPU interface constants. Changed all the cores
to use them. [Aaron Giles]

Changed ADSP21xx cores to accept a configuration struct instead of
using set_info to specify serial port callbacks. Simplified the
ADSP21xx get/set info significantly. Removed support for only
including certain variants of the chips; they are now either all
supported or all unsupported. [Aaron Giles]

Memory view fixes: [Aaron Giles]
* Fixed bug that computed the wrong total size if the address
space was a full 32 bits
* Improved display to show unmapped memory with *s
* Disabled enumeration of disk and 0-length regions

Added PAL to arkgcbl. [robiza]

Added Country Girl to the Jangou driver,working with sound
[David Haywood, Angelo Salese]
- Fixed transparency pens in the Jangou driver (so removed the
GAME_IMPERFECT_GRAPHICS flag); [Angelo Salese]
- Added a kludge for Jangou Lady RNG,will be worked on in the future;
[Angelo Salese]

Added running_machine parameter to the callback in the sid interface.
[Wilbert Pol]

Removed MDRV_INTERLEAVE(x), which specified the minimum scheduling
quantum in terms of "frames" (a dubious concept now with multiple
screens and changing refresh rates). Replaced it with a new
MDRV_QUANTUM_TIME(x) which specifies the minimum scheduling quantum
as a time value. Time can be specified as HZ(x), NSEC(x), USEC(x),
etc. Updated all drivers to use this, assuming 60 was the frame
rate (this is not perfect but should work for almost all cases).
[Aaron Giles]

Changed MDRV_WATCHDOG_INIT_TIME(x) to automatically prepend
UINT64_ATTOTIME_IN_ to the parameter, ensuring there is no improper
use of this macro and bringing it in line with the MDRV_QUANTUM_TIME()
macro. Updated all callers. [Aaron Giles]

Added new MDRV_QUANTUM_PERFECT_CPU(x) to specify that the minimum
quantum should be enough to ensure that the specified CPU tag only
ever executes a single instruction at a time. This can be used to
explicitly require "perfect" synchronization for drivers that have
multiple CPUs with shared memory. Turned this on for the arknoid2
driver for now as a test (the interleave on that driver was already
very close to perfect anyway). [Aaron Giles]

Improvements to the skylncr.c driver: [Roberto Fresca, David Haywood]
- Complete reel support from the scratch.
- Full inputs, outputs & DIP switches from the scratch.
- Added new games.
- Updated technical and game notes.

Rewrote 8080/8085 interrupt handling so that it makes sense. Changed
callbacks to be specified in a config structure. Converted core to
cpu_state_table. Changed to a single HAS_808X define for both cores.
Fixed several drivers that used 8080/8085 interrupts in odd ways.
[Aaron Giles]

Converted warpwarp driver to raw video parameters. [Aaron Giles]

Fixe 'run to cursor' and 'toggle breakpoint' operations in the
debugger when dealing with CPUs that have shifted address spaces.
[Andrew Gardner]

Improvements to goldstar.c driver. [Roberto Fresca]
- Hooked the 3x PPI 8255 devices to chryigld and ncb3.
- Reworked the chryigld and ncb3 inputs based on PPI 8255 connections.
- Added the unmapped PSG sound to chryigld and ncb3.
- Some works on their machine driver.
- Some cleanups.

Made the PCI bus a device. The bus is declared in the machine config,
and the devices attached to it are enumerated there. Eventually, the
PCI config read/write functions should be moved to well-known
functions within the device, but for now they are kept separate.
[Aaron Giles]

Introduced function macros for SAMPLES_START, CUSTOM_{START,STOP,RESET},
and ANTIC_RENDERER. Pushed the running_machine * passing through these
functions. In other locations added "running_machine *machine = Machine"
to the top of functions to isolate the dependencies. [Atari Ace]

Added logic to track OSD debugger updates separately from internal
view updates. In order to get the OSD to update, a new function
debug_view_flush_updates() must be called. Currently this is
automatically called before osd_wait_for_debugger(), and during the
periodic updates while executing. The OSD code may occasionally need
to call it under other circumstances (for example, the Windows code
calls it explicitly while tracking scrollbar thumbs to get live
scrolling). [Aaron Giles]

Disabled the use of PULSE_LINE for any input lines except NMI and
RESET. Added a helper function generic_pulse_irq_line() for doing a
single-cycle assert/deassert for those few drivers remaining that were
trying to use PULSE_LINE directly. [Aaron Giles]

Widened some machine init interfaces to pass the machine parameter,
allowing more Machine global references to be eliminated. Eventually
most of these need to be converted to devices, but this change reduces
the deprecation surface in the meantime. [Atari Ace]

Relaxed the OKI 6295 command validity check. [Nicola Salmoria]

Added new function cpuexec_describe_context(machine) which can be
used in logerror() and other printf-style functions to return a
description of the current CPU/PC given only the machine. Changed
several dozen sites to use this instead of directly interrogating
the activecpu. [Aaron Giles]

Removed all other uses of activecpu throughout the system. Removed
activecpu from the machine structure to prevent future abuse.
[Aaron Giles]

Removed cpu_push_context() and cpu_pop_context(), and all call
sites. [Aaron Giles]

Voodoo devices now require a CPU to be defined in the configuration
in order to know whom to steal cycles from or stall when FIFOs get
full. Updated all voodoo users to specify one. [Aaron Giles]

CPD1869 devices now also require a CPU to be defined in the
configuration, in order to know which CPU's registers to fetch.
Updated all cdp1869 users to specify one. [Aaron Giles]

Writes to a pit8253 timer control word always restart the timer.
[Wilbert Pol]

Updated the fcompress APIs to allow for specifying a compression level.
[Aaron Giles]

Removed the concept of state saving tags, which was a hack to get save
states to work with multiple CPU cores. Simplified the state saving
system as a result, performing the operation in a single pass and
without allocating a full blob of memory. Also enabled minimal
compression. [Aaron Giles]

Squashed another deprecated use of Machine from the mame core by
plumbing machine_config into rendlay.c. [Atari Ace]

Changed attotime_to_ticks/ticks_to_attotime to use UINTs and the
eminline functions where possible. [Aaron Giles]

Changed the 6522 VIA implementation to be a device. [Nathan Woods]

Removed the ACIA6850 device from Cal Omega System 905 machine driver.
It fixes the wrong lack of SW2. [Roberto Fresca]

Fixed EI handling in the 8080/85 core to have a shadow like the Z80.
[Miodrag Milanovic]

Modified the tms34010.h, pc16552.h, and tms34061.h interfaces to
eliminate some more global Machine variables. Six more deprecat.h
includes eliminated. [Atari Ace]

Eliminated the #include "deprecat.h" from tilemap.c. The main change
is to require callers of tilemap_create to provide a machine pointer.
This pointer is then attached to the tilemap and used when needed
inside tilemap.c. [Atari Ace]

Eliminated the #include "deprecat.h" from drawgfx.h. It does so in a
fashion similar to my recent tilemap patch, adding the machine pointer
to gfx_element, changing allocgfx to take a machine, and then
adjusting the internals to use the machine field as needed.
[Atari Ace]

i960: fixed nor opcode and added notor opcode [robiza]

Fixed raster effects in nbbatman by altering the V33 prefetch timing
(just a guess as no documentation has been found). [couriersud]

Made non-critical UI warnings yellow instead so that they stand out.
[BarnacleEd]

Added Treasure Island to the Burger Time HW. It doesn't work because
I highly suspect that there's an unhandled encryption scheme in it.
[Angelo Salese]

Pointer-ified the CCPU and T-11 cores. [Aaron Giles]

Removed globals from cpuexec. Also removed ATTOTIME_TO_CYCLES() and
ATTOTIME_IN_CYCLES(). Replaced them with functions in cpuexec:
cpu_clocks_to_attotime() and cpu_attotime_to_clocks(), both of which
take CPU devices instead of indexes. Updated all callers, many of
which were using the functions dubiously. [Aaron Giles]

Changed oki 6295 to use a reasonable volume table derived from the
manual. Added popmessages to notify of invalid commands so we can
investigate them if some game uses them. It should also be noted that
many games using this chip are clipping at the moment. This is
something that might date back to when sound mixing was upgraded to
32-bit. It is sensible for the 6295 emulator to output at this level
because it ensures that bits of precision are not lost, so the mixing
levels in the drivers should be adjusted to avoid clipping.
[Nicola Salmoria]

Cool Riders: added an hack for the SH-2, fixed some irqs and some
memory maps/ram sharing. Got to the point that area 0x03e00000 on the
SH-2 loads some DMA-style tables. (and this is going to be REALLY
nasty to do without docs...) [Angelo Salese]

Important note for OSD ports: the get/set property functions have
been retired for debug_views. Instead, there are specific functions
to perform each get/set operation. In addition, the format of the
update callback has changed to pass the osd private data in, and
the update callback/osd private data must be passed in at view
allocation time. And osd_wait_for_debugger() now gets a CPU object
instead of the machine.

Removed extra debugger tracking for address spaces and added some
of the useful data to the address_space structure. Updated all
debugger commands and views to use CPU and address space objects
where appropriate.

Added new memory functions for converting between bytes and
addresses, and for performing translations for a given address
space. Removed debugger macros that did similar things in favor
of calling these functions.

Rewrote most of the memory view handling. Disasm and register views
still need some additional tweaking.

Added the concept of 'subviews' to the debugger views. The core
now creates a list of possible subviews, and the OSD can select
between them. This removes code from the OSD that was previously
required to find all possible memory and disassembly views.

Added machine parameters to debugger console output functions.

Moved globals to hang off of the machine structure.

Fixed bug where the visiblecpu was not updated immediately upon
a break.

Made the 6850 ACIA a device. [Nathan Woods]

Re-enabled the OSD key for master volume control. All other sliders
are still only accessible via the menus. [Aaron Giles]

To fix 02688 (DIP switch settings are not being stored in INP files),
old INP files had to be broken. Since they were already broken, the
corefile module was enhanced to support streaming compression, and
the new INP files are output and processed compressed. [Aaron Giles]

Added a number of new cputag_* macros to cpuexec.h. [Aaron Giles]

Removed fillbitmap() macro in favor of direct calls to bitmap_fill().
Note that the parameters to the latter are in a different order
(bitmap, clip, color). [Atari Ace]

Furthered the process of aligning the sound cores with the recent cpu
core changes. Added a fake device implementation similar to the one
the cpu cores are using. Made some interface adjustments aligned to
128u4 (i.e. adding snd_class_header, adding get_ to various getter
functions). The primary benefit of this change is the removal of
"deprecat.h" from 23 sound cores. Also adjusted ui.c to stop calling
sndnum_clock and access the clock data similarly to how it does the
cpu clock data. (Note from Aaron: further changes to the sound
interfaces will be kept to a minimum until the CPUs are sorted out.)
[Atari Ace]

Fixed 8080 interrupt handling: [Miodrag Milanovic]
1. previous implementation cleared interrupt enable bit on interrupt
trigger which is wrong since interrupts should stay enabled
2. service interrupt number was not cleared after interrupt is
executed, so if same one is triggered it will not be catched.

Made the 6526/8520 CIA implementations be devices. Added
differentiation between the r1 and r2 versions of the 6526; not acting
on it yet. [Nathan Woods]

Save state system improvements: [Aaron Giles]
Changed save state system to accept machine parameters where
appropriate, and to keep all global variables hanging off the
machine structure. Once again, this means all state registration
call sites have been touched:

- state_save_register_global* now takes a machine parameter
- state_save_register_item* now takes a machine parameter
- added new state_save_register_device_item* which now uses
the device name and tag to generate the base name

Extended the fake sound devices to have more populated fields.
Modified sound cores to use tags from the devices and simplified
the start function. [Aaron Giles]

Renumbered CPU and sound get/set info constants to align with
the device constants, and shared values where they were perfectly
aligned. [Aaron Giles]

Set the type field in the fake device_configs for CPU and sound
chips to a get_info stub which calls through to the CPU and sound
specific get_info functions. This means the device_get_info()
functions work for CPU and sound cores, even in their fake state.
[Aaron Giles]

IMPORTANT NOTICE: This update represents the first part of a
monumental internal change within MAME in the way CPU cores are
managed and how memory is addressed. There are two ways you can help
get these changes sorted out.

2. If you are up to coding, help us by submitting patches that remove
the use of [Mm]achine->activecpu and/or cpunum_get_active(). You
should be able to derive which CPU you are referencing through other
means. To avoid duplication of effort, either send these quickly in
small bunches, or better yet, send a message to the submission address
announcing your intention to work on a certain class of drivers.

Major cpuintrf changes: [Aaron Giles]
* added a set of cpu_* calls which accept a CPU device object;
these are now the preferred means of manipulating a CPU
* removed the cpunum_* calls; added an array of cpu[] to the
running_machine object; converted all existing cpunum_* calls
to cpu_* calls, pulling the CPU device object from the new
array in the running_machine
* removed the activecpu_* calls; added an activecpu member to
the running_machine object; converted all existing activecpu_*
calls to cpu_* calls, pulling the active CPU device object
from the running_machine
* changed cpuintrf_push_context() to cpu_push_context(), taking
a CPU object pointer; changed cpuintrf_pop_context() to
cpu_pop_context(); eventually these will go away
* many other similar changes moving toward a model where all CPU
references are done by the CPU object and not by index
* added CPU device parameters to all CPU callbacks except for the
context ones (which are going away), and the validity check.

Converted TMS340x0 cores to be pointer-based. [Aaron Giles]

Fixed Dip Switches for 'lkage' and clones. Fixed bootlegs visible
area to match original sets. [stephh]

Fixed Dip Switches for 'magmax'. [stephh]

Fixed Dip Switches for all games in mermaid.c driver. [stephh]

peplus.c updates: [couriersud]
* changed the 6845 type to R6545_1 (Rockwell as mentioned in the
driver).
* use transparent addressing
* lightpen code now generates a "lightpen_assert" at the right screen
position.
* Completely hooked up 6545 without wrappers.

The primary goal is that all CPU-related APIs now take a device
pointer instead of an index. All functions that take a CPU device
are prefixed with cpu_*. All functions that are globally related to
cpu execution are prefixed with cpuexec_*. Below is a list of some
of the mappings:

Merged cpuint.c into cpuexec.c. One side-effect of this change is
that driver reset callbacks are called AFTER the CPUs and devices
are reset. This means that if you make changes to the CPU state and
expect the reset vectors to recognize the changes in your reset
routine, you will need to manually reset the CPU after making the
change (since it has already been reset).

Added a number of inline helper functions to cpuintrf.h for
managing addresses.

Removed cpu_gettotalcpu(). This information is rarely needed
outside of the core and can be obtained by looking at the
machine->cpu[] array.

Replaced the Machine parameter where an running_machine * is
available and removes the deprecat.h where unnecessary.
[Atari Ace, Oliver Stoeneberg]

Cleaned up use of running_machine in the Windows debugger code.
[Oliver Stoeneberg]

Fixed Dip Switches and Inputs for 'jchan' and clone. [stephh]

Documented the CPS2 Phoenix sets, and what happens to a dead CPS2
board. [MAMEPlus]

Pointer-ified the 6800, 6809 and hd6309 cpu cores: [couriersud]
* temporarily named the state var m68_state in the 68xx cores
* reorganized some code for simpler comparison of 68xx cores

Pre-irq rewrite submission in ST-V driver: [Angelo Salese]
* Better management of hblank/vblank bits;
* Makes dynamic resolutions to be called with a timer instead of
run-time;
* Makes dynamic resolutions to not be changed at every frame but
only when there's an actual change;
* Fixed Final Arch broken Test Mode;
* Demoted Super Major League / Final Arch as GAME_NOT_WORKING, they
hangs randomly due of SH-2 master/slave communication RAM issues
* Removed GAME_NOT_WORKING flag to Fighting Dragoon Legend Elan
Doree, because protection affects only in-game graphics and not
gameplay
* Removed all the read/write handler speed-up hacks, they aren't
needed anymore and they were doing more damage than being useful.
This fixes Golden Axe: the Duel gameplay speed at the cost of breaking
up Groove on Fight coin counter at start-up.

Changed READ/WRITE handlers to accept an address_space * instead of
a machine *. The address_space object was enhanced to contain a
machine and a pointer to the relevant CPU object.

Added new function cpu_get_address_space() to fetch the address
space for calling in manually to these functions. In some instances,
code which should eventually be converted to a device is hard-coding
fetching the program space of CPU #0 in order to have something
valid to pass.

Converted cultures driver to have separated color tables for each
plane. [Angelo Salese]

Significantly pared down the 68k core. Merged outer MAME shell into
the core proper and removed unused macros. Changed all external
interfaces to pass the CPU device. Enabled 64-bit operations by
default. Re-derived the interface functions to cascade and share code
more aggressively. These changes also seem to have cured the taito_f3
issues as far as I can tell (at least pbobble3 seems right now).
[Aaron Giles]

Disentangled the 68000 core, converting it to be much simpler and less
overly abstracted. Hard-coded it for the options that are relevant
and never going to change. Removed old unused CPS2 encryption junk.
Changed encryption interfaces to pass the CPU core object.
[Aaron Giles]

Updated CPS1 documentation. [Nicola Salmoria]

Added m6809 config option to control where opcodes 10 and 11 fetch
the second byte. [Nicola Salmoria]

Naomi improvements: [Samuele Zannoli]
* This patch implements a "plug-in board" device for the Naomi.
It represents the rom boards for the various games and the dimm
board for the gdrom.
* Now the dimm board part contains only a routine to load the "rom
file" from the gdrom chd, but in the future it will be fully
implemented with its own sh4 processor, security chip and so on.
* Extracted .rom files are no longer needed, rom file is extracted
in code from the CHD.

Added "tag" parameter to state_save_register_item_* calls. Removed
state_save_combine_module_and_tag() function in favor of passing
the tag when registering. Revisited all save state item registrations
and changed them to use the tag where appropriate. [Aaron Giles]

Changed 6809 disassembler to work with kram3. [Nicola Salmoria]

Added template support to regrep. Changed output to not color the
entire background of each cell. Switched to astrings and core_files
internally. [Aaron Giles]

ST-V IRQ rewrite and that removes several global hacks/game specific
hacks. (SMPC irq bit/introdon irq register hack/pblbeach framebuffer
hack plus some more). Note: some games have issues with it, but
they'll be hopefully fixed on the next couple of updates.
[Angelo Salese]

Generalized the concept of opbase access into "direct" access.
Removed opbase globals to the address_space structure. Cleaned up
names of pointers (decrypted and raw versus rom and ram). Added inline
functions to read/write data via any address space. Added macros for
existing functions to point them to the new functions. Other related
cleanups. [Aaron Giles]

Pointerized the CDP1802 CPU core. [Curt Coder]

Tweaked gun handling in beast busters a bit.. by halving the
precision of the guns to 7-bit they can be calibrated more easily,
maybe the originals were like this. I've also added a default
eeprom with them calibrated in a 'reasonable' way for MAME. Sound
is pretty awful on this, maybe the sound ROMs should be checked?
[David Haywood]

Cleaned up macro mess in the Z80 core. Switched to using generic
memory calls instead of program_* and io_*. [Aaron Giles]

System 23: [R. Belmont]
- Added extremely preliminary support for I/O boards with the H8/3344

Removed the change_pc() macro. Changed memory_set_direct_region() to
return a boolean indicating whether the given address was successfully
located in a bank. Change raw/decrypted access to look at this result,
and if the given address is not in a bank, calls through to the
standard read handlers. This should prevent most crashes when
accessing opcodes. [Aaron Giles]

Fixed address space mapping handlers to invalidate direct access
regions if a change is made to the mapping. This is needed to prevent
the Sega dynamic memory mapping chips from falling over. [Aaron Giles]

Refactored the CDP1802 and COP400 CPU cores to use the new memory
functions. [Curt Coder]

Switched m6809 and hd6309 to new memory functions: [couriersud]
* cleaned up some macros
* aligned code a bit more
* interrupts now checked in cpu_execute instead of set_context

Pointerified the psx cpu core & switched it to the new memory
functions. Changed some MIPS_* to PSXCPU_*. [smf]

Fixed broken crazywar eeprom. [David Haywood]

Another significant memory system change: [Aaron Giles]

Moved memory global state into a struct hanging off of the machine.
Updated almost all memory APIs to take an address_space * where
appropriate, and updated all callers. Changed memory internals to
use address spaces where appropriate. Changed accessors to point
to the memory_* functions instead of the address space-specific
functions. Improved internal handling of watchpoints.

Added cputag_* functions: cputag_reset(), cputag_get_index(),
cputag_get_address_space(). These just expand via macros to an
initial fetch of the CPU via cputag_get_cpu() followed by the
standard CPU call.

Added debugger_interrupt_hook() and debugger_exception_hook() calls
which intelligently look at the debugger flags before calling.

Memory banking now requires a machine object. This makes the memory
system fully global-free.

Debugger interfaces cleanup. 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. 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. Lots of other
minor tweaks. [Aaron Giles]

Removed memory context switch. All memory accesses now specify an
address space explicitly. There is no longer any concept of a
"current" memory context. [Aaron Giles]

Enhanced the runtest.cmd to use all available processors.
[Aaron Giles]

Removed cpu_num info from SH2 in favor of just keeping the device
object. [Aaron Giles]

Better fix for vendetta eeprom. [Mamesick, Fabio Priuli]

Removed all vestiges of the old change_pc macro, which is no longer
needed with the banking improvements. [Aaron Giles]

Added the latest "what we know" to the plygonet driver. [Phil Bennett]

More accurately describes the aux board behavior for Ms. Pac-Man.
There is a thorough description of how the board works. mspacman is a
more faithful emulation. In particular you can now enter service mode
(F2) at anytime during game play. [Steve Golson]

Updated cpuexec to compute the "perfect" interleave value taking into
account the minimum number of cycles per instruction specified by the
CPU core. Updated Z80 core to indicate that the minimum cpi is 2.
Fixed incorrect minimum cpi in the 68020+ cores. [Aaron Giles]

Changed core cycle computations to use div_64x32 instead of full
64-bit divides. This involves tossing a few bits of resolution at
divide time, but should make no real difference in practice.
[Aaron Giles]

Began the process of pruning options from the 68000 core, hard-coding
it for MAME's needs. We've hacked on it sufficiently that it is no
longer generic, so this is a good opportunity to simplify the code
so that it can actually be followed (still in progress). [Aaron Giles]

Defined macros for all core CPU functions, along with macros for the
name and for calling, in the spirit of the devintrf.h macros.
[Aaron Giles]

Changed init, reset, exit, and execute interfaces to be passed a
const device_config * object. This is a fake object for the moment,
but encapsulates the machine pointer and token. Eventually this will
be a real device. [Aaron Giles]

Changed the CPU IRQ callbacks to a proper type, and added a device
parameter to them. [Aaron Giles]

Fixed background color of srmp1/srmp2. [EdxGROfS0]

Various improvements in the ST-V driver: [Angelo Salese]
* Fixed bitmap zooming in Virtual Mahjong 2 - My Fair Lady;
* Worked around a major graphic bug in ElanDoree;
* Added some missing alpha blending effects,Pro Mahjong Kiwame S
title screen needs it but it doesn't work yet due to other
problems (still investigating)
* Fixed a crash bug with Astra Super Stars when the debugger is
active.

Removed parent clone relationship between missb2 and bublbobl. We
don't usually make the 'korean hacks' as clones as they have very
little to do with the original releases except for the stolen cpu
code. GFX / Sound / Gameplay are completely redesigned.
[David Haywood]

Changed VBLANK to irq0_line_assert and added a CLEAR_LINE in the
peplus driver. This greatly increases speed on all video slots.
[Jim Stolis]

lohtb2: Improved mcu emulation [couriersud]
* The whole startup cycle now works. No more timeouts and erratic
behavior.
* lohtb2 will however not display the "Warning" screen due to a
priority issue. With color/attribute of 0x80 in videoram at 0xd0000 and 0xd8000, videoram at 0xd80000 will be displayed. Some tilemap guru has to look into this.

Modified src2html to use a template source file instead of hard-coding
to the MAME site. Changed from explicit styles to classes.
[Aaron Giles]

Changed magictg to use (hopefully correct) roms. [David Haywood]

Naomi / DC improvements [Samuele Zannoli]
* cvs2gd stops looping forever. However with no 3d emulation nothing
is shown on the screen.
* implemented the naomi RTC and there are a few verbose messages
about transfers not implemented yet.

Removed per-game hacks from CPS3 (moved to DMA callback in SH2 core).
Removed Speedups from CPS3 / PsikyoSH, while they do still give a
decent speed boost they're not really needed with the DRC and just
clutter the code. [David Haywood]