VOGONS


First post, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

I am looking for a DOS (working in dosbox) application to test my enhanced implementation of OPL2. I need to check (and probaby correct) Bass Drum, Snare Drum, Tom Tom, Top Cymbal and High hats.
For melodic channels I have used FOLK102 application and HSC Tracker (this tracker has one-semitone bug). I have downloaded HSC tracker modules but these modules don't use BD register of OPL2.
What else could I use?

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 1 of 22, by OPLx

User metadata
Rank Member
Rank
Member

There's an old DOS program called Super Sound Gram v1.05 that plays back Adlib Visual Composer .ROL files. You can download it from here towards the bottom of the page under OPL2 Music Players. You'll need to have access to SOUND.COM and a bunch of ROL files to use it though.

Probably the less hassle option would be to either use SBVGM or Mod Master XT and download the appropriate VGM files from VGMRips' YM3812 collection. The Adlib Music Synthesizer Card Demo Songs pack should suffice for your needs.

Reply 2 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

I found bugs in my implementation of TC, HH and SD (I compared with the results of DOSBOX OPL3 emulator). Can anyone please record samples (in WAV or other PCM format) from REAL OPL2 or OPL3 from attached test file? I want to know they are my bugs or bugs of DOSBOX.

Test file is composed in Adlib Visual Composer.

Edit:
Here is WAV file created by my code (after removed known bugs) at sampling frequency 49716 Hz. I don't know it is correct result. The DosBox result is other but DosBox probably has bad implementation of Snare Drum and it emulates OPL3 at 44100 Hz instead of 49716 Hz.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 3 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

OPLx, can you please check these VGZ tracks sound similar to original OPL2 or OPL3? I think about percussion.
It is dumped to DRO format and then played at 32kHz with WAV recording by my DINO-2e library.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 4 of 22, by OPLx

User metadata
Rank Member
Rank
Member

Could you point me to which VGM data "02 Opening ~ Space High" and "03 The Power of Darkness" references? I'm very familiar with "001 highways"; the snare drum is missing the square wave that is typically mixed in with the (fixed frequency) noise. You can clearly hear it here.

Reply 5 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie
OPLx wrote:

the snare drum is missing the square wave that is typically mixed in with the (fixed frequency) noise.

OPLx, thank you for the answer. I will check it, but I in flight resample from 49716 to 32000 (in drum mode 2 channels partially operate at 49716 Hz - phase generator of operators 13 and 17 works on 49716 Hz, Envelope Generator and other operators at 32000 Hz). The wave will not be square after resampling operation but will sound similar.

(Highways) It sounds like DosBox OPL emulation on the site. I know I have other sound for Snare Drum but DosBox has bug and uses operator 16 phase generator instead of operator 13 phase generator for SD. That's why I asked for the original sound from OPL2 / OPL3. it is also likely that my project may have a bug but other than DosBox bug.

Is it possible that there is used other bit than bit 8 or additional constant multiplier or other operator than 13 to generate "phase" of Snare Drum? It looks like a very low frequency for generation of SD in Highways. Please see this image (emulated at 49716 Hz).
vogons.png
vogons1.png

Register dump for this moment:

00:11.595, 0x000466, 01:00 08:20 bd:29 // == SD + HH
c0:06 b0:0a a0:05 20:01 40:4f 60:f1 80:53 e0:00
23:11 43:0a 63:d2 83:74 e3:00
c1:06 b1:2e+a1:05+21:01 41:4f 61:f1 81:53 e1:00
24:11 44:13 64:d2 84:74 e4:00
c2:0e b2:00 a2:59 22:21 42:16 62:71 82:ae e2:00
25:21 45:0d 65:81 85:9e e5:00
c3:0e b3:00 a3:59 28:21 48:16 68:71 88:ae e8:00
2b:21 4b:10 6b:81 8b:9e eb:00
c4:0e b4:00 a4:59 29:21 49:16 69:71 89:ae e9:00
2c:21 4c:10 6c:81 8c:9e ec:00
c5:0e b5:00 a5:59 2a:21 4a:16 6a:71 8a:ae ea:00
2d:21 4d:10 6d:81 8d:9e ed:00
c6:00 b6:03 a6:65 30:00 50:0b 70:a8 90:4c f0:00
33:00 53:00 73:d6 93:4f f3:00
c7:01 b7:00 a7:05 31:01 51:1f 71:f7 91:b5 f1:00
34:0c 54:00 74:f8 94:b5 f4:00
c8:01 b8:00 a8:b2 32:04 52:3f 72:f7 92:b5 f2:00
35:01 55:00 75:f5 95:b5 f5:00

