lba 236 src/simh/sim_disk.c static t_stat _sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects) lba 243 src/simh/sim_disk.c sim_debug (ctx->dbit, ctx->dptr, "_sim_disk_rdsect(unit=%lu, lba=0x%X, sects=%lu)\n", (unsigned long)(uptr-ctx->dptr->units), lba, (unsigned long)sects); lba 245 src/simh/sim_disk.c da = ((t_offset)lba) * ctx->sector_size; lba 261 src/simh/sim_disk.c t_stat sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects) lba 267 src/simh/sim_disk.c sim_debug (ctx->dbit, ctx->dptr, "sim_disk_rdsect(unit=%lu, lba=0x%X, sects=%lu)\n", (unsigned long)(uptr-ctx->dptr->units), lba, (unsigned long)sects); lba 270 src/simh/sim_disk.c (lba >= (uptr->capac*ctx->capac_factor)/(ctx->sector_size/((ctx->dptr->flags & DEV_SECTORS) ? 512 : 1)))) {/* beyond the end of the disk */ lba 278 src/simh/sim_disk.c ((0 == ((lba*ctx->sector_size) & (ctx->storage_sector_size - 1))) && lba 282 src/simh/sim_disk.c return _sim_disk_rdsect (uptr, lba, buf, sectsread, sects); lba 298 src/simh/sim_disk.c t_lba tlba = lba & ~(sspsts - 1); lba 299 src/simh/sim_disk.c t_seccnt tsects = sects + (lba - tlba); lba 315 src/simh/sim_disk.c memcpy (buf, tbuf + ((lba - tlba) * ctx->sector_size), sects * ctx->sector_size); lba 317 src/simh/sim_disk.c *sectsread = sread - (lba - tlba); lba 327 src/simh/sim_disk.c t_stat sim_disk_rdsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects, DISK_PCALLBACK callback) lba 330 src/simh/sim_disk.c r = sim_disk_rdsect (uptr, lba, buf, sectsread, sects); lba 336 src/simh/sim_disk.c static t_stat _sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects) lba 343 src/simh/sim_disk.c sim_debug (ctx->dbit, ctx->dptr, "_sim_disk_wrsect(unit=%lu, lba=0x%X, sects=%lu)\n", (unsigned long)(uptr-ctx->dptr->units), lba, (unsigned long)sects); lba 345 src/simh/sim_disk.c da = ((t_offset)lba) * ctx->sector_size; lba 359 src/simh/sim_disk.c t_stat sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects) lba 366 src/simh/sim_disk.c sim_debug (ctx->dbit, ctx->dptr, "sim_disk_wrsect(unit=%lu, lba=0x%X, sects=%lu)\n", (unsigned long)(uptr-ctx->dptr->units), lba, (unsigned long)sects); lba 379 src/simh/sim_disk.c if (*((uint32 *)&buf[sect*ctx->sector_size + offset]) != (uint32)(lba + sect)) { lba 388 src/simh/sim_disk.c sim_printf ("\n%s%lu: Write Address Verification Error on lbn %lu(0x%X) of %lu(0x%X).\n", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((unsigned long)lba+(unsigned long)sect), (int)((int)lba+(int)sect), (unsigned long)total_sectors, (int)total_sectors); lba 391 src/simh/sim_disk.c sim_disk_data_trace (uptr, buf+sect*ctx->sector_size, lba+sect, ctx->sector_size, "Found", TRUE, 1); lba 398 src/simh/sim_disk.c return _sim_disk_wrsect (uptr, lba, buf, sectswritten, sects); lba 400 src/simh/sim_disk.c ((0 == ((lba*ctx->sector_size) & (ctx->storage_sector_size - 1))) && lba 423 src/simh/sim_disk.c t_lba tlba = lba & ~(sspsts - 1); lba 424 src/simh/sim_disk.c t_seccnt tsects = sects + (lba - tlba); lba 433 src/simh/sim_disk.c if ((lba & (sspsts - 1)) || lba 441 src/simh/sim_disk.c ((sects + lba - tlba) & (sspsts - 1))) lba 447 src/simh/sim_disk.c sim_buf_copy_swapped (tbuf + (lba & (sspsts - 1)) * ctx->sector_size, lba 455 src/simh/sim_disk.c *sectswritten -= (lba - tlba); lba 464 src/simh/sim_disk.c t_stat sim_disk_wrsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects, DISK_PCALLBACK callback) lba 467 src/simh/sim_disk.c r = sim_disk_wrsect (uptr, lba, buf, sectswritten, sects); lba 876 src/simh/sim_disk.c t_lba lba, sect; lba 887 src/simh/sim_disk.c for (lba = 0; (lba < total_sectors) && (r == SCPE_OK); lba += sects) { lba 889 src/simh/sim_disk.c if (lba + sects > total_sectors) lba 890 src/simh/sim_disk.c sects = total_sectors - lba; lba 894 src/simh/sim_disk.c *((uint32 *)&init_buf[sect*sector_size + offset]) = (uint32)(lba + sect); lba 896 src/simh/sim_disk.c r = sim_disk_wrsect (uptr, lba, init_buf, NULL, sects); lba 904 src/simh/sim_disk.c sim_printf ("%s%lu: Initialized To Sector Address %luMB. %lu%% complete.\r", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((((float)lba)*sector_size)/1000000), (unsigned long)((((float)lba)*100)/total_sectors)); lba 907 src/simh/sim_disk.c sim_printf ("%s%lu: Initialized To Sector Address %luMB. 100%% complete.\n", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((((float)lba)*sector_size)/1000000)); lba 914 src/simh/sim_disk.c t_lba lba, sect; lba 925 src/simh/sim_disk.c for (lba = 0; (lba < total_sectors) && (r == SCPE_OK); lba += sects) { lba 927 src/simh/sim_disk.c if (lba + sects > total_sectors) lba 928 src/simh/sim_disk.c sects = total_sectors - lba; lba 929 src/simh/sim_disk.c r = sim_disk_rdsect (uptr, lba, verify_buf, NULL, sects); lba 936 src/simh/sim_disk.c if (*((uint32 *)&verify_buf[sect*sector_size + offset]) != (uint32)(lba + sect)) { lba 945 src/simh/sim_disk.c sim_printf ("\n%s%lu: Verification Error on lbn %lu(0x%X) of %lu(0x%X).\n", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((unsigned long)lba+(unsigned long)sect), (int)((int)lba+(int)sect), (unsigned long)total_sectors, (int)total_sectors); lba 948 src/simh/sim_disk.c sim_disk_data_trace (uptr, verify_buf+sect*sector_size, lba+sect, sector_size, "Found", TRUE, 1); lba 955 src/simh/sim_disk.c sim_printf ("%s%lu: Verified containing Sector Address %luMB. %lu%% complete.\r", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((((float)lba)*sector_size)/1000000), (unsigned long)((((float)lba)*100)/total_sectors)); lba 958 src/simh/sim_disk.c sim_printf ("%s%lu: Verified containing Sector Address %luMB. 100%% complete.\n", sim_dname (dptr), (unsigned long)(uptr-dptr->units), (unsigned long)((((float)lba)*sector_size)/1000000)); lba 1136 src/simh/sim_disk.c void sim_disk_data_trace(UNIT *uptr, const uint8 *data, size_t lba, size_t len, const char* txt, int detail, uint32 reason) lba 1143 src/simh/sim_disk.c sprintf (pos, "lbn: %08X ", (unsigned int)lba); lba 74 src/simh/sim_disk.h t_stat sim_disk_rdsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects); lba 75 src/simh/sim_disk.h t_stat sim_disk_rdsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread, t_seccnt sects, DISK_PCALLBACK callback); lba 76 src/simh/sim_disk.h t_stat sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects); lba 77 src/simh/sim_disk.h t_stat sim_disk_wrsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects, DISK_PCALLBACK callback); lba 92 src/simh/sim_disk.h void sim_disk_data_trace (UNIT *uptr, const uint8 *data, size_t lba, size_t len, const char* txt, int detail, uint32 reason);