Skip to content
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

Is possible to emulate SC-155? #64

Open
ne3i opened this issue Apr 26, 2024 · 26 comments
Open

Is possible to emulate SC-155? #64

ne3i opened this issue Apr 26, 2024 · 26 comments

Comments

@ne3i
Copy link
Contributor

ne3i commented Apr 26, 2024

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
Copy link
Contributor

giulioz commented Apr 26, 2024

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
Copy link

matt713 commented Apr 26, 2024

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
Copy link

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

@nikitalita
Copy link
Contributor

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

@matt713
Copy link

matt713 commented May 2, 2024

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
Copy link
Contributor

looks like R15209361

@nikitalita
Copy link
Contributor

It's dumped

R15209361 Sha256sum: ceb7b9d3d9d264efe5dc3ba992b94f3be35eb6d0451abc574b6f6b5dc3db237b

@giulioz
Copy link
Contributor

giulioz commented May 3, 2024

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

@Gerwin2k
Copy link

Gerwin2k commented May 3, 2024

Giulioz, exactly. As explained here:
#41

@nikitalita
Copy link
Contributor

nikitalita commented May 3, 2024

@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
Copy link

Gerwin2k commented May 3, 2024

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

@nikitalita
Copy link
Contributor

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
Copy link
Owner

nukeykt commented May 3, 2024

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
Copy link
Contributor Author

ne3i commented May 3, 2024

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
Copy link
Contributor

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
Copy link
Owner

nukeykt commented May 3, 2024

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

@giulioz
Copy link
Contributor

giulioz commented May 3, 2024

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
Copy link
Contributor

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
Copy link
Contributor

giulioz commented May 3, 2024

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
Copy link

buffis commented May 3, 2024

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?

@giulioz
Copy link
Contributor

giulioz commented May 3, 2024

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

@matt713
Copy link

matt713 commented May 3, 2024

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

76f646bc03f66dbee7606f2181d4ea76f05ece7d

@nikitalita
Copy link
Contributor

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
Copy link

matt713 commented May 3, 2024

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

@Gerwin2k
Copy link

Gerwin2k commented May 4, 2024

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: #34

@matt713
Copy link

matt713 commented May 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants