You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!

Reverse engineer gate logic of the YM2149

General discussions or ideas about hardware.
Gunstick
Posts: 61
Joined: 22 Aug 2017 12:42

Reverse engineer gate logic of the YM2149

Post by Gunstick »

Hi

while I work on my presentation on ST chiptunes, there are some remaining questions to be solved. Those were mainly raised by Ben (OVR) who works on the sc68 emulator.
Well, what about decapping the chip and watching the silicon?
Some twitter later:

there is some work done on the AY:
http://privatfrickler.de/blick-auf-den- ... ay-3-8910/
Even with indicating which logic part is where.
Now need to get some people to translate the silicon photos into logic gates/transistors.
Keep in mind that the photo is from an AY, which has 16 steps on the envelope, whereas the YM has 32 steps. Mystery: how do those 32 steps stand in relation to the 16 steps of the volume registers?
From this site https://bulba.untergrund.net/elect_e.htm I got some pointers to google stuff
russian english translation:
https://translate.google.com/translate? ... edit-text=

One question I'm asking myself, how is it that when a channel is disabled in the mixer that setting that channel's volume effectively produces a "pop" sound in the output. It's that characteristic which makes digisound possible. But why does the chip do that?

Georges
User avatar
exxos
Site Admin
Site Admin
Posts: 27906
Joined: 16 Aug 2017 23:19
Location: UK

Re: Reverse engineer gate logic of the YM2149

Post by exxos »

Interesting project ! I have no idea that stuff though :(
keli
Posts: 97
Joined: 22 Aug 2017 13:34

Re: Reverse engineer gate logic of the YM2149

Post by keli »

Gunstick wrote: 20 Oct 2017 22:22 One question I'm asking myself, how is it that when a channel is disabled in the mixer that setting that channel's volume effectively produces a "pop" sound in the output. It's that characteristic which makes digisound possible. But why does the chip do that?
I always imagined it's because when a channel is inactive its output is wired high instead of low. It's not changing so it's still silent, but when changing the volume, the voltage output will change accordingly, causing said "pop".
keli
Posts: 97
Joined: 22 Aug 2017 13:34

Re: Reverse engineer gate logic of the YM2149

Post by keli »

I case someone is interested, I found this VHDL implementation of the ym2149: http://www.cpcwiki.eu/index.php/Ym2149
Gunstick
Posts: 61
Joined: 22 Aug 2017 12:42

Re: Reverse engineer gate logic of the YM2149

Post by Gunstick »

can someone translate this VHDL to C or ASM or any other language I understand?

chan_amp := chan_vol(3 downto 0) & '1';
User avatar
exxos
Site Admin
Site Admin
Posts: 27906
Joined: 16 Aug 2017 23:19
Location: UK

Re: Reverse engineer gate logic of the YM2149

Post by exxos »

Gunstick wrote: 27 Oct 2017 08:07 can someone translate this VHDL to C or ASM or any other language I understand?

chan_amp := chan_vol(3 downto 0) & '1';
I have seen (3 downto 0) etc in my circuit when it compiles, it just means the data width 3..2..1..0... (3 down to 0). No idea what the &1 is on the end though. Maybe just adds one to what ever comes so 0 becomes 1, 1 becomes 2 , 2 becomes 3. Making the data width 3..2..1..
keli
Posts: 97
Joined: 22 Aug 2017 13:34

Re: Reverse engineer gate logic of the YM2149

Post by keli »

The & operator in VHDL is the concatenation operator. So chan_amp becomes bits 3,2,1, and 0 from chan_vol plus one additional 1 bit appended to the end. (5 bits in total, with the last bit set to 1)

This means 0 becomes 1, 1 becomes 3, 2 becomes 5, 3 becomes 7, etc.

Edit: Some more detail. If you look at the surrounding context of that line:

Code: Select all

1:        if (chan_vol(4) = '0') then
2:          if (chan_vol(3 downto 0) = "0000") then -- nothing is easy ! make sure quiet is quiet
3:            chan_amp := "00000";
4:          else
5:            chan_amp := chan_vol(3 downto 0) & '1'; -- make sure level 31 (env) = level 15 (tone)
6:          end if;
7:        else
8:          chan_amp := env_vol(4 downto 0);
9:        end if;
The uppermost bit of chan_vol selects whether to use the lower four bits as the actual volume (lines 2-6) or to use the current value of the envelope volume (line 8).
Note that the envelope volume is 5 bits, whereas the channel volume only has 4 bits of resolution. In order to map a "1111" (15) of channel volume to full "11111" (31) in 5 bit resolution, line 5 appends that "1" to the end. That would mean however that a channel volume of zero would become 1 after appending. Therefore there is a special case at line 3 that sets the output volume to "00000" in case the channel volume is zero.

Return to “HARDWARE DISCUSSIONS”

Who is online

Users browsing this forum: CCBot, Qwantbot and 6 guests