atarionline.pl DL program in TB not working - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1: CommentAuthorw1k
    • CommentTime3 Feb 2011 zmieniony
     
    hi, why this prgram not running in TB?

    10 REM MODIFY DL
    20 GRAPHICS 0:Q=PEEK(88):W=PEEK(89)
    30 POKE 88,0:POKE 89,155
    40 POKE 82,0:POSITION 0,0
    50 ?"HERE TYPE FINE TEXT WHICH HAVE 40 LETTERS"
    60 POKE 88,Q:POKE 89,W:POKE 82,2
    70 FOR I=39966 TO 39970:READ D:POKE I,D:NEXT I
    80 POKE 39998,30:POKE 560,30
    90 DATA 112,112,66,0,155
    • 2:
       
      CommentAuthorKrótki
    • CommentTime3 Feb 2011
     
    Because your program wrongly assumes that the screen memory and Display List always lie at the same address.
    • 3: CommentAuthorw1k
    • CommentTime3 Feb 2011
     
    how i can fix it? peek(88)*256+peek(89) ?
    • 4:
       
      CommentAuthorKrótki
    • CommentTime3 Feb 2011 zmieniony
     
    Yes, that way you get the current position of screen memory. Use it to compute the new value. Also do the same for the DL.

    EDIT: Actually it should be PEEK(88)+256*PEEK(89).
    • 5: CommentAuthorw1k
    • CommentTime3 Feb 2011
     
    in which line?:)
    • 6:
       
      CommentAuthorKrótki
    • CommentTime3 Feb 2011
     
    In which line what?
    • 7: CommentAuthorw1k
    • CommentTime3 Feb 2011 zmieniony
     
    sorry, which line i must modify? i try this.

    10 REM MODIFY DL
    20 GRAPHICS 0:Q=PEEK(88)+256*PEEK(89)
    50 ?"HERE TYPE FINE TEXT WHICH HAVE 40 LETTERS"
    60 POKE 88,Q:POKE 82,2
    70 FOR I=39966 TO 39970:READ D:POKE I,D:NEXT I
    80 POKE 39998,30:POKE 560,30
    90 DATA 112,112,66,0,155


    not work..
    • 8:
       
      CommentAuthorKrótki
    • CommentTime3 Feb 2011
     
    w1k, do you actually know what your program does and how?
    • 9: CommentAuthorw1k
    • CommentTime3 Feb 2011
     
    hm.. i need a special line in gr0 with text.. and this not work.. im totally poor begginer (forever)
    • 10: CommentAuthorw1k
    • CommentTime3 Feb 2011 zmieniony
     
    i modify program, text is there, but is not in DLI i mean
    • 11:
       
      CommentAuthorKrótki
    • CommentTime3 Feb 2011 zmieniony
     
    OK, try this instead:
    10 REM MODIFY DL
    20 GRAPHICS 0:SCL=PEEK(88):SCH=PEEK(89):SC=SCL+256*SCH:REM DETERMINE START ADDRESS OF SCREEN MEMORY
    22 SCNEW=SC-100:REM THE ADDITIONAL TEXTLINE WILL BE PLACED 100 BYTES BEFORE START OF THE NORMAL SCREN MEMORY
    24 SCHNEW=INT(SCNEW/256):SCLNEW=SCNEW-SCHNEW*256:REM SPLIT THE 16BIT VALUE INTO 8BIT COMPONENTS
    30 POKE 88,SCLNEW:POKE 89,SCHNEW:REM TEMPORARILY SET THE START OF SCREEN 100 BYTES LOWER
    40 POSITION 0,0
    50 ? "40-LETTER TEXT":REM THIS TEXT WILL BE WRITTEN 100 BYTES BEFORE THE START OF NORMAL SCREEN MEMORY
    60 POKE 88,SCL:POKE 89,SCH:REM RESTORE THE ORIGINAL ADDRESS OF SCREEN MEMORY
    62 DLL=PEEK(560):DLH=PEEK(561):DL=DLL+256*DLH:REM DETERMINE START ADDRESS OF DLIST
    64 DLNEW=DL-2:REM WE NEED 2 MORE BYTES IN THE DLIST, SO WE MOVE ITS START 2 BYTES LOWER
    66 DLHNEW=INT(DLNEW/256):DLLNEW=DLNEW-DLHNEW*256:REM SPLIT THE 16BIT VALUE INTO 8BIT COMPONENTS
    70 POKE DLNEW,112:POKE DLNEW+1,112:POKE DLNEW+2,66:POKE DLNEW+3,SCLNEW:POKE DLNEW+4,SCHNEW:REM MODIFY THE DLIST
    80 POKE DL+30,DLLNEW:POKE DL+31,DLHNEW:POKE 560,DLLNEW:POKE 561,DLHNEW:REM SET THE POINTERS TO DLIST TO A NEW VALUE


    As you see, this is quite a bit of additional work to do it properly. You'd better understand the program's purpose. Get a Mapping the Atari and try to understand the code, really.

    >> im totally poor begginer (forever)

    By saying "forever" do you mean that you aren't willing to learn? In that case, why am I helping anyway?
    • 12: CommentAuthorw1k
    • CommentTime3 Feb 2011
     
    thanks.. you know, i learn pmg, dli, vbi maybe 3-4 years? but i forgot it about 1-2 weeks.. and i have no time for it, etc. :/