Changeset 20 for trunk/page1C/1Cbase.asm

Show
Ignore:
Timestamp:
08/01/09 23:56:02 (3 years ago)
Author:
brandonlw
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page1C/1Cbase.asm

    r18 r20  
    5353       or a 
    5454       ld a,b 
    55 ;       jr nz,keyscnlnk1 
     55       jr nz,keyscnlnk1 
    5656$$:    call CheckLinkLines 
    5757       jr nz,eiRet 
     
    7575       call APP_PUSH_ERRORH 
    7676       set indicOnly,(iy+indicFlags) 
    77        ld a,(ioData) 
     77       in a,(2) 
     78       and 80h 
     79       jr z,$F 
     80       ld a,(9CAFh) 
     81       or a 
     82       jr z,$F 
     83       dec a 
     84       ld (9CAFh),a 
     85       ld a,(9CB2h) 
     86       ld de,9CB2h 
     87       ld hl,9CB3h 
     88       ld bc,15 
     89       ldir 
     90       cp 41h 
     91       jr nz,keyscnlnkEnd 
     92       xor a 
     93       ld (9CAFh),a 
     94       ld a,(9CB2h) 
     95       jr kscnlnkGet3Bytes 
     96$$:    ld a,(ioData) 
    7897       call ContinueGetByte 
    79        call Get3Bytes 
     98       call DispHexA 
     99       push af 
     100       ld a,11 
     101       call PutC 
     102       pop af 
     103       bit 5,(iy+3Dh) 
     104       jr z,kscnlnkGet3Bytes 
     105       ld a,10 
     106       call PutC 
     107       in a,(2) 
     108       and 80h 
     109       jr z,keyscnlnkEnd 
     110$$:    in a,(9) 
     111       and 19h 
     112       jr z,disableLAEnd 
     113       ld a,(9CAFh) 
     114       cp 15 
     115       jr nc,keyscnlnkEnd 
     116       inc a 
     117       ld (9CAFh),a 
     118       call ContinueGetByte 
     119       ld hl,9CAFh 
     120       ld e,(hl) 
     121       ld d,0 
     122       ld hl,9CB1h 
     123       add hl,de 
     124       bit 5,(iy+3Dh) 
     125       jr nz,kscnlnkContinue 
     126       ld b,a 
     127       ld a,41h 
     128       ld (hl),a 
     129       inc hl 
     130       ld a,b 
     131       ld (hl),a 
     132       jr keyscnlnkEnd 
     133kscnlnkContinue: 
     134       ld (hl),a 
     135       jr $B 
     136kscnlnkGet3Bytes: 
     137;       call Get3Bytes 
     138       call RecAByteIO 
     139       ld (header+1),a 
     140       call DispHexA 
     141       ld a,12 
     142       call PutC 
     143       call RecAByteIO 
     144       ld (header+2),a 
     145       call RecAByteIO 
     146       ld (header+3),a 
    80147       ld hl,cmdTable 
    81148       ld b,(hl) 
     
    93160       ld a,7 
    94161       call PutC 
    95        call DispHexA 
     162       ld a,(header+1) 
     163       call DispHexA 
     164       di 
     165       halt 
    96166       jp JErrorNo 
    97167$$:    call LdHLInd 
     
    100170       call SendAcknowledge 
    101171keyscnlnkEnd: 
    102        call APP_POP_ERRORH 
     172$$:    call APP_POP_ERRORH 
    103173       jr $F 
     174disableLAEnd: 
     175       call DisableLinkAssist 
     176       jr $B 
    104177keyscnlnkHandler: 
    105178       ld a,1 
     
    108181       call DispHexA 
    109182       ld a,(iy+3Eh) 
    110        call DispHexA 
    111        in a,(0Ah) 
    112183       call DispHexA 
    113184       in a,(9) 
     
    146217       DB 06h 
    147218       DW receivedVariableHeader 
     219       DB 87h 
     220       DW remoteControlPacket 
    148221cmdTableEnd: 
    149222 
     223remoteControlPacket: 
     224       call SendAcknowledge 
     225       jr keyscnlnkEnd 
    150226receivedVariableHeader: 
    151227       ld a,99h 
     
    300376       or a 
    301377       sbc hl,de 
    302        jr c,$F 
     378       jr c,receiveRestOfDataPacket 
    303379       jp JErrorNo 
    304380receiveRestOfDataPacket: 
     
    365441ValidateChecksum: 
    366442       ld c,a 
    367        ld a,9Ah 
    368        call DispHexA 
    369443       in a,(statusPort) 
    370444       and STATUS_NON_83P_MASK 
     
    392466       or a 
    393467       sbc hl,bc 
     468       or a 
     469       ret 
    394470       jr nz,$F 
    395471       ret 
     
    485561       cp 08h 
    486562       jr z,Get3From4BytePacket 
     563       jr Get3From4BytePacket 
    487564       call RecAByteIO 
    488565       ld (header+1),a 
     
    495572       cp 2Dh 
    496573       jr z,$F 
     574       jr $F 
    497575       jp JErrorNo 
    498576Get4BytesNC: 
     
    659737       jr z,$B 
    660738       in a,(0Ah) 
    661        call DispHexA 
    662739       ld c,a 
    663740       ld a,0 
     
    666743       jp z,JErrorNo 
    667744       in a,(0Ah) 
    668        call DispHexA 
    669745       ld c,a 
    670746       ld a,1 
     
    700776       set indicOnly,(iy+indicFlags) 
    701777       di 
     778       res 5,(iy+3Dh) 
    702779       call NZIf83Plus 
    703780       jr nz,cgbNoAssist