VOGONS


First post, by Karmeck

User metadata
Rank Member
Rank
Member

So my idea is to use the orginal lcd, in my case, from a Roland sc-50 (rcm2024t) with either Nuked-SC55 or 88emu.

A while ago I saw that Nuked-SC55 was downsized to work on raspberry pi 4.

My plan right now, befor I buy a pi, I'd to use a Arduino Nano with pins (one of then 5v, I'm told that is needed) and connect the orginal lcd, named rcm2024t, to the Arduino. Once that is up and running, my hope is, using the working code with an actual raspberry pi should be easy.

Now, I see that the code for the lcd is different, in realty I'm unsure what file needs to be modified to have the code ment for the emulated lcd, to be sent to the Arduino Nano and from there sent to the orginal lcd.

Currently only guessing with help of Gemini.

If anyone wanna chip in, this is the thread to do it.

Here is the current edits to this file https://github.com/dsp56300/gearmulator/blob/ … ds/sc880Lcd.cpp

I don't even know if it's the right file to edit. Did not have time to test it befor leaving for work.

Also, Nuked-SC55 seem to emulate the screen in a difrent way. Don't know what file to edit there.

I'm yet to receive my Roland sc-50.

#include "88lib/boards/sc880Lcd.h" #include <windows.h> #include <iostream> […]
Show full quote

#include "88lib/boards/sc880Lcd.h"
#include <windows.h>
#include <iostream>

namespace emu88Lib {
namespace
{
// Where each segment of a digit sits in a nibble: {line, bit} for a digit in the high nibble
// of its byte; a digit in the low nibble uses the bits four lower. Taken from the firmware's
// digit tables at 11:0EBC and 11:0EE4, and the only wiring that gives the standard shape for
// all ten digits. The eighth bit, line 1 bit 4, is cleared by every digit write; it is
// taken as the decimal point.
struct SegmentBit { uint8_t line; uint8_t bit; };
constexpr SegmentBit g_segmentBits[8] = {
{0, 7}, // a
{0, 4}, // b
{0, 5}, // c
{1, 5}, // d
{1, 6}, // e
{1, 7}, // f
{0, 6}, // g
{1, 4}, // point
};

// The 25 digits, left to right, as the byte column and nibble that drives them (shift 0 = high
// nibble, 4 = low, 0xff = never driven by the firmware). The part display A, 0, 1 is slots 2-4
// with two dark digits before it. The seven mode "o" digits are the nibbles the firmware lights
// for the lamps, one under each printed label, three digits apart and ending on the 25th; the
// slots in between are not known to carry anything. Checked against a photograph with every
// digit's segment marked.
struct DigitNibble { uint8_t column; uint8_t shift; };
constexpr DigitNibble g_digits[Sc880Lcd::StripDigits] = {
{1, 0}, {1, 4},
{2, 0}, {2, 4}, {3, 0}, // part: group letter, tens, ones
{4, 4}, {5, 0}, {5, 4}, // PERF
{6, 0}, {6, 4}, {7, 0}, // PATCH
{8, 4}, {9, 0}, {8, 0}, // TONE
{10, 0}, {10, 4}, {11, 0}, // RHY
{12, 4}, {13, 0}, {13, 4}, // M-FX
{14, 0}, {14, 4}, {15, 0}, // SYS
{15, 4}, {16, 0}, // UTIL
};

// ---------------------------------------------------------
// ARDUINO SERIAL BRIDGE GLOBALS
// ---------------------------------------------------------
HANDLE hComm = INVALID_HANDLE_VALUE;
bool serial_initialized = false;

void init_arduino_serial() {
if (serial_initialized) return;

// VIKTIGT: Kontrollera att COM3 är rätt port för din Arduino!
hComm = CreateFileA("\\\\.\\COM3", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);

if (hComm != INVALID_HANDLE_VALUE) {
DCB dcbSerialParams = {0};
dcbSerialParams.DCBlength = sizeof(dcbSerialParams);
GetCommState(hComm, &dcbSerialParams);
dcbSerialParams.BaudRate = CBR_115200;
dcbSerialParams.ByteSize = 8;
dcbSerialParams.StopBits = ONESTOPBIT;
dcbSerialParams.Parity = NOPARITY;
SetCommState(hComm, &dcbSerialParams);
std::cout << "Arduino Bridge: Ansluten på COM-porten." << std::endl;
serial_initialized = true;
} else {
std::cerr << "Arduino Bridge VARNING: Kunde inte ansluta till Arduinon." << std::endl;
}
}

void send_to_arduino(uint8_t rs, uint8_t lcd_data) {
if (hComm != INVALID_HANDLE_VALUE) {
uint8_t buffer[2];
buffer[0] = rs;
buffer[1] = lcd_data;

DWORD bytesWritten;
WriteFile(hComm, buffer, 2, &bytesWritten, NULL);
}
}
// ---------------------------------------------------------
}

void Sc880Lcd::reset()
{
// Starta upp COM-porten när LCD:n initieras
init_arduino_serial();

m_ram.fill(0);
m_column = 0;
m_line = 0;
m_contrast = 0;
m_initialised = false;
}

void Sc880Lcd::writeInstruction(const uint8_t _instr)
{
m_initialised = true;
if(_instr >= 0xe0)
m_contrast = _instr & 0x1f;
else if(_instr >= 0x80)
m_line = _instr & 0x3f;
else if(_instr >= 0x20 && _instr < 0x40)
m_column = _instr & 0x1f;

// Skicka instruktionen (Kommando, RS = 0) till Arduinon
send_to_arduino(0, _instr);
}

void Sc880Lcd::writeData(const uint8_t _data)
{
m_ram[m_line * Columns + m_column] = _data;
m_line = (m_line + 1) & (Lines - 1);

// Skicka datan (Data, RS = 1) till Arduinon
send_to_arduino(1, _data);
}

void Sc880Lcd::renderMono(std::vector<uint8_t>& _output, std::array<uint8_t, 25>& _dseg) const
{
_output.assign(Width * Height, 0);
for(uint32_t y = 0; y < Height; ++y)
{
for(uint32_t x = 0; x < Width; ++x)
_output[y * Width + x] = (m_ram[(y + 2) * Columns + x / 8] >> (7 - x % 😎) & 1;
}
for(uint32_t i = 0; i < Sc880Lcd::StripDigits; ++i)
{
const auto& digit = g_digits;
if(digit.shift == 0xff)
continue;
uint8_t segments = 0;
for(uint32_t s = 0; s < 8; ++s)
{
const auto [line, bit] = g_segmentBits;
if(stripBit(line, digit.column, bit - digit.shift))
segments |= static_cast<uint8_t>(1u << s);
}
_dseg = segments;
}
}
}



After this is done, I think it could be possible to do this all in reverse, to use original hardware with an oled display. To have a raspberry pi zero just emulate the lcd with data sent from original hardware. That would need even more coding though.

Last edited by Karmeck on 2026-11-16, 17:08. Edited 1 time in total.

Reply 1 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

So scratch that file. Let's go to Nuked-SC55 directly.

There is a file there named LCD.cpp

I'm hoping that is the correct file.

Reply 2 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

We have blinking lights (on the Arduino nano). I include the edited lcd.cpp

So its something. My Roland Sc-50 (yes 50) is in the mail, so I will soon have a screen to test with.

https://share.gemini.google/qvfp0shZXOEv

Sadly I made the mistake to have the conversation in Swedish, but towards the end (for now) is where the lcd file is being edited.

Reply 3 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

Now to find the correct order to connect the lcd to the pins on the Arduino nano, they will probably not be labeled on the LCD connector.

Reply 4 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

Some additional hardware is on it's way.

And one has arrived.

Now to get those cables out.

Reply 5 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

Initially I connected one of the gnd wrong but that was figured out eventually. And now it hurt works.

This is with Nuked-SC55. Now to make it work with 88emu, that lcd code was not as obvious.

What I do not appreciate is when people (my boss currently) are not honest in how they crated somthing. The code is 100% ai. I once again understand just what I want, kinda why and how it should work. But I can't code, I don't even know what text or book I should read to apply that knowledge here.

Most of what you need can be found in this thread. I will crate a more comprehensive guide later.

Here are the instructions for connecting the pins, I did not use a potentiometer.

Roland SC-55 / SC-50 LCD (RCM2024T) to Arduino Nano Wiring
The RCM2024T display uses a standard 14-pin parallel HD44780-compatible interface. Pin 1 is identified by the white stripe running along the edge of the 14-wire ribbon cable (corresponding to pin 1 at connector CN9 on the Roland PCB).
| LCD Pin ------| LCD Signal -------| Arduino Nano Pin------| Notes |
|-------------|----------------|--------------------|------|

| 1------------ | D_GND ---------| GND ---------------| Wire with the white stripe on the ribbon cable |

| 2 ------------| VCC------------ | 5V ----------------| +5V power supply |

| 3 -----------| LCD CONT --------| GND (or Potentiometer)| Connect directly to GND for full contrast, or via a 10 kΩ potentiometer / ~1 kΩ resistor to GND |

| 4 -----------| RS---------------| D2----------------| Register Select (Command / Data) |

| 5------------| R/W ------------ | GND ---------------| Tied to GND for write-only operation |

| 6 -----------| E ---------------| D3 ----------------| Enable strobe |

| 7------------| LCD D0 ----------| D4 ----------------| Data bit 0 |
| 8 -----------| LCD D1-----------| D5 -----------------| Data bit 1 |
| 9 -----------| LCD D2-----------| D6---------------- | Data bit 2 |
| 10-----------| LCD D3 ----------| D7 -----------------| Data bit 3 |
| 11-----------| LCD D4-----------| D8 -----------------| Data bit 4 |
| 12-----------| LCD D5--------- --| D9----------------| Data bit 5 |
| 13-----------| LCD D6----------| D10 -----------------| Data bit 6 |
| 14 -----------| LCD D7----------| D11-----------------| Data bit 7 |

* Common Ground: Pins 1, 3, and 5 all connect to the same common ground plane and can be distributed freely across any available GND pins on the Arduino Nano.
* Bus Mode: This mapping runs the display in 8-bit parallel mode (D0–D7 wired sequentially to D4–D11).

Here is the code for the arduino nano, make sure the Com port is correct, you will get the Com port number befor you upload the code, when you chose what device to upload the code to.

const int RS_PIN = 2;
const int E_PIN = 3;
const int DATA_START = 4; // D4 till D11 motsvarar D0 till D7

void writeBus(byte rs, byte data) {
digitalWrite(RS_PIN, rs);
for (int i = 0; i < 8; i++) {
digitalWrite(DATA_START + i, (data >> i) & 0x01);
}
digitalWrite(E_PIN, HIGH);
delayMicroseconds(2);
digitalWrite(E_PIN, LOW);
delayMicroseconds(37);
}

void setup() {
Serial.begin(115200);
pinMode(RS_PIN, OUTPUT);
pinMode(E_PIN, OUTPUT);
for (int i = 0; i < 8; i++) {
pinMode(DATA_START + i, OUTPUT);
}

// Vänta tills spänningen stabiliserats efter omstart
delay(100);

// 3-stegs mjukvaruåterställning enligt HD44780-specifikationen
writeBus(LOW, 0x30);
delay(5);
writeBus(LOW, 0x30);
delayMicroseconds(200);
writeBus(LOW, 0x30);
delayMicroseconds(200);

// Grundkonfiguration för RCM2024T (8-bitarsläge, 2 rader, display PÅ)
writeBus(LOW, 0x38);
writeBus(LOW, 0x0C);
writeBus(LOW, 0x01);
delay(3);
writeBus(LOW, 0x06);
}

void loop() {
if (Serial.available() >= 2) {
byte rs = Serial.read();

// Synkroniseringsskydd: RS får bara vara 0 (kommando) eller 1 (data).
// Om en byte tappas under Arduinons uppstart hoppar vi över den för att hamna i takt.
if (rs > 1) {
return;
}

byte data = Serial.read();
writeBus(rs, data);

// Clear Display (0x01) och Return Home (0x02) kräver extra exekveringstid
if (rs == 0 && (data == 0x01 || data == 0x02)) {
delayMicroseconds(1600);
}
}
}

Last edited by Karmeck on 2026-11-16, 16:49. Edited 2 times in total.

Reply 6 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

with this code for arduino, you can conect pin 5 to D12 on:

const int RS_PIN = 2;
const int E_PIN = 3;
const int DATA_START = 4; // D4 till D11 motsvarar D0 till D7

void writeBus(byte rs, byte data) {
digitalWrite(RS_PIN, rs);
for (int i = 0; i < 8; i++) {
digitalWrite(DATA_START + i, (data >> i) & 0x01);
}
digitalWrite(E_PIN, HIGH);
delayMicroseconds(2);
digitalWrite(E_PIN, LOW);
delayMicroseconds(37);
}

void setup() {
pinMode(12, OUTPUT);
digitalWrite(12, LOW);
Serial.begin(115200);
pinMode(RS_PIN, OUTPUT);
pinMode(E_PIN, OUTPUT);
for (int i = 0; i < 8; i++) {
pinMode(DATA_START + i, OUTPUT);
}

// Vänta tills spänningen stabiliserats efter omstart
delay(100);

// 3-stegs mjukvaruåterställning enligt HD44780-specifikationen
writeBus(LOW, 0x30);
delay(5);
writeBus(LOW, 0x30);
delayMicroseconds(200);
writeBus(LOW, 0x30);
delayMicroseconds(200);

// Grundkonfiguration för RCM2024T (8-bitarsläge, 2 rader, display PÅ)
writeBus(LOW, 0x38);
writeBus(LOW, 0x0C);
writeBus(LOW, 0x01);
delay(3);
writeBus(LOW, 0x06);
}

void loop() {
if (Serial.available() >= 2) {
byte rs = Serial.read();

// Synkroniseringsskydd: RS får bara vara 0 (kommando) eller 1 (data).
// Om en byte tappas under Arduinons uppstart hoppar vi över den för att hamna i takt.
if (rs > 1) {
return;
}

byte data = Serial.read();
writeBus(rs, data);

// Clear Display (0x01) och Return Home (0x02) kräver extra exekveringstid
if (rs == 0 && (data == 0x01 || data == 0x02)) {
delayMicroseconds(1600);
}
}
}

Reply 7 of 10, by Karmeck

User metadata
Rank Member
Rank
Member

updated files for use with 88emu

you need to clone the repository, as just downloading the source zip don't include all the files, because reason.

Search the two files and replace them and compile. I used msys mingw64

obviously you have to change the path you cd in to

cd /c/88emu/gearmulator-src
cmake --build build --config Release --target 88emuplayer_Standalone --parallel

everything from sc-55 up to sc-88pro works.

Reply 8 of 10, by Ishisashi

User metadata
Rank Newbie
Rank
Newbie
Karmeck wrote on 2026-11-16, 20:52:

Search the two files and replace them and compile. I used msys mingw64

MinGW? Gearmulator doesn’t currently support MinGW, although I recently submitted a PR that enables it to compile successfully with MinGW.

Reply 9 of 10, by Karmeck

User metadata
Rank Member
Rank
Member
Ishisashi wrote on 2026-11-18, 04:17:
Karmeck wrote on 2026-11-16, 20:52:

Search the two files and replace them and compile. I used msys mingw64

MinGW? Gearmulator doesn’t currently support MinGW, although I recently submitted a PR that enables it to compile successfully with MinGW.

Can look in to what I did, but I vaguely remember that the, wait, I can just continue to slop here, I just ask the Ai how it solved that fact. As I do not understand it.

Here is a clear, technical explanation in English that you can copy and share directly:

I didn't actually compile the C++ code with the MinGW64 GCC toolchain—I only used the MSYS2 shell as a convenient terminal environment while driving the native Microsoft Visual C++ (MSVC / MSBuild) compiler under the hood.
Specifically, here is how it was set up:

* MSVC CMake Generator: When configuring the project with CMake inside the MSYS2 terminal, I explicitly targeted Visual Studio 2022 Build Tools (-G "Visual Studio 17 2022" -A x64) rather than a MinGW Makefile or Ninja/GCC generator.

* Native Windows Toolchain & SDK: Because CMake generated standard .vcxproj project files, cmake --build invoked MSBuild.exe using Microsoft's cl.exe compiler, the Windows SDK, and MSVC's C++ standard library—avoiding all the Win32 API, JUCE, and ASM/JIT incompatibilities that normally break a pure MinGW64 GCC build of Gearmulator.

* MSYS2 Used Only for CLI Tooling: MSYS2 simply provided bash, git, sed, grep, and python3 to inspect the source tree and apply patches cleanly before handing the actual compilation off to MSBuild.