-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Roland PG-1000: Added internal layout and complete driver implementation #14127
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
Conversation
felipesanches
commented
Sep 6, 2025

5b4f5aa
to
efbe742
Compare
It is possible I missed some detail, but your first commit seems to emulate all 4 midi ports correctly, based on the linked schematic and documentation. However, the MIDI_PORT declarations can be simplified a bit. Try |
It seems to me that using |
I've done the bulk of the work developing this driver and layout and it is now looking beautiful and working almost perfectly. The only one thing that still does not work are the MIDI ports (which is kind of essential for it to be useful, LOL) and I have no idea what's still missing to make it work. Not sure if I made some mistake in the MIDI description on the driver, or if the serial port support in the UPD78C10 core is not implemented correctly. I inspected a bit of it and it looks reasonable, though... I would appreciate if someone could take a look at it and give it the final touch to make it work, in case it is something simple. Otherwise, it would be wiser to simply merge it as is and then someday we'll end up figuring out how to fix it. But I personally feel that I have nothing else to add to it at this moment. Owners' manual explains that all messages received on its MIDI IN are replicated in its MIDI OUT and any parameter adjustments made on the sliders are also sent over MIDI OUT as sysex messages. So I tried The method of using |
I can't speak to the approach that uses separate Once that's set up, you could run your test, but log midi thru instead of midi out. If that works, then you at least know that the MIDI_PORT setup for midi in and thru, and your testing strategy, are sound. Edit: Also, consider initializing |
20fe1a1
to
8896838
Compare
Surely the more general solution would be to create a |
For now, I made it |
I've just fixed MIDI IN. Now every message received on MIDI IN is repeated to MIDI OUT, as the service manual describes as the expected normal behavior. |
8001e61
to
6c5f2c4
Compare
@cuavas, I believe this is now ready for your code-review. |
7956299
to
0fda49f
Compare
I've just git-squashed everything into a single commit and took the opportunity to re-read all my own code. I also cleaned up a few remaining white spaces. This is ready for review. It is almost perfectly functional. The only remaining issue is some bug related to the MIDI ports of this device. While playing with my piano and a real Roland D-550 I get some data corruption specially when using the sustain pedal. I am actively investigating the bug, and I suspect it can be some CPU bug (perhaps an incorrect or incomplete implementation of one of the upd7810 instructions used in the serial port code?) but it will take some further research & troubleshooting time and it is impossible for me to predict how long will it take until I can find the solution. I'd like to ask for this to be merged, keeping the If, for any reason, anyone is interested in the original commits, they're still available at https://github.com/felipesanches/mame/tree/roland_pg1000__original_set_of_commits |
0fda49f
to
7fc3536
Compare
I noticed today that I was getting INTER due to "framing error" (start and stop bits did not match expected values). And one of the reasons for that was because when both midi_in and param_in were disabled, the RXD pin was going low, causing a stream of zeroes into the RX shift register. This pin should instead be set to 5V (due to the pull-up resistor). Taking that into account on my driver, that source of framing errors (that was frequently happening when I used the sustain pedal) is gone: m_maincpu->rxd_func().set([this]() {
return int(
(m_mdin_bit && m_midi_in_enable) ||
(m_paramin_bit && m_param_in_enable) ||
(!m_midi_in_enable && !m_param_in_enable) /* due to pull-up */
);
}); But I still have something else causing a similar issue. From time to time I still get a framing error and I still don't know why. |
Thanks! |