VOGONS


First post, by danoon

User metadata
Rank Member
Rank
Member

In pic.cpp in the function:

static void write_command(Bitu port,Bitu val,Bitu iolen) {

I'm trying to understand the intent of this code

if(pic[0].special || pics[1].special) 
PIC_Special_Mode = true; else
PIC_Special_Mode = false;

pics is defined as

static PIC_Controller pics[2];

and pic is defined as

PIC_Controller * pic=&pics[port==0x20 ? 0 : 1];

Do you think pic[0].special intentionally meant pic->special or is this a typo and it should be pics[0]?

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

there is indeed a "s" missing there.
should be pics[0].special
I changed the code in question. Thanks.

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, but I wrote that part myself 😀
The results are most likely to be identical though, as I don't know of programs that only put one pic in special mode.

Water flows down the stream
How to ask questions the smart way!