[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2407.0. "Amiga Basic Help Requested" by GUCCI::HERB () Wed Mar 29 1989 01:41

    I have a problem.  I am using a program to use CLI commands in
    Amigabasic.  I am using a program called "sound" that came with
    Ed's starter disk.  "sound" will play digitized sounds in CLI. 
    In my case I am using the program to play digitized sounds in Basic
    with the CLI program.  Here is my program:
    
    main2:
    print "loading libraries..."
    declare function xopen& library
    declare function execute% library
    library "dos.library"
    
    main:
    
    CLI"copy sound to ram:sound2"
    CLI"copy manscream to ram:manscream2"
    
    main3:
    
    CLI"ram:sound2 ram:manscream"
    
    Finish:
    
    goto main3
    
    sub CLI (command$) static
    shared error.code%
    work$ = command$ + chr$(0)
    count%=00
    
    out.filename$ = "RAM:cli out"
    out$ = out.filename$ + chr$(0)
    
    out.handle& = xopen&(sadd(out$),1006)
    if out.handle&=0 then
    error.code% = 1
    end if
    
    follow% = execute%(sadd(work$),0,out.handle&)
    if follow% = false then
    error.code% = 2
    
    exit sub
    end if
    
    call xclose(out.handle&)
    text.height% = peekw(window(8)+58)
    window.height% = peekw(window(7)+10)-11
    lines% = int(window.height%/text.height%)-3
    
    end sub 
    goto main3
    
    
    
    
    
    
    
    The problem I have is that I am trying to make a action game and
    on this line: FOLLOW% = EXECUTE%(SADD(WORK$),0,OUT.HANDLE&) it runs
    from the disk drive for about 2 seconds.  I can not have a sword
    fighting game with the disk drive running in the middle of it. 
    Is there a way to change this so it does not run from the disk drive?
    Is there a easier way to use CLI from basic without thje disk drive
    running?  Is there another public domain program to play digitized
    sounds in basic?.  I want my games to have sounds in them!!!!!
    
    matt (I type this all by hand!!!)
    
T.RTitleUserPersonal
Name
DateLines
2407.1RDCV03::RANDREWSI have a cunning planWed Mar 29 1989 04:2114
    Assuming that you have copied the actual sound file to ram, the
    only other thing that I could think of is that the system needs
    the .bmap files from the disk.  Try copying those to ram, and setting
    up the proper things that you need to get the program to look for
    them there. (Can't be more specific, I don't remember what directory
    they need to be in other than the current directory)
    
    Oh, I found something that may come in handy for you and a few other
    basic programmers out there.  It is a utility someone wrote that
    has a bunch of subroutines that come in handy. Using fonts, modifying
    screens, etc.  I've only just glanced through the doc's, so you'll
    have to check it out yourself. Give me a day or two to get it to
    somewhere you can get at it
    
2407.2I need the programGUCCI::HERBThu Mar 30 1989 01:105
    How do I set up the proper things for the program to look for the
    execute command in RAM.
    
    matt