Hi,
I want to reply to all your thoughts, this post is just on the first bit
Originally Posted by
kur4o
I still insist the response on successful upload must be 73, not 78.
I think response 73 is reserved for download without execute. In my dictionary of code responses: Code $73 - Block Transfer Complete/Next Block. This seems to match with what I see. Here is a screen shot of my app when I download without execute...
DLCAP3.jpg
I have tried loading to $0000, $1810 and $1900. Code seems to get hit no matter where I place it.
Also... regarding response code sent, here are some commented code snips. First is where I believe the testing is done to verify the parameters place downloaded code in ram and not elsewhere
Code:
DD0B B6 1B FF LDAA $1BFF ; GET LENGTH BITS 16:23
DD0E 85 7F BITA #$7F ; TEST FOR EXECUTE DOWNLOAD FLAG
DD10 27 05 BEQ $DD17 ;
DD12 CC 74 41 LDD #$7441 ; IMPROPER DOWNLOAD TYPE
DD15 20 21 BRA $DD38 ;
DD17 B6 1C 11 LDAA $1C11 ; TEST ADDRESS OUT OF RANGE FLAG
DD1A 85 40 BITA #$40 ;
DD1C 27 05 BEQ $DD23 ;
DD1E CC 74 42 LDD #$7442 ; CAN'T DOWNLOAD TO SPECIFIED ADDRESS
DD21 20 15 BRA $DD38 ;
DD23 85 20 BITA #$20 ; TEST LENGTH ERROR FLAG
DD25 27 05 BEQ $DD2C ;
DD27 CC 74 43 LDD #$7443 ; CAN'T DOWNLOAD NUMBER OF BYTES REQUESTED
DD2A 20 0C BRA $DD38 ;
DD2C B6 1B FE LDAA $1BFE ; READ REQUESTED MODE
DD2F 81 34 CMPA #$34 ; REQUEST DOWNLOAD- TO PCM
DD31 26 13 BNE $DD46 ;
DD33 CC 74 44 LDD #$7444 ; READY FOR DOWNLOAD
DD36 20 0C BRA $DD44 ;
This gives detail of how codes 42, 43 and 44 are arrived at.
Next snip is where dl frame is received and evaluated
Code:
DD77 7D 1B FF TST $1BFF ; TEST FOR EXECUTE FLAG $80
DD7A 2A 23 BPL $DD9F ; BRANCH TO CONTINUE DOWNLOAD
DD7C CC 76 78 LDD #$7678 ; BLOCK TRANSFER MESSAGE CORRECTLY RECEIVED
DD7F B7 1C 0B STAA $1C0B ; DATA BYTE 0
DD82 F7 1C 0D STAB $1C0D ; DATA BYTE 2
DD85 B6 1B FF LDAA $1BFF ;
DD88 B7 1C 0C STAA $1C0C ; DATA BYTE 1
DD8B B6 1B FC LDAA $1BFC ;
DD8E B7 1C 0A STAA $1C0A ; 3RD HEADER BYTE
DD91 C6 06 LDAB #$06 ; MESSAGE BYTE COUNT
DD93 BD DE 37 JSR $DE37 ; SEND MESSAGE TO THE DATA LINK
DD96 21 28 BRN $DDC0 ; BRANCH NEVER??
* EXECUTE CODE AT ADDRESS IN BYTE 5 AND 6
DD98 FE 1C 03 LDX $1C03 ;
DD9B AD 00 JSR $00,X ; EXECUTE DOWNLOAD FROM ADDRESS
DD9D 20 21 BRA $DDC0 ;
DD9F CC 76 73 LDD #$7673 ; BLOCK TRANSFER COMPLETE/NEXT BLOCK
This gives detail to how codes 78 and 73 are arrived at.
In some places frames are not responded to. Also I note that the execution is JSR $00,X. This means that the stack shouldn't be re-assigned if the routine plans to return. While my download routine does not return, my re-init of the stack could be creating troubles for interrupt code.
Bookmarks