skiselev / 8088_bios

BIOS for Intel 8088 based computers
GNU General Public License v3.0
515 stars 61 forks source link

Adlib Clone not recognised properly #12

Closed explit7 closed 1 year ago

explit7 commented 2 years ago

Having this Adlib Card (AA Pro) https://www.ebay.co.uk/itm/143988497879?mkevt=1&mkcid=1&mkrid=710-53481-19255-0&campid=5338722076&toolid=10001

The card works fine with Prince of Persia :) on Micro8088 but is not recognised under BIOS 0.9.8a and 0.9.8d (spark2k06) OPL Sound Card: None or Unknown

On which criteria OPL Hardware is recognised?

Thanks

skiselev commented 2 years ago

The OPL2 code is not in my 8088_bios repository, it looks that @spark2k06 implemented it in his "alternative" branch: https://github.com/spark2k06/8088_bios/tree/alternative

explit7 commented 2 years ago

Thanks for the Info Sergey, will ping @spark2k06

spark2k06 commented 2 years ago

OPL2 / 3 detection method I got from here:

https://www.fit.vutbr.cz/~arnost/opl/opl3.html#appendixB

And the implementation that I carried out, on several typical I / O ports here:

https://github.com/spark2k06/8088_bios/blob/alternative/opl.inc

spark2k06 commented 2 years ago

Also, if the OPL2 or compatible board is set to the standard port 388h, the Intel 'Bong' tune will sound at start. Implementation added to the already present module:

https://github.com/spark2k06/8088_bios/blob/alternative/sound.inc

Demo:

https://www.youtube.com/watch?v=DnJ8s1p-hlg

I built my own internal sound card (with HDAudio connector) design based on Texelec's Resound v1.1, and I make it available in my Tindie store, which is detected correctly, as can be seen in the video:

https://www.tindie.com/products/spark2k06/internal-opl3-fm-for-pcxt/

spark2k06 commented 2 years ago

@explit7, I have implemented a new feature to allow a delay before video card initialization and sound card detection, optional and configurable from the configuration file:

https://github.com/spark2k06/8088_bios/commit/5f5641239897ed0af1ca328c336ef83ac9da619c

This may help you, try different delays and stick with the one that works for you:

https://github.com/spark2k06/micro_8088/tree/master/BIOS/ROMS_INIT_DELAY

explit7 commented 2 years ago

Thank you very much spark2k06, i have tried all 4 BIOS files with different delay, but unfortunately it doesnt help. will stay with 1000ms, and let you know if i find something interesting. Thanks

spark2k06 commented 2 years ago

Try running the testopl.com that you also have available in my repository:

https://github.com/spark2k06/8088_bios/blob/alternative/testopl.com

explit7 commented 2 years ago

Hi. Thats funny. when i start testopl.com for the first time - it show me None or unknown. When i start it second time (after 3sec.) - it plays the sound and recognise it just fine. testopl

explit7 commented 2 years ago

After rebooting it show me Adlib FM compatible after the first start. But in BIOS its still None or unknown

spark2k06 commented 2 years ago

This is already very strange. Something happens with that sound card of yours but I don't know what it is. If I can think of something else, I'll tell you.

explit7 commented 2 years ago

Thats indeed very, very strange... More strange is the fact, that prince of Persia recognize the card every time i start it without any problems, doesnt matter cold boot / warm boot, no matter what bios version etc. So i doubt the card is somehow "broken". Will also try doublecheck all solderpoints (i have assemled the card myself)

spark2k06 commented 2 years ago

It is also possible that the OPL detection code that I have implemented is not the most optimal, who knows ... Can you try running the testopl.com program several times in a row? is it always the first run that goes wrong? or is it random? What CPU frequency do you have selected? try all three, to see if it's some timings ...

explit7 commented 2 years ago

I tested it many time with all 3 CPU frequencies. Its absolutely random. Testopl have not worked 10 times in a row with all 3 frequencies.

Than i started prince of persia - opl works. started again testopl for 10 times - always none ore unknown.

waited 5 minutes. Reboot pc. testopl worked after first run. very strange. I have purchased Resound 2 Soundcard. Will test it with this one, after i got it.

Thanks for you time and investigation!

spark2k06 commented 2 years ago

Okay, you'll tell us. It is also true that this feature has not had to have been extensively tested on various boards, after all, it is an alternative branch to the official one ... and I have only had one board to test.

explit7 commented 2 years ago

whats again the difference between 0.9.8a and 0.9.8d versions ? btw: 0.9.8d BIOS still shows 0.9.8a during boot screen. Is it just cosmetic mistake, or is it like it should be ?

spark2k06 commented 2 years ago

It is normal that it shows the same version, version D is still the alternative version but with DEBUG information, specifically it shows the POST codes during boot, if you install it, look at the screen at the top right, you will see the change of codes.

explit7 commented 2 years ago

I have a very small hope, that the issue can be solved: On my Adlib card there is an ic socket with marking 74LS245. The IC i got from the seller in the kit is 74AHCT245N. I found in my ic crap box an 74LS245 and installed it instead of 74AHCT245N. Now the card is recognized correctly and OPL Test runs also fine. With all BIOS versions. Only the first Intel chime is played very short and in very short volume, but the chime after Ctrl + Alt + Del is normal and testopl.com chime is also played fine.

Maybe the 74AHCT245N was really broken or somehow incompatible,

will make further testing and let you know !

Thanks again for taking time!

spark2k06 commented 2 years ago

Glad you solved the problem. As for the initial volume, if the sound comes out of speakers integrated in the monitor, perhaps the VGA has not yet been synchronized and those internal speakers are working half, I do not know, I would not think of anything else.

spark2k06 commented 2 years ago

If you don't use built-in speakers, the "problem" is the sound card, which is not fully "powered up" ... or something like that.

explit7 commented 2 years ago

Yes built-in speakers in VGA-Monitor. I also think, the VGA is not synchronized, but this an very small cosmetic problem....

skiselev commented 2 years ago

74LS245 is slower than 74AHCT245, but otherwise they should be compatible for the purpose of buffering the data bus. Still there's a slight chance that the part being too fast causes some kind of timing issues. Unfortunately I can't find schematic for this board, so I can't tell what else can be wrong. It appears that they use SPLD, so maybe there's something with the way it is programmed. Tip for the future - buy boards that have schematic available. In case of Adlib/OPL2 there are quite a few options. In the Aapro one, it looks that they skimmed on some components, for example, filters and a power on time delay circuit. Possibly this might cause some sound quality issues

explit7 commented 2 years ago

That a good explanation, Sergey. THX! You are absolute right. Open Source Software and Hardware is always the best option!

explit7 commented 2 years ago

74LS245 is slower than 74AHCT245, but otherwise they should be compatible for the purpose of buffering the data bus. Still there's a slight chance that the part being too fast causes some kind of timing issues. Unfortunately I can't find schematic for this board, so I can't tell what else can be wrong. It appears that they use SPLD, so maybe there's something with the way it is programmed. Tip for the future - buy boards that have schematic available. In case of Adlib/OPL2 there are quite a few options. In the Aapro one, it looks that they skimmed on some components, for example, filters and a power on time delay circuit. Possibly this might cause some sound quality issues

That true. They sell a simple Version where some components are missing or just populated with an simple bridge. and an "Pro Upgrade Kit" https://www.ebay.de/itm/143952766382?hash=item218440e5ae:g:qycAAOSwdAVfJVa8

In my case i purchased and also soldered the additional components to upgrade to "Pro" s-l1600

skiselev commented 1 year ago

It appears that the issue was related to a hardware issues. Closing...