First steps with MSX-Music

Page 2/2
1 |

By NYYRIKKI

Enlighted (5589)

NYYRIKKI's picture

11-08-2020, 10:02

Briqunullus wrote:

Just wondering. Because of that detection routine, even clones wouldn't work in an I/O only slot, would they?

Yes, technically clones work just fine on I/O slots as they don't need to be activated first, but usually detection routines search "PAC2OPLL" / "APRLOPLL" ID-string from ROM and if they can't find it they likely switch to PSG music instead.

By Metalion

Paragon (1174)

Metalion's picture

11-08-2020, 10:32

Grauw wrote:

If you detect an FM-PAC, you need to set bit 0 of address #7FF6 to enable the I/O ports (disabled by default to allow multiple FM-PACs). Further explanation here here. Example code including detection following the MSX Datapack advice here.

Yes, I am aware about that procedure to enable the I/O ports after detection. At the moment, I'm just happy (for my tests) that the FM-PAC cartridge works directly out of the box with I/O ports, without any need for initialization.

I ran into another problem : I assumed, reading the YM2413 application manual, that to produce any note, you just could enter the F-number of a given octave (for example the 4th octave), and then change the octave in the Block bits (in registers 20h-28h). So for example, I could do this :

note    F-number    Block
C4      171         4
C5      171         5
C6      171         6

And if you check with this formula, it seems to confirm that :
Fnumber = Fmus . 2^18/ Fsam / 2^(Block-1)

But it doesn't seem to work entirely like that. I get some notes in 4th octave, some in 3rd, but some notes are missing. So I guess I got it wrong. Could someone correct me on that ?

PS : I think this hobby needs a fuller and clearer MSX-Music application manual. Yamaha can be so obfuscated sometimes in their explanations ...

By Grauw

Ascended (9272)

Grauw's picture

11-08-2020, 10:32

No, your assumption is correct. Something else must be wrong if it doesn’t work for you. Maybe to do with key on, or you’re using the wrong bits?

By Metalion

Paragon (1174)

Metalion's picture

11-08-2020, 11:46

I found the problem : my F-number table was incorrect, and the E note was missing. I had this :

F_number	; A,A#,B,-,C,C#,D,D#,E,-,F,F#,G,G#
	word	288,306,324,0,171,182,192,204,0,216,229,242,257,272

where I should have had this :

F_number	; A,A#,B,-,C,C#,D,D#,E,-,F,F#,G,G#
	word	288,306,324,0,171,182,192,204,216,0,229,242,257,272
Page 2/2
1 |