Originally Posted by
kur4o
{6D 10 F0 36 [[80 (00 70) (00 18 10) //86 86 36 CE 76 80 3C 30 9D 86 38 31 39 18 38 18 EC 02 FD 18 7C CD EE 00 18 08 18 08 18 08 18 08 4F 9D 8F C6 40 E7 00 18 E6 00 E7 00 FB 18 7F F7 18 7F 24 03 7C 18 7E 9D 89 C6 C0 E7 00 9D 8C 18 E6 00 E1 00 27 07 4C 81 19 23 D6 20 12 08 18 08 3C FE 18 7C 09 FF 18 7C 38 26 C5 86 86 20 02 86 85 36 CE 76 80 3C 30 9D 86 38 31 39 00 00 00 00//]] [29 0A]} [56]
...
[29 0A] this is the block checksum. It is used by the pcm to check data integrity. It is word+word+word 16 bit type checksum caculated from data contained in[[.....]]
.
I am having a bit of trouble with this checksum. I think it to be byte+byte+byte with the count extended to 16bit. Here is the code I think it uses from the PCM... please correct if I missed the point here. Adding 16 bit words also results in a problem when/if frames have odd number bytes.
Code:
************************************************
* CHECKSUM INCOMMING FRAME
************************************************
DDC3 BB 1C 06 ADDA $1C06 ; CHECKSUM OF MESSAGE
DDC6 B7 1C 06 STAA $1C06 ; UPDATE
DDC9 B6 1C 05 LDAA $1C05 ; EXTEND CHECKSUM TO
DDCC 89 00 ADCA #$00 ; 16 BITS
DDCE B7 1C 05 STAA $1C05 ;
DDD1 39 RTS ; DONE
It seems also, I have made a number of errors in the "hello world" execution frame I posted. Not the least of which is that I forgot to reset the cop and watchdog timers... this will result in a reset (no harm done). I plan to update with a fix soon
The makeshift tool I am using to send download frames works but is not great for debugging. Takes way too much time to set things up.
Current problem I am working through is that the PCM accepts the frame, but does not respond in any way. Then after it times out the d/l it just keeps on as if I had sent nothing. Here is the test frame I am sending after removing security and sending a mode 34 to get ready. Mode 34 responds with a $44-- ready to download.
Code:
Frame content:
6d 10 f0 36 80 00 16 00 00 00 86 55 b7 10 3a 86
aa b7 10 3a cc 50 a0 b7 18 06 f7 18 06 01 20 08
6a e2
Just plays possum after. Wondering now about how the content of address and length in the mode $34 command might affect the following mode $36 command.
-Tom
Bookmarks