void new_config()
{
byte port = (byte)(~ddr | pr);
basic_in = (port & 3) == 3;
kernal_in = (port & 2) != 0;
char_in = ((port & 3) != 0) && !((port & 4) != 0);
io_in = ((port & 3) != 0) && ((port & 4) != 0);
}