T.R | Title | User | Personal Name | Date | Lines |
---|
1553.1 | Limitations of an Interpreter | ULTRA::KINDEL | Bill Kindel @ BXB1 | Thu Jul 21 1988 11:26 | 5 |
| It may be that BASIC is restricted to baud rates <= 19.2k because it
can't keep up at higher speeds. BASIC interpreters execute a whole lot
(think HUNDREDS) of machine instructions for each BASIC statement.
Compiled BASIC (or any other language) would reduce this by at least an
order of magnitude.
|
1553.2 | what!no DE RE AMIGA ? | MERIDN::ROSCETTI | A horse that knows arithmetic | Fri Jul 22 1988 10:23 | 48 |
|
Swag...
RE .0
A couple of possibilities...
1. instead of using COM1: use SER: - according to the sparse
documentation SER: doesn't allow you to specify Baud rate
so I assume it uses whatever is in preferences. Since SER:
is technically a Printer device you may have to set up for
a serial printer.
2. I don't have the documentation but is it possible to
Poke the baud rate into the Uart after the Open?
Uart is internal to the Paula chip.
Re .1
I wouldn't think that Basic's Speed would be a direct limiting factor
on Baud rate. - the par/ser conversion is strictly a function of the uart
Basic's speed will more likely affect throughput... ex can't send a stream
of 32nd notes at temp >120. On the recieve side you might expect something
on the order of data overruns. Does anyone know if the I/O is buffered
in memory?
Perhaps COM1: only supports up 19.2 because that is the upper limit
for "standard" term/modem type interfaces.
I'm just beginning to realize how little documention I have. The two
books that came with the 500 don't begin to tell me what I need to know.
brien
PS. .0
> Last night I built the last adapter from MIDI socket to MIDI socket and
> hooked it all up.
does this mean you built your own MIDI interface ?
|
1553.3 | I've basicall given up | ANT::JANZEN | Tom 296-5421 LMO2/O23 | Fri Jul 22 1988 10:34 | 8 |
| I just had to build the null modem cable and a midi plug to plug
cable in order to hook it all up.
This project was only for sysex dumps, which have not been well
supported in commercial software.
SER: was a disaster. I could try it again.
It's also possible to try to call library routines or use assembler,
in terms of my resources, but could be difficult.
TOm
|
1553.4 | what a mess | ANT::JANZEN | Tom 296-5421 LMO2/O23 | Sat Aug 13 1988 23:15 | 11 |
| Hi
I've been studying again. I've been reading serial.i c include
file about the serial.device, serial.device
and other things. I think I could
call the right system library routines to deal with midi from
BASIC, but it's getting too complicated.
I don't know c either, so it's hard to read sometimes.
Please let me know if you have used any libraries from Amiga BASIC.
Although I'm giving up again. is DRAW routine faster for drawing
lines than the BASIC linedrawing routine?
Tom
|
1553.5 | better late than never - sometimes | MERIDN::ROSCETTI | Some things u never get used to | Mon Nov 14 1988 23:39 | 20 |
|
Tom,
It's probably too late for what you wanted .. BUT...
FF disk 101 ( available on TAPE::user1:[amiga]) has a set of
Midi Library calls, useable from Basic, C, etc. The December
Issue of Electronic musician describes it and give a sample
program in BASIC , of a CZ101 patch librarian, xfer of SYSEX data
etc.
Now you can hack up anything you want...
brien
Ps - they also get around to reviewing SYNTHIA in this issue
|
1553.6 | How to set Midi Baud rate from AmigaBASIC | FORTY2::TATHAM | Nick Tatham @REO | Tue Feb 07 1989 03:21 | 39 |
|
A magazine published in the UK has just shown how to drive Midi from
AmigaBASIC. The Baud rate can be set up with a POKE. I've typed in the
explanation below - hope this helps.
Nick
From ST-Amiga Format Magazine, Issue 5 Nov-88
The Midi Baud Rate
The Amiga controls its Baud rate by having a divide-by-'N' circuit
between a clock generator and the device which provies the serial
encoding/decoding (which is done by the Amiga's 'Paula' custom chip). N is a
number written to a hardware register, enabling any Baud rate within reason
to be obtained with a fair degree of accuracy.
The Amiga's divide-by-N register is called 'SERPER', and is at address
$DFF032. Not all computer languages, including AmigaBASIC, will accept
six-digit hexadecimal numbers, so you need to use the decimal equivalent,
14676018.
Bits 0 to 14 of SERPER supply the number for the divide-by-N operation.
To be precise, the divisor is one more than the number written to this
register. Bit 15 of SERPER controls the byte length, which is either 8 or 9
bits. It would normally be 0, for eight bit operation.
With the aid of a calculator it is not too difficult to work out the
correct value to write to SERPER. Each clock cycle lasts 0.2794�s, and the
duration of each MIDI bit is 32�s. Dividing 32 by 0.2794 and deducting one
gives the correct divisor, which is 113.53. Values of 113 or 114 give a Baud
rate accurate to 0.5%, which is perfectly acceptable.
In the AmigaBASIC listings given elsewhere in the article the following
code is used to initialise the serial port for MIDI:
OPEN "com1:300,n,8,1" AS #1
POKEW 14676018&, 114
|