All Projects → AmokSolderer → APC

AmokSolderer / APC

Licence: GPL-3.0 license
Arduino Pinball Controller

Programming Languages

C++
36643 projects - #6 most used programming language
perl
6916 projects

Projects that are alternatives of or similar to APC

Workshops
Workshops organized to introduce students to security, AI, AR/VR, hardware and software
Stars: ✭ 162 (+500%)
Mutual labels:  hardware, software
Tetra3d
Tetra3D is a 3D hybrid software/hardware renderer made for games written in Go with Ebitengine.
Stars: ✭ 271 (+903.7%)
Mutual labels:  hardware, software
Pool2021
Pools organized for Epitech's students in 2021.
Stars: ✭ 19 (-29.63%)
Mutual labels:  hardware, software
WindowsMonitor
WMI namespaces and classes
Stars: ✭ 15 (-44.44%)
Mutual labels:  hardware, software
Nokia Book
NOKIA Book covers selected aspects of the telecommunication industry programmer's work
Stars: ✭ 87 (+222.22%)
Mutual labels:  hardware, software
Liqi
LiQi of robinwen.
Stars: ✭ 83 (+207.41%)
Mutual labels:  hardware, software
tamagotchi-tech-specs
Tamagotchi Tech Specs
Stars: ✭ 29 (+7.41%)
Mutual labels:  hardware, software
Fanctrl
FanCtrl is a software that allows you to automatically control the fan speed on your PC.
Stars: ✭ 102 (+277.78%)
Mutual labels:  hardware, software
Ibm Z Zos
The helpful and handy location for finding and sharing z/OS files, which are not included in the product.
Stars: ✭ 198 (+633.33%)
Mutual labels:  hardware, software
espism
A low cost ISM radio to wifi gateway
Stars: ✭ 38 (+40.74%)
Mutual labels:  hardware
trener
A simple programming challenge for implementing a train station app
Stars: ✭ 28 (+3.7%)
Mutual labels:  software
TENET
An analytical framework that models hardware dataflow of tensor applications on spatial architectures using the relation-centric notation.
Stars: ✭ 53 (+96.3%)
Mutual labels:  hardware
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+233.33%)
Mutual labels:  hardware
EvoArm
An open-source 3D-printable robotic arm
Stars: ✭ 114 (+322.22%)
Mutual labels:  hardware
jet
A Fast C and Python like Programming Language that puts the Developer first. WIP
Stars: ✭ 41 (+51.85%)
Mutual labels:  software
edgeai-lab-microcontroller-series
This repository is to share the EdgeAI Lab with Microcontrollers Series material to the entire community. We will share documents, presentations and source code of two demo applications.
Stars: ✭ 15 (-44.44%)
Mutual labels:  hardware
3d printed keyboard
A fully 3D printed computer keyboard
Stars: ✭ 31 (+14.81%)
Mutual labels:  hardware
PsxNewLib
Playstation controller interface library for Arduino
Stars: ✭ 81 (+200%)
Mutual labels:  hardware
kerntroller
No description or website provided.
Stars: ✭ 31 (+14.81%)
Mutual labels:  hardware
pink-0
Ableton Link to clock/reset signals converter
Stars: ✭ 87 (+222.22%)
Mutual labels:  hardware

The Arduino Pinball Controller

Before I explain what the APC is, let's first clarify what it is not.

The APC is no commercial drop-in replacement board. It is intended for people with some basic knowledge of programming and electronics who want to expand the possibilities of their pinball machine. That means it's going to require some work to set up your game even if you don't want to change anything, but run the original rules with PinMame. Take a look at the PinMame page to see what I mean.
As this is a private project with no commercial interest, you may use the APC at your own risk and I'm not liable for any damage that might occur to your machine while using it.
Some special machines might even not work with the APC or require additional HW. Please check the Known issues section for details.

Overview

