Reply 840 of 1046, by Scali
wrote:Did anyone else notice this? And is there a fix/workaround?
I found the problem: the PIC mask is set to 0xFF, so the keyboard interrupts don't fire, which means the menu can't respond to keypresses.
I think the problem may be this, in pic_write() (in file pic.c at line 106):
if (val&16) /*ICW1*/
{
//pic.mask=0xFF;
pic.mask2=0;
pic.icw=1;
pic.icw1=val;
pic.ins = 0;
pic_updatepending();
}
I've commented out the pic.mask = 0xFF there, and then it works. The demo writes the mask 0xFB, which would keep the keyboard enabled.
However, this bit of code overwrites it to 0xFF later, which seems to be the problem. I don't think the mask gets reset on real hardware when you write an ICW1. Should be easy to verify.