B7:A7 = 0005, Block=0, FNumber=5. Multiplier for operator 13 (snare drum due to NukedOPL3): 1, Multiplier for operator 16 (snare drum due to dosbox opl3): 12

FNumber = Music Frequency * 2^(20-Block) / 49716 Hz.
Music Frequency = FNumber*49716/2^(20-Block).

If operator 13 is used for Snare Drum Phase Generator:
Music Frequency = FNumber*49716/2^(20-Block)=5*49716/2^20= 0,237064362 Hz. The bit 8 is high 2 times per cycle. Snare Drum Square Frequency = 2*0,237064362 Hz = 0,474128723 Hz.
If correct is operator 16 for snare drum phase:
Snare Drum Square Frequency = 12*0,474128723 Hz = 5,689544678 Hz (still not enough Hz).

In the "001 Highways.mp3" downloaded from the site 6 cycles of Snare Drum = 30ms. It means about 200 Hz. By what miracle? Here must be an additional multiplier if it really was 200Hz Snare Drum.

vohons2.png

Regarding music "02" and "03" - from one of the sources you link to, but I can't remember which one. So I'm uploading VGZ files.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 6 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

I am looking for bug and I cannot find it. Is it possible that DOSBOX wrongly record (I use DRO dump) the B7 and A7 registers in percussion mode? The value of B7: A7 = 0005 is strangely small. It is impossible to get 200 Hz from FNum=5 and Block=0.

Settings of B7 and A7 registers checked manually. B7 (index 0x75) not initialised at begin of the DRO file (only at end). A7 (index 0x74) initialized to 0x05.
vogons3.png

Does DosBox suck during dumping in percussion mode? If yes, what can I run alternatively on DosBox to dump registers to DRO or RDOS RAW file?

Edit. I added in the DRO file "75 0A" (block: 2, high 2 bits of Snare Drum FNum: 2") or "75 0D" (block: 3, high 2 bits of Snare Drum FNum: 1") and the snare drum looks good. 0x75 is index of register B7. It means DosBox sucks again and sucked me 7 days like staying in a black hole area. 🙁 It means I cannot test with VGZ / VGM because I cannot record DRO file. I have tried to install "RDOS Adlib Capture" but here also is problem in DosBox. Unimplemented XMS function. 🙁 I am super fury.

vogons4.png
vogons5.png
"001 Highways" after addition "75 0A" to DRO file.

If high hats sound wrongly, probably also B8 is not initialized correctly by DosBox in DRO file at begin of the file.

Last edited by Electronic Genets on 2022-05-13, 09:42. Edited 1 time in total.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 7 of 22, by OPLx

User metadata
Rank Member
Rank
Member

While it does not reveal the full details of how the percussive mode works, the OPL3 Percussion Mode Map is fairly a close model. One thing to keep in mind is that the frequency of the tom tom (operator 14) affects that of the hi hat (operator 13) which ultimately affects the snare drum's frequency (operator 16). Initially it seems counter intuitive, but the relationship can be ascertained by manipulating the frequencies of both operators to see how one affects the other.

Here are the default FNum/Block settings that Adlib Visual Composer uses:

  • Channel 8: FNum=0x157, Block=0x2
  • Channel 7: FNum=0x203, Block=0x02

The snare drum (operator 16)'s frequency is dependent on the relationship of the frequencies of operator 13 and operator 14. I can't say for absolute certainty, but the multiplier value of 12 on operator 16 has no influence on the final snare drum output because of this relationship. I've attached snaretest.zip so you can use that for your tests. Unfortunately, I don't have any decent recording equipment on hand at the moment.

