add credit, add 013 debug timer message on keypress master
author[NTU] <[email protected]>
Mon, 6 Aug 2018 14:00:02 +0000 (22:00 +0800)
committer[NTU] <[email protected]>
Mon, 6 Aug 2018 14:00:02 +0000 (22:00 +0800)
ROM2/main_basic.c
ROM2/src2asm.pl

index 8414357..0f9d3ea 100644 (file)
@@ -175,6 +175,20 @@ void send_keypress(u8 key) {
        send_string(" key." CRLF);
 }
 
+void send_timer() {
+       /* send a packet of the form KX with X being the key, or R for reset */
+       unsigned int t=get_timer_counter();
+
+       send_string("013 ");
+       sci_tx_buf[0] = '0'+(t/10000)%10;
+       sci_tx_buf[1] = '0'+(t/1000)%10;
+       sci_tx_buf[2] = '0'+(t/100)%10;
+       sci_tx_buf[3] = '0'+(t/10)%10;
+       sci_tx_buf[4] = '0'+t%10;
+       sci_tx_buf[5] = 0;
+       send_buffer(1);
+}
+
 void send_door_msg(bool open) {
        if (is_standalone()) return;
        sci_tx_buf[0] = '4';
@@ -359,9 +373,10 @@ void about() {
                " Revision: " VERSION_STRING "  Built: " DATEBUILT_STRING CRLF "" CRLF CRLF
                "   This snack machine was brought to you by " CRLF
                "    Bernard Blackham" CRLF
-               "    Mark Tearle" CRLF
                "    Harry McNally" CRLF
+               "    Mark Tearle" CRLF
                "    Michal Gornisiewicz" CRLF
+               "    Nick Bannon" CRLF
                "    and others." CRLF
                "" CRLF
                " Another UCC project in action.      http://www.ucc.asn.au/" CRLF
@@ -701,6 +716,7 @@ int main() {
                                }
                        } else
                                send_keypress(last_key);
+                               send_timer();
                }
 
                /*
index 2d108b2..7b73f53 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # keep the format of this next line the same to match regex in check-romsrc.pl
-$origin = 0x9d00;
+$origin = 0x9d80;
 $hole_start = 0xb600;
 $hole_size = 0x0200;
 

UCC git Repository :: git.ucc.asn.au