Apple II Disk Drive After Reset

5 posts / 0 new
Last post
Offline
Last seen: 3 years 2 months ago
Joined: Jul 3 2019 - 01:31
Posts: 9
Apple II Disk Drive After Reset

I've been tinkering around with an Apple II emulator after writing an NES one (they share 6502 processors) and have it reading disk images, displaying graphics, and generally playing whatever games or software I throw at it. One difference I can't explain however has to do with the boot-up sequence and how it interacts with its disk drives.

When the Apple II starts up it finds a disk controller (if installed) and attempts to load any disk it has in the drive. It will happily do this forever, endlessly spinning the motor. If you then hit Reset the system will drop out of this search and into the BASIC prompt. On real Apple hardware that will turn off the disk drive, which will spin down after it's in-built delay. However, my emulator does not turn off the disks, it just happily keeps running them. That's because nothing in the ROM seems to be instructing it to do otherwise. I've traced through its code when a reset occurs and I can't seem to find anything talking to the disk controller either.

I'm curious if anyone knows the details on this. Does the system have some other method to kill the drive motors that's not apparent from the ROM? Or did I just miss something?

Online
Last seen: 6 min 11 sec ago
Joined: Jul 5 2018 - 09:44
Posts: 2582
My memory on this is 30+

My memory on this is 30+ years out of date but I believe that the disk controller state machine when presented with the RESET signal turns off the drive motor without the 6502 being involved at all.  Your emulator will need some special logic to really simulate what the disk controller hardware is doing.  Woz's design is pretty clever.

 

 

 

MacFly's picture
Offline
Last seen: 2 hours 2 min ago
Joined: Nov 7 2019 - 13:49
Posts: 447
Yep

Yep, the RESET signal is correctly connected to various of Apple II's hardware devices. The hardware signal will reset all sorts of I/O, even clear pending keyboard presses etc. Of course the RESET signal is also present on the I/O slots, so also I/O expansion cards react to the signal. I don't think there were many, if any at all, devices which needed a software reset. The hardware design is pretty clean in this respect...

Offline
Last seen: 1 month 3 days ago
Joined: Aug 18 2017 - 16:53
Posts: 164
MacFly wrote:Yep, the RESET
MacFly wrote:

Yep, the RESET signal is correctly connected to various of Apple II's hardware devices.

Not really. The MMU of the IIe/IIc is not connected to the /RESET signal. But the chip is able to recognize the /RESET condition.

 

Regards

Ralf

 

Offline
Last seen: 3 years 2 months ago
Joined: Jul 3 2019 - 01:31
Posts: 9
Thanks for the info, everyone

Thanks for the info, everyone. I'll see if I can dig up any documentation on all the known side-effects of a reset. For now I kill the drive motors manually and that will probably give me 99% of what I need.

Log in or register to post comments