summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/wd_fdc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* wd_fdc.cpp: Add optional logging for data reads and writes AJR2023-08-311-4/+6
|
* wd_fdc.cpp: DRQ fixes AJR2023-08-251-10/+1
| | | | | - Drop DRQ immediately when a new command is written, without even waiting for it to be committed (fixes observed regression in ms0515) - Eliminate logic for raising IRQ if DRQ is serviced while FDC is idle
* wd_fdc.cpp: simplify/optimize how bus inverting is handled (#11375) Mark Garlanger2023-07-021-47/+31
|
* emu/devcb.h: Eliminated the need to call resolve() on callbacks. (#11333) Vas Crabb2023-06-171-44/+20
| | | | | | | | | | | | 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.
* Clean up several sprintf() deprecation warningss in non-3rdparty code. [R. ↵ arbee2023-06-031-4/+4
| | | | Belmont]
* emu/device.h: Removed device (READ|WRITE)_LINE_MEMBER in favor of explicit ↵ MooglyGuy2023-06-011-7/+7
| | | | function signatures. (#11283) [Ryan Holtz]
* Cleaned up logging across the codebase (GitHub #10183). (#11250) [Ryan Holtz] MooglyGuy2023-05-231-1/+0
| | | | | * Converted various logging patterns to use logmacro.h consistently. * Removed redefinitions of LOG_GENERAL. * Use LOGMASKED in more places.
* srcclean in preparation for release Vas Crabb2023-04-231-1/+1
|
* wd_fdc: IRQ/DRQ corrections AJR2023-04-161-9/+2
| | | | | | | - Always interrupt upon command completion and clear busy flag if the latter was set (even if DRQ was not serviced) - Drop DRQ when "Force Interrupt" command is issued in idle state This partially reverts the changes of 60ced2cb0c9c4ae9a2f6a65ff50b07fecee78f4c.
* wd_fdc: Drop DRQ when ending a normal command or starting a "Force ↵ AJR2023-04-161-1/+9
| | | | Interrupt" command
* machine/wd_fdc.cpp: Don’t clear DRQ on LDB/INTR, and fix spurious READ ↵ tim lindner2023-03-311-60/+47
| | | | | TRACk/ADDR FM mark syncs. (#11041) [Peter Phillips, Tim Lindner] Fixes SuperUtility 3 (MT08511) and Marble Maze on TRS-80 Color Computer.
* wd_fdc: adjust wp detection delay to better match real hardware (#10547) tim lindner2022-11-141-2/+2
|
* Add FDC Write Protect Delay (#10538) tim lindner2022-11-121-4/+32
|
* Revert "wd_fdc: Use the new active()" hap2022-11-011-1/+1
| | | | This reverts commit acd8d3c144c8ec287d5d9a13fa61d079b4cfa618.
* wd_fdc: Use the new active() Olivier Galibert2022-10-291-1/+1
|
* Fix FDC Busy bit for overlapped commands (#10464) pnp20842022-10-241-1/+3
| | | | | | Fixes MT8464 The problem here is that the end of the previous command clears the BSY status bit which makes it appear to system code that the second command has completed (when it has not). The bug report has files to demonstrate the problem on a TRS-80 Model I emulation.
* wd_fdc: reset the contents of data_reg when the sync is changed pnp20842022-10-221-11/+18
|
* fd1771: Add missing inversion Olivier Galibert2022-10-171-2/+2
|
* fd1771: Add extended DDAM handling Olivier Galibert2022-10-161-2/+13
|
* - Removed device_timer, device_timer_id, et al in favor of direct callback ↵ MooglyGuy2022-06-041-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Minor cleanup: Vas Crabb2021-11-221-26/+13
| | | | | * machine/wd_fdc.cpp: Code style consistency fixes. * language/Greek: Removed obsolete messages.
* srcclean in preparation for release of MAME 0.238. Vas Crabb2021-11-211-18/+18
| | | | | | | Patched up positron.cpp input ports - you shouldn’t use PORT_NAME when the key cap label is just the characters it produces anyway, and you’re supposed to use the actual character a key produces for PORT_CHAR or "natural" keyboard mode/paste will be unnatural.
* wd_fdc: Wait for sector read/write to complete on interrupt d0-7, fixes ↵ prime68092021-11-081-2/+108
| | | | rmnimbus floppy access errors
* -goldnpkr.cpp: Base screen parameters on how games program the CRTC. Vas Crabb2021-09-131-1/+2
| | | | | | | | | * Filled in proper screen parameters for goldnpkr, witchcrd and megadpkr. There may be other games that use different parameters. * Demoted megadpkr and megadpkrb to not working as they can only boot once before writing timekeeper data that prevents booting again. -Tidied up a few drivers a little.
* wd_fdc.cpp revert prev and add INTRQ logic notes MetalliC2021-05-171-1/+9
|
* wd_fdc: commands don't clear forced interrupt Patrick Mackinlay2021-05-171-1/+1
|
* thomson: Turn the extensions into slot devices, modernize the floppies Olivier Galibert2021-04-191-1/+1
|
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-1/+1
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* wd_fdc.cpp: Corrected register commit delay for WD177x according to datasheet. Nigel Barnes2020-08-301-3/+3
|
* vice versa (nw) MetalliC2020-07-011-1/+1
|
* wd_fdc.cpp do not RESTORE at reset WD1770/72 MetalliC2020-07-011-5/+7
|
* wd_fdc.cpp fix spinup on interrupt command MetalliC2020-07-011-0/+2
| | | | samcoupe.cpp enable floppy sounds
* wd_fdc.cpp: accept new commands while in busy state, workaround for spurious ↵ MetalliC2020-06-151-9/+30
| | | | recursive calls if HLD used for drive motor control, don't change track and data registers during reset
* wd_fdc.cpp set BUSY during initial restore to make it correctly interruptable MetalliC2020-06-111-1/+2
|
* wd_fdc.cpp honor write protection (nw) MetalliC2020-06-021-0/+12
|
* wd_fdc.cpp do not delay SEEK with no Verify flag MetalliC2020-06-011-4/+9
|
* wd_fdc.cpp: a bit improve HLD/HLT handling, fix FD1771 timings and enable ↵ MetalliC2020-05-311-20/+27
| | | | spinup_on_interrupt
* wd_fdc: Use attotime::to_string instead of custom time-to-string method; ↵ AJR2020-05-211-38/+25
| | | | another command logging message fixed (nw)
* wd_fdc: Fix logerror messages; turn logging back off (nw) AJR2020-05-201-7/+7
|
* wd_fdc: Improve HLD behavior, always activating output at start of type II & ↵ AJR2020-05-191-28/+46
| | | | III commands
* wd_fdc.cpp: Save INTRQ and DRQ states (nw) AJR2020-04-021-0/+2
|
* wd_fdc: Changed spindown delay to 9 revs according to specs, added MON ↵ Michael Zapf2020-03-211-1/+5
| | | | clearing directly in master reset.
* wd_fdc: Add a MON callback so that drives, which are unselected early, do ↵ Michael Zapf2020-03-201-1/+9
| | | | not spin forever.
* wd_fdc: Increase HLD idle timeout to 15 revolutions except for FD1771 and FD1781 AJR2020-02-201-1/+24
|
* wd_fdc: Condition command completion interrupt on busy flag having been set AJR2020-02-191-2/+2
| | | | (nw) The logic for dropping the busy flag and raising INTRQ still seems a bit questionable, but at least the Pied Piper does not like spurious interrupts to occur from these conditions when 0xd0 is in the command register (and the busy flag that indicates that a command is in progress is therefore not set).
* srcclean and indentation cleanup (nw) Vas Crabb2019-11-241-1/+1
|
* new working ZX Spectrum slot devices: DISCiPLE and +D disk interfaces (#5931) Tom2019-11-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * plusd working (rom patch) * plusd done * added disciple, not working * disciple working * wd_fdc fix * final tidy-up * ready for pr * Pernod70 changes * cuavas changes #1 * combine devices + files * sort out side_effects
* wd_fdc: change Interrupt command logic based on WD1772 and VG93(1793 clone) ↵ MetalliC2019-09-261-39/+8
| | | | | | | | | decaps. INTRQ logic in general is - Reset conditions: status register read, command register write. Setting conditions: command-specific (completion etc), command 0xDX is in command register and one of I0-3 conditions met. Various WD FDC doc's statements 'command D0 is the only command which may clear interrupt after D8' is not correct, any other than Dx command write to command register will do this aw well.
* wd_fdc: add a SSO callback. 68bit2019-08-131-10/+37
| | | | | | Some machines do not connect the SSO output to control the floppy side. When this new callback option is used the wd_fdc no longer controls the floppy, rather calls the SSO callback.