Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Sega AI Computer reverse engineering thread

Reply to topic Goto page Previous  1, 2, 3, 4  Next
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Sun Feb 08, 2015 9:55 am
That's the banking scheme of the Master System. So yes the dumps are properly incorrect and missing data. From the screenshot posted above I would expect the game to be bigger than 32k/48k if it has this amount of graphics over many screens. Chris do you have all the games with you or are they are Joseph's?
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Sun Feb 08, 2015 3:37 pm
Yes, it would appear that the original card dumps were incorrect. I do have all of the cards with me here.

Different cards map their ROM in different places (eg: A0000-Bxxxx) but the following 3 ROMs that I attached appear to have a built-in mapper(?) that has 16 banks of 16KB each. I hope these are correct dumps; let me know if they appear malformed/underdumped.

For the above 3: writes to $AFFFC-AFFFD seem to have no discernable effect. Bank 0 of the card is permanently (?) wired to $A0000-A3FFF. A write to $AFFFE chooses the bank at $A4000-$A7FFF, and a write to $AFFFF chooses the bank at $A8000-$ABFFF. $Bxxxx is a mirror of $Axxxx.

I'll also include a few scans of cards/manual.

More port info:
Writing a 1 to Port $7 bit 7 seems to engage the tape drive and trigger an interrupt.

Oh, yeah, and with this manual we get a clearer idea of button naming: PL and PR are referred to as "Point Button Left" and "Point Button Right". The little grey button is the "Touch Button".
AI_cardM.jpg (190.5 KB)
AI_cardM.jpg
AI_card2M.jpg (159.21 KB)
AI_card2M.jpg
AI_Inst01.jpg (204.51 KB)
AI_Inst01.jpg
AI_Inst02.jpg (160.09 KB)
AI_Inst02.jpg
AI_Inst03.jpg (160.98 KB)
AI_Inst03.jpg
AI_Inst04.jpg (150.67 KB)
AI_Inst04.jpg
AI_Inst05.jpg (58.21 KB)
AI_Inst05.jpg
AI_Inst06.jpg (70.19 KB)
AI_Inst06.jpg
3_AI_256KB.zip (364.28 KB)

  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14723
  • Location: London
Reply with quote
Post Posted: Sun Feb 08, 2015 6:39 pm
I'd expect to find a checksum header, any sign of that? TMR SEGA etc...
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Sun Feb 08, 2015 7:04 pm
Last edited by jdg on Sun Feb 08, 2015 8:14 pm; edited 1 time in total
That is quite a bit better :)

I have attached a new source file update; besides separate full files it also contains one diff file that needs to be applied to the mame codebase.
segaai_20150208.zip (11.83 KB)

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Sun Feb 08, 2015 8:01 pm
Last edited by Bock on Sun Feb 08, 2015 8:11 pm; edited 2 times in total
Congrats!
The art on the first card is quite nice too.
Are the black border on the screenshot an artefact of MESS capturing or part of the actual screen?

There's some names in
http://www.smspower.org/forums/files/ai_inst06_759.jpg

