Getting started on the UI

A project log for OPL2 / OPL3 MIDI Interface and Controller

a MIDI interface for the OPL2 Audio Board and OPL3 Duo!

Maarten JanssenMaarten Janssen 02/12/2021 at 13:530 Comments

The UI is going to be my own design and it's going to look like something you could find on a classic DOS / Windows PC in the early 90s. It should fit the era where these OPL2 / OPL3 chips were commonly used. To have full control over the UI and especially the memory it will consume I'm writing it from scratch. It's a big task, but I plenty of experience in this area and already so I'm confident that I can pull it off!

After a few evenings of writing code I'm already very happy with the results. I can draw some UI elements such as text labels, buttons, spinners and windows. All are drawn using a lovely EGA palette to look appropriate for the early 90s PC era. I also wrote some functions that allow me to fill rectangles with a pattern to dither the colors and made a custom font.

The biggest hurdle up to now has been the touch screen. The coordinates that you read from the interface can be very erratic, even after calibrating the stylus. To get a reliable reading from the touch screen I'm taking the average of multiple readings of the touch position. I've added a little piezo speaker to make little clicking noises when you press a button.

Currently I'm at a stage where I'm playing around with the UI. Building mock up screens to test the few components that I've already written such as buttons and spinners and the events they generate.