Metadata-Version: 2.3
Name: dmd-config
Version: 0.1.0
Summary: A DMD configuration tool from DirectB2S files in Visual Pinball ini
License: GPL-3.0-or-later
Keywords: vpinball,dmd,directb2s,pinball,vpinballx,pincab
Author: Le-Syl21
Author-email: sylvain.gargasson@gmail.com
Requires-Python: >=3.12
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Games/Entertainment
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Requires-Dist: numpy (>=2.2.2,<3.0.0)
Requires-Dist: opencv-python (>=4.11.0.86,<5.0.0.0)
Requires-Dist: pillow (>=11.1.0,<12.0.0)
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Description-Content-Type: text/markdown

# DMD Config Tool

A command-line tool to automatically configure DMD (Dot Matrix Display) and Backglass settings for Visual Pinball tables using DirectB2S files.

## Features

- Automatic DMD area detection in DirectB2S files
- Support for both 2 and 3 screen setups
- Precise template-based rectangle detection
- Configurable screen layouts via YAML file
- Optional image extraction for debugging

## Installation

```bash
pip install dmd-config
```

## Usage

Basic usage:
```bash
dmd-config your_table.directb2s
```

Save extracted images for debugging:
```bash
dmd-config -s your_table.directb2s
```

Use custom screen configuration:
```bash
dmd-config -c custom_config.yaml your_table.directb2s
```

## Configuration

Create a `DMD_config.yaml` file to define your screen layout:

```yaml
screens:
  # Primary display for the playfield
  Playfield:
    id: 1
    size_x: 3840
    size_y: 2160

  # Display for the DMD (set size_x: 0 for 2-screen setup)
  DMD:
    id: 2
    size_x: 1920
    size_y: 1080

  # Display for the backglass
  BackGlass:
    id: 3
    size_x: 2560
    size_y: 1440
```

## Output

The tool generates an INI file with the same name as your DirectB2S file, containing all necessary settings for:
- PinMAME DMD window
- FlexDMD window
- B2S window settings
- Screen positions and dimensions

## Requirements

- Python 3.8 or higher
- OpenCV
- NumPy
- Pillow
- PyYAML

## License

This project is licensed under the GNU General Public License v3 (GPLv3).

## Contributing

Found a bug or want to contribute? Feel free to open an issue or submit a pull request on GitHub.

## Author

Le-Syl21 (sylvain.gargasson@gmail.com)

