BigDumbDinosaur wrote:
My POC units implement Motorola S-record transfers in the BIOS. As each record comes in its checksum is calculated and compared to the checksum that was embedded in the S-record. In the current implementation, a checksum mismatch causes the entire transfer to be aborted and a diagnostic to be printed on the console.
Not much more you can do here, a checksum isn't the same thing as error correction.
Quote:
Something I may try out in POC V2's more capacious ROM space is to set up a simple protocol to gracefully handle an error. In such arrangement, the sending computer would transmit an S-record and then wait. Once the POC unit has verified the record it will send an ASCII <ACK> ("acknowledge," $06) to indicate the record was received error-free. That would be the sender's cue to transmit the next S-record.
On the other hand, if the received S-record's computed checksum is wrong, POC will send a ASCII <NAK> ("negative acknowledge," $15), telling the sender to re-transmit that S-record. POC would keep track of how many times a record has to be resent and if it is more than three times, will send ASCII <CAN> ("cancel," $18), telling the sender to abort. That would prevent getting stuck in a loop if a gross interface error were to occur.
You might want to at least take a glance at the Kermit protocol, since that's essentially what they do (arguably, its what they all do), but by looking it, it may answer questions you may not have thought to ask. They have versions of the protocol for, well, most everything -- including 6502 (well, Apple ][). If you look at their archive, they have several different drivers for a variety of Apple serial cards and, of all things, they even include an assembler written in C.
While the protocol CAN be sophisticated, the base version is quite simple. So, if you go so far as to implement the base level of the protocol, an off the shelf Kermit program will work fine on the host.
They even have a simple version written in BASIC with the intent that you fire that up, and use it to bootstrap sending over a better version.