src/mess/devices/ti99_hd.c
| r8048 | r8049 | |
| 279 | 279 | memset(&trackdata[position], 0x4e, gap4); |
| 280 | 280 | position += gap4; |
| 281 | 281 | |
| 282 | hd->status |= MFMHD_READY; |
| 283 | |
| 282 | 284 | *pbuffer = trackdata; |
| 283 | 285 | |
| 284 | 286 | /* Remember to free the buffer! Except when an error has occured, |
| 285 | | the function returns a newly allocated buffer. */ |
| 287 | the function returns a newly allocated buffer. |
| 288 | Errors are indicated by READY=FALSE. */ |
| 286 | 289 | } |
| 287 | 290 | |
| 288 | 291 | /* |
| r8048 | r8049 | |
| 320 | 323 | may lead to sectors not being written. */ |
| 321 | 324 | if (current_pos==TI99HD_BLOCKNOTFOUND) |
| 322 | 325 | { |
| 323 | | logerror("ti99_hd Cannot find gap1 for cylinder %d, head %d.\n", hd->current_cylinder, head); |
| 326 | logerror("ti99_hd error: write track: Cannot find gap1 for cylinder %d, head %d.\n", hd->current_cylinder, head); |
| 324 | 327 | /* What now? The track data are illegal, so we refuse to continue. */ |
| 328 | hd->status |= MFMHD_WRFAULT; |
| 325 | 329 | return; |
| 326 | 330 | } |
| 327 | 331 | |
| r8048 | r8049 | |
| 337 | 341 | { |
| 338 | 342 | /* Forget about the rest; we're done. */ |
| 339 | 343 | if (found) break; /* we were already successful, so all ok */ |
| 340 | | logerror("ti99_hd Cannot find sync for track %d, head %d.\n", hd->current_cylinder, head); |
| 344 | logerror("ti99_hd error: write track: Cannot find sync for track %d, head %d.\n", hd->current_cylinder, head); |
| 345 | hd->status |= MFMHD_WRFAULT; |
| 341 | 346 | return; |
| 342 | 347 | } |
| 343 | 348 | found = TRUE; |
| r8048 | r8049 | |
| 358 | 363 | { |
| 359 | 364 | if (!harddisk_chs_to_lba(file, wcyl, whead, wsector, &lba)) |
| 360 | 365 | { |
| 361 | | hd->status &= ~MFMHD_READY; |
| 362 | 366 | hd->status |= MFMHD_WRFAULT; |
| 363 | 367 | return; |
| 364 | 368 | } |
| r8048 | r8049 | |
| 372 | 376 | state = hard_disk_write(file, lba, track_image+current_pos); |
| 373 | 377 | if (state==0) |
| 374 | 378 | { |
| 375 | | logerror("ti99_hd Write error during formatting cylinder %d, head %d\n", wcyl, whead); |
| 376 | | hd->status &= ~MFMHD_READY; |
| 379 | logerror("ti99_hd error: write track: Write error during formatting cylinder %d, head %d\n", wcyl, whead); |
| 377 | 380 | hd->status |= MFMHD_WRFAULT; |
| 378 | 381 | return; |
| 379 | 382 | } |
| r8048 | r8049 | |
| 381 | 384 | } |
| 382 | 385 | else |
| 383 | 386 | { |
| 384 | | logerror("ti99_hd Cannot find DAM for cylinder %d, head %d, sector %d.\n", wcyl, whead, wsector); |
| 387 | logerror("ti99_hd error: write track: Cannot find DAM for cylinder %d, head %d, sector %d.\n", wcyl, whead, wsector); |
| 388 | hd->status |= MFMHD_WRFAULT; |
| 385 | 389 | return; |
| 386 | 390 | } |
| 387 | 391 | } |
| 388 | 392 | else |
| 389 | 393 | { |
| 390 | | logerror("ti99_hd cylinder/head mismatch. Drive is on cyl=%d, head=%d, track data say cyl=%d, head=%d\n", hd->current_cylinder, head, wcyl, whead); |
| 394 | logerror("ti99_hd error: write track: Cylinder/head mismatch. Drive is on cyl=%d, head=%d, track data say cyl=%d, head=%d\n", hd->current_cylinder, head, wcyl, whead); |
| 395 | hd->status |= MFMHD_WRFAULT; |
| 391 | 396 | } |
| 392 | 397 | } |
| 393 | 398 | else |
| 394 | 399 | { |
| 395 | | printf("ti99_hd Cannot find IDAM for cylinder %d, head %d, sector %d.\n", wcyl, whead, wsector); |
| 400 | logerror("ti99_hd error: write track: Invalid track image for cyl=%d, head=%d. Cannot find any IDAM in track data.\n", hd->current_cylinder, head); |
| 401 | hd->status |= MFMHD_WRFAULT; |
| 396 | 402 | return; |
| 397 | 403 | } |
| 398 | 404 | } |
src/mess/machine/smc92x4.c
| r8048 | r8049 | |
| 990 | 990 | |
| 991 | 991 | if (write_long) |
| 992 | 992 | { |
| 993 | | logerror("smc92x4 write sector: Write_long not supported. Performing a normal write.\n"); |
| 993 | logerror("smc92x4 warn: write sector: Write_long not supported. Performing a normal write.\n"); |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | if (w->selected_drive_type & TYPE_FLOPPY) |
| r8048 | r8049 | |
| 1387 | 1387 | else |
| 1388 | 1388 | { |
| 1389 | 1389 | if (wait) |
| 1390 | | logerror("smc92x4:seed_read_id: Waiting for seek_complete not implemented.\n"); |
| 1390 | logerror("smc92x4 warn: seed_read_id: Waiting for seek_complete not implemented.\n"); |
| 1391 | 1391 | |
| 1392 | 1392 | if (verify_id) |
| 1393 | 1393 | { |
| r8048 | r8049 | |
| 1808 | 1808 | |
| 1809 | 1809 | if (transfer_only_ids) |
| 1810 | 1810 | { |
| 1811 | | logerror("smc92x4 read track: Ignoring transfer-only-ids. Reading complete track.\n"); |
| 1811 | logerror("smc92x4 warn: read track: Ignoring transfer-only-ids. Reading complete track.\n"); |
| 1812 | 1812 | } |
| 1813 | 1813 | |
| 1814 | 1814 | smc92x4_set_dip(device, TRUE); |
| r8048 | r8049 | |
| 1837 | 1837 | (*w->intf->mfmhd_read_track)(w->register_w[DESIRED_HEAD]&0x0f, &buffer, &data_count); |
| 1838 | 1838 | sync_status_in(device); |
| 1839 | 1839 | |
| 1840 | if (!(w->register_r[DRIVE_STATUS] & DS_READY)) |
| 1841 | { |
| 1842 | logerror("smc92x4 error: read harddisk track failed.\n"); |
| 1843 | /* no buffer was allocated */ |
| 1844 | } |
| 1845 | |
| 1840 | 1846 | /* Transfer the buffer to the external memory. We assume the memory |
| 1841 | 1847 | pointer has been set appropriately in the registers. */ |
| 1842 | 1848 | set_dma_address(device, DMA23_16, DMA15_8, DMA7_0); |
| 1843 | 1849 | |
| 1844 | 1850 | if (transfer_only_ids) |
| 1845 | 1851 | { |
| 1846 | | logerror("smc92x4 read track: Ignoring transfer-only-ids. Reading complete track.\n"); |
| 1852 | logerror("smc92x4 warn: read track: Ignoring transfer-only-ids. Reading complete track.\n"); |
| 1847 | 1853 | } |
| 1848 | 1854 | |
| 1849 | 1855 | smc92x4_set_dip(device, TRUE); |
| r8048 | r8049 | |
| 1978 | 1984 | { |
| 1979 | 1985 | /* DESELECT DRIVE */ |
| 1980 | 1986 | /* done when no drive is in use */ |
| 1981 | | logerror("smc92x4 drdeselect command\n"); |
| 1987 | logerror("smc92x4 info: drdeselect command\n"); |
| 1982 | 1988 | w->output1 &= ~(OUT1_DRVSEL3|OUT1_DRVSEL2|OUT1_DRVSEL1|OUT1_DRVSEL0); |
| 1983 | 1989 | w->output2 |= OUT2_DRVSEL3_; |
| 1984 | 1990 | /* sync the latches on the PCB */ |
| r8048 | r8049 | |
| 1990 | 1996 | /* RESTORE DRIVE */ |
| 1991 | 1997 | /* bit 0: 0 -> command ends after last seek pulse, 1 -> command |
| 1992 | 1998 | ends when the drive asserts the seek complete pin */ |
| 1993 | | logerror("smc92x4 restore command %X\n", opcode); |
| 1999 | logerror("smc92x4 info: restore command %X\n", opcode); |
| 1994 | 2000 | restore_drive(device); |
| 1995 | 2001 | } |
| 1996 | 2002 | else if (opcode >= 0x04 && opcode <= 0x07) |
| 1997 | 2003 | { |
| 1998 | 2004 | /* STEP IN/OUT ONE CYLINDER */ |
| 1999 | | logerror("smc92x4 step in/out command %X\n", opcode); |
| 2005 | logerror("smc92x4 info: step in/out command %X\n", opcode); |
| 2000 | 2006 | step_in_out(device); |
| 2001 | 2007 | } |
| 2002 | 2008 | else if (opcode >= 0x08 && opcode <= 0x0f) |
| r8048 | r8049 | |
| 2007 | 2013 | else if (opcode >= 0x10 && opcode <= 0x1f) |
| 2008 | 2014 | { |
| 2009 | 2015 | /* POLLDRIVE */ |
| 2010 | | logerror("smc92x4 polldrive command %X\n", opcode); |
| 2016 | logerror("smc92x4 info: polldrive command %X\n", opcode); |
| 2011 | 2017 | poll_drives(device); |
| 2012 | 2018 | } |
| 2013 | 2019 | else if (opcode >= 0x20 && opcode <= 0x3f) |
| 2014 | 2020 | { |
| 2015 | 2021 | /* DRIVE SELECT */ |
| 2016 | | logerror("smc92x4 drselect command %X\n", opcode); |
| 2022 | logerror("smc92x4 info: drselect command %X\n", opcode); |
| 2017 | 2023 | drive_select(device, opcode&0x1f); |
| 2018 | 2024 | } |
| 2019 | 2025 | else if (opcode >= 0x40 && opcode <= 0x4f) |
| 2020 | 2026 | { |
| 2021 | 2027 | /* SETREGPTR */ |
| 2022 | | logerror("smc92x4 setregptr command %X\n", opcode); |
| 2028 | logerror("smc92x4 info: setregptr command %X\n", opcode); |
| 2023 | 2029 | w->register_pointer = opcode & 0xf; |
| 2024 | 2030 | /* Spec does not say anything about the effect of setting an |
| 2025 | 2031 | invalid value (only "care should be taken") */ |
| r8048 | r8049 | |
| 2040 | 2046 | || (opcode >= 0x80)) |
| 2041 | 2047 | { |
| 2042 | 2048 | /* READ/WRITE SECTORS PHYSICAL/LOGICAL */ |
| 2043 | | logerror("smc92x4 read/write sector command %X\n", opcode); |
| 2049 | logerror("smc92x4 info: read/write sector command %X\n", opcode); |
| 2044 | 2050 | read_write_sectors(device); |
| 2045 | 2051 | } |
| 2046 | 2052 | else if (opcode >= 0x5A && opcode <= 0x5b) |
| 2047 | 2053 | { |
| 2048 | 2054 | /* READ TRACK */ |
| 2049 | | logerror("smc92x4 read track command %X\n", opcode); |
| 2055 | logerror("smc92x4 info: read track command %X\n", opcode); |
| 2050 | 2056 | read_track(device); |
| 2051 | 2057 | } |
| 2052 | 2058 | else if (opcode >= 0x60 && opcode <= 0x7f) |
| 2053 | 2059 | { |
| 2054 | 2060 | /* FORMAT TRACK */ |
| 2055 | | logerror("smc92x4 format track command %X\n", opcode); |
| 2061 | logerror("smc92x4 info: format track command %X\n", opcode); |
| 2056 | 2062 | format_track(device); |
| 2057 | 2063 | } |
| 2058 | 2064 | else |
src/mess/drivers/ti99_8.c
| r8048 | r8049 | |
| 274 | 274 | PORT_DIPSETTING( 0x03, "80 track HD, 2 ms") |
| 275 | 275 | |
| 276 | 276 | PORT_START( "DRVSPD" ) |
| 277 | | PORT_DIPNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 278 | | PORT_DIPSETTING( 0x00, "No delay") |
| 279 | | PORT_DIPSETTING( 0x01, "Realistic") |
| 277 | PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 278 | PORT_CONFSETTING( 0x00, "No delay") |
| 279 | PORT_CONFSETTING( 0x01, "Realistic") |
| 280 | 280 | |
| 281 | 281 | /* 3 ports for mouse */ |
| 282 | 282 | PORT_START("MOUSEX") /* Mouse - X AXIS */ |
src/mess/drivers/geneve.c
| r8048 | r8049 | |
| 290 | 290 | PORT_DIPSETTING( 0xff, "80 track HD, 2 ms") |
| 291 | 291 | |
| 292 | 292 | PORT_START( "DRVSPD" ) |
| 293 | | PORT_DIPNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 294 | | PORT_DIPSETTING( 0x00, "No delay") |
| 295 | | PORT_DIPSETTING( 0x01, "Realistic") |
| 293 | PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 294 | PORT_CONFSETTING( 0x00, "No delay") |
| 295 | PORT_CONFSETTING( 0x01, "Realistic") |
| 296 | 296 | |
| 297 | 297 | PORT_START("JOY") /* col 1: "wired handset 1" (= joystick 1) */ |
| 298 | 298 | PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_UP/*, "(1UP)", CODE_NONE, OSD_JOY_UP*/) PORT_PLAYER(1) |
src/mess/drivers/ti99_4p.c
| r8048 | r8049 | |
| 149 | 149 | PORT_DIPSETTING( 0xff, "80 track HD, 2 ms") |
| 150 | 150 | |
| 151 | 151 | PORT_START( "DRVSPD" ) |
| 152 | | PORT_DIPNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 153 | | PORT_DIPSETTING( 0x00, "No delay") |
| 154 | | PORT_DIPSETTING( 0x01, "Realistic") |
| 152 | PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 153 | PORT_CONFSETTING( 0x00, "No delay") |
| 154 | PORT_CONFSETTING( 0x01, "Realistic") |
| 155 | 155 | |
| 156 | 156 | /* 3 ports for mouse */ |
| 157 | 157 | PORT_START("MOUSEX") /* Mouse - X AXIS */ |
src/mess/drivers/ti99_4x.c
| r8048 | r8049 | |
| 173 | 173 | PORT_DIPSETTING( 0xff, "80 track HD, 2 ms") |
| 174 | 174 | |
| 175 | 175 | PORT_START( "DRVSPD" ) |
| 176 | | PORT_DIPNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 177 | | PORT_DIPSETTING( 0x00, "No delay") |
| 178 | | PORT_DIPSETTING( 0x01, "Realistic") |
| 176 | PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 177 | PORT_CONFSETTING( 0x00, "No delay") |
| 178 | PORT_CONFSETTING( 0x01, "Realistic") |
| 179 | 179 | |
| 180 | 180 | /* 3 ports for mouse */ |
| 181 | 181 | PORT_START("MOUSEX") /* Mouse - X AXIS */ |
| r8048 | r8049 | |
| 349 | 349 | PORT_DIPSETTING( 0xff, "80 track HD, 2 ms") |
| 350 | 350 | |
| 351 | 351 | PORT_START( "DRVSPD" ) |
| 352 | | PORT_DIPNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 353 | | PORT_DIPSETTING( 0x00, "No delay") |
| 354 | | PORT_DIPSETTING( 0x01, "Realistic") |
| 352 | PORT_CONFNAME( 0x01, 0x01, "Floppy and HD speed" ) PORT_CONDITION( "DISKCTRL", 0x07, PORTCOND_EQUALS, 0x03 ) |
| 353 | PORT_CONFSETTING( 0x00, "No delay") |
| 354 | PORT_CONFSETTING( 0x01, "Realistic") |
| 355 | 355 | |
| 356 | 356 | /* 3 ports for mouse */ |
| 357 | 357 | PORT_START("MOUSEX") /* Mouse - X AXIS */ |