Jump to content
IGNORED

Effectus suggestions and bug reports


Recommended Posts

Proper count is 1028 http://atarionline.pl/forum/comments.php?DiscussionID=4873&page=4_#Item_37

 

My tests on screenshot (early Mad Pascal 1.6.4). I don't remember if I synchronized with the frame in those tests.

 

Screenshot_2020-02-27_10-55-02.png

 

Action! and Effectus do not use SETBLOCK. Mad Pascal, CC65 and others use fill-like procedures.

I'll do a test for Action! and the Effectus with SETBLOCK and ZERO Page (Mad Pascal Opt).

 

Screenshot_2020-05-10_15-31-40.png

 

RESIEVE with ZERO PAGE:

Mad Pascal 1.6.4 (last master) - 38 frames

Effectus 0.4.1 - 39 frames

Action! 3.7P - 48 frames

Edited by zbyti
  • Like 1
Link to comment
Share on other sites

[BUG REPORT]

//Action!, Effectus
BYTE ARRAY FLAGS(8192)
SETBLOCK(FLAGS,8192,'T)
//translated
FLAGS : array[0..8192] of byte;
FillChar(FLAGS, 8192, 84);

//Mad Pascal
flags: array [0..8191]
fillchar(flags, sizeof(flags), true);

@Gury in translation you reserve too much for ARRAY.

Edited by zbyti
Link to comment
Share on other sites

I will fix that!

 

Hmm, I re-checked the problem and I think it can be an issue. If you declare a variable in Action! like this:

 

BYTE ARRAY flags(8192)

 

and then use a FOR loop:

FOR i = 0 to 8192

 

In this phase Effectus does not recalculate the value in FOR statement, it read it as it is (it will not be 8191).

 

I will check FillChar issue.

 

Edited by Gury
Re-check
  • Thanks 1
Link to comment
Share on other sites

Hi good afternoon.
something for effectus 0.4.1
Interrupt !!!

 

MODULE; VBI DEMO FOR ANTICDEFINE RTI="$40",       PHA="$48",       PLA="$68",       TXA="$8A",       TAX="$AA",       TYA="$98",       TAY="$A8",       JMP="$4C",       XITVBV="$E462",SAVETEMPS="[$A2 $07 $B5 $C0 $48 $B5    $A8 $48 $B5 $A0 $48 $B5 $80 $48      $CA $10 $F1 $A5 $D3 $48]",    ; diese SAVETEMPS Routine ist aus der Action! Fehlerkorrekturliste. Sie ist umfangreicher als das originale Beispiel aus dem Magazin    ; und funktioniert sicher. Das Original sichert nur die Variablen für Addition/SubtraktionGETTEMPS="[$68 $85 $D3 $A2 $00 $68    $95 $80 $68 $95 $A0 $68 $95 $A8    $68 $95 $C0 $E8 $E0 $08 $D0 $EF]"    ; das gleiche wie oben gilt auch für die GETTEMPS RoutineCARD SDLST=560,VDSLST=512,               VVBLKD=$224BYTE NMIEN=$D40E,COLBK=$D01A,     WSYNC=$D40A,COUNT=[0]BYTE ARRAY DLISTBYTE ARRAY CLRS(0)=[64 66 68 70 72 74     72 70 68 66  64  66  68  70  72     74  72  70  68  66  64  66  68     70 72 74 76 ]PROC DLINT(); a DLI written in ACTION!    BYTE DUM    [PHA TXA PHA TYA PHA]    IF COUNT=26 THEN DUM=0    ELSE DUM=CLRS(COUNT) FI    WSYNC=1    COLBK=DUM    COUNT=COUNT+1    IF COUNT=27    THEN COUNT=0    FI    [PLA TAY PLA TAX PLA RTI]PROC INIT7()    GRAPHICS(7)    SETCOLOR(0,2,10)    SETCOLOR(1,5,12)    SETCOLOR(2,0,0)RETURNPROC DLSETUP(); custom Display List    BYTE I    INIT7()    NMIEN=$40    DLIST=SDLST      VDSLST=DLINT    FOR I=30 TO 40    DO DLIST(I)=141 OD    FOR I=42 TO 54 STEP 2    DO DLIST(I)=141 OD    FOR I=57 TO 72 STEP 3    DO DLIST(I)=141 OD    FOR I=76 TO 84 STEP 4    DO DLIST(I)=141 OD    NMIEN=$C0RETURNPROC ROTATE(); the VBI routine    BYTE HOLD,CTR,CNTR    SAVETEMPS; save the temp registers    HOLD=CLRS(26); save the last element    FOR CTR=0 TO 25; the loop    DO CNTR=25-CTR; to count backwards, Action! has no STEP-1 statement    CLRS(CNTR+1)=CLRS(CNTR) OD; rotate    CLRS(0)=HOLD; put the last element into the first    GETTEMPS; get the temp registers    [JMP XITVBV]; exit the VBIPROC VBINST(); install the VBI    NMIEN=0; turn off the interrupts    VVBLKD=ROTATE; vector to PROC ROTATE    NMIEN=$40; turn the interrupts back onRETURNPROC DJD(); the driver routine, named for a famous computer genius    BYTE CRSINH=752    VBINST(); install the VBI    DLSETUP(); set up the Display List    CRSINH=1    PRINTE()    PRINTE("Áîôéã Interrupts in ACTION!")    PRINT("           by DAVID PLOTKIN")    DO OD; an endless loop...RETURN
	

 

 


MODULE; VBI DEMO FOR ANTIC
DEFINE RTI="$40",
       PHA="$48",
       PLA="$68",
       TXA="$8A",
       TAX="$AA",
       TYA="$98",
       TAY="$A8",
       JMP="$4C",
       XITVBV="$E462",

SAVETEMPS="[$A2 $07 $B5 $C0 $48 $B5
    $A8 $48 $B5 $A0 $48 $B5 $80 $48  
    $CA $10 $F1 $A5 $D3 $48]",
    ; diese SAVETEMPS Routine ist aus der Action! Fehlerkorrekturliste. Sie ist umfangreicher als das originale Beispiel aus dem Magazin
    ; und funktioniert sicher. Das Original sichert nur die Variablen für Addition/Subtraktion
