summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/gamedrv.h
Commit message (Collapse)AuthorAgeFilesLines
* gigatron: Fix copyrights. (#6211) Sterophonick2020-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gigatron: Fix copyrights. (nw) * gigatron: make capitalization consistent (nw) * gamedrv: fix a minor spelling mistake (nw) * gigatron: change the ROM names to valid characters * gigatron: cpu device work (nw) * gigatron: cpu work (nw) * gigatron: cpu work (nw) * gigatron: cpu device work (nw) * gigatron: cpu device progress * gigatron: driver + cpu work (nw) * gigatron: some more instructions * gigatron: slight fixes (nw) * gigatron: fixes (nw) * gigatron: whoops (nw) * gigatron: make some fixes thanks hap (nw) * gigatron: temporarily fix error with mem address (nw) * gigatron: do a bit of work (nw)
* srcclean (nw) Vas Crabb2018-05-271-5/+5
|
* Removed DRIVER_INIT-related macros, made driver init entry in GAME/COMP/CONS ↵ MooglyGuy2018-05-131-11/+5
| | | | | | | | | | | | 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)
* std::function and delegate both require runtime relocations, slowing down ↵ Vas Crabb2018-01-181-37/+14
| | | | startup - just use function pointers; also, most downcast, and get rid of a circular dependency between gamedrv.h and mconfig.h (nw)
* std::function is too inefficient, use a device delegate instead (nw) AJR2018-01-171-6/+6
|
* 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.
* ui: improve layout of art/info box, support mousewheel scroll in info Vas Crabb2017-08-101-8/+6
| | | | | | | | | | | text, allow home/end to jump to beginning/end of filter list, consolidate logic (nw) A number of vestigial constants have been removed. Some hacky input types that were just used as a trick to pass information between menu functions are gone. MACHINE_NO_STANDALONE is a relic from when drivers were used as arbitrary ROM containers, and in a world of first-class devices this is no longer necessary.
* added flag for imperfect timing (nw) hap2017-07-271-1/+3
|
* Trade MACHINE_IMPERFECT_KEYBOARD, MACHINE_NODEVICE_CAMERA and ↵ Vas Crabb2017-07-271-13/+9
| | | | | | | | | | MACHINE_NODEVICE_WAN for MACHINE_IMPERFECT_CONTROLS. * MACHINE_IMPERFECT_KEYBOARD is more applicable on keyboard devices - most of them should be devicified eventually. * MACHINE_NODEVICE_CAMERA tends to apply across a family of machines, so it's easy to apply at state class level. * MACHINE_NODEVICE_WAN isn't even used. * MACHINE_IMPERFECT_CONTROLS is widely applicable, knock yourselves out adding it to GAME macros. * Updated machines that were using MACHINE_IMPERFECT_KEYBOARD or MACHINE_NODEVICE_CAMERA to apply it at device or state class level.
* Move unemulated/imperfect flags from machines into devices. Vas Crabb2017-07-271-47/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, flags for unemulated/imperfect features apply at system level. This falls over quickly with systems that have slot devices. For example you can plug in a broken sound card or keyboard on a PC or Amiga driver and get no warnings. There's also no way to propagate these flags from a device to all systems using it. This changeset addresses these issues. It's now possible to report unemulated/imperfect features on a device level with static unemulated_feeatures() and imperfect_features() member functions. So far the only thing using this is the votrax device. To support front-ends, this is exposed in -listxml output as a new "feature" element that can appear in system/device descriptions. It has a "type" attribute indicating which feature it is, potentially a "status" attribute if the device itself declares that the feature is unemulated/imperfect, and potentially an "overall" attribute if the device inherits a more severe indication from a subdevice. The embedded DTD describes possible values. Example: device/machine declares imperfect sound: <feature type="sound" status="imperfect"/> Example: device/machine declares unemulated keyboard: <feature type="keyboard" status="unemulated"/> Example: device declares imperfect controls but inherits unemulated controls from a subdevice: <feature type="controls" status="imperfect" overall="unemulated"/> Example: device doesn't declare imperfect LAN but inherits it from a subdevice: <feature type="lan" overall="imperfect"/> It's still possible to add these flags to machines in the GAME/COMP/CONS macro. If the state class declares them with static member functions, the two sources will be combined. If you subclass a device, you inherit its flags if you don't redefine the relevant static member functions (no override qualifier is necessary since they're static). The UI has been updated to display appropriate warnings for the overall machine configuration, including selected slot devices, at launch time. The menus don't display overall status, only status for the machine itself. We can make it scan subdevices if we decide that's desirable, it just needs caching to enure we don't take a huge performance hit.
* well, that causes mpu4 to take way too much memory to compile, the changes ↵ Vas Crabb2017-05-221-22/+26
| | | | to device instantiation still apply (nw)
* and ioports, too (nw) Vas Crabb2017-05-221-12/+7
|
* There's no day like today. This just follows up on the last commit: game ↵ Vas Crabb2017-05-221-20/+21
| | | | drivers are less special special - they have configuration instantiated in the usual way.
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Cherry-pick some features from self-registering drivers PoC: Vas Crabb2017-02-161-95/+95
| | | | | | | | * Use size_t for sizes and <algorithm> for algorithms * Fix up some files that were getting linked into multiple libs * Add missing virtual method to sh2 peripheral class * Put shortname in driver struct for locality * Use shared pointers in config LRU cache for safety
* A round of spelling/typographical fixes to source comments (nw) Scott Stone2016-11-241-2/+2
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-39/+39
| | | | | | | | | | | | * 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
* srcclean (nw) Vas Crabb2016-10-231-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-34/+34
| | | | | 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
* Proposal for new system flags for 0.179 dev-cycle: angelosa2016-09-261-2/+8
| | | | | | | | | | | | | | | | | | | | | * MACHINE_NODEVICE_MICROPHONE For unemulated microphone; * MACHINE_NODEVICE_CAMERA For unemulated camera; * MACHINE_NODEVICE_PRINTER For unemulated printer * MACHINE_NODEVICE_LAN For unemulated linking multi-cabinet capabilities; * MACHINE_NODEVICE_WAN For unemulated networking capabilities; Restructured MACHINE_FLAGS into FATAL / WARNING / BTANB main categories, in order to make them easier to expose. List of ToDo: * MACHINE_IS_SKELETON / MACHINE_IS_SKELETON_MECHANICAL needs to be sorted or nuked, your call; * Verify outputted text for the new flags. * Define if BTANB type flags should have yellow warning or not. * Add examples (will do in next commit).
* 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
* Machine management cleanups AJR2016-04-251-6/+0
| | | | | | - Boolean parameter to running_machine::run is no longer firstrun (which is now a member variable of mame_machine_manager) but quiet, which disables logging and audio recording without explicitly checking the system name. - Sound recording is now turned on and off by explicit calls. The potential uses of this have not been explored. - Dependencies reduced on drivenum.h, where the declaration for GAME_NAME(___empty) has been moved to.
* Compressed internal layouts [David Haywood] Miodrag Milanovic2016-03-301-7/+22
|
* Added new flag MACHINE_IS_INCOMPLETE, and hooked it up to Bombs Away and ↵ angelosa2016-01-231-0/+1
| | | | "unknown fighting game 'BB'".
* change flags from GAME_ to MACHINE_ David Haywood2015-07-291-28/+28
| | | | this better fits the drivers from MESS (which have always illogically used the GAME_ flags despite not being games) and also fits fine with arcade machines.
* Revert "machine type attribute added in the xml" Olivier Galibert2015-05-291-5/+1
| | | | | | Too prone to abuse, we're afraid. This reverts commit 198c77327e08cb6f0dfa2183d6fa226f8908294d.
* machine type attribute added in the xml k2-git2015-05-291-1/+5
|
* Add ATTR_COLD to DECLARE_(foo)_START and DECLARE_DRIVER_INIT (nw) Alex W. Jackson2014-07-071-1/+1
|
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-105/+105
|
* Since there is no clear way to determine if mouse should be shown or not, I ↵ Miodrag Milanovic2012-08-191-0/+1
| | | | am putting a new flag (no whatsnew)
* All driver inits are now member of state classes. Miodrag Milanovic2012-08-101-95/+8
| | | | | Added DECLARE_DRIVER_INIT macro to define it H file, and DRIVER_INIT_MEMBER for member declaration in C files Updated all drivers accordingly (no whatsnew)
* Added GAME_IMPERFECT_KEYBOARD flag and changed ui.c to use that instead of ↵ Miodrag Milanovic2012-08-061-0/+1
| | | | displaying message for each driver with keyboard (no whatsnew)
* Changed macros that are MESS related, no need to recompile MAME since they ↵ Miodrag Milanovic2012-08-051-3/+3
| | | | are not used (nw)
* Updated GAME and GAMEL with class name per machine used, for future ↵ Miodrag Milanovic2012-08-041-3/+3
| | | | DRIVER_INIT change (no whatsnew)
* Sega 16-bit cleanup, part 1 (still more coming): Aaron Giles2012-08-041-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Converted FD1089/FD1094 into proper devices, derived from m68000. They now handle their own decryption and memory management, so we can remove all the calls for initialization/reset/etc. The key now lives as a 'key' subdevice under the CPU, and the FD1089/1094 are now specified just like any other CPU. * Removed the horrible s16fd and s24fd files. Good riddance. * Created a helper class for managing fd1094 decryption caches. * Converted the memory mapper into a new modern device and updated the segas16b, segaorun, and segas18 drivers to use it. Fixed ROM memory mapping so that the source ROMs can be loaded contiguously, removing a bunch of hacks. * Untangled the joined segas1x_state and split the states for each system into their own classes. Cleaned up some implementations. * Added support for member functions to be called as DRIVER_INIT functions. To do this, #define MODERN_DRIVER_INIT prior to #including "emu.h" and you will be required to specify a class and member function for your driver init. * Fully modernized the segas16b and segas18 drivers. New working games added ----------------------- GP Rider (Japan) [ShouTime, Charles MacDonald, Aaron Giles] Last Survivor [ShouTime, Charles MacDonald, Aaron Giles, 9ofzeven, TrevEB, Dr. Spankenstein, ghoolster, Surgeville, Tormod, Tjaberg, Waremonger] (Note: A couple games are still busted, but most are working. Will follow up with more updates.)
* Templatized the palette generators and made naming consistent. Aaron Giles2012-04-091-10/+0
| | | | | Moved video/generic flip screen management into the base driver_device class and updated all callers.
* Clean-ups and version bumpmame0145u6 Angelo Salese2012-04-081-4/+4
|
* Move driver list/enumerator to new file drivenum.c/.h. Aaron Giles2012-04-061-0/+221
Move game_driver definition and constants to new header gamedrv.h.