YM2151 sound chip cloned on MIST

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

User avatar
jotego
Captain Atari
Captain Atari
Posts: 221
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

YM2151 sound chip cloned on MIST

Postby jotego » Tue Aug 09, 2016 1:23 pm

Some of you may know that I've been working on a clone of the famous Yamaha chip YM2151. This chip produced the sound of hundreds of arcade games and also of the X68000 home computer. My clone is not a port of the ym2151 emulated in MAME. Indeed, I have found several issues in MAME's version as I was taken measurements of the chip to make my clone. Having said that, the work done in MAME is awesome. I have the clone very advanced, with exact output waveforms, and by exact I mean down to the bit and down to the output clock cycle.

I still have a few weeks of work ahead, but the code can be used to make an arcade port to MIST (either the full system, or just the sound subsystem) or to port one of the Japanese computers that used this chip. At this stage, it would be helpful to get one more designer on board who starts trying to implement the code on MIST.

If anyone is willing to spend some time making an implementation of a classic arcade game from late 80's/early 90's, please let me know. Also, making a port of the X68000 computer would be great!

Anyway, I plan to release the code during Autumn with full documentation and see if the scene can produce good stuff with it. If it is well received, I might also do other Yamaha chips.
--
Source code of all my cores here.
My Patreon page here.

ericgus
Atari Super Hero
Atari Super Hero
Posts: 503
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: YM2151 sound chip cloned on MIST

Postby ericgus » Tue Aug 09, 2016 2:49 pm

Awesome!.

is this the same audio chip used in the Sega genesis/megadrive ?

User avatar
Newsdee
Atari God
Atari God
Posts: 1545
Joined: Fri Sep 19, 2014 8:40 am

Re: YM2151 sound chip cloned on MIST

Postby Newsdee » Tue Aug 09, 2016 3:12 pm

Genesis is YM2612 and came later. But this is still great news. A x68000 core would be awesome :) but the arcade side is not too shabby either... R-Type, Double Dragon, etc.

ericgus
Atari Super Hero
Atari Super Hero
Posts: 503
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: YM2151 sound chip cloned on MIST

Postby ericgus » Tue Aug 09, 2016 3:43 pm

Newsdee wrote:Genesis is YM2612 and came later. But this is still great news. A x68000 core would be awesome :) but the arcade side is not too shabby either... R-Type, Double Dragon, etc.


Indeed.. any contribution is a good thing!

User avatar
jotego
Captain Atari
Captain Atari
Posts: 221
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: YM2151 sound chip cloned on MIST

Postby jotego » Tue Aug 09, 2016 4:08 pm

ericgus wrote:Awesome!.

is this the same audio chip used in the Sega genesis/megadrive ?


I bought a couple of YM2612 (megadrive) parts to make measurements and design a clone too, but I am really spending long hours doing this one so I will need to take a break after I'm done.
--
Source code of all my cores here.
My Patreon page here.

duhproject
Atari freak
Atari freak
Posts: 54
Joined: Fri Jan 15, 2016 6:57 pm

Re: YM2151 sound chip cloned on MIST

Postby duhproject » Tue Aug 09, 2016 5:06 pm

jotego wrote:
ericgus wrote:Awesome!.

is this the same audio chip used in the Sega genesis/megadrive ?


I bought a couple of YM2612 (megadrive) parts to make measurements and design a clone too, but I am really spending long hours doing this one so I will need to take a break after I'm done.


This is VERY good news. Thank you!

User avatar
farvardin
Captain Atari
Captain Atari
Posts: 387
Joined: Fri Jan 01, 2010 5:50 pm
Location: France
Contact:

Re: YM2151 sound chip cloned on MIST

Postby farvardin » Tue Aug 09, 2016 9:56 pm

yeah, it's a pleasure to know the Yahama soundchips are still getting some well-deserved love...

Will you also implement the DAC associated with the chip (YM3012), or it won't be necessary, if you can use the DAC from the MiST?
Like on this: http://forum.gadgetfactory.net/index.ph ... -chip-r81/ (btw he's talking about a FPGA implementation of the 2151)

I own this arduino board with the YM2151: http://chipmusic.org/forums/topic/17710 ... r-arduino/ / https://sites.google.com/a/ooishoo.org/www/ym2151shield
You probably have something similar...

Being able to use the MiST as a FM synth would be awesome!

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2782
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: YM2151 sound chip cloned on MIST

Postby alexh » Wed Aug 10, 2016 12:05 pm

jotego wrote:Some of you may know that I've been working on a clone of the famous Yamaha chip YM2151. I plan to release the code during Autumn with full documentation and see if the scene can produce good stuff with it.

Looking forward to seeing it. Atari System 1 anyone?

User avatar
jotego
Captain Atari
Captain Atari
Posts: 221
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: YM2151 sound chip cloned on MIST

Postby jotego » Wed Aug 10, 2016 1:09 pm

farvardin wrote:Will you also implement the DAC associated with the chip (YM3012), or it won't be necessary, if you can use the DAC from the MiST?!


