summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/gromport
Commit message (Collapse)AuthorAgeFilesLines
* emu/ioport.h: Made syntax for configuring callbacks more consistent. Vas Crabb2024-10-182-6/+6
| | | | | | | | | | | | You now use FUNC or NAME to configure port field callbacks, like you would when configuring other kinds of callbacks. This has a number of benefits: * No need to remember different syntax for port field callbacks, and more approachable for new contributors. * May use function templates with multiple arugments using NAME((&...)) syntax without resorting to another layer of macros. * May use non-member functions on the odd chance it's useful. * More natural syntax for referring to member functions.
* Added ATTR_COLD to common lifecycle methods for many files in src/devices. ↵ holub2024-09-275-13/+13
| | | | (#12822)
* ti99: Virtualize inherited device methods for consistency. Michael Zapf2024-04-013-14/+14
|
* ti99: Prevent re-appearing memory contents when swapping cartridges. Michael Zapf2024-04-011-0/+13
|
* ti99: Using device arrays instead of multiple similar devices. Michael Zapf2024-04-012-37/+21
|
* ti99: Further cleanups, removed casts. Michael Zapf2024-03-3110-186/+93
|
* ti99: Removed casts and fixed a bug in the multi-cartridge connector. Michael Zapf2024-03-293-10/+5
|
* ti99: Replaced static_cast with dynamic_cast (mametesters 06824) Michael Zapf2024-03-282-3/+10
|
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-10/+15
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* Move format #includes out of header files AJR2023-10-121-1/+3
|
* emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Vas Crabb2023-06-171-2/+0
| | | | | | | | | | | | Read callbacks now need a default return value supplied at construction. Replaced isnull() with isunset() which tells you if the callback wasn't configured rather than whether it isn't safe to call. Enabled validation of device callbacks (it seems it was disabled at some point, probably accidentally). Device callbacks and object finders now implement the same interface for resolution.
* emu/device.h: Removed device (READ|WRITE)_LINE_MEMBER in favor of explicit ↵ MooglyGuy2023-06-0110-32/+32
| | | | function signatures. (#11283) [Ryan Holtz]
* Cleaned up logging across the codebase (GitHub #10183). (#11250) [Ryan Holtz] MooglyGuy2023-05-234-22/+22
| | | | | * Converted various logging patterns to use logmacro.h consistently. * Removed redefinitions of LOG_GENERAL. * Use LOGMASKED in more places.
* 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.
* API change for device_image_interface AJR2023-03-302-6/+4
| | | | | | | | | - 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.
* ti99: Take care for cartridge dumps that do not fill the 8K window. Michael Zapf2022-05-061-13/+26
|
* ti99: Increased number of banks for gromemu cartridge type; more informative ↵ Michael Zapf2022-05-062-49/+76
| | | | log output.
* Revert initialisation of device members in headers. Vas Crabb2022-04-033-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-023-6/+6
|
* Use ioprocs classes instead of emu_file for device_nvram_interface's load ↵ AJR2022-02-272-9/+11
| | | | and save methods, and have these return false on I/O errors
* Remove fileio.h from emu.h AJR2022-02-112-0/+4
|
* device_image_interface: Interface overhaul AJR2022-01-062-9/+3
| | | | | | | | | | | | | - 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-1/+4
| | | | | * 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 MAME 0.235, and two small adjustments. Vas Crabb2021-09-261-12/+12
| | | | | | | * Reduce repeated directory walking in cleansrc target (substantially improves speed of building the target on Windows). * Disable a validity check using an MSVC language extension when using clang in MSVC ABI mode.
* -Reworked device type definition macros a little and added more Doxygen. Vas Crabb2021-09-075-5/+5
| | | | | | | | | | | | | | | * Reworked device type definition macros to eliminate one level of indirection when using device types by name. * Fixed a potential initialisation order issue that could affect device parent ROMs. * Eliminated the need for DEFINE_DEVICE_TYPE_NS - just use DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_PRIVATE with fully-qualified names. * Changed device type aliases to static auto references in the headers. * Added Doxygen comments for system/device definition macros and system flags. -Added ROM parents for m68705u3 and a2diskiing.
* Decoupled RPK logic from TI-99 cartridge code. (#7880) npwoods2021-09-062-408/+100
| | | Decoupled support for RPK (RomPacK cartridge images) from TI-99 code, enabling the logic to be leveraged by other drivers.
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-222-32/+36
| | | | | | | | | 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.
* bus/ti99/gromport/cartridges.cpp: Use get_attribute_string_ptr AJR2021-01-271-43/+32
|
* Much more core std::string_view modernization AJR2021-01-201-0/+2
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* hash.cpp, hashing.cpp: Change string processing to use std::string_view ↵ AJR2021-01-011-1/+1
| | | | parameters; add sum16 type
* ti99: Allow smaller ROMs in paged378 cartridge to be mirrored in the bank space. Michael Zapf2020-12-181-1/+5
|
* -Switch to building MAME as C++17. Vas Crabb2020-11-1510-22/+23
| | | | | | | * Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
* ti99: Reimplementation of the Horizon RAMdisk card with all config options ↵ Michael Zapf2020-11-141-1/+4
| | | | of the real hardware.
* Got rid of global_alloc/global_free. Vas Crabb2020-10-032-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* ti99: Extend gromemu cartridge type to support bank-switched ROMs. Michael Zapf2020-09-042-13/+40
|
* ti99: Remove include file ti99defs.h Michael Zapf2020-06-205-5/+1
|
* ti99: Retire custom READ8Z/SETADDRESS macro. Michael Zapf2020-06-1810-55/+55
|
* ti99: Added CorComp disk controller cards. Michael Zapf2020-03-141-2/+2
|
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-8/+8
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* (nw) misc cleanup: Vas Crabb2019-09-191-3/+5
| | | | | | * Fix path for coleco cartridge bus header * Remove some assert_always * Fix some comments that seem to have been victims of scripted editing
* More purging of now-superfluous uintptr_t casting (nw) AJR2019-08-151-1/+1
|
* ioport: Change PORT_CHANGED_MEMBER param type from void * to u32 (nw) AJR2019-08-152-2/+2
|
* uintptr_t ftw (nw) smf-2019-08-152-3/+3
|
* ti99: Allow for RAM-only standard cartridges (Myarc Exbasic II). Michael Zapf2019-07-081-2/+16
|
* (nw) Clean up the mess on master Vas Crabb2019-03-2610-84/+81
| | | | | | | | | | | | | 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-2510-81/+84
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* bus/ti99, geneve, ti99_[various]: Eliminate address space and mem_mask ↵ AJR2019-03-0710-78/+79
| | | | | | arguments in all handlers (nw) at29x, hdc92x4, mm58274c, rtc65271, strata, tms9901, tms9902: Simplify read/write handlers (nw)
* tms9900, tms9980a, tms9995: CRU addressing change AJR2019-03-011-6/+2
| | | | | | - Shift all CRU addresses by 1 in memory maps. This makes CRU addressing more consistent with both register values and external address lines. (CRUOUT is multiplexed with the lowest address line on the 8-bit bus versions.) - Addressing for CRU read accesses is now the same as it has been for CRU write accesses: one address for each bit. This simplifies the CPU cores (which were already emulating bit access times), though it means some read handlers now have to do some additional work. - CRU space is now little-endian, despite the big-endian memory organization, because less significant bits correspond to lower CRU addresses.
* ti99: Reject oversized cartridge dumps to avoid memory corruption. Michael Zapf2018-12-211-0/+1
|
* ti99: Simplified GROM declaration. (nw) Michael Zapf2018-08-211-24/+8
|