Jump to content
IGNORED

Effectus - New Atari cross-compiler (Alpha stage)


Gury

Recommended Posts

Second test:

 

1. I did a few tests with my Action! experiments and noticed that embedded ifs are not working, eg:

 

if i=0 then

[some code here]

if j=1 then

[some other code here]

fi

fi

 

asm file is generated, but won't compile (labels declared twice)

Effectus does not report any errors and the only sign that something was wrong is the lack of xex file

 

2. var==+1 returns lots of Access violation errors.

 

3. When i try to compile some asm files generated by effectus when there is no xex i get for example:

 

mwa #0PC^ j

uscrl.asm (31) ERROR: Extra characters on line

 

then if I correct mwa line, lots of undefined labels are reported, as if something went wrong for the effectus itself. I don't know if it's a good place to post such lousy non-working examples, let me know :)

Link to comment
Share on other sites

Hej greblus, it's ok, post here anything you like, no barriers :) It is better to know the issues than to ignore them. I will update Effectus in version branches, depending on fixes made.

 

You found one of no-yet-fixed issues in Effectus: nested ifs. I will deal will them soon.

 

"uscrl.asm (31) ERROR: Extra characters on line"

Extra line is probably the issue involving different ending characters in used OS (Linux has different line ending then WIN32), This also has to be checked through the program.

Link to comment
Share on other sites

Hi.

First I'm trying to get it compiled on Windows. In fact, setting encoding to dos (in vim) instead of utf8 eliminates the "extra characters in line" problems. But I've the following problems:

 

1. Pointers.

Action code:

card pointer pc
...
pc^=pc^-2

Results in

mwa #pc^-2 pc_ptr
uscrl.asm (32) ERROR: Undeclared label PC (BANK=0)

2. while loop.

I'm setting vblkd after clock's tick this way (dunno if that's necessary, but some books say it should be done with this in mind):

 i=clock
 while clock=i do od
 nmi=0
 vvblkd=scroll
 nmi=$40

and the errors I get are:

 #while  .byte clock=i
uscrl.asm (76) ERROR: Undeclared label I (BANK=0)
uscrl.asm (76) ERROR: Undeclared label I (BANK=0)
mads code generated here is:
 #while  .byte clock=i
 inc array_index_ndl
 #end

 

Edited by greblus
Link to comment
Share on other sites

Hi greblus,

super find. So obviously extra characters in line will be fixed in next versions. Pointers are not fully supported yet unfortunatelly, there are still issues.

 

The last error comes by the fact that Effectus is still limited in the way it processes statements and commands, which must be written each in separate lines. There are some good exceptions (noted in News section) fortunatelly.

 

In your case, it must be written:

 

Not ok:

while clock=i do od

 

Ok:

while clock=i
do
od
I am sorry for such incompatibilities and uncomfort. These issues will be fixed in next branches, but of course it is good to test them for the note.
I am interested if you tried to compile (in Linux) any of the examples in examples directory.
Here is the link (you must change \ to / of course):
Keep in touch and thanks for stress tests :)
Edited by Gury
Link to comment
Share on other sites

It's fairly easy to test "automatically" on linux.

 

First, let's see how many files we have for testing:

 

greblus@localhost:~/Effectus$ ls *.eff | wc -l

53

 

Then let's compile and count xex files:

 

greblus@localhost:~/Effectus$ for file in `ls *.eff`; do echo $file; ./effectusR1 $file; done

greblus@localhost:~/Effectus$ ls *.xex | wc -l

51

 

so, only two files are not compiled, let's see which ones:

 

greblus@localhost:~/Effectus$ for file in `ls *.eff`; do ls `basename $file eff`xex; done | grep "No such file"

ls: cannot access lib_test.xex: No such file or directory

ls: cannot access multi.xex: No such file or directory

 

I tried to run the xex files and they all seem to work, although I haven't checked if what's on screen is absolutely correct.

Edited by greblus
Link to comment
Share on other sites

Bloody hell, thanks for the test and useful scripts, greblus! This scripts will come handy in future versions including even more examples.

 

Quick errata correction... IF nesting DOES work, I just messed it up with inclusion of ELSEIF implementation. Now it is corrected and it will be distributed in the next version.

 

You earned a beer. Actually beers :)

Link to comment
Share on other sites

Ok, I give up on one of my experiments.

 

1. Got rid of nested ifs.

2. Got rid of pointers.

3. One declaration/statement per line.

 

but still I get:

 

#if

uscrl.asm (29) ERROR: Improper syntax

 

Here's the code:

int j=[0]
int k=[0]
byte hsc=54276
int tmpl 
int tmph
byte array ndl = [112 112 112 66 64 156 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 86 216 159 65 32 156]

proc chndl()
  if ndl(28)<2 then
   ndl(28)=255
   ndl(29)=ndl(29)-1
  else
   ndl(28)=ndl(28)-2
  fi
return

proc scrol()
 hsc=j
 j=j+1
 if j=17 then
  chndl()
  j=0
  k=k+1
 fi
 if k=14 then
  ndl(28)=tmpl
  ndl(29)=tmph
  k=0
 fi
[$4C$E462]
return
 
proc main()
 int i 
 card sav=88
 byte clock=$14
 byte nmi=$D40E
 card dlist=560
 card vvblkd=$0224
 byte col0=708
 byte col1=709
 
 graphics(0)
 dlist=ndl
 sav=40000
 col0=14 
 col1=14
 
 for i=1 to 23 
  do
   printf("line: %i%E", i)
  od
 
 print("Action!")
 
 tmpl=ndl(28)
 tmph=ndl(29)
 i=clock
 while clock=i 
 do 
 od
 nmi=0
 vvblkd=scrol
 nmi=$40
 do od
