Apple II soft reset detection on DISK II

3 posts / 0 new
Last post
Offline
Last seen: 3 weeks 3 days ago
Joined: Nov 19 2023 - 15:28
Posts: 308
Apple II soft reset detection on DISK II

Hello all, 

I have added a menu loader to the SmartDisk II (stm32 floppy emulator), and it is working great, 

 I would like to detect an Apple II soft reset on the Smartdisk II and my approach would be to count the step motor phase reinit, but it is a bit dirty, 

Is there a better way to detect a soft reset on the Disk II interface ?

Thanks 

Vincent 

 

S.Elliott's picture
Online
Last seen: 12 min 35 sec ago
Joined: Jun 23 2022 - 16:26
Posts: 316
The Disk II boot ROM leaves phase-0 turned on while booting

When you say "detect a soft reset", do you mean that you want to detect that the controller is specifically searching for a boot sector?

 

Stepper phase 0 behaves differently during boot, vs during reads by RWTS:

  • As you undoubtedly know, the bootstrap ROM homes to track 0 by counting down by 80 steps -- that makes the iconic "click-click-click" noise at startup.  Then it leaves phase-0 turned ON while searching for a boot sector.
  • RWTS never leaves phase-0 on after a seek operation -- it always turns off all stepper phases.  Consequently, DOS and ProDOS always turn OFF phase-0 after a seek operation -- all phases are off before RWTS starts searching for an address mark.

 

Therefore, from the perspective of the disk drive, if phase-0 continuously remains  ON for longer than about 20 ms then it's reasonable to infer that the controller's bootstrap ROM is searching for a boot sector.  If phase-0 turns off, then it's reasonable to infer that the bootstrap ROM is not searching for a boot sector.  (eg: DOS or ProDOS are using the drive)

 

Unfortunately third-party software could use their own proprietary disk routines that might resemble the behavior of the bootstrap ROM.  (They might even derive code from the boot ROM, for some arbitary copy-protection trick.)

So you probably won't be able to distinguish a "soft reset" with 100% accuracy -- it's always going to be a "best guess" because all the signals are controllable via software/firmware.

Offline
Last seen: 3 weeks 3 days ago
Joined: Nov 19 2023 - 15:28
Posts: 308
Thanks for the detailed

Thanks for the detailed answer, I will do some testing, but I agree it will not be 100% accuracy.

Vincent

 

Log in or register to post comments