home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1631 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.8 KB  |  69 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: news.shlink.de!wiloyee!chaos
  3. From: chaos@wiloyee.shnet.org
  4. Subject: Re: Amiga Memory Map Needed!!!
  5. X-Newsreader: TIN [version 1.2 PL2]
  6. Organization: Studentenhochhaus Wedel Deutschland
  7. Message-ID: <DLJMu5.3KE@wiloyee.shnet.org>
  8. References: <4dl0pe$1jr0@serra.unipi.it> <13213494@sourcery.han.de>
  9. Date: Sun, 21 Jan 1996 18:18:04 GMT
  10.  
  11.  
  12. instead of "kewl koder$" versus oslamic programmers here is some real help:
  13.  
  14.  
  15. amiga memory map that you can count on for all existing commodore amigas
  16.  
  17. $000000-$1fffff   Chip RAM
  18. $a00000-$bfffff   Hardware: CIA (parallel, serial, disk, timers, and  more)
  19. $dff000-$dfffff   Hardware: custom chips (graphic, sound, disk, ser, mouse 
  20.                   and more)
  21. $f80000-$ffffff   Kickstart ROM
  22.  
  23.  
  24. you can use this to orientate yourself, but you should NEVER rely on this.
  25. there is absolutely no way of telling were fast ram is, since there are a
  26. few dozen locations where it usually can be found, and there are even more
  27. strange configurations.
  28.  
  29. the only practical way of gettin RAM is to call the operating system. even
  30. if you plan to take completly over the maschine, you need to query the OS 
  31. for the memory location before you kick it out of your computer. so even if
  32. you are the worst hardware hacker, please check correctly for memory.
  33. it is not even safe to assume that chip ram starts at $000000, since there
  34. is pretty few space there if someone wants to build an Amiga with 16 MB of
  35. chipmem.
  36.  
  37. as you see, the memory map is totally useless, but it's good to know
  38. anyway. if you need advice about coding the hardware, try to get the
  39. "hardware reference manual" from commodore. it's all in there (except AGA), 
  40. including memory map.
  41.  
  42.  
  43. by the way, there was some guessing why $4 is the base adress of the OS. if
  44. we look a bit close to the memory map:
  45.  
  46. $000000           Reset Vector: Initial SP
  47. $000004           Reset Vecotr: Initial Pc
  48. $000008-$0003ff   Interrupt and exception vectors
  49. $000400-      rest of chip memory
  50.  
  51. $0 and $4 are only used for reset. in case of reset, a special hardware
  52. get's enabled that provides these vectors from ROM. therefore these RAM-
  53. vectors are totally useless, free memory. Commodore deceided to leave $0
  54. untouched and use $4 for the Exec-Base adress. 
  55.  
  56. $0 is a very important adress for buggy programs: if you make an error, you
  57. might get a pointer (or adress register) with 0. if you now use this
  58. NULL-Pointer, you will access $0. So it is good to have nothing important at
  59. this adress. if you want to check your programms for this error, simply put
  60. a easy to see constant in this adress, like $aaaaaaaa or $BADC0DE. if this
  61. number appears in one of your registers, get alarmed. if the value of adress
  62. $0 changes, even worse.
  63.  
  64. perhaps this is the reason, why commodore used $4 and not $0.
  65.  
  66.  
  67. dierk "chaos" ohlerich
  68.  
  69.