GETTEMPS="[$68 $85 $D3 $A2 $00 $68
    $95 $80 $68 $95 $A0 $68 $95 $A8
    $68 $95 $C0 $E8 $E0 $08 $D0 $EF]"
    ; das gleiche wie oben gilt auch für die GETTEMPS Routine
CARD SDLST=560,VDSLST=512,
               VVBLKD=$224
BYTE NMIEN=$D40E,COLBK=$D01A,
     WSYNC=$D40A,COUNT=[0]
BYTE ARRAY DLIST
BYTE ARRAY CLRS(0)=[64 66 68 70 72 74
     72 70 68 66  64  66  68  70  72
     74  72  70  68  66  64  66  68
     70 72 74 76 ]

PROC DLINT(); a DLI written in ACTION!
    BYTE DUM
    [PHA TXA PHA TYA PHA]
    IF COUNT=26 THEN DUM=0
    ELSE DUM=CLRS(COUNT) FI
    WSYNC=1
    COLBK=DUM
    COUNT=COUNT+1
    IF COUNT=27
    THEN COUNT=0
    FI
    [PLA TAY PLA TAX PLA RTI]

PROC INIT7()
    GRAPHICS(7)
    SETCOLOR(0,2,10)
    SETCOLOR(1,5,12)
    SETCOLOR(2,0,0)
RETURN

PROC DLSETUP(); custom Display List
    BYTE I
    INIT7()
    NMIEN=$40
    DLIST=SDLST  
    VDSLST=DLINT
    FOR I=30 TO 40
    DO DLIST(I)=141 OD
    FOR I=42 TO 54 STEP 2
    DO DLIST(I)=141 OD
    FOR I=57 TO 72 STEP 3
    DO DLIST(I)=141 OD
    FOR I=76 TO 84 STEP 4
    DO DLIST(I)=141 OD
    NMIEN=$C0
RETURN

PROC ROTATE(); the VBI routine
    BYTE HOLD,CTR,CNTR
    SAVETEMPS; save the temp registers
    HOLD=CLRS(26); save the last element
    FOR CTR=0 TO 25; the loop
    DO CNTR=25-CTR; to count backwards, Action! has no STEP-1 statement
    CLRS(CNTR+1)=CLRS(CNTR) OD; rotate
    CLRS(0)=HOLD; put the last element into the first
    GETTEMPS; get the temp registers
    [JMP XITVBV]; exit the VBI

PROC VBINST(); install the VBI
    NMIEN=0; turn off the interrupts
    VVBLKD=ROTATE; vector to PROC ROTATE
    NMIEN=$40; turn the interrupts back on
RETURN

