[net.micro.amiga] Q: AmigaBasic access to Amiga features

cjp@vax135.UUCP (Charles Poirier) (02/01/86)

I have assorted questions on Microsoft AmigaBasic V1.1.

I remember hearing from some, possibly non-authoritative source, that
with the Amiga one could define a region to be displayed (I don't know
whether to call it a playfield, window, or what), that is bigger than the
screen-area.  And that you could scroll the on-screen region across the
bigger region very simply, as by changing a pointer to the on-screen
origin or some such.

I can't find how to do this in Microsoft AmigaBasic V1.1.  Can it in
fact be done in AmigaBasic?  Can it be done at all?  Is this covered in
some manual set other than what Joe Consumer gets (so far) with V1.1?

Can one coerce the mouse() command to switch its attention from port 1
to port 2 and back?  And: is there a way to read joystick (rather than
mouse) information through AmigaBasic?

Is there a way to have the sound() command use the Attack-Sustain-Decay-
Release envelope?  Is there a way to have one sound channel modulate
another channel, either amplitude or frequency modulation?

	Thanks for any help,
	Charles Poirier

wagner@utcs.uucp (Michael Wagner) (02/03/86)

In article <1277@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>I remember hearing from some, possibly non-authoritative source, that
>with the Amiga one could define a region to be displayed (I don't know
>whether to call it a playfield, window, or what), that is bigger than the
>screen-area.  And that you could scroll the on-screen region across the
>bigger region very simply, as by changing a pointer to the on-screen
>origin or some such.
>
>I can't find how to do this in Microsoft AmigaBasic V1.1.  Can it in
>fact be done in AmigaBasic?  Can it be done at all?  Is this covered in
>some manual set other than what Joe Consumer gets (so far) with V1.1?

There is a SCROLL command.  Page 8-135.  Implements vertical and
horizontal scroll.  Haven't had a chance to use it yet.  Don't know if
it's what you're looking for or not.  And I don't know if you can
open virtual windows larger than the screen (from BASIC...facilities
exist in the EXEC to do this).

>
>Can one coerce the mouse() command to switch its attention from port 1
>to port 2 and back?  And: is there a way to read joystick (rather than
>mouse) information through AmigaBasic?

The STICK and STRIG functions look like what you want for the second 
point.  Don't know about mousing on port 2.  Seem to recall reading
that mice had to be plugged into port 1 (restriction was OS, not BASIC).
(see pages 8-143-4 for STRIG and STICK) 

>
I answered to the net, since the questions seem of general interest.
Hope that was the right thing to do.

Michael

acs@amdahl.UUCP (Tony Sumrall) (02/03/86)

In article <1277@vax135.UUCP>, cjp@vax135.UUCP (Charles Poirier) asks for
some further info on AmigaBASIC (coercing mouse() to look at port 2,
etc.).  I also posted a request some time ago and have gotten no reponse
so...at the risk of repeating myself and invoking the wrath of the usenet
gods, I'm reposting my requests, to wit:


    [...]            I would like to be able to access all of the
"devices" that are supported by the OS.  I'm able to open RAW: as random
but for the life of I can't figure out how to "poll" the window.  What I
wanted to do was implement an AmigaBASIC program to take advantage of
RAW:'s escape-seqence generation and remove AmigaBASIC's massaging of my
keystrokes (can't determine that the ALT key was pressed in conjuncion with
another character, etc.).  Maybe I shouldn't be using RAW: but I think I
should be able to; maybe RAW: buffers its input but I should be able to
unbuffer it if I want; maybe the standard AmigaBASIC keyboard handler
is nice because I have one keycode to correspond to one key but what if
I want to extend my programs to utilize *all* keycodes.

If the facility already exists, lemme know; if I'm wrong, lemme know;
if...well I think you get the idea.
   [...]
I've finally begun delving into the depths(?) of AmigaBASIC and am finding
myself in a world of wonder (since I'm not a developer and haven't been
able to find a ROM kernel manual).  On the AmigaBASIC distribution diskette
I find a nice little program ConvertFD which converts ".fd" files to
".bmap".  After reading one of the appendices, searching out .bmaps and
typing them to my printer (opt h, of course) I find about 3 dozen routines
available to me in dos.library and graphics.library.  Now I *know* that
there are more libraries and routines in libraries than what are listed
in the 2 bmap files I have.  I have several questions:
  * is anyone gonna produce more .bmaps?
  * what are .fd files?
  * how can I get more .fd (or .bmap) files?
  * is anyone gonna document the parameters that should be passed to
    the routines?
I suppose that if I had access to a ROM manual I wouldn't be asking these
(silly) questions but, since I don't, I am.  The library demo program
on the AmigaBASIC disk is nice (it gave me quite a few clues) but it's
like giving a parched man a small sip of water--I wanna DO something with
this wonderful piece of work but can't.  Arrrrggggghhhhhh!!!!!

Help?!?
-- 
Tony Sumrall                       ...!{ihnp4,hplabs,amd,sun}!amdahl!acs

[ Opinions expressed herein are the author's and should not be construed
  to reflect the views of Amdahl Corp. or its employees. ]

bruceb@amiga.UUCP (Bruce Barrett) (02/04/86)

In article <2730@amdahl.UUCP> acs@amdahl.UUCP (Tony Sumrall) writes:
>....  I have several questions:
>  * is anyone going to produce more .bmaps?
	Not planed, that I know of.  Maybe .fd or .bmap files could be 
released with the next AmigaBASIC release if/when that occurs.
>  * what are .fd files?
	.fd files are Function descriptor files.  They describe the assembly
language calling conventions for the library routines.  They are in ASCII
(no funny characters).  A typical one (graphics) starts out:
------------------------start of fd file -------------
##base _GfxBase
##bias 30
##public
*------ Text routines
BltBitMap(srcBitMap,srcX,srcY,destBitMap,destX,destY,sizeX,sizeY,minterm,mask,tempA)(A0,D0/D1,A1,D2/D3/D4/D5/D6/D7/A2)
BltTemplate(source,srcX,srcMod,destRastPort,destX,destY,sizeX,sizeY)(A0,D0/D1/A1,D2/D3/D4/D5)
ClearEOL(rastPort)(A1)
ClearScreen(rastPort)(A1)
-------------------- "middle" of fd file ---------------
>  * how can I get more .fd (or .bmap) files?  It was our intention to
	document the .fd files in the V1.1 ROM kernel manual.  Unfortunately
	this "fell thought the cracks".  So what we've done is put them
	on the C and ASSEM development disks (V1.1).  So the quickest(?)
	way for you to get a copy is to find a developer who has just
	gotten an update.  You will still need the ROM Kernel manual
	in order to use any of these!!
>  * is anyone gonna document the parameters that should be passed to
>    the routines?
	Already in the V1.1 ROM Kernel manual.

All of the .fd files come to about 14.5k bytes.  If you/others get desperate
I guess I could mail them to you.  But you really NEED a ROM Kernel manual
to use them!

--Bruce Barrett, Commodore-Amiga, Inc.