Previous 15994 Revisions Next

r4396 Friday 6th March, 2009 at 13:00:03 UTC by Dirk Best
[VTECH1] Changed tracksize and updated vzdos imagetool module slightly
[src/mess/formats]vt_dsk.c
[src/mess/machine]vtech1.c
[src/mess/tools/imgtool/modules]vzdos.c

src/mess/tools/imgtool/modules/vzdos.c
r4395r4396
3838*/
3939
4040#define DATA_SIZE   (126)
41#define SECTOR_SIZE   (0x9a)
41#define SECTOR_SIZE   (0x9b)
4242#define MAX_DIRENTS   (15*8)
4343
4444/* vzdos directry entry */
r4395r4396
185185
186186   /* check values */
187187   if (ent->start_track > 39)
188      return IMGTOOLERR_CORRUPTIMAGE;
188      return IMGTOOLERR_CORRUPTFILE;
189189
190190   if (ent->start_sector > 15)
191      return IMGTOOLERR_CORRUPTIMAGE;
191      return IMGTOOLERR_CORRUPTFILE;
192192
193193   return IMGTOOLERR_SUCCESS;
194194}
r4395r4396
412412   } else {
413413
414414      const char *type;
415      int /*ret,*/ len;
415      int ret, len;
416416      vzdos_dirent dirent;
417417
418      /*ret = */vzdos_get_dirent(imgtool_directory_image(enumeration), iter->index - 1, &dirent);
418      ret = vzdos_get_dirent(imgtool_directory_image(enumeration), iter->index - 1, &dirent);
419419
420      if (dirent.ftype == 0x00) {
420      if (ret == IMGTOOLERR_FILENOTFOUND)
421      {
421422         iter->eof = 1;
422423         ent->eof = 1;
423424         return IMGTOOLERR_SUCCESS;
424425      }
425426
427      if (ret == IMGTOOLERR_CORRUPTFILE)
428         ent->corrupt = 1;
429
426430      /* kill trailing spaces */
427431      for (len = 7; len > 0; len--) {
428432         if (dirent.fname[len] != 0x20) {
r4395r4396
433437      memcpy(ent->filename, &dirent.fname, len + 1);
434438      ent->filesize = dirent.end_address - dirent.start_address;
435439
436      switch (dirent.ftype) {
437         case 'T': type = "Basic";      break;
438         case 'B': type = "Binary";     break;
439         case 'D': type = "Data";       break;
440         case 'F': type = "Quickwrite"; break;
441         case 'A': type = "Assembler";  break;
442         case 'S': type = "Diskops";    break;
443         case 'W': type = "Wordpro";    break;
444         default: type = "Unknown";
440      switch (dirent.ftype)
441      {
442      case 0x01: type = "Deleted";    break;
443      case 'T':  type = "Basic";      break;
444      case 'B':  type = "Binary";     break;
445      case 'D':  type = "Data";       break;
446      case 'F':  type = "Quickwrite"; break;
447      case 'A':  type = "Assembler";  break;
448      case 'S':  type = "Diskops";    break;
449      case 'W':  type = "Wordpro";    break;
450      default:   type = "Unknown";
445451      }
446      snprintf(ent->attr, sizeof(ent->attr) / sizeof(ent->attr[0]), "%s", type);
447452
453      snprintf(ent->attr, ARRAY_LENGTH(ent->attr), "%s", type);
454
448455      iter->index++;
449456   }
450457
src/mess/machine/vtech1.c
r4395r4396
5959
6060int vtech1_latch = -1;
6161
62#define TRKSIZE_VZ   0x9a0   /* arbitrary (actually from analyzing format) */
62#define TRKSIZE_VZ   0x9b0   /* arbitrary (actually from analyzing format) */
6363#define TRKSIZE_FM   3172   /* size of a standard FM mode track */
6464
6565static UINT8 vtech1_track_x2[2] = {80, 80};
src/mess/formats/vt_dsk.c
r4395r4396
1414static FLOPPY_IDENTIFY(vz_identify)
1515{
1616   UINT64 size = floppy_image_size(floppy);
17   *vote = ((size == 98560) || (size == 99200)) ? 100 : 0;
17   *vote = ((size == 98560) || (size == 99200) || (size == 99184)) ? 100 : 0;
1818   return FLOPPY_ERROR_SUCCESS;
1919}
2020

Previous 15994 Revisions Next


© 1998-2018 The MESS Team