OPL3 Test
OPL3 Test
I have adapted exact FPGA OPL3 core from Greg Taylor (https://github.com/gtaylormb/opl3_fpga) for MiSTer ao486 core, as I was curious if exact OPL3 is possible within the core. I am throwing here first version of it, there are some errors in conversion to 16-bit 48kHz output stream I am aware of. I tried to be exact, so the core runs on original OPL3 chip frequency and sample rate with exact same timings and oversampling. Resulting waveform should be really as close as it gets to original OPL3 core. I am putting resulting rbf for testing, any feedback is very welcome, please try it against original ao486 opl3 emulation on your favorite tracks and let me know.
You can certainly try https://github.com/gtaylormb/opl3_fpga/ ... re/opl3dro this files with IMFPLAY, as I do not know if OPL detection is working properly for now. Please note that OPL2/OPL3 switch in MiSTer menu does nothing, chip is always in OPL3 mode.
rbf is generated from dev branch, so it would be wise to compile yourself and update your MiSTer binary, if ao486 fails to boot from harddisk or floppy.
Core is somewhat hungry, original OPL3 core within ao486 is here:
Logic utilization (in ALMs): 32,428 / 41,910 ( 77 % )
Total registers: 28027
Total block memory bits: 3,520,771 / 5,662,720 ( 62 % )
Total RAM Blocks: 448 / 553 ( 81 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 3 / 6 ( 50 % )
Greg Taylor's core with ao486 modifications is here:
Logic utilization (in ALMs): 35,548 / 41,910 ( 85 % )
Total registers: 35662
Total block memory bits: 3,133,443 / 5,662,720 ( 55 % )
Total RAM Blocks: 401 / 553 ( 73 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 4 / 6 ( 67 % )
As you can see, OPL3 itself occupies about 8% of available ALMs. There is also a drawback with compile time, fitter took 3 hours 14 minutes to complete.
Is there some interest in this exact OPL3 emulation ?
You can certainly try https://github.com/gtaylormb/opl3_fpga/ ... re/opl3dro this files with IMFPLAY, as I do not know if OPL detection is working properly for now. Please note that OPL2/OPL3 switch in MiSTer menu does nothing, chip is always in OPL3 mode.
rbf is generated from dev branch, so it would be wise to compile yourself and update your MiSTer binary, if ao486 fails to boot from harddisk or floppy.
Core is somewhat hungry, original OPL3 core within ao486 is here:
Logic utilization (in ALMs): 32,428 / 41,910 ( 77 % )
Total registers: 28027
Total block memory bits: 3,520,771 / 5,662,720 ( 62 % )
Total RAM Blocks: 448 / 553 ( 81 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 3 / 6 ( 50 % )
Greg Taylor's core with ao486 modifications is here:
Logic utilization (in ALMs): 35,548 / 41,910 ( 85 % )
Total registers: 35662
Total block memory bits: 3,133,443 / 5,662,720 ( 55 % )
Total RAM Blocks: 401 / 553 ( 73 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 4 / 6 ( 67 % )
As you can see, OPL3 itself occupies about 8% of available ALMs. There is also a drawback with compile time, fitter took 3 hours 14 minutes to complete.
Is there some interest in this exact OPL3 emulation ?
- Attachments
-
- ao486-a6023474-opl3.zip
- (1.94 MiB) Downloaded 310 times
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: OPL3 Test
That is a lot more registers... but given we are limited by the size of this, I am thinking maybe the AO486 core could be given branches for special hardware, until maybe some other solution is found, with the main AO486 branch is one that tries to implement as much as possible by possibly cutting corners in the areas that it can like using a less accurate OPL3.
- Chris23235
- Top Contributor
- Posts: 983
- Joined: Sun May 24, 2020 8:45 pm
- Has thanked: 127 times
- Been thanked: 197 times
Re: OPL3 Test
Interesting, many thanks, I will try this for sure. Is it for the last official core or the recent test builds?
-
- Posts: 44
- Joined: Mon May 25, 2020 2:17 am
- Been thanked: 2 times
Re: OPL3 Test
I love the strive for accuracy, do we have any idea how far off the existing a0486 implementation is from this one? I've seen some people show graphs comparing wave output on the various console cores, I wonder if something similar could be done for this core?
Re: OPL3 Test
Nice work. I have an OPL3 card in my Pentium III PC.
@Lukage You might know all this, but I will put it here in case there is new info. I was thinking the FPGA used in the tiny FleaOhm is much smaller than in the MiSTer so maybe the OPL3 implementation used is smaller? Anyway here is info:
https://opencores.org/projects/next186_soc_pc
https://github.com/Basman74/Next186
@Lukage You might know all this, but I will put it here in case there is new info. I was thinking the FPGA used in the tiny FleaOhm is much smaller than in the MiSTer so maybe the OPL3 implementation used is smaller? Anyway here is info:
https://opencores.org/projects/next186_soc_pc
https://github.com/Basman74/Next186
- SuperBabyHix
- Posts: 152
- Joined: Sun May 24, 2020 8:26 pm
- Has thanked: 45 times
- Been thanked: 36 times
Re: OPL3 Test
@Higgy, maybe I'm misunderstanding, but on that first page it seems to indicate the Adlib/OPL3 was only on the Nexsys4 board, "An Adlib/OPL3 implementation was added on Nexys4 version." Not sure how it compares to the DE-10 Nano.
Re: OPL3 Test
This is corrected version, should be OK to test without any mixing errors. This is what I should have posted first....
- Attachments
-
- ao486-a6023474-corr.zip
- (1.94 MiB) Downloaded 293 times
Re: OPL3 Test
This is the OPL3 core which is running in the original ao486.Higgy wrote: ↑Wed Aug 05, 2020 9:46 pm Nice work. I have an OPL3 card in my Pentium III PC.
@Lukage You might know all this, but I will put it here in case there is new info. I was thinking the FPGA used in the tiny FleaOhm is much smaller than in the MiSTer so maybe the OPL3 implementation used is smaller? Anyway here is info:
https://opencores.org/projects/next186_soc_pc
https://github.com/Basman74/Next186
Re: OPL3 Test
Sorry this is where my poor understanding of FPGA's comes in. The OPL3 was ported/compiled also for the FleaOhm which uses a Lattice FPGA. I just thought that this OPL3 Core might be more mature/smaller than the original one mentioned at the beginning of this thread and it might be able to be ported to the DE-10 Nano.
Thanks
Thanks
-
- Core Developer
- Posts: 385
- Joined: Sat May 23, 2020 12:55 pm
- Has thanked: 42 times
- Been thanked: 414 times
Re: OPL3 Test
I don't know if the OPL3 really needs like 8000FF...i wouldn't wonder if some of them can be packed into Blockram, so the ressource usage goes down.
Re: OPL3 Test
It is not much susprising given that it is fully unrolled and there are no FPGA space conservation techniques. But still, it took those 8000 FFs. Original Z80 based OPL3 takes in total 1325.3 post-fitter ALMs. This version uses in total 5623.1 post-fitter ALMs, from which 4372.0 are for channels itself, 1198.2 ALMs are for register file and rest is glue logic, timers, etc.FPGAzumSpass wrote: ↑Thu Aug 06, 2020 7:51 am I don't know if the OPL3 really needs like 8000FF...i wouldn't wonder if some of them can be packed into Blockram, so the ressource usage goes down.
It is very unpractical to use it in ao486 core.
I think that I will rather look over Nuked OPL3 software code, which is based on real YM262 chip decapsulation, and leans towards bit-perfect emulation in software (but still not there yet). In the end, there should be enough speed in FPGA to run it on some very small footprint suitable MCU (Z80 for instance ), which is what really conserves FPGA space, and that should be the way to have perfect OPL3 emulation.
Re: OPL3 Test
Has there been any updates to this?
It sounds like it's impossible (due to FPGA space) to implement into the ao486 core, but I'd love a core with an accurate OPL3 just to play audio files, etc.
It sounds like it's impossible (due to FPGA space) to implement into the ao486 core, but I'd love a core with an accurate OPL3 just to play audio files, etc.
Re: OPL3 Test
Has JTOPL the same size requirements?Lukage wrote: ↑Wed Aug 05, 2020 7:58 pm I have adapted exact FPGA OPL3 core from Greg Taylor (https://github.com/gtaylormb/opl3_fpga) for MiSTer ao486 core, as I was curious if exact OPL3 is possible within the core. I am throwing here first version of it, there are some errors in conversion to 16-bit 48kHz output stream I am aware of. I tried to be exact, so the core runs on original OPL3 chip frequency and sample rate with exact same timings and oversampling. Resulting waveform should be really as close as it gets to original OPL3 core. I am putting resulting rbf for testing, any feedback is very welcome, please try it against original ao486 opl3 emulation on your favorite tracks and let me know.
You can certainly try https://github.com/gtaylormb/opl3_fpga/ ... re/opl3dro this files with IMFPLAY, as I do not know if OPL detection is working properly for now. Please note that OPL2/OPL3 switch in MiSTer menu does nothing, chip is always in OPL3 mode.
rbf is generated from dev branch, so it would be wise to compile yourself and update your MiSTer binary, if ao486 fails to boot from harddisk or floppy.
Core is somewhat hungry, original OPL3 core within ao486 is here:
Logic utilization (in ALMs): 32,428 / 41,910 ( 77 % )
Total registers: 28027
Total block memory bits: 3,520,771 / 5,662,720 ( 62 % )
Total RAM Blocks: 448 / 553 ( 81 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 3 / 6 ( 50 % )
Greg Taylor's core with ao486 modifications is here:
Logic utilization (in ALMs): 35,548 / 41,910 ( 85 % )
Total registers: 35662
Total block memory bits: 3,133,443 / 5,662,720 ( 55 % )
Total RAM Blocks: 401 / 553 ( 73 % )
Total DSP Blocks: 40 / 112 ( 36 % )
Total PLLs: 4 / 6 ( 67 % )
As you can see, OPL3 itself occupies about 8% of available ALMs. There is also a drawback with compile time, fitter took 3 hours 14 minutes to complete.
Is there some interest in this exact OPL3 emulation ?
Re: OPL3 Test
Any updates? I'd love to see JTOPL or FPGA OPL3 core from Greg Taylor implemented in the latest ao486 core. I think even if the NukedOPL3 code could be implemented it would be fantastic.
I think this would bring the core to nearly perfect 486, Adlib, and SoundBlaster functions?
I think this would bring the core to nearly perfect 486, Adlib, and SoundBlaster functions?
Re: OPL3 Test
Would also be incredibly interested in this, would donate etc. It feels historically important to preserve this chip, and to experience that sound coming from a slightly noisy 1/8" output lol. We probably all share this weird sentiment given that we're here to begin with.
-
- Core Developer
- Posts: 18
- Joined: Fri Apr 05, 2024 12:23 pm
- Has thanked: 5 times
- Been thanked: 53 times
Re: OPL3 Test
FYI I've reduced the core size of https://github.com/gtaylormb/opl3_fpga in half and I've integrated it ao486_MiSTer. It's using 4% more ALMs than the NextZ80CPU implementation. But it fits, it's building, and it meets timing. I have some ideas to reduce the area even further.
My branch is at https://github.com/gtaylormb/ao486_MiST ... _opl3_fpga
I just ordered a DE10-Nano so once I get it I can verify/debug the core and PR it to the main repo.
Re: OPL3 Test
This is great, thank you so much for working on it!!
I'll give it a try when I get a chance and let you know how it works!