How I can access DMA and Interrupts under Linux? I want make a graph library but it´s need and I can´t do it (it crash my program).
Mailing lists / fpc-devel / 2000-10
Direct Memory Access and Iterrupts under Linux
6 messages · 4 people · –
- UUnknown author 3
- MMatti Hamalainen 1
- MMichael Van Canneyt 1
- SSebastian Günther 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Normally you can't access DMA, unless you write a device driver. All you have is access…
Michael Van Canneyt wrote 19 lines
Ok! I´ve look at svgalib sources but it´s very hard to understannd. I understand that it allocate a new virtual console with some system calls and access your memory area (I´m not sure, but I think is it). I´ve ask because when I´m configuring my sound card it ask what is DMA address, well, it´s part of Linux kernel. But other programs can´t acess DMA? I don´t know other whay to made a graph library (I made a graph library for DOS, it´s easy).
If I´ve wrote some error words it´s because I don´t speak englsh very well. I´m a brazilian and speak portuguese!
How I can access DMA and Interrupts under Linux? I want make a graph library but it´s…
How I can access DMA and Interrupts under Linux? I want make a graph library but it�s need and I can�t do it (it crash my program).
Normally you can't access DMA, unless you write a device driver. All you have is access to io ports and certain memory areas.
I suggest you have a look at the svgalib sources and see how they do it.
Michael.
How I can access DMA and Interrupts under Linux? I want make a graph library but it´s…
How I can access DMA and Interrupts under Linux?
You cannot directly access the hardware on Linux, especially not DMA or interrupts. You would have to write a kernel module, which is not possible to do with Free Pascal. (at least not with an unmodified RTL).
I want make a graph library but it´s need and I can´t do it (it crash my program).
Do you really need to write your own graphics library, isn't it possible for you to use libvga/libsvga, GGI or the framebuffer device?
- Sebastian
Ok! I´ve look at svgalib sources but it´s very hard to understannd. I understand that…
Show quoted text 6 lines
Yes, but remember that DOS Linux (or other Unixes)!! Under DOS you NEED to make your own drivers, but under Linux you have the drivers already provided (in some form). Direct access of hardware under Linux (or other Unix) is NOT recommended and is sometimes impossible unless implemented on the kernel level.
What I would recommend is that you use some (already mentioned) of the available GENERIC libraries: GGI (http://www.ggi-project.org/) and/or SDL (http://www.libsdl.org/)
Those libraries provide simple framebuffered videomemory access, where you can easily draw (and implement functions for drawing things). They support SVGALib & X11 and SDL also supports multiple platforms (Win32, BeOS and MacOS)
Of course you can also use X11 or SVGALib directly.
= ccr/TNSP - | http://www.tnsp.org/ =
= Foo is a synonym for Bar, but not vice versa. =
Matti Hamalainen wrote 23 lines
Thank you! I´ve try to create a new graph library because I can´t use svgalib with Free Pascal and I like create new things. I like low level programing (like assembly) and I tink to learn about low level programing under Linux, but kernel is very big :-)! What can I do? It´s fun!
