Skip to content
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

CGS Update (part 2) #3034

Closed
wants to merge 35 commits into from
Closed

CGS Update (part 2) #3034

wants to merge 35 commits into from

Conversation

Szymekk44
Copy link
Contributor

@Szymekk44 Szymekk44 commented Jun 20, 2024

Added

  • FAST GetImage (SVGAII & VBE)
  • DrawCroppedImage (You can now draw wallpaper cropped by your taskbar height!)
  • DrawRawPoint
  • GetRawPoint
  • DrawRectangle is now faster!
  • Draw array for int[] (fast as draw image)
  • VBE Bugfixes
  • Finished preventOffBoundPixels (now its working for left side and right side(CGS Update part 1))
    aaand PCIe by @Samma2009

Copy link
Contributor

@blackneeed blackneeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, except when you want to draw an alpha rectangle. You cant do that since your directly putting it onto the canvas with no alpha blending.

Copy link
Member

@valentinbreiz valentinbreiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your changes on CGS! Could you also add a few tests for your changes? :)

source/Cosmos.Core/MemoryBlock.cs Show resolved Hide resolved
source/Cosmos.System2/Graphics/Canvas.cs Show resolved Hide resolved
source/Cosmos.System2/Graphics/Canvas.cs Show resolved Hide resolved
source/Cosmos.System2/Graphics/VBECanvas.cs Show resolved Hide resolved
@Szymekk44
Copy link
Contributor Author

Okay its ready!
Also I quite don't know how to add tests and well what to test ;p

@Szymekk44 Szymekk44 requested a review from valentinbreiz July 8, 2024 22:59
@Epiczhul
Copy link

nice work

Copy link

@Epiczhul Epiczhul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks nice! and works!

Copy link

@Epiczhul Epiczhul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks veryyy nice

@Samma2009
Copy link

apparently we are having some technicall issues with json files and broom pulling epiczhul's stuff

Copy link
Member

@quajak quajak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work.

It would be great if you can add a docstring to all public methods you added but its not required.

using System.Runtime.InteropServices;

namespace Cosmos.Core
namespace MACPI.Cosmos.HAL.PCIE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we changing the namespace?

@@ -154,6 +154,20 @@ public unsafe void Copy(int aStart, int[] aData, int aIndex, int aCount)
}
}

public unsafe void Get(int aStart, int[] aData, int aIndex, int aCount)
{
// TODO throw exception if aStart and aCount are not in bound. I've tried to do this but Bochs dies :-(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should no longer be an issue and can be checked

}

int length = addr;
ptr -= 4;
Console.WriteLine("[ACPI] ACPI Initialized");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we wanted to get rid of non-user controllable WriteLines during boot

using System;
using Cosmos.Core;

namespace Cosmos.HAL.PCIE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

namespace and directory dont match


PCIExpress.Initialize();

Console.Write("[PCI] PCI Initialized. ");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this writes?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, leaving them there is best practice because you will have feedback of the PCI and PCIE initialization

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we allow the user to enable this feedback when they want it but also give them a way to disable it?

using System.Runtime.InteropServices;
using PCIDevice = Cosmos.HAL.PCIE.PCIDevice;

namespace Cosmos.HAL.PCIE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

/// <param name="maxHeight">Max image height to display</param>
public virtual void CroppedDrawImage(Image image, int x, int y, int maxWidth, int maxHeight, bool preventOffBoundPixels = true)
{

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this left empty?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't know tho i could fix it

@@ -11,25 +11,27 @@
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this dependency added?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think i left a using from when i was testing it

@Samma2009
Copy link

Thank you for your work.

It would be great if you can add a docstring to all public methods you added but its not required.

hi, can you please not merge as of now, i am trying to fix some issues with compileing and also json and dependency stuff, my visual studio messed up the repo

@Samma2009
Copy link

@MishaProductions all of the json files have been fixed.... could you merge (sorry for ping)

@Szymekk44 Szymekk44 requested a review from quajak August 17, 2024 15:42
@Szymekk44
Copy link
Contributor Author

Uhh yeah i wanted to make a new PR without Samma's PCIe but i guess github said no

@Szymekk44 Szymekk44 closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants