summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devcpu.h
Commit message (Collapse)AuthorAgeFilesLines
* emu: correct some file headers (nw) hap2020-06-191-0/+1
|
* -core: Removed almost all MCFG defines, and removed all remaining ↵ MooglyGuy2019-07-021-10/+0
| | | | MACHINE_CONFIG_START/END uses. [Ryan Holtz]
* Streamline machine configuration macros - everyone's a device edition. Vas Crabb2018-05-061-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start replacing special device macros with additional constructors, starting with ISA, INTELLEC 4 and RS-232 buses. Allow an object finder to take on the target of another object finder. (For a combination of the previous two things in action, see either the INTELLEC 4 driver, or the Apple 2 PC Exporter card. Also check out looping over a device finder array to instantiate devices in some places. Lots of things no longer need to pass tags around.) Start supplying default clocks for things that have a standard clock or have all clocks internal. Eliminate the separate DEV versions of the DEVCB_ macros. Previously, the plain versions were a shortcut for DEVICE_SELF as the target. You can now supply a string tag (relative to current device being configured), an object finder (takes on the base and relative tag), or a reference to a device/interface (only do this if you know the device won't be replaced out from under it, but that's a safe assumption for your subdevices). In almost all cases, you can get the effect you want by supplying *this as the target. Eliminate sound and CPU versions of macros. They serve no useful purpose, provide no extra checks, make error messages longer, add indirection, and mislead newbies into thinking there's a difference. Remove a lot of now-unnecessary ":" prefixes binding things relative to machine root. Clean up some miscellaneous rot. Examples of new functionality in use in (some more subtle than others): * src/mame/drivers/intellec4.cpp * src/mame/drivers/tranz330.cpp * src/mame/drivers/osboren1.cpp * src/mame/drivers/zorba.cpp * src/mame/devices/smioc.cpp * src/devices/bus/a2bus/pc_xporter.cpp * src/devices/bus/isa/isa.h * src/devices/bus/isa/isa.h * src/devices/bus/intellec4/intellec4.h
* Reshuffle some stuff: Vas Crabb2018-03-281-11/+8
| | | | | | * Move around the debugger hooks to get a small but measurable performance increase * Remove emucore from external tools * Improve performance of DSP16 interpreter a little by generating six variants of execution loop
* don't pass so many naked pointers around (nw) Vas Crabb2018-03-251-0/+2
|
* destaticify initializations (nw) (#3289) wilbertpol2018-03-041-2/+2
| | | | | | * destaticify initializations (nw) * fix this->set_screen (nw)
* API change: Memory maps are now methods of the owner class [O. Galibert] Olivier Galibert2018-02-121-1/+1
| | | | | Also, a lot more freedom happened, that's going to be more visible soon.
* dvdisasm: Overhaul [O. Galibert] Olivier Galibert2017-11-261-12/+0
| | | | | | | | Disassemblers are now independant classes. Not only the code is cleaner, but unidasm has access to all the cpu cores again. The interface to the disassembly method has changed from byte buffers to objects that give a result to read methods. This also adds support for lfsr and/or paged PCs.
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significant change, so please pay attention. The core changes are: * Short name, full name and source file are no longer members of device_t, they are part of the device type * MACHINE_COFIG_START no longer needs a driver class * MACHINE_CONFIG_DERIVED_CLASS is no longer necessary * Specify the state class you want in the GAME/COMP/CONS line * The compiler will work out the base class where the driver init member is declared * There is one static device type object per driver rather than one per machine configuration Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type. * DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders. * DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type. Use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types. * These macros declare storage for the static data, and instantiate the device type and device finder templates. The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate. Things I've actually messed with substantially: * More descriptive names for a lot of devices * Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes * Changed DECO BSMT2000 ready callback into a device delegate * Untangled Microprose 3D noise from driver state * Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices * Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly * Started to break out common parts of Samsung ARM SoC devices * Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++ * Tried to make Z180 table allocation/setup a bit safer * Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant * Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size * Imporved encapsulation of Z80DART channels * Refactored the SPC7110 bit table generator loop to make it more readable * Added wrappers for SNES PPU operations so members can be made protected * Factored out some boilerplate for YM chips with PSG * toaplan2 gfx * stic/intv resolution * Video System video * Out Run/Y-board sprite alignment * GIC video hookup * Amstrad CPC ROM box members * IQ151 ROM cart region * MSX cart IRQ callback resolution time * SMS passthrough control devices starting subslots I've smoke-tested several drivers, but I've probably missed something. Things I've missed will likely blow up spectacularly with failure to bind errors and the like. Let me know if there's more subtle breakage (could have happened in FM or Voodoo). And can everyone please, please try to keep stuff clean. In particular, please stop polluting the global namespace. Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros. It feels like an uphill battle trying to get this stuff under control while more of it's added.
* cleanup headers of not used friend classes (nw) Miodrag Milanovic2017-02-121-2/+0
|
* Changed disassembler infrastructure to not use char buffers internally Nathan Woods2016-11-201-3/+3
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-6/+6
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-3/+3
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Move disasm overrides into interface, reducing driver-debugger dependencies (nw) AJR2016-06-241-0/+2
|
* Eliminate device_t::static_config, a type-unsafe legacy feature. AJR2016-04-141-1/+0
| | | | | | Rewrite or remove every last instance of MCFG_DEVICE_CONFIG and its two aliases, including within comments and dead code. Make the Z80/Z180 daisy chain an interface that interfaces with the existing interface. Z8000 has been hooked up to this as well (p8000_16 already configures it), but currently does nothing with it.
* Revert software-installed slot/image options when changing software AJR2016-04-041-0/+14
| | | | | - Remove emu.h's stealth include of emuopts.h through mconfig.h; reduce dependency on emuopts.h in other headers and source files. - MCFG_CPU_FORCE_NO_DRC is now a CPU configuration parameter rather than a global one; it still works to override the -drc option setting.
* reverting: Miodrag Milanovic2016-01-201-1/+1
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* Revert "rest of device parameters to std::string (nw)" Miodrag Milanovic2016-01-201-1/+1
| | | | This reverts commit caba131d844ade3f2b30d6be24ea6cf46b2949d7.
* rest of device parameters to std::string (nw) Miodrag Milanovic2016-01-161-1/+1
|
* tags are now strings (nw) Miodrag Milanovic2016-01-161-1/+1
| | | | fix start project for custom builds in Visual Studio (nw)
* Cleanup devcpu.h (nw) Miodrag Milanovic2015-11-061-37/+0
|
* memory: Remove support for decrypted bases, use an address space instead [O. ↵ Olivier Galibert2015-06-241-0/+1
| | | | Galibert]
* Removed legacy_cpu_device. [Wilbert Pol] Wilbert Pol2014-09-121-324/+1
|
* Removed DECLARE_LEGACY_CPU_DEVICE (nw) Wilbert Pol2014-06-301-13/+0
|
* removed usage of legacy IRQ callback (nw) Miodrag Milanovic2014-04-291-2/+2
|
* Replaced set_irq_acknowledge_callback with proper ↵ Miodrag Milanovic2014-04-231-0/+3
| | | | MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER/DEVICE (nw)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Made both DRC and Non-DRC compile for MIPS, RSP and SH2 core and added ↵ Miodrag Milanovic2013-08-271-0/+12
| | | | option to enable/disable DRC from command line (-drc -nodrc by default it's on) [Miodrag Milanovic]
* removed unused periodic interrupt legacy code (nw) Oliver Stöneberg2013-08-211-3/+0
|
* removed unused legacy VBLANK interrupt code Oliver Stöneberg2013-08-201-1/+0
|
* added MCFG_{CPU|DEVICE}_VBLANK_INT_REMOVE and ↵ Oliver Stöneberg2013-08-201-0/+4
| | | | MCFG_{CPU|DEVICE}_PERIODIC_INT_REMOVE to properly remove non-legacy VBLANK interrupts - the current code only reset the legacy interrupt which wasn't set anyways
* fixed drcbex{64|86}.c compilation (nw) Oliver Stöneberg2013-07-101-2/+0
|
* revert this from 24166, it breaks the compile (drcbex__ needs it?) David Haywood2013-07-101-0/+1
|
* devlegcy.h usage cleanup (nw) Oliver Stöneberg2013-07-101-2/+0
|
* did modern cpu cores as well (nw) Miodrag Milanovic2013-06-211-1/+1
|
* Expanded device_t constructor with parameters for short name and source file ↵ Miodrag Milanovic2013-03-261-1/+1
| | | | location [Miodrag Milanovic]
* changed CPU_DISASSEMBLE to use cpu_device * instead of legacy_cpu_device *, ↵ smf-2013-03-061-3/+3
| | | | so that class based cpu devices can also be passed.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-169/+169
|
* INTERRUPT_GEN -> INTERRUPT_GEN_MEMBER (no whatsnew) Miodrag Milanovic2012-09-181-0/+2
|
* Clean-ups and version bumpmame0147 Miodrag Milanovic2012-09-171-2/+2
| | | note: hoarded dump removed too from coco_cart.xml, this will not be tolerated
* Closeout on old macros. Retired cputag_set_input_line Aaron Giles2012-09-121-5/+0
| | | | | | | and cputag_set_input_line_and_vector, replacing them with machine.device("tag")->execute().set_input_line[_and_vector]. [Aaron Giles]
* In device_state_interface, rename state() to state_int() Aaron Giles2012-09-111-4/+0
| | | | | | | | | | | | | | | and set_state() to set_state_int() for consistency. Update all callers. Also add set_pc() helper and updated all callers to use that instead of set_state_int(STATE_GENPC) [Aaron Giles] Added device_t::state() method to get the state interface. Added redundant device_state_interface::state() method to catch redundant use of it. [Aaron Giles] Removed cpu_get_reg() and cpu_set_reg() macros in favor of using the above methods. [Aaron Giles]
* Add safe_pc() and safe_pcbase() methods to device_t. Aaron Giles2012-09-111-3/+0
| | | | | | Convert all cpu_get_pc() to safe_pc() and cpu_getpreviouspc() to safe_basepc(). Removed the old macros.
* DEVINFO_* to CPU_INFO_*, and some cleanups (no whatsnew) Miodrag Milanovic2012-09-031-25/+65
|
* Renamed device_irq_callback to device_irq_acknowledge_callback to Aaron Giles2012-04-101-4/+2
| | | | | | | | make its purpose clearer. Added delegate support for interrupt callbacks, and made driver_device variants of the generic interrupt helper callbacks. Did not convert existing callers yet due to logistical issues.
* Added a way to handle output for debug messages and debugger itself into ↵ Miodrag Milanovic2011-10-041-0/+3
| | | | | | octal too, and made a few CPU's to give octal output by default. Note that for now just some functions things return octal, will add more, but since this change required clean compile better to put it sooner then later (no whatsnew)
* Switch input ports to use function-based constructors instead of tokens. Aaron Giles2011-05-101-1/+1
| | | | | | | | | Remove the old tokenizing helpers. Add basic classes for ports, fields, settings, and dip locations as a first step. These will be fully cleaned up later. Added machine() method to field to hide all the necessary indirection. Changed custom/changed handlers into generic read/write handlers, and added wrappers to convert them to device read/write lines. [Aaron Giles]
* Cleanups and version bumpmame0142u3 Angelo Salese2011-05-081-1/+1
|
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-103/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro
* Move overridable device->rom_region(), device->machine_config_additions(), and Aaron Giles2011-03-301-5/+3
| | | | | device->input_ports() to protected methods. Added non-virtual wrappers around them.