flat assembler
Message board for the users of flat assembler.

Index > OS Construction > FRM VESA???

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



Joined: 22 Dec 2003
Posts: 139
joachim_neu 25 Dec 2004, 16:59
hi,

how is the VESA like in Unreal Mode? Have i to use it like in PM with the memory at PhysBasePtr or with the windows? thank you!

JN!
Post 25 Dec 2004, 16:59
View user's profile Send private message Visit poster's website Reply with quote
ASHLEY4



Joined: 28 Apr 2004
Posts: 376
Location: UK
ASHLEY4 25 Dec 2004, 20:46
If I understand your ?, you need to set the vesa mode in real mode and stay in that mode in pmode or switch back to realmode for mode switching,
in unreal mode you can switch by calling the right int.
Here is some not very good code for doing vesa in real mode, using windows:

http://board.flatassembler.net/topic.php?t=2782
Here is code for set vesa in realmode and switch to pmode, the demo need put on the boot sector of a floppy and booting.

\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.


Last edited by ASHLEY4 on 26 Dec 2004, 01:09; edited 1 time in total
Post 25 Dec 2004, 20:46
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 25 Dec 2004, 20:56
Hallo joachim_neu!

Wie du siehst, gibt es nur wenige deutsche Benutzer hier im Flat Assembler Forum, darum werde ich hier ausnahmsweise mal auf deutsch schreiben, wal ich dass hier sonst noch irgendwie verlerne Smile

Im Unreal Modus befindet sich der Prozessor im geschützten Modus, wesshalb die den Videospeicher (sei er nun linear oder in Seiten aufgeteilt) auch so ansprechen solltest, also mit 32bit Addressen.
Des weiteren wird im Unreal Modus auf Speicher linear, (flat) zugegriffen, wesshalb du einfach z.B. auf den Seitenaufgeteilten VESA-Grafikspeicher bei 0A0000h zugreifen kannst, du brauchst also keine Segmentdeskriptoren. Wenn du auf den linearen Grafikspeicher zugreifen willst, musst du dir erst einmal die Addresse über den VESA VBE Version 2.0+ Aufruf AX=4F01h in eine Struktur geben lassen.

Zum Unreal Modus sollte man noch wissen, dass er nur während den Interrupts zurück in den Echten Modus (Real mode) schaltet und nach deren beendigung zurück in einen flachen geschützten Modus schaltet.

Ich hoffe, ich habe dich nicht dadurch verwirrt, dass ich jetzt hier auf deutsch geantwortet hab.

Aber boahhhhhhhhhhh, sag mal, bist du ECHT erst 14? In welche Klasse gehst du denn? (Um erlich zu sein, ich hab auch in dem Alter damit begonnen... :] ) Da gehört schon viel MUT dazu, heutzu tage in so einem Alter damit anzufangen. RespekT!! (ich bin jetzt 22Jahre alt)
Post 25 Dec 2004, 20:56
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 25 Dec 2004, 21:50
@ashley: well, you understand me wrong. i know, how to set up VESA, but my problem was, how to use it. there are the two ways, pages in RM and flatroom in PM.
@MCD: wow, es gibt ja noch leute hier, die deutsch können Wink haste ICQ? danke für deine antwort, hat mir sehr geholfen, denn jetzt weiß ich, dass ich beide methoden verwenden kann, pages und speicher.
@all: MCD answered my question the way he said, that you're able to do both ways in FRM the one for RM with paging and the one for PM with the memory.
Post 25 Dec 2004, 21:50
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 25 Dec 2004, 22:18
Just a thing about Windows and VESA:

Windows likes banked switched VESA modes, but doesn't allow at all linear frame buffered VESA modes! You should keep in mind this when coding stuff like this under Winows.

And sorry joachim_neu, I don't have any time left now to join you in ICQ.

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 25 Dec 2004, 22:18
View user's profile Send private message Reply with quote
ASHLEY4



Joined: 28 Apr 2004
Posts: 376
Location: UK
ASHLEY4 26 Dec 2004, 17:05
I think you are contradicting yourself, i give you two demos, one for realmode using windows (paging) and one for pmode using LFB (sinced removed), as the demos, demo how to use vesa (by fill screen with color), than they did what you asked for Rolling Eyes .

\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.
Post 26 Dec 2004, 17:05
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 26 Dec 2004, 22:36
yes, but i know how in both things to use it, but i didn't know, which method i've got to use in FRM. in RM it is paging, in PM it is memory, but in FRM was my question. but now it's clear.
Post 26 Dec 2004, 22:36
View user's profile Send private message Visit poster's website Reply with quote
ASHLEY4



Joined: 28 Apr 2004
Posts: 376
Location: UK
ASHLEY4 27 Dec 2004, 01:35
But it also depends on what the graphic card supports, some old cards only support bank switching.

\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.
Post 27 Dec 2004, 01:35
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 27 Dec 2004, 08:11
oh, thank you... but does any card support bank switching? and am i also allowed to do bank swithing in PM or FRM?
Post 27 Dec 2004, 08:11
View user's profile Send private message Visit poster's website Reply with quote
ASHLEY4



Joined: 28 Apr 2004
Posts: 376
Location: UK
ASHLEY4 27 Dec 2004, 15:51
Some very old card do not support vesa, but most do support bank switching ,but you can not easily do bank switching in PM, here is some code that let you, most modern card support vesa 2 and LFB.

\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.
Post 27 Dec 2004, 15:51
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 28 Dec 2004, 17:25
Hi, joachim_neu again!

Do you mean Flat Real Mode or Unreal mode? Because FRM is actually just a 16bit based thing with 32bit address size prefixes, whereas Unreal mode is Protected Mode based (as already explained in german).

