summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ss50
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Vas Crabb2024-11-256-18/+18
| | | | | | | * toaplan/mjsister.cpp: Use memory share creator for VRAM, put banked ROM in its own region so the fixed ROM region can be sized correctly. * cpu/s2650: Use util::sext rather than goofy lookup table. * Fixed a lot more #include guards that didn't match header paths.
* emu/ioport.h: Made syntax for configuring callbacks more consistent. Vas Crabb2024-10-182-4/+4
| | | | | | | | | | | | 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-277-19/+19
| | | | (#12822)
* ss50_dc5: Clean up code using device finder array AJR2023-10-121-23/+11
|
* misc mcfg: remove pia6821 clock freq param, hap2023-09-203-3/+3
| | | | mm2: remove copypasted input ports
* emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Vas Crabb2023-06-171-3/+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-017-64/+64
| | | | function signatures. (#11283) [Ryan Holtz]
* formats/fdos_dsk.cpp: Added FDOS disk format for the SWTPC 6800. (#10273) Michael R. Furman2022-08-281-0/+2
| | | | Allows the SWTPC 6800 machine to boot FDOS in MAME using Mike Douglas' FDOSMPS.DSK, and to read/write other available disk images.
* formats/cp68_dsk.cpp: Added CP/68 disk format for SWTPC 6800. (#10178) Michael R. Furman2022-08-131-0/+2
|
* - Removed device_timer, device_timer_id, et al in favor of direct callback ↵ MooglyGuy2022-06-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | members. (#9788) Primarily, this removes device_t::device_timer, device_t::timer_set, device_t::synchronize, device_t::timer_expired, and device_timer_id. Use of device_timer often resulted in unnecessary trampolining in addition to switch/case overhead on a driver/device level, and additional logic to manage delegated vs. ID-based timers on a core level. In the worst cases, devices were performing a switch/case with only one valid case. device_scheduler::timer_set is marked deprecated as the only remaining direct uses are via the Lua engine and a few drivers that need refactoring anyway. The remaining uses occur via device_scheduler::synchronize. As a middle ground between the extremely short timer_alloc() and the extremely long machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(widget_device::contoso_tick), this)), a helper function in device_t has been added which can be invoked with the following syntax: timer_alloc(FUNC(widget_device::contoso_tick), this) - Additional changes/cleanups performed along the way: - Converted to use logmacro: * src/devices/bus/ieee488/hp9895.cpp * src/devices/bus/ieee488/remote488.cpp * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/isa/sc499.cpp * src/devices/bus/vip/vp550.cpp * src/devices/cpu/i86/i186.cpp * src/devices/cpu/lc8670/lc8670.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/corvushd.cpp * src/devices/machine/ds1994.cpp * src/devices/machine/ticket.cpp * src/mame/audio/pinsnd88.cpp * src/mame/drivers/notetaker.cpp * src/mame/machine/asic65.cpp * src/mame/machine/rmnimbus.cpp * src/mame/machine/victor9k_fdc.cpp * src/mame/video/uv201.cpp - Made usage of m_member prefix consistent: * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/machine/ds1386.cpp * src/devices/machine/i7220.cpp - Spacing consistency pass: * src/devices/bus/isa/hdc.cpp * src/devices/bus/isa/omti8621.cpp * src/devices/bus/thomson/nanoresau.cpp * src/devices/bus/ti99/internal/992board.cpp * src/devices/bus/ti99/internal/genkbd.cpp * src/devices/bus/ti99/internal/joyport/handset.cpp * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/cpu/i86/i186.cpp * src/devices/cpu/lc8670/lc8670.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/cop452.cpp * src/devices/machine/corvushd.cpp * src/devices/machine/hp_dc100_tape.cpp * src/devices/machine/hp_taco.cpp * src/devices/machine/meters.cpp * src/devices/machine/microtch.cpp * src/devices/machine/phi.cpp * src/devices/video/ef9365.cpp * src/devices/video/v9938.cpp * src/mame/drivers/alphaskop41xx.cpp * src/mame/drivers/myb3k.cpp * src/mame/drivers/notetaker.cpp * src/mame/drivers/wpc_an.cpp * src/mame/machine/midikbd.cpp * src/mame/machine/rmnimbus.cpp * src/mame/machine/wpc_lamp.cpp * src/mame/machine/wpc_out.cpp - Removed string-based ioport lookups: * src/devices/bus/ti99/internal/joyport/handset.cpp * src/devices/bus/ti99/internal/joyport/mecmouse.cpp * src/devices/bus/vme/vme_hcpu30.cpp * src/mame/machine/k7659kb.cpp * src/mame/machine/ti85.cpp - Adjustments to grammar/wording in comments * src/devices/bus/sms_ctrl/lphaser.cpp * src/devices/bus/sms_ctrl/sports.cpp * src/devices/bus/snes/event.cpp * src/devices/bus/snes/sa1.cpp * src/devices/bus/thomson/nanoresau.cpp * src/devices/bus/z88/z88.cpp * src/devices/machine/ds1386.cpp * src/devices/machine/vic_pl192.cpp - Favored BIT() macro for single-bit checks * src/devices/bus/ti99/internal/992board.cpp * src/devices/bus/ti99/joyport/handset.cpp * src/mame/drivers/notetaker.cpp * src/mame/machine/wpc_lamp.cpp * src/mame/machine/wpc_out.cpp - Removed C89-style variable declarations when noticed * src/devices/bus/isa/hdc.cpp * src/devices/bus/sms_ctrl/lphaser.cpp * src/devices/bus/ti99/joyport/mecmouse.cpp * src/devices/machine/acorn_vidc.cpp * src/devices/sound/ymz280b.cpp * src/devices/video/vic4567.cpp - Removed FUNCNAME to avoid compiler-specific #define checks in devices * src/devices/bus/vme/vme_fccpu20.cpp * src/devices/bus/vme/vme_hcpu30.cpp * src/devices/machine/68230pit.cpp * src/devices/machine/mc14411.cpp * src/mame/drivers/myb3k.cpp - Removed unecessary member prefixes/suffixes * src/devices/video/ef9340_1.cpp * src/mame/drivers/fuukifg2.cpp * src/mame/drivers/fuukifg3.cpp * src/mame/drivers/intv.cpp * src/mame/drivers/simpsons.cpp * src/mame/drivers/socrates.cpp * src/mame/drivers/special_gambl.cpp * src/mame/drivers/sprint4.cpp * src/mame/drivers/ti990_10.cpp * src/mame/drivers/tubep.cpp * src/mame/drivers/vectrex.cpp * src/mame/drivers/wpc_an.cpp * src/mame/drivers/wpc_dot.cpp * src/mame/drivers/wpc_flip1.cpp * src/mame/drivers/wpc_flip2.cpp * src/mame/machine/z80ne.cpp * src/mame/video/rollerg.cpp - Switched to lower-case hex constants * src/devices/video/ef9365.cpp * src/mame/machine/rmnimbus.cpp - Re-ordered driver overrides and function members * src/mame/drivers/boxer.cpp * src/mame/drivers/eurocom2.cpp * src/mame/drivers/exidy.cpp * src/mame/drivers/gpworld.cpp * src/mame/drivers/h19.cpp * src/mame/drivers/ibmpcjr.cpp * src/mame/drivers/mekd5.cpp * src/mame/drivers/mgolf.cpp * src/mame/drivers/myb3k.cpp * src/mame/drivers/nightmare.cpp * src/mame/drivers/notetaker.cpp * src/mame/drivers/ptcsol.cpp * src/mame/drivers/pwrview.cpp * src/mame/drivers/rabbit.cpp * src/mame/drivers/sitcom.cpp * src/mame/drivers/socrates.cpp * src/mame/drivers/sprint4.cpp * src/mame/drivers/techno.cpp * src/mame/drivers/thayers.cpp * src/mame/drivers/ti990_10.cpp * src/mame/drivers/ti990_4.cpp * src/mame/drivers/tv912.cpp * src/mame/drivers/tv990.cpp * src/mame/drivers/uchroma68.cpp * src/mame/drivers/vk100.cpp * src/mame/drivers/votrhv.cpp * src/mame/drivers/wicat.cpp * src/mame/drivers/wpc_an.cpp * src/mame/includes/abc80.h * src/mame/includes/asterix.h * src/mame/includes/fuukifg2.h * src/mame/includes/fuukifg3.h * src/mame/includes/gunbustr.h * src/mame/includes/intv.h * src/mame/includes/namcona1.h * src/mame/includes/newbrain.h * src/mame/includes/poly.h * src/mame/includes/prof80.h * src/mame/includes/rollerg.h * src/mame/includes/s11.h * src/mame/includes/segahang.h * src/mame/includes/simpsons.h * src/mame/includes/spacefb.h * src/mame/includes/tandy2k.h * src/mame/includes/trucocl.h * src/mame/includes/tubebp.h * src/mame/includes/vidbrain.h * src/mame/includes/wolfpack.h * src/mame/includes/wpc_dot.h - Made capitalization consistent on class members * src/devices/machine/meters.cpp * src/mame/drivers/namcona1.cpp * src/mame/drivers/notetaker.cpp -src/devices/bus/isa/hdc.cpp: * Removed fixed-size std::vector in favor of std::unique_ptr -src/devices/bus/isa/s3virge.cpp: * Moved unusually large (for a header) functions into .cpp from header -src/devices/bus/vip/vp550.cpp * Switched to required_device_array to simplify code paths -src/devices/machine/arm_iomd.cpp * Added initializers to constructor * Favored std::size over fixed static sizes -src/devices/machine/ds1386.cpp * Moved register #defines into header enums -src/devices/machine/mc68901.cpp * Removed unnecessary parameters and emu_timer::enable calls -src/devices/machine/mccs1850.cpp * Removed inline overuse -src/devices/machine/meters.cpp * Removed unused members -src/devices/machine/mos6526.cpp * Removed inline overuse -src/devices/machine/nsc810.cpp * Converted to arrays rather than individually-numbered members -src/devices/machine/pxa255.cpp * Simplified DMA transfer code -src/devices/machine/saa1043.cpp * Removed extraneous members in favor of resolve_all_safe -src/devices/machine/vic_pl192.cpp * Shifted constructors, start-up, and maps to be at the top of the source file -src/devices/machine/z8536.cpp * Removed stray uses of device_timer_id -src/devices/sound/cdp1869.cpp * Removed inline overuse -src/devices/sound/mos7360.cpp * Converted to arrays rather than individually-numbered members -src/emu/device.cpp * Removed ID-based timer_alloc * Removed timer_set * Removed synchronize * Removed timer_expired * Added shorthand timer_alloc to avoid lengthy machine().scheduler().timer_alloc() calls -src/emu/schedule.cpp * Removed now-unused m_id and m_device members -src/mame/audio/alesis.cpp * Added initializers to constructor -src/mame/drivers/alto2.cpp * Removed custom-named driver init in favor of driver_init override * Removed octal constant in favor of more standard hex -src/mame/drivers/astinvad.cpp * Fixed 'kamizake' typo -src/mame/drivers/tm990189.cpp * Removed unnecessary machine reset override -src/mame/drivers/unichamp.cpp * Removed custom-named driver init in favor of driver_init override -src/mame/drivers/votrhv.cpp * Fixed ROM_LOAD macros and region() usage in memory maps -src/mame/machine/victor9k_fdc.cpp * Made bracing style consistent across the file -src/mame/video/gime.cpp * Removed unnecessary void specifiers in function prototypes
* removed some unnecessary 6821 ↵ smf-2022-05-181-7/+1
| | | | readca1_handler/readca2_handler/readcb1_handler hookups [smf]
* Revert initialisation of device members in headers. Vas Crabb2022-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-2/+2
|
* floppies: Turn the format arrays into function calls. Create a default ↵ Olivier Galibert2021-03-021-7/+8
| | | | "mfm", "fm" and "pc" list of formats. Their contents, and which driver uses what, may need some tuning.
* rs232: HLE updates AJR2021-01-263-4/+0
| | | | | | | - Remove option to change the number of start bits (1 was always the default, and the RS232 protocol requires one start bit) - Add many historically significant baud rates ranging from 50 to 7200 * ccs2810.cpp, sb8085.cpp: Update notes
* last batch of changes to make the ↵ Ivan Vangelista2020-05-212-12/+12
| | | | https://github.com/mamedev/mame/tree/devcb-no-space branch build. (nw)
* SS50 DC5 FDC: OS9 support, misc corrections. 68bit2020-02-081-31/+77
| | | | | | | | Add the OS9, MFI and UniFlex floppy formats. Update the debug config options to suit OS9. Single density track zero on OS9 is typically only on the first side, unlike FLEX which used single density track zero on both sides. Clarify some of the FLEX specific debug options. Fix some bugs in the logic related to these options.
* swtpc dc5: support a forced FDC 'ready' line. 68bit2020-01-181-5/+29
| | | | | | | | Adds support for the DC5 configuration option of forcing the 'ready' line input. This is need for Flex2 on the 6800. With this option added the swtpc ROM patch to wait for drive to be ready is not needed.
* ss50 bus: port change handlers, save state, cleanups. 68bit2019-11-095-82/+131
| | | | | | | | | | Add some port change handlers. Note state to be saved. Canonicalize port names to uppercase. Order baud rate options from lowest to highest.
* New working machines Vas Crabb2019-11-022-5/+0
| | | | | | | | | | | | -------------------- RS-232 DCE-DCE Bridge (nw) This is a simple machine for wiring together two things that want to plug into an RS-232 port. This means that for DCE-like things (e.g. serial printers) there's no need to create an extra machine to allow them to talk to the outside world with the null_modem device. (Also added some asserts, removed a FIXME, and put the swtpc8212 terminal in the default RS-232 devices.)
* Spring cleaning: Vas Crabb2019-11-012-18/+24
| | | | | | | | | | | | * 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
* swtpc8212: get it running, and on the rs232 bus (#5729) 68bit2019-10-302-14/+36
| | | | | | | | | This patch gets it running, and splits it into two front ends, one being a rs232 bus slot so that is can be used as a terminal option. It adds the MCM66750 character generator, and implements the MC6845 row update function. Most of the I/O has been worked out with help from the CT-82 user manual. The various screen formats and the graphics modes appear to be working and plausible. Printer support has been added, and a beeper.
* SWTPC MP-S2: connect up the RS232 control lines 68bit2019-10-161-2/+6
| | | | | | At least some of these are required for operation with terminals. For example the SWTPC 8212 terminal uses DTR to CTS for hardware flow control, and that is needed even at 9600 baud.
* ss50/dc5.cpp: Correct XTAL value and calculate division (nw) AJR2019-10-081-13/+13
|
* Merge pull request #5546 from 68bit/ss50-quieten-error-logging ajrhacker2019-08-251-1/+2
|\ | | | | SS50 bus: quieten error logging when side effects are disabled.
| * SS50 bus: quieten error logging when side effects are disabled. 68bit2019-08-261-1/+2
| |
* | SS-30 MPS2: correct the 'high' baud rates. 68bit2019-08-261-16/+17
|/ | | | The 'high' rates are four times the standard rates.
* srcclean (nw) Vas Crabb2019-08-251-7/+7
| | | | I'm assuming atronic.cpp was supposed to be Windows-1252 with Euro currency symbol encoding. Everyone please use UTF-8 for source files.
* SS-30 MPS2 note the 'high' baud rates for the DIP settings. 68bit2019-08-211-20/+20
| | | | To make it easier setting these DIPs when in the 'high' baud rate mode.
* SS-30 DC5: drive select inhibit; dynamic clock rates; motor timer updates. ↵ R. Belmont2019-08-201-100/+310
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#5511) Bit 7 of the control register inhibits all drive select lines when high and this is now implemented. This was a long standing feature in this line of floppy disk controller boards. The drives are also inhibited when the motor timer has timed out. It is not just their motors that are off. Add a conf option to interpret bit 7 of the control register as an 'erroneous' side select, and log such usage. Some drivers use bit 7 for side selection and this option help work around them and adapt them. Add support to set the clock rate using the DC5 extended control register, and update the associated code. The clock rate config option is now only an 'expected' rate and may be null. Clarify that the motor timer is only triggered by access to the FDC registers and not by access to the control registers. There appears to be a common error in drivers, they access the control register and then wait a period, and it appears they wait for the motor to spin up, but that can not happen. The problem appears to be documented, flaky disk booting, having to reset and try again and again. It seems best to deal with that in boot and driver software rather than an emulator hack. The motors are on, or off, irrespective of drive selection. Rewrite the updating of the floppy and FDC state based on the control register and the motor timer out, so that the latched control register state is respected when the motor timer output changes - it had been just turning the motors on or off but the drive selection also needs to be updated. Reset the DDEN input, setting it for single density, upon device reset. Default DC5 to 16 byte address mode to suit the SWTPC 6809 - the SWTPC 6800 overrides this default for it's 4 byte address mode. Indentation fixes.
| * SS-30 DC5: drive select inhibit; dynamic clock rates; motor timer updates. 68bit2019-08-201-100/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bit 7 of the control register inhibits all drive select lines when high and this is now implemented. This was a long standing feature in this line of floppy disk controller boards. The drives are also inhibited when the motor timer has timed out. It is not just their motors that are off. Add a conf option to interpret bit 7 of the control register as an 'erroneous' side select, and log such usage. Some drivers use bit 7 for side selection and this option help work around them and adapt them. Add support to set the clock rate using the DC5 extended control register, and update the associated code. The clock rate config option is now only an 'expected' rate and may be null. Clarify that the motor timer is only triggered by access to the FDC registers and not by access to the control registers. There appears to be a common error in drivers, they access the control register and then wait a period, and it appears they wait for the motor to spin up, but that can not happen. The problem appears to be documented, flaky disk booting, having to reset and try again and again. It seems best to deal with that in boot and driver software rather than an emulator hack. The motors are on, or off, irrespective of drive selection. Rewrite the updating of the floppy and FDC state based on the control register and the motor timer out, so that the latched control register state is respected when the motor timer output changes - it had been just turning the motors on or off but the drive selection also needs to be updated. Reset the DDEN input, setting it for single density, upon device reset. Default DC5 to 16 byte address mode to suit the SWTPC 6809 - the SWTPC 6800 overrides this default for it's 4 byte address mode. Indentation fixes.
* | SWTPC - add floppy disk support (#5513) 68bit2019-08-201-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ss-30 mps: default to 9600 baud * SWTPC - add floppy disk support Include the DC5 floppy disk controller on the expected SS-30 I/O positions of ports 5 and 6. Add a config option to select the CPU clock rate. Higher FDC clock rates need higher CPU rates to download the data fast enough without DMA. A couple of SWTBUG ROM patch config options are added to make disk booting more practical. Narrow the address range block used for the motherboard I/O to 0x8000 to 0x8fff, and also narrow the mirroring to potentially support two mother boards with twice as many I/O cards. Add documentation to explain these changes. Make 32K the default lower RAM size. Implement RAM from 0xa000 to 0xdfff, as FLEX needs much of that. Document the path to supporting Low and High PROMS. Emit a 9600 baud rate clock on the 150/9600 line. This was a practical rate at the time and screen based software is not practical at the prior rate of 1200 baud. This was a document option. The emulator now runs FLEX 2 on a range of disk formats. Disk driver software support is still an issue, another monitor PROM might be needed, there might be an issue with the FDC 'ready' input, but this is a big step forward.
* SS-30 DC5 floppy disk interface 68bit2019-08-163-0/+538
| | | | | | | | | Split out the floppy disk controller from the swtpc09 machine, adding it to the ss50 interface. The DC5 is compatible with both the SWTPC 6800 and 6809 systems, supporting the 4 and 16 byte I/O interfaces respectively, via a jumper setting, so can be used on the MAME swtpc and swtpc09 machines. The DC5, like the DC4, supports double sided and density disks, and claimed backward compatibility with the DC1, DC2 and DC3.
* SS-30 PIA IDE hard disk interface 68bit2019-08-163-0/+196
| | | | | | Split out the PIA IDE hard disk interface from the swtpc09 machine. This support appears to have been incomplete or to have bit rotten, and has been updated and tested lightly with FLEX9.
* Fix clang build [-Werror,-Wheader-guard] (nw) AJR2019-08-141-1/+1
|
* SS-30 MP-S2: Dual Serial Interface 68bit2019-08-143-0/+274
| | | | For the SWTPC09.
* SS-30: add support for the MP-T timer / counter card. 68bit2019-08-133-32/+246
| | | | E.g. this can be used SWTPC FLEX for a timer tick.
* ss50/mpc, adm31: PIA-related updates (nw) AJR2019-06-191-1/+1
|
* Pia6821 improvements (#5254) Mike2019-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 6821pia: fix method names in comments * zwackery: Remove PIA port A z_mask setting. This would only be relevant if the PIA was read while in output mode. These are inputs, and only read in input mode, so z_mask is not relevant. * thomson: move pia pullup resistors from z_mask to read handler. * 6821pia: remove unused set_port_a_z_mask calls. * dgn_beta: move pia pullup resistors from z_mask to read handler. * mpu3: Don't invert the VFD power on reset line. It doesn't go through an inverter. I believe this was done to work around a bug in the PIA port A implementation. * pia6821: remove m_port_a_z_mask variable. * 6821pia: For port A reads, only use the DDR for reading pins unless. Provide an override option when a device depends on slightly undefined behavior of an external device driving the pins and changing the value read. One board seems to need this (coinmstr). I don't have the schematics, but it seems it uses this to check its meter operation.
* (nw) Clean up the mess on master Vas Crabb2019-03-264-43/+39
| | | | | | | | | | | | | 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-254-39/+43
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* 6821pia, 6840ptm, 6850acia, bus/ss50, cmi01a: Simplify read/write handlers (nw) AJR2019-02-184-21/+21
| | | | 6850acia: Allow disabling side effects for reads (nw)
* devices\bus: some MCFG macros removal (nw) Ivan Vangelista2019-01-311-16/+13
|
* src/devices: a bit more MCFG macro removal (nw) Ivan Vangelista2019-01-181-6/+5
|
* bus/rs232.cpp: completed removal of MCFG macros (nw) Ivan Vangelista2018-10-232-8/+9
|
* -68230pit, 68307, 68340, 6840ptm, 6850acia, 68561mpcc: Removed MCFG macros ↵ mooglyguy2018-08-111-4/+4
| | | | | | and old devcb. [Ryan Holtz] Let's see what I messed up this time, AJR. :) nw
* ripple_counter: Finish devcb3 conversion (nw) AJR2018-08-011-2/+2
|
* devcb3 Vas Crabb2018-07-072-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple issues with the current device callbacks: * They always dispatch through a pointer-to-member * Chained callbacks are a linked list so the branch unit can't predict the early * There's a runtime decision made on the left/right shift direction * There are runtime NULL checks on various objects * Binding a lambda isn't practical * Arbitrary transformations are not supported * When chaining callbacks it isn't clear what the MCFG_DEVCB_ modifiers apply to * It isn't possible to just append to a callback in derived configuration * The macros need a magic, hidden local called devcb * Moving code that uses the magic locals around is error-prone * Writing the MCFG_ macros to make a device usable is a pain * You can't discover applicable MCFG_ macros with intellisense * Macros are not scoped * Using an inappropriate macro isn't detected at compile time * Lots of other things This changeset overcomes the biggest obstacle to remving MCFG_ macros altogether. Essentially, to allow a devcb to be configured, call .bind() and expose the result (a bind target for the callback). Bind target methods starting with "set" repace the current callbacks; methods starting with "append" append to them. You can't reconfigure a callback after resolving it. There's no need to use a macro matching the handler signatures - use FUNC for everything. Current device is implied if no tag/finder is supplied (no need for explicit this). Lambdas are supported, and the memory space and offset are optional. These kinds of things work: * .read_cb().set([this] () { return something; }); * .read_cb().set([this] (offs_t offset) { return ~offset; }); * .write_cb().set([this] (offs_t offset, u8 data) { m_array[offset] = data; }); * .write_cb().set([this] (int state) { some_var = state; }); Arbitrary transforms are allowed, and they can modify offset/mask for example: * .read_cb().set(FUNC(my_state::handler)).transform([] (u8 data) { return bitswap<4>(data, 1, 3, 0, 2); }); * .read_cb().set(m_dev, FUNC(some_device::member)).transform([] (offs_t &offset, u8 data) { offset ^= 3; return data; }); It's possible to stack arbitrary transforms, at the cost of compile time (the whole transform stack gets inlined at compile time). Shifts count as an arbitrary transform, but mask/exor does not. Order of mask/shift/exor now matters. Modifications are applied in the specified order. These are NOT EQUIVALENT: * .read_cb().set(FUNC(my_state::handler)).mask(0x06).lshift(2); * .read_cb().set(FUNC(my_state::handler)).lshift(2).mask(0x06); The bit helper no longer reverses its behaviour for read callbacks, and I/O ports are no longer aware of the field mask. Binding a read callback to no-op is not supported - specify a constant. The GND and VCC aliases have been removed intentionally - they're TTL-centric, and were already being abused. Other quirks have been preserved, including write logger only logging when the data is non-zero (quite unhelpful in many of the cases where it's used). Legacy syntax is still supported for simple cases, but will be phased out. New devices should not have MCFG_ macros. I don't think I've missed any fundamental issues, but if I've broken something, let me know.
* Avoid multiple explicit instantiations definition of templates Stefan Brüns2018-06-293-4/+3
| | | | | | | | | | According to the C++ standard 14.7 clause 5, "an explicit instantiation definition shall appear at most once in a program". Move the instantiation from the individual implementation files to the interface implementation file. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
* Streamline machine configuration macros - everyone's a device edition. Vas Crabb2018-05-062-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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