home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / atari / 8bit / 4555 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  4.1 KB

  1. Path: sparky!uunet!sun-barr!ames!pacbell.com!well!moon!cyberden!phbill
  2. From: moon!cyberden!phbill@well.sf.ca.us
  3. Newsgroups: comp.sys.atari.8bit
  4. Subject: Action! problem.
  5. Message-ID: <HZXqqB4w165w@cyberden.uucp>
  6. Date: Mon, 07 Sep 92 12:43:40 PDT
  7. Organization: Indescribable Creations
  8. Lines: 117
  9.  
  10. Remember APACSET2, that little LIST I made (I didnt upload it to the 
  11. archives yet, did I?!?!?).  Anyways, I loaded it into Action! and edited 
  12. it as best as I know how, but it just won't work! (it crashes, luckily 
  13. [RESET] saves it (usually)).  I believe my problem may be in my "PROC 
  14. CALL=$0600()" or my attempt to fill up page 6 with data...
  15.  
  16. Here's what I've got:
  17. ;  apacset v3.0 bill kendrick 9-7-92 
  18.  
  19. Module
  20.   Card DL  ; DL is global
  21.  
  22. Proc Call=$0600() ;  aka U=USR(1536)
  23.  
  24. Proc APAC()
  25.  Byte Pos
  26.  Card SC,TempCard,Counter
  27.   Byte Array MLRtn="<ML routine to turn on APAC mode..it's 79 bytes long>"
  28.   Graphics(11)
  29.   DL=(Peek(106)-40)*256 ; find room for DL
  30.   TempCard=PeekC(560)   ; copy some of old DL
  31.   MoveBlock(DL,TempCard,3) ; into new DL
  32.   TempCard==+198
  33.   MoveBlock(DL+572,TempCard,10)
  34.   SC=PeekC(88)
  35.   For Counter=3 TO 570 Step 6
  36.   Do
  37.     Poke(DL+Counter,207)      ; write new DL data
  38.     PokeC(DL+Counter+1,SC+Pos)
  39.     Poke(DL+Counter+3,79)
  40.     PokeC(DL+Counter+4,SC+Pos+3840)
  41.     Pos==+40
  42.   OD
  43.   PokeC(560,DL)  ; set display list pointer to DL
  44.   MoveBlock(1536,MLRtn,79) ; copies ML routine into Page 6
  45.   Poke(204,0)
  46.   Call()  ; call APAC routine at page 6
  47. Return
  48.  
  49. Proc ScreenOn(Byte Dither,Lum)
  50.   Graphics(43)
  51.   PokeC(560,DL)    ; point display list to APAC2 DL
  52.   Poke(54286,192)  ; turn on DLI
  53.   Poke(204,Dither)
  54.   Poke(712,Lum)
  55. Return
  56.  
  57. Proc Off()
  58.   Graphics(41)
  59. Return
  60.  
  61. Proc Demo()
  62.  Byte Col,Lum,X,Y,XDir,YDir
  63.   APAC()
  64.   ScreenOn(1,4)
  65.   Do
  66.     Lum=Lum+1
  67.     If Lum=16 Then
  68.       Lum=0
  69.       Col=Col+1
  70.       If Col=16 Then
  71.         Col=0
  72.       Fi
  73.     Fi
  74.     Color=Col ; color
  75.     Plot(X,Y)
  76.     Color=Lum ; luminence
  77.     Plot(X,Y+96)
  78.     X=X+XDir
  79.     If X=79 Then
  80.       XDir=-1
  81.     Fi
  82.     If X=0 Then
  83.       XDir=1
  84.     Fi
  85.     X=Y+YDir
  86.     If Y=95 Then
  87.       YDir=-1
  88.     Fi
  89.     If Y=0 Then
  90.       YDir=1
  91.     Fi
  92.   Od
  93. Return
  94.  
  95. Here's a quick rundown.  CALL is just the equivalent to "USR", but in 
  96. Action! you've got to make it a PROCedure and tell it where to point to.  
  97. PROCedure APAC is the routine that stores the APAC mode ML routine into 
  98. page 6 memory (or at least TRIES to) and sets up the APAC2 display list.  
  99. SCREENON simply turns on the graphics mode, points to the new display 
  100. list (for APAC2) and sets the DLI, dither mode and screen luminence.  OFF 
  101. just turns off dither and sets the screen to normal (not APAC2).  
  102. Finally, DEMO calls APAC and SCREENON to set it up, then just bounces a 
  103. dot around on the screen (leaving a trail of 256 different colors).  If 
  104. you were to add a GRAPHICS(11) or (9) command right after the SCREENON(), 
  105. it will at least get to the drawing routine, but I think there might be 
  106. some sort of problem drawing onto the APACscreen.  Duh, I guess I could 
  107. attempt loading a screen into memory, then setting up the APAC mode...  
  108. Anyways, that's not JUST what I want it to do, so I still need this 
  109. little ditty fixed!!  Any help would be MUCH appreciated.  I haven't read 
  110. through the ENTIRE Action! manual, but I read (over and over!) bits about 
  111. arrays and routine calls and stuff.  
  112.  
  113. Again, my best guesses is either 1) didnt do the page 6 setup right
  114.                                  2) didnt copy data from MLRtn to page 6
  115.                                     properly.
  116.                                  3) don't have the memory set up right 
  117.                                     for the graphics mode or DL free RAM
  118.                                     (I'm assuming Graphics() calls alloc-
  119.                                     ate free RAM, but maybe pointing DL 
  120.                                     to RAMtop-40 was a stupid idea by me)
  121. anyways....  thanx in advance.....(grumble grumble.. I need to read that
  122.                                   book AGAIN!)
  123.  
  124. PhBill: Bill Kendrick               |||  1200 Cyberden BBS (+1 415 472-5527)
  125. Moon!Cyberden!PhBill@Well.SF.CA.US / | \ 2600 North of San Francisco California
  126.  
  127.