awb@aipna.ed.ac.uk (Alan W Black) (09/07/90)
In reply to my own query a few days ago > on STe: > > When I boot the 1.5.10.2 it comes up ok but when it tries to scroll > the screen it goes into an infinite loop duplicating the last line of > the screen -- rebooting is the only way out. I have left the NR_CONS > variable as defined in the distribution (I originally tried it with 4 > and had the same problem). When set to 2, I do get two virtual > consoles and can switch between them. As long as I don't fill the > screen the system runs. The problem lies in the way the ST and STe treat video memory, because of something low level to do with copying video ram the screen sizes on the STe must be multiples of 512k (rather than 256k as on the ST). The last change Frans made was to save 768 bytes of memory per virtual console by reducing the size of the screen memory from 0x8000 to 0x7d00. This made the size no longer a multiple of 512k. The fix is to change these to 0x7e00 thus being a multiple of 512k and also saving 512k on the previous size. I must admit I didn't work this out myself, Frans told me where to look. He said he would include this change in his next patch so the patch below is temporary -- you'll have to go back to apply his next patch but this will allow STe owners to use virtual consoles. Two changes are necessary in kernel/stmain.c (line 248) and kernel/stvdu.c (line 950) in both cases change 0x7d00 to 0x7e00. These can be done by hand but I enclose patches for the pedants among you :-) 1.5.10.2 new crc kernel/stmain.c 28478 9187 56585 9187 kernel/stvdu.c 56019 27934 61674 27934 Alan Alan W Black 80 South Bridge, Edinburgh, UK Dept of Artificial Intelligence tel: (+44) -31 225 7774 x228 or x223 University of Edinburgh email: awb@ed.ac.uk # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. -----cut here-----cut here-----cut here-----cut here----- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # stmain.c.cdiff # stvdu.c.cdiff # This archive created: Thu Sep 6 19:07:55 1990 cat << \SHAR_EOF > stmain.c.cdiff *** stmain.c~ Sat Sep 1 13:56:21 1990 --- stmain.c Thu Sep 6 18:58:31 1990 *************** *** 245,251 **** * It is harmless for more modern systems. */ ad = *((long *)0x042E); /* TOS variable 'phystop' */ ! ad -= 0x7d00L; /* size of VIDEO memory */ *((long *)0x0436) = ad; /* TOS variable '_memtop' */ VIDEO->vd_ramm = (char)(ad >> 8); VIDEO->vd_ramh = (char)(ad >> 16); --- 245,251 ---- * It is harmless for more modern systems. */ ad = *((long *)0x042E); /* TOS variable 'phystop' */ ! ad -= 0x7e00L; /* size of VIDEO memory */ *((long *)0x0436) = ad; /* TOS variable '_memtop' */ VIDEO->vd_ramm = (char)(ad >> 8); VIDEO->vd_ramh = (char)(ad >> 16); SHAR_EOF cat << \SHAR_EOF > stvdu.c.cdiff *** stvdu.c~ Sat Sep 1 13:57:23 1990 --- stvdu.c Thu Sep 6 19:00:50 1990 *************** *** 947,953 **** } else { /* subtract video memory from physical top of memory */ phys_copy((phys_bytes)0x436, (phys_bytes)&p, (phys_bytes)sizeof(p)); ! p -= 0x7d00; /* VIDEORAM will eventually work here ? */ phys_copy((phys_bytes)&p, (phys_bytes)0x436, (phys_bytes)sizeof(p)); v->vram = p; } --- 947,953 ---- } else { /* subtract video memory from physical top of memory */ phys_copy((phys_bytes)0x436, (phys_bytes)&p, (phys_bytes)sizeof(p)); ! p -= 0x7e00; /* VIDEORAM will eventually work here ? */ phys_copy((phys_bytes)&p, (phys_bytes)0x436, (phys_bytes)sizeof(p)); v->vram = p; } SHAR_EOF # End of shell archive exit 0