18 #ifndef MT32EMU_DISPLAY_H 19 #define MT32EMU_DISPLAY_H 31 static const unsigned int LCD_TEXT_SIZE = 20;
42 void checkDisplayStateUpdated(
bool &midiMessageLEDState,
bool &midiMessageLEDUpdated,
bool &lcdUpdated);
45 void setMainDisplayMode();
47 void midiMessagePlayed();
48 void rhythmNotePlayed();
49 void voicePartStateChanged(Bit8u partIndex,
bool activated);
50 void masterVolumeChanged();
51 void programChanged(Bit8u partIndex);
52 void checksumErrorOccurred();
53 bool customDisplayMessageReceived(
const Bit8u *message, Bit32u startIndex, Bit32u length);
54 void displayControlMessageReceived(
const Bit8u *messageBytes, Bit32u length);
57 typedef Bit8u DisplayBuffer[LCD_TEXT_SIZE];
59 static const unsigned int TIMBRE_NAME_SIZE = 10;
65 bool lcdUpdateSignalled;
66 bool lastRhythmPartState;
67 bool voicePartStates[8];
69 Bit8u lastProgramChangePartIndex;
70 const char *lastProgramChangeSoundGroupName;
71 Bit8u lastProgramChangeTimbreName[TIMBRE_NAME_SIZE];
74 Bit32u displayResetTimestamp;
75 bool displayResetScheduled;
76 Bit32u midiMessageLEDResetTimestamp;
77 bool midiMessagePlayedSinceLastReset;
78 Bit32u rhythmStateResetTimestamp;
79 bool rhythmNotePlayedSinceLastReset;
81 DisplayBuffer displayBuffer;
82 DisplayBuffer customMessageBuffer;
84 void scheduleDisplayReset();
85 bool shouldResetTimer(Bit32u scheduledResetTimestamp);
86 void maybeResetTimer(
bool &timerState, Bit32u scheduledResetTimestamp);
91 #endif // #ifndef MT32EMU_DISPLAY_H
bool getDisplayState(char *targetBuffer, bool narrowLCD)