flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Vesa Graphics

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 24 Dec 2007, 09:42
I am just wanting to know... what people think about programming Vesa graphics.. 16/32/64 bit games/or building an OS.. not vga 256.. just higher res... If there was more info and examples in fasm would you use it?
or not?
Post 24 Dec 2007, 09:42
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 10:56
what exactly is your question?

Unless you have graphic API provided by OS, VESA is probably best shot for graphics. Examples are not needed - VESA is quite easy, and can be learnt from official reference.
Post 24 Dec 2007, 10:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 24 Dec 2007, 15:06
is it possible to code for vesa from a dosbox V86?
is it possible to switch to pm from V86, and then access all the memory?
i doubt it is possible in both cases...
Post 24 Dec 2007, 15:06
View user's profile Send private message Visit poster's website Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 314
Mac2004 24 Dec 2007, 15:12
Perhaps the simplest solution is to use Linear Frame buffer while in protected mode.
Just set up vesa LFB mode before entering the PM and after that switch to PM.

regards,
Mac2004
Post 24 Dec 2007, 15:12
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 16:17
Quote:
is it possible to code for vesa from a dosbox V86?

DosBox doesn't use V86.

I'm not sure about DosBox VESA emulation, but i quess it's good.

Quote:
is it possible to switch to pm from V86, and then access all the memory?

not normally, as from real mode, but i think you can use DPMI services

Quote:
i doubt it is possible in both cases...

i think it is.
Post 24 Dec 2007, 16:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 24 Dec 2007, 17:55
All you need is my vesa demo, it demos seting up pmode and going to and from realmode for switching between vesa 640x480 32bpp to text mode.
Now you can use this to use most realmode int, on top of this because of the way the GDT base is set up adressing is the same in realmode and pmode.
It comes with a boot loader to load it, but because it a exe it will also run from Dos or DosBOX, as demo from the screenshot. It come with full fasm code and you can get it here: http://www.dex4u.com/demos/VesaDemo.zip
Note: I was called ASHLEY4 when i made it.

But if you really want to code high res Games you should use DexOS as all the functions as built-in including vesa functions, decoder for gif, bmp, jpeg, sound, network, as it was designed as a game console OS.
I have been so busy coding the OS, i have not had time to make Games.


Description:
Filesize: 13.05 KB
Viewed: 18831 Time(s)

DemoVesa.png




Last edited by Dex4u on 23 Feb 2008, 14:18; edited 1 time in total
Post 24 Dec 2007, 17:55
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 24 Dec 2007, 19:07
Quote:
what exactly is your question?


Just want to know how people feel about programing it.. and do you or anyone else make apps,games,or an OS using it? on any platform (dos,windows,linux,your own OS)