発行者:中山隼雄 Nakayama Hayao (Publisher - Sega President - not useful
Development: Sega
リンガフォン・ジャパン Linguaphone Japan
大木恵子 Ooki Keiko ?
東京オーディオ・ミュージックレコード Tokyo Audio Music Record
Can't read the last one.

Probably hard to get lead on those ones alone. Maybe someone can seek for Ooki Keiko. Do the other games have different credits?

Also the name of a school on the back of the card 青森南保育園 (Aomori Minani Hoikuen/Nursery). Apparently various sources (including a person I talked to who worked at Sega) said the computer was sold (given?) to schools.
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Sun Feb 08, 2015 8:05 pm
The V9938 in MAME has by default some border space around the screen.
You can actually change the border colour on the V9938 apparently they didn't bother to do that for these games.
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Sun Feb 08, 2015 10:23 pm
The last one says: "Printing, Binding: Toppan Printing co."

Edit: I'm happy the cards are emulated pretty well! I still have no idea how the tape controls are mapped to ports, etc, nor how the touch pad is mapped. The Eigo games don't use the touch pad, but the Ocean Fantasy does.

Anyway, the pitch of the FM emulation seems a bit too high in MESS, so I've taken some recordings of the Eigo de Game 2 gameplay.

I've also taken a live recording of the AI output, so you can hear the tape, PSG, FM, and voice (really ADPCM) chip in concert. If there is clicking & popping, it's the sound of the tape drive engaging, motor starting, fast-forwarding, etc bleeding into the sound line.
Eigo2_FM.mp3 (1.35 MB)

Eigo2_ingame.mp3 (2.15 MB)


  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 09, 2015 5:06 am
Last edited by ccovell on Sat Feb 14, 2015 2:39 pm; edited 1 time in total
Okay, I've dumped a few more MyCards.

So far, there's the 16x16K mapper type cards ($A0000-$ABFFF), and a flat 128K card type ($A0000-$BFFFF), which will need support in MESS to verify if it's a good dump.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Mon Feb 09, 2015 9:13 am
Through a friend I've located Mika Okada 岡田 美佳 who did some work on the Sega AI and have her on Fabebook. She was an artist on Sega AI title.

Questions?
I guess I can ask for a general overview, her point of view on the story.
My Japanese is terrible so perhaps Chris can translate the question (sorry it all falls on you).
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 09, 2015 9:41 am
Maybe ask her which companies did the art / programming? I'm betting it's at least 2 different ones.

And, with what software did she do her art? (MSX, I bet... or...?)

If she can remember, how was the AI explained to her by her company? A foot in the door of the educational / Kumon / daycare market? A lost cause?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Mon Feb 09, 2015 2:56 pm
I messaged her now.

Listening to Eigo2_ingame.mp3 with all the voices and synthesized bits, it feels quite competent in the multimedia department. I'm not sure what people were used to have on their computer at that time in term of software using tape data along with music.
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Mon Feb 09, 2015 6:54 pm
The 128KB dumps also seem fine.

Attached is the updated source code; I also lowered the input clock on the ym2151 from 5MHz to 4MHz.

EDIT: Updated the source code a bit more, also added a software list (hash/segaai.xml) to describe the software.
alice_world_title.png (11.27 KB)
alice_world_title.png
segaai_20150209.zip (13.6 KB)

  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 09, 2015 10:26 pm
Last edited by ccovell on Sat Feb 14, 2015 2:39 pm; edited 1 time in total
jdg wrote
Attached is the updated source code; I also lowered the input clock on the ym2151 from 5MHz to 4MHz.

3.58 Mhz seems to make the pitch match the original recording.

Also, would it be possible sometime to make the Sound Box un-selectable from the command line or OSD? It is an add-on after all, and the games that support FM also have their own PSG soundtracks.

So, here are all the games we have now dumped, with one more on its way to me, probably.
Sega AI MyCards               Size? (What Mapper?)
---------------               --------------------

1st Set: "Wonder School" 1988-7-1
---------------------------------
AI-4051   Alice World            128K   none ($A0000-$BFFFF)
AI-4052   Robinson Land            128K   none ($A0000-$BFFFF)
AI-4053   Cosmic Train            128K   none ($A0000-$BFFFF)
AI-4054   Cinderella Labyrinth         128K   none ($A0000-$BFFFF)
AI-4055   Gulliver Pocket            128K   none ($A0000-$BFFFF)
AI-4056   Mozart Academy            128K   none ($A0000-$BFFFF)
AI-4057   Arabian Night            ~14x16K   A0-,A4-,A8-
AI-4058   Andersen Dream            128K   none ($A0000-$BFFFF)
AI-4059   Ocean Fantasy            ~10x16K   A0-,A4-,A8-
AI-4060   Columbus Map            128K   none ($A0000-$BFFFF)

2nd Set: "Ongaku Wonder School" 1988-10-1
-----------------------------------------
AI-4114   Runrun Music            128K   none ($A0000-$BFFFF)
AI-4115   Tantan Rhythm            128K   none ($A0000-$BFFFF)
AI-4116   Ranran Melody            128K   none ($A0000-$BFFFF)

3rd Set: "Eigo Wonder School" 1989-5-1
--------------------------------------
C-9532   Eigo de Ohanashi 1         16x16K   A0-,A4-,A8-
C-9533   Eigo de Game 1: Popo no Yume      16x16K   A0-,A4-,A8-

C-9535   Eigo de Ohanashi 2         16x16K   A0-,A4-,A8-
C-9536   Eigo de Game 2: Popoland no Himitsu   16x16K   A0-,A4-,A8-


*EDIT* removed "16_AI-GoodROMs.zip", now posted to https://www.smspower.org/SegaAI
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Tue Feb 10, 2015 7:16 am
ccovell wrote

3.58 Mhz seems to make the pitch match the original recording.


Interesting, that makes it run at the same clock as some of the MSX FM add-ons. On the FB-01 synth it is clocked at 4MHz.

ccovell wrote

Also, would it be possible sometime to make the Sound Box un-selectable from the command line or OSD? It is an add-on after all, and the games that support FM also have their own PSG soundtracks.


I was already planning on doing that, that is why the soundbox components are already a bit separated from the main machine in the source. It takes a bit of coding effort to get that done though and this was easier for testing ;)
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Tue Feb 10, 2015 7:17 am
Here's a little bit I could find about the PD7759 speech chip...

