summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/dsp56k/dsp56mem.c
Commit message (Collapse)AuthorAgeFilesLines
* Move all devices into separate part of src tree (nw) Miodrag Milanovic2015-09-131-948/+0
|
* dsp56k: Remove the not required direct update handler [O. Galibert] Olivier Galibert2015-06-241-10/+0
|
* Sorted out cpu cores (nw) Miodrag Milanovic2015-05-131-2/+2
|
* Added dummy license headers for EMU section (nw) Miodrag Milanovic2015-05-071-0/+2
|
* dsp56k.c: Modernised cpu core (nw) Wilbert Pol2014-09-121-12/+10
|
* fixed most of the -Wunreachable-code-break and -Wunreachable-code-return ↵ Oliver Stöneberg2014-09-081-3/+0
| | | | warnings of clang 3.5 when compiling MESS (nw)
* move handlers to members in dsp56k (nw) Miodrag Milanovic2014-04-031-10/+12
|
* output of new srcclean changes that are relatively small [smf] smf-2013-01-111-1/+0
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-34/+32
|
* Memory handler normalization, part 2. Change legacy Aaron Giles2012-09-171-4/+4
| | | | | | | read/write handlers to take an address_space & instead of an address_space *. Also update pretty much all other functions to take a reference where appropriate. [Aaron Giles]
* fixed unreachable code in src/emu/cpu/dsp56k/dsp56mem.c (no whatsnew) Oliver Stöneberg2012-08-121-1/+1
|
* Remove redundant item cpu from address_space, in favor of Aaron Giles2011-03-291-4/+4
| | | | | | | | | | | space->device(). S: space->cpu-> R: space->device\(\)\. S: space->cpu R: \&space->device\(\)
* running_device -> device_t Aaron Giles2010-12-311-3/+3
| | | | | They both already existed. No sense in having two names for the same object type.
* dsp56k.c : Remove globals from dsp56k cpu core. [AtariAce] Andrew Gardner2010-08-101-15/+23
|
* dsp56k : Hooked up new execution engine. [Andrew Gardner] Andrew Gardner2010-08-071-482/+495
|
* WARNING: There are likely to be regressions in both functionality and Aaron Giles2010-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Correct a long-standing design flaw: device configuration state Aaron Giles2010-01-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Cleanups and version bump.mame0134u4 Aaron Giles2009-10-251-1/+1
|
* Fixed dsp56156 DO & BSCC opcode bugs. [Andrew Gardner] Andrew Gardner2009-10-201-6/+6
| | | | | | (Also makes the code prettier in parts) (The dsp now goes into its calculation loop, but some opcode doesn't set flags properly, so it never drops out of the loop).
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sent: Sunday, June 07, 2009 9:54 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] "Regularize" some interfaces in MAME Hi mamedev, This patch adjusts the code in a few places to be more regular in it object approach. It recognizes five idioms. 1. device_configs should be passed const. dsp56k.h took a non-const device_config for no particular reason, necessitating casting where used. A few other places cast to non-const, in most cases unnecessarily. 2. running_machines should be passed non-const. A few places used const in different ways on running_machines, instead of the idiomatic non-const running_machine. 3. Eliminate passing running_machine explicitly where it can be computed. esrip.c, m37710.c, sfbonus.c had cases where the machine could easily be eliminated. 4. Pass the object machine/config first. In some cases this makes the interface object oriented, in some cases it simply makes it more idiomatic with the rest of MAME. 5. Prefer (screen, bitmap, cliprect) to (machine, bitmap, cliprect). Fully implementing this would be a large patch, this patch simply does it for the one core 'device', tms9928a.c.
* CPU cores now compile cleanly. Aaron Giles2009-03-151-3/+3
|
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2009-01-141-5/+0
| | | | | | | | | | | | | | | Sent: Sunday, January 11, 2009 5:52 AM To: submit@mamedev.org Subject: unreachable code cleanup This patch cleans up the usage of unreachable code (mostly unnecessary breaks after returns in switch - case). A few case of really unused code were also discovered. I marked thos with FIXME comments. I based this cleanup on teh output of cppcheck. It does still missing a few cases of unreachable code, so there might be future patches to address more cases.
* Pointer-ified the dsp56k cpu core. [Andrew Gardner] Andrew Gardner2008-12-121-170/+178
| | | (There are still a couple of global memory arrays that i've gotta' move into the cpu struct. Will do that soonish.)
* Rewrite of the Motorola DSP56k CPU core. (Andrew Gardner) Andrew Gardner2008-10-191-2/+9
| | | | | | | * Added additional branch, move and bitfield ops. * Plygonet now passes its memory test and uploads a new program. [[Next step is to install an opbase handler and let the dsp56k run further into its new proggie.]]
* Added additional Motorola DSP56k reset behavior. (Andrew Gardner) Andrew Gardner2008-10-011-12/+12
|
* Fix compile errors. Wilbert Pol2008-08-041-1/+1
|
* Improved Dsp56k CPU interrupt handling. Polygonet Commanders now advances ↵ Andrew Gardner2008-08-041-4/+2
| | | | past its first dsp handshake.
* Cleanups/version bump.mame0126u3 Aaron Giles2008-07-311-136/+136
|
* DSP56156 CPU Core updates. Andrew Gardner2008-07-281-0/+933
- Rewrote core logic, communications, and interfaces. - Added three parallel memory moves to the disassembler. - Initial interrupt logic in place. Plygonet.c updates. - All communication hacks have been removed. - Memory maps have been temporarily reverted while new DSP56k cpu core catches up.