How I got my dos program working fast.

DOS specific questions.
lassar
Posts: 300
Joined: Jan 17, 2006 1:35
Contact:

How I got my dos program working fast.

Postby lassar » Jun 01, 2013 5:27

I have been working on my dos version of RadioTelephone Tutor demo.

It's been a pain to get it to work fast.

If any wants to see that dos freebasic programs can be fast, check out my dos program.

Put my program in dosbox emulator, dial it down to 500 cycles, and see how speedy it still is.

I found out that memory allocation in the form of ever changing dynamic stings, and string function's temporary strings , can really slow you down.

In those cases, I used fixed length strings, when possible.

In other cases, I used inline assembly to replace some string functions.

Using strings for input handling can slow you down too.

Found out , that turning mouse visibility off, speeds it up at least in dosbox.

Used getkey instead of Inkey$.

Found that 8 bit graphics is a lot faster then 32 bit graphics.

Used a lot of inline assembly for the graphics.

If you want speedy graphics in dos freebasic , don't ever use freebasic graphics period.

Freebasic graphics is just way too slow.

Use direct vesa, instead of using screen or screenres.

This way you don't invoke the frame buffer update routines in the timer isr.

If you are using vesa, take advantage of changing video windows to speed things up.

I used the new bmp compression, and uncompression to make my graphic figures take less time to show .

You can find the programs for Vertical lines RLE compression & decompression in freebasic tips,and tricks.

It is possible to get freebasic dos programs to work fast, but it will take some work to do so.
Last edited by lassar on Jul 05, 2013 21:20, edited 3 times in total.
DOS386
Posts: 798
Joined: Jul 02, 2005 20:55

Re: How I got my dos program working fast.

Postby DOS386 » Jun 15, 2013 6:21

lassar wrote:Found that 8 bit graphics is a lot faster then 32 bit graphics.

It is possible to get freebasic dos programs to work fast, but it will take some work to do so.


Unsurprisingly and right :-) Or drop the FBGFX lib and use VESA directly.
lassar
Posts: 300
Joined: Jan 17, 2006 1:35
Contact:

Re: How I got my dos program working fast.

Postby lassar » Jun 24, 2013 18:22

You are definitely right on that suggestion.

Just dropped the FBGFX lib, and am using vesa.

Did not take too much work.

I was not using much of the FBGFX lib, just had to replace the palette and ScreenSync routines.

Definitely made a big difference.

Can now get RadioTelephone Tutor to run fairly decently in dosbox at 500 cycles!

Return to “DOS”

Who is online

Users browsing this forum: No registered users and 13 guests