Previous 199869 Revisions Next

r18476 Friday 12th October, 2012 at 05:40:40 UTC by Barry Rodewald
upd765: Implemented DUMPREG command.
[src/mess/machine]upd765.c upd765.h

trunk/src/mess/machine/upd765.c
r18475r18476
971971   case 0x0d:
972972      return command_pos == 6 ? C_FORMAT_TRACK       : C_INCOMPLETE;
973973
974   case 0x0e:
975      return command_pos == 2 ? C_DUMP_REG           : C_INCOMPLETE;
976
974977   case 0x0f:
975978      return command_pos == 3 ? C_SEEK               : C_INCOMPLETE;
976979
r18475r18476
10011004             command[1], command[2], command[3]);
10021005      // byte 1 is ignored, byte 3 is precompensation-related
10031006      fifocfg = command[2];
1007      precomp = command[3];
10041008      main_phase = PHASE_CMD;
10051009      break;
10061010
1011   case C_DUMP_REG:
1012      main_phase = PHASE_RESULT;
1013      result[0] = flopi[0].pcn;
1014      result[1] = flopi[1].pcn;
1015      result[2] = flopi[2].pcn;
1016      result[3] = flopi[3].pcn;
1017      result[4] = (spec & 0xff00) >> 8;
1018      result[5] = (spec & 0x00ff);
1019      result[6] = sector_size;
1020      result[7] = locked ? 0x80 : 0x00;
1021      result[7] |= (perpmode & 0x30);
1022      result[8] = fifocfg;
1023      result[9] = precomp;
1024      result_pos = 10;
1025      break;
1026
10071027   case C_FORMAT_TRACK:
10081028      format_track_start(flopi[command[1] & 3]);
10091029      break;
r18475r18476
10181038
10191039   case C_PERPENDICULAR:
10201040      logerror("%s: command perpendicular\n", tag());
1041      perpmode = command[1];
10211042      main_phase = PHASE_CMD;
10221043      break;
10231044
trunk/src/mess/machine/upd765.h
r18475r18476
292292   UINT8 dor, dsr, msr, fifo[16], command[16], result[16];
293293   UINT8 st0, st1, st2, st3;
294294   UINT8 fifocfg, dor_reset;
295   UINT8 precomp, perpmode;
295296   UINT16 spec;
296297   int sector_size;
297298   int cur_rate;
r18475r18476
303304
304305   enum {
305306      C_CONFIGURE,
307      C_DUMP_REG,
306308      C_FORMAT_TRACK,
307309      C_LOCK,
308310      C_PERPENDICULAR,

Previous 199869 Revisions Next


© 1997-2024 The MAME Team