pedgarcia Posted September 26, 2020 Author Share Posted September 26, 2020 Wow, this is gorgeous. I am finishing the 3rd part but I wonder if it is ok to use this in an upcoming part? there are interesting concepts there like the way you declare OpenMode and drawTo. Is this standard in the native Actiion! ? (I am assuming you are using Effectus) cheers Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4640982 Share on other sites More sharing options...
zbyti Posted September 26, 2020 Share Posted September 26, 2020 (edited) @pedgarcia It's completely Action! way match functions to memory address, Effectus can't do that for that moment properly. Landscape was compiled under Action! env. on A8 and write to H1 as binary xex. From my part you can use this code in your upcoming tutorial but you can ask @ilmenit about this too. landscape.mp4 Edited September 28, 2020 by zbyti Action! way :] Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4640997 Share on other sites More sharing options...
zbyti Posted September 26, 2020 Share Posted September 26, 2020 (edited) If you don't believe me go into fullscreen on this landscape.mp4 Edited September 26, 2020 by zbyti fullscreen 1 Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4641012 Share on other sites More sharing options...
pedgarcia Posted September 28, 2020 Author Share Posted September 28, 2020 Very nice! Actually on a side-note, I think a chapter using an external editor is necessary. I've been doing everything using the Action! editor and I really think it is powerful, but the it gets hard to see the whole source code... Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4642340 Share on other sites More sharing options...
zbyti Posted September 28, 2020 Share Posted September 28, 2020 @pedgarcia external editor is nice if you want to programming in Action! with System Off Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4642349 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) System OFF in Action! asoff.mp4 SYSOFF.XEX Edited October 1, 2020 by zbyti add vid Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644323 Share on other sites More sharing options...
pedgarcia Posted October 1, 2020 Author Share Posted October 1, 2020 I am not sure if I followed what happened in there? I tried the program on Atari800MacX and it crashed, but looking at your video is that expected? Thanks Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644343 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) ;------------------------------------------------------------------------------ ; System Off in Action! ; by @zbyti ;------------------------------------------------------------------------------ DEFINE DLADDR="$2100",DLI1ADDR="$2140",DLI2ADDR="$2180", PHR="[$48$8A$48$98$48]",PLR="[$68$A8$68$AA$68]", PHA="[$48]",PLA="[$68]",SEI="[$78]", RTI="[$40]",RTS="[$60]" SET $E=$2000 SET $491=$2000 BYTE COLPF2=$D018,PORTB=$D301, WSYNC=$D40A,NMIEN=$D40E, RTIVEC=$15,RTCLOK2=$14 CARD DLIST=$D402,NMIVEC=$FFFA, VBIVEC=$10,VDSLST=$16, LMS=$E000,CARTOFF=$D508 PROC NMI=*()[ $2C $0F $D4 ;BIT $D40F ;NMIST $10 $03 ;BPL $6C VDSLST 0 ;JMP ($0016) ;BUFADR+1 $E6 $14 ;INC $14 ;RTCLOK+2 $D0 $06 ;BNE $E6 $13 ;INC $13 ;RTCLOK+1 $D0 $02 ;BNE $E6 $12 ;INC $12 ;RTCLOK $6C VBIVEC 0 ;JMP ($0010) ;POKMSK ] PROC SYSTEMOFF=*() SEI NMIEN=0 PORTB=$FE RTIVEC=$40 VBIVEC=@RTIVEC VDSLST=@RTIVEC NMIVEC=NMI NMIEN=$40 RTS PROC VBI=*() PHR COLPF2=RTCLOK2 PLR RTI PROC WAIT=*(BYTE F)[$18$65$14$C5$14$D0$FC$60] SET $E=DLADDR PROC DL=*()[ $70 $70 $70 $42 LMS 2 2 $F0 2 2 2 $F0 2 2 2 $41 DL ] SET $E=DLI1ADDR PROC DLI1=*() PHR COLPF2=$DE WSYNC=$DE VDSLST=DLI2ADDR PLR RTI SET $E=DLI2ADDR PROC DLI2=*() PHR COLPF2=RTCLOK2 VDSLST=DLI1ADDR PLR RTI PROC MAIN=*() SYSTEMOFF() ; CARTOFF=1 disable Action! 3.6 cartridge WAIT(50) DLIST=DL WAIT(100) VBIVEC=VBI WAIT(100) VDSLST=DLI1 NMIEN=$C0 DO OD RTS @pedgarcia I tested XEX with Atari800 and Altirra, it works. You have problem running this program after compilation on your computer/emulator? I recommend to run Action! from cartridge instead of using disk version and compile from file not from editor. Edited October 2, 2020 by zbyti I recommend... Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644350 Share on other sites More sharing options...
pedgarcia Posted October 1, 2020 Author Share Posted October 1, 2020 Ah ok. With the cartridge version and compiling from disk works. Interesting effect. What the SystemOFF() function is actually doing? Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644359 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) 15 minutes ago, pedgarcia said: What the SystemOFF() function is actually doing? Give you full control of Atari and full RAM to your disposal. My repo https://github.com/zbyti/a8-action-playground Edited October 1, 2020 by zbyti my repo Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644363 Share on other sites More sharing options...
pedgarcia Posted October 1, 2020 Author Share Posted October 1, 2020 Ah, gotcha. That is pretty cool. I've already bookmarked your repo. BTW I am finishing the part 3, but went talking about POINTERS and I am not sure if it is too deep too soon for the idea of targeting who is learning Action like I am doing... Anyway , the part 3 is going to be out hopefully today. Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644367 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) 5 minutes ago, pedgarcia said: BTW I am finishing the part 3, but went talking about POINTERS and I am not sure if it is too deep too soon for the idea of targeting who is learning Action like I am doing... I don't think so, pointers are substantial for 8-bit programmers. Edited October 1, 2020 by zbyti Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644369 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 4 minutes ago, pedgarcia said: I've already bookmarked your repo. Not this one Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644373 Share on other sites More sharing options...
pedgarcia Posted October 1, 2020 Author Share Posted October 1, 2020 1 minute ago, zbyti said: I don't think so, pointers are substantial for 8-bit programmers. Thanks, I agree. As far I could see so far, Action! in particular use the concept very often. Hopefully my "noob" explanation will reach those that don't understand it (as long I understood ) 1 Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644374 Share on other sites More sharing options...
pedgarcia Posted October 1, 2020 Author Share Posted October 1, 2020 1 minute ago, zbyti said: Not this one Ha, lol - my bad choice of words!. I meant - I "just" bookmarked it 1 Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644375 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) In BLOCK CODE we can easily use pointers but we must remember about one nasty exception, even if we declare CARD variable on ZERO PAGE Action! don't respect that and we must explicitly add 0 do address, like this: CARD VBIVEC=$10,VDSLST=$16 PROC NMI=*()[ $2C $0F $D4 ;BIT $D40F ;NMIST $10 $03 ;BPL $6C VDSLST 0 ;JMP ($0016) ;BUFADR+1 $E6 $14 ;INC $14 ;RTCLOK+2 $D0 $06 ;BNE $E6 $13 ;INC $13 ;RTCLOK+1 $D0 $02 ;BNE $E6 $12 ;INC $12 ;RTCLOK $6C VBIVEC 0 ;JMP ($0010) ;POKMSK ] Edited October 1, 2020 by zbyti nasty exception Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644474 Share on other sites More sharing options...
zbyti Posted October 1, 2020 Share Posted October 1, 2020 (edited) Another try to program without Action! RUNTIME and system calls. Multiplication and Shift Left bit operation not allowed. DEFINE DLADDR="$2000",RTS="[$60]",LMS="$6010" SET $E=$2100 SET $491=$2100 BYTE ARRAY BASE=[ 170 150 144 144 122 122 110 110 94 94 86 86 82 80 ] BYTE SDMCTL=$22F,GPRIOR=$26F, COLOR4=$2C8,RND=$D20A,TMP=$CA CARD SDLSTL=$230 CARD POINTER DL=DLADDR PROC WAIT=*(BYTE F)[$18$65$14$C5$14$D0$FC$60] PROC GR9=*() FOR TMP=0 TO 100 DO DL(TMP)=$0F0F OD DL(0)=$7070 DL(1)=$4F70 DL(2)=LMS DL(50)=$4F0F DL(51)=LMS+$FF0 DL(99)=$410F DL(100)=DL SDLSTL=DL GPRIOR=$40 COLOR4=$B0 RTS PROC LANDSCAPE() BYTE ARRAY COLHEIGHT(14) BYTE START=$55,STOP=$56, X,C=$CB,I=$CC BYTE POINTER P=$CD X=40 SDMCTL=0 WAIT(1) FOR TMP=0 TO 13 DO COLHEIGHT(TMP)=BASE(TMP) OD WHILE X#0 DO X==-1 FOR I=0 TO 1 DO P=LMS+X START=0 C=14 WHILE C#0 DO C==-1 STOP=COLHEIGHT(C) IF START>STOP THEN TMP=START-STOP WHILE TMP#0 DO P==-40 TMP==-1 OD STOP=START START=COLHEIGHT(C) FI WHILE START<STOP DO IF I THEN [$A5 C $A $A $A $A $85 TMP] P^=(P^&15)%TMP ELSE P^=C FI P==+40 START==+1 OD START=STOP IF RND&1 THEN COLHEIGHT(C)==-1 FI IF RND&1 THEN COLHEIGHT(C)==+1 FI OD OD OD WAIT(1) SDMCTL=$22 WAIT(150) RTS PROC MAIN=*() GR9() DO LANDSCAPE() OD RTS SLIDE.mp4 SLIDESHO.XEX Edited October 2, 2020 by zbyti no runtime Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4644767 Share on other sites More sharing options...
pedgarcia Posted October 2, 2020 Author Share Posted October 2, 2020 Thanks for those! There are very interesting concepts in the program itself, and the result is very nice! I am gonna dissect that today and see what I don't understand! Meanwhile, here is part 3! https://vintageisthenewold.com/going-into-action-with-atari-xl-xe-part-3-more-variables-memory-and-pointers-ugh/ Cheers 1 Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645116 Share on other sites More sharing options...
zbyti Posted October 2, 2020 Share Posted October 2, 2020 (edited) @pedgarcia nice article! But if you use DLADDR for variable name more proper will be: PROC MAIN() CARD I BYTE POINTER SCR ; BEGINNING OF SCREEN POINTER CARD POINTER DLADDR ;DISPLAY LIST ADDR GRAPHICS(7+16) DLADDR=PEEKC(560) SCR=DLADDR(2) ; PLOT AN ARBITRARY PATTERN ON SCREEN FOR I=1 TO 3840 DO SCR^=135 SCR==+1 OD FOR I=1 TO 33000 DO OD RETURN in other case for DLADDR=PEEKC(560)+4 more accurate will be LMSADDR=PEEKC(560)+4 Edited October 2, 2020 by zbyti LMS Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645140 Share on other sites More sharing options...
pedgarcia Posted October 2, 2020 Author Share Posted October 2, 2020 Thanks @zbyti! I hope you help me understand the differences (or if it is just more correctness). DLADDR=PEEKC(560) is getting the beginning of the DLI and when you put SRC=DLADDR(2), it will be the same as "DLADDR==+2 and SRC=DLADDR^" correct ? In this case, wouldn't you getting the wrong information? (I know I am wrong, because your version also works ). Or when you use DLADDR(2) you are actually getting the 2nd CARD, i.e, 16-bit pair (aka same 4th byte)? And why you say that "LMSADDR=PEEKC(560)+4" would be more accurate? Thanks Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645157 Share on other sites More sharing options...
zbyti Posted October 2, 2020 Share Posted October 2, 2020 (edited) @pedgarcia You can use CARD POINTERS like CARD ARRAYS. DL probably looks like: $70 $70 $70 $42 L_LMS H_LMS ... then INDEX=2 points to CARD LMS. In arrays index start from 0. ARRAY variable names are actually pointers (is possible because Action! also allocates a pointer to the ARRAY) to the ARRAY space and vice versa Edited October 2, 2020 by zbyti CARD ARRAY Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645161 Share on other sites More sharing options...
pedgarcia Posted October 2, 2020 Author Share Posted October 2, 2020 3 minutes ago, zbyti said: @pedgarcia You can use pointers as CARD arrays. DL probably looks like: $70 $70 $70 $42 L_LMS H_LMS then INDEX=2 points to CARD LMS. Hm, interesting, so the arrays follows the datatype size.... When I first tried to understand the pointers I was also assuming that an increment of 1 would also jump 2 bytes at a time for a CARD type, but that is not the case. I see that using arrays does. Based on that, the loop could also be: FOR I=0 TO 3839 DO SCR(I)=135 OD with the same performance, right? Thanks Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645166 Share on other sites More sharing options...
zbyti Posted October 2, 2020 Share Posted October 2, 2020 (edited) @pedgarcia about performance - as far as I know if we not using byte array with fixed size <= BYTE there are no difference. Edited October 2, 2020 by zbyti byte array arr(256) Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645175 Share on other sites More sharing options...
zbyti Posted October 2, 2020 Share Posted October 2, 2020 (edited) @pedgarcia in Action! peoples use those tricks instead PEEK & POKE: BYTE ARRAY MATRIX=0 for POKEC & PEEKC you know what to do If you like POINTERS use them instead of ARRAYS in this case It's one drawback of this metod: produce much more code then calling JSR POKE. Edited October 2, 2020 by zbyti In other hand Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645211 Share on other sites More sharing options...
zbyti Posted October 2, 2020 Share Posted October 2, 2020 (edited) Just found: Use RAM under ROM on XL-XE machines https://atariwiki.org/wiki/Wiki.jsp?page=Use RAM under ROM on XL-XE machines But I like "my" solution Edited October 2, 2020 by zbyti Use RAM under ROM Quote Link to comment https://forums.atariage.com/topic/299150-going-into-action-a-noob-perspective/page/3/#findComment-4645304 Share on other sites More sharing options...
Recommended Posts
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.