In both modes you can use either banked switched or linear VESA modes, it all depends on whether the graphics card (VBE BIOS) supports it or not. Most cards with VESA supports at least banked switched modes (VESA v1.0). Linear VESA modes are available if both VESA version >= 2.0 AND if actually checked that linear mode is available. If you want linear mode, you must OR in some bit in the mode number.

You should really have "Ralf Browns's interrupt list" for stuff like this. If you don't have it already, google it or go to http://www-2.cs.cmu.edu/~ralf/files.html

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 28 Dec 2004, 17:25
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 28 Dec 2004, 20:48
hello,

i always thought that FRM and UnrealMode is the same... i've FRM with the 32 bit adresses and 16 bit code. i have the list already, and i know that i've got to add the value 0x4000 to the modenumber to take the linear mode. whats the differenz between VESA 1 and VESA 2? and whats SVGA? i've heard, that it would be the some, but otherones said, that it isn't... i'm confused Wink

thank you for your help...
Post 28 Dec 2004, 20:48
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 28 Dec 2004, 20:57
You're right, it is all a bit confusing...

Ok. let's try clearing it up.

SVGA is a general abbreviation for everything that is better than the standard VGA.

VESA is actually a commitee of different enterprises. For details, go to www.vesa.org. They (try to) define and standarize many thinks, all related to graphics on and in computers. Though VESA VBE (Video BIOS Extension) comes with different version. Most common are:
1.0, 1.2, 2.0 and 3.0 where 3.0 is the newest one.

New in 2.0 is linear frame buffered modes (and other things).
New in 3.0 is user spefic vertical refresh rates (CRTC) (and other things), so you are no more stuck to those perhaps high res. but flickering modes. You should always check refresh rates with some VESA functions AND VESA monitor DDE functions.
Post 28 Dec 2004, 20:57
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 28 Dec 2004, 21:55
aha... thank you. and whats about the FRM and UnrealMode? My bootloader goes into PM and returns... and I can use 32 bit-code and it works...
Post 28 Dec 2004, 21:55
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 05 Jan 2005, 20:21
Flat Real Mode is like the usual 16bit Real mode in DOS, it only allows data access above 1Mb (up to 2Gb/4Gb if installed), but no code access, e.g. no executing is allowed above 1Mb. The data access above 1Mb must be done with a so-called "address size prefix", which is always the byte with the hex value 67h.

Einschub:
(I assume that you have at least a distinct image on how binary CPU instructions look like. If you have never seem them in binary, most docs/debuggers will do fine to understand it)
Einschub Ende

So actually, FRM is 16bit code/data, with access to memory above 1Mb with some extra prefix and only for data. Furthermore, nearly every DOS app and even DOS itself can run in FRM without the need of any changes, what makes it very handy for just testing some new stuff.

Unreal Mode was already explained by me a bit above. The main difference to FRM is that Unreal mode uses 32bit code/data access and thus you don't need these extra 67h address size prefixes. But you will to do complicated stuff with the real mode interrupt calling, which usually works too, but gives problems with some difficult hardware programming.
Post 05 Jan 2005, 20:21
View user's profile Send private message Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 05 Jan 2005, 21:22
ok. thank you... i've got this tutorial: http://www.karig.net/0004.html and i think it's about UnrealMode, right Wink but i was coding all the time as i would be in FRM, in 16bit and so on... and it works fine! does it mean, that i'm allowed to execute all the RAM up to 4 GB? as you see in the code it sets the CS-Segment back to 16bit, but if i'd delete the part, i'd be 32bit code, right? does it mean, that i can throw all my 16bit code including the API (which is an int) and the BIOS-ints to the dustspinn, if i delete the line with the backsetting to 16bit? hope not. it would be very cool, if i'd be allowed to execute all the part up to 4 GB, because then i'd not have to copy the tasks...

EDIT: i reviewed the code, and i saw that i havn't to delete anything, but to add this:
Code:
mov eax,cseg-GDT
mov cs,eax          
Post 05 Jan 2005, 21:22
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 05 Jan 2005, 21:51
Just a general thing: I really don't have time to explain you the entire 80x86 architecture, so you should really watch out for some good tutorials and read them.

Unfortunately, there is no clear definition of notions in this area: What the guy at your linked tutorial website stated with "Unreal mode" is actually what I meant with FRM. The Unreal mode I meant was something like I have it described in a somewhat earlier thread. A good example of the Unreal mode I meant is in the DOS interface for Flat Assembler! I'm sure Privalov can explain it better to you than me (or he might even have it explaint somewhere, but I can't find it right now).
Post 05 Jan 2005, 21:51
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8363
Location: Kraków, Poland
Tomasz Grysztar 05 Jan 2005, 21:55
I have explained it with some details in this thread: http://board.flatassembler.net/topic.php?t=135
Post 05 Jan 2005, 21:55
View user's profile Send private message Visit poster's website Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 05 Jan 2005, 21:58
well, the first thing: the changing of CS in a 32bit-selektor wasn succesfull, the second: @MCD: I think thats one of the problems: everybody mixes everything together, the ones say, that unreal mode = FRM the others say other things and so on... isn't there anywhere a good tutorial-database, where everything is right? maybe you can show me ones, i don't knwo any!
Post 05 Jan 2005, 21:58
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8363
Location: Kraków, Poland
Tomasz Grysztar 05 Jan 2005, 22:11
I have just put my kelvar back into official examples - it demonstrates (among any other things) how to use VESA in unREAL mode.
Post 05 Jan 2005, 22:11
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.