There's a PDF datasheet online, but it doesn't contain programming examples and refers to a programmer's manual which I can't find online.

Anyway, some ports that might be related to it:

$0B:   Bit 0 is the speech chip Standalone / Slave (/MD) line
----
   - $01,$00 written to at startup

$14/$15: PD7759C Speech Synth command port
--------

$17:   Speech Synth address/data/mem mapper?
----
   - "Eigo de Game" 2 writes 0,2,4,7,$d,$e to this port, then
     enables interrupts.  An interrupt-driven routine then writes
     $01 to port $B, then ADPCM data to port $14, then $00 to $B again.

Reading:

$04:   Joypad & Buttons
----
   M?rl-RLDU

   - ? might be a "ready" signal from Speech chip

$16:   Speech Synth ???? line?
----


Eigo de Game 2 in the above example plays the voice samples "Long" and "Short" if you go to the menu option shown, then select the vertical or horizontal sticks. (The AI computer has standard words in ROM, but each game can load custom ones through port $14 manually. (In slave mode(?)))
0000.png (3.03 KB)
0000.png
0001.png (9.08 KB)
0001.png

  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Tue Feb 10, 2015 8:18 am
I was already thinking that the AI might use both modes of the 7759. Switching between modes requires resetting of the 7759 (according to the datasheet), perhaps that is some of the I/O port writing that we see. I think the IRQ handler at vector $fb also has something to do with this because it writes data to I/O port $14.
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Tue Feb 10, 2015 9:03 am
You also might find it interesting that if the AI is switched off then on (within about 2 seconds of switching off), the CPU/video doesn't appear to start up, and a strange droning sound repeats from the AI sound output. I'd say it's a good guess that the speech chip is starting up here with indeterminate data, and can't be switched in/out of slave mode until it's finished, if at all.
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Tue Feb 10, 2015 10:06 pm
Updated the source code a bit:
- Set ym2151 frequency to 21.4772MHz/6
- Added new dumps to the software list.
- Created an expansion slot and changed the soundbox emulation into something that can be plugged into the expansion slot.
- Added credits to driver and soundbox file; if I miss someone, mistyped a name, or should remove someone, then please let me know.

The soundbox is inserted by default; it can be removed by adding a '-exp ""' to the command line.

Check for instance the difference in output between:
mess segaai -listdevices
and
mess segaai -exp "" -listdevices


Besides these boring changes I haven't had time yet to further look into the 7759 details.
segaai_20150210.zip (17.71 KB)

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Tue Feb 10, 2015 10:21 pm
Please remove me from the credits, I haven't done anything for the emulation, you guys deserve all credits.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Tue Feb 10, 2015 10:31 pm
Out of curiosity. What is missing toward first-pass of emulating everything?

- Tape system. I assume that it wouldn't be too hard with MESS? Once the audio data is dumped.
- Keyboard
- Touch surface
- 7759 speech chip

Anything else?
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Tue Feb 10, 2015 10:45 pm
The tape system may be tricky in this case since it seems the unit knows how far to fast forward or rewind a tape; at the moment we don't have any systems with such a feature implemented in mess.

The 7759 speech chip needs to be hooked up properly and the 7759 voice roms still need to be dumped.

The hookup of the 8253 on the soundbox is not known yet; I'd have to take a closer look at the pictures that Chris posted earlier.

I don't know if the keyboard emulation is really needed to play most games; I think the touch surface is more important for that.
  View user's profile Send private message
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Wed Feb 11, 2015 8:59 pm
I think the touch pad is communicated with through I/O ports $1C, $1D, $1E, and $05.

