Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

DOS graphics problems about 1.a screen buffer and 2. 256 color mode

I've got 2 graphics- and dos-related problems:
1
About using a screen-buffer: i made a pointer called ptr to (enough) free space using calloc. Then I need to copy the buffer to the real screen, but i don't know the video memory adress. I tried 0XA0000000L, is this wrong? And how do I have to copy the screen buffer to the real screen memory? i tried memcopy but then the system crashed and i had to reboot.
2
My standard video mode in DOS is 640*480*16 colors, how can i get to 256 color-mode? my screen can handle it :). I asume it has something to do with 'palettes' (of which i don't understand **** btw).

Thanks a lot to anybody who can solve one of my problems! I'm a young programmer from Belgium (Eastern Europe), and I like to work in DOS (because in Windows everything's done for you), now I'm "working" on a 3D-"engine" (for the fun, of course).
Greetings, Bruno

Comments

  • XLoomXLoom Member Posts: 129
    : I've got 2 graphics- and dos-related problems:
    : 1
    : About using a screen-buffer: i made a pointer called ptr to (enough) free space using calloc. Then I need to copy the buffer to the real screen, but i don't know the video memory adress. I tried 0XA0000000L, is this wrong? And how do I have to copy the screen buffer to the real screen memory? i tried memcopy but then the system crashed and i had to reboot.

    Did you include alloc.h and mem.h, if you are using c?
    If this is not the case, how did you get this video mode? Did you get it with initgraph() or with something like this:

    _AH=0x00;
    _AL=0x12;
    geninterrupt(0x10);

    If you used this way, then address 0xA0000000L should be correct.

    : 2
    : My standard video mode in DOS is 640*480*16 colors, how can i get to 256 color-mode? my screen can handle it :). I asume it has something to do with 'palettes' (of which i don't understand **** btw).

    If you want to use 640*480*256 colors mode then you could use (and I think should use) VESA mode 0x101. However, this is a banked mode and you can only access one bank out of time. It is quite difficult and not very fast. If you want to know how to use it then let me know, but I personally would recommend using mode 320*200*256. But I don't want to write something you don't need, so let me know, which mode do you want to use. If you want to make a 3d-engine in dos, then it will be SLOW with 640*480*256. At least it was for me. Hope this helps you.

    : Thanks a lot to anybody who can solve one of my problems! I'm a young programmer from Belgium (Eastern Europe), and I like to work in DOS (because in Windows everything's done for you), now I'm "working" on a 3D-"engine" (for the fun, of course).
    : Greetings, Bruno
    :

  • Andre YoungAndre Young USAMember Posts: 0

    / http://forcoder.org / free ebooks and video tutorials about // Delphi Swift C# Perl JavaScript Python Go Visual Basic Objective-C PHP Assembly R MATLAB Visual Basic .NET Java Ruby C++ Scratch PL/SQL C Alice VBScript ML Hack Lua Apex Crystal LabVIEW Scheme Kotlin D Erlang Ada Scala SAS COBOL Rust Clojure Dart Lisp Logo Awk Transact-SQL Prolog Fortran FoxPro ABAP F# Julia Bash // __

Sign In or Register to comment.