Dotmation support & further optimizations - can now be accepted#47
Conversation
| if (in_base_pin != SDATA_X16) { | ||
| // We only send, so disable the TX FIFO to make the RX FIFO deeper. | ||
| // Joining is not possible with data east x16 | ||
| sm_config_set_fifo_join(&c, PIO_FIFO_JOIN_RX); |
There was a problem hiding this comment.
This had to be donne to make use of the pio_sm_put function. Remember that the isr is still 4 x 32 bits deep. So we have nothing to worry about.
| jmp x-- lsb_msb_check ; loop for ~65.5 µs (based on 125MHz clkdiv) | ||
|
|
||
| set x, 5 ; 0b101 | ||
| set x, 7 ; 0b111 |
There was a problem hiding this comment.
After talking to Vincent, it turned out PinMAME shades for x16 are correct. This corrects the shades as we had it wrong
| // --------------------------------- | ||
|
|
||
| static constexpr uint8_t map_nibble_de_x16(uint8_t p) { | ||
| return (p <= 3) ? p : (p == 4) ? 1 : (p == 8) ? 2 : (p == 10) ? 0 : 3; |
There was a problem hiding this comment.
After talking to Vincent, it turned out PinMAME shades for x16 are correct. This corrects the shades
| // 1/0/1/0 => 2 | ||
| // 1/1/0/0 => 2 | ||
| // 0/0/1/1 => 2 | ||
| else if (value == 3 || value > 4 || |
There was a problem hiding this comment.
Tested. And now the algo also runs for Capcom HD. We successfully lock in each time, and due to less branches it needs to check now Capcom HD doesn't crash the program!
| DMD_SEGA_HD, | ||
| DMD_GOTTLIEB, | ||
| DMD_ALVING, | ||
| DMD_ROMSTAR, |
There was a problem hiding this comment.
romstar separate addition as it can't lock in like capcom (different patterns)
Newly supported hardware system: Dotmation
After testing the previous huge pio reduction pr #46 for a little longer, it turned out some final corrections were needed, and I now also took the time to reduce the framedetect instructions further.
All systems have been tested with the current code and are confirmed working. The PR can be merged and re-added as lib to ZeDMD.