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

Add the screenshot packet response so we can start taking screenshots, and add some more to the proposed boot loader

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/page1C/silentlink.asm

    r26 r29  
    88 EXTERN JErrorNo,NZIf83Plus,CheckLinkLines,EnableLinkAssist,DisableLinkAssist,ContinueGetByte,Get3Bytes 
    99 EXTERN DispHexA,LdHLInd,SendAcknowledge,ReceiveHeaderPacket,SendSkipExitPacket,Get4BytesNC,SendCommandA 
     10 EXTERN Send4Bytes,SendCAndAddToChecksum,LCDDelay,_LCD_COMMAND,SendAByte,SetXAutoIncrementMode 
     11 EXTERN SetYAutoIncrementMode 
    1012 
    1113keyscnlnk: 
     
    9395       DB 87h 
    9496       DW remoteControlPacket 
     97       DB 6Dh 
     98       DW screenshotPacket 
    9599cmdTableEnd: 
     100 
     101screenshotPacket: 
     102       call SendScreenshotResponse 
     103       jr keyscnlnkEnd 
     104SendScreenshotResponse: 
     105       call SendAcknowledge 
     106       ld de,768 
     107       ld (header+2),de 
     108       ld hl,1573h 
     109       ld (header),hl 
     110       call Send4Bytes 
     111       di 
     112       call SetYAutoIncrementMode 
     113       ld a,7Fh 
     114       ld b,40h 
     115SendScreenshotResponseLoop: 
     116       push bc 
     117       inc a 
     118       ld (curXRow),a 
     119       call SetYAutoIncrementMode 
     120       call _LCD_COMMAND 
     121       ld a,20h 
     122       call _LCD_COMMAND 
     123       call LCDDelay 
     124       in a,(LCDdataPort) 
     125       ld b,12 
     126$$:    push bc 
     127       call LCDDelay 
     128       in a,(LCDdataPort) 
     129       ld c,a 
     130       call SendCAndAddToChecksum 
     131       pop bc 
     132       djnz $B 
     133       pop bc 
     134       ld a,(curXRow) 
     135       djnz SendScreenshotResponseLoop 
     136       call SetXAutoIncrementMode 
     137       ei 
     138SendChecksumAcknowledge: 
     139       ld hl,(header+4) 
     140       ld a,l 
     141       push hl 
     142       call SendAByte 
     143       pop af 
     144       call SendAByte 
     145ReceiveAcknowledgement: 
     146       call Get4BytesNC 
     147       ld a,(header+1) 
     148       cp 56h 
     149       ret z 
     150       jp JErrorNo 
    96151 
    97152remoteControlPacket: