Hi,
I have some questions about the LEDs design.
This comment is from Leds.hh:
KANA_ON, KANA_OFF, // same as CODE LED
Are there really machines with a CODE LED?
I am wondering why LED changes are implemented using
void setLed(LEDCommand led);
Is there any deep reason for this?
I am asking because I would like to change it to
void setLed(LED led, bool state);
That would save quite a few lines in the LED code.
Also, I would like to write a listener interface and subscription scheme.
Using that, different openMSX ports can deal with LEDs in different ways. One
listener can print the state to stdout (as currently happens), another could
display then on an OSD, another could display them in the status bar of a
windowed GUI, yet another could use the PC keyboard LEDs. By using a
subscription scheme, any combination of these listeners is possible, without
modification to the LED code.
Bye,
Maarten
|