Previous 15994 Revisions Next

r14872 Sunday 8th April, 2012 at 16:52:04 UTC by R. Belmont
uPD765: fix Apollo floppy read/write problems [Hans Ostermeyer]
[src/mess/machine]upd765.c

src/mess/machine/upd765.c
r14871r14872
15351535            /* sector id == EOT */
15361536            UINT8 ddam;
15371537
1538            /* nothing to write */
1539            if ((fdc->upd765_transfer_bytes_remaining==0) && (fdc->upd765_flags & UPD765_DMA_MODE))
1540            {
1541               if (fdc->upd765_flags & UPD765_TC)
1542                  upd765_write_complete(device);
1543               // if TC not set, what?
1544               break;
1545            }
1546
15471538            ddam = 0;
15481539            if (fdc->command == 0x09)
15491540            {
r14871r14872
15511542            }
15521543
15531544            /* write data to disc */
1545            // logerror("floppy_drive_write_sector_data side=%d sector=%d tc=%x\n", fdc->side, fdc->sector_id, fdc->upd765_flags & UPD765_TC);
15541546            floppy_drive_write_sector_data(current_image(device), fdc->side, fdc->sector_id,fdc->data_buffer,upd765_n_to_bytes(fdc->upd765_command_bytes[5]),ddam);
15551547
1548            /* nothing to write */
1549            if ((fdc->upd765_transfer_bytes_remaining==0) && (fdc->upd765_flags & UPD765_DMA_MODE))
1550            {
1551               if (fdc->upd765_flags & UPD765_TC)
1552               {
1553                  upd765_write_complete(device);
1554                  break;
1555               }
1556            }
1557
15561558            if (upd765_sector_count_complete(device))
15571559            {
15581560               upd765_increment_sector(device);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team