summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/megadrive (follow)
Commit message (Collapse)AuthorAgeFilesLines
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-2/+3
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* emu/device.h: Removed device (READ|WRITE)_LINE_MEMBER in favor of explicit ↵ MooglyGuy2023-06-012-2/+2
| | | | function signatures. (#11283) [Ryan Holtz]
* Restored ability of for image devices to report specific error messages. Vas Crabb2023-04-082-4/+4
| | | | | | | | | | | | | | Restores ability to give specific/detailed messages removed in 6f7e4141ea14acaaf9cb973c66788fabb3457023 while pandering to obsession with single return value. Moved responsibility for displaying the error message in the UI to the caller rather than device_image_interface, and made device_image_interface always log the error along with the full path and error condition content. Gave several image devices more detailed error messages. Added some FIXME comments for apparent bugs.
* Small fixes and cleanup: Vas Crabb2023-04-041-6/+12
| | | | | | | | | * emu/devfind.h: Allow range-based for loops on memory share finders. * emu/emucore.h: Choose correct emu_fatalerror constructor when format string is an rvalue. * osborne/osborne1.cpp: Allocate main RAM as a flat share, and use a view to switch in atttribute RAM. * Reduced scope of some variables and edited some copy/pasted comments.
* API change for device_image_interface AJR2023-03-302-11/+11
| | | | | | | | | - Remove the seterror method for recording error messages and conditions. Condition codes have been made return values for call_load, call_create and various related callbacks. Error messages (which many devices weren't generating) are now displayed through osd_printf_error. - Eliminate the image_init_result and image_verify_result pass/fail enumeration types. Update many functions that were returning these enumerations or simply bools to return std::error_condition instead. In some cases, this type is now passed down from internal parsing/loading functions which were already returning it. In various other cases, the former default UNSPECIFIED has been used as a catchall for I/O errors; anticipated future refactorings should make these error returns more specific. - Expand the image_error categories to include INVALIDLENGTH, NOSOFTWARE and BADSOFTWARE. The first is largely self-explanatory. The second is generated by the core to indicate failure to find software items in lists. The third is provided for devices to indicate semantic errors in software list entries. - Change the return type of floppy_image_device::identify to a pair so the potential error condition can be passed along to the UI without storing it in a member variable. - Move device_image_interface::message down into snapshot_image_device and change its implementation to use string_format instead of printf. - Correct a typo in the shortname of the generic snapshot device.
* bus/megadrive/jcart.cpp: Fixed include guard typo. (#10687) 0kmg2022-12-151-3/+3
|
* More Sega cleanup: Vas Crabb2022-12-152-79/+53
| | | | | | | | | | | * bus/megadrive/jcart.cpp: Turned controller ports into slots - no need to simulate controllers in the cartridge device. * sega/megadriv.cpp: Simplified wired 6-button controller to use a single input port per pad. * megadriv_rad.cpp: Changed to use A/B/C/X/Y/Z button labels like the real systems, added reset buttons to a couple of units that have them. * puckpkmn.cpp: Considering boards without the U6612 exist, assume it uses a Mega Drive II VDP clone with integrated FM sound.
* bus: Get rid of some dubious tag manipulation. Vas Crabb2022-08-202-15/+8
| | | | | | | | | | | | | | | | | | | | The implementation details of how the cartridges allocate storage for memory really shouldn't be part of the interface. Having tags in the headers encourages people to depend on these implementation details. This gets rid of it in most of the headers. A few particularly leaky abstractions (bbc/rom, electron/cart, gba, generic, jakks_gamekey, m5) depend on this, so it can't be removed in those cases without further refactoring to encapsulate the slot devices better. This doesn't change behaviour, it just mechanically removes stuff from the headers and uses device_t::subtag rather than string manipulation on tags. Most of the cartridge devices shouldn't have rom_alloc member functions at all - the region created by the software list loader can be used directly when loading from the software list, and the slot can allocate a region with the same tag when loading loose software. This avoids creating an extra region and copying the data when loading from the software list. See vboy for an example that doesn't allocate a superfluous region.
* megadriv.xml: compatibility field cleanups, apply minor fixes (#9732) ↵ Angelo Salese2022-05-231-17/+16
| | | | | | | | | | | | [Angelo Salese, 0kmg] - megadriv.xml: fix booger ROM loading; - megadriv.xml: fix wboy5 and turmamon EEPROM saving; - megadriv.xml: add SRAM to shijie, fixes roster names; - megadriv.xml: allow nba2k and nba2k5 to boot; - megacd.cpp: remove gross hack, allow megacdj & megacd2j to boot again; - jcart.cpp: fix P3 and P4 labels; - megadriv.xml: add SRAM to fengshen; - megadriv_acbl.cpp: make sonic3mb to boot, add basic protection sim;
* Revert initialisation of device members in headers. Vas Crabb2022-04-032-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | This is problematic in several ways: * Initialising things at construction that aren't needed until after start slows down -romident, -validate, -listxml, etc. Slot cards can be a particular drain on -listxml and -validate as they're instantiated for every compatible slot. It's more pronounced for array members, too. * Splitting member initialisation between declaration in headers and constructors in source files means you have to look at two places to check for the initial value, and you always need to check the constructor even if an initialiser is present in the header because the constructor initaliser list takes precedence. (This isn't as much of an issue for driver classes because the constructor is most often inlined at declaration, so it isn't far from the member declarations.) * Initialisers in headers for frequently-used devices increases the frequency of recompiling dependent devices/drivers as they're exposed to any changes in initialisers. * Initialisers in frequently-used headers increase build times because there's more for the compiler to parse/cache. (This affects makedep.py as well for single-driver builds, but that's a single pass.) It's not a lot individually, but it adds up given the size of MAME, which keeps increasing. We've already had one contributor banned from GitHub actions for resource usage, we don't want to waste compiler time unnecessarily.
* init vars for coverity (bus/l-w) Robbbert2022-04-022-14/+14
|
* devices/*: Removed extra semicolons after function bodies in headers. (#9275) 0kmg2022-02-061-7/+7
|
* device_image_interface: Interface overhaul AJR2022-01-062-16/+4
| | | | | | | | | | | | | - Remove the iodevice_t classification, which was not used that much and was incomplete anyway. Image device implementations must now provide their own instance names and brief instance names. Several new parent classes have been created to make it easier to use the old standard names. - Change must_be_loaded from a pure virtual function to be overridden in implementations to a getter for a base class property that can be set on the host side (as was formerly made possible for NES, MD and "generic" cartridge slots) but defaults to false for all types. This restrictive property has been unset for a small number of cases. - Create parent classes for paper tape and magnetic tape devices. At present these are dummy classes that do little to nothing, but may help unify implementations in the future. - Change several member functions to take std::string_view parameters rather than const std::string & or const char *. - Make update_names take into account brief names, as discussed in PR #2555. - Remove the obsolete uses_file_extension function (which used thread-unsafe strtok). * portfolio_ccm_slot: Change image type from "cartridge" to "memcard" * i7220, datapack: Add custom instance names that weren't there before * pc11: Add note
* util: Further API cleanups: (#8661) Vas Crabb2021-10-051-8/+7
| | | | | * Turned `core_file` into an implementation of `random_read_write`. * Turned PNG errors into a standard error category. * Added a helper for generating what look like derived classes on-the-fly.
* srcclean in preparation for branching release Vas Crabb2021-04-251-2/+2
|
* Adding technical details on the SVP chip internal ROM and fixing start ↵ Javier de Silóniz Sandino2021-04-091-0/+20
| | | | address (#7944)
* new WORKING software list entries (#7884) David Haywood2021-04-055-1/+160
| | | | | | | | | | | | * new WORKING software list entries ------ megadriv.xml fbarg96 - Futbol Argentino 96 (Argentina) (hack of J. League Pro Striker 2) [Sebastian Beltran, David Haywood] tc2000a - TC 2000 (Argentina, protected) [Sebastian Beltran, David Haywood] * new NOT WORKING software list entries ------ megadriv.xml: truco96a - Truco '96 (Argentina, protected) [Sebastian Beltran, David Haywood]
* bus/megadrive: Improved Sonic & Knuckles "lock on" slot handling. [Ryan Holtz] MooglyGuy2021-03-252-15/+49
| | | | * Fixed saving in Sonic 3 & Knuckles. * Made all MD cartridge types able to be locked on.
* -jcart: Fixed I2C read address for Codemasters games. [Ryan Holtz] (#7885) MooglyGuy2021-03-232-36/+31
| | | Co-authored-by: Ryan Holtz <ryan.holtz@arrowheadgs.com>
* bus/megadrive: Updated EEPROM save cartridge compatibility list. Vas Crabb2021-03-231-3/+3
|
* -machine/i2cmem.cpp: Added Xicor X24C01 support. [Ryan Holtz] MooglyGuy2021-03-233-31/+59
| | | * bus/megadrive: Added EEPROM cartridge variant with Xicor X24C01. [Ryan Holtz]
* devices/bus/megadrive/svp.cpp: moved internal ROM here instead that in the ↵ Ivan Vangelista2021-03-082-0/+14
| | | | ssp1601 CPU core
* sk.cpp and 315_5313 devices, actions_atj2279b, rainbow and silverball ↵ Ivan Vangelista2021-02-201-1/+0
| | | | drivers: ran srcclean and some grammar corrections for recenty merged PRs
* sk.cpp: Add notes for Sonic 3 & Knuckles save ... (#7805) cam9002021-02-201-1/+2
| | | ...feature
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-2/+2
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Make "slot" feature in software lists and a few related features case-sensitive AJR2021-01-051-2/+1
|
* -emu/devfind.h: Made read_safe avaiable for optional I/O ports only. Vas Crabb2020-11-061-8/+8
| | | | -docs: Added the next couple of sections explaining object finders.
* various devices and drivers: removed superfluous semicolons (nw) Ivan Vangelista2020-06-291-2/+2
|
* finally retired the READ8/16/32/64 and WRITE8/16/32/64 macros (nw) Ivan Vangelista2020-06-1816-242/+242
|
* Fixed regression in peps0615 introduced in ↵ smf-2020-05-061-1/+1
| | | | | | | | 635f469c7dd0b5166455bafeddb0e898b1081165, the game writes to the page buffer then sends a spurious start condition before the stop condition that writes the buffer. [smf] Created i2cmem sub classes for all used device types, fixed the buffer sizes that were wrong, removed the methods for modifying the data & buffer sizes and changed the drivers to use the correct types. [smf] Switched aa310 & ertictac over to use device/machine/pcf8583.cpp, which is not currently based on i2cmem.cpp but might be worth merging in the future. [smf]
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-17/+22
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* Spring cleaning: Vas Crabb2019-11-012-5/+5
| | | | | | | | | | | | * Changed emu_fatalerror to use util::string_format semantics * Fixed some incorrectly marked up stuff in build scripts * Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now) * Fixed memory leaks in Xbox USB * There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it * Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave) * Got rid of device_slot_card_interface as it wasn't providing value * Added a helper template to reduce certain kinds of boilerplate in slots/buses * Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
* (nw) add doxygen comments for a bunch of core stuff, and convert a bunch of ↵ Vas Crabb2019-10-161-2/+2
| | | | comments to doxygen format
* (nw) removed every remaining AM_ macro I could find in comments, but one in ↵ Ivan Vangelista2019-10-101-2/+2
| | | | emu\memarray.h cause I didn't want to cause a full recompile for this (nw)
* (nw) Clean up the mess on master Vas Crabb2019-03-266-48/+62
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-256-62/+48
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* devices\bus: some more MCFG macros removal (nw) Ivan Vangelista2019-02-163-16/+20
|
* screen.h: adddedconstructor for monochrom screens and removed ↵ Ivan Vangelista2019-02-111-5/+6
| | | | | | | MCFG_SCREEN_ADD_MONOCHROME and MCFG_SCREEN_COLOR (nw) misc MACHINE_CONFIG removal (nw) started work on voltage_regulator_device macros removal (nw)
* -ghosteo: Removed deprecated warning, nw mooglyguy2019-02-022-27/+36
| | | | | | | | -i2cmem: Removed some MCFG macros, nw -bus/nes/datach, bandai: Removed MCFG macro, nw -bus/megadrive/eeprom, jcart: Removed MACHINE_CONFIG macros, nw
* -devices/sound/aica, flt_rc, ics2115, k007232, k053260, sp0250, upd7759: ↵ mooglyguy2018-12-201-10/+18
| | | | | | | Removed MCFG macros. [Ryan Holtz] -drivers/ajax, asterix, bottom9, chqflag, fastlane, flkatck, gradius3, igs_fear, igs011, mainevt, overdriv, pgm, segapico, spy, twin16, wecleman: Removed MACHINE_CONFIG macros. [Ryan Holtz]
* as if millions of this pointers suddenly cried out in terror, and were ↵ Vas Crabb2018-06-081-7/+7
| | | | | | | suddenly silenced * streamline templates in addrmap.h * get rid of overloads on read/write member names - this will become even more important in the near future
* Streamline machine configuration macros - everyone's a device edition. Vas Crabb2018-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make MCFG_DEVICE_ADD and callable device types more flexible: Vas Crabb2018-05-044-70/+73
| | | | | | | | | | | | | | | | | | | | | * Allows defaulted clocks (see subtle example with vboy) * Allows additional constructors (see RS232 port in tranz330) * Allows use of device finder in place of tag in MCFG_DEVICE_ADD * Requires out-of-line destructor for devices using incomplete types * Requires XTAL or explicit u32 for clocks for devices with private types Devices must still define the standard constructor. When writing additional constructors, be aware that the constructor runs before device_add_mconfig in the context of the existing device, not the new device. See osborne1, zorba, tranz330, and vboy for examples of this in use. Compilation is a bit slower, but this is temporary while refactoring is in progress. Eliminated the need for MCFG_SOUND_ROUTE_EX. Removed macros from slot option configuration - they just obfuscated code and slowed it down with needless dynamic casts, but didn't actually simplify it.
* removed some state() calls smf-2018-04-142-2/+2
|
* Address maps macros removal, pass 1 [O. Galibert] Olivier Galibert2018-03-141-14/+16
|
* srcclean (nw) Vas Crabb2018-02-251-1/+1
|
* devices/bus: made some methods private now that it's possible (nw) Ivan Vangelista2018-02-141-13/+15
|
* API change: Memory maps are now methods of the owner class [O. Galibert] Olivier Galibert2018-02-122-2/+4
| | | | | Also, a lot more freedom happened, that's going to be more visible soon.
* API Change: Machine configs are now a method of the owner class, and the ↵ Olivier Galibert2018-01-175-20/+12
| | | | | | | | | | 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.
* Remove a bunch of space.device().safe_pc() from devices (nw) Olivier Galibert2017-12-301-20/+20
|