X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2Fsci.c;h=6ef3cd357acc2698c2eda1f7e90194cfe96caa77;hb=2e98bf59fc918f4e3d0dcfda51b381c8ef853746;hp=646e443ca4cb4077226b394836fe27e2f321b582;hpb=74fa3423b3feafe4877c3bfc819462e80797ed3a;p=uccvend-snackrom.git diff --git a/ROM2/sci.c b/ROM2/sci.c index 646e443..6ef3cd3 100644 --- a/ROM2/sci.c +++ b/ROM2/sci.c @@ -50,6 +50,11 @@ void send_string(char* c) { } } +char toupper(char c) { + if (c >= 'a' && c <= 'z') c -= 'a'-'A'; + return c; +} + void sci_rx_int() { char buf = _io_ports[M6811_SCDR]; if (sci_doing_xmodem) { @@ -72,7 +77,8 @@ void sci_rx_int() { /* overrun :( */ return; } - sci_rx_buf[sci_rx_buf_ptr] = buf; + /* we upper case because no commands care that things aren't */ + sci_rx_buf[sci_rx_buf_ptr] = toupper(buf); if (buf == '\n' || buf == '\r') { sci_rx_buf[sci_rx_buf_ptr] = '\0'; @@ -98,14 +104,6 @@ void msg_clr() { sci_rx_buf_ptr = 0; } -void send_ack() { - send_string("!" CRLF); -} - -void send_nack() { - send_string("?" CRLF); -} - u16 sci_timer; void serial_rti() { /* called every 6.6 ms */ if (sci_timer) sci_timer--;