Nuked-SC55 icon indicating copy to clipboard operation
Nuked-SC55 copied to clipboard

Is possible to emulate SC-155?

Open ne3i opened this issue 1 year ago • 26 comments

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

ne3i avatar Apr 26 '24 19:04 ne3i

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.

giulioz avatar Apr 26 '24 20:04 giulioz

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).

matt713 avatar Apr 26 '24 23:04 matt713

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

Grieferus avatar Apr 27 '24 12:04 Grieferus

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

nikitalita avatar May 02 '24 20:05 nikitalita

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".

matt713 avatar May 02 '24 20:05 matt713

looks like R15209361

nikitalita avatar May 02 '24 20:05 nikitalita

It's dumped

R15209361 Sha256sum: ceb7b9d3d9d264efe5dc3ba992b94f3be35eb6d0451abc574b6f6b5dc3db237b

nikitalita avatar May 03 '24 16:05 nikitalita

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

giulioz avatar May 03 '24 16:05 giulioz

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

Gerwin2k avatar May 03 '24 17:05 Gerwin2k

@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?

nikitalita avatar May 03 '24 17:05 nikitalita

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

Gerwin2k avatar May 03 '24 17:05 Gerwin2k

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.

nikitalita avatar May 03 '24 17:05 nikitalita

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

nukeykt avatar May 03 '24 17:05 nukeykt

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

ne3i avatar May 03 '24 17:05 ne3i

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

nikitalita avatar May 03 '24 18:05 nikitalita

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

nukeykt avatar May 03 '24 18:05 nukeykt

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.

giulioz avatar May 03 '24 18:05 giulioz

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?

nikitalita avatar May 03 '24 18:05 nikitalita

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:]))

giulioz avatar May 03 '24 18:05 giulioz

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:

  • Burn the ROM from dumper.zip to a 27c020 and place it in the control rom socket
  • Hook up Probles to D0-7 on the DIP control rom (if they share data bus?)
  • Hook up another probe to /WR
  • Set /WR as trigger in Logic and start device
  • Save capture

Does that sound right?

buffis avatar May 03 '24 19:05 buffis

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

giulioz avatar May 03 '24 19:05 giulioz

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

76f646bc03f66dbee7606f2181d4ea76f05ece7d

matt713 avatar May 03 '24 19:05 matt713

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?

nikitalita avatar May 03 '24 20:05 nikitalita

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

matt713 avatar May 03 '24 20:05 matt713

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

Gerwin2k avatar May 04 '24 01:05 Gerwin2k

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.

matt713 avatar May 04 '24 09:05 matt713