By the way, what is your development set up? Since the emulator in DOSBox isn't giving you the results you need, perhaps you can use something like VGMPlay to playback the VGM files? The emulator used is a bit more accurate than that of DOSBox.

Attachments

  • Filename
    snaretst.zip
    File size
    949 Bytes
    Downloads
    43 downloads
    File license
    Public domain
Last edited by OPLx on 2022-05-13, 15:42. Edited 1 time in total.

Reply 8 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

I will look today at snaretest file.

OPLx wrote:

One thing to keep in mind is that the frequency of the tom tom (operator 14) affects that of the hi hat (operator 13) which ultimately affects the snare drum's frequency (operator 16).

The roadmap uses operators numbering from 1 instead of 0. Thus "(14)" means operator 13.

OPLx wrote:

Channel 8: FNum=0x157, Block=0x2
Channel 7: FNum=0x203, Block=0x02

Thank you for this information. It is very sad that DosBox standard (described in manual) function Alt+Ctrl+F7 (recording OPL registers) works wrongly. This is very easy function to record each change of registers...

In my DRO file I see:
B7:A7 = 0x0005 and B8:A8 = 0x00B2 instead of
B7:A7 = 0x0A03 and B8:A8 = 0x0957. B7 and B8 are dumped incorrectly if 0xBD has enabled 0x20 bit.

I see topics about SBVGM in this forum and before tests I must create a PHP script to translate VGZ/VGM to DRO/RAW format or use any other program if it is done by someone else. Without it I cannot make reliable tests.

Last edited by Electronic Genets on 2022-05-13, 09:45. Edited 1 time in total.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 9 of 22, by OPLx

User metadata
Rank Member
Rank
Member
Electronic Genets wrote on 2022-05-13, 09:02:

I will look today at snaretest file.

OPLx wrote:

One thing to keep in mind is that the frequency of the tom tom (operator 14) affects that of the hi hat (operator 13) which ultimately affects the snare drum's frequency (operator 16).

The roadmap uses operators numbering from 1 instead of 0. Thus "(14)" means operator 13.

Understood. The operator numbering I was using starts at 0. Yamaha's YM3812 datasheet starts at 1. I often found this confusing since one has to start with 0 when programming the chip.

