GithubHelp home page GithubHelp logo

nukeykt / nuked-sc55 Goto Github PK

View Code? Open in Web Editor NEW
307.0 32.0 32.0 5.9 MB

Roland SC-55 series emulation

License: Other

CMake 3.51% C++ 82.23% C 14.27%
roland scc1 cm300 roland-sc55 sc55 sc55mk1 sc55mk2 sc55st scb55 sound-canvas

nuked-sc55's Introduction

Nuked SC-55

Roland SC-55 emulator, by nukeykt.

Supported models:

  • SC-55mk2/SC-155mk2 (v1.01 firmware is confirmed to work)
  • SC-55mk1 (v1.21/v2.0 firmwares are confirmed to work)
  • CM-300/SCC-1 (v1.10/v1.20 firmwares are confirmed to work)
  • SC-55st (v1.01)
  • JV-880 (v1.0.0/v1.0.1)
  • SCB-55/RLP-3194
  • RLP-3237
  • SC-155

Special thanks:

  • John McMaster: SC-55 PCM chip decap.
  • org/ogamespec: deroute tool.
  • SDL team.
  • Wohlstand: linux/macos port.
  • mattw.
  • HardWareMan.
  • giulioz: JV-880 support

License

Nuked SC-55 can be distributed and used under the original MAME license (see LICENSE file). Non-commercial license was chosen to prevent making and selling SC-55 emulation boxes using (or around) this code, as well as preventing from using it in the commercial music production.

Status

3 ICs are needed to be emulated:

  • Roland PCM chip
  • Hitachi H8/532 MCU
  • Mitsubishi M37450M2 MCU

MCUs are emulated using info from their datasheets. PCM chip info is derived from analyzing decapped chip.

PCM chip tracing progress

pcm_tracing.jpg

MCU emulation progress

mcu1.png

mcu2.png

Install

Put firmware image into the same folder as Nuked SC-55. Files should be names as such:

SC-55mk2/SC-155mk2 (v1.01):
R15199858 (H8/532 mcu) -> rom1.bin
R00233567 (H8/532 extra code) -> rom2.bin
R15199880 (M37450M2 mcu) -> rom_sm.bin
R15209359 (WAVE 16M) -> waverom1.bin
R15279813 (WAVE 8M) -> waverom2.bin

SC-55st (v1.01):
R15199858 (H8/532 mcu) -> rom1.bin
R00561413 (H8/532 extra code) -> rom2_st.bin
R15199880 (M37450M2 mcu) -> rom_sm.bin
R15209359 (WAVE 16M) -> waverom1.bin
R15279813 (WAVE 8M) -> waverom2.bin

SC-55 (v1.21):
R15199778 (H8/532 mcu) -> sc55_rom1.bin
R15209363 (H8/532 extra code) -> sc55_rom2.bin
R15209276 (WAVE A) -> sc55_waverom1.bin
R15209277 (WAVE B) -> sc55_waverom2.bin
R15209281 (WAVE C) -> sc55_waverom3.bin

SC-55 (v2.0):
R15199799 (H8/532 mcu) -> sc55_rom1.bin
R15209387 (H8/532 extra code) -> sc55_rom2.bin
R15209276 (WAVE A) -> sc55_waverom1.bin
R15209277 (WAVE B) -> sc55_waverom2.bin
R15209281 (WAVE C) -> sc55_waverom3.bin

CM-300/SCC-1 (v1.10):
R15199774 (H8/532 mcu) -> cm300_rom1.bin
R15279809 (H8/532 extra code) -> cm300_rom2.bin
R15279806 (WAVE A) -> cm300_waverom1.bin
R15279807 (WAVE B) -> cm300_waverom2.bin
R15279808 (WAVE C) -> cm300_waverom3.bin

CM-300/SCC-1 (v1.20):
R15199774 (H8/532 mcu) -> cm300_rom1.bin
R15279812 (H8/532 extra code) -> cm300_rom2.bin
R15279806 (WAVE A) -> cm300_waverom1.bin
R15279807 (WAVE B) -> cm300_waverom2.bin
R15279808 (WAVE C) -> cm300_waverom3.bin

