summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/6522via.cpp
Commit message (Collapse)AuthorAgeFilesLines
* apple/macpwrbkmsc.cpp: Improved operation for all supported PowerBook Duos. ↵ arbee2025-07-031-4/+4
| | | | | | | | | | | | [R. Belmont] * Pressing any key now wakes up from sleep, not just the modifier keys * Pressing the power key (F12 by default) after Shut Down will turn the machine back on apple/msc.cpp: MSC's VIA1 is customized: CB1 IRQs are a separate input not tied to CB1. [R. Belmont] * This greatly improves the smoothness of 68K/68HC05 communications. cpu/m6805/m68hc05pge.cpp: Implemented hardware keyboard matrix scanner, used during sleep and power off states by the PowerBook Duos. [R. Belmont]
* act/victor9k.cpp: Get audio working on Victor 9000 (victor9k) (#13549) donohoe002025-04-111-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 6522via: Don't generate a signal on PB7 when the timer 1 latch is programmed with 0. On the Victor 9000, the clock for the audio codec is generated by a via6522. PB7 is connected to the codec's clock input. Non-speech sounds (e.g. beeps, musical notes) are produced by outputting a cyclical waveform from the codec, with the pitch determined by the frequency of the codec clock. Software running on the Victor 9000 has been observed to attempt to silence the audio by writing 0 to the T1 timer latch (not by turning off continuous mode or PB7 output). With the emulated via6522, this resulted in a high-frequency clock signal being output on PB7, causing a high-pitched squeal whenever notes are not being played. From this observed behavior we could infer that the original 6522 HW does not output a signal on PB7 when the latch value is 0, and that the Victor 9000 software was relying on this behaviour to silence the audio output (one would have to assume that the real hardware didn't produce a squeal). * mc6852: fix various transmit-related issues which were preventing victor9k Audio output from working. The expected behavior of mc6852 is to write the data received in the FIFO register serially via tx_data_callback(). However, this was not implemented, and the only way data in the transmit FIFO could be removed and transmitted was by calling get_tx_byte(), and to then serially transmit the data by some external mechanism. Only m68sfdc.cpp calls get_tx_byte(), so it's hard to see how any other device using the mc6852 would have been able to transmit data. Software running on victor9k attempting to play audio would hang, since it would block waiting for the TX FIFO to empty. With these changes, Victor 9000 audio playback works as expected, with the data getting sent serially to the Audio codec. In order to avoid breaking m68sfdc, a new API call is added to allow data to be sent the "old" way. m68sfdc now calls set_tx_pull_mode(true), to get the previous behavior. As I understand it, other devices using mc6852 must be broken, and would need to be revisited. * victor9k: complete Audio support, adding a low-pass filter after the HC-55516 codec. Mark victor9k Audio as working.
* m6809,6522via,6840ptm: zerofill more variables at device start, hap2023-07-231-19/+48
| | | | 6840ptm: clear output ports at reset
* emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Vas Crabb2023-06-171-32/+23
| | | | | | | | | | | | 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-011-4/+4
| | | | function signatures. (#11283) [Ryan Holtz]
* Cleaned up logging across the codebase (GitHub #10183). (#11250) [Ryan Holtz] MooglyGuy2023-05-231-4/+4
| | | | | * Converted various logging patterns to use logmacro.h consistently. * Removed redefinitions of LOG_GENERAL. * Use LOGMASKED in more places.
* machine/6522via.cpp: Made input ports read transparently when corresponding ↵ Massimiliano Zattera2023-03-061-20/+9
| | | | interrupt flag is clear. (#10878)
* Fixed VIA_IFR write (#10875) Massimiliano Zattera2023-02-061-5/+1
| | | | | | | | | | | | | | | These 3 datasheets: http://archive.6502.org/datasheets/mos_6522_preliminary_nov_1977.pdf http://archive.6502.org/datasheets/synertek_sy6522_via_1978_jan.pdf http://archive.6502.org/datasheets/rockwell_r6522_via.pdf state that: The IFR bit 7 is not a flag. Therefore, this bit is not directly cleared by writing a logic 1 into it. It can only be cleared by clearing all the flags in the register or by disabling all the active interrupts as discussed in the next section. but this is what current code does. If more updated datasheets are available, please share the links.
* 6522via.cpp: Implement Shift Register Mode 0. Nigel Barnes2022-06-221-5/+5
|
* - Removed device_timer, device_timer_id, et al in favor of direct callback ↵ MooglyGuy2022-06-041-73/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Updated Commodore LCD colors, based on recent pictures from one of the ↵ smf-2022-05-191-9/+5
| | | | | | prototypes. [smf] Fixed Commodore LCD real time clock reading, it relies on the RTC chip being able to ground PORT A while it is set to an output. Which is documented in the 6522 datasheet as being possible. It's NMOS, so it has weak pull ups and doesn't drive it's output hard. However due to a bug in the prototype ROM code, it currently has the date and month swapped round. [smf]
* Remove void *ptr parameter from emu_timer, timer_device and all related ↵ AJR2022-01-261-1/+1
| | | | callbacks
* via6522: Remove the retrigger stuff, vectrex shows the via is *that* dumb Olivier Galibert2021-03-221-20/+8
| | | | | via6522: Fix the timing again mac128: Adjust the via timing too, since the via wants to run at start of access
* mac128: Fix the keyboard [O. Galibert, AJR] Olivier Galibert2021-03-211-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | via6522: Don't retrigger the shift register timer on a second sr access This is a slightly hacky change. The 68k starts the shift register in internal clock mode just long enough that cb2 is set to zero, then stops it and restarts it in external clocking mode. The retrigger-corrected via code wants to change cb2 40 cycles in the future (8 edges of the 10 clocks/cycle E clock). The instruction that stops the shift register starts ~38 cycles in the future but does the actual write 50 cycles in. But the instructions not being interruptible, the write happens before the timer timeout is called. There are two problems there: the lack of interruptibility for the 68k, which is a hard problem that is worked on but is still going to take some time, and the fact that the via is supposed to change cb2 (data) at +35 (well, +34, but lets not get in the intricacies of the E clock) and cb1 (clock) at +40. But changing the serial output behaviour of the via is a very ugly "here be dragons" case. Which will have ot be done, but still. The quick hack is the make the via change data and clock at +35. Fast enough that the 68000 didn't start the instruction yet, not different enough that other systems would break. 100% proper fix will be later.
* swim1: Embed the iwm Olivier Galibert2021-01-221-0/+15
|
* 6522via.cpp: Distinguish some different VIA types AJR2021-01-211-4/+47
|
* 6522via: port B special modes are only on write, not read [Rob Justice] arbee2020-09-171-11/+0
|
* 6522via.cpp: Add support for CB2 pulse mode [R. Belmont, Peter Ferrie] arbee2020-08-231-1/+19
|
* Revert "adb logging" hap2020-06-111-22/+0
| | | | This reverts commit 757c179183c6b4f80375c58900716a1df2b5ac34.
* adb logging Olivier Galibert2020-06-111-0/+22
|
* 6522via: Don't lose sync on edge count when the serial clock is external [O. ↵ Olivier Galibert2020-05-081-9/+13
| | | | | | Galibert] mac: Don't go out-of-bounds on palette writes [O. Galibert]
* attotime: Add to_string() to get a human-readable version of the time [O. ↵ Olivier Galibert2020-05-061-13/+20
| | | | | | | | Galibert] 6522via: Correct vocabulary, raise cb2 on shift in to make open-collector work correctly [O. Galibert] mackbd: Fix/partially rewrite [O. Galibert] mac128: Make emulated keyboard work [O. Galibert]
* (nw) via6522: removed unneeded space and offset Robbbert2019-04-201-2/+2
|
* via6522: Fix timing for shifting under control of system clock Mathis Rosenhauer2018-12-291-1/+1
|
* 6522via.cpp: Count negative PB6 pulses in T2 counter mode AJR2018-12-271-53/+101
| | | | (nw) VIA interrupt remains disconnected in tv950 due to CRTC-related problems. This is fairly likely to cause regressions in other drivers which may need explicit writes to PB6.
* Previous commit examples of use (nw) Olivier Galibert2018-08-021-2/+2
|
* devcb3 Vas Crabb2018-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* as if millions of this pointers suddenly cried out in terror, and were ↵ Vas Crabb2018-06-081-1/+1
| | | | | | | suddenly silenced * streamline templates in addrmap.h * get rid of overloads on read/write member names - this will become even more important in the near future
* maps: Finish map.m() (nw) Olivier Galibert2018-04-191-3/+4
|
* Grammar police (nw) Olivier Galibert2018-02-241-1/+1
|
* API change: Memory maps are now methods of the owner class [O. Galibert] Olivier Galibert2018-02-121-1/+1
| | | | | Also, a lot more freedom happened, that's going to be more visible soon.
* Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame"" Firehawke2017-12-131-9/+0
| | | | This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
* Revert "Merge branch 'master' of https://github.com/mamedev/mame" Firehawke2017-12-131-0/+9
| | | | | This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
* via6522: Eliminate truly ancient hack to default clock to that of first CPU (nw) AJR2017-12-071-9/+0
| | | | All VIAs in MAME now have properly configured clocks.
* via6522: Added some interrupt LOGs Joakim Larsson Edstrom2017-10-181-0/+17
|
* srcclean (nw) Vas Crabb2017-05-281-72/+72
|
* Typo fix (nw) AJR2017-05-251-1/+1
|
* Move static data out of devices into the device types. This is a ↵ Vas Crabb2017-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* via6522: fixed the flank timer value which improved but not completelly ↵ Joakim Larsson Edstrom2017-05-041-7/+7
| | | | reverted the vectrex regression
* via6522: tuned shifter IRQ timing to be more cycle accurate Joakim Larsson Edstrom2017-04-281-8/+20
|
* via6522: Removed old code and cleaned up a bit Joakim Larsson Edstrom2017-04-281-111/+26
|
* via6522: refactored shifter supporting more fetures and fixed a few bugs Joakim Larsson Edstrom2017-04-271-59/+110
|
* Since we're close to release, revert for now (nw) arbee2017-04-201-2/+2
|
* Turn off global logging (nw) Scott Stone2017-04-201-2/+2
|
* Revert most of previous fix, instead change VIA6522 to work better. (nw) arbee2017-04-191-4/+4
|
* debugger_access: Refactor [O. Galibert] Olivier Galibert2017-03-021-1/+1
|
* 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.
* srcclean (nw) Vas Crabb2017-02-191-6/+6
|
* Added missing final and leading flanks when shifting out and in respectivelly Joakim Larsson Edstrom2017-02-171-21/+87
|
* via6522: fixed so shift out and in flank is not controlled by pcr in ↵ Joakim Larsson Edstrom2017-02-011-2/+14
| | | | accordance with datasheet