[comp.sys.amiga.tech] cia-b

bbs00049@uafcseg.uucp (Red Roger) (08/30/90)

Hi i've seen some code that uses the ciab serial port set register. 
what is the real address of this register ??
bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says 
bfd000 yet this code works with it at bfd0fe 


any idea's 

regards red.

d6b@psuecl.bitnet (08/31/90)

In article <5172@uafhp.uark.edu>, bbs00049@uafcseg.uucp (Red Roger) writes:
> Hi i've seen some code that uses the ciab serial port set register.
> what is the real address of this register ??
> bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says
> bfd000 yet this code works with it at bfd0fe
>
>
> any idea's
>
> regards red.

The addresses given in the hardware manual are correct and *MUST* be
strictly adhered to! Any code that does not use these addresses is
buggy and in need of repair. It's true that on most Amigas a variety of
addresses will work, but for compatability the specified addresses
*MUST* be used!!! This is not just B.S. It really is important.

(Note that I didn't pay any attention to the actual addresses mentioned
in the posting. I'm assuming that the statements in the quoted article
about them are correct).

-- Dan Babcock

edp367s@monu6.cc.monash.edu.au (Rik Harris) (08/31/90)

bbs00049@uafcseg.uucp (Red Roger) writes:


>Hi i've seen some code that uses the ciab serial port set register. 
>what is the real address of this register ??
>bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says 
>bfd000 yet this code works with it at bfd0fe 

From the hardware point of view, it's quite possible that it works with
any even address from $bfd000 to $bfd0fe (including $bfd002, $bfd004, etc).
This could also be true for the other hardware registers in the $bf[de]xxx
range.

Some computer designers just decode the top address lines, and ignore the 
lower lines that specify an individual address.

Since the 68000 has a 16-bit address bus, it may be only mapped to even
addresses.  (the 68000 has no A1 pin, but instead has UDS and LDS or 
upper and lower data strobe, for odd and even chipbanks).

Anyone else have some firm evidence?

rik.
-------------------------------------------------------------------------------
Rik Harris - Faculty of Computing and Information Technology,
             Monash University, Caulfield Campus (was Chisholm Institute)
edp367s@monu6.cc.monash.edu.au     <-- what the computer says it is
edp367s@monu6.cc.monash.oz[.au]    <-- SEEMS to work more reliably
Build a system that even a fool can use, and only a fool will want to use it.
-------------------------------------------------------------------------------

daveh@cbmvax.commodore.com (Dave Haynie) (09/06/90)

In article <1990Aug31.000652.27385@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:
>bbs00049@uafcseg.uucp (Red Roger) writes:

>>Hi i've seen some code that uses the ciab serial port set register. 
>>what is the real address of this register ??
>>bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says 
>>bfd000 yet this code works with it at bfd0fe 

>From the hardware point of view, it's quite possible that it works with
>any even address from $bfd000 to $bfd0fe (including $bfd002, $bfd004, etc).
>This could also be true for the other hardware registers in the $bf[de]xxx
>range.

However, you must always use the documented addresses for a register, if you
MUST directly use the register in the first place.  The register may appear
all over the place on an A1000, but only be in the specified location on an
A3000, for example.  There's no advantage to using the replicated image
addresses, unless you specifically want the program to fail on some systems.
If you use the documented addresses, they'll work as long as those particular
registers exist in a system.  Anything that can be done at the device rather
than register level should work forever, even if a future system replaces
those registers with something better and different.

>Rik Harris - Faculty of Computing and Information Technology,
 

-- 
Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"
   {uunet|pyramid|rutgers}!cbmvax!daveh      PLINK: hazy     BIX: hazy
      Get that coffee outta my face, put a Margarita in its place!

edp367s@monu6.cc.monash.edu.au (Rik Harris) (09/07/90)

daveh@cbmvax.commodore.com (Dave Haynie) writes:

>In article <1990Aug31.000652.27385@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:
>>bbs00049@uafcseg.uucp (Red Roger) writes:

>>>Hi i've seen some code that uses the ciab serial port set register. 
>>>what is the real address of this register ??
>>>bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says 
>>>bfd000 yet this code works with it at bfd0fe 

>>From the hardware point of view, it's quite possible that it works with
>>any even address from $bfd000 to $bfd0fe (including $bfd002, $bfd004, etc).
>>This could also be true for the other hardware registers in the $bf[de]xxx
>>range.

>However, you must always use the documented addresses for a register, if you
>MUST directly use the register in the first place.  The register may appear
>all over the place on an A1000, but only be in the specified location on an
>A3000, for example.  There's no advantage to using the replicated image
>addresses, unless you specifically want the program to fail on some systems.
>If you use the documented addresses, they'll work as long as those particular
>registers exist in a system.  Anything that can be done at the device rather
>than register level should work forever, even if a future system replaces
>those registers with something better and different.

