Skip to content

Commit 0dfea08

Browse files
committed
adt2play: OPL3LPT command line options
1 parent 4c5f890 commit 0dfea08

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

adt2play/adt2play.pas

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
free_mem: Longint;
3737

3838
var
39-
temp,temp2: Byte;
39+
temp,temp2,lpt: Byte;
4040
_ParamStr: array[0..255] of String[80];
4141

4242
const
@@ -158,9 +158,24 @@ procedure new_exit_proc;
158158
If (Lower(_ParamStr[temp]) = '/jukebox') then
159159
jukebox := TRUE;
160160

161+
lpt := 1;
161162
For temp := 1 to ParamCount do
162-
If (Lower(_ParamStr[temp]) = '/latency') then
163-
opl3out := opl2out;
163+
begin
164+
If (Lower(_ParamStr[temp]) = '/lpt1') then
165+
lpt := 1
166+
else If (Lower(_ParamStr[temp]) = '/lpt2') then
167+
lpt := 2
168+
else If (Lower(_ParamStr[temp]) = '/lpt3') then
169+
lpt := 3
170+
end;
171+
172+
opl3port := MemW[$406 + lpt*2];
173+
If (opl3port = 0) then
174+
begin
175+
If _gfx_mode then _list_title;
176+
WriteLn('ERROR - Port LPT'+Num2str(lpt,10)+' not found!');
177+
HALT(4);
178+
end;
164179

165180
index := 0;
166181
If (ParamCount = 0) then
@@ -172,7 +187,8 @@ procedure new_exit_proc;
172187
CWriteLn('Command-line options:',$07,0);
173188
CWriteLn(' /jukebox play modules w/ no repeat',$07,0);
174189
CWriteLn(' /gfx graphical interface',$07,0);
175-
CWriteLn(' /latency compatibility mode for OPL3 latency',$07,0);
190+
CWriteLn(' /lpt2 use parallel port LPT2',$07,0);
191+
CWriteLn(' /lpt3 use parallel port LPT3',$07,0);
176192
HALT;
177193
end;
178194

0 commit comments

Comments
 (0)