How to detect sound chips without Bios

Page 6/7
1 | 2 | 3 | 4 | 5 | | 7

By gdx

Enlighted (5319)

gdx's picture

28-01-2022, 09:54

Philips NMS-1205 is not an MSX-Audio! It use the same chip but not the standard I/O ports for it.

By Grauw

Ascended (10558)

Grauw's picture

28-01-2022, 10:38

What do you mean by “not the standard I/O ports”? The Philips NMS-1205 uses I/O ports C0H / C1H to communicate with the Yamaha Y8950 MSX-AUDIO sound chip.

By gdx

Enlighted (5319)

gdx's picture

28-01-2022, 11:26

Right, I thought it was different. By cons the rest that is not standard.

By Parn

Paladin (772)

Parn's picture

28-01-2022, 14:44

I'm utterly embarrassed by my mistakes in my previous post, and a bit relieved no one seemed to pay attention. Always best double check before posting. Tongue

By aoineko

Champion (398)

aoineko's picture

28-01-2022, 16:17

I have added to https://www.msx.org/wiki/MSX-AUDIO_programming a part about the detection of the Y8950 without the BIOS. This seems to me an important information for MSX developers. If it's a problem to talk about it on the MSX-AUDIO page, we could create a specific page "Y8950 programming".
Feel free to rewrite my text if it is not clear or if there are errors.

By Grauw

Ascended (10558)

Grauw's picture

28-01-2022, 16:22

Nice! A good addition.

@Parn I think you were factually correct Smile.

By ducasp

Hero (536)

ducasp's picture

28-01-2022, 19:57

aoineko wrote:

I have added to https://www.msx.org/wiki/MSX-AUDIO_programming a part about the detection of the Y8950 without the BIOS. This seems to me an important information for MSX developers. If it's a problem to talk about it on the MSX-AUDIO page, we could create a specific page "Y8950 programming".
Feel free to rewrite my text if it is not clear or if there are errors.

I think this doesn't look good...

Quote:

If you get 06h, then it is likely that the Y8950 is present. In fact, because bits 1 and 2 of the MSX-AUDIO status register are floating, you should mask these two bits out before checking the value: (in(0C0h) & 11111001b) == 0.

You say if you get 06h it is likely it is present... But then you say the bits that can cause the value to be 6 can have other values... That sentence then (if you get 06h) is confusing with the code, because the code will work for 0, 2, 4 and 6.... So I think it would be best if it was:

Quote:

If you get 00, 02, 04 or 06, then it is likely that the Y8950 is present. This is because bits 1 and 2 of the MSX-AUDIO status register are floating, so different values can be read for those bits. A clean solution is to mask these two bits out and checking if the masked value is 0: (in(0C0h) & 11111001b) == 0.

Nitpicking, but it got me thinking that if I need to check if it is 6, why the heck are the bits that will cause the value to be 6 being masked in the code? :P

By Grauw

Ascended (10558)

Grauw's picture

28-01-2022, 20:54

I’ve amended the text a bit in line with your suggestion.

By aoineko

Champion (398)

aoineko's picture

28-01-2022, 23:36

I understand that in theory you can get a value different to 06h from the C0h port, but are you sure that it happens in practice?
All the old articles I found about MSX-AUDIO detection are limited to reading 06h on the C0h port.
Was this an urban legend or is it a method that works on a large part of MSX?
It seems I read somewhere that the values other than 06h only concern some MSX1. Can you confirm this?

By Grauw

Ascended (10558)

Grauw's picture

29-01-2022, 00:48

Yes it happens in practice, that is how I found out and why I adapted the check in VGMPlay MSX for it, because it sometimes failed to detect the Music Module on certain machines. See this bug report from Louthrax. I believe I first encountered it myself on my Zemmix Neo with a lot of extensions plugged in.

Most Music Module software was written for European MSX2 computers and most (all?) of them have pull-up resistors, so it happens to have worked for many people in the past. In the older thread I found that MoonBlaster 1.4 checks for INP(&HC0)<>255, this is obviously going to give false positives on any machine without pull-ups as well. So that kind of shows that situation of “it works on my PC”. However there is no guarantee, so it’s best to do the check properly.

I don’t have a conclusive list of which MSX computers do not have pull-ups, but at least it includes the Toshiba HX-10 and Philips VG8020/40.

I believe I read about the floating unused status bits in OPL documentation or forum posts from the PC scene, although I can’t find the reference right now.

Page 6/7
1 | 2 | 3 | 4 | 5 | | 7