Laaca Czech republic, 26.02.2020, 12:11 |
Memory mapped devices from resl mode (Developers) |
We still face the question how to extend the sound support of DOS applications for new sound cards. --- |
Khusraw Bucharest, Romania, 26.02.2020, 12:35 @ Laaca |
Memory mapped devices from resl mode |
> The problem and the question is: the modern hardware does not use much the --- |
RayeR CZ, 27.02.2020, 05:27 @ Laaca |
Memory mapped devices from resl mode |
In DJGPP I use DPMI function for physical memory mapping. If you have some DPMI wrappers in FPC you can use it too. --- |
Khusraw Bucharest, Romania, 27.02.2020, 09:07 @ RayeR |
Memory mapped devices from resl mode |
> In DJGPP I use DPMI function for physical memory mapping. If you have some --- |
Laaca Czech republic, 04.03.2020, 14:01 @ Khusraw |
Memory mapped devices from resl mode |
> Yes, you can use DPMI physical memory mapping functions, wrapped or not, --- |
Khusraw Bucharest, Romania, 04.03.2020, 15:02 (edited by Khusraw, 04.03.2020, 15:15) @ Laaca |
Memory mapped devices from resl mode |
> Or maybe other possibility could be the DPMI assistance. --- |
Laaca Czech republic, 04.03.2020, 15:08 @ Khusraw |
Memory mapped devices from resl mode |
i would like to modify the existing protect mode driver into real mode driver. --- |
Khusraw Bucharest, Romania, 04.03.2020, 15:23 @ Laaca |
Memory mapped devices from resl mode |
> i would like to modify the existing protect mode driver into real mode --- |
Khusraw Bucharest, Romania, 04.03.2020, 15:36 (edited by Khusraw, 04.03.2020, 16:02) @ Laaca |
Memory mapped devices from resl mode |
To be more specific, in case of a HDA sound card, the only sound cards I have experience with that use MMIO, you have to find the device and get its memory base address by using INT 1Ah to call the PCI BIOS (see http://www.ctyme.com/intr/int-1A.htm), and then read and write the memory registers according to what you want to do, nothing more. For reading from/writing to the card's memory register to/from a memory address directly accesible to your program, you only need to set the correct values in the GDT that you pass to INT 15h/87h (see http://www.ctyme.com/intr/rb-1527.htm). --- |
Khusraw Bucharest, Romania, 04.03.2020, 16:55 @ Laaca |
Memory mapped devices from resl mode |
BTW, if you have difficulties re: how the GDT you pass to INT 15h/87h should look in case of 32-bit linear addresses (the information in RBIL is incomplete), you may want to see e.g. this: http://my.execpc.com/~geezer/code/int1587.zip. --- |
Laaca Czech republic, 04.03.2020, 18:54 @ Khusraw |
Memory mapped devices from resl mode |
> BTW, if you have difficulties re: how the GDT you pass to INT 15h/87h --- |
Khusraw Bucharest, Romania, 04.03.2020, 19:33 @ Laaca |
Memory mapped devices from resl mode |
> I can use the INT 15h/87h. Two years ago I wrote this small example how to --- |
Laaca Czech republic, 27.02.2020, 17:50 @ RayeR |
Memory mapped devices from resl mode |
> In DJGPP I use DPMI function for physical memory mapping. If you have some --- |
Khusraw Bucharest, Romania, 27.02.2020, 20:25 (edited by Khusraw, 27.02.2020, 21:09) @ Laaca |
Memory mapped devices from resl mode |
> In FPC I also can use the physical memory mapping. I use it for example for --- |
KormaX 01.03.2020, 22:23 @ Khusraw |
Memory mapped devices from resl mode |
Hello! --- |
Zyzzle 02.03.2020, 06:10 @ KormaX |
Memory mapped devices from resl mode |
> Hello! |
KormaX 12.05.2020, 11:21 @ Zyzzle |
Memory mapped devices from resl mode |
Hello! --- |
marcov 02.03.2020, 15:43 @ Khusraw |
Memory mapped devices from resl mode |
> If you don't want to change the DS segment limit and DS is limited to your |
Khusraw Bucharest, Romania, 02.03.2020, 19:39 @ marcov |
Memory mapped devices from resl mode |
> Freepascal uses an own version of a (probably very old) djgpp stub.asm. --- |
marcov 02.03.2020, 23:13 @ Khusraw |
Memory mapped devices from resl mode |
> With DJGPP the flag is not set by default in __crt0_startup_flags |
Rugxulo Usono, 03.03.2020, 06:11 @ marcov |
Memory mapped devices from real mode |
AFAIK, nearptr stuff (and CWSDPR0) originally were used for Quake 1 back in 1996. They wanted something moddable and used DJGPP (2.00 beta3 or whatever, unfinished) by cross-compiling atop quad-core Alphas, I think. (Who knows what rendering or whatever was required for levels or graphics.) Eventually, they just wrote wimpy QuakeC instead of trying to link with DJGPP itself. Doom source ports for DOS use DJGPP plus Allegro, though. |
marcov 03.03.2020, 10:12 @ Rugxulo |
Memory mapped devices from real mode |
> AFAIK, nearptr stuff (and CWSDPR0) originally were used for Quake 1 back in |
Rugxulo Usono, 03.03.2020, 22:12 @ marcov |
Memory mapped devices from real mode |
> > AFAIK, nearptr stuff (and CWSDPR0) originally were used for Quake 1 |
Khusraw Bucharest, Romania, 03.03.2020, 13:34 @ marcov |
Memory mapped devices from resl mode |
> These don't exist in normal Free Pascal programs. It is go32v2 only, not --- |