Jump to content

Photo

Effectus - New Atari cross-compiler (Alpha stage)


236 replies to this topic

#201 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 9:01 AM

After some consideration I have decided to study and understand Action! first since Effectus is based on Action!. So I have several questions about Action!

 

1. Attached cart file of Action! is correct? (Action!_hack.cart)

 

2. How to write the Action! source file to disk? Following screenshots are my source code and settings, but error code 130 appeared.

01.first%2Bprogram.png

 

02.empty%2Bdisk.png

 

03.enter%2Bfile%2Bname.png

(D1:A1 -> Same problem)

 

04.error%2B130.png

 

3. How to export executable file to PC OS by using Atari DOS/Disk? (I do not have such knowledge about that. Sorry...)

Attached Files


Edited by starwindz, Tue Oct 14, 2014 9:02 AM.


#202 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • 14,439 posts
  • Location:United Kingdom

Posted Tue Oct 14, 2014 9:07 AM

Looks like there's no "D:" handler because no DOS was booted. Is DOS present?



#203 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 9:14 AM

Looks like there's no "D:" handler because no DOS was booted. Is DOS present?

No. I have inserted .cart file by using 'Attach cartridge menu' of Altirra and reboot by 'Cold reset'. And then inserted the empty disk to Disk 1....

How to solve this problem? Could you please show me the step-by-step solution? (Sorry...)


Edited by starwindz, Tue Oct 14, 2014 9:15 AM.


#204 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Tue Oct 14, 2014 9:38 AM

Hi Starwindz.

 

Activate System -> Host Device (H:) in Altirra. Select a directory on your computer and you'll be able to work without DOS.

And to check version of your Action! cart image check ? $B000 in the monitor (Ctrl+Shift+M).

Should return something like: 45056,$B000 = 6, $0136 54 310. As far as I know 3.6 is the latest version.

 

An interesting option is to utilize atari800 emulator to create a "compiler" to be used on the PC.

Kuba Husak came with an interesting idea which I think it worth to "sell to the world" as it's simply neat: 

 

First you have to record your "events" (opening a file, compilation, writing it out to a file, all on H: device accessible from a PC as well):
 

atari800 -cart Action\!.rom -cart-type 15 -record tmp
 

and then playback it (in turbo mode to make it as quick as possible):

 

atari800 -cart Action\!.rom -cart-type 15 -playback tmp -turbo

 

Of course to edit Atari files on a PC (in comfortable way) it's necessary to convert at least line endings (in both ways from and to ATASCII).

And the filename (as recorded by atari800) will always be the same, so it's good to write a little script which will take care for the filenames. 


Edited by greblus, Tue Oct 14, 2014 9:59 AM.


#205 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 646 posts

Posted Tue Oct 14, 2014 10:03 AM

 

I think it was more like 6%, but I don't know how accurate the numbers are, since the poll was posted in the programming forum when it was only accessible outside the main forum here. At that time many people either didn't know about the forum at all or rarely ventured to check in on it. Probably be a good idea to run the poll again now.

 

 

 

Interesting. I knew quite a few homebrew games had been done with it, but I didn't realize a higher-profile commercial game like Food Fight had been produced using it. Where did you find out the information about it? I was looking on Atarimania, and they list it as pure machine language -- not compiled Action or otherwise.

Whoops! Reading comprehension problem on my part. i.e. Action game does not equal Action! game. I think I have made that same mistake before. 



#206 rdea6 ONLINE  

rdea6

    River Patroller

  • 2,804 posts
  • Location:Arizona USA

Posted Tue Oct 14, 2014 10:04 AM

Action_hack  is hacked to see the H: or the emulators PC hard drive setup in the menus..

 

This file works very well with Atari800win emulator, but like the previous poster noted Altirra has a Host Device also..



#207 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 10:11 AM

Hi Starwindz.

 

Activate System -> Host Device (H:) in Altirra. Select a directory on your computer and you'll be able to work without DOS.

And to check version of your Action! cart image check ? $B000 in the monitor (Ctrl+Shift+M).

Should return something like: 45056,$B000 = 6, $0136 54 310. As far as I know 3.6 is the latest version.

 

An interesting option is to utilize atari800 emulator to create a "compiler" to be used on the PC.

