Re: [AD] Patch for fixed bugs with Soundscape DOS driver

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michael Bukin wrote:

>> There is one difference, inp(outp) are longer than inportb(outportb).
>> Instead of replacing inportb with inp, try to add delays after port
>> accesses, or look in your BIOS setup for ISA-bus speed option.  There
>> are some strange computers with non standard ISA-bus speed, where some
>> ISA-cards may work faster, but some cards just don't work correctly.
>

In reply to Angelo Mottola (Angelo Mottola <a.mottola@xxxxxxxxxx>):

>Hummm... Adding delays could be a solution, but then it brings me again to think 
>inp/outp are different from
>inportb/outportb; why the first ones need delays, while the others work anyway? 
>Again, Allegro 3.12 does work with my
>SB 64 PCI, and it uses inp/outp.

From what I can see, from the DJGPP lib sources, 'inp' is exactly the
same as 'inportb', with the exception of the generated assembly code.
Basically, when compiled with optimisations (and Allegro will be),
'inportb' expands to just one assembly instruction, whereas 'inp'
expands to several - the stack is dealt with somehow (I don't know
assembler!), then '_inp' is called.

Looking at the symbol _inp, which is defined in an assembler file, it
just jmps straight to inportb.

So what Michael said seems to be true - inp takes longer to execute than
inportb. This may affect some sort of timing. Perhaps this is why the
instructions were originally changed?

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/