How to go from VGAScreen back to Console

Developer
Jan 2, 2012 at 6:35 PM

How would I go about going back from a VGAScreen image or gui back to the console??

Developer
Jan 2, 2012 at 6:47 PM

You want to call the SetTextMode(TextSize) method in the VGAScreen class. Not sure what the default text mode is though so you'll probably want to figure that out :P

Developer
Jan 2, 2012 at 6:49 PM

Would that just print text in the vgascreen or would it actually take me back to the console so i could use those commands such as Console.WriteLine("") and Console.ForegroundColor etc.

Developer
Jan 2, 2012 at 6:50 PM

it takes you back to the console, and btw, text drawing currently isn't supported :P

Developer
Jan 2, 2012 at 6:54 PM

surely it wouldn't be too hard to implement I don't actually develop for COSMOS but i have got code for drawing strings of text and a decent basic font if needed. (All using arrays and co.)

Developer
Jan 2, 2012 at 6:56 PM

:P Only issue with that is that you have to create a custom font for it :P I have a basic pcx font loader in Orvid.Graphics, however it doesn't work currently, because of a few bugs in IL2CPU (pretty sure that's the reason I had to disable it, don't remember for certain though so :P)

Developer
Jan 2, 2012 at 7:00 PM
Edited Jan 2, 2012 at 7:01 PM

There could be a competition for the best custom font we could call CosFont

 

also what does this mean and how do i use plugs and where do i get them from? (Using ancient MS4 btw)

System.Exception: Plug needed. System.Boolean System.Runtime.CompilerServices.RuntimeHelpers.Equals(System.Object, System.Object)

      at Cosmos.IL2CPU.ILScanner.ScanMethod(MethodBase aMethod, Boolean aIsPlug)

      at Cosmos.IL2CPU.ILScanner.ScanQueue()

      at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod)

      at Cosmos.Compiler.Builder.Builder.RunEngine(Object aParam)

Developer
Jan 2, 2012 at 7:01 PM

it means you tried to use Object.Equals(object, object). :P

Developer
Jan 2, 2012 at 7:03 PM

i used if(commandprompt == "example" || commandprompt == "example2")

{

//do stuff

}

 

so how do i plug it?

Developer
Jan 2, 2012 at 7:04 PM

do you have optimizations enabled in the build of your kernel?

Developer
Jan 2, 2012 at 7:06 PM
Edited Jan 2, 2012 at 7:06 PM

who knows it's MS4 download release

Developer
Jan 2, 2012 at 7:07 PM

any chance you could send me a copy of the compiled binary?

Developer
Jan 2, 2012 at 7:09 PM

how to send

Developer
Jan 2, 2012 at 7:10 PM

I just sent you an email via codeplex, so you should now have my email. just attach the .exe of your kernel to it.

Coordinator
Jan 2, 2012 at 7:36 PM
> also what does this mean and how do i use plugs and where do i get them
> from? (Using ancient MS4 btw)
>
> System.Exception: Plug needed. System.Boolean
> System.Runtime.CompilerServices.RuntimeHelpers.Equals(System.Object,
> System.Object)


http://cosmos.codeplex.com/wikipage?title=Plugs
Developer
Jan 2, 2012 at 7:37 PM

That particular one isn't one that's currently possible to implement though so :P

Developer
Jan 2, 2012 at 7:39 PM

I know why now, i need to use vs 2008 with MS4 instead of  2010 thanks for the help though

Developer
Jan 2, 2012 at 9:05 PM

BUMP: Is there possibility for smaller text size console than 40X25 using VGAScreen.SetTextMode?

Coordinator
Jan 3, 2012 at 3:36 AM
On 1/2/2012 5:06 PM, melikesPCcheese wrote:
> From: melikesPCcheese
>
> BUMP: Is there possibility for smaller text size console than 40X25
> using VGAScreen.SetTextMode?

I think you can do 80x25