mgcaret / rom4x

*Archived because I am not permitted to make/accept changes for the foreseeable future* Improved Apple //c (ROM 4X) and Apple IIc Plus (ROM 5X) firmware.
79 stars 14 forks source link

Feature: Drop to BASIC if "Check disk drive." appears. #1

Closed mgcaret closed 7 years ago

mgcaret commented 7 years ago

There's no reason to coma the machine if the "Check disk drive." message appears. Why make the user press ctrl-reset?

mgcaret commented 7 years ago

This would require patching the bootfail routine at main bank $c552 to not coma after displaying the message. Assuming someone might want to call coma at $c55d, there are 11 bytes available and the RTS trick could be used to pop into the alt bank. If the (edit: original) message were to be discarded, there are another 16 bytes that could be used.

; Jump to new boot fail routine in other bank
* = bootfail
 lda #>(newbootfail-1)
 pha
 lda #<(newbootfail-1)
 pha
 jmp swrts

; other bank
* = newbootfail
; this routine should:
; 1.  display boot fail message
; 2. warm start BASIC if possible (in case user accidentally issued pr# to wrong slot, for instance)
; 3. cold start BASIC if not possible.
; above assumes everything else is initialized, which it should be.
mgcaret commented 7 years ago

I've decided that a warm start of BASIC isn't really possible. Additionally, we need to call some routines to get I/O back to something usable.

The memory card firmware cold starts BASIC if it doesn't boot.

mgcaret commented 7 years ago

Committed in #c4d6e5c0b328078e07c6a72bc76f0fb8c9f61a35