PROC DJD(); the driver routine, named for a famous computer genius
    BYTE CRSINH=752
    VBINST(); install the VBI
    DLSETUP(); set up the Display List
    CRSINH=1
    PRINTE()
    PRINTE("Áîôéã Interrupts in ACTION!")
    PRINT("           by DAVID PLOTKIN")
    DO OD; an endless loop...
RETURN

 

Edited by funkheld
Link to comment
Share on other sites

@funkheld and the point is? DLI works fine, VBI works too :] In code like yours current parser go crazy! :]

 

SET $E=$2000
SET $491=$2000

BYTE ARRAY DL=[$70$70$70$42$00$40$2$2$2$2$F0$2$2$2$2$2$70$70$70$41$00$20]
BYTE ARRAY DLI=[$48$A9$DE$8D$0A$D4$8D$18$D0$68$40]
; 48        PHA
; A9 DE     LDA #$DE
; 8D 0A D4  STA $D40A   ;WSYNC
; 8D 18 D0  STA $D018   ;COLPF2
; 68        PLA
; 40        RTI

BYTE
  CH=$2FC,
  NMIEN=$D40E

CARD
  VDSLST=$200,
  SDLSTL=$230

PROC MAIN()
  SDLSTL=DL
  VDSLST=DLI
  NMIEN=$C0

  WHILE CH=$FF DO OD
  GRAPHICS(0)
RETURN

 

Edited by zbyti
DLI code
Link to comment
Share on other sites

[BUG ERROR]

 

SET $E=$2000
SET $491=$2000

BYTE
  RTCLOCK=$14,
  COLOR2=$2C6,
  CH=$2FC,

CARD
  VVBLKD=$224,
  OLDVEC

PROC SETVBLK=$E45C(BYTE WHICH,MSB,LSB)

PROC VBLANKD()
  COLOR2=RTCLOCK
[$6C OLDVEC]

PROC MAIN()
  PRINTE("Setting up Vblank")
  OLDVEC = VVBLKD
  SETVBLK(7,(VBLANKD RSH 8),VBLANKD)
  WHILE CH=$FF DO OD
  SETVBLK(7,(OLDVEC RSH 8),OLDVEC)
RETURN

1. CH=$2FC, ; translator don't catch comma as error

2. [$6C OLDVEC] OLDVEC ; missing reference

3. PROC SETVBLK=$E45C(BYTE WHICH,MSB,LSB) ; not possible

Edited by zbyti
Link to comment
Share on other sites

17 hours ago, zbyti said:

[BUG ERROR]

1. CH=$2FC, ; translator don't catch comma as error

2. [$6C OLDVEC] OLDVEC ; missing reference

3. PROC SETVBLK=$E45C(BYTE WHICH,MSB,LSB) ; not possible

Hi,

error catching is planned for some other version. I will resolve some bugs and add some new features before that.

OLDVEC issue is also on the list for fixing. Currently, variables cannot be assigned inside machine language [] block.

 

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

No worries, I noticed that also. The problem is a way Effectus assigns a pointer in this particular example. I already have solution for this, it will be fixed in next release. The good starting point is the same example in Tebe's GitHub Mad Pascal repository.

Action! language is very unique in a way it uses arrays and pointers, so I need to examine all possible cases to adapt Effectus to translate correctly to Mad Pascal.

 

Link to comment
Share on other sites

39 minutes ago, Gury said:

Action! language is very unique in a way it uses arrays and pointers, so I need to examine all possible cases to adapt Effectus to translate correctly to Mad Pascal.

In Action:

 

ARRAY BYTE

  TEXT(30),

  SCREEN=$8000

 

TEXT indicates on first byte of array, index will be BYTE in loops. TEXT(0)=10 produces only LDA / STA.

SCREEN is a POINTER to $8000 and array index will be always CARD type in loops.

 

Above goes from my knowledge ;)

Edited by zbyti
Link to comment
Share on other sites

Good find!

I also spoted this problem in some previous release, all comparisons generated assignments with the same name before branch (IF, FOR, WHILE, UNTIL). I already fixed this problem for FOR and UNTIL branches for most cases in current releases. I will dig into remaining problems for this issue before releasing new version.

 

  • Thanks 1
Link to comment
Share on other sites

That's great to hear. Currently my goal is to follow my plan to resolve known issues. You can help, but it's better to wait till next release so we don't collide with different fixes.

When we do this it will be must to run a test suit to check all works ok.

You can already involve in doing this, but use different branch.

 

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...