return
It's from my first attempts at Action! original idea is here:

 

http://blog.greblus.net/2013/05/17/action-finescroll-w-ramach-vbi/

 

and this is the next one I'd like to try with effectus:

 

http://blog.greblus.net/2013/06/02/finescroll-w-vbi-tecza-w-dli/

Edited by greblus
Link to comment
Share on other sites

Ok, nice examples to show Action! capabilities. IF statement above obviously does not manage array variable correctly, I will deal with it more closely. Nested IFs should work in next version.

 

I will play with this listing as good example of what is still missing from Effectus.

Link to comment
Share on other sites

Gury.

 

Honestly, initially I thought that a lot more is missing :)

 

This code compiles and xex is created, but crashes the emulator:

 

 

int j=[0]
int k=[0]
byte hsc=54276 
byte tmpl
byte tmph 
byte tmp
byte array ndl = [112 112 112 66 64 156 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 86 216 159 65 32 156]
 
proc chndl()
  tmp = ndl(28)
  if tmp < 2 then
   ndl(28)=255
   tmp=ndl(29)-1
   ndl(29)=tmp
  else
   tmp=ndl(28)-2
   ndl(28)=tmp
  fi
return
 
proc scrol()
 hsc=j
 j=j+1
 if j=17 then
  chndl()
  j=0
  k=k+1
 fi
 if k=14 then
  ndl(28)=tmpl
  ndl(29)=tmph
  k=0
 fi
[$4C$E462]
return 
 
proc main()
 int i 
 card sav=88
 byte clock=$14
 byte nmi=$D40E
 card dlist=560
 card vvblkd=$0224
 byte col0=708
 byte col1=709
 
 graphics(0)
 dlist=ndl
 sav=40000
 col0=14 
 col1=14
 
 for i=1 to 23 
  do
   printf("line: %i%E", i)
  od
 
 print("Action!")
 
 tmpl=ndl(28)
 tmph=ndl(29)
 i=clock
 while clock=i 
 do 
 od
 nmi=0
 vvblkd=scrol
 nmi=$40
 do od
return
Edited by greblus
Link to comment
Share on other sites

Hmm, the problem is the call to [$4C$E462] machine language routine in scroll() procedure. It is supposed to work, but when it jumps to org $8000 (which is automatically defined in Effectus), error raises. I don't know, maybe RTS mnemonic is missing or call to xitvbv?

Link to comment
Share on other sites

Reposted previous message. because I didn't have permissions to edit:

 

The problem is the call to [$4C$E462] machine language routine in scrol() procedure. It is supposed to work, but when it jumps to org $8000 (which is automatically defined in Effectus), error raises. I don't know, maybe RTS mnemonic is missing or call to xitvbv raises the error! I think RTS is not needed because it is called by return statement:

 

[$4C$E462]

return

 

In meantime, I fixed some other issues and some more features will show up in new version. I also updated equates.asm in lib directory by including some more labels compiled by JAC!

Link to comment
Share on other sites

Hi,

 

Here is new version of Effectus (0.1), with some new features and bug fixes. You are welcome to try it and post any issues and other notes.

 

Greblus, can you be so kind to compile it on Linux and run your tests, so I can put new Linux version on Download link? If you do so, you can amend effectus.pas and put your name and write something like 'Compiled for Linux by greblus' or something to fit you. Also, give me a note on which version of Free Pascal you will compile the program.

 

I think I found the issue compiling your scroll example with Effectus. Currently, procedure calls can't be assigned to the address, but this will be fixed in one of the next versions.

 

I also fixed the usage of Fill command, which works in general, but few problems remain, like borders and gliches on the screen when using Print routine.

 

Effectus version:

post-7301-0-90238400-1402564925_thumb.png

 

Action! version:

post-7301-0-86157400-1402564933_thumb.png

 

Also, major update in equates.asm library code was done, new system variable names and memory addresses (hex and dec) were added (from the list compiled by JAC!). Other issue involving equates was fixed, in particular, the conflict with system label names when used as variables in Effectus source code. This is now fixed, with major recoding of the program.

 

Greetings!

 

 

Link to comment
Share on other sites

Great! Please, also try your tests with nested IFs, which you did some posts back.

 

If there is someone prepared to compile Effectus for MacOS, that would be great, because that would help us to see how much it is done (or not) for that platform.

Link to comment
Share on other sites

Here is the tgz with Effectus compiled using fpc 2.6.4 on Arch Linux.

 

It contains modified config.ini and mads-1.9.8 binary.

I attach also the log with errors encountered during compilation of the examples.

 

Nested ifs do work fine (just a simple test). Later today I'll test some more.

effectus-0.1.tar.gz

errors.txt

Edited by greblus
Link to comment
Share on other sites

Gury, I can't compile my example from #88, I get these errors:

 

greblus@localhost:~/Desktop/Effectus$ ./effectus uscrl1.eff

mwa SCROL_eff_ vvblkd_eff_

uscrl1.asm (87) ERROR: Undeclared label SCROL_EFF_ (BANK=0)

uscrl1.asm (87) ERROR: Undeclared label SCROL_EFF_ (BANK=0)

Link to comment
Share on other sites

Hej greblus, don't worry about your example, because I tracked down the issue. It will be fixed as soon as possible and you will be informed about it to test again.

 

Many, many thanks for compilation of Linux version, it is now included in download repository here. Also, News section is updated thanks to you.

 

The errors you tracked down are examined too. include_test.eff example does not work well, because for some reason in Linux environment paths are treated differently, so I have to check the code, which is currently optimized for WIn32 environment. multi.eff example causes troubles because there is a limitation in current version, in which you can't mix different logical operators, they have to be the same. Funny thing, you say, but it will be fixed, of course :)

Link to comment
Share on other sites

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...