| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
timer_adjust_oneshot(t,...) => t->adjust(...)
timer_adjust_periodic(t,...) => t->adjust(...)
timer_reset(t,...) => t->reset(...)
timer_enable(t,...) => t->enable(...)
timer_enabled(t) => t->enabled()
timer_get_param(t) => t->param()
timer_get_ptr(t) => t->ptr()
timer_set_param(t,...) => t->set_param(...)
timer_set_ptr(t) => t->set_ptr(...)
timer_timeelapsed(t) => t->elapsed()
timer_timeleft(t) => t->remaining()
timer_starttime(t) => t->start()
timer_firetime(t) => t->expire()
Also remove some stray legacy cpuexec* macros that were
lurking in schedule.h):
cpuexec_describe_context(m) => m->describe_context()
cpuexec_boost_interleave(m,...) => m->scheduler().boot_interleave(...)
cpuexec_trigger(m,...) => m->scheduler().trigger(...)
cpuexec_triggertime(m,...) => m->scheduler().trigger(...)
Specific regex'es used:
timer_adjust_oneshot( *)\(( *)([^,;]+), *
\3->adjust\1\(\2
timer_adjust_periodic( *)\(( *)([^,;]+), *
\3->adjust\1\(\2
(->adjust.*), *0( *)\)
\1\2\)
timer_reset( *)\(( *)([^,;]+), *
\3->reset\1\(\2
(->reset *\(.*)attotime::never
\1
timer_enable( *)\(( *)([^,;]+), *
\3->enable\1\(\2
timer_enabled( *)\(( *)([^,;)]+)\)
\3->enabled\1\(\2\)
timer_get_param( *)\(( *)([^,;)]+)\)
\3->param\1\(\2\)
timer_get_ptr( *)\(( *)([^,;)]+)\)
\3->ptr\1\(\2\)
timer_timeelapsed( *)\(( *)([^,;)]+)\)
\3->elapsed\1\(\2\)
timer_timeleft( *)\(( *)([^,;)]+)\)
\3->remaining\1\(\2\)
timer_starttime( *)\(( *)([^,;)]+)\)
\3->start\1\(\2\)
timer_firetime( *)\(( *)([^,;)]+)\)
\3->expire\1\(\2\)
timer_set_param( *)\(( *)([^,;]+), *
\3->set_param\1\(\2
timer_set_ptr( *)\(( *)([^,;]+), *
\3->set_ptr\1\(\2
cpuexec_describe_context( *)\(( *)([^,;)]+)\)
\3->describe_context\1\(\2\)
\&m_machine->describe_context
m_machine.describe_context
cpuexec_boost_interleave( *)\(( *)([^,;]+), *
\3->scheduler().boost_interleave\1\(\2
cpuexec_trigger( *)\(( *)([^,;]+), *
\3->scheduler().trigger\1\(\2
cpuexec_triggertime( *)\(( *)([^,;]+), *
\3->scheduler().trigger\1\(\2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
timers into the scheduler. Retain TIMER devices as a separate wrapper
in timer.c/.h. Inline wrappers are currently provided for all timer
operations; a future update will bulk clean these up.
Rather than using macros which hide generation of a string-ified name
for callback functions, the new methods require passing both a function
pointer plus a name string. A new macro FUNC() can be used to output
both, and another macro MFUNC() can be used to output a stub-wrapped
class member as a callback.
Also added a time() method on the machine, so that machine->time() gives
the current emulated time. A wrapper for timer_get_time is currently
provided but will be bulk replaced in the future.
For this update, convert all classic timer_alloc, timer_set,
timer_pulse, and timer_call_after_resynch calls into method calls on
the scheduler.
For new device timers, added methods to the device_t class that make
creating and managing these much simpler. Modern devices were updated
to use these.
Here are the regexes used; some manual cleanup (compiler-caught) will
be needed since regex doesn't handle nested parentheses cleanly
1. Convert timer_call_after_resynch calls
timer_call_after_resynch( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().synchronize\1\(\2FUNC(\6), \5, \4\)
2. Clean up trailing 0, NULL parameters
(synchronize[^;]+), 0, NULL\)
\1)
3. Clean up trailing NULL parameters
(synchronize[^;]+), NULL\)
\1)
4. Clean up completely empty parameter lists
synchronize\(FUNC\(NULL\)\)
synchronize()
5. Convert timer_set calls
timer_set( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_set\1\(\2\4, FUNC(\7), \6, \5\)
6. Clean up trailing 0, NULL parameters
(timer_set[^;]+), 0, NULL\)
\1)
7. Clean up trailing NULL parameters
(timer_set[^;]+), NULL\)
\1)
8. Convert timer_set calls
timer_pulse( *)\(( *)([^,;]+), *([^,;]+), *([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_pulse\1\(\2\4, FUNC(\7), \6, \5\)
9. Clean up trailing 0, NULL parameters
(timer_pulse[^;]+), 0, NULL\)
\1)
10. Clean up trailing NULL parameters
(timer_pulse[^;]+), NULL\)
\1)
11. Convert timer_alloc calls
timer_alloc( *)\(( *)([^,;]+), *([^,;]+), *([^);]+)\)
\3->scheduler().timer_alloc\1\(\2FUNC(\4), \5\)
12. Clean up trailing NULL parameters
(timer_alloc[^;]+), NULL\)
\1)
13. Clean up trailing 0 parameters
(timer_alloc[^;]+), 0\)
\1)
14. Fix oddities introduced
\&m_machine->scheduler()
m_machine.scheduler()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attotime_zero => attotime::zero
attotime_never => attotime::never
ATTOTIME_IN_SEC(s) => attotime::from_seconds(s)
ATTOTIME_IN_MSEC(m) => attotime::from_msec(m)
ATTOTIME_IN_USEC(u) => attotime::from_usec(u)
ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n)
ATTOTIME_IN_HZ(h) => attotime::from_hz(h)
Also, changed the following MCFG macros to require a full
attotime specification:
MCFG_TIMER_ADD_PERIODIC
MCFG_QUANTUM_TIME
MCFG_WATCHDOG_TIME_INIT
|
|
|
|
|
| |
They both already existed. No sense in having two names for the
same object type.
|
|
|
|
|
| |
cores, which all now cache a copy of space->direct() and use it for
direct accesses.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bulk search & replace:
S: memory_read_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *)
R: \4->read_\1\2\(\3
S: memory_read_([bytewordq]+)( *)\(( *)([^,]+)( *),( *)
R: \4->read_\1\2\(\3
S: memory_write_([bytewordq]+)_[0-9lbe_maskd]+( *)\(( *)([^,]+)( *),( *)
R: \4->write_\1\2\(\3
S: memory_write_([bytewordq]+)( *)\(( *)([^,]+)( *),( *)
R: \4->write_\1\2\(\3
Gets 99% of the cases.
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose of making it const before was to discourage direct tampering,
but private/protected does a better job of that now anyhow, and it is
annoying now.
s/const[ \t]+address_space\b/address_space/g;
Is basically what I did.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
up the definition, rather than the whole tokenizing system, which lost type
checking. Added a new module addrmap.c which implements the address map
classes, and changed the macros to call methods on the address_map and
address_map_entry classes which are strongly typed.
Fixed a few incorrectly specified memory map entries along the way. Please
double-check to make sure the behavior is expected in: twincobr.c, lordgun.c,
galaxold.c.
This change also means that since the address_maps are now constructor
functions, they are detected when not used, so a number of #ifdef UNUSED_CODE
were added around dangling address map definitions.
Also included with this change:
- removed cputag_clocks_to_attotime() and cputag_attotime_to_clocks() in
favor of just expanding the class
- same for cputag_suspend() and cputag_resume()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DECLARE_LEGACY_CPU_DEVICE and DEFINE_LEGACY_CPU_DEVICE. Changed CPUs
to be their own device types, rather than all of type CPU with a
special internal subtype. Note that as part of this process I removed
the CPU_ prefix from the ALL-CAPS device name, so CPU_Z80 is just
plain old Z80 now. This required changing a couple of names like
8080 to I8080 so that there was an alphabetic first character.
Added memory interfaces to the list of fast-access interfaces. To do
this properly I had to add a separate method to devices which is
called immediately after construction, when it is possible to perform
dynamic_casts on fully-constructed objects. (This is just internal,
no changes necessary to the devices themselves.)
Some additional notes:
* SH2 and SH4 had typedefs that conflicted with their CPU_-less names
so I bulk renamed to structures to sh2_state and sh4_state; RB, feel
free to choose alternate names if you don't like 'em
* SCSP was caught doing something to the 3rd indexed CPU. Since several
systems that use SCSP don't even have 3 CPUs, I had no idea what
this was supposed to do, so I changed to it reference "audiocpu"
assuming that stv was the assumed target. This is really gross and
should be a configuration parameter, not a hard-coded assumption.
|
| |
|
|
|
|
| |
Update interfaces as appropriate.
|
|
|
|
|
| |
the scheduler, rather than manging an incoming cycle count. It was
confusing to have multiple sources of cycle counts.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance as a result of this change. Do not panic; report issues to the
list in the short term and I will look into them. There are probably also
some details I forgot to mention. Please ask questions if anything is not
clear.
NOTE: This is a major internal change to the way devices are handled in
MAME. There is a small impact on drivers, but the bulk of the changes are
to the devices themselves. Full documentation on the new device handling
is in progress at http://mamedev.org/devwiki/index.php/MAME_Device_Basics
Defined two new casting helpers: [Aaron Giles]
downcast<type>(value) should be used for safe and efficient downcasting
from a base class to a derived class. It wraps static_cast<> by adding
an assert that a matching dynamic_cast<> returns the same result in
debug builds.
crosscast<type>(value) should be used for safe casting from one type to
another in multiple inheritance scenarios. It compiles to a
dynamic_cast<> plus an assert on the result. Since it does not optimize
down to static_cast<>, you should prefer downcast<> over crosscast<>
when you can.
Redefined running_device to be a proper C++ class (now called device_t).
Same for device_config (still called device_config). All devices and
device_configs must now be derived from these base classes. This means
each device type now has a pair of its own unique classes that describe
the device. Drivers are encouraged to use the specific device types
instead of the generic running_device or device_t classes. Drivers that
have a state class defined in their header file are encouraged to use
initializers off the constructor to locate devices. [Aaron Giles]
Removed the following fields from the device and device configuration
classes as they never were necessary or provided any use: device class,
device family, source file, version, credits. [Aaron Giles]
Added templatized variant of machine->device() which performs a downcast
as part of the device fetch. Thus machine->device<timer_device>("timer")
will locate a device named "timer", downcast it to a timer_device, and
assert if the downcast fails. [Aaron Giles]
Removed most publically accessible members of running_device/device_t in
favor of inline accessor functions. The only remaining public member is
machine. Thus all references to device->type are now device->type(), etc.
[Aaron Giles]
Created a number of device interface classes which are designed to be mix-
ins for the device classes, providing specific extended functionality and
information. There are standard interface classes for sound, execution,
state, nvram, memory, and disassembly. Devices can opt into 0 or more of
these classes. [Aaron Giles]
Converted the classic CPU device to a standard device that uses the
execution, state, memory, and disassembly interfaces. Used this new class
(cpu_device) to implement the existing CPU device interface. In the future
it will be possible to convert each CPU core to its own device type, but
for now they are still all CPU devices with a cpu_type() that specifies
exactly which kind of CPU. [Aaron Giles]
Created a new header devlegcy.h which wraps the old device interface using
some special template classes. To use these with an existing device,
simply remove from the device header the DEVICE_GET_INFO() declaration and
the #define mapping the ALL_CAPS name to the DEVICE_GET_INFO. In their
place #include "devlegcy.h" and use the DECLARE_LEGACY_DEVICE() macro.
In addition, there is a DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping
existing sound devices into new-style devices, and a
DECLARE_LEGACY_NVRAM_DEVICE() for wrapping NVRAM devices. Also moved the
token and inline_config members to the legacy device class, as these are
not used in modern devices. [Aaron Giles]
Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER)
from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to
simply SCREEN. The various global functions that were previously used to
access information or modify the state of these devices are now replaced
by methods on the device classes. Specifically:
video_screen_configure() == screen->configure()
video_screen_set_visarea() == screen->set_visible_area()
video_screen_update_partial() == screen->update_partial()
video_screen_update_now() == screen->update_now()
video_screen_get_vpos() == screen->vpos()
video_screen_get_hpos() == screen->hpos()
video_screen_get_vblank() == screen->vblank()
video_screen_get_hblank() == screen->hblank()
video_screen_get_width() == screen->width()
video_screen_get_height() == screen->height()
video_screen_get_visible_area() == screen->visible_area()
video_screen_get_time_until_pos() == screen->time_until_pos()
video_screen_get_time_until_vblank_start() ==
screen->time_until_vblank_start()
video_screen_get_time_until_vblank_end() ==
screen->time_until_vblank_end()
video_screen_get_time_until_update() == screen->time_until_update()
video_screen_get_scan_period() == screen->scan_period()
video_screen_get_frame_period() == screen->frame_period()
video_screen_get_frame_number() == screen->frame_number()
timer_device_adjust_oneshot() == timer->adjust()
timer_device_adjust_periodic() == timer->adjust()
timer_device_reset() == timer->reset()
timer_device_enable() == timer->enable()
timer_device_enabled() == timer->enabled()
timer_device_get_param() == timer->param()
timer_device_set_param() == timer->set_param()
timer_device_get_ptr() == timer->get_ptr()
timer_device_set_ptr() == timer->set_ptr()
timer_device_timeelapsed() == timer->time_elapsed()
timer_device_timeleft() == timer->time_left()
timer_device_starttime() == timer->start_time()
timer_device_firetime() == timer->fire_time()
Updated all drivers that use the above functions to fetch the specific
device type (timer_device or screen_device) and call the appropriate
method. [Aaron Giles]
Changed machine->primary_screen and the 'screen' parameter to VIDEO_UPDATE
to specifically pass in a screen_device object. [Aaron Giles]
Defined a new custom interface for the Z80 daisy chain. This interface
behaves like the standard interfaces, and can be added to any device that
implements the Z80 daisy chain behavior. Converted all existing Z80 daisy
chain devices to new-style devices that inherit this interface.
[Aaron Giles]
Changed the way CPU state tables are built up. Previously, these were data
structures defined by a CPU core which described all the registers and how
to output them. This functionality is now part of the state interface and
is implemented via the device_state_entry class. Updated all CPU cores
which were using the old data structure to use the new form. The syntax is
currently awkward, but will be cleaner for CPUs that are native new
devices. [Aaron Giles]
Converted the okim6295 and eeprom devices to the new model. These were
necessary because they both require multiple interfaces to operate and it
didn't make sense to create legacy device templates for these single cases.
(okim6295 needs the sound interface and the memory interface, while eeprom
requires both the nvram and memory interfaces). [Aaron Giles]
Changed parameters in a few callback functions from pointers to references
in situations where they are guaranteed to never be NULL. [Aaron Giles]
Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU. Changed
it to MDRV_DEVICE_DISABLE() instead. Updated drivers. [Aaron Giles]
Reorganized the token parsing for machine configurations. The core parsing
code knows how to create/replace/remove devices, but all device token
parsing is now handled in the device_config class, which in turn will make
use of any interface classes or device-specific token handling for custom
token processing. [Aaron Giles]
Moved many validity checks out of validity.c and into the device interface
classes. For example, address space validation is now part of the memory
interface class. [Aaron Giles]
Consolidated address space parameters (bus width, endianness, etc.) into
a single address_space_config class. Updated all code that queried for
address space parameters to use the new mechanism. [Aaron Giles]
|
|
|
|
|
|
| |
usage.
Also converted a few more places to use the new accessors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.
There is a new class 'running_device' which represents the
state of a live device. A list of these running_devices sits
in machine->devicelist and is created when a running_machine
is instantiated.
To access the configuration state, use device->baseconfig()
which returns a reference to the configuration.
The list of running_devices in machine->devicelist has a 1:1
correspondance with the list of device configurations in
machine->config->devicelist, and most navigation options work
equally on either (scanning by class, type, etc.)
For the most part, drivers will now deal with running_device
objects instead of const device_config objects. In fact, in
order to do this patch, I did the following global search &
replace:
const device_config -> running_device
device->static_config -> device->baseconfig().static_config
device->inline_config -> device->baseconfig().inline_config
and then fixed up the compiler errors that fell out.
Some specifics:
Removed device_get_info_* functions and replaced them with
methods called get_config_*.
Added methods for get_runtime_* to access runtime state from
the running_device.
DEVICE_GET_INFO callbacks are only passed a device_config *.
This means they have no access to the token or runtime state
at all. For most cases this is fine.
Added new DEVICE_GET_RUNTIME_INFO callback that is passed
the running_device for accessing data that is live at runtime.
In the future this will go away to make room for a cleaner
mechanism.
Cleaned up the handoff of memory regions from the memory
subsystem to the devices.
|
|
|
|
|
|
| |
devtag_get_device ... machine->device()
memory_find_address_space ... device->space()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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!)
|
| |
|
| |
|
|
|
|
|
|
| |
to devintrf (including endianness). Removed space array from the
CPU class header. Made the memory system much more device-neutral.
Various other cleanups along the way.
|
|
|
|
|
|
|
|
|
| |
function here. Remaining devices have been converted to have
device-specific functions to do the same thing with proper type
checking.
CPUs still have a set_info function but it is CPU-specific now and
no longer piggybacks on the general device function.
|
| |
|
|
|
|
| |
Also cleaned them so they compile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compilation:
- new option CPP_COMPILE to trigger this (off by default)
- split CFLAGS into common, C-only, and C++-only flags
- when enabled, CPP_COMPILE causes 'pp' to be appended to
the target name
NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY
YET. IT IS JUST AN EXPERIMENT.
Modified lib.mak to always build zlib/expat as C regardless
of CPP_COMPILE.
Modified windows.mak to fix warnings with MAXOPT=1, and to
leverage the new CFLAGs definitions.
Modified vconv.c to do appropriate conversions for new C++
options.
Updated sources so that libutil, libocore (Windows), and
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.
Fixed a few more general obvious problems at random
locations in the source:
- device->class is now device->devclass
- TYPES_COMPATIBLE uses typeid() when compiled for C++
- some functions with reserved names ('xor' in particular)
were renamed
- nested enums and structs were pulled out into separate
definitions (under C++ these would need to be scoped to
be referenced)
- TOKEN_VALUE cannot use .field=x initialization in C++ :(
|
| |
|
|
|
|
|
|
| |
- added state table for the debugger
- grouped all cpu types under a single makefile entry
- removed duplicate code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
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.
Removed the dummy CPU core and cpuintrf.c.
Changed the core execution loop to directly call the execute
function instead of using the inline helper (which has been removed).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bus width and shift CPU interface constants. Changed all the cores
to use them.
Minor spacing cleanup in Z80, Z180, TMS34010, ADSP21xx cores.
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.
|
|
|
|
| |
Changed Z80 over to the new cpu_state_table mechanism.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sent: Tuesday, December 16, 2008 12:20 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Migrate CPU defines to cpu header files
Hi mamedev,
This patch migrates all the CPU definitions into the cpu header files.
The #defines and CPU_GET_INFO declarations were added by hand to the
cpu cores in the first patch, plus a few partly related fixes to the
non-DRC cores. The second patch was produced by the attached script
which inserts all needed #includes, except for two that were added by
hand in the first patch. The first patch also removed an extra define
of N2A03_DEFAULTCLOCK that would have caused problems with the second
patch.
~aa
|
|
|
|
|
|
|
|
|
|
| |
cpu_get_info_* -> device_get_info_*
cpu_set_info_* -> device_set_info_*
cpu_reset -> device_reset
Removed the cputype_get_* macros as they are not necessary.
Removed cpuintrf_init() which is no longer necessary.
|
|
|
|
| |
Pointer-ified the TMS99xx core (missed that one!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Removed all other uses of activecpu throughout the system. Removed
activecpu from the machine structure to prevent future abuse.
Removed cpu_push_context() and cpu_pop_context(), and all call
sites.
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.
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.
Many other small changes to make this all work.
|
|
|
|
|
|
|
|
|
| |
from the CPU cores.
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Renumbered CPU and sound get/set info constants to align with
the device constants, and shared values where they were perfectly
aligned.
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.
Changed device information getters from device_info() to
device_get_info() to match the CPU and sound macros.
|
|
|
|
|
|
| |
CPU_IS_BE -> ENDIANNESS_BIG
Also fixed help for step over/in to specify correct keys.
|
|
|
| |
This makes it easy to grep the CPU code to figure out which cores still need pointer-ification.
|
|
|
|
|
| |
and timer_get_time to pass the machine parameter. Moved timer globals
to hang off of the running_machine.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
is available and removes the deprecat.h where unnecessary.
[Oliver Stoeneberg]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
parameter from CPU_INIT. Modified CPU cores to pull config from the device
static_config.
|