Limitations with MSX-Music

Страница 2/5
1 | | 3 | 4 | 5

By Manuel

Ascended (16639)

Аватар пользователя Manuel

14-10-2007, 15:16

The program PSG Sampler can also play samples on MSX-MUSIC.

By sd_snatcher

Prophet (3270)

Аватар пользователя sd_snatcher

14-10-2007, 20:38

3: It can? Did anybody use this?Of course it can - just like the PSG can play samples...

Hummm, not quite. When in test mode, you can get direct access to the YM2413 DAC. On the PSG there's a lot of trouble to do it and the results are not good.

By sd_snatcher

Prophet (3270)

Аватар пользователя sd_snatcher

14-10-2007, 21:15

I've tried but I've had no much luck... (Check out Dragons Lair demo) Either the sample cuts, or it gets very low volume. Sometimes these happen even together. I hope someone could tell me how to initialize OPLL correctly to play samples. I know that I have to set OPLL to test mode, but what else?

Yes, I can tell you. The best sample player I ever found for the YM2413 is the FMSAMP of the Clubguide's Magazine 3. This is the one I used to test when I developed the YM2313->YM3812 translator that MAME used for a long time.

On Clubguide Magazine-3, you cant get to it by choosing Software-Menu->3.Short HOT SOFTS. Try the FMDEMO1, FMDEMO2 and FMSAMP programs. You'll notice the sound is smooth as smooth as the Y8950 and the volume is good.

Have a look at it's code, it's quite easy to understand and also easy to modify it to use either a COVOX or the Turbo-R PCM as I did.

I know the ClubGuid Magazine-3 is available on the msxarchive.nl, but unfortunately I can't get there to give you the direct link. It seems I'm being punished without access to msxarchive.nl just because I live in Brazil. How can I get the datasheets and docs from Hans Ottens site without access? This is compromising my MSX-Audio BIOS development.

Oh yes: I must correct a mistake I did on the previous post. The YM2413 plays 4bit unsigned PCM instead of 6bit (my memory is not good as it was Smile ). But the audio quality is very good. Probably the YM2413 interpolate the sound internally.

To easy things out, I'll explain how to play samples on the YM1413. It's fairly easy:

1) First, you have to configure the YM2413 to DAC mode on the register 0Fh.
2) Output your samples to the register #10h. The lower 4 bits will be ignored. I'm not sure right now if you have to clean this lower 4 bits. Try both and compare the results.

Register description:

Reg #0Fh TST

       7   6   5   4   3   2   1   0
     +---+---+---+---+---+---+---+---+
     | - | - | - | - |SND| - | - |SMP|
     +---+---+---+---+---+---+---+---+

SND = 1 : Sound output from the FM synthesizer is out
SMP = 1 : Sample mode ON. The higher 4 bits of the register #10h are
output to the audio out.

Reg #10h (in PCM mode)

       7   6   5   4   3   2   1   0
     +---+---+---+---+---+---+---+---+
     |    DAC DATA   | - | - | - | - |
     +---+---+---+---+---+---+---+---+

Please note that after configured like this, the YM2413 could be even used as a COVOX substitute on EVA, or to play the samples on the Konami's rc741-synthesizer and rc765-majutsushi (someone could release a patch for that).

It would be good if someone could include the information above on MAP (MSX Assembly Page).

I hope I could be of any help.

By sd_snatcher

Prophet (3270)

Аватар пользователя sd_snatcher

14-10-2007, 21:18


On Clubguide Magazine-3, you cant get to it by choosing Software-Menu->3.Short HOT SOFTS.

Typo! I mean:

On Clubguide Magazine-3, you CAN get to it by choosing Software-Menu->3.Short HOT SOFTS.

By msd

Paragon (1381)

Аватар пользователя msd

14-10-2007, 21:26

So 4bit not 6bit. That is wat I would expect

By sd_snatcher

Prophet (3270)

Аватар пользователя sd_snatcher

19-10-2007, 19:01

I'm not sure about the sound limitations on the MSX-Music (OPLL).

From what I understand, you can only select one hardware sound or software variations of it for a full set of voices.
Is that it ?

But what about the drums then ?

As you asked for limitations of the MSX-Music and not only the YM2413, I believe you want to know about the entire standard.

