Open Daxiel1992 opened 3 years ago
It would be interesting to hear the specs of one of your computers, I'm not an expert but would imagine that there'd be some difference between using dedicated & integrated graphics?
Interesting. I think it's really up to the computer to decide how to draw the text, so they don't necessarily have to follow any agreed specification. So maybe computers from different eras interpret the video memory differently, and in your case one of the bits probably controls flashing rather than the brightness of a color.
This is where drivers would come in, to iron out these differences as best as possible. So if you have a computer behaving differently, you could create a driver specific to that model that would, for example, disable certain colors so flashing doesn't occur
I tried emulating many of the processors made around the time of my pcs, but qemu still displayed everything correctly. It's definitely an interesting issue. This project is super cool so I am hoping something similar doesn't keep coming up.
If something larger than just text color doesn't work on hardware, I am guessing it will be a process of writing very low level code to determine which cpu we are using and then writing specific code for that cpu or group of cpus. I don't suppose you will be going over that in your series though?
@Ryledra The problem kept arising with and without dedicated graphics. Although, I only have one computer that is capable of swappable graphics, so not much of a test group XD
This all about the bios video interrupts and video memory usage. Basicly, this happens if you change the value in buffer when video subsystem is reading. You can’t time that. Since long mode switch is done, using bios interrupts is out!. I suggest using double buffered video memory usage.
@Daxiel1992 If this is an issue with a specific PC not following the same standard, then no, I will not be updating the code to handle this case, I don't want to overcomplicate the series.
If I get around to adding driver support to the kernel then people will have the option to write a custom driver for this scenario.
@hasanmanzak So are you saying this is a problem with my code? Are you sure the problem you are referring to is the same as that of @Daxiel1992? Their issue sounds like continuous flashing, rather than a once-off screen tear which is what I think you are trying to say?
I flashed the ISO to a flash drive and booted it up on a few computers around my house. On all of them, the text flashes. Not the background color, but just the foreground. This only happens on real hardware, in qemu it works fine. It seems it happens on all backgrounds equal to and greater than 8, anything less works as expected. Foreground color doesn't matter, as long as background is greater than 7, text flashes. Don't take this seriously as I am big dumb, but it may be an issue with the memory size?? Again, I'm dumb so take it with a huge grain of salt. I should also mention 8 renders as black and not a dark gray, although I am not sure if that is specific to only my computers or something..
I'm not experienced enough with C to even attempt a fix to this, but I did just spend like an hour building, flashing, running across my house to the family PC, and testing so give me a break. XD