Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!shelby!portia!gaia From: gaia@portia.Stanford.EDU (fai to leung) Newsgroups: comp.os.minix Subject: Re: NEW MINIX USER WITH TYPICAL PROBLEMS AND QUESTION Summary: Quick fix for MINIX 1.1 1.2 tty.c Message-ID: <3213@portia.Stanford.EDU> Date: 28 Jun 89 06:31:50 GMT References: <7408@cs.Buffalo.EDU> Sender: fai to leung Reply-To: gaia@Portia.Stanford.EDU Organization: Stanford University Lines: 85 In article <7408@cs.Buffalo.EDU> ugcuddih@sunybcs.UUCP (Elisabeth Cuddihy) writes: > >I am in the process of installing minix 1.1 on my PC clone at >home. I asssume that the minix disks that I am using are >standard 1.1 with out any bizarre changes. > >One odd problem that I am having is that any output to the screen >will not be shown until I hit return enough times to get the last >typed line to the top of the screen. Has anyone else had this >problem? The problem: The original tty.c code uses hardware paging of the 6845 Chip. The problem is when the hardware pages through the last page of the 16K (color) or 4K (mono) video memory, the lower lines are actually lying outside the video memory not updated by tty routines-- and therefore the blank lines. At the same time the first page of the video ram is updated! Quick fix (assuming there is memory outside the assumed video ram): Include in your tty.c the following: /* for mono cards replace 0x3060 with 0x60 total video memory - 1 page 0xb8000 with 0xb0000 base of 1st page 0xbc000 with 0xb1000 base of last+1 page vid_port for color = 0x3D4 vid_port for mono = 0x3B4 */ s_update(tp) register struct tty_struct *tp; { int select; if (tp->tty_org > 0x3060) { lock(); port_in(vid_port+8,&select); port_out(vid_port+8,select & 0xf7); phys_copy((long)0xb8000,(long)0xbc000,(long)0xfa0); /* 80 column * 25 rows * 2 bytes/per video char = 0xfa0 */ port_out(vid_port+8,select | 8); unlock(); } } call this routine at the end of console(...) {....... s_update(tp); } do_charint(..) { ...... s_update(tp); } and before any calls to scroll_screen(..) in tty.c REBUILD THE BOOT DISK!!! Short coming of fix: to many calls of s_update() in the 'fifth' (color) or '2nd' (mono) page, and thus very slow operation on that page. EGA, VGA: Since the machine routine looks at retrace which is not needed for EGA, VGA, fake as Mono card with 'wrong' video port address. in tty_init: color=0; vid_base=COLOR_BASE; vid_mask=C_VID_MASK; vid_port=C_6845; vid_retrace=M_RETRACE; instead of the origin if else designation. Apology: Due to hardware problem the above is typed in instead of giving encoded codes