
                  SCRAMmer V37.2 - June,7th 1992
                  ------------------------------

              Copyright (c) by Giuliano C. Peritore
                       All Rights Reserved

                            Written by:
                       Giuliano C. Peritore
                          Via Amaseno, 6
                           04100 Latina
                              ITALY

                      Phone: (+39)773 491692

                     E-Mail: mc6040@mclink.it

ATTENTION!
----------
1) Turning on Page Detect mode on non SCRAM chips will  probably
   break down the system.  You have to reboot.  You are advised.
2) Turning off Write Allocate will cause trouble.  You  have  to
   reboot.  You are advised.
3) Causing a Timeout  when  Timeouts  are disabled will hang the
   system.  You have to reboot.  You are advised.
4) Avoid playing with Refresh  Rate  gadgets.  It will cause you
   a lot of trouble.  You are advised.
5) BERR timeout will be set when SCRAMmer is invoked if DSACK is
   not requested.
6) Avoid disk activity while using SCRAMmer until you are pretty
   much experienced.
7) The modification of system parameters allowed by SCRAMmer  is
   not  well  accepted  from Commodore, because some A3000s have
   problems with the Ramsey chip.  I made this program  to  have
   an utility which allows to read and modify this parameters in
   order to play with them and  find  if  I  can  set on special
   modes and get a speed gain.  Since I had no  problems with my
   A3000 I think that this is a good idea.  So if  you  want you
   can try to get a speed improvement, but  you  are on your own
   risk.  And remember: if Commodore says "Don't do it" there is
   a valid reason.  You are advised.


DISCLAIMER
----------
   The author  has no  responsibilities for incidents or damages
that may result  from the  correct  or  incorrect  use  of  this
program.  You are on your own risk.


NOTES
-----
   Owing to the particular functions of this  program  an A3000,
with its 68030 CPU and custom chips is strictly required.  SCRAM
chips are recommended but not needed.  Remember that the manipu-
lation of special system parameters should be done  through  the
OS.  I've done it when possible.  This application  should  also
have a very well behavior under 2.04 (required) since  I  had no
problems with it and I coded it very carefully.
   The application opens on the Workbench screen or on a default
Public Screen if it Hijacks Workbench.  The  default  monospaced
shell font will be used, falling on topaz 8 if it is too big.
   Owing to the high number of gadgets the  application requires
at least a 640x256 screen  to work properly but don't be  afraid
to try it on a smaller screen or via the Shell.


IMPORTANT
---------
   This program is in the Public Domain so it may be distributed
freely as long as this archive remains intact,  the  program  is
not modified, and that no profit is gained from its distribution
without written permission of the author.  If the reports of the
program are used anywhere please tell  that  they  are  SCRAMmer
reports and state the version.  Software  and Hardware companies
may include this program on their disks.
   Donations (software, hardware, money, ecc.) are very welcomed
togheter with comments, suggestions, bugs, infos and so on.


INTRODUCTION
------------
   The idea of writing SCRAMmer prompted suddendly while  I  was
following  a  debate on A3000 ram chips on MC-Link.  I  want  to
thank  Paolo Baliano, Stefano Iacus, Massimiliano Marras,   Bal-
dassarre Profeta and Andrea Suatoni for allowing this debate.
   Since there are a lot of tricks to  get more performance from
an Amiga and that there are  a  lot  of  tools to do  this (VBR,
SetRamsey, Cpu, SetCPU, etc. )  I  decided  to  write  a  unique 
testing  and  setting tool to allow  users to set crucial system
parameters and test their Ram to see improvements.
SCRAMmer is also a powerful tool to know much  more  about  your
wonderful Amiga 3000.
   This program  is completely fruit of my mind since I get only
ideas from other programs, but I recoded EVERYTHING from scratch
adding many and many new features togheter with 2.04 support and
a consistent and font-sensitive user interface.


USING SCRAMMER
--------------

Note:
-----
   This program digs deeply into your system and  it  is easy to
misunderstand its functions.  There's a lot to talk about.
Please read instructions carefully.


