Skip to content
Snippets Groups Projects
Commit ce30c6d4 authored by Nick Bannon's avatar Nick Bannon
Browse files

add credit, add 013 debug timer message on keypress

parent 4d4b7a86
Branches
No related merge requests found
......@@ -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();
}
/*
......
#!/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;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment