trunk/src/mame/video/homerun.c
| r17763 | r17764 | |
| 53 | 53 | |
| 54 | 54 | WRITE8_MEMBER(homerun_state::homerun_color_w) |
| 55 | 55 | { |
| 56 | /* from PCB photo: |
| 57 | bit 7: 470 ohm resistor \ |
| 58 | bit 6: 220 ohm resistor - --> 470 ohm resistor --> blue |
| 59 | bit 5: 470 ohm resistor \ |
| 60 | bit 4: 220 ohm resistor - --> 470 ohm resistor --> green |
| 61 | bit 3: 1 kohm resistor / |
| 62 | bit 2: 470 ohm resistor \ |
| 63 | bit 1: 220 ohm resistor - --> 470 ohm resistor --> red |
| 64 | bit 0: 1 kohm resistor / |
| 65 | */ |
| 66 | |
| 67 | // let's implement it the old fashioned way until it's found out how exactly the resnet is hooked up |
| 56 | 68 | int r, g, b; |
| 57 | 69 | int bit0, bit1, bit2; |
| 70 | |
| 58 | 71 | bit0 = (data >> 0) & 0x01; |
| 59 | 72 | bit1 = (data >> 1) & 0x01; |
| 60 | 73 | bit2 = (data >> 2) & 0x01; |
| r17763 | r17764 | |
| 67 | 80 | bit1 = (data >> 6) & 0x01; |
| 68 | 81 | bit2 = (data >> 7) & 0x01; |
| 69 | 82 | b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; |
| 83 | |
| 70 | 84 | palette_set_color(machine(), offset, MAKE_RGB(r,g,b)); |
| 71 | 85 | } |
| 72 | 86 | |