ChanServ 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://freenode.irclog.whitequark.org/~h~yamahasynths
<cr1901_modern> ZirconiumX: Oh, so they saved it after all
<cr1901_modern> There was a $1500 bounty to convert status register handling from the old method to the new one
<ZirconiumX> They crowdfunded some dev for it, yeah
<cr1901_modern> if I didn't get sick (and a few other factors were favorable), I would've considered doing it myself... and it would've been painful as hell
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Lord_Nightmare> from the comments there it could still use some improvement and trimming of many of the special cases some of which are irrelevant/possibly detrimental
<Lord_Nightmare> but it works
<Lord_Nightmare> and its probably light years better than whatever POS compiler dec used for the dectalk 1.8 and 2.0 firmware, most of which was written in C
<Lord_Nightmare> with a few pieces in asm
<Lord_Nightmare> c compilers for 68k in 1983 sucked ass
<Lord_Nightmare> from what i gather the first actually half decent compilers were late 80s
<Lord_Nightmare> the nice thing about the godawful code produced by the 1983 compiler is there's almost no optimization to speak of, so its pretty obvious what a lot of code was supposed to do
<Lord_Nightmare> there's also bugs. lots of them, in the libc that was used
<Lord_Nightmare> string handling fails catastrophically in the length-of-zero case for instance
<Lord_Nightmare> doesn't match posix
<Lord_Nightmare> also the compiler doesn't purely follow the "conventional" way of doing fastcalls etc which most c compilers ended up standardizing on later, i guess
andlabs has joined ##yamahasynths
<ej5> c compilers were the wild west back then.
<ej5> Lord_Nightmare, i heard a talk by Tom Duff about how he came up with Duff's Device. it occurred to him after reading the source code to the C compiler.
<ej5> basically there was a giant switch statement on the current statement, and he noticed that the code implementing "switch" and "case" had nothing in common with the code implementing the "while" loop.
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
<cr1901_modern> does Duff's Device predate the 1989 spec?
<cr1901_modern> Anyways, hope someone steps up to save AVR and VAX
<cr1901_modern> Though AVR is probably safe since it has an LLVM backend upstream
<whitequark> you can use duff's device in c++11
<whitequark> yosys does ;w;
<whitequark> well, not quite, but same idea
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Client Quit]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 245 seconds]
andlabs has joined ##yamahasynths
<__sen> cr1901_modern: what's this about VAX? I looked through scrollback but can't figure out what you're referring to
<cr1901_modern> __sen: gcc for VAX uses an old model in the RTX/RTL IR for condition codes. As of gcc 10, this old model is deprecated, and the plan is to phase out any archs that use the old model by gcc 11
<cr1901_modern> 68k got a crowdfund campaign which resulted in a gcc contributor doing the conversion themselves.
<cr1901_modern> I am wondering if there are efforts to do the same for VAX (and jury's still out on that one)
<cr1901_modern> NetBSD mailing list still has a decent amount of VAX activity, and talks about gcc refactor
<cr1901_modern> __sen: https://gcc.gnu.org/wiki/CC0Transition Details on how to do the conversion
<andlabs> speaking of
<andlabs> I got copyright clearance to restart a 68000 assembler I started a few years ago
<andlabs> so that'll happen too, and it'll be open source and not crap
<superctr__> random thing
<superctr__> one thing i like about ASM68K is the ability to rename registers in the local scope
<superctr__> for example "@counter equr d0" etc
<superctr__> then you can just refer to "@counter" instead of d0, and it's still treated as a local label so it doesn't clutter the namespace
<superctr__> it makes long asm functions really readable, i would like to see other assemblers do that also
l_oliveira has joined ##yamahasynths
<andlabs> hey l_oliveira
<l_oliveira> hi there
<andlabs> remember how you said the YM2164 had private DRM registers that just had $10 written to them?
<l_oliveira> something was figured out on that? I only said it had a DRM register, not how it worked
<andlabs> ah
<andlabs> but yeah, I did figure out something
<l_oliveira> I know it's something on the test register
<andlabs> the DX100 actually sets those registers to different values based on some parameters I don't know yet
<l_oliveira> it checks what chip it has?
<andlabs> no, it only sets the registers
<andlabs> they probably affect the output somehow
<l_oliveira> there is also the timer being different
<andlabs> the firmware just assumes it has a YM2164
<andlabs> so it only ever expects the test register to be in a different place, etc.
<andlabs> (the "LFO Sync" feature is done by pulsing the LFO reset bit)
<l_oliveira> would be interesting check what happens use a 2151 on it
<andlabs> some parameter change will cause it to write garbage to the test register
<andlabs> and LFO Sync will do nothing
<andlabs> but other than that it should work; it doesn't use the YM2164 timers at all
<l_oliveira> it could test the timer to tell what chip it has
<andlabs> its CPU is a Hitachi 6303 (6809-derived microcontroller) which has its own timers
<l_oliveira> 6303 is that 64 pins one, right?
<andlabs> I think???
<l_oliveira> it has a 6309 core, right?
<andlabs> it has several timers, several 8-bit ports, and a serial I/O UART
<l_oliveira> 6309 is like a 6809 with stamina
<l_oliveira> it's a big upgrade
<andlabs> I think it has a 6309 core??? the firmware doesn't use any 6309-exclusive opcodes or registers though
<l_oliveira> that thing has a ton of variants
<cr1901_modern> andlabs: Damnit, I thought about doing the same thing for fun XD.
<cr1901_modern> But who am I kidding? I would start that project and give up before I even finished the parser
<ej5> interesting, this ad lib card has a surround sound effects processor on it: https://www.ebay.com/itm/Natsteel-Megasound-soundcard-Adlib-clone-with-additional-sound-effects-Rare/143410256266
<TD-Linux> is it that weird socketed chip?
<cr1901_modern> TIL about the YM2411
<cr1901_modern> 3411*
<ej5> the 3411 is the processor
<TD-Linux> oh I assumed that was the dac
<cr1901_modern> that's the 3014 I think
<Lord_Nightmare> 6303 is a 6301 core, not 6809
<Lord_Nightmare> 6301 core is an mc6801 core with some added features
<Lord_Nightmare> 6801:6803 as 6301:6303
<Lord_Nightmare> the 03 versions are romless
<Lord_Nightmare> hitachi did make an hd6309 with added features but motorola threatened to sue them if they advertised them
<Lord_Nightmare> so they sold it as a faster 6809 but someone leaked how to enable the extra registers/features