Open mikelatiolais opened 5 years ago
Instead of columns and rows, I'm defining it as banks. Each board represents 2 banks of 8 bit values. In teensy: struct { int board_id; UINT8 bank_a_value; UINT8 bank_b_value; } oppa_board
int banks[48] //total number of banks( 8 boards x 3 i2c busses x 2 banks)
========
in pinmame oppa struct { struct *oppa_board; int bank; (0 = a, 1 = b) int position; } oppa_lamp
lamp[col][row] is array of oppa_lamp pointers lampobj = lamp[col][row] oppa
Lamps are driven in wpc/core.c void core_setLamp(UINT8 lampMatrix, int col, int row) and void core_setLampBlank(UINT8 lampMatrix, int col, int row)
So, in OPPA, we define lamps in columns and rows as well, to match this. If we assume that we are keeping the ordering of the lamps, then we can just set (col * 8) + row to set/blank the lamp.