I just rarly see post were people program it and have seen very few games/apps.. besides in there own OS..
VGA 256 seams to be peoples choice (if there not using graphics libs(openGL,DirextX,,)


Most post are on asking how to get it up and running..plotting pixels..etc..
and then it stops there...


I just wanted to hear everyones opinion on it...

reason for asking:
for me I am trying to build an os that uses these graphics..
My opinion is that poeple either dis like Vesa.. or think its way to hard..
Post 24 Dec 2007, 19:07
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 24 Dec 2007, 19:19
> what people think about programming Vesa graphics..

It's the choice for DOS, DexOS and "raw" Shocked

> If there was more info and examples in fasm would you use it?

Why didn't you look at the DOS FAQ, Mr. dosin ? Laughing

> is it possible to code for vesa from a dosbox V86?

Don't know, but would be pointless Sad

> is it possible to switch to pm from V86, and then access all the memory?

Might be sort-of possible, but V86 is a bad place to start ...

> Perhaps the simplest solution is to use Linear Frame buffer while in protected mode.
> Just set up vesa LFB mode before entering the PM and after that switch to PM.

YES. Banked VESA is crap Sad

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 24 Dec 2007, 19:19
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 24 Dec 2007, 20:18
i think...

seting a segment descriptor for protected mode to point to the frame buffer and the direct to screen ram, like this, we can access the video screen like a linear memory, an array of pixel.

the difficulty is to :

set the VESA mode correctlly, without errors if possible.
access the controls of the VESA I/O ports to manage the VESA functions.
access all the address bus, 4Gb & 64Gb for ia 32.?

make it from the dosbox, real dos, linux, bsd, macintel?, menuet, "yourOS" or boot...
if we can make a graphic interface for all X86 platform, with direct asm coding, it can help a bit for things and others...

ref=fasmlib, minidos...

but it's only an idea...
the code can be simple and easy to read, can help for code sharing..
Post 24 Dec 2007, 20:18
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 24 Dec 2007, 20:29
> set the VESA mode correctlly, without errors if possible.

From RM.

> access the controls of the VESA I/O ports to manage the VESA functions.

No problem in RM.

> access all the address bus, 4Gb & 64Gb for ia 32.?

No problem with unpaged memory model. If paging is active you will have to "map" - INT $31/$0800 from DPMI.

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 24 Dec 2007, 20:29
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 20:40
Don't forget to at least check (if not support, for some reason) case when VESA doesn't support LFB.

And be sure NOT to use fixed mode numbers, instead list through available modes and pick one you like:
VBE standard wrote:

Startin with VBE version 2.0, VESA will no longer define new VESA mode numbers and it will no longer be mandatory to support these old modes.
Post 24 Dec 2007, 20:40
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 24 Dec 2007, 20:47
it's impossible to access the memory witha 32 bit pointer with RM, but is it possible to access the VESA screen?
Post 24 Dec 2007, 20:47
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 20:53
Quote:
it's impossible to access the memory witha 32 bit pointer with RM, but is it possible to access the VESA screen?

Both are possible. first with:
- flat real / unreal mode
- XMS
- EMS

if you can't access 32bits, or your VESA doesn't support LFB, you can still use bank switching


Last edited by vid on 24 Dec 2007, 21:37; edited 1 time in total
Post 24 Dec 2007, 20:53
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 24 Dec 2007, 21:11
what are these modes? i never cross these terms into intel doc, or didn't read it with care...
Post 24 Dec 2007, 21:11
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20423
Location: In your JS exploiting you and your system
revolution 24 Dec 2007, 21:21
edfed wrote:
what are these modes? i never cross these terms into intel doc, or didn't read it with care...
Do you need me to direct you to my favourite link? I thought not Smile

PS Check out my website, I've got all the VESA info right there.
Post 24 Dec 2007, 21:21
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 24 Dec 2007, 21:49
vid wrote:
Quote:
it's impossible to access the memory witha 32 bit pointer with RM, but is it possible to access the VESA screen?

Both are possible. first with:
- flat real / unreal mode


YES.

Quote:

- XMS
- EMS


Confused Sure ? Never seen something like this.

- DPMI (YES Idea )
- "raw" PM

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 24 Dec 2007, 21:49
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 24 Dec 2007, 21:50
edfed wrote:
what are these modes? i never cross these terms into intel doc, or didn't read it with care...


Intel wrote VERY MUCH about those modes (RM/PM) and paging.

Quote:
it's impossible to access the memory witha 32 bit


From legal RM not. From unreal/irreal/huge-real/big-real mode YES.

Quote:
pointer with RM, but is it possible to access the VESA screen?


You need 32-bit addressing for the LFB. It usually sits at > 3 GiB address.

And you have as the very worst choice the banked VESA accessible from RM, even with 8086, or (bad) V86.

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 24 Dec 2007, 21:50
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 22:22
Quote:
Sure ? Never seen something like this.

- DPMI (YES )
- "raw" PM

Yep, good point.
Post 24 Dec 2007, 22:22
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 24 Dec 2007, 22:22
banked vesa access? :-S
i know real mode, but never read any reference to irreal, unreal etc... where is it exactlly? manual# page n° please...
Post 24 Dec 2007, 22:22
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Dec 2007, 23:02
it is quite undocumented stuff... bug/feature of incosistence of implementation and documentation. don't mind it Smile

Instead, if you are interested in DOS, learn DPMI. If you want it for you own OS, learn protected mode well enough to be able to call DOS interrupts in v86 mode.
Post 24 Dec 2007, 23:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.