summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/cpc
Commit message (Collapse)AuthorAgeFilesLines
* floppies: Turn the format arrays into function calls. Create a default ↵ Olivier Galibert2021-03-021-1/+1
| | | | "mfm", "fm" and "pc" list of formats. Their contents, and which driver uses what, may need some tuning.
* Reinstated RI Handler Fergus Leen2021-02-021-1/+1
|
* emumem: Simplify memory management. [O. Galibert] Olivier Galibert2020-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | API impact: - install_ram/rom/writeonly now requires a non-null pointer. If you want automatically managed ram, add it to a memory map, not in machine_start - install_*_bank now requires a memory_bank *, not a string - one can create memory banks outside of memory maps with memory_bank_creator - one can create memory shares outside of memory maps with memory_share_creator Memory maps impact: - ram ranges with overlapping addresses are not shared anymore. Use .share() - ram ranges touching each other are not merged anymore. Stay in your range Extra note: - there is no need to create a bank just to dynamically map some memory/rom. Just use install_rom/ram/writeonly
* volt_reg: Remove uses that are not needed anymore with the recent (#7367) Aaron Giles2020-10-203-12/+0
| | | DAC changes. Which is all of them. Remove the device as well.
* bus/cpc: Simplify handler signatures (nw) AJR2020-06-0730-140/+140
|
* another bunch of READ* / WRITE* macros removal (nw) Ivan Vangelista2020-05-202-4/+4
|
* some more handlers simplified (nw) Ivan Vangelista2020-05-131-5/+5
|
* z80dart: Replace old device with new variant of modern SIO emulation AJR2020-02-291-1/+1
| | | | | | z80sio: Make LOGBIT less spammy; booleanize a few members (nw) machine/mtx.cpp: Remove unnecessary includes (nw)
* various devices: try the new (and some not so new) save state possibilities (nw) Ivan Vangelista2019-12-091-4/+1
|
* few more returning int literal for bool (nw) Vas Crabb2019-11-101-5/+5
|
* start putting noexcept on things that have no business throwing exceptions, ↵ Vas Crabb2019-11-101-9/+9
| | | | starting with diimage. also fix a slight bug in the interface matching function for software list parts. (nw)
* Spring cleaning: Vas Crabb2019-11-012-18/+8
| | | | | | | | | | | | * 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-2614-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Move IDE devices into bus/ata (nw) (#5756) ajrhacker2019-10-231-1/+1
|
* srcclean (nw) Vas Crabb2019-08-252-8/+8
| | | | I'm assuming atronic.cpp was supposed to be Windows-1252 with Euro currency symbol encoding. Everyone please use UTF-8 for source files.
* amstrad: add Ram Electronics Music Machine MIDI and sampler expansion. ↵ mahlemiut2019-08-162-0/+182
| | | | [Barry Rodewald]
* ioport: Change PORT_CHANGED_MEMBER param type from void * to u32 (nw) AJR2019-08-152-9/+9
|
* z80pio.cpp : Simplify handlers, Reduce duplicates cam9002019-04-071-2/+2
|
* z80ctc, z80dart, z80sio: Simplify read/write handlers (nw) AJR2019-03-272-4/+4
|
* (nw) Clean up the mess on master Vas Crabb2019-03-2611-68/+60
| | | | | | | | | | | | | 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-2511-60/+68
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* bus/bbc/exp, bus/bbc/rom, ds1315, upd7002: Simplify read/write handlers (nw) AJR2019-03-141-5/+8
|
* upd765: Simplify read/write handlers (nw) AJR2019-03-101-3/+3
|
* am9513, am9517a, am9519, at_keybc, cs4031, ds128x, mc141618, wd7600: ↵ AJR2019-03-072-19/+4
| | | | | | Simplify read/write handlers (nw) Note that the VME handler installing routines can and should be redone later; this is merely enough for now.
* volt_reg: set default m_output (nw) hap2019-02-192-2/+0
|
* ay8910.cpp : Updates cam9002019-02-151-6/+6
| | | | | | | Use shorter / correct type values, Remove unnecessary arguments in handlers, Duplicates device/bus/coco/cococart.cpp : Allow various types of delegates for install handler 5clown.cpp : Remove unnecessary arguments in some handler kchamp.cpp : Remove unnecessary arguments in some handler
* misc MCFG and MACHINE_CONFIG macro removal (nw) Ivan Vangelista2019-02-131-1/+1
|
* screen.h: adddedconstructor for monochrom screens and removed ↵ Ivan Vangelista2019-02-112-10/+16
| | | | | | | MCFG_SCREEN_ADD_MONOCHROME and MCFG_SCREEN_COLOR (nw) misc MACHINE_CONFIG removal (nw) started work on voltage_regulator_device macros removal (nw)
* devices\bus: few less MCFG macros (nw) Ivan Vangelista2019-02-011-5/+6
|
* devices\bus: removed a few unused MCFG macros (nw) Ivan Vangelista2019-01-302-13/+11
|
* magedev\cassette: removed MCFG macros (nw) Ivan Vangelista2019-01-221-6/+7
|
* finder_base::DUMMY_TAG should be treated as magic (nw) Vas Crabb2019-01-131-1/+1
|
* ddi1: Clock source and explanation (nw) AJR2018-12-261-1/+1
|
* bus/cpc: Use DERIVED_CLOCK to obtain 4 MHz (nw) AJR2018-12-175-13/+13
|
* cpcexp: Modernization (nw) AJR2018-12-1418-126/+107
| | | | | | - Replace MCFG_ macros with devcb3 - Remove most instances of machine().device - Add bus clock
* upd765: Add (mostly standard) clocks to all devices in the family (nw) AJR2018-12-131-1/+1
| | | | These clocks are currently unused, and their sources and dividers are often unclear. In some cases they are clearly software-configurable, which has not been emulated at all.
* Include floppy.h explicitly in drivers and bus cards, rather than indirectly ↵ AJR2018-11-251-0/+1
| | | | through popular FDC headers (nw)
* ay8910: small batch of MCFG removal (nw) Ivan Vangelista2018-11-071-4/+4
|
* pit8253.h: removed MCFG macros (nw) Ivan Vangelista2018-10-301-7/+7
|
* bus/rs232.cpp: completed removal of MCFG macros (nw) Ivan Vangelista2018-10-231-5/+5
|
* pc_lpt, upd765: removed MCFG macros (nw) Ivan Vangelista2018-09-281-1/+1
|
* space, space, space, space, space, space, space, space, mem_mask (nw) smf-2018-09-232-4/+4
|
* less space (nw) smf-2018-09-141-2/+2
|
* z80ctc: removed MCFG macros (nw) Ivan Vangelista2018-09-031-4/+4
|
* z80daisy_generic, z80dart, z80dma: removed MCFG macros (nw) Ivan Vangelista2018-08-301-9/+9
| | | | z80_daisy: first part of MCFG macro removal (nw)
* z80pio.cpp: removed macros (nw) Ivan Vangelista2018-08-281-3/+4
|
* ds1315, ds1386, ds2404, ds75160a, ds75161a, eeprom, eepromser, eeprompar: ↵ mooglyguy2018-08-231-3/+4
| | | | Removed MCFG, nw
* -amigafdc, at29x, at45dbxx, at_keybc, ataintf, atmel_arm_aic, pci-ide: MCFG ↵ mooglyguy2018-08-151-5/+6
| | | | removal, nw
* remove lots of MCFG_ (nw) Vas Crabb2018-07-171-27/+28
|
* sp0256: Remove MCFG_ (nw) Nigel Barnes2018-07-101-14/+8
|