Kuba Husak came with an interesting idea which I think it worth to "sell to the world" as it's simply neat: 

 

First you have to record your "events" (opening a file, compilation, writing it out to a file, all on H: device accessible from a PC as well):
 

atari800 -cart Action\!.rom -cart-type 15 -record tmp
 

and then playback it (in turbo mode to make it as quick as possible):

 

atari800 -cart Action\!.rom -cart-type 15 -playback tmp -turbo

 

Of course to edit Atari files on a PC (in comfortable way) it's necessary to convert at least line endings (in both ways from and to ATASCII).

And the filename (as recorded by atari800) will always be the same, so it's good to write a little script which will take care for the filenames. 

Regarding host device, it works fine. I can import and export .act file now. Thank you very much. :)

And I have more questions.

 

1. I have entered $B000 in the monitor mode but no data displayed.... My mistake? 

2. Binary file created by WRITE command is .xex format? (This file can be run by Altirra directly?)

3. How to create bootable .atr file which has executable file?


Edited by starwindz, Tue Oct 14, 2014 10:11 AM.


#208 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Tue Oct 14, 2014 10:32 AM

Regarding host device, it works fine. I can import and export .act file now. Thank you very much. :)

And I have more questions.

 

1. I have entered $B000 in the monitor mode but no data displayed.... My mistake? 

2. Binary file created by WRITE command is .xex format? (This file can be run by Altirra directly?)

3. How to create bootable .atr file which has executable file?

 

1. Try with ? in front :)

2. You'd have to compile your example with RUNTIME.ACT included to make it work without cart. Inserting Action! cart in Altirra won't allow to run binary compiled without RUNTIME. Maybe one day it'll be supported.

3. Using your preferred DOS of choice :) (XINIT in Sparta, FMD in TurboDOS XE, etc). You have to read about it. 



#209 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 10:47 AM

 

1. Try with ? in front :)

2. You'd have to compile your example with RUNTIME.ACT included to make it work without cart. Inserting Action! cart in Altirra won't allow to run binary compiled without RUNTIME. Maybe one day it'll be supported.

3. Using your preferred DOS of choice :) (XINIT in Sparta, FMD in TurboDOS XE, etc). You have to read about it. 

Regarding 2, I have included RUNTIME.ACT and, compile and write the binary file(A1.BIN). However A1.BIN cannot be run under Altirra?

Attached Thumbnails

  • 01.runtime1.png

Attached Files

  • Attached File  A1.BIN   2.02KB   98 downloads


#210 ricortes OFFLINE  

ricortes

    Dragonstomper

  • 646 posts

Posted Tue Oct 14, 2014 10:49 AM

Just a suggestion: You may want to start working with various .ATR disks with different versions of DOS on them and pick your own favorite. Probably something with DOS 2.5 would be the lowest common denominator while other DOS offer access to bigger disks for a developer environment. Just download any .ATR with DOS 2.5 on it and boot/cold start the emulator. You should be able to <shift+control>M to get to the monitor and hit D<return> to see if you were successful loading DOS. In the short term, it will make using examples easier. In the long run, you will have to eventually get up to speed using methods like greblus talks about or at least a more capable DOS like MyDOS or Sparta DOS for their ability to access large drives and directory structures.


Edited by ricortes, Tue Oct 14, 2014 10:55 AM.


#211 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Tue Oct 14, 2014 11:00 AM

Regarding 2, I have included RUNTIME.ACT and, compile and write the binary file(A1.BIN). However A1.BIN cannot be run under Altirra?

 

Try different RT, eg OSS one (attached).

Attached Files

  • Attached File  a1.zip   4.47KB   101 downloads


#212 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 11:17 AM

 

Try different RT, eg OSS one (attached).

GREAT! It works like charm. Thank you so much. :) One more request... Could you please upload your Action! cartridge file? When I enter ? $B000, the return string is different from you mentioned....

Attached Thumbnails

  • 02.addr.png


#213 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Tue Oct 14, 2014 11:46 AM

GREAT! It works like charm. Thank you so much. :) One more request... Could you please upload your Action! cartridge file? When I enter ? $B000, the return string is different from you mentioned....

 

To be honest, I used exactly the same version :)

 

Attached is v3.6.

Attached Files



#214 starwindz OFFLINE  

