mode 13h in MSVC++ 6.0 need Help

Started by
10 comments, last by Nironics 22 years, 4 months ago
helo and thx in advance for reading this I am using Microsoft Visual Studio 6.0 c++ and have a big problem with the mode 13h (320x200) i kan''t get in i tried with inline assambler but when the programm gets to the grphic interrupt it crasches and windows kick my ass with a blue screen (i am using win 98). if somebogy cann give me the source for the initialization, i would be realy heapy my source::: void init_mode13h() { _asm{ mov ax,0013h int 10h // after this i get a blue-screen } }
.--=Nironics=--.
Advertisement
AFAIK Visual C++ only allows console apps, not DOS apps. Also I don''t belive that Windows console apps can access interupts.
If you want to do that kind of stuff you could get Borland C++, it allows you to develop 16 and 32 bit DOS apps. However you probably just got a game development book that told you about mode 13, I would get another book. I don''t think that anyone uses mode 13h anymore. I would look into OpenGL or DirectX. But first you would have to learn Windows programing (unless you want to use GLUT, which is good for learning).

Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
oh dont known of this. thx

and yes you are right mode 13h is bad realy bad but
in this mode you have full memory access

its not that i have a book about this mode

i also know to code OpenGL/DX and Windows Programming

but i started with Trigonometry(vectro /3D etc.)
and with WIN GDI its too slow
with OpenGL i also dont have full access to the memory

aslo when i used DirectDraw to get Memory access my
exe got a litle big. (because of DD initialization)

i am also want to write some 32k demos / intros.

so please dont missunderstand me, i know that this mode is not the best but i realy want to know how it is to have full controll of my app.


.--=Nironics=--.
By using DirectX you can have full access to memory, no? If you lock your DirectDraw surface you get a pointer to the surface memory which you can then jiggle around with to your heart''s content.
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
but the Lock func. of a surface is realy Slow.!!
.--=Nironics=--.
Thats why you try to do it only a few times each iteration of the game loop.
As for using a Borland compiler, the versions from BCB 1 and upwards are 32 bit only, no DOS there.

Psalm 137:9: "Happy shall he be, that taketh and dasheth thy little ones against the stones."
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
If you really want to code it in 32kB I''d recommend using assembly-language.
Wanna make small programs? Use assembler. Small binaries.

Wanna have memory access? Use djgpp (C/C++). 32-bits DOS programming, allowing BIG arrays. You can also use VESA for higher resolution.

Since you use win98, you should have no problems with the above.
So what are the alternative Nironics? This is something I will be looking to do soon (I haven''t as yet, only know the theory), but once each frame won''t be that slow will it?
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
Hello Nironics,

I''ve also had problem also using MS Visual C++ 6.0 for inline
assembly, but my problem occurs when I try to use the ins/outs
port calls(haven''t try changing video modes yet). I think
Microsoft has put preventative measure in they''re C++ to keep
you from messing with the hardware directly even with inline
assembly. I''m also using window 2000 pro, so that might be a
problem but not likely since video mode calls are made by the
BIOS not the Operating System.

I suggest you use an assembler program like Microsoft MASM 6 or
borland TASM 5. Or you could use Borland C++ I know inline
assembly work fine with that compiler.

This topic is closed to new replies.

Advertisement