EPSG for NES and Famicom (expansion sound module)

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderator: Moderators

Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

EPSG for NES and Famicom (expansion sound module)

Post by Perkka »

I just wanted to share this here, most people on the NesDev discord are already aware.
I've been working on a little project for the NES to actually get a use of the expansion port.
It's a sound expansion using the Yamaha YMF288 chip.(I'ts more or less the YM2608 also called OPNA but without ADPCM)

It is more or less finalised now and works.
It can use $4016 to send nibbles of data or the EXP pins on the cartridge to route down addressing from the cart for easier addressing.

There is stereo output from the 3.5mm output on the PCB, but it does forward audio to the onboard RCA jack on the NES too. and enables Famicom expansion audio.

It fits nicely into the Expansion cutout on the NES:
IMG_0434.JPG
If you'd like to hide it under the cover for the expansion port it should be possible to drill a hole through the fastening clip.
IMG_0435.JPG
I did also make a Famicom version
IMG_0463.JPG
It would fit like this and use an addon PCB for configuring the EXP addressing:
IMG_0462.JPG
https://www.youtube.com/watch?v=sUJsiCD8CGg
https://www.youtube.com/watch?v=8EaxvQikh3Y
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by mkwong98 »

Hi Perkka,

Are you the same person as the one who added EPSG to Mesen? I'm trying to update the documentation and in the Advanced tab of Audio Options form there is a EPSG setting which needs to be documented. Can you write a short description of what it does? Thanks
Perkka
Posts: 20
Joined: Fri Jul 05, 2019 2:29 am

Re: EPSG for NES and Famicom (expansion sound module)

Post by Perkka »

mkwong98 wrote: Tue May 04, 2021 8:55 am Hi Perkka,

Are you the same person as the one who added EPSG to Mesen? I'm trying to update the documentation and in the Advanced tab of Audio Options form there is a EPSG setting which needs to be documented. Can you write a short description of what it does? Thanks
Yes that would be me (with a lot of help), the "EPSG Clock Frequency" is the base frequency the Yamaha Sound Chip works at, it mainly affect pitch and timings. simply how it calculates sound.
The YMF288 it made to work at 8Mhz, but I run it at 3.579545 so it matches up with S5b.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by mkwong98 »

Perkka wrote: Tue May 04, 2021 1:54 pm Yes that would be me (with a lot of help), the "EPSG Clock Frequency" is the base frequency the Yamaha Sound Chip works at, it mainly affect pitch and timings. simply how it calculates sound.
The YMF288 it made to work at 8Mhz, but I run it at 3.579545 so it matches up with S5b.
Thanks! I'll add this to the documentation.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by dougeff »

Is there a tracker that can emulate the YMF288 chip?

.

Link to the repo, since I don't see it anywhere else.

https://github.com/Perkka2/EPSM
nesdoug.com -- blog/tutorial on programming for the NES
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: EPSG for NES and Famicom (expansion sound module)

Post by Drag »

Deflemask can do Yamaha OPN2 and OPM, which can get you close if you're aware of how they differ from OPL. Otherwise, I'd been a fan of Adlib Tracker II for DOS back in the day, and I remember it working well in Dosbox.

Edit: My mistake, I read "YMF-288" as "YMF-262", so you're looking for OPN3 instead of OPL3. :P In that case, maybe Deflemask would be your ticket.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: EPSG for NES and Famicom (expansion sound module)

Post by lidnariq »

