summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/smioc.h
Commit message (Collapse)AuthorAgeFilesLines
* Added ATTR_COLD to common lifecycle methods for many files in src/devices. ↵ holub2024-09-271-5/+5
| | | | (#12822)
* - Removed device_timer, device_timer_id, et al in favor of direct callback ↵ MooglyGuy2022-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove void *ptr parameter from emu_timer, timer_device and all related ↵ AJR2022-01-261-1/+1
| | | | callbacks
* devices/machine: simplified handlers for various devices (nw) Ivan Vangelista2020-03-241-8/+8
|
* misc cleanup (nw) Vas Crabb2018-10-281-1/+1
|
* scudsp, sega_scu, serflash, smartmed, smc91c9x, smioc, smpc : removed MCFG ↵ Ivan Vangelista2018-10-261-8/+2
| | | | macros (nw)
* r9751: Implement proper SMIOC emulation through new uart emulation (#4188) Brandon Munger2018-10-241-1/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [R9751] (Squashed) Early work on SMIOC emulation commit 9b587be762abfd576e92792c612cd205c570924d Author: Stephen Stair <sgstair@akkit.org> Date: Tue Apr 10 19:41:55 2018 -0700 Connected SMIOC DMA to 68k * SMIOC now reading bytes for serial from the 68k memory space successfully. commit 0f801a05a3fa5b78768a1a2bcb9981466e8f2b0e Author: Stephen Stair <sgstair@akkit.org> Date: Tue Mar 27 18:31:32 2018 -0700 68k now running in lockstep with SMIOC for serial * 68k now uses actual SMIOC as source of SMIOC status, so it waits for the SMIOC to complete commands before continuing. * SMIOC DMA controllers now being asked to move bytes around * "write character" (4100) commands to SMIOC are now completing and resulting in correct status being written and sent back to the 68k * Every now and then the SMIOC stalls for a bit, it seems to be due to spending some time trying to communicate with the 8051 CPU (used to communicate with another cpu on the serial breakout box) that is not currently present in the emulated device. Next Steps: * We're going to move the terminal from the r9751 into the SMIOC, and hook it up to the DMA controllers as a hacky temporary solution. * We need to emulate the 5xxxx memory range in SMIOC to proxy data to/from the 68k memory * Then we'll start work on emulating the octal uart properly and hooking it up to RS232 channels. commit ca91614fca3f43d87755d0c3439521276d7bfafb Author: Stephen Stair <sgstair@akkit.org> Date: Wed Mar 14 19:52:04 2018 -0700 Tinkering to get SMIOC further along 1) Enable 188 cpu to advance DMA immediatley if DRQ is held high when source synchronous DMA is started (It's not clear whether the DMA actually works this way yet) 2) Retrigger the DMA DRQ when a memory access is made to the DMA window (future work needed to proxy the reads/writes to the 68k's main memory) This is needed to support multibyte DMA reads/writes to the 68k window. 3) Reverse the bytes in the status register (based on current incomplete understanding of how this is encoded) 4) Connect the status register back to the r9751 on SMIOC status read Current state: SMIOC's main board DMA state machine now completes the DMA transfer from the main board (With incorrect data), but we are still getting stuck. Next steps: SMIOC is now hanging waiting on DMA to UART to complete, we need to implement some emulation of the UART and its connections to the surrounding 16 dma channels in order to make progress. commit 62c1455c97a53ed970622e08cb03a225625914fd Author: Stephen Stair <sgstair@akkit.org> Date: Sun Mar 4 20:13:32 2018 -0800 Progress on emulating SMIOC commit daee8498c5840417aee3ed9def0acfba5476335a Author: Stephen Stair <sgstair@akkit.org> Date: Sun Feb 25 20:02:32 2018 -0800 Working on bringing up SMIOC Trying to get emulated SMIOC in lockstep with the main 68k. commit 5a929fde90307040a0544682888f2f21a914b900 Author: Stephen Stair <sgstair@akkit.org> Date: Wed Feb 21 20:06:27 2018 -0800 re-enable SMIOC, Logging improvements, first steps towards emulating on-board hardware. commit f0c7a1665a18c99df5527ae45994f39f95223814 Author: Stephen Stair <sgstair@akkit.org> Date: Sun Feb 11 16:26:31 2018 -0800 Emulation fix - Terminal now responds to input commit ecff4035f3fdaa0329df46f99ccd516aa23ec8af Author: Stephen Stair <sgstair@akkit.org> Date: Tue Feb 6 19:00:35 2018 -0800 Hacky emulation of SMIOC now successfully receiving serial characters! commit 376bca90dff311d24e1f5014d8d6f0dc297bf671 Author: Stephen Stair <sgstair@akkit.org> Date: Sun Jan 28 18:31:38 2018 -0800 Experimenting with SMIOC emulation * Partial fixes for line state issues with persistent line values When the AM9517 DMA controller mode is updated to change the polarity of DACK/DREQ, it doesn't update the DACK line values / request values (respectively). This fixes this issue for one of the emulated devices in the file, but the other device has the same problem. * Add skeleton of SCC2698B UART device * Early progress on emulating SCC2698B Octal UART Core structure for IO lines and writing registers is in place. * Update address maps to new format. * SCC2698b: Add tx/rx, baud rate generation * Emulation improvements for scc2698b device * MPP output pins emulated * Improved logging for baud rate changes * Channel configuration emulated * Support for TX/RX Enable * Started integrating new features into SMIOC * Minor progress on the path to enabling new UART for SMIOC * Resolved code issues related to upstream changes * Working around an apparent problem with callbacks on sub-device devices * Terminal added for serial port attached to SCC2698B UART. * Things compile and seem to work. * SMIOC: Serial is now outputting correctly through emulated SMIOC Some glitches to work out, but this is nearly ready. * AM9517a should not forget about input line status on master reset. * Disable tracing * SMIOC: Improving diagnostics and making some progress on the emulation * Revised tracing in SMIOC and SCC2698B * Improved tracing approach in r9751 * Minor progress towards working SMIOC emulation. * [R9751] Update drivers to new code patterns after rebase Rebased on latest mame, Fixed a few issues and updated the callback code patterns based on recent changes in devcb * [R9751] Improve logging, fix interrupt race Serial no longer drops output characters * [R9751] Working on SMIOC emulation Improved SMIOC emulation accuracy, Made some progress in getting through the disktool initialization sequence, but we are still hitting a problem - It looks like disktool should be resetting the SMIOC board when it starts, but the mechanism for this has not been found. * [R9751] Improve tracing for system board registers * [R9751] Improve SMIOC emulation Still having some trouble with SMIOC but this seems to be an improvement. SMIOC is now waiting for a status to be read before applying a new status, and mandatory parameter read logic is in place. * [R9751] Incremental emulation improvements the SMIOC failure was understood and fixed, and a new approach to getting the hardware to bootstrap correctly was implemented - Still having some problems with it though. * [R9751] Fixed emulation issues * Disktool now boots to the console * UART receive only partly working, I don't think it's fully connected yet. * [R9751] Further progress on SMIOC emulation * Figured out the missing command parameter interface to the SMIOC board * Still blocked because the SMIOC interface to the breakout board through an onboard 8051 is not emulated and the disktool software depends on properties coming from it. * [R9751] Terminal is fully working for disktool * Improved the emulation of the 80188 to 451 connection in order to reliably set a status bit disktool depends on. * [R9751] Fix build after rebase * [R9751] Cleanup, tracing improvements * Remove second emulated terminal - SMIOC is now stable enough to run the terminal. * Remove older and unnecessary emulation/tracing code * r9751: Fix compile error and modify copyright holders
* Streamline machine configuration macros - everyone's a device edition. Vas Crabb2018-05-061-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* devices/machine: some private-ization (nw) Ivan Vangelista2018-02-151-1/+4
| | | | + removed some duplication
* API change: Memory maps are now methods of the owner class [O. Galibert] Olivier Galibert2018-02-121-0/+1
| | | | | Also, a lot more freedom happened, that's going to be more visible soon.
* r9751: smioc - add 8237 DMA controllers, rs232 ports, and update documentation Brandon Munger2017-07-171-0/+18
|
* r9751: Add initial SMIOC device (#2423) Brandon Munger2017-06-301-0/+47