Jump to content
IGNORED

Going into Action! - A noob perspective


Recommended Posts

On 10/17/2020 at 2:16 PM, zbyti said:

Do you know a faster way? Pointer produce huge code but peek&poke as subroutines are not a solution in speed department.

 

I know what's killing me but do you have the cure? :D 

 

If you can write a faster code, I'd love to see it :)

The only way to go faster would be to code a pure machine code block.  What you have is about as good as you can do in Action! itself. It's unfortunate that Action! doesn't allow assignment of a base zero page value to a pointer like PL65 does. Pointer and array code overhead are real speed killers in Action!.

  • Like 1
Link to comment
Share on other sites

@pedgarcia I see You follow a little bit my Action! steps ;) You are on my step 2 :D 

 

1. Fascination of the Action! simplicity and flexibility.

2. Dropping native editor.

3. Get to know how it works under the hood.

4. Some practice during writing a game.

5. Finally you must read the original (redux) Manual and Action! Toolkit

6. Never use it again :D

 

EDIT:

;------------------------------------------------------------------------------
; Fire by koalka/bbsl/karzelki
; Action! version by zbyti
;------------------------------------------------------------------------------
;   APPMHI       CODEBASE
SET $E=$2000 SET $491=$2000
;------------------------------------------------------------------------------

DEFINE
  CHARSET="$6000",CHARSETH="$60",SCREEN="$6400",
  LDA="$A5",STA="$85",LSR="$4A",RTS="[$60]"

BYTE
  SDMCTL=$22F,GPRIOR=$26F,COLOR4=$2C8,CHBAS=$2F4,
  COLBK=$D01A,RANDOM=$D20A

BYTE
  B0I=$CA,B1I=$CB,TMP=$CC

BYTE POINTER
  P1,P2,P3=CHARSET

CARD SDLSTL=$230

PROC DL=*()[
  $42 SCREEN
  2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
  $41 DL
]

PROC SetBlock=*(CARD a, l, v)
[$85$A0$86$A1$84$A2$A0$00$A5$A2$D0$04
$A5$A3$F0$16$A5$A4$91$A0$C8$D0$02$E6
$A1$C6$A2$A5$A2$C9$FF$D0$E7$C6$A3$38
$B0$E2$60]

PROC PAUSE=*()[$A5$14$C5$14$F0$FC$60]

PROC MAIN=*()

  COLOR4=$20 TMP=0
  SDLSTL=DL CHBAS=CHARSETH
  GPRIOR=$40 SDMCTL=$21

  SETBLOCK(SCREEN,$400,0)

  B0I=0 DO
    B1I=0 DO
      P3(B1I)=TMP
      B1I==+1 UNTIL B1I=8
    OD
    P3==+8 TMP==+$11
    B0I==+1 UNTIL B0I=$10
  OD

  DO
    P1=$63E1 P2=$64E1 P3=$65E1
    B0I=0 DO
      TMP=P1(30)+P1(31)+P1(32)+P1(63)
      [LDA TMP LSR LSR STA TMP]
      P1^=TMP

      TMP=P2(30)+P2(31)+P2(32)+P2(63)
      [LDA TMP LSR LSR STA TMP]
      P2^=TMP

      TMP=P3(30)+P3(31)+P3(32)+P3(63)
      [LDA TMP LSR LSR STA TMP]
      P3^=TMP

      P1==+1 P2==+1 P3==+1

      B0I==+1 UNTIL B0I=0
    OD

    ;COLBK=10 PAUSE()

    P1=$66E0
    B0I=$1F DO
      P1(B0I)=RANDOM&15
      B0I==-1 UNTIL B0I=$FF
    OD
  OD

RTS

 

Edited by zbyti
fastest slow flames ;)
  • Haha 2
Link to comment
Share on other sites

So today I was playing with Action! runtime and how to create programs that doesn't depend on the cartridge. The task to generate it is very simple, but since now I am trying to use the hard drive (h6) to compile and run the programs, I created the binary and save it in my H6 drive. 

 

The problem is that if I execute the program directly from there (using MyDOS 2.5 "load" function), the program executes until the end but crashes.

 

If I copy the same binary to a floppy disk, let's say D1, it runs normally. I am generating the self-contained binary including the SYS.ACT.  My program itself is tiny, with just a print statement in it.


I have a feeling this is not an Action! problem...

 

I wonder if anyone has seen this before? 

 

Thanks!

 

 

Link to comment
Share on other sites

4 hours ago, pedgarcia said:

I wonder if anyone has seen this before? 

Quote

I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhäuser Gate. All those moments will be lost in time, like tears in rain. Time to die.

If you want to proper binary use W "H1:TEST.XEX" not H6 to write.

Link to comment
Share on other sites

4 hours ago, zbyti said:

If you want to proper binary use W "H1:TEST.XEX" not H6 to write.

Hey @zbyti, I just tried that and still runs but crashes at the end... BTW, running the program from Action! monitor directly is fine, and if the same file is copied to the D1 it works fine as well.

 

Do you mind to try the attached file running from H1, please? (It doesn't do anything weird, I promise :) )

 

Thanks!

 

 

CHARPOKE.XEX

Link to comment
Share on other sites

22 minutes ago, pedgarcia said:

Hey @zbyti, I just tried that and still runs but crashes at the end... BTW, running the program from Action! monitor directly is fine, and if the same file is copied to the D1 it works fine as well.

 

Do you mind to try the attached file running from H1, please? (It doesn't do anything weird, I promise :) )

 

Thanks!

OK, I'll check it. This task will be easier if you attach source of code.

Edited by zbyti
ACT please ;)
Link to comment
Share on other sites

Hm, I understand the "RTS to where?" part, but then I assume that the emulator running something from "H1:" (calling from MyDOS) behaves different from doing the same from "D1:". 

 

In other words, running from "d1:" the program knows it will return to DOS while when running it from "H1:" it doesn't where to return to? Could be this a problem with the implementation of "host" based devices?

Link to comment
Share on other sites

7 minutes ago, pedgarcia said:

Hm, I understand the "RTS to where?" part, but then I assume that the emulator running something from "H1:" (calling from MyDOS) behaves different from doing the same from "D1:". 

 

In other words, running from "d1:" the program knows it will return to DOS while when running it from "H1:" it doesn't where to return to? Could be this a problem with the implementation of "host" based devices?

I'm not sure if you return to DOS properly ;) Maybe someone more competed then me write something.

Edited by zbyti
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...