Musically, YMF288 ("OPN3") is almost the OPN2 from the Genesis plus a YM2149. Configure the OPN2 in Furnace Tracker or Deflemask to run at 8MHz (not the Genesis's 7.67) and the YM2149 at 4MHz. It does not support the Genesis's ability to use channel 6 as a plain 8-bit DAC, and it does not support the underdocumented voice synthesis mode of the OPN2.

This misses support for one thing: the baked-in fixed-sample-rate sampled drumkit. I guess someone should rip those samples...


From a programmer's point of view, the YMF288 is capable of dramatically faster updates, reducing the problem of updating musical parameters to almost-not-too-bad — there's just an awful lot of them.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: EPSG for NES and Famicom (expansion sound module)

Post by NewRisingSun »

The samples included with the M88 emulator are not the real samples, then?
User avatar
Ben Boldt
Posts: 1148
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: EPSG for NES and Famicom (expansion sound module)

Post by Ben Boldt »

This is really awesome. I would like to see 3.3V pirate cart protection added to the Famicom 60-pin version.

The famicom version is not unlike some pass-through stuff made by krzysiobal. Are you aware? Maybe you two can collaborate ideas??
muramasa
Posts: 24
Joined: Thu Aug 03, 2017 2:58 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by muramasa »

I'm doing a small batch of these. Still deciding how many to make. If you are interested register on the waitlist.
https://www.muramasaentertainment.com/p ... dule-epsm/
ZReport
Posts: 21
Joined: Thu May 31, 2018 11:57 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by ZReport »

muramasa wrote: Wed Jun 01, 2022 5:54 pm I'm doing a small batch of these. Still deciding how many to make. If you are interested register on the waitlist.
https://www.muramasaentertainment.com/p ... dule-epsm/
Registered. This is awesome. And Good work Perkka!
Pill
Posts: 1
Joined: Mon Aug 08, 2022 5:30 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by Pill »

Hi perkka, I'm looking for this expansion audio along with an rgb or hdmi mode on the same chip. Is it possible for someone to create a project to get both on a single chip and use the nes expansion port?
Pill
Posts: 1
Joined: Mon Aug 08, 2022 5:30 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by Pill »

muramasa wrote: Wed Jun 01, 2022 5:54 pm I'm doing a small batch of these. Still deciding how many to make. If you are interested register on the waitlist.
https://www.muramasaentertainment.com/p ... dule-epsm/

Hi, muramasa. I have a question. Can you make a circuit board with HDMI output or RGB and audio 15 channels to connect in the NES front loader by expansion port together? It could be amazing if that's possible. I am still waiting on the waitlist for audio expansion. Thank you.
Last edited by Pill on Tue Aug 09, 2022 9:02 am, edited 1 time in total.
Fiskbit
Posts: 890
Joined: Sat Nov 18, 2017 9:15 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by Fiskbit »

Welcome! Please don't double-post requests like this, though; once is enough.

What you're asking is nontrivial and possibly infeasible. The NES PPU outputs composite video; it's generated this way and there is no higher-quality RGB signal to work with. To produce RGB or HDMI output, NESRGB and Hi-Def NES add additional hardware that sits between the NES and the PPU, forces the PPU into an unused mode where it outputs 4 bits of palette indices over normally-grounded pins, and emulates in hardware some of the PPU. Needless to say, a device plugged into the expansion port doesn't sit between the NES and PPU and can't work this way.

An alternative approach is to have a cartridge that watches PPU accesses and emulates a substantially larger portion of the PPU on the cartridge. This is what krikkz's new solution does. It also can't work over the expansion port without assistance from a cartridge, because the expansion port doesn't have access to the CPU address lines needed to know when the PPU is being written, and doesn't have access to the PPU bus.

So what is on the expansion port? Very little. Joypad I/O, EXP pins that go directly to the cartridge (and thus require a special cartridge), the CPU data bus, and a few other odds and ends. There is a video out, though, and a device could, in theory, attempt to reconstruct the original image from the composite video and output a higher quality version, but this has never been done before and is not a simple task. I assume it could be done from the console's composite video port rather than requiring the expansion port, though I don't know for sure.
darleiv
Posts: 69
Joined: Wed Feb 23, 2022 10:55 pm

Re: EPSG for NES and Famicom (expansion sound module)

Post by darleiv »

I liked the post but where's the schematic :shock: :?: :idea: :arrow: :|
Post Reply