The YM3012 adds some colour to the sound too. I am not going to characterize the non-idealities of this ADC but for one: the "blind" spots. As a consequence of the floating point format some numbers are rounded down during the output. For instance, if a channel is outputting anything between 8176 and 8191, it will all look like 8176 at the chip output. My implementation gives the floating point output, as the real chip. (This is one of the differences with MAME). By the way, in case you were expecting decimal numbers, just divide by 32767 to get the equivalent values (0.24952 to 0.24998 outputs all look like 0.24952)

And yes, a sigma-delta DAC implemented inside the FPGA should be enough. The sound has a dynamic range of 16 bits, although the resolution is less because of the floating point effect. I'll have to check how MiST's DAC is implemented...
--
Source code of all my cores here.
My Patreon page here.

knabo
Atariator
Atariator
Posts: 28
Joined: Sun May 18, 2014 6:12 am

Re: YM2151 sound chip cloned on MIST

Postby knabo » Thu Aug 11, 2016 4:36 am

This is fantastic!!! One thing that comes to mine is that it is nearly identical to the YM2164, which I used to own in the form of a Yamaha FB-01. These chips were packaged as FM expansion units for MSX computers, and were even built into Yamaha's own MSX computers, aimed specifically at music production/sequencing.

I believe the 1chipMSX core that's been ported to the MiST currently has only an implementation of the YM2413, and I'm not sure what the quality of it is. In any case there's no doubt that the YM2151/2164 would be superior. So if there's a way to implement it in the MSX core, that would be very interesting.

I will be keeping an eye on this...

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 943
Joined: Fri Apr 24, 2015 12:10 pm

Re: YM2151 sound chip cloned on MIST

Postby vebxenon » Fri Aug 12, 2016 7:27 am

knabo wrote:This is fantastic!!! One thing that comes to mine is that it is nearly identical to the YM2164, which I used to own in the form of a Yamaha FB-01. These chips were packaged as FM expansion units for MSX computers, and were even built into Yamaha's own MSX computers, aimed specifically at music production/sequencing.

I believe the 1chipMSX core that's been ported to the MiST currently has only an implementation of the YM2413, and I'm not sure what the quality of it is. In any case there's no doubt that the YM2151/2164 would be superior. So if there's a way to implement it in the MSX core, that would be very interesting.

I will be keeping an eye on this...


MSX Music (FM PAC) standard uses OPLL YM2413, ths same that uses also the Sega Master System at Japan and supported by a lot of games and software, and MSX Audio (Music Module) uses an OPL compatible chip, the Y8950, with very few games supporting it but great for music software and demoscene. Sounds like Megadrive. YM2413 would be included on Master System core.

No game used ever YM2164-YM2151 on MSX and it was only included on the musical MSX Yamaha CX-5.

Regards,

Salva
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

knabo
Atariator
Atariator
Posts: 28
Joined: Sun May 18, 2014 6:12 am

Re: YM2151 sound chip cloned on MIST

Postby knabo » Fri Aug 12, 2016 2:26 pm

vebxenon wrote:MSX Music (FM PAC) standard uses OPLL YM2413, ths same that uses also the Sega Master System at Japan and supported by a lot of games and software, and MSX Audio (Music Module) uses an OPL compatible chip, the Y8950, with very few games supporting it but great for music software and demoscene. Sounds like Megadrive. YM2413 would be included on Master System core.

Ahh, thank you for clarifying!

vebxenon wrote:No game used ever YM2164-YM2151 on MSX

I am aware of this, but I don't really play video games so that's not of concern to me. I'm more interested in music/MIDI sequencing/chiptunes on older platforms, so the ability to recreate the CX5M II would still be really interesting... especially given the MiST's MIDI compatibility. I don't know if there were any other MSX computers aimed directly at music production.

vebxenon wrote:it was only included on the musical MSX Yamaha CX-5.

It's true that the CX5M II was the only one with it built in, but that's not the whole story. You can read more about the Yamaha SFG here: https://www.msx.org/wiki/SFG which tells us that:

"The SFG is a FM Sound Synthesizer Unit module for the 60 pins side slot on the Yamaha CX and YIS computers: the CX series were only sold in music shops and the SFG module was included with the computer, though also sold separately; the YIS series were available in the same shops as other MSX computers and generally sold without SFG module.

With a little adapter (UCN-01), the SFG module can also be inserted into the cartridge slot of any other MSX computer. However, this adapter is not required on some computers released by Victor (HC-5 and HC-6) or Sakhr/Al Alamiah (AX-100 and AX-200), which were also manufactured by Yamaha."

User avatar
jotego
Captain Atari
Captain Atari
Posts: 221
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: YM2151 sound chip cloned on MIST

Postby jotego » Sat Aug 27, 2016 7:00 am

Just a little update... The clone takes a bit less than 1,000 flip flops. It fits well in a small FPGA such as the Spartan 6 used in ZX-UNO (20% of it). I do not have the Altera tools installed so I cannot say exactly how much it takes from a Cyclone III (MIST) but it will be a smaller percentage than that of the Spartan 6.

