[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

1702.0. "Amiga System Programmer's Guide" by BAGELS::BRANNON (Dave Brannon) Mon Sep 19 1988 19:17

    I got a new book at the Computer fleamarket from the Comp-U-Save booth.
    It's called the "Amiga System Programmer's Guide" from Abacus, 
    A Data Becker Book.
    
    The intro praises the Amiga for having routines in the OS for doing
    just about anything you need to, without having to directly program
    the hardware.  Then it justifies bypassing the OS due to the slowness
    of those routines since large parts of OS are written in C, which 
    obviously isn't as compact, efficient, or as fast as programs developed
    completely in machine language.
    
    It concludes with "If you want to write fast and efficient programs,
    or if you just want to learn more about your Amiga, you have to
    work directly with the hardware".
    
    Yeah, right.  Lots of bad habits to be learned here, particularly
    on a multitasking operating system.  But as a technical reference,
    it's a lot more recent than the ROM kernal manuals and condenses
    down the info into one reasonable size book instead of the 4 RKM
    phone books.
    
    It documents a lot of the buried secrets in the Amiga, like how
    reset works, rom tags in ram, the capture vectors, etc.  Even tells
    how resident works.  The hardware portion has the id circuit needed
    for adding generic 3.5" disk drives.
                
    There is even code to do a nofastmem that survives reboots.  It lies
    to the OS during reboot so that the OS won't detect >512K/relocate
    itself to high memory (I haven't tried that yet).
    
    I haven't found any mention of the German designed A2000 keyboard
    incompatibility with some software (doesn't respond as fast as the
    A1000, A500, and new A2000 keyboard).
    
    -Dave
T.RTitleUserPersonal
Name
DateLines
1702.1Grrrrrrr!STC::HEFFELFINGERGive my body to science fiction.Tue Sep 20 1988 01:0819
    Re "getting down to the hardware"
    
    Makes you want to strangle these people, no?  My blood boils whenever
    I hear people advocate this sort of rulebreaking.  If I
    wanted to reboot every time I wanted to change programs I'd buy
    a C64.  I realise that it's possible for a programmer to take over the 
    machine and then return it when he is through, but most just grab
    the machine, and then force you to reboot to regain control.
    Unforgivable in a environment such as the Amiga's.  
    
    But what do you expect from a company who has made its name by by
    writing books which advocate the same sort of "squeeze the last drop of
    performance out of the machine by getting down to the hardware"
    mentality. 
    

    Off of the soap box....
    
    Gary
1702.2ISBN #AYOV10::ATHOMSONC'mon, git aff! /The Kelty ClippieTue Sep 20 1988 05:185
    Re: .0
    
    Dave, could you post the ISBN number for this book please ? 
    
    				Alan T.
1702.3OPUS::BUSCHTue Sep 20 1988 13:018
                                  -< ISBN # >-

<    Dave, could you post the ISBN number for this book please ? 

I've always wondered, what does "ISBN" stand for and when was it first 
introduced? Sorry to get off the subject.

Dave
1702.4further off the subject...JFRSON::OSBORNEBlade WalkerTue Sep 20 1988 13:3310
>I've always wondered, what does "ISBN" stand for and when was it first 
>introduced? Sorry to get off the subject.

International Standard Book Number
1969

Part of the ISBD ("International Standard Bibliographic Description")
it is a 10 digit book identifier assigned by some designated organization
within each country, with a country identifier prepended to it. Since each
ISBN is unique to a specific edition, an absolute identifier.
1702.5CHILI::BRANNONDave BrannonTue Sep 20 1988 15:2323
                     -< always wondered what an ISBN was >-
    
    Amiga System Programmer's Guide
    ISBN 1-55755-034-4
    
    Suggested retail price: $34.95
    Optional program diskette available: $14.95
    
    438 pages including the index
    
    It can be ordered directly from ABACUS,
    1-800-451-4319  (8am-8pm EST)
    Abacus Software Inc.
    5370 52nd St. S.E.
    Grand Rapids, MI 49508
    
    The ads in the back of it mention more Amiga books coming soon:
    Amiga Disk Drives Inside and Out
    AmigaBASIC 3-D Graphics
    Amiga 'C' for Beginners
    Advanced Amiga 'C'
    
    -dave
1702.6MC == TroubleWJG::GUINEAUJust a Window in TimeTue Sep 20 1988 16:228

Damn. This credit card has got to GO! It makes calling and ordering TOO easy!


Just ordered one. Thanks for the info Dave!

John
1702.7BAGELS::BRANNONDave BrannonWed Sep 21 1988 19:1116
    Prior to getting the System Programmer's Guide, I got ASSEMPRO
    (half price show sale, I read the review in Amigaworld) and the 
    ABACUS book Amiga Machine Language.
    
    Same bad "bypass the OS" stuff in the Machine Language book.  At
    least they are consistent.  But it also has more bugs in the listings.
    (instructions appended on to the end of the previous line, and in
    one case, made into a comment)
    
    ASSEMPRO's four windows update about as slow as AmigaBASIC's.  Seems
    to assemble the example programs fairly fast.  The books assume
    you use ASSEMPRO or SEKA, you have to modify the listings if you
    use any other assembler.
    
    -Dave
    
1702.8A round of applause...RAVEN1::EVERHARTFri Sep 23 1988 16:156
    	You've got to give the Amiga one big hand, though.  You aren't
    trapped from getting down to the hardware just in case you wanted
    to.  "Amy" gives us a good set of options.
    
     - Chris
    
1702.9WJG::GUINEAUNot enough moving partsTue Sep 27 1988 10:0724
Just recieved mine last night. Decent (typical) manual with disk.

I've read about 20 pages so far. To re-iterate on the base note, the first 
paragraph praises the OS for it's multitude of functions which provide
for almost anything you'ld ever want to do. The next paragraph says - But
lets be real, folks, you *need* to violate every rule of a multitasking
environment to get any decent performance. What a crock!

The rest of the chapter is dedicated to the hardware (68000, 8250s, custom
chips) gearing up for the big takeover.

Lots of good information though. I did see *several* typo errors, some of
which made me do a double take (maybe it was just late!).

I haven't even looked at the disk yet. They claim it has all examples
from the book. The package it comes in has a directory by chapter.
Looks like they included both source (mostly .ASM) and executable.

All in all, I think I will enjoy this one. It should make the RKM series
easier to digest as reference manuals as this book provides a condensed
overview...

John
1702.10BAGELS::BRANNONDave BrannonTue Sep 27 1988 11:3318
    re: 9
    
    I've been typing in some of the more interesting example programs.
    ASSEMPRO isn't as bad as I initially thought, it is nice to be
    able to expect the programs to run without doing any conversions.
    
    By going direct to the hardware, they have simplified the code needed
    for the example program and have made it easier to follow with the
    debugger.
    
    But I've found I do need to RKMs to explain some sections of the
    book, just as I need the book to explain some sections of the RKMs.
    The RKMs are written as "it should all work this way".
    The Guide is written as "we tried it, it works this way".  But then
    they leave out some of the details that the RKM has, possibly because
    they didn't try those parts.
    
    -Dave
1702.11Mixed feelings...BARDIC::RAVANTue Sep 27 1988 15:1727
>The next paragraph says - But lets be real, folks, you *need* to violate
>every rule of a multitasking environment to get any decent performance.
>What a crock!

    My feelings on this subject are mixed.  When I started programming on
    the Amiga, I began by following all the rules and using all the
    standard interfaces, in an attempt to be well behaved.  The performance
    of this well behaved program was terrible!  This program was trying
    to read a MIDI keyboard, timestamp the incoming messages, and place
    them in preallocated memory.  I used the timer and serial device
    interfaces.  Block chords would come out as rolled chords.  Sometimes
    events were just dropped if they came too quickly.  Totally unusable.

    So now I'm reading the hardware directly.  All the record/playback
    code is in hand-optimized assembler.  Performance is fine (so far,
    but I haven't pushed *too* hard).  I do use some OS calls that are
    supposed to reserve/release these devices for exclusive use, which
    I call before and after record/playback.  So I don't take over the
    machine, just the timer and serial devices when I'm using them. This
    is all just to make the point that there *are* valid reasons for
    going at the hardware directly.  But I only do it if the standard
    interfaces don't provide the performance I need.

    And in code that I write that does not have a real-time response
    requirement, I use the standard interfaces.

    -jim
1702.12Need a midi.deviceTLE::RMEYERSRandy MeyersTue Sep 27 1988 16:5024
Re: .11

You are right there.  If there has been anything universally acknowledged,
it is that the serial.device (the software device driver, not the hardware)
isn't sufficient to do midi.  The problem was the the serial device doesn't
provide midi timestamps, and for an application program to timestamp the
data when it receives the data results in very unreliable timing.

The correct solution would be for Commodore to provide a midi.device
(again a software driver--the hardware doesn't need to change) that
follows the usual Exec I/O programming model but includes a timestamp
with the data in the message.

At one time the Amiga had a rotten reputation in music circles due to
this problem.  A few of the developers wised up and either did what you
did (an acceptable solution) or wrote their own drivers.  The problem
went away.

It would be nice if Commodore wrote an official midi.device (it would
help all of the homebrew folks), but it looks like it is no longer
needed for the musical success of the machine.

By the way, although you went down to hardware, it sounds like you did
it in a compatible and safe way.  I'd let you play with my system software.
1702.13Hardware AssistDRUMS::FEHSKENSTue Sep 27 1988 18:186
    Another solution would be to write an interface to the Roland MPU-401,
    which would handle all the time stamping and some buffering chores
    for you.  This probably obviate "going to the hardware".
    
    len.
    
1702.14A ConfessionTLE::RMEYERSRandy MeyersTue Sep 27 1988 19:0926
Re: .13

Since this has turned in a sort of true confessions note about going to
the hardware, I must admit that the program I wrote to calibrate an
Amiga 2000's battery backed up clock does do direct reads from the
registers associated with the battery backup up clock and the line
frequency timer.  (The program is described in note 1721.)

However, since I only read those registers and never write into them,
this is safe to do under multitasking.

I had to read the memory locations associated with the battery backed
up clock because that clock generates no interrupts and there is no
system service to read it (unless you call spawning a process to run
the SETCLOCK OPT LOAD command a system service to read the clock).
Furthermore, I had to poll the that clock because it only presents
its time to the Amiga to the nearest second.  I had to spin on the clock
value waiting for it to change.

Of course, the program was heavily influenced by the need to be able
to detect a 0.0001% error in the measurement of a 10 second period
of time.  It was sort of fun that the resulting program could be
run on a system with other tasks running, and not interfere with
them at all except for a half second interval that occurred every
ten seconds during which throughput of other tasks in the system
greatly decreased.