nukeykt / Nuked-SC55

Roland SC-55 series emulation
Other
383 stars 40 forks source link

Is possible to emulate SC-155? #64

Open ne3i opened 5 months ago

ne3i commented 5 months ago

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

giulioz commented 5 months ago

The SC55 and SC155 are extremely similar, so emulation is definitely possible. The program ROMs, though seems to be different according to the service manual, both the external and the internal MCU one. So you would need to dump the roms to emulate it.

matt713 commented 5 months ago

Is possible to emulate the SC-155?

if you own SC-155 unit, then you need to dump the ControlROM - it's in a socket and so it's very simple to do it (read the chip as 27C020 PROM). the MCU is the same as SC-55mk1 v2.00, which is already supported/emulated. so, you just need to make dump of the ControlROM and it should work. essentially, it's few minutes job, to open your SC-155 unit (assuming you own one), take out the chip from the socket and read it with PROM programmer (and then place its content as rom2.bin file in the emulator).

Grieferus commented 5 months ago

On an unrelated note, how did you achieve those colors?

nikitalita commented 5 months ago

I'm having someone with an SC-155 dump the control rom and it should make into mame soon

matt713 commented 5 months ago

great, but also make note what are the exact chip marking, because there are at least 2 controlrom versions for SC-155: "R15209361" or "R15209400".

nikitalita commented 5 months ago

looks like R15209361

nikitalita commented 5 months ago

It's dumped

R15209361 Sha256sum: ceb7b9d3d9d264efe5dc3ba992b94f3be35eb6d0451abc574b6f6b5dc3db237b

giulioz commented 5 months ago

@nikitalita great! that's only the external rom though, which it's not enough for emulation

Gerwin2k commented 5 months ago

Giulioz, exactly. As explained here: https://github.com/nukeykt/Nuked-SC55/issues/41

nikitalita commented 5 months ago

@nikitalita great! that's only the external rom though, which it's not enough for emulation

It was reported above that the MCU is the same part number as the SC-55mk1 v2.00, R15199799; Is that not dumped?

Gerwin2k commented 5 months ago

It is not publicly available nor is it available to me, and you know ... "please don't ask for roms here".

nikitalita commented 5 months ago

I'm not asking for it, I'm just wondering if it has been dumped by anyone and will eventually get into mame. If not, if nukeykt posts the program they used to dump it, I can probably have the guy program a rom and dump that as well.

nukeykt commented 5 months ago

here's dumper code if anyone interested. Simply burn it to EPROM/Flash, put in place of control ROM, capture MCU data bus + /WR then parse the data dumper.zip

ne3i commented 5 months ago

On an unrelated note, how did you achieve those colors?

Default color in my desktop computer is not good to my display, I changed the lcd col and modified the back.data

nikitalita commented 5 months ago

here's dumper code if anyone interested. Simply burn it to EPROM/Flash, put in place of control ROM, capture MCU data bus + /WR then parse the data dumper.zip

Thank you! To be clear, you're talking about attaching a logic analyzer to D0-D7 + /WR on here, which would require nine lines, correct?

image
nukeykt commented 5 months ago

yea, you probably can hook probes to D0-D7 of Control ROM and /WR of RAM

giulioz commented 5 months ago

Other tip that I used to make it work if you have a cheap 8 channels logic analyzer you can do it in two times, first dumping the lower 4 bits and then the rest, so that you can have one line left for /WR. I then used PulseView to decode it and a simple python script to merge them together. Make sure you dump it a couple of times and make sure they are all the same (no errors). You can verify if the dump is correct if the first part is a valid interrupt vector table, similar to the other dumped roms.

nikitalita commented 5 months ago

Other tip that I used to make it work if you have a cheap 8 channels logic analyzer you can do it in two times, first dumping the lower 4 bits and then the rest, so that you can have one line left for /WR. I then used PulseView to decode it and a simple python script to merge them together. Make sure you dump it a couple of times and make sure they are all the same (no errors). You can verify if the dump is correct if the first part is a valid interrupt vector table, similar to the other dumped roms.

Thanks for the tip; I anticipate we may only have access to an 8-channel analyzer. I assume that /WR is the trigger. Can you post the script that you used?

giulioz commented 5 months ago
out_data = []

with open("tmpl_3.txt", "r") as file:
  lines = file.readlines()

  for line in lines:
    line = line.strip()
    if line:
      last_chars = line[-2:]
      nibble = int(last_chars, 16)
      if nibble <= 0xf:
        out_data.append(nibble)

with open("tmph_3.txt", "r") as file:
  lines = file.readlines()

  i = 0
  for line in lines:
    line = line.strip()
    if line:
      last_chars = line[-2:]
      nibble = int(last_chars, 16)
      if nibble <= 0xf:
        if i >= 0 and i < len(out_data):
          out_data[i] |= nibble << 4
        i += 1

with open("dump3.bin", "wb") as file:
  file.write(bytes(out_data[1:]))
buffis commented 5 months ago

I have a SC-155 and a Saleae Logic Pro 16 (and a Beeprog 2C for roms) and might be able to help out with this some time soonish.

Just to make sure I understand, what's needed is:

Does that sound right?

giulioz commented 5 months ago

Yes, you probably also need to cut the beginning as the stream doesn't start instantly.

matt713 commented 5 months ago

so, your SC-155 is not using "R15199799" MCU?! because R15199799 is dumped, SHA1:

76f646bc03f66dbee7606f2181d4ea76f05ece7d

nikitalita commented 5 months ago

so, your SC-155 is not using "R15199799" MCU?! because R15199799 is dumped, SHA1:

76f646bc03f66dbee7606f2181d4ea76f05ece7d

It is a R15199799 MCU.

image

So there's no need to do this?

matt713 commented 5 months ago

if that is the inside of your SC-155, as far as I can tell from that blurry picture it's R15199799.

Gerwin2k commented 5 months ago

so, your SC-155 is not using "R15199799" MCU?! because R15199799 is dumped, SHA1:

76f646bc03f66dbee7606f2181d4ea76f05ece7d

That is the SHA-1 that nukeykt supplied as proper for v2.0. But it is not publicly available AFAIK. ( There is also a bad 32kB mame rom around from 2021 with just repeating bytes. )

Edit, here: https://github.com/nukeykt/Nuked-SC55/issues/34

matt713 commented 5 months ago

IMHO, public or not it doesn't matter at the moment and thus better focus your time and energy on what is not dumped at all.