JV-880 (v1.0.0):
R15199810 (H8/532 mcu) -> jv880_rom1.bin
R15209386 (H8/532 extra code) -> jv880_rom2.bin
R15209312 (WAVE A) -> jv880_waverom1.bin
R15209313 (WAVE B) -> jv880_waverom2.bin
PCM Cards -> jv880_waverom_pcmcard.bin (optional)
Expansion PCBs -> jv880_waverom_expansion.bin (optional)

SCB-55/RLP-3194:
R15199827 (H8/532 mcu) -> scb55_rom1.bin
R15279828 (H8/532 extra code) -> scb55_rom2.bin
R15209359 (WAVE 16M) -> scb55_waverom1.bin
R15279813 (WAVE 8M) -> scb55_waverom2.bin

RLP-3237:
R15199827 (H8/532 mcu) -> rlp3237_rom1.bin
R15209486 (H8/532 extra code) -> rlp3237_rom2.bin
R15279824 (WAVE 16M) -> rlp3237_waverom1.bin

SC-155 (rev 1):
R15199799 (H8/532 mcu) -> sc155_rom1.bin
R15209361 (H8/532 extra code) -> sc155_rom2.bin
R15209276 (WAVE A) -> sc155_waverom1.bin
R15209277 (WAVE B) -> sc155_waverom2.bin
R15209281 (WAVE C) -> sc155_waverom3.bin

SC-155 (rev 2):
R15199799 (H8/532 mcu) -> sc155_rom1.bin
R15209400 (H8/532 extra code) -> sc155_rom2.bin
R15209276 (WAVE A) -> sc155_waverom1.bin
R15209277 (WAVE B) -> sc155_waverom2.bin
R15209281 (WAVE C) -> sc155_waverom3.bin

Additional info

  • Nuked SC-55 will listen to the specified MIDI IN port (default is port 0). Use -p:<port_number> command line argument to specify port number. To use it with the other applications use external MIDI pipe software (e.g. loopMIDI).

  • SC-55mk2/SC-55mk1 buttons are mapped as such (currently hardcoded):

Q -> POWER
W -> INST ALL
E -> INST MUTE
R -> PART L
T -> PART R
Y -> INST L
U -> INST R
I -> KEY SHIFT L
O -> KEY SHIFT R
P -> LEVEL L
LEFTBRACKET  -> LEVEL R
A -> MIDI CH L
S -> MIDI CH R
D -> PAN L
F -> PAN R
G -> REVERB L
H -> REVERB R
J -> CHORUS L
K -> CHORUS R
LEFT -> PART L
RIGHT -> PART R
  • JV-880 buttons are mapped as such (currently hardcoded):
P -> PREVIEW
LEFT -> CURSOR L
RIGHT -> CURSOR R
TAB -> DATA
Q -> TONE_SELECT
A -> PATCH_PERFORM
W -> EDIT
E -> SYSTEM
R -> RHYTHM
T -> UTILITY
S -> MUTE
D -> MONITOR
F -> COMPARE
G -> ENTER
COMMA -> ENCODER L
PERIOD -> ENCODER R
  • -mk2, -st, -mk1, -cm300, -jv880, -scb55, -rlp3237, -sc155 and -sc155mk2 command line arguments can be used to specify rom set. If no model is specified emulator will try to autodetect rom set (based on file names).

  • Due to a bug in the SC-55mk2's firmware, some parameters don't reset properly on startup. Do GM, GS or MT-32 reset using buttons to fix this issue.

  • SC-155 doesn't reset properly on startup (firmware bug?), use Init All option to workaround this issue.

  • SC-155's additional buttons/sliders are not emulated at the moment. They will be emulated in the future after proper GUI is implemented.

nuked-sc55's People

Contributors

falcosoft avatar giulioz avatar myon98 avatar ne3i avatar nikitalita avatar nukeykt avatar pachuco avatar unbeatwatergh avatar wohlstand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuked-sc55's Issues

Splash Cymbal produces harsh static when TVF Cutoff Frequency is set to +9 or higher

For some reason, playing the Splash Cymbal on a drum channel while the channel's TVF Cutoff Frequency is set to +9 or higher produces a harsh static sound.

Below is a comparison between my hardware SC-55mkII and Nuked SC-55. In both recordings, the Splash Cymbal is played with a cutoff of 0, then again with a cutoff of +9.

