Bionic Commando and CPS1 systems feature brightness control. Let's see how that works.
Most arcade games have four bits for each colour component: red, green and blue. These four bits are each a digital signal which can be either 5 Volt or 0 Volt. Arcade boards connect resistors to these signals to produce an analogue scale. Four bits mean that each new bit has twice the weight in the result than the previous one; so the resistors also have a 2x relationship. This is a very cheap way of making a digital to analogue converter.
Bionic Commando adds one more set of resistors connected with these ones. These resistors are connected at the same time to all three colour components. There are three bits controlling these resistors and when each bit is either 0 or 5V that moves up or down the value of all colour components, affecting brightness.
The way I translate that to the FPGA is as follows:
1. Simulate the analogue circuit for all input combinations. This can be done with a paper and pen calculation too, as the circuit is simple enough.
2. Once analogue voltages for all combinations are known, translate that into a digital number
3. Choose the minimum number of bits that will be faithful to the analogue signal changes
For Bionic Commando, I chose to use 5 bits per colour component to include the brightness effect. MAME went for 4 bits, maybe because of some emulator logic they had to be compatible with. Going for less than 5 does reduce fidelity, going for more than 6 will produce the same result as 5, as the hardware cannot produce more colours.
I have chosen some illustrations for this explanantion. You can see the schematics with the original circuit. Caius (twitter user @Caius63417737) gave me measurements for the resistors so I could simulate the circuit. Then there is a table with all values in voltages, then all values as a 0-31 numbers (5 bits) and a plot illustrating the effect of brightness bits.
This is very technical, but I know that many of you like this :-)
Andrew Boudreau
2019-10-27 14:27:48 +0000 UTCJOTEGO
2019-10-27 09:49:15 +0000 UTC