I hear that there is a OPL2 clone that is too large for most FPGAs. Well, two weeks ago my JT51 (code name for the YM2151 clone) took three Spartan3-700 devices. After moving to a pipeline architecture (and a lot of pain), it only takes 20% of a Spartan3-700. So I think an OPL2 should fit too with the right design. That means a possible PC+SB16 clone in MIST...
--
Source code of all my cores here.
My Patreon page here.

breiztiger
Captain Atari
Captain Atari
Posts: 219
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: YM2151 sound chip cloned on MIST

Postby breiztiger » Sat Aug 27, 2016 7:03 am

Nice Work !!!

PC+sb16 ... A dream :o
Last edited by breiztiger on Sat Aug 27, 2016 9:54 am, edited 1 time in total.

User avatar
farvardin
Captain Atari
Captain Atari
Posts: 387
Joined: Fri Jan 01, 2010 5:50 pm
Location: France
Contact:

Re: YM2151 sound chip cloned on MIST

Postby farvardin » Sat Aug 27, 2016 9:34 am

well done! Keep us updated about your progresses!

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 943
Joined: Fri Apr 24, 2015 12:10 pm

Re: YM2151 sound chip cloned on MIST

Postby vebxenon » Tue Aug 30, 2016 6:57 am

Well done :)
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

mahen
Captain Atari
Captain Atari
Posts: 251
Joined: Mon Aug 26, 2013 3:11 pm
Location: France

Re: YM2151 sound chip cloned on MIST

Postby mahen » Tue Aug 30, 2016 9:44 am

Congrats & thanks for this great work :)
Amiga user non-stop since 1993 ;-)
Win 1997-2001 / MorphOS 2002-2005 / Linux since 2005

weirdocollector
Atari User
Atari User
Posts: 34
Joined: Wed May 27, 2015 3:56 pm

Re: YM2151 sound chip cloned on MIST

Postby weirdocollector » Tue Aug 30, 2016 8:36 pm

Great job!

Thanks a lot! :D

User avatar
Estrayk
Captain Atari
Captain Atari
Posts: 261
Joined: Mon Nov 23, 2015 2:52 pm
Location: Spain

Re: YM2151 sound chip cloned on MIST

Postby Estrayk » Tue Aug 30, 2016 10:37 pm

great !
・Falcon ct60e・Atari MegaSTE ・Atari STe ・MIST ・MISTer・

User avatar
jotego
Captain Atari
Captain Atari
Posts: 221
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: YM2151 sound chip cloned on MIST

Postby jotego » Sun Sep 18, 2016 10:19 am

I have just completed a first FPGA implementation of JT51 (my YM2151 clone). Although there are a few pending items I have to solve, I was increadibly happy to hear it sound for the first time. I'd like to share it with you. Please consider it a preview. I will release the JT51 verilog source code together with abundant documentation on the 27th of October.

Here is the music of Contra arcade, track 0x43, played by JT51 on a real FPGA.

By the way, with the release of JT51 I am planning to release some actual use cases. I made a poll to choose. The choices are in Spanish, but all the system/game names are in English so you can choose which one you'd like to see done on the release from it. Please vote here.
--
Source code of all my cores here.
My Patreon page here.

User avatar
Newsdee
Atari God
Atari God
Posts: 1545
Joined: Fri Sep 19, 2014 8:40 am

Re: YM2151 sound chip cloned on MIST

Postby Newsdee » Sun Sep 18, 2016 10:42 am

Great work! Can't wait to hear more tracks!

btw: your link is not open to public viewing, check your google doc settings
Last edited by Newsdee on Sun Sep 18, 2016 10:53 am, edited 1 time in total.

User avatar
farvardin
Captain Atari
Captain Atari
Posts: 387
Joined: Fri Jan 01, 2010 5:50 pm
Location: France
Contact:

Re: YM2151 sound chip cloned on MIST

Postby farvardin » Sun Sep 18, 2016 10:45 am

It sounds amazing! How can you create music with it? Does it read VGM format for example?

weirdocollector
Atari User
Atari User
Posts: 34
Joined: Wed May 27, 2015 3:56 pm

Re: YM2151 sound chip cloned on MIST

Postby weirdocollector » Sun Sep 18, 2016 2:05 pm

Outstanding work!!

User avatar
Xtro
Atari maniac
Atari maniac
Posts: 90
Joined: Fri Jan 09, 2015 11:47 am
Location: Spain

Re: YM2151 sound chip cloned on MIST

Postby Xtro » Sun Sep 18, 2016 5:41 pm

Well done jotego, that sounds very good. Already voted ;)

User avatar
DrOG
Atari Super Hero
Atari Super Hero
Posts: 706
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: YM2151 sound chip cloned on MIST

Postby DrOG » Sun Sep 18, 2016 7:13 pm

Nice!
Voted already too!


Return to “MiST”

Who is online

Users browsing this forum: No registered users and 5 guests