Real SC-55mkII:
Splash Cymbal on SC-55mkII.webm

Nuked SC-55 (LOUDNESS WARNING):
Splash Cymbal on Nuked SC-55.webm

Here's a ZIP file containing the MIDI (since GitHub won't let me upload the raw .mid file) used in both recordings:
SplashCymbalCutoffBug.zip

Using the real lcd as a display.

So I just got a sc-55 mk1. And wonder, could the lcd on here be used by the emulator?
Now I see that replacement lcds are not hard to come by, so testing this would not mean I have to rip out my own.

I guess the real/first question is, does the emulator emulate outputting information to a lcd?

SCC-1A and SCC-1B Support?

So does the recent support of the SCC-1 ROMs also encompass the SCC-1A and SCC-1B variants? Or is that still yet to be done?

Emulating the stairstepping of the original DACs

This is something that may not be able to be satisfactorily accomplished with a software implementation, and likely not relevant to anyone but the nerdiest of audiophile nerds, but I thought I'd mention it:

The original DACs for these devices (NEC UPD63200 and the NEC UPD6376) did stair-stepping for the output:

image
(logic analyzer traces from the DAC on a SC-55mk2; digital PCM input on top, DAC analog output on the bottom)

This is unlike modern DACs, which interpolate between samples for nice smooth waveforms. So, the audio output of a real SC-55 would sound a bit crunchier than the audio output of this emulator going through a modern DAC.

One option that I can think of that might be able to be done in a software implementation to emulate this behavior would be to resample to a much higher sample rate (like 384k) and ensure that the samples are just straight up copied instead of interpolated.
Of course, this would only be an option if the user had a sound card that supported high sample rates, and we would still have to deal with the weird sample rate (66.207khz) of the mk2 by interpolating the bare minimum amount of samples to get it to an integer ratio with the higher sample rate.
Anyone else have ideas or suggestions on this?

Hangs with a frozen window, doesn't respond to any signal other than SIGKILL

I'm on Void Linux, kernel 6.6.25_1 with GCC 13.2.0 and SDL2 2.30.1

I'm not sure what I'm doing wrong. It builds, I get lots of compiler warnings but no errors.

It also requests way too small a buffer causing PipeWire to use a excessive amount of CPU, I tried adjusting audio_page_size but the emulator just brings up a window with the "contents" of what was behind the screen when the window comes up and the emulator just uses a lot of CPU and seemingly does nothing.

All I get on the terminal is this:

$ ./nuked-sc55 
Base path is: ./nuked-sc55
Audio Requested: F=S16LSB, C=2, R=66207, B=1024
Audio Actual: F=S16LSB, C=2, R=66207, B=1024
Unknown write e400 4
Unknown write e403 1
Unknown write e406 0
Unknown write e407 0
Unknown write e406 40
Unknown write e403 1
Killed

Are these ROMs bad?

 32K Dec 24  1996 rom1.bin
512K Dec 24  1996 rom2.bin
4.0K Dec 24  1996 rom_sm.bin
2.0M Dec 24  1996 waverom1.bin
1.0M Dec 24  1996 waverom2.bin

8a1eb33c7599b746c0c50283e4349a1bb1773b5c0ec0e9661219bf6c067d2042  ./rom1.bin
a4c9fd821059054c7e7681d61f49ce6f42ed2fe407a7ec1ba0dfdc9722582ce0  ./rom2.bin
b0b5f865a403f7308b4be8d0ed3ba2ed1c22db881b8a8326769dea222f6431d8  ./rom_sm.bin
c6429e21b9b3a02fbd68ef0b2053668433bee0bccd537a71841bc70b8874243b  ./waverom1.bin
5b753f6cef4cfc7fcafe1430fecbb94a739b874e55356246a46abe24097ee491  ./waverom2.bin

SC-88 compatibility in the future?

Hello!

I saw a commit that hinted a WIP of the CM-300 synthesizer. Then I was wondering if adding the Roland SC-88 in the future would also be a possibility/on the roadmap of this project? Or is it out of scope? Just wanting to know.

Cheers!
MetalMaxMX

Resizable Window

Would it be possible to make the window resizable. It's a bit on the large size :)

Optimization?

