D - Mode 13h
- Jeandré du Toit (21/21) Sep 14 2003 Hi,
- Walter (6/27) Sep 14 2003 The Win32 operating system will not allow win32 programs to do interrupt...
- Ilya Minkov (19/23) Sep 14 2003 No, you can't use it. I would recomment TinyPTC if you want to do simple...
- Sean L. Palmer (12/33) Sep 14 2003 You should use the latest version of Direct3D (at least D3D 8), which gi...
Hi, I am trying to get in mode 13h to do program some graphic demos, my code looks like this: import c.stdio; void main() { asm { mov EAX, 0x13; int 0x10; } getch(); asm { mov EAX, 0x3; int 0x10; } } it compiles fine although I think that it shouldn't include user32 and kernel32 C:\Dmd\bin\..\..\dm\bin\link.exe graphics,,,user32+kernel32/noi; when I run it I get "Error: Access Violation" Can anyone tell me why? I am very new to D (4 days) so if this is a stupid Q, sorry ;)
Sep 14 2003
The Win32 operating system will not allow win32 programs to do interrupts. You'll need to write a DOS program to do that; unfortunately, D doesn't support DOS programs. To do graphics, though, the win32 API has a lot of graphics functions to do that. No need to do interrupts! "Jeandré du Toit" <morphiax hotmail.com> wrote in message news:bk298h$23kq$1 digitaldaemon.com...Hi, I am trying to get in mode 13h to do program some graphic demos, my code looks like this: import c.stdio; void main() { asm { mov EAX, 0x13; int 0x10; } getch(); asm { mov EAX, 0x3; int 0x10; } } it compiles fine although I think that it shouldn't include user32 and kernel32 C:\Dmd\bin\..\..\dm\bin\link.exe graphics,,,user32+kernel32/noi; when I run it I get "Error: Access Violation" Can anyone tell me why? I am very new to D (4 days) so if this is a stupid Q, sorry ;)
Sep 14 2003
Jeandr=E9 du Toit wrote:when I run it I get "Error: Access Violation" =20 Can anyone tell me why? I am very new to D (4 days) so if this is a stu=pidQ, sorry ;)No, you can't use it. I would recomment TinyPTC if you want to do simple = experiments with graphics. You can find an old version at http://int19h.tamb.ru/files.html You need to see the compiler changelog in the docs and adapt TinyPTC to=20 work with a new compiler - minor syntactic features have changed a few=20 times. This is relevant to this library, since it's a real port, not=20 merely a wrapper. D doesn't support usual DOS memory models. However, i heard Mike was=20 trying to adapt it to Flat-Mode - which is a very fast mode, which is=20 limited IIRC to 16 MB acessible RAM. I believe you would be able to do=20 Mode13 graphics from there. However, in such restricted environments it probably makes some sense to = use C++. :) The standfard Version of TinyPTC works perfectly well with=20 DMC++, but contact me after 11. October if you need help getting it to=20 work. Or simply post in a C++ newsgroup. :) I'll be on vacation (+exams) = next 4 weeks or so. -eye
Sep 14 2003
You should use the latest version of Direct3D (at least D3D 8), which gives you direct access to the frame buffer RAM and allows you to switch to any supported video mode (not just 320x200). The only difference is that you're not running in Ring 0. Plus it helps you manage bitmaps for sprites and you can access hardware blitter capabilities, not to mention polygon texture mapping. Direct Mode 13h access is pretty much ancient history. However you need a wrapper to access Direct3D: Mike Wynn is hosting the one I made at http://www.geocities.com/one_mad_alien/TestD3D.zip Sean "Jeandré du Toit" <morphiax hotmail.com> wrote in message news:bk298h$23kq$1 digitaldaemon.com...Hi, I am trying to get in mode 13h to do program some graphic demos, my code looks like this: import c.stdio; void main() { asm { mov EAX, 0x13; int 0x10; } getch(); asm { mov EAX, 0x3; int 0x10; } } it compiles fine although I think that it shouldn't include user32 and kernel32 C:\Dmd\bin\..\..\dm\bin\link.exe graphics,,,user32+kernel32/noi; when I run it I get "Error: Access Violation" Can anyone tell me why? I am very new to D (4 days) so if this is a stupid Q, sorry ;)
Sep 14 2003