\* Show the contents of a 512x512 buffer on CAM. Saves and restores all data that it changes. Makes no assumptions about number of modules or interconnect topology (it does all of the display using module 0). Since the buffer "pattern" is used to store saved cell information, this buffer can't be used to hold the image that you want to display. *\ 30 create-buffer save-display-kick 24 create-buffer save-display-offset 256 K create-buffer image-buffer 256 K create-buffer save-buffer define-step show-image-on-cam save-select/sector/src select 0 module kick read save-display-kick offset read save-display-offset select all \ Set up sector information for 512x512 on all modules. scan-index dimension 1 17 << 1 8 << or dcm! h# 1f xdcp! h# 1f ydcp! h# 1f zdcp! scan-perm 18 0 ?do i i sa! loop 24 18 ?do h# 1e i sa! loop scan-format 3 sm! 18 esc! 9 esw! 9 est! 1 sbrc! 2 rcl! 0 stm! \ Read site data into save buffer. site-src site display site select 0 module scan-io save-buffer read \ Write the data that is to be displayed to CAM. site-src host scan-io image-buffer \ Now display the data on CAM. This generates a rather long \ step-list, since a bug in the CAM chip requires us to issue \ a separate run for each line of the display. select all site-src site display site scan-format 3 sm! 9 esc! 9 esw! 9 est! 1 sbrc! 2 rcl! 0 stm! kick run frame 512 1 ?do run line loop display 0 map! \ Copy the saved data back to CAM, and restore all parameters \ that have been changed. scan-format 3 sm! 18 esc! 9 esw! 9 est! 1 sbrc! 2 rcl! 0 stm! site-src host select 0 module scan-io save-buffer select all kick save-display-kick offset save-display-offset restore-select/sector/src end-step define-step mag4 4 is cell-zoom save-select/sector/src 2 0 do select i module site-src site scan-index 128 64 UVsubsector #dim @ 0 ?do 0 loop select-subsector cell-zoom log magnify scan-io image-buffer i 2 part read loop restore-select/sector/src end-step : mag4-vds mag4 show-image-on-cam ; ' mag4-vds is mvds