The APC is a freely programmable controller for Williams pinball machines. It uses an Arduino Due and contains all the circuitry required to run a Williams pinball machine from System 3 to System 11c (and the compatible Data East machines):

  • Display interface for all corresponding display types
  • 24 Solenoid drivers
  • Lamp matrix drivers for 64 lamps
  • Switch matrix drivers for 64 switches + 8 non matrix switches
  • SD card interface (to store audio files, highscores and settings)
  • Audio amplifier with two channels (to play music and sound effects simultaneously / can be changed to single channel stereo)

To summarize the above it can be said that the APC does replace all CPU, power driver and sound related boards at a price of well below 100€ per board.

APC 2.0 The picture shows an APC 3.0 board configured for System 9 + 11 machines as the connectors for System 3 - 7 are not populated.
See my APC 3 video to get an impression what has changed compared to the previous versions.

Special features

  • Hardware extensions interface. The pinout is compatible to the Sound Overlay Solenoid Board used in games like Whirlwind, but it is upgraded a bit to support all kind of self made hardware
  • A socket for a Raspberry Pi which can be used to run PinMame on the APC board
  • PinMameExceptions are game specific code blocks that act like a man-in-the-middle between the game HW and PinMame. That means even if your game is running in PinMame you can still introduce some changes. Take a look at my Jungle Lord video or my Comet ball saver to see how a few lines of code can change a game dramatically.

Typical examples for the use of PinMameExceptions are:

  • Pre System11 games usually use just one audio channel, so you could add a background music track. Wouldn't it be great if your Disco Fever would play old Disco music in the BG?
  • Add HW toys like a shaker motor or flashers and the necessary rules to drive them. If your game has no free solenoid drivers left, then just add the Solenoid expansion board to get 8 more. You can also use the LED expansion board to control RGB-LED stripes or just connect your own individual HW.
  • Add a ball saver. Ball savers are quite easy to realize. All you have to do is not to tell PinMame that the ball has reached the outhole, but to kick it into the plunger lane instead. Watch my Comet video to see how it can be done with just a few lines of code.

The picture below shows an APC prototype in my Pinbot.

Pic Pinbot

To see the APC in an early stage you might want take a look at my Black Knight game video

Software

PinMame

The APC by itself cannot run the original Williams EPROM software, but you can use PinMame to emulate the pinball's hardware and run the old game SW on the APC. The easiest way to do this is to plug a Raspberry Pi on the APC board and install Lisy on it. The image file for the Pi's SD card and additional information about Lisy can be found on the Lisy project page. Note that only the Raspberry Pi Zero, Zero W, 3A+ and 3B+ models are currently supported by Lisy.
There's also a Lisy_Mini board available. The Raspberry Pi is then located on this board which can be conntected to the APC via USB. For more information about how to setup PinMame please have a look at my PinMame page.

With PinMame running for your game you can use the PinMameExceptions functionality of the APC to change the rules of your game even though it's running under PinMame control.
Watch my Jungle Lord video so see an example. The corresponding code can be found in PinMameExceptions.ino in the AmokPrivate branch on Github.
Another example is the ball saver I added to my Comet.

MPF

The APC is mainly meant to be a platform for people who want to program their own rules and features.
One way of doing this is to use the Mission Pinball Framework. It can run on a PC which then controls the APC via USB. For later it is also planned to let Lisy run MPF which would then work without a PC.

I did a short video with some basic MPF setup to test that everything is working:

MPF runs APC

C code

If you're familiar with C you can also program the APC directly. This SW would then run on the Arduino itself with no need for an additional PC or Raspberry Pi.
For this the APC software offers an API providing the necessary commands to control a pinball machine. It's still a lot of effort to program a game completely from scratch, but you could even run your game in PinMame and only use the API to do changes or extensions to the original rules.

The APC software itself consists of two parts: the operating system APC.ino and the game specific code. The former controls the hardware and offers an application interface (API) for the game specific software to use. For an overview of the available API variables and commands please take a look at the APC software reference.

