REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

Putting a YM2203 FM soundchip in place of the YM2149

General discussions or ideas about hardware.
User avatar
unseenmenace
Posts: 19
Joined: 01 Apr 2021 09:02

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by unseenmenace »

dgw wrote: 11 May 2024 18:07BDIR via inverter to WR
I'm a little concerned that having WR high when the ST is at idle will have unwanted side-effects, shouldn't all control lines on the soundchip be OFF when both BDIR and BC1 are OFF?
dgw
Posts: 14
Joined: 10 Mar 2024 23:31

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by dgw »

unseenmenace wrote: 30 May 2024 12:29
dgw wrote: 11 May 2024 18:07BDIR via inverter to WR
I'm a little concerned that having WR high when the ST is at idle will have unwanted side-effects, shouldn't all control lines on the soundchip be OFF when both BDIR and BC1 are OFF?
Until CS goes low the state of WR/RD/A0 is irrelevant.
User avatar
unseenmenace
Posts: 19
Joined: 01 Apr 2021 09:02

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by unseenmenace »

dgw wrote: 30 May 2024 12:24It works OK, at least the SSG side of YM2203. Delayed a few days so I could check it on my own hardware, didn't want to potentially plug a fake YM2203 into Atari.

The circuit uses 74HC04 and 74HC08 as shown, but it could be reduced it using 74HC02 (I didn't have one to hand). Looking at the YM2203 data sheet strictly A0 should be ready 10nS before chip select CS goes low, so I made use of spare gates to delay it.

Just did a quick check so far, everything appears to work OK (floppy drive ID/side) and SSG output sounds same as YM2149. Need to wire up OPL side of it and decide on audio output.
I hadn't seen this when I posted my previous message, sounds promising, great work!
User avatar
unseenmenace
Posts: 19
Joined: 01 Apr 2021 09:02

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by unseenmenace »

dgw wrote: 30 May 2024 12:32Until CS goes low the state of WR/RD/A0 is irrelevant.
That makes sense, I hadn't thought of that as I'm not planning on using CS. Reading the status aside, I reckon it can be done with just 2 AND gates and 2 NOT gates, and still keep everything at ZERO when idle. This also means some of the circuitry can be shrunk down at a later date using some smaller SMD logic ICs ( e.g. 6-pin dual inverter and 8-pin dual AND ). This is what I've come up with anyway:
Bus Translation.jpg
You do not have the required permissions to view the files attached to this post.
dgw
Posts: 14
Joined: 10 Mar 2024 23:31

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by dgw »

With respect you are making two fundamental mistakes. Zero is not an idle state in electronic logic, in fact it is usually the assertive state (i.e. /CS, /WR, /RD, /RESET, etc). Second, critically, tying CS low your device will always be 'live' to the data bus. It is OK for https://github.com/zenmai/YM2203_JukeBox to just tie CS low, the YM2203 is the only device connected to the Arduino Uno (in fact its GPIO pins). In the Atari schematic the YM2149 data bus is common to other chips, it is the CS pin which dictates which is the currently addressed chip (and which can input/output data from the data bus, also only then, respond to current state of other inputs WR/RD/A0).

(for YM2149 the inactive state is when BDIR=0, BC1=0, equivalent for YM2203 CS=1)
User avatar
unseenmenace
Posts: 19
Joined: 01 Apr 2021 09:02

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by unseenmenace »

dgw wrote: 31 May 2024 10:03 With respect you are making two fundamental mistakes. Zero is not an idle state in electronic logic, in fact it is usually the assertive state (i.e. /CS, /WR, /RD, /RESET, etc). Second, critically, tying CS low your device will always be 'live' to the data bus. It is OK for https://github.com/zenmai/YM2203_JukeBox to just tie CS low, the YM2203 is the only device connected to the Arduino Uno (in fact its GPIO pins). In the Atari schematic the YM2149 data bus is common to other chips, it is the CS pin which dictates which is the currently addressed chip (and which can input/output data from the data bus, also only then, respond to current state of other inputs WR/RD/A0).

(for YM2149 the inactive state is when BDIR=0, BC1=0, equivalent for YM2203 CS=1)
Thanks for tthe explanation! I don't claim to be an expert, just a tinkerer, which is why I posted here in the first place. Looking back at the datasheets I can see now that for the YM2149 it shows 0, 0, 0 = inactive but it doesn't have an equivalent (all zero) entry for the YM2203 (CS says "bus lines have high impedence" instead) which was misleading for my untrained brain. Looking at other YM datasheets (e.g. the YM2608) it has a similar setup to the YM2203 but lists the CS entry as "Inacive mode". Thanks again, hope I didn't come across as argumentative, I'm just learning :)
dgw
Posts: 14
Joined: 10 Mar 2024 23:31

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by dgw »