Yes, I didn't really make that very clear.  I have had any number of problems
with programs that were designed by sloppy programmers that are happy to
jump to whatever o/s call they feel like, and use whatever hardware register
works.

It is _guaranteed_ to make this software break on future models of the same
machine.  People whinge that Commodore, or Atari, or whoever has made their
machine incompatible, when it is generally the software producers who can't
be bothered making their software use the documented addresses and routines.

If I didn't make it clear the first time, I hope this helps.

>Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"

-------------------------------------------------------------------------------
Rik Harris - Faculty of Computing and Information Technology,
       Monash University, Caulfield Campus (was Chisholm Institute), Australia
edp367s@monu6.cc.monash.edu.au     <-- what the computer says it is
edp367s@monu6.cc.monash.oz[.au]    <-- SEEMS to work more reliably
Build a system that even a fool can use, and only a fool will want to use it.
-------------------------------------------------------------------------------
-- 
-------------------------------------------------------------------------------
Rik Harris - Faculty of Computing and Information Technology,
       Monash University, Caulfield Campus (was Chisholm Institute), Australia
edp367s@monu6.cc.monash.edu.au     <-- what the computer says it is

d6b@psuecl.bitnet (09/08/90)

In article <14242@cbmvax.commodore.com>, daveh@cbmvax.commodore.com (Dave Haynie) writes:
> In article <1990Aug31.000652.27385@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:
>>bbs00049@uafcseg.uucp (Red Roger) writes:
>
>>>Hi i've seen some code that uses the ciab serial port set register.
>>>what is the real address of this register ??
>>>bfd000 or bfd0fe - the reason i ask is that in the RKM h/w manual it says
>>>bfd000 yet this code works with it at bfd0fe

>[stuff deleted]

> However, you must always use the documented addresses for a register, if you
> MUST directly use the register in the first place.  The register may appear
> all over the place on an A1000, but only be in the specified location on an
> A3000, for example.  There's no advantage to using the replicated image
> addresses, unless you specifically want the program to fail on some systems.
> If you use the documented addresses, they'll work as long as those particular
> registers exist in a system.  Anything that can be done at the device rather
> than register level should work forever, even if a future system replaces
> those registers with something better and different.

Well stated. Now fix the serial.device so it doesn't use that non-standard
address ($BFD0FE). I think "practice what you preach" applies here. :-)
(no offense intended - I know you didn't write it)

-- Dan Babcock

limonce@pilot.njin.net (Tom Limoncelli) (09/11/90)

In article <1990Sep7.090650.2931@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:

> It is _guaranteed_ to make this software break on future models of the same
> machine.  People whine that Commodore, or Atari, or whoever has made their
> machine incompatible, when it is generally the software producers who can't
> be bothered making their software use the documented addresses and routines.

What can a company do to prevent this?  Do any other computer
companies enforce their rules?  How?  It would be great if you could
run a program, insert a disk, and have a thumbs-up or thumbs-down icon
appear depending on if the program is judged "well behaved" or not.
This, of course, is impossible.

Maybe the tools that are provided (most require an MMU, but not all)
should become more accessible to the common people [Fish Disk?]?  I
don't know if C-A would do it; but I would think it would be a good
idea.

-Tom
P.S.  I know that certain software houses would HATE this idea.
Imagine their customer support lines being tied up with "Hey, I ran
MemMunge while running your program and I found the following bugs..."
-- 
Tom Limoncelli
List addresses in a .sig?  Yeck.  If "reply" doesn't work my other
addresses won't work either.  Aww heck.  Try: limonce@pilot.njin.net

limonce@pilot.njin.net (Tom Limoncelli) (09/11/90)

In article <1990Sep7.090650.2931@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.ae (Rik Harris) writes:

> It is _guaranteed_ to make this software break on future models of the same
> machine.  People whine that Commodore, or Atari, or whoever has made their
> machine incompatible, when it is generally the software producers who can't
> be bothered making their software use the documented addresses and routines.

What can a company do to prevent this?  Do any other computer
companies enforce their rules?  How?  It would be great if you could
run a program, insert a disk, and have a thumbs-up or thumbs-down icon
appear depending on if the program is judged "well behaved" or not.
This, of course, is impossible.

Maybe the tools that are provided (most require an MMU, but not all)
should become more accessible to the common people [Fish Disk?]?  I
don't know if C-A would do it; but I would think it would be a good
idea.

-Tom
P.S.  I know that certain software houses would HATE this idea.
Imagine their customer support lines being tied up with "Hey, I ran
MemMunge while running your program and I found the following bugs..."
-- 
Tom Limoncelli
List addresses in a .sig?  Yeck.  If "reply" doesn't work my other
addresses won't work either.  Aww heck.  Try: limonce@pilot.njin.net