To start experimenting with the networking code of the ESP32 game engine, I made a new board for the ESP32 so I can have two of them running the game and talking to each other. The new board was supposed to be just a copy of the original one, but I discovered a silly mistake I made in the original wiring: the red-high and red-low wires were reversed. This caused quite a mess in the colors, I'm surprised I didn't notice it before:
The "new dac" label refers to the fixed DACs I wrote about in the last post. I'm not sure I can see any difference between the old an new DACs, to be honest (my phone camera doesn't help -- its automatic color balance messes up the colors way more than my DACs, apparently).
In any case, it's easy to see the difference between the old and new
boards. Not only the new board's images have a blue-greenish tint
overall (less red), we can also see that the red gradient in the "P"
is clearly fixed -- what should be black
->dark red
->medium
red
->bright red
was wrongly shown as black
->medium red
->dark
red
->bright red
, which is happens when the low and high bits of the
red component are swapped:
correct gradient | swapped first and second bits | |
---|---|---|
binary | 00 01 10 11 | 00 10 01 11 |
decimal | 0 1 2 3 | 0 2 1 3 |
Of course, since we can select the ESP32 output pins any way we want,
it's easy to fix this in software by simply changing the pin
assignments in the pin_config
array in vga_game.ino
: just swap
PIN_RED_LOW
and PIN_RED_HIGH
. That's good news for me because I
don't feel like making a third board right now.
And finally, just for reference, here are all of the homemade boards I'm using in this project: