1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-03-20 03:29:47 +00:00

Merge pull request #1231 from TomHarte/DiskClassification

Improve format support; log more.
This commit is contained in:
Thomas Harte 2023-12-02 15:11:24 -05:00 committed by GitHub
commit ad9e0b664a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -134,7 +134,13 @@ class FloppyController {
break;
case Command::ReadData: {
printf("FDC: Read %d:%d at %d/%d/%d\n", decoder_.target().drive, decoder_.target().head, decoder_.geometry().cylinder, decoder_.geometry().head, decoder_.geometry().sector);
printf("FDC: Read from drive %d / head %d / track %d of head %d / track %d / sector %d\n",
decoder_.target().drive,
decoder_.target().head,
drives_[decoder_.target().drive].track,
decoder_.geometry().head,
decoder_.geometry().cylinder,
decoder_.geometry().sector);
// log = true;
status_.begin(decoder_);
@ -152,13 +158,17 @@ class FloppyController {
found_sector = true;
bool wrote_in_full = true;
printf("Writing data beginning: ");
for(int c = 0; c < 128 << target.size; c++) {
if(c < 8) printf("%02x ", pair.second.samples[0].data()[c]);
if(!dma_.write(2, pair.second.samples[0].data()[c])) {
printf("FDC: DMA not permitted\n");
wrote_in_full = false;
break;
}
}
printf("\n");
if(wrote_in_full) {
results_.serialise(

View File

@ -28,6 +28,12 @@ PCBooter::PCBooter(const std::string &file_name) :
sector_count_ = 8;
break;
case 512 * 8 * 40 * 2:
head_count_ = 2;
track_count_ = 40;
sector_count_ = 8;
break;
case 512 * 9 * 40:
head_count_ = 1;
track_count_ = 40;