Running SCRAMmer V37.2 from the Shell:
--------------------------------------
   SCRAMmer has a lot of arguments.  Type SCRAMmer ? to see  its
syntax, reported here for completeness:

SHOW/S,DATACACHE/S,NODATACACHE/S,DATABURST/S,NODATABURST/S,
DATAFREEZE/S,NODATAFREEZE/S,INSTCACHE/S,NOINSTCACHE/S,
INSTBURST/S,NOINSTBURST/S,INSTFREEZE/S,NOINSTFREEZE/S,
WRITEALLOCATE/S,NOWRITEALLOCATE/S,COPYBACK/S,NOCOPYBACK/S,
PAGEDETECT/S,NOPAGEDETECT/S,BURST/S,NOBURST/S,WRAP/S,NOWRAP/S,
REFRESH/K/N,NOREFRESH/S,VBRFAST/S,VBRCHIP/S,TIMEOUT/S,
NOTIMEOUT/S,BERRTIMEOUT/S,DSACKTIMEOUT/S,BANK/K/N,SCRAMTEST/S,
FASTTEST/S,CHIPTEST/S,DOTIMEOUT/S,GUI/S,PRINT/S,ABOUT/S

Here's a description:

SHOW            - Show a report of all system parameters
DATACACHE       - Enable Data Cache
NODATACACHE     - Disable Data Cache
DATABURST       - Enable Data Burst
NODATABURST     - Disable Data Burst
DATAFREEZE      - Freeze Data Cache
NODATAFREEZE    - Free Data Cache
INSTCACHE       - Enable Instruction Cache
NOINSTCACHE     - Disable Instruction Cache
INSTBURST       - Enable Instruction Burst
NOINSTBURST     - Disable Instruction Burst
INSTFREEZE      - Freeze Instruction Cache
NOINSTFREEZE    - Free Instruction Cache
WRITEALLOCATE   - Enable Write Allocate
NOWRITEALLOCATE - Disable Write Allocate
COPYBACK        - Enable copyback
NOCOPYBACK      - Disable copyback
PAGEDETECT      - Enable Page Detect Mode
NOPAGEDETECT    - Disable Page Detect Mode
BURST           - Enable Burst Mode
NOBURST         - Disable Burst Mode
WRAP            - Enable Wrap Mode
NOWRAP          - Disable Wrap Mode
REFRESH n       - Enable refresh (0-154,1-238,2-380,3-Off)
NOREFRESH       - Disable RAM refresh
VBRFAST         - Move VBR to FAST memory
VBRCHIP         - Move VBR to CHIP memory
TIMEOUT         - Enable bus Timeout
NOTIMEOUT       - Disable bus Timeout
BERRTIMEOUT     - Set BERR timeout
DSACKTIMEOUT    - Set DSACK timeout
BANK n          - Select RAM bank for tests (0-1-2-3)
SCRAMTEST       - Test if bank is SCRAM
FASTTEST        - Test FAST memory (current bank)
CHIPTEST        - Test CHIP memory
DOTIMEOUT       - Cause a bus timeout
GUI             - Use Graphical User Interface
PRINT           - Print report on printer
ABOUT           - Show info about the program

That's all.  See below for function-by-function explanation.


Running SCRAMmer V37.2 from the Workbench:
------------------------------------------
   Just click on SCRAMmer icon.  This will show up the GUI.
   Click on gadgets, press right mouse button or the  Help  key,
or click on closewindow to exit.
   May be there are problems with 640x200 screens.  Try a bigger
screen !

Understanding SCRAMmer
----------------------
   SCRAMmer allows you to show up a lot of system parameters and
to modify them.  It is very easy to play using the GUI or  using
the Shell interface.  But it is very important that  you  under-
stand what you are doing.  SCRAMmer is logically divided in some
regions,  each  regarding a specific class of parameters.  Let's
describe them all.


