src/emu/machine/wd17xx.c
| r11986 | r11987 | |
| 386 | 386 | |
| 387 | 387 | static void wd17xx_complete_command(device_t *device, int delay); |
| 388 | 388 | static void wd17xx_timed_data_request(device_t *device); |
| 389 | | static void wd17xx_index_pulse_callback(device_t *controller, device_t *img, int state); |
| 390 | 389 | static int wd17xx_locate_sector(device_t *device); |
| 391 | 390 | static void wd17xx_timed_read_sector_request(device_t *device); |
| 392 | 391 | |
| r11986 | r11987 | |
| 899 | 898 | |
| 900 | 899 | |
| 901 | 900 | |
| 902 | | static void wd17xx_index_pulse_callback(device_t *controller, device_t *img, int state) |
| 901 | void wd17xx_index_pulse_callback(device_t *controller, device_t *img, int state) |
| 903 | 902 | { |
| 904 | 903 | wd1770_state *w = get_safe_token(controller); |
| 905 | 904 | |
src/mess/machine/thomflop.c
| r11986 | r11987 | |
| 434 | 434 | floppy_drive_set_ready_state( img, FLOPPY_DRIVE_READY, 0 ); |
| 435 | 435 | floppy_drive_set_rpm( img, 300. ); |
| 436 | 436 | floppy_drive_seek( img, - floppy_drive_get_current_track( img ) ); |
| 437 | | floppy_drive_set_index_pulse_callback( img, to7_5p14_index_pulse_callback ); |
| 438 | 437 | } |
| 439 | 438 | } |
| 440 | 439 | } |
| r11986 | r11987 | |
| 837 | 836 | { |
| 838 | 837 | device_t * img = floppy_get_device( machine, i ); |
| 839 | 838 | if (img) { |
| 840 | | floppy_drive_set_index_pulse_callback( img, to7_qdd_index_pulse_cb ); |
| 841 | 839 | floppy_drive_set_ready_state( img, FLOPPY_DRIVE_READY, 0 ); |
| 842 | 840 | |
| 843 | 841 | motor_on = CLEAR_LINE; |
| r11986 | r11987 | |
| 1534 | 1532 | { |
| 1535 | 1533 | device_t * img = floppy_get_device( machine, i ); |
| 1536 | 1534 | if (img) { |
| 1537 | | floppy_drive_set_index_pulse_callback( img, thmfc_floppy_index_pulse_cb ); |
| 1538 | 1535 | floppy_drive_set_ready_state( img, FLOPPY_DRIVE_READY, 0 ); |
| 1539 | 1536 | floppy_drive_seek( img, - floppy_drive_get_current_track( img ) ); |
| 1540 | 1537 | } |
| r11986 | r11987 | |
| 1927 | 1924 | else |
| 1928 | 1925 | to7_5p14_w( space, offset, data ); |
| 1929 | 1926 | } |
| 1927 | |
| 1928 | WRITE_LINE_DEVICE_HANDLER(thomson_index_callback) |
| 1929 | { |
| 1930 | switch ( to7_controller_type ) |
| 1931 | { |
| 1932 | case 1: |
| 1933 | to7_5p14_index_pulse_callback(NULL, device, state); |
| 1934 | break; |
| 1935 | |
| 1936 | case 2: |
| 1937 | wd17xx_index_pulse_callback(device->machine().device("wd2793"), device, state); |
| 1938 | break; |
| 1939 | |
| 1940 | case 3: |
| 1941 | thmfc_floppy_index_pulse_cb(NULL, device, state); |
| 1942 | break; |
| 1943 | |
| 1944 | case 4: |
| 1945 | to7_qdd_index_pulse_cb(NULL, device, state); |
| 1946 | break; |
| 1947 | |
| 1948 | default: |
| 1949 | break; |
| 1950 | } |
| 1951 | } |
src/mess/drivers/sg1000.c
| r11986 | r11987 | |
| 920 | 920 | FLOPPY_OPTIONS_END |
| 921 | 921 | |
| 922 | 922 | /*------------------------------------------------- |
| 923 | sf7000_fdc_index_callback - |
| 924 | -------------------------------------------------*/ |
| 925 | |
| 926 | static WRITE_LINE_DEVICE_HANDLER(sf7000_fdc_index_callback) |
| 927 | { |
| 928 | sf7000_state *driver_state = device->machine().driver_data<sf7000_state>(); |
| 929 | |
| 930 | driver_state->m_fdc_index = state; |
| 931 | } |
| 932 | |
| 933 | /*------------------------------------------------- |
| 923 | 934 | floppy_interface sf7000_floppy_interface |
| 924 | 935 | -------------------------------------------------*/ |
| 925 | 936 | |
| 926 | 937 | static const floppy_interface sf7000_floppy_interface = |
| 927 | 938 | { |
| 939 | DEVCB_LINE(sf7000_fdc_index_callback), |
| 928 | 940 | DEVCB_NULL, |
| 929 | 941 | DEVCB_NULL, |
| 930 | 942 | DEVCB_NULL, |
| 931 | 943 | DEVCB_NULL, |
| 932 | | DEVCB_NULL, |
| 933 | 944 | FLOPPY_STANDARD_5_25_DSHD, |
| 934 | 945 | FLOPPY_OPTIONS_NAME(sf7000), |
| 935 | 946 | NULL, |
| r11986 | r11987 | |
| 941 | 952 | ***************************************************************************/ |
| 942 | 953 | |
| 943 | 954 | /*------------------------------------------------- |
| 944 | | sf7000_fdc_index_callback - |
| 945 | | -------------------------------------------------*/ |
| 946 | | |
| 947 | | static void sf7000_fdc_index_callback(device_t *controller, device_t *img, int state) |
| 948 | | { |
| 949 | | sf7000_state *driver_state = img->machine().driver_data<sf7000_state>(); |
| 950 | | |
| 951 | | driver_state->m_fdc_index = state; |
| 952 | | } |
| 953 | | |
| 954 | | /*------------------------------------------------- |
| 955 | 955 | TIMER_CALLBACK( lightgun_tick ) |
| 956 | 956 | -------------------------------------------------*/ |
| 957 | 957 | |
| r11986 | r11987 | |
| 1013 | 1013 | { |
| 1014 | 1014 | /* configure VDP */ |
| 1015 | 1015 | TMS9928A_configure(&tms9928a_interface); |
| 1016 | | |
| 1017 | | /* configure FDC */ |
| 1018 | | floppy_drive_set_index_pulse_callback(m_floppy0, sf7000_fdc_index_callback); |
| 1019 | | |
| 1016 | |
| 1020 | 1017 | /* configure memory banking */ |
| 1021 | 1018 | memory_configure_bank(machine(), "bank1", 0, 1, machine().region(Z80_TAG)->base(), 0); |
| 1022 | 1019 | memory_configure_bank(machine(), "bank1", 1, 1, ram_get_ptr(m_ram), 0); |
src/mess/drivers/osi.c
| r11986 | r11987 | |
| 332 | 332 | C011 ACIAIO DISK CONTROLLER ACIA I/O PORT |
| 333 | 333 | */ |
| 334 | 334 | |
| 335 | | static void osi470_index_callback(device_t *controller, device_t *img, int state) |
| 335 | static WRITE_LINE_DEVICE_HANDLER(osi470_index_callback) |
| 336 | 336 | { |
| 337 | | sb2m600_state *driver_state = img->machine().driver_data<sb2m600_state>(); |
| 337 | sb2m600_state *driver_state = device->machine().driver_data<sb2m600_state>(); |
| 338 | 338 | |
| 339 | 339 | driver_state->m_fdc_index = state; |
| 340 | 340 | } |
| r11986 | r11987 | |
| 691 | 691 | void c1pmf_state::machine_start() |
| 692 | 692 | { |
| 693 | 693 | c1p_state::machine_start(); |
| 694 | | |
| 695 | | /* set floppy index hole callback */ |
| 696 | | floppy_drive_set_index_pulse_callback(m_floppy, osi470_index_callback); |
| 697 | 694 | } |
| 698 | 695 | |
| 699 | 696 | static FLOPPY_OPTIONS_START(osi) |
| r11986 | r11987 | |
| 707 | 704 | |
| 708 | 705 | static const floppy_interface osi_floppy_interface = |
| 709 | 706 | { |
| 707 | DEVCB_LINE(osi470_index_callback), |
| 710 | 708 | DEVCB_NULL, |
| 711 | 709 | DEVCB_NULL, |
| 712 | 710 | DEVCB_NULL, |
| 713 | 711 | DEVCB_NULL, |
| 714 | | DEVCB_NULL, |
| 715 | 712 | FLOPPY_STANDARD_5_25_SSDD_40, |
| 716 | 713 | FLOPPY_OPTIONS_NAME(osi), |
| 717 | 714 | NULL, |
src/mess/drivers/prof80.c
| r11986 | r11987 | |
| 1027 | 1027 | |
| 1028 | 1028 | // UPD765 Interface |
| 1029 | 1029 | |
| 1030 | | static void prof80_fdc_index_callback(device_t *controller, device_t *img, int state) |
| 1031 | | { |
| 1032 | | prof80_state *driver_state = img->machine().driver_data<prof80_state>(); |
| 1033 | | |
| 1034 | | driver_state->m_fdc_index = state; |
| 1035 | | } |
| 1036 | | |
| 1037 | 1030 | static const struct upd765_interface fdc_intf = |
| 1038 | 1031 | { |
| 1039 | 1032 | DEVCB_NULL, |
| r11986 | r11987 | |
| 1224 | 1217 | m_rtc->cs_w(1); |
| 1225 | 1218 | m_rtc->oe_w(1); |
| 1226 | 1219 | |
| 1227 | | // configure FDC |
| 1228 | | floppy_drive_set_index_pulse_callback(m_floppy0, prof80_fdc_index_callback); |
| 1229 | | |
| 1230 | 1220 | // allocate floppy motor off timer |
| 1231 | 1221 | m_floppy_motor_off_timer = machine().scheduler().timer_alloc(FUNC(floppy_motor_off_tick)); |
| 1232 | 1222 | |
| r11986 | r11987 | |
| 1290 | 1280 | save_item(NAME(m_dpage)); |
| 1291 | 1281 | } |
| 1292 | 1282 | |
| 1283 | static WRITE_LINE_DEVICE_HANDLER(prof80_fdc_index_callback) |
| 1284 | { |
| 1285 | prof80_state *driver_state = device->machine().driver_data<prof80_state>(); |
| 1286 | |
| 1287 | driver_state->m_fdc_index = state; |
| 1288 | } |
| 1289 | |
| 1293 | 1290 | static const floppy_interface prof80_floppy_interface = |
| 1294 | 1291 | { |
| 1292 | DEVCB_LINE(prof80_fdc_index_callback), |
| 1295 | 1293 | DEVCB_NULL, |
| 1296 | 1294 | DEVCB_NULL, |
| 1297 | 1295 | DEVCB_NULL, |
| 1298 | 1296 | DEVCB_NULL, |
| 1299 | | DEVCB_NULL, |
| 1300 | 1297 | FLOPPY_STANDARD_5_25_DSHD, |
| 1301 | 1298 | FLOPPY_OPTIONS_NAME(default), |
| 1302 | 1299 | NULL, |