Jump to content
IGNORED

Effectus - New Atari cross-compiler (Alpha stage)


Gury

Recommended Posts

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

Action!_hack.zip

Edited by starwindz
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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?

post-39035-0-48127700-1413305073_thumb.png

A1.BIN

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 10 months later...

New version (0.2):

 

News:

http://gury.atari8.info/effectus/news.php

 

Download:

http://gury.atari8.info/effectus/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
Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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
  • Like 1
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...