CPU & FPU
---------
   The CPU (Central  Processing  Unit) and  FPU (Floating  Point
Unit) are the core of your computer, so it is important to  know
that your system recognized what CPU and FPU are installed.
SCRAMmer show this.  There  are  a  lot of adjustable parameters
regarding the CPU.  They are data and  instruction caches, which
speed  up  the  software  reducing  memory  accesses, the  Write
Allocation and the Copyback mode (provided also on the 68040).
For more info about these  parameters  please  consult  Motorola
manuals.
   For the maximum  speed  you  should  enable  caches,  bursts,
copyback and (I suppose) disable Write Allocate.
   Remember anyway that Write Allocate causes a lot of  problems
on standard A3000 when disabled, that Copyback may cause trouble
to bad written programs, togheter with caches.  You are advised.


RAMSEY
------
   The Ramsey chip is the  memory  controller of the A3000.  The
program  will  show  which  type  of Ramsey is installed in your
computer and its settings.  You can enable or disable  the  Page
Detect Mode, which is a special mode that takes  advantage  from
the presence of SCRAMS  boosting  system  performance.  You  can
enable or disable the Burst Mode, which  allows  the CPU to fill
its cache very efficiently, or you can  enable  or  disable  the
Wrap mode, which depending  on  the  application  will  optimize
burst transfers.
   SCRAMmer will show also  which  memory Chips are used in your
Amiga.  You  could  also  change  the  refresh  rate,  but it is
discouraged.


GARY
----
   The Gary chip is the bus controller of  the  A3000.  SCRAMmer
will show which  Gary  is  installed  in  your  system  and  its
settings.  It shows  if  there  have  been  timeouts  or  if the
computer has just cold-booted or it has been resetted.
   It  is  also  possible  to  enable/disable  the  bus  timeout
feature which terminates accesses to non existent memory without
hanging the system.  You can  decide  to  terminate  via BERR or
via DSACK.
   Note that the Timeout/Boot flags are reset  every  time  they
are read so you can miss something.
   Beware of disabling timeout.  Accesses to non existent memory
will hang the system.


VBR
---
   The Vector Base Register is the interrupt table  of  the CPU.
Putting it in FAST ram will improve system  throughput  speeding
up interrupt driven operations such as serial  downloads, vblank
processing and so on.  It will not improve tests results because
interrupts are disabled during the test.


DENISE & AGNUS
--------------
   These section show which Agnus and Denise chips are installed
in your A3000.  Useful for checking ECS and PAL/NTSC.


TESTS & MEMORY INFO
-------------------
   The test section allows to perform some tests  whose  results
are shown in the Memory Info section.  The memory  info  section
will show (in microseconds) the time that  is needed to read and
write in Chip and Fast memory about 12MB per test.
   These test are very perilous  for  time  critical  activities
such as serial download, disk activity and so on.  Beware !
   The Bank button allows you to choose  on  which  Fast  Memory
bank (of the four of your A3000) you want to perform the test.
   The SCRAM Test checks if your bank is  populated  with  SCRAM
memory.  Note  that  if you  haven't  SCRAMs  you  may  hang the
system  and  have  to  reboot because the test will corrupt FAST
memory if not SCRAM.  If there is no memory in that bank it will
be correctly reported.
   The Fast Speed and Chip Speed perform a test on the speed  of
read and write operations  on  Fast ( selected bank )  and  Chip
memory.  See below for additional infos on the test.
   If the Fast Speed is performend  on  non existent memory then
meaningless results are reported.  Changing  the  Bank will zero
previous results.
   The Timeout gadget will cause a timeout to  check  if  it  is
correctly reported and processed.  It  causes  two  timeouts  by
reading  two longs at $08000000  and  $0c000000.  Note  that  if
timeout is disabled you'll hang the system.
   Don't disable timeout if you plan to call the Fast Speed test
on an empty Fast Ram bank (which is meaningless).


About
-----
   Pressing the right mouse button or the Help key will pop up a
small window with credits and informations about SCRAMmer.


Scrammer Uses
-------------
   You can use SCRAMmer in your startup-sequence to  set  system