starwindz

    Moonsweeper

  • 337 posts
  • Location:South Korea

Posted Tue Oct 14, 2014 5:15 PM

 

To be honest, I used exactly the same version :)

 

Attached is v3.6.

Great! Thank you very much for your kind help. :)



#215 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Sun Aug 23, 2015 4:23 PM

New version (0.2):

 

News:

http://gury.atari8.i...fectus/news.php

 

Download:

http://gury.atari8.i...us/download.php

 

  • Better handling of conditional and branching expressions
    - Functions are allowed in conditional expressions. For example:
    • WHILE Peek(764)=255 DO OD
    • WHILE Strig(0)=1 DO OD
    • IF Mult2(y1,y2)<>x2 THEN ; Custom function
      • - Array elements can be used as part of conditional expression. For example:
        • IF arr(1)=5 THEN
  • Improved support for DEFINE command (completely rewritten code)
  • Added support for expressing ASCII representation of a character in a way:
    • a='A
    • arr(3)='C
    • IF FLAGS(I)='T THEN
  • Some updates in multi-line department
    - Branching starting and ending pair can be put in code more freely. For example:
    • FOR n=10 TO 14 DO
    • WHILE Peek(555)=0 DO OD

      - One command on the same line is allowed in IF/THEN conditional statement. For example:
      • IF I<>2 THEN PutE() FI
  • Console and option updates
    • New option added (-dl) for deleting log file before compiling new code
    • -i option fixed with some layout changes to show variable info in tabular fashion
    • .eff extension added to Effectus source code listing automatically if not present

 

Bug fix:

  • Fixed error declaring variable with assigned memory location and putting some comments on the end
    BYTE RTCLOK=20 ; addr of sys timer
    BYTE SDMCTL=559 ; DMA control

 

You can find demonstration examples here and see how things can be done in Effectus. Still, some considerations must be taken and you have to stick with current limitations considering simulating Action! language, but these and many other glitches will be fixed in future releases.

 

Greblus, if you find some time and make Linux version, it would be great. Of course, no hurry.

 

Greetings


Edited by Gury, Sun Aug 23, 2015 4:53 PM.


#216 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Mon Aug 24, 2015 1:30 AM

Hi Gury.

 

Thank you for this new version! I'll test new features soon :)

 

Attached is a Linux binary.

 

Cheers,

W.

Attached Files


Edited by greblus, Mon Aug 24, 2015 1:33 AM.


#217 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Mon Aug 24, 2015 2:41 AM

Great, Linux version is in download page. Thank you, greblus.

 

Not it is time for pointers and other stuff...



#218 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Mon Oct 12, 2015 1:55 PM

New version (0.2.1):

 

  • Improved handling of comments
  • Memory locations $A0 - $A3 used as function return values instead of STORE1 - STORE3 labels (which are commented out in lib\equates.asm)
  • Custom functions: returned value stored in memory locations $A0 and $A1 instead of STORE1 label
  • Custom ASM functions: register y removed from the parameter list
  • Proper atascii conversion of the value assigned as uppercase or lowercase character, preceeded with punctuation mark. For example:
    IF FLAGS(I)='T THEN // Different as FLAGS(I)='t
    IF FLAGS(I)='t THEN // Different as FLAGS(I)='T

News

Download

 

I should now look at pointers and arithmetic operator precedence stuff...


Edited by Gury, Mon Oct 12, 2015 1:59 PM.


#219 greblus OFFLINE  

greblus

    Moonsweeper

  • 270 posts

Posted Sun Oct 18, 2015 3:36 PM

Hi Gury.

 

Here it is for Linux (includes mads-2.0.0, hope Tebe doesn't mind ;)).

 

Cheers,

W.

Attached Files


Edited by greblus, Sun Oct 18, 2015 3:37 PM.


#220 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Mon Oct 19, 2015 7:04 AM

Great, greblus! Your Linux version is uploaded and added to Effectus download page.

 

I think he will not mind, because we Atarians are nice and kind people :)

 

Btw, your pages about Effectus are excellent, nice experimenting and good examples.



#221 TXG/MNX OFFLINE  

TXG/MNX

    River Patroller

  • 3,633 posts

Posted Mon Oct 19, 2015 8:13 AM

