Skip to content

Commit 3a98e7e

Browse files
committed
No need to check what Slot/Drive Disk II responds to on PC.
1 parent 683b63a commit 3a98e7e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/bus/iwm/iwm.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,14 @@ std::vector<uint8_t> iwmDevice::create_dib_reply_packet(const std::string& devic
432432
//*****************************************************************************
433433
void IRAM_ATTR iwmBus::service()
434434
{
435+
#ifndef DEV_RELAY_SLIP
435436
// process smartport before diskII
436437
if (!serviceSmartPort())
437438
serviceDiskII();
438439

439-
#ifndef DEV_RELAY_SLIP
440440
serviceDiskIIWrite();
441+
#else
442+
serviceSmartPort();
441443
#endif
442444
}
443445

@@ -548,10 +550,10 @@ bool IRAM_ATTR iwmBus::serviceSmartPort()
548550
return true;
549551
}
550552

553+
#ifndef DEV_RELAY_SLIP
551554
// Returns true if Disk II was handled
552555
bool IRAM_ATTR iwmBus::serviceDiskII()
553556
{
554-
#ifndef DEV_RELAY_SLIP
555557
// check on the diskii status
556558
switch (iwm_drive_enabled())
557559
{
@@ -596,12 +598,10 @@ bool IRAM_ATTR iwmBus::serviceDiskII()
596598
iwm_ack_deassert();
597599
break;
598600
}
599-
#endif /* !SLIP */
600601

601602
return true;
602603
}
603604

604-
#ifndef DEV_RELAY_SLIP
605605
// Returns true if a Disk II write was received
606606
bool IRAM_ATTR iwmBus::serviceDiskIIWrite()
607607
{
@@ -723,7 +723,7 @@ iwm_enable_state_t IRAM_ATTR iwmBus::iwm_drive_enabled()
723723
return iwm_enable_state_t::off;
724724
}
725725
}
726-
#endif /* !SLIP */
726+
#endif /* !DEV_RELAY_SLIP */
727727

728728
void iwmBus::handle_init()
729729
{

lib/device/iwm/fuji.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ iwmFuji::iwmFuji()
8080

8181
{ FUJICMD_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0xFF
8282
{ IWM_CTRL_RESET, [this]() { this->send_reply_packet(err_result); this->iwm_ctrl_reset_fujinet(); }}, // 0x00
83+
#ifndef DEV_RELAY_SLIP
8384
{ IWM_CTRL_CLEAR_ENSEEN, [this]() { diskii_xface.d2_enable_seen = 0; err_result = SP_ERR_NOERROR; }},
85+
#endif
8486

8587
{ FUJICMD_MOUNT_ALL, [&]() { err_result = (mount_all() ? SP_ERR_IOERROR : SP_ERR_NOERROR); }}, // 0xD7
8688
{ FUJICMD_MOUNT_IMAGE, [&]() { err_result = iwm_ctrl_disk_image_mount(); }}, // 0xF8
@@ -92,7 +94,9 @@ iwmFuji::iwmFuji()
9294

9395
{ IWM_STATUS_DIB, [this]() { this->send_status_dib_reply_packet(); status_completed = true; }}, // 0x03
9496
{ IWM_STATUS_STATUS, [this]() { this->send_status_reply_packet(); status_completed = true; }}, // 0x00
97+
#ifndef DEV_RELAY_SLIP
9598
{ IWM_STATUS_ENSEEN, [this]() { data_len = 1; data_buffer[0] = diskii_xface.d2_enable_seen; }},
99+
#endif
96100

97101
{ FUJICMD_DEVICE_ENABLE_STATUS, [this]() { this->send_stat_get_enable(); }}, // 0xD1
98102
{ FUJICMD_GET_ADAPTERCONFIG_EXTENDED, [this]() { this->iwm_stat_get_adapter_config_extended(); }}, // 0xC4

0 commit comments

Comments
 (0)