Jan 082018
 
Use for slowing down PC by accessing DMA. Includes complete C source code, that is useful for understanding DMA transfers.
File DMASLO.ZIP from The Programmer’s Corner in
Category System Diagnostics
Use for slowing down PC by accessing DMA. Includes complete C source code, that is useful for understanding DMA transfers.
File Name File Size Zip Size Zip Type
DMASLO.C 6272 2687 deflated
DMASLO.DOC 7168 2996 deflated
DMASLO.EXE 9297 5729 deflated

 

Download File DMASLO.ZIP Here

Contents of the DMASLO.DOC file



Terry Bohning
12/8/88
Compuserve [71036,1066]
GEnie T.BOHNING

Copyright (c) Terry Bohning 1988, 1989. All rights reserved.

!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!
This work is Copyright (c) Terry Bohning 1988, 1989 and all
rights are reserved. This work may be freely distributed in an
unmodified form as long as said distribution is not performed
with the intent of monetary gain.

I hereby absolve myself of all blame in the event of any direct
or consequential damage or loss which may result from use of the
program. THE USER OF THE PROGRAM AND THE INFORMATION CONTAINED
HEREIN BEARS FULL RESPONSIBILITY FOR ANY AND ALL CONSEQUENCES!
If you do not understand what this program does or have not had
it explained by someone who does, DON'T USE IT!

This program reprograms the DMA (Direct Memory Access)
controller. It has been tested on ONE machine. If you feel even
slightly uncomfortable about this, DON'T USE IT! If you do use
it, rebooting your machine before doing any subsequent serious
work is STRONGLY recommended.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


QUESTIONs & ANSWERs Concerning DMASLO
(* indicates technically oriented material)


QUESTION: What does DMASLO do, and why?

ANSWER: DMASLO was originally written in order to allow many of
the fine joystick games which were written for an IBM PC/XT to
run correctly on an AT. However, DMASLO is also useful to slow
an AT or XT down for any reason. NOTE: before using on a PC/XT
read the warnings in the usage answer.

Some joystick games which were written for the PC/XT's timing
will not read the joystick correctly on an AT or will not
recognize that a stick is attached at all.

The primary reason for this is that PC/XT joystick read routines
used 8 bit counters which invariably overflow on the AT, making
the game either believe that no stick is attached or that the
stick position is very peculiar.

[ Another reason some games won't allow joysticks on the AT is
that the BIOS equipment flag may be improperly set. Refer to the
program JOYFORCE.ARC (or JOYFRC.ARC on Compuserve) for an
explanation and solution to this problem. ]

Since joystick read routines disable interrupts, the execution
speed must be reduced even with interrupts off in order to cure
the problem. One way (the only software way?) to do this is to
steal the computer's data bus from the microprocessor for part of
the time.

As the machine is shipped, only the DMA (Direct Memory Access
Controller) has this capability. Direct Memory Access means that
Memory is Directly Accessed without the use of the
microprocessor.

DMASLO reprograms the DMA controller so that it will "steal" a
selectable portion of time away from the CPU (Central Processing
Unit or microprocessor) by performing artificial DMA cycles.

* While the 8237 DMAC is bus master, it perform block transfers
in verify mode, so that memory and I/O control lines are not
active.



QUESTION: How do I use DMASLO?

ANSWER: DMASLO requires some experimentation to find the correct
command line for a particular machine. This answer defines
command line parameters and the answer to the next question
explains how to determine the values.

The command line is as follows:

"DMASLO channel polarity count" or "DMASLO channel off".

'channel' is the DMA channel number to use.
legal values: 0,1,3

'polarity' is an internal flag which will probably vary from
channel to channel and machine to machine.
legal values: 0,1

'count' is the relative slowness value (higher implies slower).
legal values: 1-65535

* 'count' is actually the block size used during the DMA block
transfer.

* 'polarity' programs DREQ active high or low. DREQx of an
unused channel is a floating input. If an input can't be found
that's floating high (the normal active sense), DMASLO is capable
of reprogramming DREQ sense. This is somewhat dangerous as used
channels with previously inactive DREQ will suddenly be active.
Refer to the source for cautionary measures taken. DMASLO will
never use channel 2, the Floppy Disk DMA channel.

"DMASLO channel off" attempts to reprogram the DMA back to its
original state for the channel. However, this state is not known
completely. If other devices in your machine use this DMA
channel, problems could develop if they rely on a certain
programming. For this reason, it is suggested that the machine
be REBOOTED after game-playing is over and serious work is to
begin.



QUESTION: How do I determine the channel, polarity, and count,
parameters?

ANSWER: This will take experimentation. Here are the steps to
follow:


CHANNEL/POLARITY DETERMINATION

1) Type "DMASLO 0 1 1". If DMASLO responds with "Channel
0 programmed for block count 1", then this is the channel and
polarity you should use. If you get any other message, continue
to the next step.

PC/XT WARNING: PC/XT users should skip this step, since Channel
0 is used for dynamic memory refresh, and memory parity errors
will result.

2) Type "DMASLO 1 1 1". If DMASLO responds with "Channel
1 programmed for block count 1", then this is the channel and
polarity you should use. If you get any other message, continue
to the next step.

3) Type "DMASLO 3 1 1". If DMASLO responds with "Channel
3 programmed for block count 1", then this is the channel and
polarity you should use. If you get any other message, continue
to the next step.

4) Type "DMASLO 0 0 1". Try running this, and if it
doesn't work for some reason, try "DMASLO 1 0 1" and then
"DMASLO 3 0 1". When you are done playing games, REBOOT the
machine! DO NOT ATTEMPT TO ACCESS THE FLOPPY DISK DRIVE OR DO
ANY SERIOUS WORK UNTIL YOU HAVE REBOOTED!

PC/XT WARNING: PC/XT users should not try channel 0, only 1 and
3 for the reason outlined above.


COUNT DETERMINATION

The count parameter (the last number) can be adjusted to your
liking. Use at least the minimum value to get the game to work.
Increase the value to make it easier.

The same count in turbo and non/turbo (on clones) gives an
additional variation in speeds. On my 10 MHz AT clone when
playing ZAXXON, a count of 1 in turbo allows the game to
recognize that the joystick's attached. In non-turbo, the game
sees the joystick, but it's very difficult to play due to the
speed.

Large counts will probably require power-cycling in the interest
of saving time.

NOTE: A count of 0 is actually a count of 65536.

/**************************** EOF ******************************/


 January 8, 2018  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)