Skip to content

A2D problems with AppleTalk/interrupts, esp. on LC Apple IIe Card #129

@mgcaret

Description

@mgcaret

I should have spotted this sooner, but virtually every call to the ProDOS MLI is wrapped by a PHP+SEI and PLA combination. Example:

.proc MLI_RELAY
        sty     call
        stax    params
        php
        sei
        sta     ALTZPOFF
        sta     ROMIN2
        jsr     MLI
call:   .byte   $00
params: .addr   dummy0000
        sta     ALTZPON
        tax
        lda     LCBANK1
        lda     LCBANK1
        plp
        txa
        rts
.endproc

AppleTalk requires interrupts to be enabled, especially during system calls, and it's amazing it works with the WorkStation card at all, but apparently it is a little more forgiving of the IRQ scenario. The main reason that interrupts are required is that the AppleTalk functionality supports asynchronous modes for several calls. All calls can be made synchronously. For the extended interface this is part of the parameter list.

I am convinced that this is the source of hangs on the Apple IIe Card when there is a mounted AppleShare volume. I believe the Apple //e Workstation Card reverts to a polling mode when synchronous calls are used, because the card is effectively a separate computer and there is definitely a polling routine in the firmware. The implementation is totally different on the Apple IIe Card, where the host Mac does the bulk of the processing. I haven't been able to find it yet, but I expect that the AppleTalk firmware issues the command to the host Mac side, and if the call is synchronous, busy-waits for the interrupt or issues the WAI instruction.

ProDOS is generally smart enough to know what devices are non-interruptible and disable interrupts for them when it accesses them. If anything, MLI calls should enable interrupts.

It looks like MGTK properly uses the MLI to configure interrupts, the only sketchy thing I see is in loader.s where it plays with the vector for some reason.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions