summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sbus
Commit message (Collapse)AuthorAgeFilesLines
* Added ATTR_COLD to common lifecycle methods for many files in src/devices. ↵ holub2024-09-277-27/+27
| | | | (#12822)
* emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Vas Crabb2023-06-172-10/+2
| | | | | | | | | | | | 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-012-2/+2
| | | | function signatures. (#11283) [Ryan Holtz]
* bus/nubus, bus/sbus: Removed a redundant parameter, modernised endian helpers. Vas Crabb2022-06-182-21/+18
|
* Revert initialisation of device members in headers. Vas Crabb2022-04-032-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-31/+31
|
* debugger: Extended target address syntax to include device/address space. ↵ Vas Crabb2021-10-011-1/+1
| | | | | | | | | | | | | | | | | | | (#8630) Added a validity check to ensure address space names are tag-like and unique, since they're now used as identifiers in debugger commands. Extended the syntax for target addresses to allow them to be qualified with a colon followed by an optional device tag and/or address space name. If only the device needs to be specified, a debugger CPU number may also be used. This makes commands like bpset and wpset more flexible, as they can operate on CPUs other than the currently visible CPU. Commands like find, fill, dump and load are more flexible as they can access any space of any device. Removed now-redundant CPU parameters from many commands, and renamed pcatmemp to pcatmem for consistency with other commands. Extended region syntax for saver/loadr to support tags relative to the visible CPU (e.g. you can use "." for the region with the same name as the visible CPU, or "^sibling" syntax). Added an optional root device parameter to memdump. Changed interpretation of Boolean values to support numeric expressions as well as true/false strings and literal 1/0. Added checks that the specified device is CPU-like to various commands that require a CPU (e.g. focus). Previously these commands would crash or trigger an assertion failure if a tag for a non-CPU devices was specified. Fixed the cpunum symbol so it uses the same rules for determining what is or isn't a CPU as parameter parsing. Made device_t sanitise subtags better. Previously you could cause an assertion failure or crash MAME by giving it unexpected relative tags via Lua or the debugger. Added help topic alias support, and reworked the data structures to improve the performance of looking up debugger commands and help topics. Removed the "ref" parameter from debugger command functions (std::bind can hold extra argument values for you if you need them). Also added an error message if duplicate debugger commands are registered. Updated help for commands that changed syntax, and also updated summaries for some commands that had changed in the past without corresponding help updates.
* -emu/devfind.h: Made read_safe avaiable for optional I/O ports only. Vas Crabb2020-11-062-9/+7
| | | | -docs: Added the next couple of sections explaining object finders.
* Cleaned up bitmap API. Vas Crabb2020-09-273-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* finally retired the READ8/16/32/64 and WRITE8/16/32/64 macros (nw) Ivan Vangelista2020-06-1814-83/+79
|
* sweeten most of the remaining arrays of delegates (nw) Vas Crabb2020-02-072-5/+4
|
* srcclean and indentation cleanup (nw) Vas Crabb2019-11-241-13/+13
|
* -sun4c_mmu.cpp: Made generic to support sun4 MMU mode, and cleaned up save ↵ mooglyguy2019-11-183-27/+117
| | | | | | | | | | | | | | | state usage. [Ryan Holtz] -sun4.cpp: Various changes: [Ryan Holtz] * Split sun4 and sun4c hardware emulation into separate derived classes. * Hooked up Sbus IRQs. * Removed now-unnecessary duplicate MMU code. -cgsix.cpp: Added VSync IRQ, cleaned up save state usage, and added THC MISC register. [Ryan Holtz] -sparc.cpp: Renamed MB86901 to SPARCV7, and added a separate class for SPARCV8. [Ryan Holtz] -bt45x.cpp: Made logmacro.h usage more consistent. [Ryan Holtz]
* -cgsix: Added pattern register, plane-mask register, and pixel-mask register ↵ MooglyGuy2019-11-162-9/+99
| | | | support. [Ryan Holtz]
* cgsix: Add raw parameters for screen (nw) AJR2019-11-161-3/+1
|
* -cgsix: Added hardware cursor support. [Ryan Holtz] MooglyGuy2019-11-162-4/+54
|
* -cgsix: Add COLOR1 ROP support, fixes initial clear when starting sunview, nw MooglyGuy2019-11-161-0/+6
|
* Spring cleaning: Vas Crabb2019-11-012-16/+7
| | | | | | | | | | | | * 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
* Make devdelegate more like devcb for configuration. This is a Vas Crabb2019-10-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fundamental change to show device delegates are configured. Device delegates are now aware of the current device during configuration and will resolve string tags relative to it. This means that device delegates need a device to be supplied on construction so they can find the machine configuration object. There's a one-dimensional array helper to make it easier to construct arrays of device delegates with the same owner. (I didn't make an n-dimensional one because I didn't hit a use case, but it would be a simple addition.) There's no more bind_relative_to member - just call resolve() like you would for a devcb. There's also no need to cast nullptr when creating a late bind device delegate. The flip side is that for an overloaded or non-capturing lambda you'll need to cast to the desired type. There is one less conditional branch in the hot path for calls for delegates bound to a function pointer of member function pointer. This comes at the cost of one additional unconditional branch in the hot path for calls to delegates bound to functoids (lambdas, functions that don't take an object reference, other callable objects). This applies to all delegates, not just device delegates. Address spaces will now print an error message if a late bind error is encountered while installing a handler. This will give the range and address range, hopefully making it easier to guess which memory map is faulty. For the simple case of allowing a device_delegate member to be configured, use a member like this: template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); } For a case where different delegates need to be used depending on the function signature, see src/emu/screen.h (the screen update function setters). Device delegates now take a target specification and function pointer. The target may be: * Target omitted, implying the current device being configured. This can only be used during configuration. It will work as long as the current device is not removed/replaced. * A tag string relative to the current device being configured. This can only be used during configuration. It will not be callable until .resolve() is called. It will work as long as the current device is not removed/replaced. * A device finder (required_device/optional_device). The delegate will late bind to the current target of the device finder. It will not be callable until .resolve() is called. It will work properly if the target device is replaced, as long as the device finder's base object isn't removed/replaced. * A reference to an object. It will be callable immediately. It will work as long as the target object is not removed/replaced. The target types and restrictions are pretty similar to what you already have on object finders and devcb, so it shouldn't cause any surprises. Note that dereferencing a device finder will changes the effect. To illustrate this: ... required_device<some_device> m_dev; ... m_dev(*this, "dev") ... // will late bind to "dev" relative to *this // will work if "dev" hasn't been created yet or is replaced later // won't work if *this is removed/replaced // won't be callable until resolve() is called cb1.set(m_dev, FUNC(some_device::w)); ... // will bind to current target of m_dev // will not work if m_dev is not resolved // will not work if "dev" is replaced later // will be callable immediately cb2.set(*m_dev, FUNC(some_device::w)); ... The order of the target and name has been reversed for functoids (lambdas and other callable objects). This allows the NAME macro to be used on lambdas and functoids. For example: foo.set_something(NAME([this] (u8 data) { m_something = data; })); I realise the diagnostic messages get ugly if you use NAME on a large lambda. You can still give a literal name, you just have to place it after the lambda rather than before. This is uglier, but it's intentional. I'm trying to drive developers away from a certain style. While it's nice that you can put half the driver code in the memory map, it detracts from readability. It's hard to visualise the memory range mappings if the memory map functions are punctuated by large lambdas. There's also slightly higher overhead for calling a delegate bound to a functoid. If the code is prettier for trivial lambdas but uglier for non-trivial lambdas in address maps, it will hopefully steer people away from putting non-trivial lambdas in memory maps. There were some devices that were converted from using plain delegates without adding bind_relative_to calls. I fixed some of them (e.g. LaserDisc) but I probably missed some. These will likely crash on unresolved delegate calls. There are some devices that reset delegates at configuration complete or start time, preventing them from being set up during configuration (e.g. src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp). This goes against the design principles of how device delegates should be used, but I didn't change them because I don't trust myself to find all the places they're used. I've definitely broken some stuff with this (I know about asterix), so report issues and bear with me until I get it all fixed.
* sbus: Fix device card installation (nw) AJR2019-05-302-7/+8
|
* sbus: Eliminate tag hacking (nw) AJR2019-05-292-14/+12
|
* Revert "-Removed sbus and gio64 buses..." AJR2019-05-2914-0/+2778
| | | | This reverts commit 3207d504fed679163f0489e2b763eda8c4139b23.
* -Removed sbus and gio64 buses since they aren't up to his majesty AJR's bar ↵ MooglyGuy2019-05-2914-2778/+0
| | | | of quality, nw
* (nw) Clean up the mess on master Vas Crabb2019-03-261-3/+1
| | | | | | | | | | | | | 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-251-1/+3
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* sbus/cgthree: Screen raw parameters (nw) AJR2019-01-121-3/+1
|
* that would help (nw) Vas Crabb2018-11-281-2/+2
|
* metadata and flags (nw) Vas Crabb2018-11-272-0/+4
|
* cgsix: Fix obviously wrong save_item call (nw) AJR2018-09-281-1/+1
|
* -sun4c: Added savestate support. [Ryan Holtz] mooglyguy2018-09-295-5/+128
| | | | -sun4c: SPARCstation IPX, SLC, 1+ and 2 now boot, but get angry to varying degrees for varying reasons. [Ryan Holtz]
* cgsix: Added font register and fixed drawing endianness. Improves SunView ↵ mooglyguy2018-09-282-13/+47
| | | | with cgsix-based cards. [Ryan Holtz]
* sun4: More optimizations, nw mooglyguy2018-09-231-1/+2
|
* srcclean (nw) Vas Crabb2018-09-236-236/+236
|
* -sun4: Added a sun4c MMU device. Currently wraps the functionality of ↵ mooglyguy2018-09-222-24/+23
| | | | | | S4-buffer, S4-cache, and S4-MMU, will eventually be split. [Ryan Holtz] -sun4: Significant optimization, from 150% -> 330% unthrottled on an i7-5930K. [Ryan Holtz]
* -sun4, sparc: Optimized the SPARC core and the sun4 driver. [Ryan Holtz] Ryan Holtz2018-09-211-6/+11
|
* pointer to const isn't necessarily const (nw) Vas Crabb2018-09-191-15/+15
|
* -sbus: Fixed a minor typo in the description of the Artecon serial/parallel ↵ mooglyguy2018-09-161-1/+1
| | | | | | | | | | | | | | | | | board, nw -sparc: Added stubbed-out IFLUSH instruction to fix illegal instruction exceptions in SunOS 4.1.4 installer. [Ryan Holtz] -nscsi: Added optional verbose logging of data transfers. [Ryan Holtz] -timekpr: Switched to use the new logmacro system. [Ryan Holtz] -sun4c: Can now successfully install SunOS 4.1.4. [Ryan Holtz] * Hooked up auxiliary I/O port. * Hooked up bus timeout on unmapped RAM ranges, per documentation. * Changed FDC type to i82072, per documentation. * Silenced a ton of logging. * Reworked IRQ handling and added support for software interrupts.
* -sbus: Added an alternate FCode PROM for the bwtwo video board. [Ryan Holtz] mooglyguy2018-09-161-3/+7
|
* -sbus: Added a skeleton device for the Artecon SB300P 3-serial 1-parallel ↵ mooglyguy2018-09-163-0/+119
| | | | SBus card. [Ryan Holtz]
* -cgsix: Renamed turbogx.* to cgsix.* and added TurboGX+ support. [Ryan ↵ mooglyguy2018-09-157-77/+175
| | | | Holtz, Andrew Liles]
* -sbus: Added a skeleton device for the SunSwift 10/100 + Fast Wide SCSI SBus ↵ mooglyguy2018-09-153-0/+120
| | | | board. [Ryan Holtz, Andrew Liles]
* -sbus: Added a skeleton device for the SunPC 5x86 Accelerator SBus board. ↵ mooglyguy2018-09-153-3/+126
| | | | [Ryan Holtz, Andrew Liles]
* -cgthree,turbogx: Hooked up Bt458 RAMDAC instead of custom palette handling. ↵ mooglyguy2018-09-154-141/+22
| | | | [Ryan Holtz]
* -cgthree: Fixed self-tests, nw mooglyguy2018-09-152-17/+3
|
* -sun4: Added enough ROP support to turbogx to make scrolling work in the ↵ mooglyguy2018-09-142-30/+206
| | | | sun4_60 boot monitor. [Ryan Holtz]
* -turbogx: Added logging of FBC accesses. [Ryan Holtz] mooglyguy2018-09-132-0/+1110
|
* -sun4: Added basic support for cgsix/TurboGX SBus card. [Ryan Holtz] Ryan Holtz2018-09-136-19/+273
|
* cgthree: allow system to program palette (nw) arbee2018-09-122-2/+25
|
* -sbus: Added preliminary cgthree support. [Ryan Holtz] mooglyguy2018-09-135-3/+209
|
* -sun4: Added SBus slot bus and basic bwtwo slot device. [Ryan Holtz] mooglyguy2018-09-134-0/+514