Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check out for ESFM emulation #164

Open
Wohlstand opened this issue Aug 10, 2020 · 22 comments
Open

Check out for ESFM emulation #164

Wohlstand opened this issue Aug 10, 2020 · 22 comments

Comments

@Wohlstand
Copy link
Owner

Wohlstand commented Aug 10, 2020

ESFM is an extended clone of OPL3. Recently I got the ESS card with ES1688F chip that has ESFM. I tried it in action with my old Windows 98 machine, and it's very interesting thing. I heard about ESFM before from @jpcima, however, I had't much information about it and how it actually sounds. So, getting the real ESS card with a compatible chip gave me some proveground for researches.

ESS Technology's in-house developed derivative, termed ESFM, is an enhanced, 20-voice, 72-operator, OPL3-compatible clone incorporating two operating modes, a Native mode and a Legacy mode, which controls its feature-set and behavior. In Native mode, ESFM allows more than six 4-operator FM voices to be mapped, potentially allowing for a significant increase in the complexity of tones generated. The drivers for Windows 9x incorporate their own custom instrument patches which make use of this extended mode. Conversely, Legacy mode provides full backward-compatibility with Yamaha's YMF262. ESFM's output in this mode is moderately faithful to the YMF262 overall, but some tones are rendered quite differently, resulting in unique distortions in the sound and music of some games.

However, I saw nothing about any sort of emulation of this chip. However, there are some details at VOGONS: https://www.vogons.org/viewtopic.php?f=46&t=37497&start=120#p738552 (thanks to @nukeykt for a hint)

@freq-mod
Copy link
Contributor

Yeah, interesting card. In its nativ mode, it reportedly has 18 4-op channels (18x4=72). But it's not a dual OPL3, so 2-op channels count stays the same.

Reverse enginnering project: https://github.com/pachuco/ESSPlayMid

@pachuco
Copy link

pachuco commented Jul 3, 2021

https://github.com/pachuco/Buttler
I'm working on separate project of providing hardware read/write port access to other people online, so people can remotely play with other people's hardware. Which is totes not a reckless and dangerous thing to do.
I'll lend my ESSFM for study on request.

Currently not finished, so stay tuned, I guess.

@sneakernets
Copy link

This is a great idea. I would love to write/extend DMXOPL3 to support this if there are more features.

@freq-mod
Copy link
Contributor

freq-mod commented Jan 2, 2023

ESFM is getting properly investigated. Turns out, it's MUCH more capable... https://github.com/jwt27/esfm

Per-op frequency, customizable op connections, per 2-op pair envelope, customizable LFO, noise generation (?), ability to output sound and modulate another op at once, and the list goes on.

@Wohlstand
Copy link
Owner Author

Very interesting, I should take a look on that soon 👀

@freq-mod
Copy link
Contributor

freq-mod commented Jan 2, 2023

https://discord.gg/C9FRkma5 - Discord server for ESFM research.

@leecher1337
Copy link

In case someone wants to enhance the original sound card driver, I reverse engineered the Windows 2000 driver (which uses ESFM mode, if supported by card) to build a 64bit Windows driver for the ES1969 card: https://github.com/leecher1337/es1969
May still have some bugs, but generally works on my ES1969.

@leecher1337
Copy link

I quickly hacked together an ESFM bank editor for Windows, as this was easier for me than having the deal with complicated QT C++ code and create a pull-request. Maybe you can take some code from it: https://github.com/leecher1337/esfmbank

@Wohlstand
Copy link
Owner Author

Adding support for new bank format isn't hard: you need to just make a class that inherits the https://github.com/Wohlstand/OPL3BankEditor/blob/master/src/FileFormats/ffmt_base.h, and use existing files as an example (take the apogee TMB code as a simplest example). And then, add it into the ffmt_factory.cpp to be registered and being available.

However, if speak about adding new features generally, that yeah, needs a modify the structure of bank and instruments, and additionally implement missing UI fields.

Anyway, I'll try to take a look by myself soon.

@leecher1337
Copy link

Yeah, figured that out, but adding only format definitions is useless in this case.

