@@ -26,12 +26,14 @@ struct hostent *he;
2626char host_name [32 ];
2727#endif
2828
29+
2930char io_initialized = 0 ;
31+ extern unsigned char is_extend ; //bring in is_extend for borders
3032
3133void io_init (void )
3234{
3335#ifdef __RS232__
34- rs232_params (RS_BAUD_4800 |RS_STOP_1 |RS_BITS_8 ,RS_PAR_NONE ); // Bauds tested 1200[/] 2400[/] 4800[/] 9600[] 19200[] 38400[] 57600[] 115200[]
36+ rs232_params (RS_BAUD_9600 |RS_STOP_1 |RS_BITS_8 ,RS_PAR_NONE ); // Bauds tested 1200[/] 2400[/] 4800[/] 9600[/ ] 19200[X ] 38400[X ] 57600[] 115200[]
3537 rs232_init ();
3638#endif
3739#ifdef __SPECTRANET__
@@ -59,9 +61,14 @@ void io_send_byte(unsigned char b)
5961#ifdef __RS232__
6062 if (io_initialized == 1 )
6163 {
62- //zx_border(INK_RED); //DEBUG Timing *IRQ-OFF
63- rs232_put (b );
64- //zx_border(INK_CYAN); //DEBUG Timing *IRQ-ON
64+ #ifdef __SPECTRUM__
65+ if (is_extend == 1 ) {zx_border (INK_BLACK );} else {zx_border (INK_WHITE );} //RS232 Raster Bars
66+ #endif
67+ rs232_put (b ); //*IRQ-OFF (SENDING DATA)
68+
69+ #ifdef __SPECTRUM__
70+ if (is_extend == 1 ) {zx_border (INK_GREEN );} else {zx_border (INK_BLACK );} //RS232 Raster Bars
71+ #endif
6572 }
6673#endif
6774#ifdef __SPECTRANET__
@@ -74,19 +81,29 @@ void io_send_byte(unsigned char b)
7481
7582void io_main (void )
7683{
77- #ifdef __RS232__
78- //zx_border(INK_RED); //DEBUG Timing *IRQ-OFF // <TIME>*IRQ STATE [EXECUTION PATH]
79- if (rs232_get (& inb ) != RS_ERR_NO_DATA ) // Bit bashing port Path:[DATA<80*IRQ-OFF>] || [NO DATA<10>*IRQ-OFF] // *IRQ - OFF, getK() blocked
80- {//zx_border(INK_CYAN); //DEBUG Timing *IRQ-ON
81- /* [RX TTY - Draw Screen] */
82- ShowPLATO (& inb ,1 ); // Draw terminal <20>*IRQ-ON // *IRQ - ON
84+ #ifdef __RS232__
85+
86+ //Don't try to wrap this in for Rasta bars, it just flashes every call to io_main.
87+ if (rs232_get (& inb ) != RS_ERR_NO_DATA ) // *IRQ-OFF (RECEIVING DATA)
88+ { /* [RX - Display] */
89+ #ifdef __SPECTRUM__
90+ if (is_extend == 1 ) {zx_border (INK_BLACK );} else {zx_border (INK_WHITE );} //RS232 Raster Bars- A little lie, the IO has been done.
91+ #endif
92+ ShowPLATO (& inb ,1 );
93+ #ifdef __SPECTRUM__
94+ if (is_extend == 1 ) {zx_border (INK_GREEN );} else {zx_border (INK_BLACK );} //RS232 Raster Bars
95+ #endif
8396 }
8497 else
85- { /* [NO RX TTY - KEY scan] */
86- for (int Kscan = 0 ;Kscan < 40 ;Kscan ++ ) // *IRQ - ON/OFF(IF Key TTY)
87- {
88- keyboard_main (); // [Path: [No key<1>*IRQ-ON] || [key local process<2>*IRQ-ON] || [key send data<80>*IRQ-OFF]
89- }
98+ { /* [NO RX - KEY scan] */
99+ #ifdef __SPECTRUM__
100+ if (is_extend == 1 ) {zx_border (INK_GREEN );} else {zx_border (INK_BLACK );} //RS232 Raster Bars
101+ #endif
102+ for (int Kscan = 0 ;Kscan < 30 ;Kscan ++ ) //Extra keyboard scanning
103+ {
104+ keyboard_main ();
105+ }
106+
90107 }
91108#endif
92109#ifdef __SPECTRANET__
0 commit comments