Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add general support for implementation of emulated MT-32 LCD #66

Closed
sergm opened this issue Jul 4, 2021 · 0 comments
Closed

Add general support for implementation of emulated MT-32 LCD #66

sergm opened this issue Jul 4, 2021 · 0 comments

Comments

@sergm
Copy link
Member

sergm commented Jul 4, 2021

Currently, libmt32emu only provides limited possibility for a consumer application to implement an emulated MT-32 LCD. There are several pretty low-level callbacks in ReportHandler class available, so that rather a good knowledge of MT-32 internals is required to facilitate emulation of the MT-32 LCD further.

Instead, the library shall hide the complexity from the consumer application by providing a few high-level easy-to-use functions and callbacks, as well as implementing a good deal of common code that is specific to MT-32 LCD.

From the functional PoV, the library shall:

  • largely emulate the internal state of the MT-32 LCD unit (leaving aside some minor detail like usage of certain special characters, cursor blinking, etc.);
  • provide access to the text representation of the current state of the emulated LCD for the consumer application;
  • notify the consumer application about each change of the LCD state.

Providing a function for rendering the text representation of the LCD state to some graphical format does not seem feasible and reasonable due to variety of available LCD hardware implementations, yet the widely used facilities of communication with the hardware LCDs like LCD Smartie and lcdproc currently foresee displaying textual data only via their standard API.

@sergm sergm added this to the libmt32emu_2_6 milestone Jul 4, 2021
@sergm sergm self-assigned this Jul 4, 2021
sergm added a commit that referenced this issue Dec 12, 2021
- Introduced display emulation support in mt32emu library itself.
  The startup banner and the SysEx checksum error are now shown. We now
  also take care of the control ROM version to emulate the most prominent
  quirks.
- The new API includes a function for retrieving the current display state
  and a function to reset the display to the Master Volume mode.
- The interface ReportHandler has been extended to provide callbacks to get
  notified about changes in display state.
- Additionally, there is a limited support for displaying the emulated LCD
  on narrow hardware LCDs that have width of 16 characters only.
sergm added a commit that referenced this issue Dec 12, 2021
- Simplified class SynthStateMonitor which no longer implements the low-
  level details (except rendering of characters).
- Refactored the old LCD rendering code to use named constants and some
  better suited Qt API.
- Improved layout and rendering of LCDWidget to fit all available space.
  The rendering model is now upscaled by factor 4, so it still works with
  integers but permits an arbitrary gap between the pixels.
- Enabled anti-aliasing rendering hint, so that the LCD looks nicer
  if the underlying painting system supports that, yet still looks OK
  otherwise. The only missing bit is the glowing effect; sadly it is
  burred into QML and absent in C++ API of Qt5.
- Clicking on the LCDWidget now resets it to the main (Master Volume) mode.
- The built-in LCD font has been reworked as well to closely match
  the specification of SED1200D-OA and screenshots of a real device,
  available @ #64 (comment)
@sergm sergm closed this as completed Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant