summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/driver.h
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate custom_port_read and use ioport finders instead (nw) AJR2018-12-261-4/+0
|
* Revert "- Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the ↵ Vas Crabb2018-05-161-7/+56
| | | | | | | | | | | | side effect of making machine-config overrides of these much" This reverts commit c83e2a853d4e1643fcc85b68ada3c6f7f33adea4. Revert "fix compile. (nw)" This reverts commit a259ba3e366f442a22a9341755ff58163869860c. GCC is being bad and allowing invalid C++ that other compilers reject.
* - Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the side effect ↵ MooglyGuy2018-05-161-56/+7
| | | | | | of making machine-config overrides of these much uglier, but this is intended to discourage ongoing use, and will be gradually eliminated.
* Removed DRIVER_INIT-related macros, made driver init entry in GAME/COMP/CONS ↵ MooglyGuy2018-05-131-4/+6
| | | | | | | | | | | | explicit. (#3565) * -Removed DRIVER_INIT macros in favor of explicitly-named member functions, nw * -Removed DRIVER_INIT_related macros. Made init_ prefix on driver initializers explicit. Renamed init_0 to empty_init. Fixed up GAME/COMP/CONS macro spacing. [Ryan Holtz] * Missed some files, nw * Fix compile, (nw)
* Reshuffle some stuff: Vas Crabb2018-03-281-18/+18
| | | | | | * 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
* Flip screen API cleanup (nw) AJR2018-02-031-9/+8
| | | | | - Make the global flipping functions of driver_device protected so as not to be accessible from within subdevices - Eliminate the flip_screen_set_no_update kludge
* API Change: Machine configs are now a method of the owner class, and the ↵ Olivier Galibert2018-01-171-6/+6
| | | | | | | | | | prototype is simplified [O. Galibert] Beware, the device context does not follow in MCFG_FRAGMENT_ADD anymore due to the prototype change. So creating a device then configuring through a fragment doesn't work as-is. The simplest solution is just to add a MCFG_DEVICE_MODIFY at the start of the fragment with the correct tag.
* Replace driver_device::generic_pulse_irq_line with ↵ AJR2017-11-141-5/+0
| | | | device_execute_interface::pulse_input_line (nw)
* driver.cpp: Remove irqN_line_pulse interrupt generators (nw) AJR2017-10-281-8/+0
| | | | Vestigial commented-out uses remain in cdi.cpp. This does not affect nmi_line_pulse.
* let's use Zaccaria as a demo for machine config in members Vas Crabb2017-05-221-1/+1
|
* well, that causes mpu4 to take way too much memory to compile, the changes ↵ Vas Crabb2017-05-221-0/+2
| | | | to device instantiation still apply (nw)
* and ioports, too (nw) Vas Crabb2017-05-221-1/+0
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* New device interface for palettes AJR2017-04-061-2/+0
| | | | | | - Create device_palette_interface, which takes over most functionality from palette_device except for the initialization/decoding routines and RAM interface. - Update screen_device and device_gfx_interface to use a device_palette_interface object rather than a palette_device. This necessitates slight alterations to a few drivers and devices. - Modify v9938 and v9958 to use the new device_palette_interface rather than a subdevice. This entails breaking a cyclic dependency between device_video_interface and screen_device for this case.
* Self-registering devices. Vas Crabb2017-03-031-13/+0
| | | | | | * MAME now walks all devices when generating -lx output irrespective of whether they're actually instantiated anywhere or not. * -lx is at least 30% faster than previous implementation. * Only possible drawback is that filtering drivers no longer filters devices.
* fix gcc link error (nw) Vas Crabb2017-02-271-1/+1
|
* Self-registering devices prep: Vas Crabb2017-02-271-3/+6
| | | | | | | | | | | | | | * Make device_creator a variable template and get rid of the ampersands * Remove screen.h and speaker.h from emu.h and add where necessary * Centralise instantiations of screen and speaker finder templates * Add/standardise #include guards in many hearers * Remove many redundant #includes * Order #includesr to help catch headers that can't be #included alone (nw) This changes #include order to be prefix, unit header if applicable then other stuff roughly in order from most dependent to least dependent library. This helps catch headers that don't #include things that they use.
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-16/+16
| | | | | | | | | | | | * 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
* Do not use FUNC in delegate where applicable (nw) Miodrag Milanovic2016-11-061-6/+6
|
* Moved device_memory_interface from driver_device to dummy_space_device. ↵ smf-2016-11-031-12/+2
| | | | Exposed the dummy_space_device as machine().dummy_space(), with a trampoline in driver_device for existing callers. Debugger no longer needs to special case root_device() to avoid showing the dummy address space. [smf]
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-11/+11
| | | | | 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
* Created a tiny_rom_entry structure for the purposes of rom_entry ↵ Nathan Woods2016-08-061-1/+1
| | | | | | | | declarations in code, and a first pass at the required core changes to unpack tiny_rom_entry structures at runtime. WARNING - I've done preliminary testing on a tiny build (pacman works), but nothing more. I know for a fact that a full compile fails
* driver.cpp: removed the old soundlatch methods. (nw) Ivan Vangelista2016-06-121-38/+0
|
* remove legacy calls (nw) Miodrag Milanovic2016-05-011-10/+0
|
* Make watchdog timer a separate device AJR2016-04-301-0/+2
| | | | | - Separate watchdog implementation from running_machine (once again) and driver_device - Old-style methods, now hidden behind #ifdefs, will probably be safe to remove soon
* reverting: Miodrag Milanovic2016-01-201-2/+2
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* tags are now strings (nw) Miodrag Milanovic2016-01-161-2/+2
| | | | fix start project for custom builds in Visual Studio (nw)
* make output be part of driver_device (nw) Miodrag Milanovic2016-01-101-0/+3
|
* removed memory tracking (nw) Miodrag Milanovic2016-01-081-1/+1
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-7/+7
|
* Add ATTR_COLD to DECLARE_(foo)_START and DECLARE_DRIVER_INIT (nw) Alex W. Jackson2014-07-071-3/+3
|
* Moved m_generic_paletteram_* into drivers/device state objects so they are ↵ Miodrag Milanovic2014-04-231-10/+0
| | | | not global anymore (nw)
* removed unused helpers, leftover from conversion to new palette (nw) Miodrag Milanovic2014-04-231-6/+0
|
* Some more core cleanup (nw) Miodrag Milanovic2014-04-221-5/+0
|
* removed unused legacy_callback_func (nw) Oliver Stöneberg2014-04-211-5/+0
|
* modernized 990_hd, moved some code into ti990_10.c, and simplified ↵ Miodrag Milanovic2014-03-231-1/+0
| | | | harddriv.c and remove some legacy leftovers (nw)
* Moved optional_device<screen_device> m_screen and ↵ Miodrag Milanovic2014-03-051-4/+0
| | | | optional_device<palette_device> m_palette out of driver.* (nw)
* Huge update, palette is now device (nw) Miodrag Milanovic2014-02-271-225/+2
| | | note: Aaron please give more descriptive text for release log I have no more strength :)
* moved optional_device<gfxdecode_device> to specific drivers state classes (nw) Miodrag Milanovic2014-02-171-1/+0
|
* Created gfxdecode_device instead of using machine fixed gfxdecode [Miodrag ↵ Miodrag Milanovic2014-02-161-0/+4
| | | | | | | | | | Milanovic] Updated all devices and drivers for using it. out of whatsnew: Note that it is made to work same as before, in some cases it can be more logic to move gfxdevice into subdevice itself then to keep it in main driver.
* Stop the flipping insanity [Alex Jackson] Alex W. Jackson2014-02-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Tilemap flipping is now calculated relative to the center of the visible area rather than to the total screen size, and the generic flip screen functions no longer reconfigure the actual screen. These changes ensure that in most cases flipping should Just Work for drivers that use MCFG_RAW_PARAMs, games that have a programmable CRTC, and games that have raster effects, and should fix many longstanding flip/cocktail-related regressions. (nw) Unfortunately, it also means that all the thankless work that Osso and hap have been doing over the last few months fixing flipscreen regressions will have to be reverted now. I've also undoubtedly caused new regressions in drivers that handle flipscreen in unusual ways. But now we can share video device implementations between drivers that have been updated to RAW_PARAMs and drivers that haven't without kludges all over the place. And now I can hook up the programmable CRTC in toaplan1.c without abandoning all hope of flipscreen ever working again in that driver. (also nw) I also added savestate registration for the generic soundlatches, which seemed like a good idea. Any particular reason why these weren't being saved?
* Removed SOUND_RESET legacy MACRO. (nw) Ivan Vangelista2013-10-291-4/+1
|
* Removed SOUND_START legacy MACRO. Added SOUND_START_MEMBER and ↵ Ivan Vangelista2013-10-271-2/+6
| | | | SOUND_RESET_MEMBER macros. (nw)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* removed some unused legacy functions / flagged a few more things as ↵ Oliver Stöneberg2013-08-221-2/+2
| | | | deprecated / reduced the DEPRECATED noise a bit for now nw)
* added MCFG_MACHINE_RESET_REMOVE / MCFG_*_RESET(0) cleanup (nw) Oliver Stöneberg2013-08-211-0/+2
|
* removed unused legacy macro VIDEO_RESET (nw) Oliver Stöneberg2013-08-041-1/+0
|
* removed unused member_wrapper_line (nw) Oliver Stöneberg2013-08-031-6/+0
|
* removed some obsolete legacy stuff from src/emu/driver.h (nw) Oliver Stöneberg2013-08-021-16/+0
|
* Created new device_video_interface. Right now its sole purpose is to Aaron Giles2013-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | house a screen tag and to find the screen at startup, providing an m_screen object that can be used. One nice feature is that if there is only one screen and no screen has been specified, it will auto configure to that screen. This removes the need to explicitly specify a screen in the configuration for a large chunk of drivers (though doing so never hurts). A new macro MCFG_VIDEO_SET_SCREEN is provided, though devices are encouraged to define their own that maps there so it is obvious which device is being targeted. The device_video_interface's validation function will error if an invalid screen is specified or if no screen is provided but there are multiple screens present. Updated all devices that currently had an m_screen in them to use the device_video_interface instead. This also has the nice benefit of flagging video-related devices for categorization purposes. It also means all these devices inherit the same screen-finding behaviors. For devices that had interfaces that specified a screen tag, those have been removed and all existing structs updated. Added an optional_device<screen_device> m_screen to the base driver_device. If you name your screen "screen" (as most drivers do), you will have free access to your screen this way. Future updates include: * Updating all devices referencing machine.primary_screen to use the device_video_interface instead * Updating all drivers referencing machine.primary_screen to use the m_screen instead * Removing machine.primary_screen entirely