Electronic Genets wrote on 2022-05-13, 09:02:
Thank you for this information. It is very sad that DosBox standard (described in manual) function Alt+Ctrl+F7 (recording OPL re […]
Show full quote
OPLx wrote:

Channel 8: FNum=0x157, Block=0x2
Channel 7: FNum=0x203, Block=0x02

Thank you for this information. It is very sad that DosBox standard (described in manual) function Alt+Ctrl+F7 (recording OPL registers) works wrongly. This is very easy function to record each change of registers...

In my DRO file I see:
B7:A7 = 0x0005 and B8:A8 = 0x00B2 instead of
B7:A7 = 0x0A03 and B8:A8 = 0x0A57. B7 and B8 are not dumped if 0xBD has enabled 0x20 bit.

I guess this must be a bug then?

Electronic Genets wrote on 2022-05-13, 09:02:

I see topics about SBVGM in this forum and before tests I must create a PHP script to translate VGZ/VGM to DRO/RAW format (or use any other program if it is done by someone else). Without it I cannot make reliable tests.

In lieu of actual hardware, another option is to create a test program (using Nuked-OPL3 or ymfm) that allows you to write to the registers to hear what it will sound like (those two emulators have fairly high accuracy). That should hopefully reduce the amount of time it will take you to find the discrepancies that you are looking for.

Reply 10 of 22, by OPLx

User metadata
Rank Member
Rank
Member

Just a minor correction to what I wrote above. The FNum and Block value for operator 15 (tom tom) and the Multi setting for operator 18 (cymbal) affect the final output on operator 14 (hi hat). Operator 17 (snare drum) is only influenced by operator 14's FNum, Block, and Multi setting.

Reply 11 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

OPLx, thank you for your research. Do you have your detailed notes about it? It is not describad in any online document (the Tom Tom influence to HH/CY). In future if I will have YM3812 (the YM3812 costs only $1-3 per one item) I can try to study this mechanism. Is the TC also influenced by Operator of Tom Tom? The test would be easier due to the lack of noise generator.

Regarding VGZ files and PHP it is very easy format. I use OPL2 format (header, [register, data, register, data]+) and the VGM after decompression of VGZ (one line in PHP...) the format is
header [5A register data, 5A register data]+.
It is very easy to make RAW, DRO or OPL2 format from it. The reformatted tracks will also be useful for me.

"Highways" uses nonstandard settings for SD, TC and HH.
B7:A7 = 0A05 (like due last music test) B8:A8 = 06B2
vogons6.png

It means DosBox sucks so goodly and doesn't save B7 and B8 registers in percussion mode. I don't know where is bug tracker of DosBox to report it. I found multiple GitHub accounts with DosBox (clones?).

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 12 of 22, by OPLx

User metadata
Rank Member
Rank
Member
Electronic Genets wrote on 2022-05-13, 15:19:

OPLx, thank you for your research. Do you have your detailed notes about it? It is not describad in any online document (the Tom Tom influence to HH/CY). In future if I will have YM3812 (the YM3812 costs only $1-3 per one item) I can try to study this mechanism. Is the TC also influenced by Operator of Tom Tom? The test would be easier due to the lack of noise generator.

I just did a quick verification on the hardware I have. The OPL3 Percussion Mode Map diagram shows the relationship: The orange PM (hi hat) combined with the purple PM (cymbal) feeds into the yellow PM (snare). At the top of the diagram you can see the FNum and Block feeding into the respective PMs (orange, yellow, magenta, and purple). As far as I can tell, there isn't any other detailed document online.

Operator 18 (TC) is affected by the FNum, Block of Channels 8 and 9, the Multi of operator 14 (hi hat), and the Multi of itself (operator 18).

Electronic Genets wrote on 2022-05-13, 15:19:
Regarding VGZ files and PHP it is very easy format. I use OPL2 format (header, [register, data, register, data]+) and the VGM af […]
Show full quote

Regarding VGZ files and PHP it is very easy format. I use OPL2 format (header, [register, data, register, data]+) and the VGM after decompression of VGZ (one line in PHP...) the format is
header [5A register data, 5A register data]+.
It is very easy to make RAW, DRO or OPL2 format from it. The reformatted tracks will also be useful for me.

"Highways" uses nonstandard settings for SD, TC and HH.
B7:A7 = 0A05 (like due last music test) B8:A8 = 06B2
vogons6.png

It means DosBox sucks so goodly and doesn't save B7 and B8 registers in percussion mode. I don't know where is bug tracker of DosBox to report it. I found multiple GitHub accounts with DosBox (clones?).

Perhaps it's a bad VGM capture rather than a bug? I've attached a DRO version of highways that I captured for you. Maybe this doesn't have the issues you see.

Attachments

  • Filename
    highways.zip
    File size
    4.19 KiB
    Downloads
    44 downloads
    File license
    Fair use/fair dealing exception

Reply 13 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie
OPLx wrote:

Perhaps it's a bad VGM capture rather than a bug? I've attached a DRO version of highways that I captured for you. Maybe this doesn't have the issues you see.

In your file, the 0xB7 register has index 0x75. After searching 0x75 after header There is only one occure: "75 00". This file also is affected by this bug.
I use DOSBOX 0.74-3 for Linux. It is bug because the VGM (decompressed VGZ/VGM.GZ) contains setting of B7 register. In DRO file there is no initialization value for B7 (but should be). Only setting to 00 at end. You can check it with GHex. Ctrl+F 75. Two occurences. First at definion of assigning register numbers to successive indexes (01, 04, 05, 08, BD, (...), 55, 75, 95...) and second at the end (75 00). Also in your file.

Regarding operators in the OPL3 "Percussion Mode Map" I do not see, the Tom Tom could influence any other instrument than Tom Tom. It looks like standard AM channel (but without feedback). You wrote you have other experience.

OPLx wrote:

The FNum and Block value for operator 15 (tom tom) and the Multi setting for operator 18 (cymbal) affect the final output on operator 14 (hi hat).

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 14 of 22, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie
Electronic Genets wrote on 2022-05-13, 15:19:

I don't know where is bug tracker of DosBox to report it[/b]. I found multiple GitHub accounts with DosBox (clones?).

The official one is

https://sourceforge.net/p/dosbox/bugs/

its not on github.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 15 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

Thank you BloodyCactus. I report known bugs (OPL recording, percussion problems, keymapping problem, XMS function problem) during this weekend. I have no account on sourceforge for the moment.

There are also problems with DOS applications (indicating memory leaks - absent on the original DOS). But these are not games. Is any chance they'll take it seriously? Maybe the problem with OPL recording also is a problem with memory leak.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 16 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie

Next test of the OPL2-like emulator but without using DosBox. VGZ converted by PHP to OPL2 file format and then played to file (49716 Hz). https://ufile.io/ueykxxuv

Part of files contains unsupported and undocumented writing register commands. For example registers 4e and 4f. Logs are also attached in zip file with absolute position from start of VGM (uncompressed).

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 17 of 22, by OPLx

User metadata
Rank Member
Rank
Member
Electronic Genets wrote on 2022-05-13, 16:29:
OPLx wrote:

Perhaps it's a bad VGM capture rather than a bug? I've attached a DRO version of highways that I captured for you. Maybe this doesn't have the issues you see.

In your file, the 0xB7 register has index 0x75. After searching 0x75 after header There is only one occure: "75 00". This file also is affected by this bug.
I use DOSBOX 0.74-3 for Linux. It is bug because the VGM (decompressed VGZ/VGM.GZ) contains setting of B7 register. In DRO file there is no initialization value for B7 (but should be). Only setting to 00 at end. You can check it with GHex. Ctrl+F 75. Two occurences. First at definion of assigning register numbers to successive indexes (01, 04, 05, 08, BD, (...), 55, 75, 95...) and second at the end (75 00). Also in your file.

It looks like a legitimate bug then.

Electronic Genets wrote on 2022-05-13, 16:29:

Regarding operators in the OPL3 "Percussion Mode Map" I do not see, the Tom Tom could influence any other instrument than Tom Tom. It looks like standard AM channel (but without feedback). You wrote you have other experience.

That is correct. The tom tom does not influence any other instruments. The only influence comes from the FNum and Block values which get passed on to operator 18, which applies it's MULTI value to the output which is then used in the other areas (as shown in the diagram). Sorry for any confusion from my previous explanations.

Reply 18 of 22, by Electronic Genets

User metadata
Rank Newbie
Rank
Newbie
OPLx wrote:

It looks like a legitimate bug then.

Yes, I have tried to create account on the SourceForge. DosBox sucks but the SourceForge is a shitty website and sucks more.
I never send any spam from my e-mail but after trying registration I see:
vogons7.png
Thus I cannot report bugs and make DosBox better.

As people are blocked by systems so that they cannot report a bug, there will be more and more unreported bugs, but this is in the interests of governments and globalists to exploit the bugs later.
301 reported bugs this week throughout Sourceforge. It seems that not only I have a problem. This is very little.

I recommend DosBox authors to create a website for the project and install Mantis, Jira or Bugzilla to manage bugs and tickets. I have no problems with reporting bugs to Mozilla.

Thanks for help so far.

Author of the DINO-2e OPL2-like emulator.
DINO-2e is not OPL2 emulator.

Reply 19 of 22, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Please use an SVN build of DOSBox, as it appears that the DRO capture issue has been previously reported and a fix committed:
AUDIO - raw opl capture problem

The RDOS Adlib Capture utility issue with XMS was also previously reported:
RDOS Adlib Catcher
As noted in the linked thread, a workaround is to set xms=false and ems=false
However, I do not know if this utility works correctly in DOSBox.