Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Tonic151

Desperatly looking for Help on ANSI, Any old schoolers??

This topic is 6150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m going crazy trying to locate information on how i can impliment ANSI Color Text and Graphics/Characters into my DOS / Win32 Console program. Some of you might now be to fimular with ANSI from the pre-Windows 95 days. I Ran a Dos Bulletin Board for a 8 years, from 90-98. I''m currently Programming in MS Visual C++ 6.0. What i''m trying to do is intergrate ANSI escape codes into a menu display or even read an .ANS ANSI file, so that i can display Colored Text and Characters on the screen, also with cursor positioning. Now i know all that i need to do is load ANSI.SYS but for people that don''t have that and most people don''t even know about it now a days, I need to learn how i can make this all internal to my program. I''ve seen so many programs that run and have ANSI Text/Charachers with color and no ANSI.SYS driver need to be loaded. My problem is the only thing close i can find is some old code in Pascal, and theres no way i''m gonig to get that working in MS Visual C++. I''ve run into some stuff about Unicode but i ahve no idea what that is, I need help in getting this working in in my DOS Console program, and also if it will work in Windows for later projects like a win32 Telnet program that i would like to make also. Please if anyone can help me i''d appreceiate it so much, just really just isn''t any good information that i can find easly. Thanks,

Share this post


Link to post
Share on other sites
Advertisement
lol
ANSI Bulletin Boards were oh so sexy. I ran one for some time myself.

It has been such a long time since I played around with that stuff I forget the exact way the file format worked, but there are a whole bunch of ANSI utilities here:

http://archives.thebbs.org/ra107c.htm

Some of the, such as ampro210 come with ascii character/ansi color/blink charts. Im sure if you dig deep enough in there you can find some other goodies that will be helpful

If you continue to have problems finding information, email me at toasted2k@yahoo.com . I do have loads of old DOS and even CGA/EGA/VGA programming books. lol. I might be persuaded to look up the information you need.

Seeya
Krippy

Share this post


Link to post
Share on other sites
- Krippy2k
I checked out thebbs.org but they didn''t have any information or source on how to implement escape codes into display. Hehe searching the net gets very frusterating. I''ve searched the net and found a couple telnet programs that have PC-ANSI/VT100 Emulation, but it''s a little iffy on, I need to find some decent doc''s on how i can convert the ESC code''s into to direct display, for colors, and also cursor movements, like ANSI.sys does, but in visual c++, ever i think is for Turbo C++ or Turbo Pascal, and man messing with that stuff is just asking for a headach since of the include files don''t work for other compilers espically the bios.h heh

- Clash Rocker
Hmm Quick Basic? hehe i''ll take a look, i actually have a Win95 cd right next to me. Man i never thought doing ANSI would be so dam diffcult, lol

If anyone has else has any good information i''d apprecieate it very much. Espically on the new ANSI/2 stamdard that i''ve heard about that has new extra ESC codes to implement more colors then the old 16..

I''d love to get it working so that i can work on a new interface of my own that will have a new ANSI w/ Full Graphics interface.

Thank you,

Share this post


Link to post
Share on other sites
heh
Well I''m not sure what your level of experience is. If you''re looking for code that you can just cut and paste into MSVC you will probably have problems finding it. Something like this will take a little bit of learning.

Do you already know how to draw a character on the screen at a given x/y coordinate in DOS mode? Know how to draw those characters with colors?

The first step would be to learn how to do that, if you don''t already know. Once you know how to plot the characters in the right place with the right colors it is just a matter of parsing the .ANS files and seperating the relevant information.

Several of the utilities on thebbs.org have charts of the ANSI escape codes. You just need to read the file, locate the escape codes and process them into information that you can use such as X/Y, character code and color code. The animation sequences are pretty straightforward each one corresponds to set time interval and merely moves the cursor on the screen and plots new characters.

Break down the problem into manageable parts, and then start asking more questions when you have a specific problem to overcome.

Seeya
Krippy

Share this post


Link to post
Share on other sites
Thanks man, i starting figureing out that was what i needed, but now my question is, should i use WIN32 API commands to plot and change the colors from the ANSI Escape codes? Or is there something better and easier, i''m not much for MASM at the moment. I haven''t worked with this to much. But i do understand now what i need. I was also wondering what the streamline ANSI escape codes are, there seems to be a few different sets, ANSI.sys, ANSI-BBS Emulation which i think is also ANSI-BBS/IBM-PC ANSI, and ISO ANSI, and VT100, i''m sorta lost on this part aswell.

Thanks

Share this post


Link to post
Share on other sites
If you want the ANSI codes to work in a window, you will need to use the Win32 API or MFC or something like that. You could also use OpenGL/GLUT to do it. Using GLUT would free you from really having to worry about learning much about the Win32 API. But then you would need to create texture files with all of the different printable ANSI characters, which on one hand could be a pain but on the other could be cool because you can make the letters look blocky like the old DOS fonts were. lol. Depends on how nostalgic you are feeling

If you want it to run in DOS mode or DOS box like the old BBSes used to run, there are some DOS functions which deal with plotting characters and colors which would work fine, and indeed that is how most of the ANSI emulating dialup programs would do it if ANSI.SYS was not available. Some used direct video memory but that is not something you want to try too much of in a protected mode(Windows9x) environment

If by streamline you mean what was used the most for BBSes I would say ANSI.SYS since this is what most of the BBSes assumed the user had. VT100 is most widely used for Telnet clients.

Seeya
Krippy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!