summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev/flopdrv.cpp
Commit message (Collapse)AuthorAgeFilesLines
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-37/+43
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-1/+1
| | | | | | | | | | * 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
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-9/+10
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* flopdrv: Even legacy devices need some code cleanup (nw) AJR2019-11-051-104/+18
| | | | | | - Get rid of the hardcoded FLOPPY_n tags as much as practical, mostly adding device finder arrays in their place - Move remaining functions using FLOPPY_n down into appldriv and sonydriv (both of which may be eliminated once FDC emulation is modernized) - Replace CLEAR_LINE and ASSERT_LINE with 0 and 1 (these were being inaccurately used to represent active-low control line states)
* flopdrv: Eliminate floppy_get_count (nw) AJR2019-03-291-10/+0
|
* Some legacy floppy fixes and cleanups (#3047) Oliver Stöneberg2018-01-131-6/+6
| | | | | | | | | | * thomflop.cpp: removed usage of floppy_get_drive() (nw) * flopdrv.cpp: got rid of bogus default drive in lookup functions (nw) * flopdrv.cpp: avoid some potential nullptr dereferences (nw) * flopdrv.cpp: made floppy_get_drive() internal (nw)
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-33/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make device_image_interface::update_names a private method called ↵ AJR2017-03-031-3/+0
| | | | automatically at config_complete time (nw)
* Self-registering devices. Vas Crabb2017-03-031-7/+10
| | | | | | * 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.
* legacy floppy: unbreak floppy_stp_w Sergey Svishchev2017-03-011-0/+4
|
* Self-registering devices prep: Vas Crabb2017-02-271-1/+1
| | | | | | | | | | | | | | * 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.
* Revert "using of IS_ENABLED in files used in tiny build (nw)" Miodrag Milanovic2016-11-121-2/+2
| | | | This reverts commit 1efccdd38d4bac6ec44e13f0a6cdf877e3a1c7cb.
* using of IS_ENABLED in files used in tiny build (nw) Miodrag Milanovic2016-11-111-2/+2
|
* converted lot of TRUE/FALSE to real boolean and updated types (nw) Miodrag Milanovic2016-10-221-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-5/+5
| | | | | 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
* Fixed an issue with legacy floppy loading caused by filetype() now being a ↵ Nathan Woods2016-08-181-1/+1
| | | | | | std::string This caused 'mame a800 -flop1 brucelee' to fail on startup, but after this fix the image mounts but incorrectly.
* Turn image init/validate into scoped enums to avoid accidental casts to/from ↵ Vas Crabb2016-08-011-6/+6
| | | | | | integer and boolean types The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
* This changes device_image_interface::filetype() to return 'const std::string ↵ Nathan Woods2016-07-311-3/+1
| | | | | | | | | | | &' instead of 'const char *'. In the interests of removing burdens from client code, I also changed the following: - filetype() will always return the file extension in lower case - device_image_interface::filetype() will return the correct extension for files loaded as a part of softlists - The code for extracting a file extension is now encapsulated in core_filename_extract_extension() Client code has been updated
* Created device_image_interface::add_format() protected member and made ↵ Nathan Woods2016-07-311-1/+1
| | | | device_image_interface::m_formatlist be private
* Removed device_image_interface::has_been_created() Nathan Woods2016-07-301-10/+9
| | | | This method was necessary long ago when devices didn't have distinct load and create paths, which has since been addressed
* C++-ification of src/lib/util/opresolv.[cpp|h] (moved to util:: namespace, ↵ Nathan Woods2016-07-071-2/+2
| | | | changed option_resolution to be a class, etc)
* m_formatlist is now vector (nw) Miodrag Milanovic2016-06-191-1/+1
|
* Eliminate device_t::static_config, a type-unsafe legacy feature. AJR2016-04-141-7/+6
| | | | | | 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.
* reverting: Miodrag Milanovic2016-01-201-6/+6
| | | | | | | 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-6/+6
| | | | fix start project for custom builds in Visual Studio (nw)
* image_manager modernized and move some things around (nw) Miodrag Milanovic2016-01-111-1/+0
|
* clang-modernize part 3 Miodrag Milanovic2015-12-041-22/+22
|
* Cleanups and version bumpmame0168 Miodrag Milanovic2015-11-251-5/+5
|
* Some cleanups and init fixes with help of ReSharper C++ (nw) Miodrag Milanovic2015-11-111-4/+8
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+899