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> https://twitter.com/cr1901/status/1295902004808744963 Ready to be eviscerated in 3... 2... 1...
<cr1901_modern> (According to a comment on another video, this refinement works on real hardware. The song as-is in the ROM apparently only uses half the FM and PSG channels and thus was probably unfinished).
<fseidel> further confirming that Beta S3's music is better than final.
<cr1901_modern> Yes, that's the point :). But you'll piss a lot of ppl off if you say that
<cr1901_modern> It also helps that I grew up w/ the PC version of the games, which had these versions of the tracks
<cr1901_modern> (which of course weren't as good since they used General MIDI or OPL when they were composed for OPN)
DrPatater has joined ##yamahasynths
Patater has quit [Ping timeout: 265 seconds]
<cr1901_modern> So imagine my surprise when I found out they were the original tracks all along. And what's stopping a re-release now? Put in the beta tracks to sidestep the legal issues and call it a day!
<fseidel> I have to say, I will miss Ice Cap and the credits theme. I think the final still wins for those 2
<cr1901_modern> agreed for icecap, not so much for credits
doppler has quit [Remote host closed the connection]
<Lord_Nightmare> the beta tracks as pointed out, need work
<Lord_Nightmare> getting the original composers to clean them up may be tricky
<Lord_Nightmare> someone will need to clean up the tracks, keep them in the original engine form, and somehow figure out how to re-inject them into the game ROM in such a way that it doesn't take more space than the removed tracks did
<Lord_Nightmare> it sounds to me like buxar and jackson may not have got full legal clearance from their bands/labels to do songs in sonic 3 anyway
<Lord_Nightmare> which might be a more significant legal issue preventing rereleases than the fact that jackson is persona non-grata due to the whole pedophile case
<Lord_Nightmare> especially now that hard times, an unreleased buxar track at the time, actually got a release
<Lord_Nightmare> so the record label could C&D any rerelease of sonic 3
<cr1901_modern> Oh, no kidding?
<Lord_Nightmare> that's how i understand things, i may well be wrong though
<cr1901_modern> In addition, a few ppl reached out to Cirocco Jones about Sonic 3's legal issues. It didn't go well.
<Lord_Nightmare> who is cirocco jones and how are they involved here
<cr1901_modern> I don't remember the details, but his reply hinted there was legal trouble w/ this music
<cr1901_modern> He's one of the composers to Sonic 3
<Lord_Nightmare> I'm actually convinced jackson didn't want his name attached to sonic 3 because his label wouldn't have allowed him to contribute
<Lord_Nightmare> and hence the only way sonic 3 can ever see a legal release now is if all the offending tracks are FULLY REMOVED from the rom, zeroed out, and/or replaced with other music
<Lord_Nightmare> that's how i see things
<Lord_Nightmare> using the beta music should be fine, as long as the composers of THAT music are ok with it
<cr1901_modern> How did Sonic and Knuckles collection get a release then :)?
<Lord_Nightmare> because nobody noticed, and that release was when the shit hit the fan, i'm guessing
<cr1901_modern> They had to have had the original tracks in order to do that
<Lord_Nightmare> the PC release with the different music was done for the exact reason of all this
<Lord_Nightmare> sega knew there was legal shit brewing with the sonic 3 music
<Lord_Nightmare> possibly even back then
<Lord_Nightmare> but had to ship it because they couldn't go back and fix it
<Lord_Nightmare> was probably too late in development when they found out the songs were tainted
<Lord_Nightmare> that's my guess
<cr1901_modern> But the prototype just a month or two before the final ROM had the original tracks. Why would they go and replace untainted tracks w/ tainted tracks?
<Lord_Nightmare> if someone wants to volunteer to purge all the buxar/jackson/etc music from sonic 3, and inject new music using the SMPS or whatever engine
<Lord_Nightmare> cr1901_modern: my guess is they didn't know until possibly the game had gone to duplication
<Lord_Nightmare> that's probably why there's no more buxar or jackson tracks on the 'and knuckles' lock on cart i don't think
<Lord_Nightmare> just in base sonic 3
<Lord_Nightmare> the added tracks on the lock on cart are from someone else iirc
<cr1901_modern> My theory is: the original beta tracks were from the Japan side of things. Sega didn't know whether the US tracks would be done in time, so they kept that as a backup
<Lord_Nightmare> that's possible
<cr1901_modern> Howard Drossin did some of them
<cr1901_modern> the & Knuckles part
<cr1901_modern> of course, don't ask him about it (AIUI, he's about done talking about Sanic)
<Lord_Nightmare> i suspect the drossin tracks are fine legally
<Lord_Nightmare> its the jackson/buxar/jones tracks that are not
<Lord_Nightmare> of course, WHICH tracks are the bad ones? do we know for certain who composed each track?
<Lord_Nightmare> we know for sure buxar did the ice track which was just an FM remix of 'hard times'
<cr1901_modern> We don't- Jun Senoue told someone who asked in an email which tracks he did
<cr1901_modern> so we know those (Gumball)
<cr1901_modern> but he said he's not allowed to discuss who did the other tracks (if he even remembers)
<Lord_Nightmare> there was hush money and possibly legal settlement stuff involved here, i'm sure of it
<Lord_Nightmare> if nobody will talk about it
<Lord_Nightmare> maybe jackson paid everyone a lot of money to say nothing about who wrote what to try to muddy the water so his label wouldn't find out
<Lord_Nightmare> who knows
<cr1901_modern> When the PC port was done, my theory is that there wasn't a good tool to extract the beta music from either prototype EPROMs _or_ from an earlier source code. So Sega used the original assets, which they still had.
<Lord_Nightmare> regardless, if we know exactly which tracks DIFFER between the beta and the final, we can assume all of those are tainted and just start by removing those tracks and all samples they use
<Lord_Nightmare> replace with silence
<cr1901_modern> I don't think it's that farfetched that they still have the original assets
<Lord_Nightmare> that should make a legally kosher ROM
<Lord_Nightmare> even if a bunch of levels and credits have no music
<cr1901_modern> Hah
<Lord_Nightmare> that would be a baseline to start from
<Lord_Nightmare> now remember what i said about japanese composers?
<Lord_Nightmare> i believe its common in japan for a composer to retain the IP right to their music
<Lord_Nightmare> iirc this is the case with a bunch of konami stuff
<Lord_Nightmare> and the dragon quest music from square-enix
<cr1901_modern> Then why did Sonic 1 and 2 get released just fine?
<cr1901_modern> Hell, the ending song of Sonic 2 was a song played on the radio
<Lord_Nightmare> no idea. maybe sega paid someone
<Lord_Nightmare> i think the issue with sonic 3 is the wacky way jackson handled things in a grey-legal way
<cr1901_modern> By Dreams Come True: https://www.youtube.com/watch?v=of5n484ptGM
* cr1901_modern nods
<cr1901_modern> Anyways, I don't think injecting the beta tracks is some insurmountable task. Especially if they still have the original assets, which seems reasonable to me.
<cr1901_modern> Surprised there's no rom hack doing it yet
<Lord_Nightmare> i doubt sega has the code for this. they MIGHT but i kinda doubt it
<Lord_Nightmare> they didn't have the outrun arcade source code
<cr1901_modern> assets, not code
<cr1901_modern> i.e. what the music composers sent them
<Lord_Nightmare> they had to go to one of the devs who still had his PC88xx dev box and 8" disks in storage to recover the sample from the outrun ROM which was masked wrong on every shipping machine
<Lord_Nightmare> luckily the original sample was recoverable from the disks
<Lord_Nightmare> i think i've told this story before
<cr1901_modern> >which was masked wrong on every shipping machine
<cr1901_modern> Wait... they nuked the source code THAT fast?!
<Lord_Nightmare> no, what happened there was just stupidity
<Lord_Nightmare> i suspect the outrun source code was around from 1986 to 1991 at least
<Lord_Nightmare> the problem with the outrun mask ROM was this:
<Lord_Nightmare> the original sound programmer had made 8-bit samples of a Yamaha RX11 drum machine, downsampled a bunch to run on sega's SegaPCM 8-bit sample player chip used on hang on, outrun, super hang on, etc pre-system-16 hardware
<Lord_Nightmare> he then burned a bunch of eproms with the final samples, stuck them in an outrun machine prototype and they worked. he burned a second copy of them to send to a mask ROM duplication company to turn into mask roms for use on every outrun cabinet
<Lord_Nightmare> somewhere in the process of burning those roms for sending to duplication and the duplication house seeing them, the D5 line on the ROM becamse stuck high
<cr1901_modern> ouch
<Lord_Nightmare> just one of the roms. iirc there's actually 6 sample roms.
<Lord_Nightmare> opr-10188.71 on every shipping outrun machine has D5 stuck high on the mask ROM
<Lord_Nightmare> there's nothing wrong with the mask rom, its just masked with the wrong data
<Lord_Nightmare> for the 3ds rerelease of outrun, the original composer was consulted and noticed that the samples sounded godawful
<Lord_Nightmare> and hunted in his attic and found the dev machine and got the correct original sample data
<Lord_Nightmare> btw if you compare the SUM16 for the bad mask ROM with the SUM16 for the good one, only one digit is different i think
<Lord_Nightmare> that's probably how it slipped by the ROM mask manufacturer
<cr1901_modern> Shouldn't even a 1-digit difference been caught? ._.
<cr1901_modern> Anyways, this is why you use crcs, kids
<Lord_Nightmare> https://nc.rysk.us/s/aZ72FaacYgEi3NN is the ROM as shipped with the game
<cr1901_modern> https://github.com/jacktang/outrun-roms They are also on Github, conveniently
<Lord_Nightmare> https://nc.rysk.us/s/xeiW6Y8ZiPBGHA7 is the corrected ROM from the 3ds rerelease
<Lord_Nightmare> both converted to wav for ease of listening
<Lord_Nightmare> the game music sounds a LOT better with the fixed ROM
<cr1901_modern> Is there really only 2 seconds of samples on that ROM?
<Lord_Nightmare> anyone with an outrun machine should burn a new one
<Lord_Nightmare> yep, its drums, short samples.
<cr1901_modern> how big is the ROM?
<cr1901_modern> 32kb
<cr1901_modern> it says right in the file :P
<Lord_Nightmare> its a 23256 mask rom, replace with a 27256 eprom
<cr1901_modern> sample rate/depth?
<Lord_Nightmare> 8 bit depth, the samplerate can vary iirc
<Lord_Nightmare> depending on how the segapcm thing is programmed from the sound cpu or whatnot
<Lord_Nightmare> segapcm is a neat sampler but very very limited
<Lord_Nightmare> the MultiPCM chip that replaced it after 1991 is a rebranded/custom marked Yamaha YMW258-F GEW8 and is FAR more capable than the old SegaPCM chip was
<Lord_Nightmare> and when the saturn came out in 1995, sega replaced the MultiPCM chip with the custom-developed YMF292 SCSP chip which was even more capable than MultiPCM and did both samples and customizable FM on one chip
<cr1901_modern> >It presumably allows up to 16MB of sample ROM provided by the board but has additional banking hardware with a six bit bank number leading to a total of up to 1GB of addressable sample data (assuming optimal conditions). 
<cr1901_modern> 1GB of samples is all you'll ever need
<Lord_Nightmare> the SCSP i believe sega used until the dreamcast with its AICA which is basically an SCSP and an ARM sound cpu on one die, I think?
<Lord_Nightmare> and that lasted through naomi, naomi2, and sega-sammy atomiswave
<cr1901_modern> Oh so even Dreamcast has FM synth?
<cr1901_modern> >Rather than using this chip, Sega decided to use a simple DAC for its main arcade board at the time, the Sega System 16 board >>
<cr1901_modern> When I go to the wiki page for Sega System 16, it says it uses a " uPD7751" ADPCM chip
<Lord_Nightmare> that's true
<cr1901_modern> so... which is it? Does it bytebang a DAC or use that chip?
<cr1901_modern> Or are they calling the "uPD7751" a glorified DAC?
<Lord_Nightmare> upd7751 is technicaly a mask programmed 8048 microcontroller with a program inside which decodes ADPCM and dumps it out a DAC
<Lord_Nightmare> the upd7759 which sega used later on in a few places but konami was the major user of (TMNT hardware) is an ASIC-ified, much more capable descendant of the upd7751
<Lord_Nightmare> so yes upd7751 is a "sound chip" but its really an MCU pretending to be a sound chip
<cr1901_modern> So, like the Sound Blaster DSP?
<Lord_Nightmare> not unlike the capcom qsound chip really being a mask programmed AT&T WE-DSP16A dsp
<Lord_Nightmare> yes VERY much like the sound blaster dsp
<Lord_Nightmare> same idea
<Lord_Nightmare> MAME can low level emulate the DSP16A btw but its slow as FUCK, it really needs a static recompiler and a lot of love. instead, superctr and ValleyBell wrote, using the dsp16a code as guidance, a VERY FAST, bit-accurate(?) HLE of the qsound chip, which MAME now uses
<Lord_Nightmare> the only parts that aren't bit accurate are writes to internal ram stuff which is used as temporary storage space by the dsp16a and can trigger some debug stuff like dumping ROM or ram out the pcm/dac port
<Lord_Nightmare> the HLE doesn't emulate that
<cr1901_modern> (I do NOT want to get into this can of worms, but by bit accurate you mean the bits that show up on the input/output ports are always correct, but the timing isn't emulated?)
DrPatater is now known as Patater
<Lord_Nightmare> the bits on the output ports match what the DSP would put o the output ports, afaik
cr1901_modern has quit [Ping timeout: 240 seconds]
cr1901_modern1 has joined ##yamahasynths
<ValleyBell> Yes, we reimplemented the entire DSP program in C/C++.
<ValleyBell> So unless there are bugs in the code we didn't notice, its output is bit-accurate.
cr1901_modern1 has quit [Quit: Leaving.]
cr1901_modern has joined ##yamahasynths
_whitelogger has joined ##yamahasynths
doppler has joined ##yamahasynths
Sarayan has joined ##yamahasynths
<cr1901_modern> ValleyBell: My pedantic question is: "Is there a difference between bit accurate and cycle accurate"?
emeb has joined ##yamahasynths
<Lord_Nightmare> https://twitter.com/beast1x5/status/1296123862875279360 I have (or had) one of those in the basement here which doesn't power up. if it hasn't been thrown away, and anyone wants to fix it...
<racoon> 15:10 ::: Sarayan [~galibert@2a01:e35:2fd7:ec20:3e8c:f8ff:fe21:d13] has joined ##yamahasynths
<cr1901_modern> racoon: Indeed, he was chatting in #nmigen earlier
<Sarayan> ipv6 address? That's new
<Sarayan> LN: what is it?
<superctr> <Lord_Nightmare> MAME can low level emulate the DSP16A btw but its slow as FUCK, it really needs a static recompiler and a lot of love. instead, superctr and ValleyBell wrote, using the dsp16a code as guidance, a VERY FAST, bit-accurate(?) HLE of the qsound chip, which MAME now uses <- I'd say the biggest performance killer is the cycle accurate emulation that MAME uses
<superctr> DSP16A emulation itself wouldn't be that difficult if you just made it sample accurate, that is emulate all instructions until the sample output (writes to serial output registers) and calculate the time until the next update based on the amount of cycles taken
<superctr> But that's against the "MAME way" of course
<Lord_Nightmare> Sarayan: its a vhs-player with a built in crt screen
<Lord_Nightmare> my guess is something in the power supply part is no good
<Lord_Nightmare> on the one i have
<Lord_Nightmare> ... does anyone here have a copy of EAGLE installed? I have a schematic file in eagle format that i need to convert/render to a .pdf
<ValleyBell> cr1901_modern: You can be "bit-accurate" without being "cycle-accurate", for example if you take shortcuts for certain things.
<ValleyBell> or if you implement it e.g. with another algorithm that has the same output as the original code
<ValleyBell> basically, if you would speed up DSP16A emulation the way ctr described above, you could still be bit-accurate (regarding DSP output), but the code may not be cycle-accurate, because you can't accurately sync the DSP with the main CPU that sends commands to it.
<andlabs> are it and that msx track not in that girth of unused music in the PC-88 version?
emeb has quit [Ping timeout: 240 seconds]
emeb has joined ##yamahasynths
<ZrX-oMs> Lord_Nightmare: I have
<cr1901_modern> andlabs: I would have no idea. I just think it was neat :P