Just didn't want you to plug your board design in and have it damage one of the custom chips, which was one of my concerns.

Though there are a couple of problems with replacing internal YM2149 with YM2203.

1. Fake YM2203 damage. AFAIK real Yamaha FM chips are not dated post 1990's. Although remarked chips with false dates/legends often work OK.
2. Room under floppy drive is extremely limited. My board is a few mm too high.
3. The YM2149 is fed with 2MHz. All VGM files I have seen are for 4MHz YM2203 (or 3993600Hz).
4. Removing existing YM2149 is not trivial. I had to revert to clipping pins off, desoldering tool couldn't clear holes enough.
5. Providing audio section with stereo outputs (holes in rear case, lack of room under drive for connectors).

I'm going to try a printer port version with one/two YM2203 chips. I already proved my YM2203 board worked with my dual AY printer port board (viewtopic.php?p=114874#p114874). Though with slightly different logic for YM2203.
User avatar
unseenmenace
Posts: 19
Joined: 01 Apr 2021 09:02

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by unseenmenace »

dgw wrote: 01 Jun 2024 09:40Just didn't want you to plug your board design in and have it damage one of the custom chips, which was one of my concerns.
I appreciate the concern as well as your advice.
dgw wrote: 01 Jun 2024 09:401. Fake YM2203 damage. AFAIK real Yamaha FM chips are not dated post 1990's. Although remarked chips with false dates/legends often work OK.
I already bought a handfull of them, hopefully at least some are useable!
dgw wrote: 01 Jun 2024 09:402. Room under floppy drive is extremely limited. My board is a few mm too high.
Hopefully it's doable, time will tell.
dgw wrote: 01 Jun 2024 09:403. The YM2149 is fed with 2MHz. All VGM files I have seen are for 4MHz YM2203 (or 3993600Hz).
I'm working on a music composing program for ST, TT & Falcon and plan to include support for the FM channels and the parallel port DAC :)
dgw wrote: 01 Jun 2024 09:404. Removing existing YM2149 is not trivial. I had to revert to clipping pins off, desoldering tool couldn't clear holes enough.
Eeek! I have a new rework station on order, hopefully I'll have more luck, again, we'll see!
dgw wrote: 01 Jun 2024 09:405. Providing audio section with stereo outputs (holes in rear case, lack of room under drive for connectors).
I'm putting 90-degree pin header connectors on the edge of the board and connecting them to a pair of photo sockets, which initially I'll just dangle out the back of the ST but if all goes well I'll mount them on the rear panel.
dgw wrote: 01 Jun 2024 09:40I'm going to try a printer port version with one/two YM2203 chips. I already proved my YM2203 board worked with my dual AY printer port board (viewtopic.php?p=114874#p114874). Though with slightly different logic for YM2203.
Best of luck and thanks again.
nokturnal
Posts: 105
Joined: 12 Aug 2020 12:30
Location: Warsaw

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by nokturnal »

@unseenmenace How's project going?
nokturnal
------------------------
www: https://nokturnal.pl
nokturnal
Posts: 105
Joined: 12 Aug 2020 12:30
Location: Warsaw

Re: Putting a YM2203 FM soundchip in place of the YM2149

Post by nokturnal »

Any news about this? :)
nokturnal
------------------------
www: https://nokturnal.pl

Return to “HARDWARE DISCUSSIONS”

Who is online

Users browsing this forum: ClaudeBot, Google [Bot], sporniket and 19 guests