-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heuristic to switch problematic chipsets to PIO #70
Conversation
No problem. |
@volkertb is it possible to publish the build release only by hand, and the auto-build only performs as check workflows? because there might be 'working in progress' commits that doesn't require a release. |
@crazii What if I change it so that it will still always build, but only publish when you push a tag? So only once you're ready to actually "release a new version", you do the following (assuming for example that you want to release a version numbered
And then GitHub Actions will not only build as usual, but also package and publish the USB image. Would that work for you? |
I think it's ok, are the none release build artifacts still being kept, if yes, for how long? Sorry I'm not familiar with GitHub that much. :) |
No, once we make a distinction and only publish releases when a tag is pushed, then only the artifacts of those releases will be published and thus preserved. The build logs of the non-release builds will still be kept in history, but no artifacts will be stored from the non-release builds. At least that's how I understand it. |
I read the spec again, the original CORB/RIRB may not properly initialized, I will change the code but I'm not sure if that will conflict your changes. I'll add a complete init routine (corb_init) for CORB/RIRB since to make sure the first cmd not always fail. I tested with my laptop now it won't fail, so I removed this code in mixer_init, but you need check it on your PCs to see if it is still the same, |
I just added your code back to int corb_init function, you can check if the changes work. |
Intel D945GCLF2: OK, it switches to PIO like before. I found another motherboard that switches to PIO: |
There might be IRQ conflicts, although the SBEMU handles shared IRQ but it might have problems, turn off onboard LAN/USB and other onboard devices. |
Sometimes enabling onboard devices also helps with IRQ issues. My a0751h did not get an IRQ assigned for the HDA chipset until I enabled the onboard LAN controller: Baron-von-Riedesel/VSBHDA#1 |
SBEMU will auto assign IRQ for ICH, VT82xx, but not for HDA(never seen unassigned for HDA). I can add it too. |
Removing the / from the Jemm386 option improved things, but it still crashes after a few minutes. I am trying to debug this using duke3d. Disabling sound effects, and using MIDI for music, it always crashes in the same place, after a few minutes into the demo. Does anyone know how to find what is at that CS:EIP? Is there some way to implement get_cs and get_eip? BTW, in sc_inthda.c, ... EDIT you already fixed that assertion. |
I have them fixed, pushed up 5h ago: f50531d |
There's a
The address of label which means next instruction address after DBG_Log, can be get using &&, but it is GCC only. EDIT: You can wrap up this code to a macro which might be convenient. |
BTW: there's a offline doc for DJGPP, (functions, structs etc, which might help you finding useful things). |
The IRQ assignment is improved (d517785), but still it might not work, I tested on my laptop and it works. you can test it too. |
This MA3-79GDG, I reset the BIOS settings to default and disabled HDA. Now Duke 3D and Monkey Island are stable with a CMI PCI card. The HDA is still detected, but snd_ihd_mixer_init fails.
I think it is better to not disable HDA in this case, since otherwise SBEMU will exit with a "No supported soundcard found!" message. Related: is there a "dummy" soundcard driver, that will not try to use any sound card? |
There was a
With an addition condition that P330 is enabled, that will be better? Can you create the PR for that? Or I just do it? |
When I now disable network boot in BIOS (thus not getting an IRQ assigned); Still with current SBEMU build; my intel HDA; Quake works; but Doom crashes. |
There's some bugs causing the crash, thanks for testing, I'll try to fix it. |
UserBuild_2024.01.17_13-59 Same issue ;-) |
I updated some fix, hope it will work this time. |
I already tried the release before your comment as I noticed from the buildbot a new version was available. UserBuild_2024.01.17_13-59 Unfortunately same issue |
I've tried to fix it again, you can test it if it works. if not, you can make a debug build by |
I fixed a interrupt issue for HDA, but not sure it's related, I can try it, thanks. |
There might be some unhandled corner cases, but it's hard find them, hope we'll fix them by time. |
Still same issue |
Weird. At least I will get an error on my laptop for this call, or in virtualbox ( |
If there is a selectable null driver, I think it is better to return an error in this case. I can make a PR later. BTW, pcibios_enable_interrupt is implemented wrong, it only reads and sets one byte. |
pcibios_enable_memmap_set_master etc. are also wrong, I will make a PR |
It's unrelated to that. Yes it should be a word write, I just copied the code above not realizing that it should be word. |
That code is OK. since the function doesn't alter the higher byte. |
Doesn't the YMF7x4 works with its own driver? Does the SetupDS/DSDMA require motherboard support? I kinda forget the details. |
I've added 32 bit protected call to PCI BIOS, you can check it again. If it still freezes, then it'll need to program the interrupt router, but that's more complicated. I think we need more tests for more PCs, if it works for other PCs, then just leave it. It works on my laptop with a different code path, since my laptop has conflict IRQ routing options: the sound card options is IRQ 5, another device uses IRQ 10, but they are wired together with the same interrupt link. So PCI_SET_INTERRUPT will naturally fail. But weird that the sound card can works with IRQ 5/10 only changing the PCI config register INT_LINE. I didn't know how the bios setup the interrupt router for it. |
But I agree with you; there are issues with higher priority especially if my netbook is the only one. (N=1) Items I could still help with testing:
|
Still freezes using PM mode call. That's really frustrating.. :) Just leave it be for now. |
The bug on CMI8738-PCI-SX is fixed, you can try it out. It should also fix for the CMI8338 cards. |
Weird, I didn't change anything important. I'll check the code again. |
I also compared the debug output with the working (6ch) card vs the non-working card (PCI-SX). |
I previously removed the code resetting ADC, added it back, if it still doesn't work, I can revert codes line by line to help identifying which line causing the problem. Or I can revert them all except the mixer fix, but without knowing why this happens. |
userbuild 13-51 still crashes with same behaviour |
can you test the build 2024.01.15_12-46 to confirm whether it crashes? I doubt the commit on 12-46 might have problems. |
https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.01.15_12-46 https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.01.19_13-23 |
Hell no, then I'll continue reverting codes. |
2024.01.20_14-30 --> Crash |
Then I think the problem might be the version number detected incorrectly, I reverted some code and also copy the version detection code from Linux kernel. If it doesn't crash this time, then it behaves as the original code, and won't have sound either. |
I commented out the mixer code, we're back to the original point. |
https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.01.20_15-08 --> Confirmed No Crash. No Sound (Same behavior as last week) :) |
I tried disable SB16 mode, hope it doesn't crash this time. |
https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.01.20_15-36 --> Same behavior as 15-08; |
OK at least it doesn't crash this time, I get why the crash happens but the datasheet is so unclear and misleading. |
There was a bug in interrupt function and I fixed it. EDIT: maybe this one #55 fits better. |
Sorry to bother you again with this, but with #68, everything seems to fallback to PIO.
I think this is from mpxplay:
card->codec_vendor_id = snd_hda_param_read(card, AC_NODE_ROOT,AC_PAR_VENDOR_ID);
if(card->codec_vendor_id <=0)
card->codec_vendor_id = snd_hda_param_read(card, AC_NODE_ROOT,AC_PAR_VENDOR_ID);
The first read always times out!
I tested this with 3 motherboards including the problematic D945GCLF2.
With this patch, only the D945GCLF2 will fallback to PIO.
Regarding the comment below, what devices did you run into that did have immediate commands?
"Immediate Commands are optional, some devices don't have it, use CORB"