Apart from the YM2413, there's the BIOS also. The MSX-Music BIOS a badly done hack off the MSX-Audio BIOS. So badly done that it can't even be considered a BIOS, since it does not implement the standard BIOS calls, implementing only the MSX-Basic functions and a small set of almost useless CALLs. It's mainly used as a detection pattern for the cartridge, since the YM2413 only was write-only.

By Manuel

Ascended (16639)

Аватар пользователя Manuel

19-10-2007, 20:01

http://www.msxarchive.nl/pub/msx/magazines/clubguide_magazine/CGM%2303.LZH

Note that this magazine uses routines by Michel Shuqair, who also wrote PSG Sampler.

By NYYRIKKI

Enlighted (5541)

Аватар пользователя NYYRIKKI

19-10-2007, 23:04

Oops, I almost missed this...

Thank you sd_snatcher. This information is exactly what I used to implement the sample play routine in Dragon's Lair demo. How ever it did not work out too well... Actually I did quite a lot of testing without geting it to work 100%. I got a bit better result by writing #FF to registed #F. Maybe I should have tried to reset the low bits... how ever if that is the solution, it makes it impossible to implement proper MSX-Music support to Dragon's Lair. (In the demo the data can't go trough memory or registers and I don't want to cut quality of other devices.)

Anyway thanks for the hint... I will check out Clubguide #3.

By AuroraMSX

Paragon (1901)

Аватар пользователя AuroraMSX

20-10-2007, 11:15

3: It can? Did anybody use this?Of course it can - just like the PSG can play samples...

Hummm, not quite. When in test mode, you can get direct access to the YM2413 DAC. Ah, test mode... I just thought of setting one of the channels to a low frequency and then play the sample through the volume setting of that channel. That would be 4-bit though...

By Grauw

Ascended (9071)

Аватар пользователя Grauw

23-12-2019, 13:12

sd_snatcher wrote:

I'll explain how to play samples on the YM1413. It's fairly easy:

1) First, you have to configure the YM2413 to DAC mode on the register 0Fh.
2) Output your samples to the register #10h. The lower 4 bits will be ignored. I'm not sure right now if you have to clean this lower 4 bits. Try both and compare the results.

I have tried this, the description seems to be incomplete since I could not get any sound with the above.

However I’ve taken a look at the code used in Clubguide Magazine 3, it initially sets r#48 to 255, r#15 to 255, r#32 to 0, r#32 to 255 (?), and after that sends PCM data (AND 0F0H required) to r#16. I’ve tried this myself as well, and that does work. I haven’t delved deeper to find out which of all those are the significant bits.

Perhaps FRS in his testing did not reset r#32 and r#48 so they stayed at those initial values set in an earlier test. I did that once as well.

I’ve tried this with setting r#15 to 9 rather than 255 and then I do hear sound, but also a loud high pitch.

See also this Twitter conversation with some observations from Okazaki (D.S.A.) and Nuke.YKT:
https://twitter.com/Grauw/status/1208845242201509888

It also works for multiple channels actually:
https://github.com/digital-sound-antiques/emu2413/wiki/4-bit...

D.S.A. wrote:

I also tried reduced settings. The following works: r#48 to 240, r#15 to 15, r#32 to 31. Then send PCM data (with AND 0F0H mask) to r#16.
Further, this approach seems also working on the another channel. I also tried r#56 to 240, r#15 to 15, r#40 to 31, then send PCM data (with AND 0F0H mask) to r#24. It also works.

nukeykt wrote:

Interesting, looks like it using test bits 2 and 0. Bit 2 resets phase accumulator on each iteration and thus phase gen. unit effectively outputs phase increment value which could be controlled using r#16. Bit 0 forces env. gen to output zero attenuation value (e.g max volume)

If Nuke.YKT is correct then then YM2413 test register is identical to the VRC7’s:

TEST (0x0F)
	76543210
	|||||||\- if 1, Disables Car/Mod EG units, EG output is forced to 0 (max volume)
	||||||\-- if 1, resets (and holds, while active) the Trem and Vib LFO counts to 0
	|||||\--- if 1, resets (and holds, while active) the PG count for Car/Mod at 0 (this effectively silences the chip)
	||||\---- if 1, the EG unit clock comes from VRC7 'D2' Pin, and the Trem and Vib LFO clock dividers are disabled, so they increment once per clock (x64 and x1024 their usual clock rates, respectively)
	|||\----- Does nothing?
	||\------ Does nothing?
	|\------- Does nothing?
	\-------- Does nothing?
Страница 2/5
1 | | 3 | 4 | 5