First post, by Setsunaaa
Simple test.bat:
echo a>test.txt
echo b>>test.txt
echo c>>test.txt
echo d>>test.txt
echo e>>test.txt
Under "real" dos/win32:
test.txt is (hex)
00000000: 61 0D 0A 62 0D 0A 63 0D 0A 64 0D 0A 65 0D 0A
Note the CR/LF !!!
Under DOSBOX:
00000000: 65 0A
So these are two bugs in one: _appending_ doesn't work as expected, and the file created is suitable for unix instead of DOS.
When the batches get more complex (using choice, inset and environment variables) the output is garbled 'round quite funny.
This attached .bat uses choice.com from DOS, was created LONG ago by me for command & conquer (which I own!).
The conquer.ini created when choosing sbpro with the default settings and hit "yes" at the end looks very funny compared to the same action under win32 or real DOS.
Kind regards,
Setsunaaa
(here the more complex setup.bat example, with inset.com and choice.com "attached")
@echo off
cls
echo Little Setup.bat for this old game.....
echo Choose:
echo.
echo (A) Soundblaster
echo (B) Soundblaster Pro (or better SB cards)
echo ( ) Soundblaster 16/AWE (removed, sorry, buggy, use SBPRO)
echo (D) Roland RAP-10
echo (E) Pro Audio Spectrum 16
echo (F) Pro Audio Spectrum Plus
echo (G) Microsoft Windows Sound System
echo (H) Gravis Ultrasound MAX
echo (I) ESS Audio (SBPro might sound better)
echo (J) Ensonic Soundscape
echo (K) Gold Sound Standard
echo (L) Cardinal Sound Studio
echo (M) No Sound
echo.
echo (X) Exit now.
echo.
choice /c:abcdefghijklmx>NUL
if errorlevel 14 echo Abort.
if errorlevel 14 goto eof
if errorlevel 13 goto nosound
if errorlevel 12 goto card
if errorlevel 11 goto gold
if errorlevel 10 goto ens
if errorlevel 09 goto ess
if errorlevel 08 goto gusmax
if errorlevel 07 goto mswin
if errorlevel 06 goto proplus
if errorlevel 05 goto pro16
if errorlevel 04 goto rap10
rem if errorlevel 03 goto sb16
if errorlevel 02 goto sbpro
if errorlevel 01 goto sb
goto end
:sb
echo Soundblaster
set n=116
set c=e000
set b=8
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 220)" p
if "%p%"=="" set p=220
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:sbpro
echo Soundblaster PRO
set n=117
set c=e00f
set b=8
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 220)" p
if "%p%"=="" set p=220
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:sb16
echo Soundblaster 16/AWE
set n=119
set c=e017
set b=16
set s=1
inset "IRQ (default = 5)" i
if "%i%"=="" set i=7
inset "Port (default = 220)" p
if "%p%"=="" set p=220
inset "DMA (default = 5)" d
if "%d%"=="" set d=5
goto makeini
:rap10
echo Roland RAP-10
set n=120
set c=e022
set b=16
set s=1
inset "IRQ (default = 9)" i
if "%i%"=="" set i=9
inset "Port (default = 330)" p
if "%p%"=="" set p=330
inset "DMA (default = 5)" d
if "%d%"=="" set d=5
goto makeini
:pro16
echo Pro Audio Spectrum 16
set n=132
set c=e004
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 388)" p
if "%p%"=="" set p=388
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:proplus
echo Pro Audio Spectrum Plus
set n=139
set c=e003
set b=8
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 388)" p
if "%p%"=="" set p=388
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:mswin
echo Microsoft Windows Sound System
set n=136
set c=e00d
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 604)" p
if "%p%"=="" set p=604
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:gusmax
echo Gravis Ultrasound MAX
set n=130
set c=e029
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 220)" p
if "%p%"=="" set p=220
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:ess
echo ESS Audio
set n=138
set c=e01b
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 220)" p
if "%p%"=="" set p=220
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:ens
echo Ensonique Sound Scape
set n=133
set c=e01f
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 330)" p
if "%p%"=="" set p=330
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:gold
echo Gold Sound Standard
set n=128
set c=e00a
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 388)" p
if "%p%"=="" set p=388
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:card
echo Cardinal Sound System
set n=124
set c=e00a
set b=16
set s=1
inset "IRQ (default = 7)" i
if "%i%"=="" set i=7
inset "Port (default = 388)" p
if "%p%"=="" set p=388
inset "DMA (default = 1)" d
if "%d%"=="" set d=1
goto makeini
:nosound
echo No Soundcard
set n=0
set c=0
set b=0
set s=0
set i=-1
set p=-1
set d=-1
goto makeini
:makeini
echo Save configuration (Modem Config / Phone numbers will be lost) ? (J/Y/N)
choice /c:jyn>NUL
if errorlevel 3 echo Abort.
if errorlevel 3 goto eof
echo [Sound] >conquer.ini
echo Name=%n%>>conquer.ini
echo Card=%c%>>conquer.ini
echo Port=%p%>>conquer.ini
echo IRQ=%i%>>conquer.ini
echo DMA=%d%>>conquer.ini
echo BitsPerSample=%b%>>conquer.ini
echo Channels=0>>conquer.ini
echo Reverse=0>>conquer.ini
rem echo Speed=%s%>>conquer.ini
echo Speed=0>>conquer.ini
echo Subtitles=0>>conquer.ini
echo.>>conquer.ini
echo [Language] >>conquer.ini
echo Language=ENG>>conquer.ini
echo.>>conquer.ini
echo [Intro]>>conquer.ini
echo PlayIntro=No>>conquer.ini
:end
echo done.
:eof
set n=
set c=
set b=
set s=
set i=
set p=
set d=
begin 600 inset.com
MZ=8````;!!Z.'A8`BQXL`(7;=!!32X[;H0,`L033X"ZC`P$''\,K_XL.`P$F
MB@6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