I have written game codes for my Black Knight and Pinbot. They are still not final, but good enough to have fun with and to use as a reference when writing own code. Additionally there's a Base Code which should serve as a starting point for you to do your own game. It contains the very basics of a pinball game and it can be easily adapted to your machine. As a startup guide how to start writing game code I have written a short tutorial.

Please note that I have equipped my Black Knight with a special kind of display and that advanced APC commands like scrolling are currently not usable with pre System11 displays. This is because I think that these displays are not suited for homebrew machines. If you do all the work needed to do your own game code, you'd for sure want to have a display with letters, otherwise you wouldn't be able to even have a decent high score list. Additionally it would be quite cumbersome to debug some game software without the display being able to show letters. Therfore I recommend to use an early System11 display which has at least one row with alphanumeric displays (or build my System7Alpha). However, the basic software support is implemented, which means you can use the old displays without any restrictions you just have to do a bit more coding to get all the features. And if you just want to use them with PinMame to replace your old boards these displays will work perfectly well.

Hardware

The APC hardware status is mature. I have version 2.0 in use since January 2018 without anything to complain about. You can find the schematics, BOM and layout data in the hardware section. There have been some minor HW updates which are explained in the Changelog.

The APC features an HW extensions interface which is an 8 bit bus with several enable signals. At the moment there're two extension board available, but you could use it for all kinds of additional hardware.

The first board is an LED expansion board to control WS2812 based LED-Strips with the APC. For more information about this board please refer to the APC LED expansion board section.

The following picture shows the APC in a Comet with the LED Expansion board connected to the hardware extensions interface.

APC Comet LED

A short video with this setup can be found here :

GI LEDs

The second board is a driver for 8 additional solenoids. The current version is mainly suited for use with an own power supply (e.g. for 24V shaker motors).

I use special alphanumerical displays in my Black Knight which can also be found in the HW section as well as an LED replacement for the original System7 numerical displays.

Current Status (July 2022)

The following table gives an overview about the various system generations the APC can be used with and if at least one machine of each generation has been confirmed to work with it. Additionally you can see whether PinMame or MPF have been tested with at least one machine of this generation and whether some special preparation like additional cables are required. Details about these cables can be found here

The PinMame support is still under development and even if a generation is basically supported you still need the audio files for your particular game. A list of available audio files and a description how to extract your own files can be found on the PinMame page.

Williams System Tested PinMame support MPF support Comment
3 Not yet Not yet Yes
4 Yes Not yet Yes
6 Yes Yes Yes
7 Yes Yes Yes Needs two additional wires
9 Yes Yes Yes
11 Yes Yes Yes
11a Yes Yes Yes Some cable ties have to be cut and the wiring harness opened a bit
11b Not yet Not yet Yes
11c Yes Yes Yes The wires of three connectors must be extended

The following Data East MPUs are almost identical to their counterparts from Williams but DE used 2.1 audio boards. Check the known issues for details

Data East Version Tested PinMame support MPF support Comment
1 Not yet Yes Yes audio needs a cable adapter and is only mono
2 Not yet Yes Yes audio needs a cable adapter and is only mono
3 Yes Yes Yes Only non DMD machines / audio needs a cable adapter and is only mono / probably some cable extensions are needed

Changes / What's new?

A history of the recent changes can be found in the Changelog

Known issues

Stereo audio

Some games like Jokerz! or Data East games starting from MPU version 1 have stereo or even 2.1 audio boards. These are currently not supported by the APC SW.
From the HW point of view, the APC is capable of generating two independent sound channels which could also be used for stereo. But up to now they're used to generate separate channels for sounds and music which are combined in the output amplifier.
In order to use these machines with the APC you'd have to build a cable adapter and the audio would only be mono.

Stepper motors

Games like Jokerz! or Riverboat Gambler use stepper motors to drive a wheel in the backbox and the amount of steps being generated determine where the wheel stops.
Alas, there's a problem with Lisy/PinMame not sending all steps to the APC. This means it is not possible for the APC to determine at which position the wheel is supposed to stop.
Note that this is not a problem of the APC itself, but occurs only when Lisy/PinMame is used. If you program your game code in C there won't be any problems.