@Wohlstand
Copy link
Owner Author

The only last case is left - the emulation-side support to let my thing to preview these instruments.

@leecher1337
Copy link

Don't know how far https://github.com/Kagamiin/ESFMu progressed with emulation.

@pachuco
Copy link

pachuco commented Sep 21, 2023

Don't know how far https://github.com/Kagamiin/ESFMu progressed with emulation.

It is now pretty far. Sufficient for instrument preview. Maybe have to compare to hardware afterwards, since emulation is still WIP.

@Wohlstand Wohlstand moved this to Backlog in @Wohlstand's works Nov 25, 2023
@Wohlstand Wohlstand self-assigned this Nov 25, 2023
@freq-mod
Copy link
Contributor

ESFMu emulator is fairly complete, except cymbal noise pattern emulation I tink (yk, ESFM does some things differently than OPL3). It will get integrated into Furnace for the next release.

@Cacodemon345
Copy link

The ESFMu emulator appears to be complete save for two issues regarding math precision and Top Cymbal noise mode from what I have seen.

@Wohlstand Wohlstand pinned this issue Mar 24, 2025
@Wohlstand
Copy link
Owner Author

Don't know how far https://github.com/Kagamiin/ESFMu progressed with emulation.

Few moments ago I added it into libADLMIDI for some tests, very soon I will add into OPL3 Bank Editor too. And for the first time it will work as one another OPL3 chip emulator until the ESFM functionality will be handled later.

@freq-mod
Copy link
Contributor

freq-mod commented Mar 24, 2025

Keep in mind ESFM has far more parameters than OPL3:
each operator can be different pitch (both in cents and semitones), which can be in theory abused for 72ch
there is envelope delay parameter this seems to enable operator later than others
deep vibrato and deep tremolo are per-operator
there is no concept of algorithm either. operator connection and carrier/modulator is controlled by mod input and output level parameters, which are 3-bit
panning is also per-operator
noise mode works differently, rather than stealing 3ch into 5 drum tones it takes two last operators and performs its special drum synthesis on them
there is no feedback (which internally works vastly differently than on OPL), use modinput on operator 1 to emulate it
and finally, it can go well lower than MIDI note #0

and ESFMu is very accurate

@Wohlstand
Copy link
Owner Author

Keep in mind ESFM has far more parameters than OPL3:

Ye, I know that, and I going to learn that in details, especially because I am required to implement this support.

Thanks for the hints!

@Wohlstand
Copy link
Owner Author

P.S. I got another sample of ESFM sound card, with a P3 PC suddenly gifted by my neighbour, and I repaired it, and I found it has the ESFM chip onboard. I also could try to support the hardware too in addition to the emulator.

@freq-mod
Copy link
Contributor

For even more hints: https://github.com/tildearrow/furnace/blob/master/doc/4-instrument/fm-esfm.md

P.S. I got another sample of ESFM sound card, with a P3 PC suddenly gifted by my neighbour, and I repaired it, and I found it has the ESFM chip onboard. I also could try to support the hardware too in addition to the emulator.

Wow, great news! Wish more OPL music software allowed for real hardware passthrough....

@freq-mod
Copy link
Contributor

freq-mod commented Mar 24, 2025

Image

I was thinking about the layout of parameters, it is was to be implemented in OPL3BE, and I came out with something like this extremely quick and dirty "mockup". With some adjustments, it should fit all four operators on this window.

not featured is normal vibrato and tremolo, and fixed frequency mode (where you input FreqNum and Octave block numbers manually). And, most importantly, operator routing preview

@Kagamiin
Copy link

Kagamiin commented Mar 24, 2025

(K-s) Hey, nice to see ESFM being implemented into OPL3BankEditor, @Wohlstand! x3

If you need any help with stuff, be sure to contact me or the ESFM research team in our Discord server. x3

Also yeah we need people experienced with reading chip decaps in order to smooth out the last couple issues with ESFMu. We have a decap, but nobody available to read it.

As for the emulation, other than the math edge cases when you abuse chained modulation, and the cymbal noise mode weirdness, it's pretty much 100% accurate to the ear tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

7 participants