This is the sequence I found in Mozart Academy (at A03C2):

; check if there is pressure?
write $00 to port $1C
write $01 to port $1D
wait a little bit
read port $05
if bit 1 is not 0, bail out

; read pressure point row/column?
write $00 to port $1D
write $00 to port $1C
write $00 to port $1E
wait a little bit
read port $05
if bit 2 is not 0, bail out
read port $1E

; read pressure point row/column?
write $01 to port $1C
wait a little bit
write $00 to port $1E
wait a little bit
read port $05
if bit 2 is not 0, bail out
read port $1E
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Thu Feb 12, 2015 1:49 am
Yes, that's it. Looks like bit 1 of port 5 indicates "Touch Pad pressed" (negative logic); and bit 2 indicates "data ready" (negative logic), maybe?

Bit 2 remains in an unknown state until that read/reset sequence (0 to 1D,1C,1E) is done, I think.

Anyway, the first byte read from the sequence above is the X-position from top-left, and the next byte read is the Y-position. The dark grey area around the touch pad is mostly insensitive to pressure, and the lowest X/Y values I can get are $02,$04, whereas the bottom-right reads $FF,$FF no problem. Half a millimetre or so outside this valid reading area, data is returned, but it's garbage. An average human finger would get a reading of $05,$07 by pressing firmly on the upper corner of the touchpad.

Oh, multi-touch is possible... ;-D But it actually just gives a single average reading on each axis.

Also, the final reading before the AI detects one's finger has been lifted from the pad is a little invalid half the time, so I imagine games that use the touch pad discard or average its (final) readings.

Attached are some pics for illustration. The overlay covers the entire area, both light grey and dark grey border. The tabs fit in slots in the plastic. Thus, not all the area of the overlay can return a touch reading.


As for the speech ROMs....

Well, I'm trying to find a non-invasive (no harming the AI board, desoldering, etc) way to dump them, and I'm open to suggestions. The speech chip has A0..A8 as direct outputs and so I managed to piggyback a wired DIP socket on the ROMs and read 512 bytes of speech data from the ROMs. The upper address lines, however, are multiplexed with data in on the PD7759 speech chip, and controlled by the chip. Data in to the chip is buffered with a 74LS244, but the address lines are sent to the ROMs through a T74LS373 (flip-flop?) so I'm not sure how I can command the upper address lines myself.


edit Updated Sound Box, port specs on the 1st page.
AI_touchpad.jpg (43.7 KB)
AI_touchpad.jpg
Mozart_Overlay.jpg (160.92 KB)
Mozart_Overlay.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Sat Feb 14, 2015 2:28 pm
Well, here is a 17th MyCard: Cosmic Train!
BookletS00.jpg (176.85 KB)
BookletS00.jpg
OverlayS.jpg (114.3 KB)
OverlayS.jpg
Cosmic Train.zip (73.54 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Sat Feb 14, 2015 2:49 pm
Nice! Not much progress from my end since I spent some more time on work.
I'm still thinking about the best way to implement the touch pad within the mame framework.
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 16, 2015 7:22 am
Yes, I'm still figuring out a nice way to dump the speech ROMs. Again, anybody have any ideas?

I've traced out a little bit of the connections between the speech chip, its ROMs, and the latch that manages address/data (not all traces are written down for that latch, but you get the picture.). This didn't bring me any more luck with dumping, tho.

  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Mon Feb 16, 2015 10:25 am
Maybe the LE pin on the 373 needs to be pulled high or low all the time to stop it from interfering? But I guess you already tried that..

Edit:
I'm not sure if you saw my private message, but page 44 of the pdf shows the same setup for the upd7759 as in the sega ai (except it's using 1 128kb rom instead of 2 64k ones).

The pdf mentions that the upper address bits must be latched when ALE goes low on the pin description on page 19.

I wonder if you could extend the piggy backing to use the input pin on the 373 for the high address bit instead of applying them directly on the roms?

Edit2:
Another weird idea: 'shift' the address lines and tie A0 to ALE on the 373?
Every data byte will then be read out twice since one of the read cycles will get used to latch the high address lines into the 373.
  View user's profile Send private message
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Wed Feb 18, 2015 8:51 pm
Experimenting a bit with implementing the touchpad as clickable artwork in Cosmic Train.
I can could press the "enter" key a few times by clicking on it to make it start the game itself.

I am not sure if I want to keep this implementation since I am not too happy with it yet but it's nice to see it responding to clicks on the overlay :)

  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Thu Feb 19, 2015 7:17 am
I'll try out some of these ideas for dumping the sample ROMs later. For now, I've updated some of the Sound Box port and pinout information. Eg: I couldn't find a pinout for the exact TMP82C55AF-10 package, so I traced the pins and figured out a bit where they were. Port B in the 82C55 is mostly used for control of the volume IC, evidently.

Remember that the usable area of the overlay is smaller than the full scan. Roughly this:
OverlaySS.jpg (52.14 KB)
OverlaySS.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Thu Feb 19, 2015 7:41 am
Yes, from your image of the Mozart Academy overlay it's quite clear which part responds to touches. I can configure which part of the overlay is the responsive part.

For artwork, the mame framework only has a concept of clickable areas, no precise click point. I was testing last night with 16 big vertical clickable areas where the x is calculated from the clicked area but the y was still set static in code.
Having 16 areas seems too low for some of the overlays; I'll probably end up with a matrix of 32x32 clickable areas.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Thu Feb 19, 2015 10:31 am
Last edited by Bock on Sat Dec 16, 2023 8:17 pm; edited 1 time in total
Until the overlays are scanned you can see them in this thread
http://www.smspower.org/forums/15004-SegaAIComputerSoftware
Andersen Dream (EDIT: Arabian Night) appears to be the most elaborate one:
http://www.smspower.org/forums/files/600x450_2014090200042_111.jpg
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Thu Feb 19, 2015 10:39 am
Yes, that's why i was thinking about 32x32. But that may also become a bit messy in the overlay xml description and the code.

I am also thinking about adding support for true touchpad-ish support to mame's layout files; that will require a bit more work but will be cleaner and feel less hacked together.

That's also why I described it as experimenting and didn't share any code for it yet ;)
  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 23, 2015 1:45 am
Okay, here are a couple scans of detailed overlays from Arabian Night and Cinderella Labyrinth. They show Katakana and Hiragana sounds, respectively.

I also took more photos of the PCB taken out of its case, on both sides. This was in preparation for the voice ROM dumping, which I'll make another post about.

*EDIT 2024* Everything including higher resolution overlays is now available at http://www.smspower.org/SegaAI
Sega_AI_1001.jpg (668.8 KB)
Top Left
Sega_AI_1001.jpg
Sega_AI_1002.jpg (609.79 KB)
Top Right
Sega_AI_1002.jpg
Sega_AI_1003.jpg (533.07 KB)
Bottom Left
Sega_AI_1003.jpg
Sega_AI_1004.jpg (609.51 KB)
Bottom Right
Sega_AI_1004.jpg
Sega_AI_1005.jpg (526.36 KB)
Bottom
Sega_AI_1005.jpg

  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 23, 2015 2:14 am
And I managed to dump the ADPCM ROMs for the PD7759. After consulting with Kevin Horton, we confirmed the only feasible way to dump these ROMs would be to disable that address latch IC (74LS373), so I cut pin 1 of that IC and soldered it back after dumping.

The Sega ROMs are 128 KB each, with A16 taking the place of the usual /OE pin of a 27512 EPROM. The Sega 315-5201 mapper controls the 7759 master/slave mode, as well as which ROM's data output gets enabled when a DRQ pulse is sent by the 7759. I hope I can figure out the mapper's behaviour in more detail, but for now, port $B bit 0 controls master/slave, and at least bit 1 chooses the upper voice ROM.

Hopefully these ROM dumps are correct; I rechecked them about 2 times, and the data seems to be fine. It's NEC's own ADPCM format, which I do not know, but byte 0 in the ROM has the total number of voice phrases minus 1, and then there's a directory of 2-byte little-endian addresses for each sample starting at byte 5 in the ROM. (These addresses need to be shifted left by one in order to get proper pointers inside the ROM.)

I also took recordings of all 256 commands to the 7759. Of course, some of them have no phrase data, but they give a good idea of the sound quality of decoded ADPCM, as well as the linear mapping of the ROMs' directories to the command values.
MPR-7619.mp3 (378.01 KB)

MPR-7620.mp3 (553.69 KB)

AI_Voice_ROMs.zip (215.57 KB)

  View user's profile Send private message Visit poster's website
  • Joined: 01 Jun 2010
  • Posts: 46
Reply with quote
Post Posted: Mon Feb 23, 2015 1:18 pm
hi

sorry for the lack of support here, but I got overloaded by job duties in the past two weeks :(
congratulation for the great advancements in emulating the machine and in dumping the speech roms!

In attachment you can find an updated source with a basic hookup to UPD7759.
it is almost surely missing a reset call somewhere (I ran out of time for today) and I think that the MAME core implementation for the UPD7759 does not support /md writes, so that there is still quite a lot of job to do...
but now the system greets the user with an "AI" speech when you boot up, which I think it is a good sign

I have also added Cosmic Train to the software list, so that all 17 dumps are documented :)
segaai_20150223.zip (19.58 KB)

  View user's profile Send private message
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 23, 2015 2:35 pm
Hmm... how exactly did you get the "AI" speech? Because when I start up the AI normally, it produces no sound at all from the speech chip.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jun 2010
  • Posts: 46
Reply with quote
Post Posted: Mon Feb 23, 2015 2:57 pm
I did just issue a start command when the bit0 of port 0xb got written to select the ROM bank
since we have no emulation of writes to /md currently in MAME, and since such write helped getting some speech in Eigo de Game 2 (when choosing the first icon and coloring e.g. the apple), I thought it could have been more or less OK...

However, since this does not match the actual system, it means that the start command has to be hooked elsewhere :)

Thanks for the prompt feedback!
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Mon Feb 23, 2015 3:01 pm
It would be nice to have videos of the system booting and being used.
(you could upload them to Youtube and set them as private, you can use the SMS Power! youtube account if you want)

Where is the Prolog anyway? Can the computer be programmed in Prolog by the end user? Does it requires another software that we haven't seen?

*EDIT* There a video here, afaik the only known video. No speech on boot either.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Mon Feb 23, 2015 10:36 pm
etabeta wrote
However, since this does not match the actual system, it means that the start command has to be hooked elsewhere :)


I'm sure Start is dropped after writing a command byte to port $14/15.

I'll try to make some videos, though if my capture box isn't working well, it might have to be through my camera.
  View user's profile Send private message Visit poster's website
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Tue Feb 24, 2015 4:32 pm
ccovell wrote
etabeta wrote
However, since this does not match the actual system, it means that the start command has to be hooked elsewhere :)


I'm sure Start is dropped after writing a command byte to port $14/15.


I just traced the ST pin of the 7759 a bit on the new pictures and it is also hooked up to the WR pin of the 8255, so simply writing to port $14/$15 would indeed also trigger ST.
  View user's profile Send private message
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Wed Feb 25, 2015 2:58 pm
Updated mess driver with the touchpad emulated as a 24x20 clickable matrix. I have included artwork for cosmic train as an example.
The locations of the clickable areas are not 100% correct yet, but it's a start; the game is playable. The .lay layout files are plain xml files.

On startup the 7759 still plays a short sample; this needs to be fixed

The source should include all of etabeta's changes as well.
segaai_20150225.zip (542.66 KB)

  View user's profile Send private message
  • Joined: 13 Mar 2007
  • Posts: 51
  • Location: Portugal
Reply with quote
Post Posted: Mon Mar 02, 2015 8:25 pm
I have been looking into improving the upd7759 hookup lately and stumbled on an interesting routine at $A9EC5 - $A9F3D in Eigo de Game 2.

From that routine it looks like I/O port $17 is used to configure 8 bits/pins separately by writing 0000pppd where ppp is the bit number and d is the data.
The configured pins/bits can be read back with a single read through I/O port $16.

I have a feeling that bit0 of I/O port $0B might be tied to the reset pin on the upd7759 instead of the MD pin and that the MD pin is configured through one of the pins tied to I/O port $17.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Wed Mar 04, 2015 5:20 pm
Last edited by Bock on Sat Dec 16, 2023 8:18 pm; edited 1 time in total
Some extra (non-technical information) in the other thread.

BKK dug two articles one in English and one in French with pictures
http://www.smspower.org/forums/15004-SegaAIComputerSoftware#85050

