EPSG for NES and Famicom (expansion sound module)
Moderator: Moderators
EPSG for NES and Famicom (expansion sound module)
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: 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. I did also make a Famicom version It would fit like this and use an addon PCB for configuring the EXP addressing: https://www.youtube.com/watch?v=sUJsiCD8CGg
https://www.youtube.com/watch?v=8EaxvQikh3Y
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: 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. I did also make a Famicom version It would fit like this and use an addon PCB for configuring the EXP addressing: https://www.youtube.com/watch?v=sUJsiCD8CGg
https://www.youtube.com/watch?v=8EaxvQikh3Y
Re: EPSG for NES and Famicom (expansion sound module)
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
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
Re: EPSG for NES and Famicom (expansion sound module)
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.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
The YMF288 it made to work at 8Mhz, but I run it at 3.579545 so it matches up with S5b.
Re: EPSG for NES and Famicom (expansion sound module)
Thanks! I'll add this to the documentation.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.
Re: EPSG for NES and Famicom (expansion sound module)
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
.
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
Re: EPSG for NES and Famicom (expansion sound module)
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. In that case, maybe Deflemask would be your ticket.
Edit: My mistake, I read "YMF-288" as "YMF-262", so you're looking for OPN3 instead of OPL3. In that case, maybe Deflemask would be your ticket.
Re: EPSG for NES and Famicom (expansion sound module)
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.
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.
-
- Posts: 1510
- Joined: Thu May 19, 2005 11:30 am
Re: EPSG for NES and Famicom (expansion sound module)
The samples included with the M88 emulator are not the real samples, then?
Re: EPSG for NES and Famicom (expansion sound module)
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??
The famicom version is not unlike some pass-through stuff made by krzysiobal. Are you aware? Maybe you two can collaborate ideas??
Re: EPSG for NES and Famicom (expansion sound module)
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/
https://www.muramasaentertainment.com/p ... dule-epsm/
Re: EPSG for NES and Famicom (expansion sound module)
Registered. This is awesome. And Good work Perkka!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/
Re: EPSG for NES and Famicom (expansion sound module)
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?
Re: EPSG for NES and Famicom (expansion sound module)
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.
Re: EPSG for NES and Famicom (expansion sound module)
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.
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.
Re: EPSG for NES and Famicom (expansion sound module)
I liked the post but where's the schematic