-
Notifications
You must be signed in to change notification settings - Fork 1
Description
BitsyBoot only beeps when attempting to boot from slot on pre-//e machine.
BUG
ProDOS 2.4
Description
Because the open-Apple key is wired into the game port, machines without that key will falsely report that O-A is pressed when RDBTN0 is read. That effectively prevents booting from any slot, as O-A was tested first and thus branches to the GS/OS exit logic.
Re-ordering the command key logic so that valid slot boot attempts are processed before O-A is tested results in a working BITSY.BOOT. While I was there, I eliminated redundancy and use MACHID to skip the O-A check on machines that don't have it (][, ][+, and clones thereof).
This doesn't fix all cases -- MACHID doesn't distinguish between a //e with ; clock card and a IIgs, so hitting O-A/Q on that //e will crash the machine. The unfixed code does the same thing, though.
Expected Behavior
Machine should boot from selected slot.
Actual Behavior
Machine beeps, does not boot.
Possible Fix
As source code for BitsyBoot isn't publicly available, I've attached a disassembled-and-fixed version to this issue. However, the reworked logic looks like this:
MAIN_LOOP_WITH_BEEP:
jsr ROM_BELL
MAIN_LOOP:
jsr RDKEY
cmp #$9B ; ESC?
beq DO_MLI_BOOT
cmp #$8D ; CR?
beq BOOT_RECENT
cmp #$A0 ; space?
beq BOOT_RECENT
cmp #$B8 ; >= 8?
bcs GSOS_QUIT
cmp #$B1 ; >= 1?
bcs SET_SLOT_AND_BOOT
GSOS_QUIT:
ldx MACHID
cpx #$b3 ; IIgs (or //e with clock card)
bne MAIN_LOOP_WITH_BEEP
bit RDBTN0 ; safe to check O-A now
bpl MAIN_LOOP
and #$DF
cmp #$D1 ; Q? (GS/OS only)
bne MAIN_LOOP_WITH_BEEP
; 65816 GS/OS gunk here ...
.setcpu "65816"
rep #$80 ; reset processor status bits
bmi MAIN_LOOP_WITH_BEEP
lda $E100BD ; OS_BOOT (byte)
dec
bne MAIN_LOOP_WITH_BEEP
clc
xce ; swap carry and emulation flags (clear E)
lda LCBANK1 ; rw:LCBANK1
jmp $E0D000
.setcpu "6502"
BOOT_RECENT:
jsr GET_SLOT
SET_SLOT_AND_BOOT:
and #$07 ; mask to get raw slot number
beq MAIN_LOOP ; if zero, restart
ora #$C0 ; this becomes $C100-$C700
sta BOOTVEC+2 ; and put it into boot vector
Source code: bitsy.boot.s.gz
Steps to Reproduce
- Boot pre-//e (][+, Franklin ACE 1000) with ProDOS 2.4.2 and without a game controlled plugged in game port.
- Start BitsyBoot
- Select a slot to boot
- Hear a beep rather than boot the slot
Context
Use BitsyBoot as documented.
Your Environment
Franklin ACE 1000 with bootable floppy in S6D1, no game controller.
Hardware:
Franklin ACE 1000 with bootable floppy in S6D1, no game controller.
ProDOS8 version:
2.4.2
Non-Operating System release software being used:
Not applicable.