CompuServe Thread

#Basic Amiga Pgm/Hwr?

28 messages in this thread
#26332From: Jack CalawayJul 30, 1992 9:50 PM
G'day: I'm am primarily an IBM-PC programmer (hope I don't have to duck!). I'm considering doing a program for the Amiga (that seems to be missing), and would like to ask a couple of vary basic questions about the A-2000 (or similar). 1) Does the Amiga support the same parallel printer port as an IBM, including being able to read as well as write to the port? 2) If it does use the same IBM port, does it support interrupts from the port? Can I steal the interrupt vector for my own purposes? 3) Can the system have more than one printer port? Will each have it's own interrupt vector? 4) Any problem operating an RS-232 port at 38.4KB? 5) What is the best 'C' compiler for the Amiga? Any other "must have" software/hardware tools to get started? 6) Is there a good book on the Amiga's hardware? Especially with an eye to programing. Thanks in advance Jack
#26344From: Brian BartlettJul 31, 1992 4:43 AM
Jack, <looking in horror>, you need a serious readjustment with respect to the Amiga. One does not "steal" an interrupt, unless you like a crash. Instead, you politely ask the system for the par: or prt: resource. This is a multi-tasking machine and you _MUST_ always ask for a resource and test to see if you get it. As for the particular configuration of the parallel printer port, my laser printer cant seem to tell the difference, nor can MAPLE. I think that's compatible enough. If the system does have more than one printer port, you will not find it under any consistent name. PRT: will probably, not necessarily, be assigned to the first printer port. It's best to ask the user, via a configuration screen, about how many, and what names, his printer ports are using. Again, the principle is to ask, not grab. As for the serial port, an un-accelerated Amiga 500 or 2000 will probably have problems at 38.4 Kbaud. Come to think of, so will a clone, even at double the clock speed of the Amiga. 19.2 KBaud is the best speed one can expect without running a test on a system. That's assuming AmigaDOS 2.0, I think. I haven't tested this extensively since I refuse to use an unaccelerated machine <grin>. Question 5 is a can of worms. The "best" depends on how much you wish to spend and what you are trying to do. If your used to paying Borland prices, than SAS C is definitely a full enough package to keep you going. If you want to get out cheap, but don't mind setting up your own environment, then Matt Dillon's DICE (Dillon Integrated C Environment, shareware) package should do the trick. You will also want to pick up the standard reference books for the Amiga. All of the following from Addison-Wesley and indispensible: Amiga ROM Kernal Manual-Devices, Amiga ROM Kernal Manual- Includes and Autodocs, Amiga ROM Kernal Manual-Libraries, Amiga Hardware Reference Manual, and Amiga User Interface Style Guide. The Libraries manual is essential if you want to save coding time. [ MORE ]
#26345From: Brian BartlettJul 31, 1992 4:43 AM
[ continuation ] Judging from the articles I read in Dr. Dobbs and Byte, the GUI coding is much simpler and well documented in comparison to windows, but that's just my opinion. The hardware manual will tell you more than you ever wanted to know about programming and understanding how the coprocessors work inside the Amiga. Good luck and take care. Brian Bartlett
#26347From: Jack CalawayJul 31, 1992 8:33 AM
Brian: Sorry if I offended you by suggesting I would "steal" a resource, no such offense was intended. My goal is to use the hardware, but it won't be connected to a printer, or anything that would be considered a shared resource. I'm not sure from your answer about the printer port, if I can read data back from it (not counting the status bits). About the 38.4, is the speed limit you have observed do to dealing with the port via the operating system? I'm looking for a 'C' compiler capable of producing a commercial product, and willing to pay a reasonable price for it. Thanks for the suggested reading. I'll see about picking up the manuals today. Jack
#26357From: Steven D. KapplinJul 31, 1992 5:14 PM
Jack, The C compiler you would want is Lattice C for the Amiga.
#26365From: Brian BartlettJul 31, 1992 6:06 PM
Steven, it's SAS C now 🙂 Brian Bartlett
#26392From: Steven D. KapplinAug 1, 1992 3:36 PM
Oops. Sorry about that. I should know better.
#26371From: Jack CalawayJul 31, 1992 9:35 PM
Will take a look at the Lattice compiler. Long ago used their PC version. Jack
#26393From: Steven D. KapplinAug 1, 1992 3:37 PM
Jack, I was reminded that it isn't Lattice anymore, but SAS C. Sorry about that. SAS bought out Lattice C for the Amiga.
#26395From: Jack CalawayAug 1, 1992 3:43 PM
Steven: I just picked up that information from another message. Thanks again Jack
#26402From: Don Curtis/SYSOPAug 2, 1992 1:34 AM
Steve, SAS didn't buy out Lattice C for the Amiga. SAS bought Lattice in the mid 80's. What SAS did was take over all responsibility for the product and put it under SAS's name rather than Lattice's name. Don
#26358From: Vic WagnerJul 31, 1992 5:39 PM
Jack, The parallel port _IS_ bi-directional, and DOES have an interrupt. Whether something is likely to be shared or not is independent of whether one asks the system for access. OTHER programs may _look_ to the system to see if a printer is available, and if you haven't properly allocated things would fail.
#26372From: Jack CalawayJul 31, 1992 9:35 PM
Vic: I will not be using a printer on the port. From a previous answer, it looks like I could add a second port for my exclusive use. Re: the disk. If it can read a DOS disc, then I would guess I can do what I need to do (but the disk I'm interested in is not a DOS disk). Will think about this a little further, then probably have to break down and get a machine to see if I can do what I need to do. Thanks Jack
#26379From: Vic WagnerAug 1, 1992 1:45 AM
Hmmm, I guess I didn't make myself real clear. You _will_ be able to read the disk provided the density is not substantially higher than a normal Amiga floppy (or half that density), but the Amiga currently doesn't have as standard HD floppy drives. And when I say you will be able to read them, I mean you will be able to get the 'transition' information into memory, whether you can decode it or not is something else. There IS no data decoder or data seperator on the Amiga, it's ALL done with software. If you're going to try to read a Mac disk, e.g., you're gonna have some REAL problems.
#26383From: Jack CalawayAug 1, 1992 7:25 AM
Vic: You were very clear, as long as it's possible to read a IBM-PC 720 floppy, I should be able to read the disk I'm interested in. While it's not a PC disk, the recording characteristics are the same. Thanks Jack
#26364From: Brian BartlettJul 31, 1992 6:05 PM
Jack, and I must apologize for jumping to a conclusion. That said, I'll try to answer some of your questions. The interface hardware for the parallel port is described in detail in Appendix E and F of the Hardware manual. The parallel post is bi-directional, so that should meet your goal. In this case, it goes through one of the 8520 chips and should be fairly easy to program. Matt Dillon developed a network that uses the parallel port. As for the 38.4 speed limit, that is apparently OS specific and chip specific. I am aware of add-on serial boards that exceed the max transfer rate specified in Preferences (31.25 KBaud), so if you want 38.4KBaud, you'll have to add a card. No suprise there, actually, even a clone has to have a 16551 (as I recall the chip number). SAS C is what you want for your C compiler since you are going commercial. If nothing else, you'll be able to get a lot of support from the programmers here in the forum. Take care and good luck. Brian Bartlett
#26373From: Jack CalawayJul 31, 1992 9:35 PM
Thanks for the added info. Jack
#26367From: Brian BartlettJul 31, 1992 6:06 PM
Jack, I just caught this in AmigaUser. Gary S. Cooper (72557,1655) has a copy of SAS/C complete with master disks and letter of transfer for $100. Just thought you should know, in case you don't monitor the classifieds section. Brian Bartlett
#26370From: Jack CalawayJul 31, 1992 9:34 PM
Thanks for the suggestion. Jack
#26376From: Denny Atkin [COMPUTE/AmiJul 31, 1992 11:02 PM
Jack, The parallel port is R/W. Someone has actually done a parallel port network for the Amiga. You can grab the port hardware, but you're not supposed to. You should be able to get the proper speed without doing that. If not, it's doable, but you should allocate the port anyway so nobody else thinks it can have it. The de-facto C compiler for the Amiga is SAS/C. It's what Commodore uses.
#26382From: Jack CalawayAug 1, 1992 7:25 AM
Thanks, that what I needed to be sure of about the port. Jack
#26384From: John Toebes/SYSOPAug 1, 1992 9:17 AM
Let's see, If I were to look through your questions, I might guess that you are looking at doing some sort of a networking or file transfer product (like File Shuttle or the like). If this is the case, there are lots of other things that you will want to look at. The move from Msdos to Amiga is a big jump. In many respects, the Amiga OS is a true operating system which manages resources. How you utilize these resources is up to you, but you must always first request the resources. On the compiler side, you have really only two choices now a days – DICE and SAS. Manx really hasn't been a force in the marketplace for some time. DICE is a freeware/shareware compiler that Matt Dillon has put out and has gotten a lot of attention. SAS/C is the commercial compiler from SAS (formally the Lattice C compiler). Both are quite acceptable for development of commercial programs and your choice can be based on features that you want out of one verses the other. In particular, for a beginning Amiga programmer, DICE helps hide the issues of having to open libraries for you. As you get into programming the Amiga, don't be afraid to ask other questions. Most of them have already been answered here online.
#26394From: Jack CalawayAug 1, 1992 3:39 PM
John: Thanks for your information, especially about the compilers (thought there were two different ones). The product isn't one you mentioned, it a niche which seem's to be missing, or poorly covered in the Amiga line up. I've been looking through a couple of the Amiga orientated magazines, and haven't seen much in accessory cards, such as serial and parallel ports. Any suggestions on where to look for this sort of add-on? Thanks Jack
#26398From: Homer MooreAug 1, 1992 11:02 PM
Jack: If you want information on Amiga products (both Hard- & Software), you should get a copy of _AC's Guide (to the Commodore) Amiga_ published by Amazing Computing. Some ommissions and vapor slip through the cracks, but it is the closest thing there is to a complete product listing. It is published 3 times a year, with the current issue being Summer '92. -Homer Flying on Auto
#26407From: Jack CalawayAug 2, 1992 7:53 AM
Thanks, will see if I can find a copy. Jack
#26408From: John Toebes/SYSOPAug 2, 1992 8:46 AM
Actually in the past, the two compilers used to be Manx and Lattice. Lattice has given way to become SAS/C and Manx no longer appears to be a major market force. In the meantime Matt Dillon (the ever present prolific programmer) developed DICE which has become quite popular in Europe. For expansion ports and the like, the reality is that there are not a lot available to the general public as you would find if you were comparing to the PC. Fortunately you are not limited as the PC is to the two interrupts for four ports (having spent significant time an effort attempting to make a mouse, Modem, and Fax machine all work on my one PC). Any cards that you will get on the Amiga will be much more flexible and easier to interface to. A couple of the Amiga Magazine annual/quarterly guides to products would be the best place to start. One suggestion: If your product will depend upon the availablility of a particular piece of hardware, MAKE A DEAL with one or more manufacturers of that hardware to ensure you have ready access to that product. You should also seriously consider bundling of the products. I wish you much luck on your project. You can certainly count on being able to ask questions here.
#26411From: Jack CalawayAug 2, 1992 12:45 PM
John: Thanks for the added advise. Time to get a machine and do some basic testing. Jack
#26498From: Brian CowanAug 5, 1992 10:25 PM
One other minor detail that I seem to have gleaned — and growled over when I had to go play "patch the program" to get dialers to use my (now removed) internal modem — Never assume ANYTHING! Now that parallel/serial port cards are becoming available, we'll need the ability to specify what printer port to send a printout to, and programs that hard-code this will be a real monster to work with. Brian – via Whap!