Sound library MIDAS for Freepascal/GO32V2 (Announce)
Just accidentaly I found a adaptation of sound library MIDAS 1.1.2 for Freepascal/GO32V2 version.
It uses a technique of using C-language (DJGPP) .A libraries from Freepascal code.
Look here.
However I face to few problems with this library. I wrote to the author but it is very interresting topic so the email with my complains might be useful for somebodz else too.
--------------------------------------------------------------------
For many years, maybe decades, I am looking for some sound library working with DOS/GO32V2 version of FreePascal.
Now I found your adaptation of MIDAS. Thank you!
However I had some difficulties with the compilation of your code.
To be the explanation between us easier I uploaded the directory with your FPCMIDAS to my site:
http://www.laaca.borec.cz/…zip
The main issue I had was the error message in the linking stage. After some investigation I found that the problem is in duplicite definition of variable "_crt0_startup_flags" which is defined both in MIDAS (file MIDAS.C) and in deep layers of Freepascal (file V2PRT0.AS - part of the RTL system for GO32V2 platform).
-- In the FPCMIDAS.ZIP archive I included a file "errormsg.txt" with generated error message.
I tried to recompile the MIDAS with deleted lines of code with referencing the "_crt0_startup_flags" but my DJGPP instalation did not manage to recompile this stuff. (maybe missing NASM?)
So I took the hexadecimal editor and inside the LIBMIDAS.A changed all strings "_crt0_startup_flags" to "_crt9_startup_flags".
After that there was no more namespace conflict and your code compiled fine.
However - the generated FPCMIDAS.EXE works OK only in pure DOS with alterante DPMI server without virtual memory (without memory swapping).
Under Windows98 (with own DPMI server with memory swapping) it is unstable. So it seems that the line
"int _crt0_startup_flags = _CRT0_FLAG_LOCK_MEMORY;" is important.
So I modified your source a bit and wrote a new unit called DJGPPFNC.PAS and included it as a first unit in your FPCMIDAS.PAS
It should do exactly the same as the original C-code like "int _crt0_startup_flags = _CRT0_FLAG_LOCK_MEMORY;"
But... It still is not stable enough in environments with virtual memory.
So my quenstion is: how to effective switch off the virtual memory under FPC (better method than Lock_Code / Lock_Data) in way which is compatible with Windows98.
And does exist some better way for merging the DJGPP/C code with FPC code without need of hexaediting the .A library?
Maybe the original binary of MIDAS is compiled with some very ancient version of DJGPP and if it would be recompiled with some more modern version it would not be needed. I really don't know.
As a FPC environment I used the version 3.2.0, the version for GO32V2
---
DOS-u-akbar!
Complete thread:
- Sound library MIDAS for Freepascal/GO32V2 - Laaca, 22.11.2020, 18:37 (Announce)
- Sound library MIDAS for Freepascal/GO32V2 - tkchia, 23.11.2020, 18:08
- Sound library MIDAS for Freepascal/GO32V2 - marcov, 23.11.2020, 23:32
- Sound library MIDAS for Freepascal/GO32V2 - Laaca, 24.11.2020, 01:06
- Sound library MIDAS for Freepascal/GO32V2 - marcov, 23.11.2020, 23:32
- Sound library MIDAS for Freepascal/GO32V2 - tkchia, 23.11.2020, 18:08