As it stands right now, Nuked SC-55 uses 15% of my i5 9600K CPU while idle and the MIDI playback will slow briefly whenever there's a usage spike. Is there still room for optimization while still maintaining accurate sound reproduction?

Drum NRPN messages not processed correctly

Attached MIDI file uses NRPN (controllers 99, 98, 6) to change the parameters of the drum map, in particular, the reverb. These do not seem to be processed correctly. I have attached a recording from my Roland SC-55mkII to show how it's supposed to sound.

This may or may not be linked to issue #20.
12th.zip

Errors when using in Anvil Studio

When using Nuked-SC55 in Anvil studio I get the following error: 
image

Also, loopMIDI automatically mutes the port and I get this error notification:
image

This issue happens on version 0.2.0-hotfix2

[Suggestion] Attempt to “emulate” installed battery by saving and loading on exit and load, if possible

I figure that, if it’s somehow possible to make the emulator see there’s a battery installed, as well as saving and loading the emulated SC-55’s RAM on program exit and program load respectively, maybe that would get rid of the whole “you need to reset the MIDI module” thing as is the case right now, where it always boots into a buggy state if it hasn’t loaded yet, plus it might get rid of the “no battery” warning that pops up when it loads. It may just be saving and loading emu state that would be the fixer for that.

Hide Console Option

I think it might be better to only have the console enabled if a debug mode option is enabled, or something similar.

Program Icon Proposals

I made a few icons that you're welcome to use in future releases and such. Thoughts?

Full size:
icon_fullsize

64x64:
icon_64x64

32x32:
icon_32x32

32x32 (alternative):
icon_32x32_alt

16x16:
icon_16x16

Add native Linux support

I'm not expecting it to be easy, but using SDL helps enable a possible Linux build, and I would be very grateful for it.

Weird reverb style

The default reverb type is weird and kind of crappy. Is there a way to change it to let's say, Hall2?

SysEx drum pitch writes cause a "DT1 Data Error" message with no change to drum pitch

As the title states, any SysEx drum pitch writes cause a "DT1 Data Error" message with no actual change to drum pitches. On hardware, there is no error messages and the drum pitch is changed accordingly. This issue does not affect NRPN-based drum pitch writes.

Example: Sending the SysEx message F0 41 10 42 12 41 01 26 48 50 F7 to the SC-55mkII changes the pitch of the acoustic snare drum (MIDI note 26h) to be higher. Nuked-SC55 only results in the aforementioned "DT1 Data Error" without any pitch change occuring.

Linux JACK support

Seems that starting this on Linux defaults to PulseAudio. Is there a way for the emulator to output to JACK instead?

Pitch issue

When I use the emulator, MIDIs sound low-pitched. To clarify, I use loopmidi as a MIDI port for it, so maybe that's the problem.

Auto-reset on start

If the reset bug isn't able to be fixed or will take a while, I'd suggest implementing a sort of auto-reset command (mimicking the keys that need to be input like they do currently) for when the emulator is initialized.

Save SRAM

I tried Write out SRAM when exiting, load it when starting, and settings remains preserved. It seems like there's no need to reset it every start, right?

proposal to make standalone library and add multi-instance capability

It would be desirable to have a standalone version of the emulator that doesn't rely on the SDL library, which would make it easier to integrate into many projects. The emulator should also allow multiple instances to run in a single process.
For example, the prototype for MCU_Init would be changed from "void MCU_Init(void)" to "void MCU_Init(mcu_t *mcu)". I would do a pull request myself, however I hesitate as this project is in an early stage of development.

[Suggestion] Customize output

Since the current output of Nuked-SC55 is 18-bit, which gives a bit of background noise, I propose to add an CL option to customize output.

Outputting MIDIs to WAV/MP3 possible?

I don't know if it's exactly out of scope but if possible, I think a feature to take MIDIs and output them to WAV files would be nice, since I tend to put together a bunch of converted MIDIs for livestreams and videos.

rom situation

Where do people get these roms from? its not like easy getting all of those.

license issue

Hi there,

is there any reason why you chose to license this fine piece of software under the now outdated original MAME license? As it is now, due to this license this software fails to meet the requirements of both the OSI's as well as the FSF's definition of free software and is thus non-free. That is, there is currently no way to integrate it into Linux distributions such as Debian or into other free software projects such as Doom source ports (which are often licensed under the GNU GPL, which forbids adding license terms which impose further restrictions).

