src/mess/tools/imgtool/modules/ti99.c
| r6075 | r6076 | |
| 3995 | 3995 | /* open disk image at level 2 */ |
| 3996 | 3996 | image->type = L2I_DSK; |
| 3997 | 3997 | |
| 3998 | /* @BN@ */ |
| 3999 | /* Copy in the allocation bit map! */ |
| 4000 | memcpy(image->abm, vib.abm, 200); |
| 3998 | 4001 | /* first compute AU size and number of AUs */ |
| 3999 | 4002 | totphysrecs = get_UINT16BE(vib.totphysrecs); |
| 4000 | 4003 | |
| r6075 | r6076 | |
| 4256 | 4259 | snprintf(ent->attr, sizeof(ent->attr) / sizeof(ent->attr[0]), "DIR"); |
| 4257 | 4260 | |
| 4258 | 4261 | /* len in physrecs */ |
| 4259 | | ent->filesize = 1; |
| 4262 | /* @BN@ return length in bytes */ |
| 4263 | /* ent->filesize = 1; */ |
| 4264 | ent->filesize = 256; |
| 4260 | 4265 | |
| 4261 | 4266 | /* recurse subdirectory */ |
| 4262 | 4267 | iter->listing_subdirs = 0; /* no need to list subdirs as only the |
| r6075 | r6076 | |
| 4298 | 4303 | fdr.reclen, |
| 4299 | 4304 | (fdr.flags & fdr99_f_wp) ? " R/O" : ""); |
| 4300 | 4305 | /* len in physrecs */ |
| 4301 | | ent->filesize = get_UINT16BE(fdr.fphysrecs); |
| 4306 | /* @BN@ return length in bytes */ |
| 4307 | /* ent->filesize = get_UINT16BE(fdr.fphysrecs); */ |
| 4308 | ent->filesize = (get_UINT16BE(fdr.fphysrecs)+1)*256; |
| 4302 | 4309 | |
| 4303 | 4310 | iter->index[iter->level]++; |
| 4304 | 4311 | } |
| r6075 | r6076 | |
| 4391 | 4398 | snprintf(ent->attr, sizeof(ent->attr) / sizeof(ent->attr[0]), "DIR"); |
| 4392 | 4399 | |
| 4393 | 4400 | /* len in physrecs */ |
| 4394 | | ent->filesize = 2; |
| 4401 | /* @BN@ return length in bytes */ |
| 4402 | /* ent->filesize = 2; */ |
| 4403 | ent->filesize = 512; |
| 4395 | 4404 | |
| 4396 | 4405 | /* recurse subdirectory */ |
| 4397 | 4406 | /*iter->listing_subdirs = 1;*/ |
| r6075 | r6076 | |
| 4438 | 4447 | fdr.reclen, |
| 4439 | 4448 | (fdr.flags & fdr99_f_wp) ? " R/O" : ""); |
| 4440 | 4449 | /* len in physrecs */ |
| 4441 | | ent->filesize = get_win_fdr_fphysrecs(&fdr); |
| 4450 | /* @BN@ return length in bytes */ |
| 4451 | /* ent->filesize = get_win_fdr_fphysrecs(&fdr); */ |
| 4452 | ent->filesize = (get_win_fdr_fphysrecs(&fdr)+1)*256; |
| 4442 | 4453 | |
| 4443 | 4454 | iter->index[iter->level]++; |
| 4444 | 4455 | } |
| r6075 | r6076 | |
| 4464 | 4475 | freeAUs++; |
| 4465 | 4476 | } |
| 4466 | 4477 | |
| 4467 | | *size = freeAUs; |
| 4478 | /* @BN@ return free space in bytes */ |
| 4479 | /* *size = freeAUs; */ |
| 4480 | *size = freeAUs*256; |
| 4468 | 4481 | |
| 4469 | 4482 | return IMGTOOLERR_SUCCESS; |
| 4470 | 4483 | } |