[comp.sys.atari.st] help porting software

scott@bbxsda.UUCP (Scott Amspoker) (02/21/91)

A friend of mine who owns an Atari ST has expressed an interest in some
midi software I wrote.  My software was written for a Yamaha C1 (286 PC,
MS-DOS) but the hardware/OS-specific routines are small, isolated, and
relatively unassuming.  Although it seems to me that porting my software
should be rather easy, I admittedly know *nothing* about the ST.  I 
basically need to do the following things (I'm not even sure if these
are all possible on the ST):

    Full buffered, interrupt driven midi-out
    Arrange for midi-in interrrupt to call my C routine
    Arrange for timer interrupt to call my C routine
    set the timer interval (hopefully to resolutions less than 1ms).
    simple screen output - put a charater at position x,y, set an attribute
    simple keyboard input - single character read with no wait

I've looked through some hardware manuals and I really didn't find what
I wanted to know.  If anyone out there can point me in the right direction 
I would appreciate it.  (If you happen to live in Albuquerque, call me on 
the phone).

Also, I noticed Turbo C mentioned in a couple posts in this newsgroup.
I wasn't aware that Borland offered Turbo C on the Atari ST.  Is this
true?  If it offers much of the same support library as it does on DOS
that would help quite a bit.

-- 
Scott Amspoker                       | Touch the peripheral convex of every
Basis International, Albuquerque, NM | kind, then various kinds of blaming
(505) 345-5232                       | sound can be sent forth.
unmvax.cs.unm.edu!bbx!bbxsda!scott   |    - Instructions for a little box that
                                     |      blurts out obscenities.

rosenqui@crc.skl.dnd.ca (Eric Rosenquist) (02/21/91)

In article <1732@bbxsda.UUCP> scott@bbxsda.UUCP (Scott Amspoker) writes:
>....  I 
>basically need to do the following things (I'm not even sure if these
>are all possible on the ST):
>
>    Full buffered, interrupt driven midi-out

Midi In is interrupt driven and buffered, midi-out is not.  There are
BIOS calls for read/write in/out status.  I guess they didn't make
output buffered since it would make precise timing somewhat difficult.
If you're capable in assembler it should not be all that difficult to
write your own.

>    Arrange for midi-in interrrupt to call my C routine

That's fairly easy, there's a system call which lets you change the
'midivec' and have your routine called automatically.

>    Arrange for timer interrupt to call my C routine
>    set the timer interval (hopefully to resolutions less than 1ms).

No problem also, there are some unused timers in the system, you just
have to figure out which one you're going to use.  If all you want
though is time stamps, the system has a 200Hz timer and a counter in
low memory that you can read yourself.

>    simple screen output - put a charater at position x,y, set an attribute

The BIOS has support for a superset of the VT52 escape sequences.
Nothing fancy, but adequate for character-based applications.

>    simple keyboard input - single character read with no wait

You've got 2 choices - BIOS level and GEMDOS level.  At the GEMDOS
level you're actually reading from stdin, so it could be redirected.
The BIOS level can't be redirected.

>Also, I noticed Turbo C mentioned in a couple posts in this newsgroup.
>I wasn't aware that Borland offered Turbo C on the Atari ST.  Is this
>true?  If it offers much of the same support library as it does on DOS
>that would help quite a bit.

Borland in Germany sells an excellent TC package.  Gribnif is
importing it and selling it here in North America.  For somewhere
around ?$250-$300? you can get the full package: Turbo C (ANSI), the
Assembler, and the Debugger.  It has a very nice GEM-based
multi-window development environment.  All of the documentation and
on-line help is in German, but the menus, compiler errors, etc. is all
in English.  If you know what you're doing in C / GEM you can get by.
You'll probably want to get some other set of English docs for the TOS
info such as the Atari Developer's kit or some 3rd party books.

The debugger only works in mono (it *does* work on large-screen mono
monitors though) but it is wonderful.  Also included is a BGI library
(Borland Graphics Interface) that appears to be identical to its DOS
counterpart.

I don't have a phone number for Gribnif... if you're interested your
ST friend can probably find it for you.

Eric