FreeCalypso > hg > freecalypso-reveng
diff bootrom.notes @ 13:e0ce45f043c0
boot ROM re: continuing plowing through the serial protocol code
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 24 Apr 2013 22:48:12 +0000 |
parents | 25b016d16602 |
children | 3443b1b08af4 |
line wrap: on
line diff
--- a/bootrom.notes Wed Apr 24 19:32:45 2013 +0000 +++ b/bootrom.notes Wed Apr 24 22:48:12 2013 +0000 @@ -54,8 +54,25 @@ <p +Followed by 9 bytes: + 1 byte: goes into var at 800518 + 1 byte: goes into var at 800521 + 2 bytes: 16-bit MSB-first value goes into var at 800522 + 1 byte: goes into var at 800525 + 4 bytes: 32-bit MSG-first value goes into var at 80051C + <w +Followed by: + 1 byte: block number (of this block) + 1 byte: total # of blocks + 2 bytes: # of payload bytes in this block (MSB first) + 4 bytes: load address for this block (MSB first) + data + +for a single block (both bytes after <w set to 01), the maximum allowed +payload length is 1015 (0x3F7) bytes. + RAM layout: 800000 7 words: @@ -71,11 +88,19 @@ 800104: word initialized to 0x0001D4C0 - tells the 0x2c8 routine how long to wait for a character 800108: byte initialized to 0x01 +80010C: all bytes of a '<w' command after these two command chars + are stored starting here +80050B: the above buffer ends here +800518: byte variable receives the first parameter byte after '<p' +80051C: 32-bit var set by the '<p' command 800520: byte variable filled every time the 0xfb4 routine is called holds the ID of the UART on which '<' came in, or FF if none +800521: byte variable receives the 2nd parameter byte after '<p' +800522: 16-bit var set by the '<p' command 800524: byte variable filled every time the 0xfb4 routine is called filled with a copy of 800534 +800525: byte var set by the '<p' command 80052C: byte following the '<c' command is extended to a half-word and written here @@ -83,6 +108,9 @@ 800534: byte initialized to 0x00, then may be set to 1 by the 0xfb4 routine if it selects /1 clock mode. 800538: word holds the argument of the '<b' command +80053C: byte indicates validity of the received '<w' command: + 0 means valid, 1 means something bad 8005C0: appears to be the intended low address (bottom) of the stack 80074C: top of the stack (initial value loaded into SP) +800750: lowest address at which user code may be loaded