Since March 2016, with version 0.172, MAME itself switched to common free software licenses, namely the BSD-3-Clause license and the GPL-2+ license. Would you mind following suit and consider a license switch as well?

Thanks!

  • Fabian

Enhancement: options to force gm to gs reset and capital tone fallback.

While these are not very accurate to the real hardware, they will be useful for playing back broken midis.

basically i want the sc-55 mkII in forced gs mode with capital tone fallback, because it has more instruments.

Most non sound canvas synths that people may have had when working on midi files on their computers that have gs instrument variations always make them available, even after a GM reset, and they are of course broken on a real sound canvas.

Of course it should not be on by default, but this would probably be much appreciated by people trying to play back midi files that don't have a sequencer handy to fix them up. :)

Weird ringing in sound

I do not have an actual SC55 to confirm this, but there is a strange high pitched ringing in the sound, as if interpolation is borked.

I've attached two files in this zip. The one with _hp suffix is filtered in audio editor to isolate the perceived flaw.
The other one is plain recording.

ringadingadingdong.zip

Platform is xp sp3 x86.

Program only accepts 1 command line argument

Currently, it seems like only the first command line argument given the program is actually used, and any additional arguments are ignored. This makes it impossible to select both a MIDI input port and ROM set at the same time.

Image demonstrating the issue.

Windows "default" Midi In port problem

Hi,
Actually on Windows there is no such thing as "default" Midi In port in the sense that you can select one in any way.
Contrary to Midi Out ports where originally there was a built-in Midi mapper until Win 8 (and Coolsoft Midi Mapper on Win8+) to select the default Midi Out port there is no way (and never was) to select default Midi In port.
Currently Nuked-SC55 always opens port 0 that can be a hardware port if you have a soundcard with hardware Midi In capabilities.
It does not matter if you install LoopMidi or any other software loopback cables in such a system Midi In port 0 remains a hardware port.
In such systems this recommendation from the Readme does not work:

to use it with the other applications use external MIDI pipe software (e.g. loopMIDI).

So it would be helpful if the Midi In port to be opened could be set some way (config file etc.)

image

Start in Tray

I think it would be a good idea to have an option to allow the program to start in the system tray, allowing for a more silent launch on start up.

Possible DC offset issue with reverse play

This is present in the JV-880 as it supports waveform reverse playback, dunno if the SC55 does that as well. When playing those tones, some DC offset accumulates which eventually leads to clipping. You can notice it in the second demo song.

image

To repro it it's enough to initialize a default patch (from the utility menu) and select a reverse tone like this one:
image

How did you dump the internal rom off of the MCUs?

I had tried to do this a while back by attempting to modify the control rom to dump the contents of the internal MCU ROM during a DUMP ALL INSTRUMENTS command through the MIDI out port, but I could never get it to work.

a few small problem's and possible feature?

Hello! when using something like virtual audio cable, it causes alot of latency lag, and if not using with that it plays fine.
could there be option to adjust what midi cable it can be routed to? along with option to record audio out from it on reducing lag.

combine 2 emus to increase polyphony

could you make this emu combine 2 emus to increase polyphony?

I have read that there are games that play more instruments at once than this module can play so some instruments are just like muted.

Fix `cmake build` issue on Raspbian

Hi, I have been successfully built and installed the emulator onto my Raspbian. However, it needs a minor fix in order to make the cmake build works. The emulator could start on my Raspberry Pi 3, but I feel my Pi 3 is too slow for the emulation. Actual functionalities are not tested.

Symptom

$ cmake --build .
/usr/bin/ld: libRtMidi.a(RtMidi.cpp.o): undefined reference to symbol 'pthread_create@@GLIBC_2.4'
/usr/bin/ld: /lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/nuked-sc55.dir/build.make:225: nuked-sc55] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/nuked-sc55.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2

Platform

$ lsb_release -a
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Solution

Add the following line to the CMakeLists.txt and it compiles successfully.

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

Is possible to emulate SC-155?

sc55mk2 Test Mode T-3
Button 1 = User
Button 2 = Part Sel
These two buttons should belong to the SC-155
Is possible to emulate the SC-155?
image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.