Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do you play Electric Duet music files outside of the original disk?

57 views
Skip to first unread message

Brian

unread,
Dec 16, 2012, 3:19:48 AM12/16/12
to
I'd like to add some music to a new game I'm working on (don't worry,
not during the actual game play, that is far beyond me), but perhaps
in the background during the intro screen.

I have all the music files and the actual music player extracted, now
what code do I use to play it in BASIC?

Thanks.

bloomer_au

unread,
Dec 16, 2012, 4:30:47 AM12/16/12
to
Let's say your player file is called PLAY and your music file is called M.MUSIC. What you do is:

1. BLOAD PLAY,A$300
2. BLOAD M.MUSIC,A$6000 (You can load it elsewhere if you want, but I think this is the duet's default load position)
3. POKE 30,0 and POKE 31,96 (These pokes tell the player where to find the music data. You would change them if you loaded the music somewhere other than A$6000)
4. CALL 768

Are you using PRODOS? If so, you can put the BLOADs in your program like so:

20 ?CHR$(4)"BLOAD PLAY,A$300"

If you're using DOS 3.3, you need to account for the chr$(4) bug, but I'll only bother typing about that if it proves relevant :)

- Wade

Steve Nickolas

unread,
Dec 16, 2012, 11:25:37 AM12/16/12
to
On Sun, 16 Dec 2012, bloomer_au wrote:

> Are you using PRODOS? If so, you can put the BLOADs in your program like
> so:
>
> 20 ?CHR$(4)"BLOAD PLAY,A$300"
>
> If you're using DOS 3.3, you need to account for the chr$(4) bug, but
> I'll only bother typing about that if it proves relevant :)

This is why I often use ?:? CHR$(4), since it works on both OSes.

-uso.

Michael J. Mahon

unread,
Dec 16, 2012, 4:35:59 PM12/16/12
to
But it prints a blank line if an end-of-line has already been printed.

It's not hard to keep track of whether an EOL is pending. Most programs
don't want to do disk I/O in the middle of printing a like!

-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon

Brian

unread,
Dec 17, 2012, 3:05:04 AM12/17/12
to
Thank you so much!
0 new messages