Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2000-10

Direct Memory Access and Iterrupts under Linux

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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).

Reply by email

Unknown author
to Michael Van Canneyt: Normally you can't access DMA, unless you write a device driver. All you have is access…
Michael Van Canneyt wrote 19 lines
Preocupado com vírus? Crie seu e-mail grátis do BOL com antivírus! http://www.bol.com.br On Mon, 23 Oct 2000 wrote: > 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. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

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!

Reply by email

Michael Van Canneyt
to Unknown author: 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.

Reply by email

Sebastian Günther
to Unknown author: 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

Reply by email

Matti Hamalainen
to Unknown author: Ok! I´ve look at svgalib sources but it´s very hard to understannd. I understand that…
Show quoted text 6 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).

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. =

Reply by email

Unknown author
to Matti Hamalainen
Matti Hamalainen wrote 23 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. = _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

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!

Reply by email