Scan of an ad in Japanese Magazine "COPEL 21", January 1987 issue (sold in December 1986) selling a package with 18 software some are named similarly the known dumps. The packaging looks different as well.
http://www.smspower.org/forums/15004-SegaAIComputerSoftware#85187

There's an actual order form so I assume the software were actually made and ready to be sold.

アリス ワールド Alice World
ロビンソン ワールド Robinson World
シンデレラ ワールド Cinderella World
イソープ ワールド Aesop World
ヘンゼル&クレーテル ワールド Hansel and Gretel World
ゴクウ ワールド Gokou World
高島 ワールド(?) Takashima World (Treasture Island)
ヘレンケラー ワールド Helen Keller World
ナイチンゲール ワールド Nightingale World
ジャンヌ・タルク ワールド Jeanne D'Arc World
エジソン ワールド Edison World
リンカーン ワールド Lincoln World
スペース(宇宙)ワールド Space World
サファリ(??)ワールド Safari World
ロボット ワールド Robot World
マザー ワールド Mother World
マザー ワールド2 Mother World 2
マザー ワールド3 Mother World 3
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Release?
Post Posted: Wed Mar 04, 2015 5:28 pm
Last edited by Bock on Wed Mar 04, 2015 11:31 pm; edited 1 time in total
Now that Chris got the ROM data dumped. I see no issue in releasing everything publicly. Emulation can catch up afterwards.

Ideally we'd have
- A scan of all the overlays to release along with the roms.
- A recording of the tapes
Chris do you think that would be feasible?

I also see no issue in waiting if you think it can help assembling more data to release and improve emulation, and have a nicer "day 1" experience. Whatever you feel is best. It may just feel crampy to work on a private driver at this point.

jdg/etabeta: mess being on github i can also setup a private fork if you want.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Wed Mar 04, 2015 11:04 pm
Bock wrote
Now that Chris got the ROM data dumped. I see no issue in releasing everything publicly. Emulation can catch up afterwards.

Ideally we'd have
- A scan of all the overlays to release along with the roms.
- A recording of the tapes
Chris do you think that would be feasible?


I think I can manage this, but it might be a trickle as I'm busy/tired this month.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Wed Mar 04, 2015 11:18 pm
Take the time you need! Thanks again.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Tape dumps + Wiki section
Post Posted: Fri Mar 06, 2015 11:05 am
Chris dumped two of the tapes (sent via e-mail)
Eigo_de_Game_T1.flac (60 MB)
Eigo_de_Game_T2.flac (68 MB)

*EDIT* Are encoding like mp3/ogg safe for the type of data encoded here? Could we leave the .flac optional download?
Does MESS has a preferred format for audio tapes, is that something that's supported? Interleaved data and audio?

I have created a (temporarily private) Wiki section to organise the released information. It's empty now:
http://www.smspower.org/SegaAI

We could potentially use the site architecture to have individual pages for each game, "Games", "Scans" etc. but if we can keep it all on one page it'll be nice.
  View user's profile Send private message Visit poster's website
  • Joined: 26 Dec 2004
  • Posts: 374
  • Location: Japan
Reply with quote
Post Posted: Fri Mar 06, 2015 11:51 am
Last edited by ccovell on Fri Mar 06, 2015 11:58 am; edited 1 time in total
I uploaded them as FLAC, because lossy audio compression can decimate modulated data such as KCS, etc, formatted audio.

In these tapes, by the way, the left audio channel is the narration, and the right channel the data bursts right before each one. If someone figures out the data format, you could pare it down to one channel and "simulate" the data portion as a binary stream in emulation.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Fri Mar 06, 2015 11:53 am
I'm not familiar with other computer systems but I assume interleaved data/audio exists elsewhere, how do emulators generally handle that?
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Sat Mar 07, 2015 1:54 am
This guy is selling a lot with
- the e-nikki software (card+manual)
- a keyboard overlay
- there a document being the overlay that looks like some sort of schematic?
- main unit documentation
- and a sort of yellow pen
http://page19.auctions.yahoo.co.jp/jp/auction/x364740512

It says it has a "no return policy" but maybe worth asking explicitely for that?. We could still ask if they would sell the card + manual separately? Any suggestion?

  View user's profile Send private message Visit poster's website
Reply to topic Goto page Previous  1, 2, 3, 4  Next



Back to the top of this page

Back to SMS Power!