Author Topic: Using dosbox as a platform to *make* demos with?  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

Offline Uhfgood

  • ZX 81
  • *
  • Posts: 7
  • Karma: 1
    • View Profile
    • Games Afoot Software
I posted this question at the end of my getting started thread, but it's been several days and no one has answered.  Hopefully I won't get in trouble by posting this question in it's own thread.

I just want to know if it would be a viable option to program demos for dosbox specifically.

If it's viable, what are some of the pitfalls of doing so?  How to get started, and that sort of thing.

I might even be able to remember stuff I did back in the day.  It might give me a chance to do what I always wanted to do back then short of actually getting a used computer with ms-dos on it.

Any thoughts, opinions, complaints, or comments greatly appreciated.

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: Using dosbox as a platform to *make* demos with?
« Reply #1 on: April 24, 2013 »
its probably simpler and less hassle than maintaining and installing a real old dos machine.

depends what you want to do really, could be that you just need to find a simple gfx wrapper and play with that ?

i played with directdraw a long time ago to get direct frame buffer mem access.. might just be you need that.

after moving over from teh amiga i learned turbo pascal (bp6) in dos and later microsoft's DOS forerunner to visual studio, programmers workbench (PWB) quickly followed by visual c++ 1.51 which has windows gui but will compile for DOS.


Question is.. What did you always want to do?

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: Using dosbox as a platform to *make* demos with?
« Reply #2 on: April 25, 2013 »
found another of your posts..

Quote
I basically want to do stuff like starfields, dot tunnels, plasmas, fire, interference, coppers, etc...  Write my own blitters, scalars and the like.  So any help is appreciated.

the main one that warrants framebuffer access most is the fire (and some versions of plasma) as you read back pixles (at least how i did it back in the day), the rest are just straight drawing.. 

i've had a look around and I think if you'll come away from DOS http://www.libsdl.org/ is probably the best thing for you
lots of demo's here http://www.libsdl.org/demos.php and its very widely used

i'm the same age as you, also gettng back into gfx programming, and using c/c++ (but it is my day job..)  and if i weren't interested in accelerated 3d and porting stuff to other platforms i'd be all over direct2d or sdl for this kind of stuff instead of learning OpenGL

Quote
Graphics
SDL gives you a choice of how you want to do graphics. You can get at the raw pixels and do pretty much anything you want with them, or you can use OpenGL to do hardware accelerated 2D and 3D graphics.

btw never tried it myself, but it looks fit for purpose to me.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
Re: Using dosbox as a platform to *make* demos with?
« Reply #3 on: April 25, 2013 »
I just want to know if it would be a viable option to program demos for dosbox specifically.
Although you can easily configure the number of cycles dosbox executes, it's hard to predict how fast your code is actually running on a real dos pc.
And if you're planing to use certain vga-tricks, dosbox might not emulate those perfectly.
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: Using dosbox as a platform to *make* demos with?
« Reply #4 on: April 26, 2013 »
btw I also realised after posting above about SDL, that DOSBOX uses SDL for its own framebuffer so using SDL would cut out the middle man.
« Last Edit: April 26, 2013 by Canopy »

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1289
  • Karma: 466
    • View Profile
    • my stuff
Re: Using dosbox as a platform to *make* demos with?
« Reply #5 on: April 26, 2013 »
btw I also realised after posting above about SDL, that DOSBOX uses SDL for its own framebuffer so using SDL would cut out the middle man.
SDL just handles the display of the emulated vga content.
If you're heading for "modern" machines (eg. 486 or faster cpus), you'll probably just copy a virtual framebuffer to 0xa0000 every frame and that's it.
As Canopy said, it's easy to "emulate" that using sdl (or any other framebuffer library) and do most of the development work in your favourite windows ide.
It's getting quite a bit more difficult if you're planing to use more hardware-oriented features like bitplanes, scrolling and register trickery.
Challenge Trophies Won:

Offline Brandon_Roth

  • ZX 81
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Using dosbox as a platform to *make* demos with?
« Reply #6 on: September 11, 2013 »
Nice post !!! Thank you solve for my problem .