Emulating Sega Pico

For people looking for educative games :)
notaz
Very interested
Posts: 193
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Emulating Sega Pico

Post by notaz » Thu May 22, 2008 12:21 pm

Sega Pico is Sega's toy with hardware similar to Genesis/MegaDrive. Recently some prototype ROMs appeared for it, and I've done some work on emulating them. The result is this little document and this little emulator.

What I have problems with is figuring out what kind of PCM format Pico is using. Some raw samples can be found here, here and here. Also they can be easily extracted from ROMs themselves (they are raw data chunks, copied by game to sound chip when needed). I thought maybe somebody of you tech people want to check these.

EDIT: updated emu link to bugfix release.
Last edited by notaz on Thu May 22, 2008 9:06 pm, edited 1 time in total.

Eke
Very interested
Posts: 885
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Thu May 22, 2008 2:28 pm

thanks for this pioneer documentation again and congrats for the reverse engineering you have done, everything is pretty well documented :o

PS: strange, it seems that nobonody has opened a Pico yet to see what's inside?

notaz
Very interested
Posts: 193
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Thu May 22, 2008 3:39 pm

Eke wrote: PS: strange, it seems that nobonody has opened a Pico yet to see what's inside?
oh yes they have :)

Good old friends: 68k with 315-5313A VDP + a bunch of custom/rebranded 315-XXXX chips.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu May 22, 2008 3:56 pm

I see one OKi chip on first board. Most of their chips which I saw in VG hardware were ADPCM codecs. Can't find info about this chip, though.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Thu May 22, 2008 7:28 pm

The Oki that's next to the 315-5313? It's a 64Kbit*8 multiport DRAM.

MD/Gen model 2 has one of those, too

TascoDLX
Very interested
Posts: 262
Joined: Tue Feb 06, 2007 8:18 pm

Re: Emulating Sega Pico

Post by TascoDLX » Thu May 22, 2008 11:22 pm

notaz wrote:What I have problems with is figuring out what kind of PCM format Pico is using. Some raw samples can be found here, here and here. Also they can be easily extracted from ROMs themselves (they are raw data chunks, copied by game to sound chip when needed). I thought maybe somebody of you tech people want to check these.
Yes, these samples are 4-bit ADPCM, but I haven't had much time to look at all this so I'll have to check it out later. In any case, way to go!

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Fri May 23, 2008 4:55 am

I think you'll find the PCM chip is the Sega branded 315-5641. It takes all 16 data lines (which according to the memory map the PCM chip does), and it's the only device on that board I can't identify.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Fri May 23, 2008 5:32 am

I've got a query about one thing notaz. How sure are you about the following info:

Code: Select all

The 68000 uses following hardware interrupt autovectors:
  level 2 - seems to be available, but most games put empty handlers here.
  level 3 - PCM interrupt? Probably occurs when PCM hardware needs more data,
            and exact conditions probably depend on PCM control register
            settings.
  level 4 - horizontal interrupt? Not widely used.
  level 5 - definitely used for something, but many games work without it.
  level 6 - 'usual' vertical interrupt.
Looking at the PCB shots from that link you posted, IPL0 isn't connected. That would limit the autovector interrupts to levels 2, 4, and 6, same as the Mega Drive. If there are handlers in those autovectors, I don't think they could be triggered by an interrupt.

EDIT:
Looking closely at the scans again, it is possible IPL0 is connected under the chip.

notaz
Very interested
Posts: 193
Joined: Mon Feb 04, 2008 11:58 pm
Location: Lithuania

Post by notaz » Fri May 23, 2008 8:57 am

Nemesis wrote:I think you'll find the PCM chip is the Sega branded 315-5641. It takes all 16 data lines (which according to the memory map the PCM chip does), and it's the only device on that board I can't identify.
What do you think 315-5639(?) is, then? 315-5640 is the drawing pad controller, it seems.
Nemesis wrote:I've got a query about one thing notaz. How sure are you about the following info:
[...]
I think it's under the chip, because some games don't even boot until IRQ3 happens (they wait for some var which is set in IRQ3 handler).

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Fri May 23, 2008 10:45 am

What do you think 315-5639(?) is, then?
That looks like the bus arbiter. It'll also be in charge of the I/O registers at 0x80000X and the SEGA protection device if it's anything like the 315-5364 in the Mega Drive.

Here's my list of all the chips, as best as I can figure. IC numbers listed as they appear on the 1993 PCB:
IC1: Power MOSFET
IC2: RGB Encoder [SONY CXA1645M]
IC3: Touchpad Controller [SEGA 315-5640]
IC4: PCM Chip [SEGA 315-5641]
IC5: VDP [SEGA 315-5313A]
IC6: 68000 [HD68HC0000CP8]
IC7/IC8: Main RAM [TOSHIBA TC51832AFL-10]
IC9/IC10: Audio Amplifiers [LM324]
IC11: Bus Arbiter and I/O Controller [SEGA 315-5699]
IC14: VRAM [OKI M54C864-80]
IC15: Hex Inverter [74HC05A] (Being used to invert 3 lines. Not sure what it's operating on exactly)

IC12 and IC13 are not present, but space is provided for them on the board. IC12/IC13 are an alternate VRAM, which would be the same type used in the original Mega Drive. Apparently they designed the board to support both types, probably so they could use whichever was cheaper at the time of manufacture, and they opted for the single IC14 VRAM chip when they manufactured this unit.

Jorge Nuno
Very interested
Posts: 374
Joined: Mon Jun 11, 2007 3:09 am
Location: Azeitão, PT

Post by Jorge Nuno » Fri May 23, 2008 6:50 pm

IC1 is a 7805 or similar: a 5volt regulator, I'm sure of it... :wink:

TascoDLX
Very interested
Posts: 262
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Fri May 23, 2008 11:30 pm

notaz wrote:I think it's under the chip, because some games don't even boot until IRQ3 happens (they wait for some var which is set in IRQ3 handler).
I'm concerned that since these ROMs are 'prototype' software that they might be intended to run on 'prototype' hardware? Has anyone gotten any of these prototypes to run on a stock Pico? Perhaps if someone manages to dump a retail Pico cartridge we can get more answers.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Sat May 24, 2008 1:35 am

IC1 is a 7805 or similar: a 5volt regulator, I'm sure of it...
Could well be. I wouldn't have a clue from looking at it. I've only listed part names where I'm sure about them though.
Perhaps if someone manages to dump a retail Pico cartridge we can get more answers.
I've got a couple of carts on the way, and we have the pinout. I'm going to try rigging up an adapter to hook it into the Mega Drive, then dump it through MoD's cable. Shouldn't be too hard. There's nothing unusual in the pinout that I can see.

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Wed May 28, 2008 11:51 pm

Some Pico carts arrived in the mail yesterday. I was hoping to dump them by cannibalizing a PCI connector and using one side of it to connect to the cart (49 pins per side, compared to 50 on the Pico cart), but the pin spacing is off by a fraction of a millimeter. I'm probably going to have to buy a Pico unit and remove the real connector from that. It'll probably take another week to organize, but it'll be better in the end anyway.

TascoDLX
Very interested
Posts: 262
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Thu May 29, 2008 10:08 am

Good luck with that, Nemesis! I look forward to the results; take as much time as you need.

Post Reply