System 18 multi - 6) Reverse-Engineering the 315-5436 custom chip

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • System 18 multi - 6) Reverse-Engineering the 315-5436 custom chip

      Sorry guys, didn't take the time to write the article sooner.

      No real surprises from Sega here.
      S18 is based on S16 so we just have the same banking mecanism here with the following differences:
      - S16 uses only 2 registers for tile banking versus 8 on S18
      - introduction of external sprite banking registers on S18 (16 registers, accessible by pair)

      Having previoulsy reversed the tile banking chip (315-5298, Signetics PLS153, DIP20) found on some System 16B romboards and the security chip (317-0xxx,
      Altera EPM5032DC, DIP28) found on System 24 romboards I could make a lot of educated guess.

      Program banking:

      As said before 171-5987 romboards have an extra pair of sockets for program ROMs.
      On 171-5874 romboards /CE signal for program ROMs comes from the CN4 connector.
      On 171-5987 romboards, first pair of program ROMs (@A4/A6) still have their /CE signal tied to the CN4 connector.
      Second pair have this signal coming from the 315-5436 custom chip.
      Program code space is software defined by setting base address and range for region 0 ($FE0021/23).

      Generated A14/A17/A18/A19 signals by the custom chip aren't needed for the multi, Sega simply used them to accomodate different EPROM sizes and reduce number
      of driven devices from the same lines (fan out, the multi replaces four 8bit devices by a single 16bit one). Thus you can directly use address signals coming from the CN3 connector.

      Then, /CE signal for higher program ROMs for Desert Breaker for instance can be simply reduced to !ROM1 + A18 (OR): !ROM1 gives us the 0x200000 region and A18 restrict it to
      0x207FFF.

      Tile banking:

      There are 8 tile banking registers, each can be set by writting to a specific address. Base address is defined through the memory mapping registers.

      Example for Clutch Hitter:
      - Base address register for region 1 ($FE0027) is set to 0x20 (= base address $200000)
      - Memory control register for region 1 ($FE0025) is set to 0x03 (= 2Mb size)
      This means tile banking register are mapped from $200000 to $3fffff.
      In reality registers appears mirrored every 0x100, higher addresses being insignificant since there are less than 0x100 registers.
      So writting to $200001 is equivalent than writting to $200101 or $3E0001.
      Clutch Hitter precisely uses a hard coded base address of $3E0000 which is in the expected range:
      - Tile banking register 1: $3E0001
      - Tile banking register 2: $3E0003
      - Tile banking register 3: $3E0005
      - Tile banking register 4: $3E0007
      - Tile banking register 5: $3E0009
      - Tile banking register 6: $3E000B
      - Tile banking register 7: $3E000D
      - Tile banking register 8: $3E000F

      Each register define the tile bank for different sets of tiles depending of their higher data bits:
      - register 0: tiles with bit 12/13/14 cleared
      - register 1: tiles with bit 12 set, 13/14 cleared
      - register 2: tiles with bit 13 set, 12/14 cleared
      - register 3: tiles with bits 12/13 set, 14 cleared
      - etc.

      I first reversed one address line, A13 for tile ROMs. This needed a GAL22V10 device since 8 bits must be latched plus the generated A13 signal = 9 outputs.

      Equations are identical for other address lines except for the data bits.
      But here comes a design issue: tile banking alone needed 8 GAL chips!
      At first I continued on this route in order to quickly validate my work with the parts I had handy. But for production a solution had to be found (as always
      more on this later).

      Sprite banking:

      Similar but easier than tile banking since there are half less registers.

      One last but not least info: I got the multi fully working with all games!
      So next step is to tidy up the design by using a CPLD to embed all the needed logic (I'm using an ATF1508 since it's still a current product and supports +5V).
      Looking for:
      - OutRun boardset even untested or not working
      - Sega Super Scaler hardware (Out Run, Model X, Model Y), even with faulty PCM chip



      01010011 01000101 01000011 01010010 01000101 01010100 00100000 01001101 01000101 01001110 01010101 00100000 01000111 01010101 01011001

      The post was edited 1 time, last by Apocalypse ().

    • Aaand I just scooped up a System 18 in anticipation that you might be engineering a solution.
      Bravo on your efforts.
      Keep up the great work :)
      Videogame Historian
      Bench : Saturn Phoebe Type 2 | Midway Seattle (Blitz 2000 Gold) | N64 Multi
      WANT : Air Buster | Irem M92
      [astrocity] InstaGram [neogeo] My Arcade Projects Photoblog [saturn] My VAPS PCBs [nes-101] My Twitch Channel
    • Nodoyuna wrote:

      What Game should be the best donor for the multi?
      The cheapest you can find since you only need a working motherboard. Also please ensure it's equipped with a standard 68000 CPU (10Mhz) in place of the custom FD1094 module.
      Looking for:
      - OutRun boardset even untested or not working
      - Sega Super Scaler hardware (Out Run, Model X, Model Y), even with faulty PCM chip



      01010011 01000101 01000011 01010010 01000101 01010100 00100000 01001101 01000101 01001110 01010101 00100000 01000111 01010101 01011001