don't click here

Sega of Japan Sound Documents and SMPS Source Code

Discussion in 'General Sega Discussion' started by evilhamwizard, Jun 16, 2020.

  1. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63

    Presenting, official Mega Drive/YM2612 sound development documents and SMPS (Z80 and 68000+Z80 variant) sound driver source code that was used by Sega of Japan! There are tons of interesting goodies to find, including documents and sample files that details many aspects of sound development (including a sound editor).

    [​IMG]

    Huge thanks to Frank Cifaldi from The Video Game History Foundation for helping us preserve these almost 30 year old floppies!

    Enjoy. :)

    Paging @Nemesis @ValleyBell ❤️
     
    Last edited: Jun 16, 2020
    • Like Like x 11
    • Useful Useful x 1
    • List
  2. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    Nice, it's only taken over 30 years!! My props to those involved in obtaining these~

    Also, the English translation of the manual was intentionally missing this:

    [​IMG]

    "This is a test register. Not used in user applications."

    Hehehe, they knew it was there but was told not to use it~ d;

    I say as a potential project, someone should go through and translate all of these pages 1:1 to English, because clearly there's information that's been mistranslated or outright not included in the English versions of the documents.
     
  3. Asagoth

    Asagoth

    Behold! The mighty, the flawless, salted cod eater Member
    494
    93
    28
    Portugal
    wiki stuff... and a beer... or two... or more...
    This was like finding the "Ark of Covenant" with the "Tablets of the Law" inside... Amazing! ...
     
  4. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,612
    417
    63
    ALWAYS Sonic the Fighters
    So who's going to be the first person to rig these up so we can hear these samples?
     
  5. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    This has been bothering me for a while... 'Sound-Sorce' is SMPS's name now? Grep-ing the source code, the only mention of that name I can find is in some copy-pasted text at the start of a few files. I can't find anything that specifically says that 'Sound-Sorce' is the name of the entire SMPS project. Remember how Chaotix's driver was nicknamed 'Casablanca' by its maintainer, Milpo? That didn't mean SMPS itself was called Casablanca.

    Not only that, but there's no mention of this name in the other SMPS source code release we have - the one for the Sega Pico port. That one kept the code in a file called "EASYSND.ZIP", and of course, people immediately leapt on the "this must have been SMPS's real name this whole time" train back then too.

    [Update: the above paragraph isn't entirely correct: 'Sound-Source' is mentioned in the Pico port: it has the same copypasted text as the other versions. Still, this name is mentioned nowhere in the documentation, and instead the driver is only plainly referred to as 'the PICO sound driver'.]

    I can't help but feel people are jumping to conclusions here. Heck, not conclusion*s*, just one conclusion. What about the other possibilities? For example, hasn't anyone else questioned that weird typo - why 'sorce', when it's clearly meant to be 'source'? Heck, even the 68k port corrected that typo - it's just the Z80 version that has it.

    Well... what if 'sorce' isn't meant to be 'source'? The 68k port was created by a completely different guy, after all - maybe he didn't understand what the original dev meant. SMPS Z80 was made by Jimita - that guy who was in Sonic 1's credits. [Update: This is wrong and I'm dumb - Jimita made SMPS 68k, not Z80.]

    Now, what else was he credited for? Any games that happened to use SMPS Z80, and came out around the time the source code is dated (1989.12.10)?

    How about a game called 'Sorcerian'? It uses SMPS Z80, and came out in early 1990, meaning it would have very likely been in development at the time the Z80 source code is dated.

    So, here's my theory: 'Sound-Sorce' literally just means 'sound driver for Sorcerian'. Considering that SMPS predates Sorcerian (Mega Drive games from 1988 use it, and I've heard that SMPS can even be found in arcade games that predate the Mega Drive entirely), SMPS can't have specifically been made for it, meaning that the name 'Sound-Sorce' only refers to the version used by Sorcerian, rather than the driver in general.

    SMPS itself was undergoing some major changes in 1989, going from the first major Mega Drive version (commonly known as 'pre-SMPS Z80') to the more well-known second version ('SMPS Z80'). 'Sound-Sorce' could perhaps refer to this massive update. Regardless, that doesn't make it SMPS's name - just a very loose nickname for the update it received in 1989.
     
    Last edited: Oct 5, 2020
    • Like Like x 4
    • Agree Agree x 2
    • Informative Informative x 1
    • List
  6. LockOnRommy11

    LockOnRommy11

    Member
    2,708
    225
    43
    That is some stellar work, and seems pretty likely. It was also an interesting read.
     
  7. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    ...Dammit, quick correction; Jimita made SMPS 68k, not SMPS Z80. That would explain why he's credited in Sonic 1, which uses the 68k version.
     
    Last edited: Jul 22, 2020
  8. Clownacy

    Clownacy

    Tech Member
    1,060
    607
    93
    I don't know if this is considered double-posting, but I think this warrants its own bump:

    The Z80 source code contains a folder called 'fmk'. In it, you can find various batch files and sed scripts. Notably, there's this sed script:

    fsub.sed
    Code (Text):
    1.  
    2. s/\$\$\$/@1/g
    3. s/1989.12.10/@2/g
    4. s/SOUND-SORCE/@3/g
    5. s/m5/@1/g
    6. s/eq13/eq/g
    7. s/mcr13/mcr/g
    8. s/tb13/tb/g
    9. s/T.Uwabo/@4/g
    10.  
    As you can see, it replaces various strings:
    • It replaces '$$$' with whatever @1 is
    • It replaces '1989.12.10' with @2
    • It replaces 'SOUND-SORCE' with @3
    • It replaces 'T.Uwabo' with @4
    Obviously, this script is meant to be applied to files with the copypasted header:

    Code (Text):
    1.  
    2. ;********************************************************
    3. ;*       $$$SNG81.S   ( SOUND DATA FILE )   *
    4. ;*              ORG. M5SNG1.31.S                   *
    5. ;*       'SOUND-SORCE'                           *
    6. ;*        for Mega Drive (Z80)           *
    7. ;*           VER  1.31/1989.12.10       *
    8. ;*               BY        T.Uwabo       *
    9. ;********************************************************
    10.  
    Now, this alone isn't too helpful, buuuuuut... there are batch files that use this sed script: fsub.bat and fsub1.bat:

    fsub.bat
    Code (Text):
    1.  
    2. echo off
    3. sed -e s/@1/%1/g -e s/@2/%2/g -e s/@3/%3/g -e s/@4/%4/g \M5\Z80\FMK\FSUB.SED > subtmp.tm1
    4. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1INT.SRC
    5. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1CNT.SRC
    6. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1CMD.SRC
    7. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1FMDR.SRC
    8. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1PSG.SRC
    9. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1PCM.SRC
    10. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1TB.SRC
    11. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SETB.SRC
    12. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1EQ.LIB
    13. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1TB.LIB
    14. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1MCR.LIB
    15. if "%5"=="src" goto skip
    16. if "%5"=="SRC" goto skip
    17. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SE.S
    18. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG81.S
    19. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG82.S
    20. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG83.S
    21. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG84.S
    22. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG85.S
    23. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG86.S
    24. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG87.S
    25. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG88.S
    26. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG89.S
    27. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8A.S
    28. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8B.S
    29. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8C.S
    30. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8D.S
    31. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8E.S
    32. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1SNG8F.S
    33. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1.BAT
    34. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1Z.BAT
    35. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1Z.MAC
    36. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1.DOC
    37. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1.MKF
    38. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,%1.LNK
    39. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,ALL.LNK
    40. COMMAND/C \M5\Z80\FMK\FSUB1 %1,%2,%3,%4,ERX68K.MAC
    41. :skip
    42.  
    What this does is, it converts '@1' and the like in fsub.sed to '%1', and saves it to a temp file called 'subtmp.tm1'. This temp file is then called by fsub1.bat...

    fsub1.bat
    Code (Text):
    1.  
    2. echo off
    3. echo/
    4. echo ---- now writing these datas to file : %5  ---------
    5. echo **/ proj. name:%1  / date:%2 / game name:%3 / parson:%4 /**
    6. if "%1"=="" goto usage
    7. sed -f subtmp.tm1 %5 > subtmp.tm2
    8. copy subtmp.tm2 %5 > nul
    9. goto end
    10. :usage
    11.    echo  / proj. name:%1  / date:%2 / game name:%3 / parson:%4 /FILE:%5 **
    12.    echo  WHEN SET THESE DATAS , WRITE THESE DATAS THE FILE %7
    13. :end
    14. /FILE:%5 **
    15.    echo  WHEN SET THESE DATAS , WRITE THESE DATAS THE FILE %7
    16. :end
    17. g subtmp.tm1>%5
    18. goto end
    19. :usage
    20.    echo  / proj. name:%1  / date:%2 / game name:%3 / parson:%4 /FILE:%5 **
    21.    echo  WHEN SET THESE DATAS , WRITE THESE DATAS THE FILE %7
    22. :end
    23.  
    Notice how %1 through %4 are labelled here?

    Code (Text):
    1. echo **/ proj. name:%1  / date:%2 / game name:%3 / parson:%4 /**
    Let's map this back to that list from earlier:
    • '$$$' is replaced with %1 ("proj. name")
    • '1989.12.10' is replaced with %2 ("date")
    • 'SOUND-SORCE' is replaced with %3 ("game name")
    • 'T.Uwabo' is replaced with %4 ("parson")

    But that's not all: the 68k source code has similar files too, including the same parameter labelling:

    fsub.bat
    Code (Text):
    1.  
    2. echo               Project Name : %1
    3. echo                       Date : %2
    4. echo                  Game Name : %3
    5. echo                     Person : %4
    6.  
    Notably, it also includes this line in fmk.bat:

    Code (Text):
    1.  
    2.     command /c ..\fmk\fsub %1 1991.1.16 Sound-Sample H.Kubota %2
    3.  
    Note that the date is significantly later than the one in the copypasted text it replaces:

    Code (Text):
    1.  
    2. ;=======================================================;
    3. ;       $$$SNG85.S  (Song Data)           ;
    4. ;              ORG. MDSNG115.S           ;
    5. ;       'Sound-Source'               ;
    6. ;        for Mega Drive (68K)           ;
    7. ;           Ver  1.1 / 1990.9.1       ;
    8. ;                     By  H.Kubota   ;
    9. ;=======================================================;
    10.  
    So let's reiterate: 'SOUND-SORCE' is the "game name", and while the 68k port did "correct" it to 'Sound-Source', its dev would later change his mind, and just use 'Sound-Sample' instead (notably, the same name written on the floppy disks).

    I think it's safe to say that 'SOUND-SORCE' is not the driver's name.
     
    Last edited: Jul 23, 2020
    • Informative Informative x 5
    • Agree Agree x 3
    • Like Like x 2
    • List