Previous 199869 Revisions Next

r19187 Wednesday 28th November, 2012 at 14:17:04 UTC by O. Galibert
wd_fdc: Describe track when formatting [O. Galibert]
[src/emu/machine]wd_fdc.c wd_fdc.h

trunk/src/emu/machine/wd_fdc.h
r19186r19187
341341   live_info cur_live, checkpoint_live;
342342   line_cb intrq_cb, drq_cb, hld_cb, enp_cb;
343343
344   UINT8 format_last_byte;
345   int format_last_byte_count;
346   astring format_description_string;
347
344348   static astring tts(attotime t);
345349   astring ttsn();
346350
trunk/src/emu/machine/wd_fdc.c
r19186r19187
582582      floppy->ss_w(command & 0x02);
583583   sub_state = motor_control ? SPINUP : SPINUP_DONE;
584584   status_type_1 = false;
585
586   format_last_byte = 0;
587   format_last_byte_count = 0;
588   format_description_string = "";
589
585590   write_track_continue();
586591}
587592
r19186r19187
641646         return;
642647
643648      case TRACK_DONE:
649         if(format_last_byte_count) {
650            char buf[32];
651            if(format_last_byte_count > 1)
652               sprintf(buf, "%dx%02x", format_last_byte_count, format_last_byte);
653            else
654               sprintf(buf, "%02x", format_last_byte);
655            format_description_string += buf;
656         }
657         logerror("wd1772: track description %s\n", format_description_string.cstr());
644658         command_end();
645659         return;
646660
r19186r19187
15211535            status |= S_LOST;
15221536            data = 0;
15231537         }
1538         if(data != format_last_byte) {
1539            if(format_last_byte_count) {
1540               char buf[32];
1541               if(format_last_byte_count > 1)
1542                  sprintf(buf, "%dx%02x ", format_last_byte_count, format_last_byte);
1543               else
1544                  sprintf(buf, "%02x ", format_last_byte);
1545               format_description_string += buf;
1546            }
1547            format_last_byte = data;
1548            format_last_byte_count = 1;
1549         } else
1550            format_last_byte_count++;
15241551
15251552         switch(data) {
15261553         case 0xf5:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team