File tree 1 file changed +20
-10
lines changed
Kernel/platform/platform-trs80
1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ __sfr __at 0x8E gfx_xor;
18
18
19
19
The control port differs as follows
20
20
Tandy
21
- 0: set to tun graphics on, clear for alpha
21
+ 0: set to turn graphics on, clear for alpha
22
22
1: set to turn on wait states (no flicker on update)
23
23
24
24
Micrografyx
@@ -35,25 +35,35 @@ static uint_fast8_t probe_gfx(void)
35
35
{
36
36
kputs ("Probing gfx\n" );
37
37
gfx_x = 1 ;
38
- if (gfx_x != 1 )
38
+ gfx_y = 1 ;
39
+ gfx_ctrl = 0xA0 ; /* Graphics off, inc X on read/write */
40
+ gfx_data = 0x55 ;
41
+ gfx_data = 0xAA ;
42
+ gfx_x = 1 ;
43
+ if (gfx_data != 0x55 ) {
44
+ kputs ("none\n" ) ;
39
45
return 0 ;
40
- gfx_ctrl = 0x10 ; /* Graphics off, inc X on read */
41
- gfx_data ;
42
- if ( gfx_x != 0x11 )
46
+ }
47
+ if ( gfx_data != 0xAA ) {
48
+ kputs ( "none\n" ) ;
43
49
return 0 ;
50
+ }
44
51
/* We have either a TRS80 or a clone card present */
45
- gfx_xpan = 0xAA ;
46
- if (gfx_xpan != 0xAA )
52
+ gfx_x = 0x7F ;
53
+ gfx_y = 0xFF ;
54
+ gfx_ctrl = 0xF0 ; /* No inc of X or Y */
55
+ gfx_data = 0xA5 ;
56
+ if (gfx_data != 0xA5 ) { /* this may need to be forced for Grafyx clone */
57
+ kputs ("uLabs Grafyx (original)\n" ) ;
47
58
return 2 ;
48
- gfx_xpan = 0 ;
59
+ }
60
+ kputs ("Tandy (assumed) or Grafyx clone (unhandled)\n" ) ;
49
61
return 1 ;
50
62
}
51
63
52
64
void device_init (void )
53
65
{
54
- kputs ("Probing gfx\n" );
55
66
gfxtype = probe_gfx ();
56
- kputs ("Done\n" );
57
67
vtbuf_init ();
58
68
#ifdef CONFIG_RTC
59
69
/* Time of day clock */
You can’t perform that action at this time.
0 commit comments