BBS: Inland Empire Archive Date: 12-02-92 (23:51) Number: 327 From: RICH GELDREICH Refer#: NONE To: ALL Recvd: NO Subj: Mod Player bugfix! Conf: (2) Quik_Bas
After testing out the MOD player I posted on about 60
MODs or so, I found a little bug... So, if you captured the MOD
player, please get ready to make a change.
The bug concerns the handling of command #3, the port to
note command. With some MODs(not many, thank god), command 3
appears without any period to slide to. When my ASM player
encounters this, it automatically uses the last slide command's
destination period instead. My QB version doesn't. The bug will
usually cause the player to drop to DOS while the interrupt 8
handler is still churning out samples(if this happens, reset your
computer immediatly, or it'll hang up if you try to run
anything!).
The fix is pretty simple. Go to the "DoLine"
subroutine, in part 5. (The "DoLine" subroutine actually starts in
part 4, and ends in part 5.)
Look for these lines inside the SELECT CASE M statement:
CASE 3 'Port to Note
IF C.Period(A) > C THEN
C.Command(A) = 4
ELSE
C.Command(A) = 5
END IF
C.PortSpeed(A) = o
C.PortDest(A) = C
Change that to:
CASE 3 'Port to Note
IF C.Period(A) > C THEN
C.Command(A) = 4
ELSE
C.Command(A) = 5
END IF
IF C=0 THEN C=C.PortDest(A)
IF C<113 THEN C=113 ELSE IF C>1023 THEN C=1023
C.PortSpeed(A) = o
C.PortDest(A) = C
I added two IF/THEN statements. The first checks to see
if a valid destination period was given. If it wasn't, then the
last one is used.
The second statement checks to make sure the destination
period is in the range of 113-1023.
Sorry for the trouble... Making a MOD player, in any
language, is very tricky, especially in QuickBASIC. If anybody
finds any other bugs, please let me know. Thanks!
Rich
PS. It figures I would find this bug _after_ I posted it!
While I'm talking about MODs, has anybody every seen a MOD
version of A View To a Kill, by Duran Duran (I think that's how you
spell it). It was the theme song for a James Bond flick made back in
1985, the flick's title is the same as its theme song.. Just asking.
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET