CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.94k stars 551 forks source link

VBE not working on real hardware, loading bitmap files too #2164

Open selkij opened 2 years ago

selkij commented 2 years ago

Area of Cosmos - What area of Cosmos are we dealing with?

VBEDriver

Expected Behaviour - What do you think that should happen?

should boot and show my desktop environment I did.

Actual Behaviour - What unexpectedly happens?

CPU exception x0D (General Protection Fault) when loading bitmap files CPU exception x06 (Invalid OpCode) when doing this

VBE = new((ushort)Width, (ushort)Height, 32);

Reproduction - How did you get this error to appear?

just do

VBE = new((ushort)Width, (ushort)Height, 32);

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

commit 6510f61ad4b20568c1386c7e386fc9d3d50bafeb (the 2 last commits are just adding a possibility to restart the kernel so its ok)

quajak commented 2 years ago

Is it possible that you are trying to set a mode which is not supported by the hardware? Does FullScreenCanvas.GetFullScreenCanvas work? What code are you using to load the bitmap?

selkij commented 2 years ago

Is it possible that you are trying to set a mode which is not supported by the hardware? Does FullScreenCanvas.GetFullScreenCanvas work? What code are you using to load the bitmap?

I'm not using Cosmos's canvas

quajak commented 2 years ago

Without exact code, this remains unreproducable.

selkij commented 2 years ago

see https://github.com/Kiirx/ProjectOrizonOS

selkij commented 2 years ago

see branch impl-graphic-mode

quajak commented 2 years ago

It would be a lot easier if the relevant code extracted to what is actually necessary to reproduce this issue. Understanding and debugging an entire user kernel is a lot more work.

selkij commented 2 years ago

the VBE driver just dont work on real hardware, im not hte same to say that, I assume that the VBE driver was for bochs or qemu or smth like that? VBE is to be for everything, even real hardware

quajak commented 2 years ago

My point is that since you are not using the standard cosmos vbe driver, there is no guarantee that it should work. If there is an issue with the standard vbe driver which afaik should work fine on real hardware, then we can look into it.

selkij commented 2 years ago

even when I use the default VBE driver it doesnt work

quajak commented 2 years ago

when setting the mode or using the default mode?

selkij commented 2 years ago

idr it just doesnt work, im not the only one to say that

terminal-cs commented 2 years ago

this is an issue with cosmos's vbe driver, there isn't anything you can do unless you fix it yourself or ask somebody else to do it (ask nicely)

selkij commented 2 years ago

well, this is not what concerns me the most rn, TCP connections are badly made, it can send data, but most of the time incorrectly, and even if the server sends the response, cosmos wont get it.

selkij commented 2 years ago

and the code doesnt really explain how its done and how it works, so I can't try to fix it