File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ void io_recv_serial_flow_off_atari(void)
7070 return ;
7171 xoff_enabled = true;
7272 ser_put (0x13 );
73- POKE (712 ,35 );
7473}
7574
7675/**
@@ -82,5 +81,4 @@ void io_recv_serial_flow_on_atari(void)
8281 return ;
8382 xoff_enabled = false;
8483 ser_put (0x11 );
85- POKE (712 ,183 );
8684}
Original file line number Diff line number Diff line change 2020#include "../screen.h"
2121#include "key.h"
2222
23+ static uint16_t delay ;
2324static uint8_t lastkey ,key ;
2425static uint8_t keyboard_start_pressed ;
2526static uint8_t keyboard_select_pressed ;
@@ -31,6 +32,15 @@ extern padBool TTY;
3132
3233static uint8_t tty_ch ;
3334
35+ /**
36+ * keyboard_sleep - Wait a few moments, for guard time.
37+ */
38+ void keyboard_sleep (void )
39+ {
40+ for (delay = 0 ;delay < 60000 ;delay ++ )
41+ {}
42+ }
43+
3444/**
3545 * keyboard_main - Handle the keyboard presses
3646 */
@@ -62,6 +72,27 @@ void keyboard_main(void)
6272 POKE (764 ,255 );
6373 screen_update_colors ();
6474 }
75+ if (key == 12 )
76+ {
77+ POKE (764 ,255 );
78+ keyboard_out_tty (0x0D );
79+ keyboard_out_tty (0x0A );
80+ }
81+ else if (key == 57 )
82+ {
83+ POKE (764 ,255 );
84+ TTY = true;
85+ prefs_display ("Hanging up..." );
86+ keyboard_out_tty ('+' );
87+ keyboard_out_tty ('+' );
88+ keyboard_out_tty ('+' );
89+ keyboard_sleep ();
90+ keyboard_out_tty ('A' );
91+ keyboard_out_tty ('T' );
92+ keyboard_out_tty ('H' );
93+ keyboard_out_tty (0x0D );
94+ keyboard_out_tty (0x0A );
95+ }
6596 else if (key == 15 )
6697 {
6798 screen_cycle_background_back ();
@@ -97,17 +128,20 @@ void keyboard_main(void)
97128 exit (0 );
98129 break ;
99130 default :
131+ POKE (764 ,255 );
100132 prefs_clear ();
101133 }
102134 }
103135 else if (key == 45 && TTY == false) // T
104136 {
137+ POKE (764 ,255 );
105138 prefs_clear ();
106139 prefs_display ("TTY Mode" );
107140 TTY = true;
108141 }
109142 else if (key == 10 && TTY == true) // P
110143 {
144+ POKE (764 ,255 );
111145 prefs_clear ();
112146 prefs_display ("PLATO Mode" );
113147 TTY = false;
You can’t perform that action at this time.
0 commit comments