Rollergames music problems

The Rollergames implementation in PinMame has a bug in the music control. For some reason a new music track is started every few seconds. Most of the time it's the same track that's already running. I have therefore implemented a workaround in the PinMameExceptions of the Rollergames which prevents that the running music track can be restarted. This improves the situation somehow, but more sophisticated PinMameExceptions are needed to really fix this.
Up to now only Rollergames seems to be affected, other machines using the same audio boards are working fine.

Feedback

Feedback is very important for me, because if there is none I must assume that nobody is interested in this project and that I can stop to bother with additional documentation. And albeit I have tried my best to help you to become familiar with this project, there will be questions and I am willing to do some support. Like I said, it's a hobby so don't expect 24/7 availability, but I'll do my best to help.

So if you're interested please leave some feedback in the Flippertreff forum (german) or in the - Pinside Form (english).

How to get a board?

I'm sorry, but I'm not going to sell them. You can order boards from JLCPCB, but before you do so I'd recommend to read the documentation below.

Documentation contents

1 Building and setting up an APC
1.1 How to start - If you want to start using the APC you should read this page first.
1.2 Useful software tools - Simple tools for audio data conversion and so on
1.3 APC settings - a table of the settings and how to use them
1.4 Initial Tests - how to start it up for the first time and use the Test Mode of the Base Code
1.5 Base Code setup - set up the Base Code for your machine
1.6 APC schematics - just in case you want to know what you're about to build
1.7 If things don't work - If you have a problem, check here first

2 Writing my own game code - You want to program your own game in C? Then read this.
2.1 Game code tutorial
2.2 APC software reference - All commands of the API in a nutshell

3 Running PinMame
3.1 Lisy Homepage - Location of the Lisy SW download and more
3.2 The APC and PinMame - shows the current status of the APC and Lisy running PinMame
3.3 PinMame howto - If your game is not yet supported, you can learn here how to change that
3.4 PinMame game numbers - list of the PinMame game numbers
3.5 Controlling Lisy - updating Lisy and using the debug mode
3.6 Instructions for extracting sound files - automatic extraction of sound files and the use of Audacity in more detail (by Mokopin)

4 Using MPF
4.1 MPF runs APC - see my first humble MPF steps in this video
4.2 MPF setup - my MPF test config files 4.3 Lisy runs MPF

5 Additional APC hardware - boards that might come in handy with the APC
5.1 APC LED expansion board - a board to control WS2812 based LED strips with the APC
5.2 APC solenoid expansion board - to control additional features
5.3 System 7 alphanumeric display - to have alphanumerical displays in a pre System 11 machine

6 Additional non APC hardware - just some stuff I designed over the years. Can also be used without the APC
6.1 System 7 LED display - an LED replacement display for System 7, purely numerical
6.2 System 11a LED display - an LED replacement display for System 11a

7 APC games - Complete games running natively on the APC (no PinMame)
7.1 Black Knight - Complete game code with some additional features

8 Videos - For the generation Youtube
8.1 What's new in APC3 - Gives an overview about what the APC is and what version 3 can do
8.2 Lisy, APC and PinMame - Shows the use of PinMame in an early stage
8.3 PinMameExceptions - What is a PinMameException and how does it work?
8.4 Adding a ball saver with PinMameExceptions - Another example of how to use PinMameExceptions
8.5 APC MPF - A simple demonstration of the APC being controlled by MPF
8.6 GI LEDs - Shows the LED_exp board in action
8.7 Arduino Pinball Controller hardware extensions interface - Also shows the use of the LED_exp board, but in an early SW stage
8.8 APC Black Knight demo - My first APC video. Not really up to date any more, but it shows the basics
8.9 How to use numerical displays - How to navigate the menus when you can't read any text
8.10 How to adjust the display setting to a 2x16 alphanumerical display - How to find the right setting to make these displays work

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].