flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Accessing Video Card RAM? Goto page Previous 1, 2, 3 Next |
Author |
|
Dex4u 28 Dec 2007, 20:19
rhyno_dagreat wrote: DOS386 - I failed to read it! I apologize. What can I run it with? MiniDOS? MiniDos is a very basic Dos clone, many function are not implemented, i was hope coder would add to it, to make it better, but so far its not happened and i have little time. When you set up vesa you need to call a function that fills out a Mode_Info, you can get the LFB address from eg: ModeInfo_PhysBasePtr See the example from cdpod For programming the Xbox see here: http://www.xbdev.net/non_xdk/nonxdk.php
|
|||||||||||
28 Dec 2007, 20:19 |
|
sinsi 29 Dec 2007, 00:27
> Sinsi - How can I get the LFB address from Vesa?
Here's one of my first fasm programs - a bit crap, but shows some stuff
|
|||||||||||
29 Dec 2007, 00:27 |
|
rhyno_dagreat 29 Dec 2007, 19:55
Thank you all for the info!
I'm thinking if we each with our different video cards can use Fenryo's method of figuring out the base pointer for a certain mode, then we can compile a open-listing of different lfb addresses for different modes for different graphics cards. But it would be nice for us all to figure out how to change modes without VESA, but through ports (if possible, which I think it would be.) |
|||
29 Dec 2007, 19:55 |
|
DOS386 30 Dec 2007, 00:10
> But it would be nice for us all
YES. > to figure out how to change modes without VESA, > but through ports (if possible, which I think it would be.) 1. It definitely is possible. 2. There is no quick hack to discover. It's card specific, and messy. Linux reportedly has some open source graph "drivers" - compiled into the kernel (???) - OTOH the guys are "open" for closed source drivers as well (provided by card manufacturers, as for "Windows") - check Linux source (C mixed with GAS, not what I personally prefer) Maybe some Linux experts can reveal more details ? |
|||
30 Dec 2007, 00:10 |
|
vid 30 Dec 2007, 01:40
Dos386 is right. It *is* possible, info how to do it already is in linux sources. It's just to find it.
|
|||
30 Dec 2007, 01:40 |
|
dosin 30 Dec 2007, 03:37
Her is a website that has linux open source drivers...
http://www.viaarena.com/default.aspx?PageID=2&OSID=25&CatID=2580 just click on the ones avail and download.. Though its all in C style code.. It still can be helpfull! |
|||
30 Dec 2007, 03:37 |
|
Raedwulf 31 Dec 2007, 16:04
rhyno, you might like to have a look at this:
http://web.inter.nl.net/users/be-hold/BeOS/NVdriver/index.html |
|||
31 Dec 2007, 16:04 |
|
rhyno_dagreat 01 Jan 2008, 19:04
Thanks Raedwulf!
I'm going to email this guy and ask him how he got his info, because it seems he knows something we all don't. |
|||
01 Jan 2008, 19:04 |
|
Raedwulf 02 Jan 2008, 08:43
Apparently before linux was too popular with video drivers, there was some agreements to release various info.
I'm however toying with another idea, what if you can wrap the windows drivers and use it? Something like ndiswrapper but for video drivers. Is this even possible? I wonder... Tasks would include: Windows 2000 Display Driver Interface OR WDF (for vista drivers) ABI translation (esp. for 64-bit) Host operating system Display Interface... The benefits of starting a wrapper, is any hobbyist OS could maybe in the far distant future support 3d graphics cards... and games . |
|||
02 Jan 2008, 08:43 |
|
revolution 02 Jan 2008, 08:52
To make a wrapper you only have to know which OS functions the drivers use and emulate them. So I think it would be possible although not necessarily easy.
However for Vista, with it's DRM requirements. you may be SOL on that count It would be interesting to see if a Vista driver could be successfully fooled into believing it was in a secure environment. |
|||
02 Jan 2008, 08:52 |
|
Raedwulf 02 Jan 2008, 09:16
I think Windows 2000 drivers are the way to go because:
1.) Better compatibility 2.) Lighter/better performance 3.) Less api to deal with as you said revolution But thanks for the vote of confidence, at least im not a mad hatter after all hehe Basically the inspiration for this is, there is Windows, Linux and MacOSX (and a bit of FreeBSD) which take up the majority of the userbase, and all other OSes are ignored because there is no 3d acceleration. (This may be true or untrue ) but with 3d acceleration, who knows? At least for people like us, it would be fun to play quake3 on something like menuetos. _________________ Raedwulf |
|||
02 Jan 2008, 09:16 |
|
f0dder 02 Jan 2008, 10:52
http://www.reactos.org/en/index.html - they aim to be binary compatible for windows drives. Oh, and check http://www.tinykrnl.org/ as well.
Edit: oh bollocks, tinykrnl has been shut down |
|||
02 Jan 2008, 10:52 |
|
revolution 02 Jan 2008, 11:42
Raedwulf wrote: I think Windows 2000 drivers are the way to go ... |
|||
02 Jan 2008, 11:42 |
|
Raedwulf 05 Jan 2008, 21:23
windows 2000 and xp share the same api according to microsoft, so i guess 64-bit api is similar
_________________ Raedwulf |
|||
05 Jan 2008, 21:23 |
|
f0dder 05 Jan 2008, 21:28
2000 and XP are very similar yes (NT5.0 and NT5.1), there's kernel changes on XP though, and some changes in userland win32 API as well... but I think drivers written for one should basically run out of the box for the other.
The ISSUE, however, is not 2000 vs. XP, it's 32 vs 64 bits. You can't just use drivers for one mode in the other. Also, XP64 is actually based on 64bit win2k3 server code, not 32bit XP code... but again, 2k3 server is still NT5.x afaik. |
|||
05 Jan 2008, 21:28 |
|
Feryno 07 Jan 2008, 11:56
1. method: int 10h - vesa call - returns dword of framebuffer memory
; --- 2. method: PCI scan - this method is able to handle qword address of framebuffer (perhpas good for computers with 4 GB of RAM or more but I have an idea where frambuffer is still under 4 GB limit in such configs... needs test on such machine) this method uses allmost every new OS, including win - you can see various memory and port ranges in device manager ;--- After obtraining the framebuffer memory, YOU MUST MAP THAT MEMORY into virtual memory space if your OS runs under protected mode !!! You mustn't write directly into framebuffer memory under protected mode without mapping it somewhere... It is e.g. 1 API under win - less than 10 instructions or about 20-40 instructions under OS you are developping I'll post win64 sample driver how to do it, but I'll manage it not earlier than the day after tomorrow. Don't worry, you'll be able to improve it further, e.g. not to obtain only the start of framebuffer, but to obtain the end of framebuffer too (as you can see it in win device manager). |
|||
07 Jan 2008, 11:56 |
|
Madis731 07 Jan 2008, 13:23
Okay - the question remains - are there ANY graphics cores broken until today? Is is possible (of course it is, when you've got infinite amount of time) to reverse-engineer only ONE card, say the upcoming N9x core from nVidia and test the reverse-engineered sample say, on MenuetOS? I'd like to see how much difference does VESA have in speed compared to flipping frames in that fast hardware and having all those fancy Blit operations with AntiAliasing and Transparency
Is it too much to ask (rhetorical)... |
|||
07 Jan 2008, 13:23 |
|
rhyno_dagreat 07 Jan 2008, 15:11
Madis, we're trying to figure out a way around reverse engineering graphics drivers.
|
|||
07 Jan 2008, 15:11 |
|
DOS386 08 Jan 2008, 01:36
Quote: After obtraining the framebuffer memory, YOU MUST MAP THAT MEMORY into virtual memory space if your OS runs under protected mode !!! You mustn't write directly into framebuffer memory under protected mode without mapping it somewhere.. NOT true. You must map if you have paging enabled ... you can "directly" write to $E800'000 or whatever if you don't use paging Quote: 1. method: int 10h - vesa call - returns dword of framebuffer memory Maybe ... but still very insufficient Writing into the LFB won't have any (useful) effect without setting the mode before ... and there is no universal method to do except VESA _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
08 Jan 2008, 01:36 |
|
Goto page Previous 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.