mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-17 07:32:05 +00:00
Remove logging, always work on a drive in switch_drive
This commit is contained in:
parent
6653da3c20
commit
2b8cdc7cfc
@ -323,10 +323,6 @@ apple2_dd_read(apple2dd *drive)
|
|||||||
vm_8bit byte = vm_segment_get(drive->data, apple2_dd_position(drive));
|
vm_8bit byte = vm_segment_get(drive->data, apple2_dd_position(drive));
|
||||||
drive->latch = byte;
|
drive->latch = byte;
|
||||||
|
|
||||||
log_info("Read byte %02x at track %2d, sector %2d, position %05x",
|
|
||||||
byte, drive->track_pos / 2, drive->sector_pos / ENC_ESECTOR,
|
|
||||||
apple2_dd_position(drive));
|
|
||||||
|
|
||||||
apple2_dd_shift(drive, 1);
|
apple2_dd_shift(drive, 1);
|
||||||
|
|
||||||
return byte;
|
return byte;
|
||||||
@ -429,6 +425,7 @@ apple2_dd_step(apple2dd *drive, int steps)
|
|||||||
void
|
void
|
||||||
apple2_dd_turn_on(apple2dd *drive, bool online)
|
apple2_dd_turn_on(apple2dd *drive, bool online)
|
||||||
{
|
{
|
||||||
|
log_debug("Turn drive on/off (%d)", online);
|
||||||
drive->online = online;
|
drive->online = online;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -478,10 +475,6 @@ apple2_dd_switch_phase(apple2dd *drive, size_t addr)
|
|||||||
case 0x7: phase = 4; break;
|
case 0x7: phase = 4; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == -1) {
|
|
||||||
log_info("Phase addr %02x, operation skipped", addr & 0xf);
|
|
||||||
}
|
|
||||||
|
|
||||||
apple2_dd_phaser(drive, phase);
|
apple2_dd_phaser(drive, phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,6 +485,10 @@ apple2_dd_switch_phase(apple2dd *drive, size_t addr)
|
|||||||
void
|
void
|
||||||
apple2_dd_switch_drive(apple2 *mach, size_t addr)
|
apple2_dd_switch_drive(apple2 *mach, size_t addr)
|
||||||
{
|
{
|
||||||
|
apple2dd *seldrive = mach->selected_drive
|
||||||
|
? mach->selected_drive
|
||||||
|
: mach->drive1;
|
||||||
|
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case 0x8:
|
case 0x8:
|
||||||
apple2_dd_turn_on(mach->drive1, false);
|
apple2_dd_turn_on(mach->drive1, false);
|
||||||
@ -499,9 +496,7 @@ apple2_dd_switch_drive(apple2 *mach, size_t addr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x9:
|
case 0x9:
|
||||||
if (mach->selected_drive) {
|
apple2_dd_turn_on(seldrive, true);
|
||||||
apple2_dd_turn_on(mach->selected_drive, true);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xA:
|
case 0xA:
|
||||||
@ -513,15 +508,11 @@ apple2_dd_switch_drive(apple2 *mach, size_t addr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xE:
|
case 0xE:
|
||||||
if (mach->selected_drive) {
|
seldrive->mode = DD_READ;
|
||||||
mach->selected_drive->mode = DD_READ;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xF:
|
case 0xF:
|
||||||
if (mach->selected_drive) {
|
seldrive->mode = DD_WRITE;
|
||||||
mach->selected_drive->mode = DD_WRITE;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user