Mail Archives: djgpp/1999/10/08/22:36:00
From: | "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
|
Newsgroups: | comp.games.development.programming.misc,comp.os.msdos.djgpp
|
Subject: | Re: A choking start for DPMI
|
Date: | Fri, 8 Oct 1999 17:17:44 -0500
|
Organization: | Rose-Hulman Institute of Technology
|
Lines: | 57
|
Message-ID: | <7tlqls$79h$1@solomon.cs.rose-hulman.edu>
|
References: | <7tj2lg$n15$1 AT news7 DOT svr DOT pol DOT co DOT uk>
|
NNTP-Posting-Host: | 137.112.205.146
|
X-Trace: | solomon.cs.rose-hulman.edu 939421180 7473 137.112.205.146 (8 Oct 1999 22:19:40 GMT)
|
X-Complaints-To: | news AT cs DOT rose-hulman DOT edu
|
NNTP-Posting-Date: | 8 Oct 1999 22:19:40 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Ben Davis <ben AT vjpoole DOT freeserve DOT co DOT uk> wrote in message
news:7tj2lg$n15$1 AT news7 DOT svr DOT pol DOT co DOT uk...
> I've written a rather hyperactive game using DJGPP
> and Allegro, in DOS.
Is it as insane as my Insane Game, part of DOSArena?
http://come.to/yerrick
> Naturally it uses DPMI, which involves disk-swapping.
> The trouble is, when the program first starts, it freezes
> as the computer accesses the hard-disk.
> Having already started playing some digitised music,
I assume that by "digitised music" you mean a wave file
that has been tightly compressed by a lossy algorithm.
> it causes the sound to crackle a lot.
Heck, even the lowly DOSArena crackles under Windows
98 on my laptop's sound subsystem.
> I would like to know if there is a way of causing all disk-
> swapping to happen before the game displays any graphics
Not even the "Loading... so get over it" graphic?
set_gfx_mode() should almost always immediately follow
allegro_init() because it gives you a chance to see if the
system even supports graphics, as many environments
(e.g. MSVC) don't support printf().
> or makes any sound. If I need to specify all the
> variables which must be in physical memory,
> then I can do it. However, being new to DPMI and
> especially the function names in DJGPP,
You're also using Allegro. Look up LOCK_FUNCTION()
and LOCK_VARIABLE(). Those are portable shortcuts
to whatever those functions are called on your platform.
> I need some help. Any ideas?
>
> Ben Davis
Try this:
Put an init_foo() function in each of your source files. Have
main() call them; this will load each portion of your program
into memory. Only play your MP3s after all the init_*()
functions have been called.
Damian Yerrick
http://come.to/yerrick
- Raw text -