I haven't read this thread for a while so I need to read all 9 pages ... what's the reason this is dropped in the new release "Custom ASM functions: register y removed from the parameter list" ?



#222 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Mon Oct 19, 2015 10:22 AM

Hmm, good point there. But short explanation must take place here. I removed Y register, because elsewhere there are notes about how Action! handles parameters for machine code in functions and procedures. If I am not wrong, there is Accumulator and X register, which together make a word value, with Accumulator alone as a byte value. Please correct me if this is false information. Can you confirm that Y register also completes this parameter list?



#223 a8isa1 OFFLINE  

a8isa1

    Stargunner

  • 1,560 posts

Posted Mon Oct 19, 2015 11:21 AM

Hmm, good point there. But short explanation must take place here. I removed Y register, because elsewhere there are notes about how Action! handles parameters for machine code in functions and procedures. If I am not wrong, there is Accumulator and X register, which together make a word value, with Accumulator alone as a byte value. Please correct me if this is false information. Can you confirm that Y register also completes this parameter list?

Hi, Gury!

 

I also do not understand what you mean by "Custom ASM Functions"

 

AFAIK, Action! only has one way to pass parameters.  Accumulator, then X, then Y, then memory locations $A0 thru $AC.   Sixteen bytes maximum.

 

Cheers for Effectus!

 

-SteveS

 

p.s. Sorry if this issue has been addressed and yes the thread is too long to check.

 

Can

 

BYTE A=<address>

BYTE B=<address>

 

eventually be shortened to

 

BYTE A=<address>,B=<address>

 

ditto for

 

BYTE A=[<value>], B=[<value>]

 

Also, one more request please

 

in code blocks please allow variable names.

 

[$6C SIOV]  ; where SIOV is a CARD



#224 Gury OFFLINE  

Gury

    Stargunner

  • Topic Starter
  • 1,300 posts

Posted Mon Oct 19, 2015 11:45 AM

Sorry for my bad English :) I meant routines/procedures as code block with parameters.

 

Thank you for explanation, I thought Action! uses ax pair for every parameter. Ok, I will take this into consideration for new version, including with variable declarations and code block variable names you requested, too. All this will be fixed in some future version with complete rewrite of code.

 

Here are some code excerpt examples from ACTION Runtime von Jeff Reister (link is here). I will address registers which should be used and can you correct me if I am wrong, please:

 

PROC PrintCD=*(BYTE d CARD c)  ; d (A), c (XY)?
[$20 _CLREOL $4C _DOPRNC]

PROC PrintC=*(CARD c)  ; c (AX)?
[$20 _SHFTR $4C PrintCD]

PROC PrintBD=*(BYTE d, b)  ; d (A), b (X)?
[$A0$00$4C PrintCD]

PROC PrintB=*(BYTE b)  ; b (A)?

[$20 _SHFTR $4C PrintBD]

PROC PrintID=*(BYTE d INT i)  ; d (A), i (XY)?
[$20 _CLREOL $4C _DOPRNI]

PROC PrintI=*(INT i)  ; i (AX) ?
[$20 _SHFTR $4C PrintID]
 

Greetings!



#225 fujidude OFFLINE  

fujidude

    Quadrunner

  • 5,217 posts
  • Location:United States of America

Posted Mon Oct 19, 2015 8:22 PM

Hmm, good point there. But short explanation must take place here. I removed Y register, because elsewhere there are notes about how Action! handles parameters for machine code in functions and procedures. If I am not wrong, there is Accumulator and X register, which together make a word value, with Accumulator alone as a byte value. Please correct me if this is false information. Can you confirm that Y register also completes this parameter list?

 

From the documentation:

9.4 Assembly Language and ACTION!
---------------------------------
ACTION! allows you to make calls to machine language 
routines very easily. There are only two requirements:

You need to know the starting address of the routine
The routine must end with an 'RTS' (if you want to 
get back to ACTION!)

For assembly language programmers these are not difficult 
requirements to fill.

"What about parameters?" "Yes" is the answer. You can send 
parameters to machine language routines. The compiler 
stores parameters in this way:

 Address     nth byte of parameters
 -------     -----------------------
 A register  1st
 X register  2nd
 Y register  3rd
 $A3         4th
 $A4         5th
 :           :
 :           :
 $AF         16th





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users