Changeset 24

Show
Ignore:
Timestamp:
08/02/09 01:27:02 (3 years ago)
Author:
brandonlw
Message:

More linking cleanup

Location:
trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/includes/os2.inc

    r15 r24  
    123123offPageCallPage             EQU    9C83h 
    124124offPageCallAddress          EQU    9C84h 
     125laTimer                     EQU    9C86h 
    125126; 
    126127linkDelay                   EQU    9CACh 
  • trunk/page00/boot.asm

    r17 r24  
    273273       call nz,CheckLowBatteriesTurnOff 
    274274       set turnOffIfLowBatteriesFound,(iy+batteryCheckFlags) 
     275$$:    ld a,(laTimer) 
     276       or a 
     277       jr z,$F 
     278       dec a 
     279       ld (laTimer),a 
    275280$$:    bit indicRun,(iy+indicFlags) 
    276281       call nz,AnimateRunIndicator 
  • trunk/page1C/linklow.asm

    r22 r24  
    1111       di 
    1212       call ReceiveByteToC 
    13        call RecAByteIO_1 
    14        ret c 
    15        ret nz 
    16        jr z,RecAByteIO 
    17 RecAByteIO_1: 
    18 ;I think this is a TI-Keyboard routine, let it fail 
    19        cp 1 
    20        ld a,c 
    21 ;       jr nz,$F 
    22        cp 0E0h 
    23        ret nz 
    24        scf 
     13       ld a,c 
    2514       ret 
    2615ReceiveByteToC: 
     
    2918       call NZIf83Plus 
    3019       jr z,ReceiveLAByteToC 
    31        ld de,0FFFh 
     20       ld de,0FFFFh 
    3221       jr startReceiveLoop 
    3322receiveLoop: 
     
    7463       jr nz,$B 
    7564$$:    djnz receiveByteLoop 
    76        ld a,0 
     65       xor a 
    7766       ret 
    7867RBTC_1:ld a,2 
     
    9382       call ResetLATimeout 
    9483$$:    xor a 
    95        ld (9C86h),a 
     84       ld (laTimer),a 
    9685       call NZIfTimeout 
    9786       jp nz,JErrorNo 
    98        in a,(9) 
     87       in a,(laStatusPort) 
    9988       bit 6,a 
    10089       jr nz,$F 
    10190       and 11h 
    10291       jr z,$B 
    103        in a,(0Ah) 
     92       in a,(laReceivePort) 
    10493       ld c,a 
    10594       ld a,0 
     
    10796$$:    and 11h 
    10897       jp z,JErrorNo 
    109        in a,(0Ah) 
     98       in a,(laReceivePort) 
    11099       ld c,a 
    111100       ld a,1 
     
    115104       di 
    116105       res indicOnly,(iy+indicFlags) 
    117        ld a,5 
     106       ld a,lcdXAutoIncrementMode 
    118107       out (LCDinstPort),a 
    119108       ei 
     
    124113       ld a,c 
    125114       ret 
    126 $$:    bit 4,(iy+9) 
     115$$:    bit onInterrupt,(iy+onFlags) 
    127116       jp nz,JErrorNo 
    128117       call HandleLinkKeyActivity 
     
    136125       ret 
    137126LAReceiveByteToC: 
    138        bit 4,(iy+9) 
     127       bit onInterrupt,(iy+onFlags) 
    139128       jp nz,JErrorNo 
    140129       call HandleLinkKeyActivity 
    141        in a,(9) 
     130       in a,(laStatusPort) 
    142131       and 58h 
    143132       jr z,LAReceiveByteToC 
     
    148137       set indicOnly,(iy+indicFlags) 
    149138       di 
    150        res 5,(iy+3Dh) 
    151139       call NZIf83Plus 
    152140       jr nz,cgbNoAssist 
    153141       di 
    154        call ReceiveLAByteToC 
    155        ret 
     142       jr ReceiveLAByteToC 
    156143cgbNoAssist: 
    157144       ld b,8 
    158        call ReceiveByteToC_Ready 
    159        ret 
     145       jr ReceiveByteToC_Ready 
    160146 
    161147Send4Bytes: 
     
    239225sendByteLA_1: 
    240226       ld a,0FAh 
    241        ld (9C86h),a 
    242        in a,(9) 
     227       ld (laTimer),a 
     228       in a,(laStatusPort) 
    243229       bit 5,a 
    244230       jr z,$F 
    245231       ld a,c 
    246        out (0Dh),a 
     232       out (laSendPort),a 
    247233       ret 
    248234$$:    call NZIfTimeout 
  • trunk/page1C/linkprotocol.asm

    r22 r24  
    7171 
    7272SendSkipExitPacket: 
    73        ld hl,867Ch 
     73       ld hl,header+8 
    7474       ld (hl),a 
    7575       ld a,36h 
     
    7878ReceiveHeaderPacket: 
    7979       xor a 
    80        ld (ioNewData-1),a 
     80       ld (header+8),a 
    8181       ld (ioNewData),a 
    8282       ld hl,ioData 
     
    9696       jr receiveRestOfDataPacket 
    9797GetSmallDataPacket: 
    98        ld hl,ioData-1 
     98       ld hl,header+8 
    9999$$:    ld (iMathPtr5),hl 
    100100       ld hl,(header+2) 
     
    117117       ld hl,(iMathPtr5) 
    118118receiveDataLoop: 
    119        in a,(4) 
    120        bit 3,a 
     119       in a,(interruptStatusPort) 
     120       bit INT_STATUS_ON,a 
    121121       jr z,JErrorNo 
    122122       push bc 
     
    133133       inc a 
    134134       ld (pagedCount),a 
    135        cp 16 
     135       cp 16                       ;buffer 16 bytes at a time 
    136136       call z,SaveFlashBytes 
    137137       jr receiveDataContinue 
     
    152152       ld a,(pagedCount) 
    153153       or a 
    154        call nz,SaveFlashBytes 
     154       call nz,SaveFlashBytes      ;flush out the buffer 
    155155receiveDataDone: 
    156156       call RecAByteIO 
     
    188188       or a 
    189189       sbc hl,bc 
    190        or a 
    191        ret    ;UH?! 
    192190       jr nz,$F 
    193191       ret 
     
    205203       ei 
    206204       jr ReceiveAcknowledge 
     205 
  • trunk/page1C/linkutil.asm

    r22 r24  
    4242       jr Send4Bytes 
    4343 
    44        Get4BytesNC: 
     44Get4BytesNC: 
    4545       call Rec1stByteNC 
    4646Get3Bytes: 
  • trunk/page1C/silentlink.asm

    r22 r24  
    132132       di 
    133133       res indicOnly,(iy+indicFlags) 
    134        ld a,5 
     134       ld a,lcdXAutoIncrementMode 
    135135       out (LCDinstPort),a 
    136136eiRet: ei