parameters  at  boot time, for example with "SCRAMmer  DATACACHE
DATABURST INSTCACHE INSTBURST PAGEDETECT WRAP BURST VBRFAST".
   You can put SCRAMmer in your hard disk to call it via the  WB
or via the Shell when you need it.  You can use SCRAMmer to test
memory and systems in many configuration to have clearer ideas.
   Good Luck !


FINAL NOTE
----------
   You may ask why there are a lot of options very dangerous  in
this program.  Many of them aren't correctly supported  now  but
thay have been included because I always hope of  future  better
Amigas supporting all this.  For example I think that  who has a
68040 with Copyback enabled may safely turn of Write Allocate.
   Other tools are useful  for  testing  purposes.  If  you  are
designing a new board and  you  want  investigate  if  it  works
correctly on the bus you  can  disable  timeout  and  call  your
board.  It system hangs then your board is wrong.  Moreover  the
SCRAM test is  important,  because you  can  get  benefits  from
SCRAMs, and during the SCRAM  test  is  impossible  to  preserve
eventual PAGE ram.  That's why you have to reboot.


THE SPEED TEST
--------------
   The speed test disables interrupts and DMAs  and  performs  a
cycle reading and writing about 12 megabytes of data  in  memory
using  the  instruction cache if enabled.  The  read  and  write
operations  are  grouped in  groups  of  four  longword  aligned
longword accesses.  The test  reports the  microseconds  elapsed
during the operation (using the timer.device).
   Note that this kind of test won't show benefits derived  from
VBR, Wrap, and possibly Burst.
   Maybe this is a good test, maybe  it's not.  But you are sure
that it's not addomesticated. Other ideas will be well accepted.


PLANNED IMPROVEMENTS
--------------------
   The following  features will  be  added  if  I receive enough
return and support:

   - Iconification
   - Public Screen support improved
   - Improved Tests
   - On-Line Help
   - Chip routines will report chip numbers if unknown
   - Keyboard equivalents for gadgets


REPORTS
-------
   I'd like very much to receive your  reports.  Please  include
full SCRAMmer output and  the  complete  specification  of  your
system.  Please include your best  performace reports or as many
as you can.  The report should be formed by:
   - Description of your system
   - Showconfig output
   - Multiple SCRAMmer output
delimited by appropriate separators.  See example below.


REPORTS FOLLOW
--------------
System:  A3000 B2 Rev 9/01
ChipRAM: 2MB TC514258AP-80 SCRAM DIP
FastRAM: 4MB TC514402Z -80 SCRAM ZIP
/*------------------------------------------------------------------*/
CHIPS:  CPU 68030/68882fpu/68030mmu, ECS PAL Agnus, ECS Denise
VERS:  Kickstart version 37.175, Exec version 37.132, Disk version 37.67
RAM:  Node type $a, attribute $105 (FAST), from $7c00000 to $7f7ffff
  Node type $a, attribute $303 (CHIP), from $400 to $1fffff
BOARDS:
 CBM Bridgeboard:   Prod=513/1($201/$1) (@$200000 512K)
/*------------------------------------------------------------------*/
SCRAMmer V37.2 - Copyright © 1992 Giuliano C. Peritore

CPU & FPU
CPU:            68030  FPU:            68882
Data Cache:     On   Data Burst:     On   Data Freeze:    Off
Inst Cache:     On   Inst Burst:     On   Inst Freeze:    Off
Write Allocate: On   Copyback:       Off

VBR
At: ($7c3f6f8) FAST

RAMSEY
Chip:           Normal
Page Detect:    On   Burst:          On   Wrap:           On 
Refresh Rate:   238 clocks
RAM Chips:      1 Meg by 4 Bit

GARY
Chip:           Normal
Boot:           Warm  Timeout:        On   Timeouts:       No 

DENISE
Chip:           ECS

AGNUS
Chip:           ECS PAL 8372

TESTS REPORT
Bank:              0
Fast Read:    840000
Fast Write:   740001
Chip Read:   2880000
Chip Write:  1780000
/*------------------------------------------------------------------*/
