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
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 265 seconds]
<KitsuWhooa> ValleyBell: neat! What are the hacks? Curious
<cr1901_modern> So I stopped following closely after the ROMs were dumped- which projects are using/intend to use the CM32P ROMs?
<KitsuWhooa> no idea
<KitsuWhooa> but would be nice to have a munt-equivalent
<KitsuWhooa> VB is writing a mame driver for it
<cr1901_modern> The hell is munt?
<KitsuWhooa> MT-32 emulator
<cr1901_modern> ahhh
<KitsuWhooa> it's what I used to record the CM-64 music :p
<cr1901_modern> https://github.com/munt/munt Looks like it's still semi-active
<KitsuWhooa> I mean, it works fine, soooo
<ValleyBell> KitsuWhooa: There is a function in the ROM that writes the text to a 32-byte buffer under some conditions manually raises the interrupt for writing from that buffer to the LCD.
<ValleyBell> I patched the ROM, so that it always raises the interrupt: https://github.com/ValleyBell/mame/blob/cm32p/src/mame/drivers/rcm32p.cpp#L231
<KitsuWhooa> Aaaah, I see
<ValleyBell> Interestingly there is a "data buffer" in the MAME driver for D-110 and MT-32 that caches all LCD "data" writes and flushes them at the next "control" write.
<ValleyBell> However that code doesn't seem to work with the 32P firmware.
<ValleyBell> just doing direct (unbuffered) writes works just fine instead
<ValleyBell> Now I can even switch between certain test modes using the keyboard :)
<ValleyBell> (it crashes after switching 2 times though)
<cr1901_modern> Wait, ValleyBell you have the actual unit now?
<KitsuWhooa> No, I do :p
<KitsuWhooa> that's the mame driver
<cr1901_modern> ahhh
<ValleyBell> I'm not sure how far I want to go with the MAME driver, but I would like to get it so far that it boots "normally" and processes some MIDI commands so I can have a look at what it does.
<ValleyBell> I also still have to figure out how the sample table works. (IC18, offset 0x100, 0x0A bytes per entry)
<KitsuWhooa> shouldn't be too difficult in theory
<ValleyBell> There are 2 tables in the IC18 ROM, btw: a tone/instrument table (offset 0x1000, 128 entries I think, 85 valid ones) and a sample table (offset 0x0100, 0xA8 entries)
<ValleyBell> The tone table contains the instrument name and various parameters. ("tone type", a few note numbers, sample IDs, some stuff I haven't figured out yet)
<ValleyBell> I haven't yet figured out how the sample table works.
<Sarayan> since it's a rompler it shouldn't be too hard to reach basic sample playing
<Sarayan> I can help if you need some
<ValleyBell> Thanks! I'm sure I'll take your offer sooner or later.
l_oliveira has joined ##yamahasynths
andlabs has joined ##yamahasynths
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andlabs has joined ##yamahasynths
andlabs has quit [Ping timeout: 245 seconds]
ej5 has quit [Quit: Leaving]
andlabs has joined ##yamahasynths
<cr1901_modern> https://twitter.com/g_yotuya/status/1190099434379431936 THIS is the good shit
<cr1901_modern> About $75, the creator is only selling them in Japan, but they say "DM if you're overseas and want one"
* KitsuWhooa wishes he could get himself to work on his projects
<KitsuWhooa> https://tasossah.com/CameraPics/P1110982.JPG this thing has been on the back burner for years
<cr1901_modern> sounds about right in my case too :P
<KitsuWhooa> maybe one day I'll find out what that fake 2151 sounds like
<andlabs> wait, what is that device?
<andlabs> is that just a package?
<andlabs> is it a player for some format?
<andlabs> is it a MIDI synth?
<cr1901_modern> I have no idea, but I want it anyway
<cr1901_modern> it's a player of some sort
Stilett0 is now known as Stilett0-away
<l_oliveira> that's the CY5000 one
<l_oliveira> I think it has bad envelope generator, play the guile song from SF2 on it
<cr1901_modern> cy5000?
<l_oliveira> CY5001 actually
<l_oliveira> there's a picture of one
<l_oliveira> CY5002 is the DAC
<KitsuWhooa> l_oliveira: pretty sure it's fake
<KitsuWhooa> no idea what exactly it is though
<KitsuWhooa> it does produce a sine wave though :p
<l_oliveira> some fakes do sound perfect
<l_oliveira> but that one doesn't
<l_oliveira> if you put that on games that don't do fancy stuff you won't notice it's fake
<KitsuWhooa> yeah, no way to test it :p
<l_oliveira> for example golden axe, altered beast use the 2151 very trivially
<l_oliveira> you can play VGMs through iit
<l_oliveira> it's similar to putting it there
<KitsuWhooa> yes, but I don't have something that can do it
<KitsuWhooa> that was the point of that arduino board
<KitsuWhooa> :p
<KitsuWhooa> I came across what appeared to be an avr-gcc bug and gave up
<l_oliveira> well there are open source projects already which do that, also I've seen Japanese guys who sell boards which do that as well
<KitsuWhooa> yes, that requires either money or building something else :p
<l_oliveira> there is one which takes a YM2151 and a YM2608 on a single board
<l_oliveira> nice stuff lol
<andlabs> meh
<andlabs> I'll just stick with my Yamaha FB-01 =P
<l_oliveira> can you play VGMs on it?
<l_oliveira> Different purposes, no?
<l_oliveira> @cr1901_modern: http://www.citylan.it/wiki/index.php/YM2151
<l_oliveira> Now that's interesting
<l_oliveira> a list of fake YM2151s
<KitsuWhooa> Ah, I found the bug. Basically this code compiled with avr-gcc will print 0xFF https://tasossah.com/txt/i_have_no_idea_what_the_fuck_is_going_on_with_avr
<KitsuWhooa> same thing but with only three items in the array
<KitsuWhooa> (gdb) p gpio
<KitsuWhooa> $1 = {{reg = 255 '\377', dta = 255 '\377'}, {reg = 255 '\377', dta = 255 '\377'}, {reg = 255 '\377', dta = 255 '\377'}}
<KitsuWhooa> I'm not sure what about those pages is fake :p
<cr1901_modern> The "equivalence tables"
<ValleyBell> Okay, now that I've figured out how to properly boot the CM-32P via emulation (and where the test mode "SW A/B" are connected), I can actually see some diagnostic message:
<ValleyBell> "ERROR 2 3 "
<ValleyBell> 2 = MIDI IN/OUT, 3 = PCM ROM
<Lord_Nightmare> pcm ROM must not be mapped right, or fail its ROM test i guess
<Lord_Nightmare> midi in/out means maybe the int/clock source for the midi clock is wrong, i think the mt-32 that clock is divided down by an asic and fed to one of the 8095 int pins?
<Lord_Nightmare> i suspect it works the same way on the cm-32p
<ValleyBell> It might fail the PCM card test, actually.
<ValleyBell> (that's also 3)
<ValleyBell> The MIDI clock should be right, as I took the MT-32 driver as a reference.
<ValleyBell> and something is probably not connected properly
<KitsuWhooa> Maybe EXINT?
<KitsuWhooa> It's the only line I can see that'd be of interest between the 8098 and the IC that has the 32.768 crystal
<KitsuWhooa> Also, the schematic says MHz
<KitsuWhooa> I wonder if that's a mistake
<KitsuWhooa> But then it also says Xtal 12Mhz which is obviously incorrect, unless I'm missing something, because that's not a 12MHz crystal
<KitsuWhooa> ValleyBell: do keep in mind that in order for the midi in/out test to run you have to loop them externally
<KitsuWhooa> it sends data to midi out and then reads it back through midi in
<KitsuWhooa> if they aren't connected externally, it'll fail
<ValleyBell> oooh, right, that should be it then
<ValleyBell> lol, it actually checks for the scrambled bytes of the "Roland" string that is at the beginning of the ROM
<KitsuWhooa> that's one way of doing it
<KitsuWhooa> I guess CRC would be too much to ask :p
<ValleyBell> ROM access seems pretty expensive.
<ValleyBell> It writes to like 8 different registers, then counts down from 40 to 0, then does the "read".
<ValleyBell> The only thing I can blame them for is unrolling all that stuff.
<ValleyBell> Okay, for the PCM ROM check to succeed - except for the "PCM card" part.
<ValleyBell> It expects to read an instrument "E.GRAND 1" from the location of the PCM card.
<ValleyBell> ... does it want the SN-U110-04 card to be inserted?
<ValleyBell> well... even the service notes say that tests 2 and 3 may fail and "This is not abnormal".