cr1901 changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://libera.irclog.whitequark.org/~h~yamahasynths
natalie has quit [Ping timeout: 265 seconds]
natalie has joined ##yamahasynths
<tunixman> "catgirls? in my alt-right movement? It's more likely than you think."
emeb has joined ##yamahasynths
_whitelogger has joined ##yamahasynths
emeb has quit [Ping timeout: 272 seconds]
<Lord_Nightmare> cr1901: a crc like crc16 or crc32 is basically an LFSR where you XOR-mix in one bit of a data stream each shift, then dump the state of the LFSR at the very end
emeb has joined ##yamahasynths
emeb has quit [Ping timeout: 240 seconds]
emeb has joined ##yamahasynths
<Lord_Nightmare> annoyingly, the direction that the ccitt-crc stuff shifts is rightward, which makes easily ORing in a new bit register-length-dependent which makes implementation in a generic way difficult
andlabs has joined ##yamahasynths
<Lord_Nightmare> this method makes a lot of sense for architectures with a carry bit easily accessible and a ROR/ASR usable in assembly, but annoying in c
<Lord_Nightmare> had they done it shifting leftward though, it would be easily done in C AND could also be done in microcontrollers with a rotate opcode
<andlabs> I now have a YIS-604 (consumer version of the CX-7M)
<Lord_Nightmare> oh cool!
<andlabs> I also see lo-tech makes an IDE adapter for the Yamaha C1 specifically
<andlabs> huh
<andlabs> I have one of those too; I think the PSU is dead
<andlabs> giant wedge
<dragonmux> a: Lord_Nightmare, may I interest you in this then: https://github.com/DX-MON/APNG/blob/master/crc32.hxx | https://github.com/DX-MON/APNG/blob/master/crc32.cxx - works for any crc32 polynomial.. could be fairly easily extended to any CRC size w/ one or two extra parameters
<NiGHTS> APNG/crc32.hxx at master · DX-MON/APNG · GitHub
<dragonmux> a: that's currently a C++11 implementation but we're considering taking that and sticking it in substrate as a C++17 implementation or trying to make it more generic
<tpw_rules> you've heard of crcany right?
<dragonmux> we actually haven't
<dragonmux> we came to this type-safe C++ implementation on our own a few years ago
<tpw_rules> yours is probably implemented better but crcany is a great reference for all the types
<dragonmux> we wouldn't say it's implemented better or worse.. it's just.. implemented.. with unit tests and as much compile-time asserted as we could find to check
<dragonmux> (IIRC the main static_assert() is on the polynomial calculation)
<tunixman> dragonmux: that's excellent.
emeb has quit [Quit: Leaving.]