{
  "_notes": [
    "Stern Nine Ball (MPU-200, 7-digit scoring).  Based on m200-7digit-B.map.json.",
    "2022-12: Original Seawitch map compiled by HorsePin (high score only).",
    "2025-07: Tom Collins fixed high score; added game scores, player count.",
    "2025-11: Tom Collins added audits, adjustments, and additional game state.",
    "2025-11: Tom Collins expanded maps to cover all Stern MPU-200 games."
  ],
  "_fileformat": 0.8,
  "_metadata": {
    "version": 3,
    "copyright": [
      "Copyright (C) 2022 by HorsePin",
      "Copyright (C) 2025 by Tom Collins <tom@scorbit.io>"
    ],
    "license": "GNU Lesser General Public License v3.0",
    "platform": "stern-m200",
    "roms": [
      "nineball"
    ]
  },
  "game_state": {
    "_notes": [
      "`final_scores` only updated at end of each ball; `scores` represents display memory"
    ],
    "credits": {
      "label": "Credits",
      "encoding": "bcd",
      "start": "0x2CE"
    },
    "scores": [
      {
        "label": "Player 1",
        "start": "0x000",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 2",
        "start": "0x004",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 3",
        "start": "0x008",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 4",
        "start": "0x00C",
        "length": 4,
        "encoding": "bcd"
      }
    ],
    "final_scores": [
      {
        "label": "Player 1",
        "start": "0x280",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 2",
        "start": "0x291",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 3",
        "start": "0x2A2",
        "length": 4,
        "encoding": "bcd"
      },
      {
        "label": "Player 4",
        "start": "0x2B3",
        "length": 4,
        "encoding": "bcd"
      }
    ],
    "current_ball": {
      "label": "Current Ball",
      "start": "0x37",
      "encoding": "bcd"
    },
    "ball_count": {
      "label": "Ball Count",
      "encoding": "dipsw",
      "offsets": [
        7
      ],
      "values": [
        3,
        5
      ]
    },
    "current_player": {
      "label": "Current Player",
      "start": "0x38",
      "encoding": "bcd"
    },
    "player_count": {
      "label": "Players",
      "start": "0x2EC",
      "encoding": "bcd"
    },
    "game_over": {
      "_notes": "reading 'game over' lamp",
      "label": "Game Over",
      "start": "0x1F",
      "encoding": "bool",
      "mask": "0x04"
    },
    "tilted": {
      "_notes": "reading 'tilt' lamp",
      "label": "Tilted",
      "start": "0x1F",
      "encoding": "bool",
      "mask": "0x08"
    },
    "max_credits": {
      "label": "Max Credits",
      "encoding": "dipsw",
      "offsets": [
        19,
        18
      ],
      "values": [
        10,
        15,
        25,
        40
      ]
    }
  },
  "high_scores": [
    {
      "label": "1st",
      "short_label": "#1",
      "score": {
        "encoding": "bcd",
        "length": 4,
        "start": "0x2CA"
      }
    }
  ],
  "adjustments": {
    "Adjustments": {
      "01": {
        "label": "Replay Level 1",
        "encoding": "bcd",
        "start": "0x2C4",
        "length": 2,
        "scale": 10000
      },
      "02": {
        "label": "Replay Level 2",
        "encoding": "bcd",
        "start": "0x2C6",
        "length": 2,
        "scale": 10000
      },
      "03": {
        "label": "Replay Level 3",
        "encoding": "bcd",
        "start": "0x2C8",
        "length": 2,
        "scale": 10000
      },
      "04": {
        "label": "Current HSTD",
        "encoding": "bcd",
        "length": 4,
        "start": "0x2CA"
      }
    }
  },
  "audits": {
    "Audits": {
      "05": {
        "label": "Current Credits",
        "encoding": "bcd",
        "start": "0x2CE"
      },
      "06": {
        "label": "Total Plays",
        "encoding": "bcd",
        "start": "0x2CF",
        "length": 3
      },
      "07": {
        "label": "Total Replays",
        "encoding": "bcd",
        "start": "0x2D2",
        "length": 2
      },
      "08": {
        "label": "HSTD Achieved",
        "encoding": "bcd",
        "start": "0x2D4",
        "length": 1
      },
      "09": {
        "label": "Coin Chute #2",
        "encoding": "bcd",
        "start": "0x2D5",
        "length": 3
      },
      "10": {
        "label": "Coin Chute #1",
        "encoding": "bcd",
        "start": "0x2D8",
        "length": 3
      },
      "11": {
        "label": "Coin Chute #3",
        "encoding": "bcd",
        "start": "0x2DB",
        "length": 3
      },
      "12": {
        "label": "Balls Played",
        "encoding": "bcd",
        "start": "0x2DE",
        "length": 2
      },
      "13": {
        "label": "# of Top Bank wow",
        "encoding": "bcd",
        "start": "0x2E0",
        "length": 2
      },
      "14": {
        "label": "# of 8 Bank wow",
        "encoding": "bcd",
        "start": "0x2E2",
        "length": 2
      },
      "15": {
        "label": "Special Awards",
        "encoding": "bcd",
        "start": "0x2E4",
        "length": 2
      },
      "16": {
        "label": "Replay 1 Passed",
        "encoding": "bcd",
        "start": "0x2E6",
        "length": 2
      },
      "17": {
        "label": "Replay 2 Passed",
        "encoding": "bcd",
        "start": "0x2E8",
        "length": 2
      },
      "18": {
        "label": "Replay 3 Passed",
        "encoding": "bcd",
        "start": "0x2EA",
        "length": 2
      }
    }
  }
}
