I know how to program graphical stuff on a 16-bit C/C++ compiler like TurboC or OpenWatcom. Using Mode 13h VGA stuff, either by straight C or Inline Assembly. But since 32-bit compilers run in protected mode and don't support the old <dos.h> stuff, how do I initialize an SVGA/VESA graphics mode on a 32-bit compiler like MinGW, Visual, Borland? and how do I display a single pixel and flush it out? This is all I need to make any graphical stuff or a game :), I already know the algorithms to draw primitive figures and accomplish animation. Though if there's any good tutorial or book I would prefer that.
P.D.
Yes I know this console-graphic hacking or hard coding is rather useless since I can easily use the win32 API with GDI or even DirectX and accomplish all this in a nifty looking window in any resolution I want and far superior. But I'm really into old-school programming and want to fully learn the dynamics of graphics programming and animation at the console level before I move to an actual API or GUI.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you want to access the interrupts from 32-bit protected mode code, you would have to flip the machine into 16-bit real mode state temporarily to call it. You cannot do this under winblows.
I would suggest just setting up a FAT16 partition and install DOS 6.22 on it. Do all your development under there with Turbo C++. Then you can just concentrate on learning without having to wrestle with modern compilers and operating systems.
Piece of advice: Throughout your journey of learning to do things without having everything done for you, people will take every opportunity to inform you that what you are doing is "silly" or "inappropriate." Just ignore them. Keep learning. They don't matter.
Kip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not useless. It's the only way to learn real graphics programming on the PC if you expect to actually understand what is going on.
If you want to use the BIOS to do all your graphics programming, then you must be calling from a 16-bit real mode module. Here are your options:
Use Turbo C++ or some other DOS compiler out in DOS. Once compiled, your code would use the real video BIOS / DOS interrupts.
Use any of the above compilers under win32. Once compiled, your code would run in a "vm86" (virtual machine x86) box - a sort of week microsoft emulator. Doing this has the advantage of allowing you to remain under winblows (so you can listen to your shoutcast streams or whatever while you work). The disadvantage being that usually the M$ implementation of things is fairly cretenous and may not work the way it is suppose to out in real 16-bit land.
I would suggest the second method. If you run into problems, try the first. =)
Kip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I meant the 'useless' part in case people anyone got the bright idea of telling me: "Dude use win32, what are you doing with this dinosaur old stuff?". But obviously I certainly agree that the real way to learn is the hardcore way. I've already done the first method, because as I said I've been programming graphics and games on Mode 13h for 16-bit DOS with TurboC++ and OpenWatcom.
How would I go on about compiling 32-bit code with the 16-bit instructions from the <dos.h> like REGS? I googled up and in UNIX there's a <sys/vm86.h> is this what you meant? Apparently it has a struct v86_regs with all 32-bit registers so I'm guessing I can do it that way?
Isn't there any other way to directly access BIOS or the graphics device in 32-bit? Like for instance DPMI (DOS Protected Mode Interface), to allow changing from protected to real mode? Or another option? I mean there must be, otherwise how is Windows' GDI implemented?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Αν κάποιος εδώ θέλει μια απλή πρόταση για online καζίνο, μπορώ να μοιραστώ τη δική μου επιλογή. Εγώ χρησιμοποιώ το slotexo και το έχω στα μέρη που επισκέπτομαι όταν θέλω λίγη διασκέδαση. Δεν είμαι από αυτούς που γράφουν τεράστιες κριτικές για κάθε πλατφόρμα. Προτιμώ να λέω απλά τι χρησιμοποιώ και να αφήνω την κουβέντα να συνεχιστεί φυσικά. Άλλωστε, είμαστε εδώ για να ανταλλάσσουμε ιδέες και όχι για να γράφουμε διαφημιστικά φυλλάδια.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know how to program graphical stuff on a 16-bit C/C++ compiler like TurboC or OpenWatcom. Using Mode 13h VGA stuff, either by straight C or Inline Assembly. But since 32-bit compilers run in protected mode and don't support the old <dos.h> stuff, how do I initialize an SVGA/VESA graphics mode on a 32-bit compiler like MinGW, Visual, Borland? and how do I display a single pixel and flush it out? This is all I need to make any graphical stuff or a game :), I already know the algorithms to draw primitive figures and accomplish animation. Though if there's any good tutorial or book I would prefer that.
Is there something on 32-bit console graphics programming of the quality of: "Brackeen's" Tutorials
http://www.brackeen.com/home/vga/
Or "Rusell's"
http://www3.telus.net/alexander_russell/course/introduction.htm
???
P.D.
Yes I know this console-graphic hacking or hard coding is rather useless since I can easily use the win32 API with GDI or even DirectX and accomplish all this in a nifty looking window in any resolution I want and far superior. But I'm really into old-school programming and want to fully learn the dynamics of graphics programming and animation at the console level before I move to an actual API or GUI.
Hey man,
If you want to access the interrupts from 32-bit protected mode code, you would have to flip the machine into 16-bit real mode state temporarily to call it. You cannot do this under winblows.
I would suggest just setting up a FAT16 partition and install DOS 6.22 on it. Do all your development under there with Turbo C++. Then you can just concentrate on learning without having to wrestle with modern compilers and operating systems.
Piece of advice: Throughout your journey of learning to do things without having everything done for you, people will take every opportunity to inform you that what you are doing is "silly" or "inappropriate." Just ignore them. Keep learning. They don't matter.
Kip
It's not useless. It's the only way to learn real graphics programming on the PC if you expect to actually understand what is going on.
If you want to use the BIOS to do all your graphics programming, then you must be calling from a 16-bit real mode module. Here are your options:
Use Turbo C++ or some other DOS compiler out in DOS. Once compiled, your code would use the real video BIOS / DOS interrupts.
Use any of the above compilers under win32. Once compiled, your code would run in a "vm86" (virtual machine x86) box - a sort of week microsoft emulator. Doing this has the advantage of allowing you to remain under winblows (so you can listen to your shoutcast streams or whatever while you work). The disadvantage being that usually the M$ implementation of things is fairly cretenous and may not work the way it is suppose to out in real 16-bit land.
I would suggest the second method. If you run into problems, try the first. =)
Kip
I meant the 'useless' part in case people anyone got the bright idea of telling me: "Dude use win32, what are you doing with this dinosaur old stuff?". But obviously I certainly agree that the real way to learn is the hardcore way. I've already done the first method, because as I said I've been programming graphics and games on Mode 13h for 16-bit DOS with TurboC++ and OpenWatcom.
How would I go on about compiling 32-bit code with the 16-bit instructions from the <dos.h> like REGS? I googled up and in UNIX there's a <sys/vm86.h> is this what you meant? Apparently it has a struct v86_regs with all 32-bit registers so I'm guessing I can do it that way?
Isn't there any other way to directly access BIOS or the graphics device in 32-bit? Like for instance DPMI (DOS Protected Mode Interface), to allow changing from protected to real mode? Or another option? I mean there must be, otherwise how is Windows' GDI implemented?
Αν κάποιος εδώ θέλει μια απλή πρόταση για online καζίνο, μπορώ να μοιραστώ τη δική μου επιλογή. Εγώ χρησιμοποιώ το slotexo και το έχω στα μέρη που επισκέπτομαι όταν θέλω λίγη διασκέδαση. Δεν είμαι από αυτούς που γράφουν τεράστιες κριτικές για κάθε πλατφόρμα. Προτιμώ να λέω απλά τι χρησιμοποιώ και να αφήνω την κουβέντα να συνεχιστεί φυσικά. Άλλωστε, είμαστε εδώ για να ανταλλάσσουμε ιδέες και όχι για να γράφουμε διαφημιστικά φυλλάδια.