the DAC in Playball (Sony, 1986)

Page 1/2
| 2

By hap

Paragon (2042)

hap's picture

20-05-2003, 12:26

Another technical-ish topic:

quoted from msxnet.org: http://www.msxnet.org/tech/megaroms


This is a 32Kb ROM cartridge from Sony. Supposedly it has a DAC. All I could find in the source was a few writes to address BFFFh, in it's own address space. It's also reading it. Since it's just a few bytes, seemingly ranging from 0-7, it's not a normal DAC. What this address actually does is a mystery to me, any help here would be most appreciated.

I've seen this game running once at an MSX fair, and it does have a DAC on board which plays several samples during the game (eg. speech, and when you hot the ball with your bat). I've looked at the contents of that game a bit, and haven't found any sample data in the ROM itself.

The only possible thing that's left is that this game has an extra ROM with the samples. It's fairly easy to conclude that the number that it writes to the memory I/O port BFFFh is a request to play a sample.

Does anyone have the cartridge of this game to look if it has a sample ROM in it ? And maybe even dump that ROM (it's probably not possible with programs like saverom, but it should be with an eeprom reader device).

Or maybe someone can prove me wrong here ?

Login or register to post comments

By anonymous

incognito ergo sum (116)

anonymous's picture

21-05-2003, 18:48

Yep, it seems to be a sort of wavetable.

I haven't found samples inside the ROM so they should be stored in a secondary ROM chip. As you said, maybe that ROM isn't accessible by the system bus, so I guess there is some replaying technology inside the cartridge to fetch the sample data through the DAC.

By hap

Paragon (2042)

hap's picture

26-05-2003, 17:36

I've done some researching on Playball, and have given up, so I'll feed forum readers with information that might be useful or might create new ideas.

There is definately another chip inside this cartridge, which has a register mapped to 0xbfff. By debugging, I found out that at least the following samples are played when [x] is being written to 0xbfff:

x=sound
---------
00="strike"
01="ball"
02="foul"
03="safe"
04="out"
05=a sound when you start the game
06=the sound when you hit the ball with your bat
07=the ball is cought by the man behind the batter
08="game set" (end of game)
09=the men can walk freely after the batter gets hit by the ball
0a=the batter gets hit by the ball

(maybe there's more but i've not found any)

I've asked Bas to have a look at his Playball cartridge (it has a transparant cover), and he found no other ROM inside it, but 1 ROM and a lot of electronics. I've searched inside the ROM image for sound samples, and they're most likely not in there; I've converted it to 1, 2, 3, 4, 5, 6, 7, and 8 bit, signed and unsigned sound samples with different offsets, but none of the results had any speech in it. Atarulum has confirmed that the ROM image is a good dump by the way.

This is the source-code of the sample playing subroutine in the game:

0ac2 f5 push af
0ac3 3affbf ld a,($bfff)
0ac6 cb47 bit 0,a
0ac8 280b jr z,$0ad5 ; (+$0b)
0aca f1 pop af
0acb 32ffbf ld ($bfff),a
0ace 32ffbf ld ($bfff),a
0ad1 32ffbf ld ($bfff),a
0ad4 c9 ret

0ad5 f1 pop af
0ad6 c9 ret

It checks bit 0 of 0xbfff, and if it's nonzero, it will write the value of register a, the sound request, to 0xbfff. I have no idea why it writes 3 times.

The working of this register can now be assumed:

[note 1] if a sample is being played (the soundchip is busy), and bit 0 will be reset
[note 2] if a byte is written to that register, it will play a sound

Either this cartridge has an external ROM which contains the sounds. Or the sounds are being played with discrete circuitry, which I highly doubt.

I've made a sound test program, to test [note 1] and [note 2], and to make recording of these sounds possible:

10 CLEAR200,&HD000:SCREEN,,0Big smileEFUSR0=&HD000
20 DATA f5,3e,d4,cd,3b,01,3e,00,cd,c2,4a,3e,f0,cd,3b,01,f1,c9
30 RESTORE20:FORI=&HD000TO&HD011:READA$TongueOKEI,VAL("&h"+A$)TongueO=PO+VAL("&h"+A$):NEXT
40 INPUT"sound ";A%TongueOKE&HD007,A%:X=USR0(0):GOTO 40

This program calls the Playball sound-play subroutine. It should work with the Playball cartridge in slot 1, and RAM in slot 3. To run it, you need to insert the cartridge after the MSX has started up. So if anyone is not too careful (since you need to insert the cartridge after the MSX has booted), it would be nice to test this program, and maybe even record the sounds by connecting the MSX audio-out to the PC line-in.

By BiFi

Enlighted (4348)

BiFi's picture

26-05-2003, 22:23

Nice hunting. I wish I have this cart. It shouldn't be THAT hard to find the sample data. Was the type number of the ROM determined? Maybe just 32 KB is mapped to the MSX memory and the rest is mapped to the replayer circuits.

x=sound
---------
00="strike"
01="ball"
02="foul"
03="safe"
04="out"
05=a sound when you start the game
06=the sound when you hit the ball with your bat
07=the ball is cought by the man behind the batter
08="game set" (end of game)
09=the men can walk freely after the batter gets hit by the ball
0a=the batter gets hit by the ball

(maybe there's more but i've not found any)

According to the rom image, there is at least a 0c and 0d as well.

By hap

Paragon (2042)

hap's picture

13-07-2006, 19:31

I've bought the game from ebay, and tried my 3 year old sound test program, and it surprisingly just works Big smile

The PCB contains a NEC UPD7756C; a speech synthesizer with internal ROM, hard to dump unless you've got the proper tools, and even then there's a chance it's protected. I've recorded the samples, but they're useless for emulation, since I had to record from the tv instead of from the MSX directly, and thus contain an annoying highpitched hiss. I'll have a friend try record the samples directly from MSX.

By BiFi

Enlighted (4348)

BiFi's picture

13-07-2006, 21:27

how many pins does that 7756C have?

By mars2000you

Enlighted (6428)

mars2000you's picture

13-07-2006, 21:54

Excerpt from this page :

http://www.cpu-world.com/Support/7/77.html

UPD7756
ADPCM speech synthesizer
Comment: D/A converter with 9-bit resolution.
256 Kb built-in speech data ROM allows synthesis of messages up to 30 seconds.
Package: 18-pin DIP
Manufacturers: NEC
NEC UPD7756C, D7756C

By hap

Paragon (2042)

hap's picture

13-07-2006, 23:51

18 pins indeed, some quick webcam shots of the PCB: http://home.planet.nl/~jonemaan/crap/playball_pcb.zip (it's D7756C, not UPD7756C)
a discussion about that soundchip on some Famicom carts: http://nesdev.parodius.com/bbs/viewtopic.php?t=762 (hap's another nickname of mine)

By BiFi

Enlighted (4348)

BiFi's picture

14-07-2006, 07:25

there's also a 20 and 24 pins variant with a PROM you can read (that's why I asked).

okay, those 74LS??* IC's are most likely used as $BFFF address decoder for the 7756.

By hap

Paragon (2042)

hap's picture

18-07-2006, 20:23

Any emulator author interested simulating the soundchip using samples? Here they are: http://home.planet.nl/~haps/crap/playball_samples.zip .. It can be tested with my program, and of course with the Playball ROM itself, and with this: http://www.generation-msx.nl/msxdb/softwareinfo/989

(sample 0 and 5 are equal)

By dvik

Prophet (2200)

dvik's picture

18-07-2006, 21:42

Great job jonemaan Smile . I'll try to have it emulated in next version of blueMSX.

Page 1/2
| 2