Alfred Posted July 16, 2020 Share Posted July 16, 2020 6 hours ago, svhovater said: so, funkheld, I realize this is an old topic, but I'm learning action! too. I note that somewhere I read that in order to produce a standalone binary, the statement BYTE RTS=[$60] had to be before I include the runtime.act. My question is.. why? thanks Steve The reason for the BYTE rts=[$60] statement is due to the fact that the Action! cartridge writes the binary file and then appends the INIT vector ($02E2/$02E3] as the run address for the file. The problem arises that some DOS versions (Sparta for one, and I think DOS XL) do a JSR to the first segment loaded if there is no RUN [$02E0/$02E1] address supplied. This usually is a JSR into data rather than code, and bad things often happen in those cases. So by coding the rts statement you ensure that a call to the loading address simply returns to the caller, rather than maybe formatting your hard disk partition. 2 Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) @Alfred I don't notice that problem, if your explanation it's true why BYTE rts=[$60] is required not only [$60]? Can you give code example where RTS helps in practice? Any piece of code that works on Sparta with this declaration but doesn't work without? Edited July 16, 2020 by zbyti code example Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) I checked this out. Works fine on SpartaDOS. SET $E=$2000 SET $491=$2000 BYTE ARRAY DL=[$70$70$70$56$C$20$41$1$20], TEXT="NNNNNNNNNNNNNNNNNNNNNNwithout@rtsNNNNNNNNNNNNNNNNNNNNNN" BYTE RTCLOCK=$14, CH=$2FC, HSCROL=$D404 CARD SDLSTL=$230 INCLUDE "H6:RUNTIME.ACT" PROC WAIT(BYTE FRAMES) FRAMES==+RTCLOCK WHILE FRAMES#RTCLOCK DO OD RETURN PROC MAIN() BYTE I=$CA SDLSTL=DL WHILE CH=$FF DO I=8 WHILE I DO I==-1 HSCROL=I WAIT(1) OD DL(4)==+1 IF DL(4)=$23+$C THEN DL(4)=$C FI OD GRAPHICS(0) RETURN MAIN.ACT RUNTIME.ACT test.atr Jump in the end of the DL to $2001 is my mistake (my first attempts) but it doesn't matter. Edited July 16, 2020 by zbyti screenshot Quote Link to comment Share on other sites More sharing options...
Alfred Posted July 16, 2020 Share Posted July 16, 2020 3 hours ago, zbyti said: @Alfred I don't notice that problem, if your explanation it's true why BYTE rts=[$60] is required not only [$60]? Can you give code example where RTS helps in practice? Any piece of code that works on Sparta with this declaration but doesn't work without? [$60] is not a valid statement. Byte rts=[$60] is a short way to put the $60 opcode at the start of the file. You tested with Sparta 2.3 or 3.2D, right? Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) 13 minutes ago, Alfred said: [$60] is not a valid statement. Byte rts=[$60] is a short way to put the $60 opcode at the start of the file. You tested with Sparta 2.3 or 3.2D, right? Yes you right, out of the proc body [$60] will not produce RTS this must be some variable declaration. with x hscroll.com and without x, in my Action! project I use Exomizer - works with SpartaDOS SCRAMBLE.XEX Edited July 16, 2020 by zbyti Exomizer Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) SCROLL.COM tested with Sparta 1.1, 3.2 and SpartaDOS X v4.18 (1988-10-29)(ICD)(US).car - no issues, no RTS needed, binary generated by Action! 3.6. SpartaDOS 1.1 HS.atr SpartaDOS 3.2.atr Sparta 2.3 and 3.2d because atr which I downloaded are corrupted. Edited July 16, 2020 by zbyti corrupted Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) And some other doses... All works fine without this "workaround". Dos-2.5-Chaos-Command-Processor-3.08.atr dosII+.atr OSS DOS XL 2.35.atr SCROLL.COM have a proper header. Edited July 16, 2020 by zbyti Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) @Alfred you refer to this https://atariwiki.org/wiki/Wiki.jsp?page=Action Bugsheet#section-Action+Bugsheet-20..COMPROGRAMS Quote Running compiled ACTION! programs as .COM files under OS/A+ causes those programs to execute twice. Affects: All versions, but only when using a version of OS/A+. DOS XL is not affected. Fix: Insert the following as the first global variable you declare: BYTE RTS=[$60] ; This MUST be the first line in your program, ; aside from comments and SET commands. I'll check it. This states that only OS/A+ have this issue. Edited July 16, 2020 by zbyti OS/A+ Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) https://atariwiki.org/wiki/Wiki.jsp?page=OSS OS-A%2B OS/A+ LOAD SCROLL.COM works fine. Without RTS. OSS_OS-A+_1.2e_and_EASMD_1.0.atr 90KB.atr Sparta 2.3 & 3.2d works fine without RTS (use 90KB.atr). SpartaDOS 2.3.atr SpartaDOS 3.2d.atr Edited July 16, 2020 by zbyti Sparta Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 16, 2020 Share Posted July 16, 2020 (edited) I edited previous post all works fine on OS/A+ without RTS. Edited July 16, 2020 by zbyti Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted July 17, 2020 Author Share Posted July 17, 2020 This is getting better, good information. I've been quiet for all this time but I keep learning Action. I am currently writing a small game so I can learn more with a full application and be able to finish my tutorial series. Paulo Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 17, 2020 Share Posted July 17, 2020 @pedgarcia If you are interested in it and it will be useful in your tutorial I included some tricks in my code that I saw or discovered on my own https://github.com/zbyti/a8-action-scramble Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted July 20, 2020 Author Share Posted July 20, 2020 On 7/17/2020 at 4:22 PM, zbyti said: @pedgarcia If you are interested in it and it will be useful in your tutorial I included some tricks in my code that I saw or discovered on my own https://github.com/zbyti/a8-action-scramble Hey @zbyti, thanks! That is a very organized code (compared to mine so far!) . I noticed that you have a module with low-level routines and some of them are part of Action! standard library (not sure if that is the correct term). Why did you do that? Was to have more efficient code, or simply to have only what you would need? I haven't had a chance to run it yet, but I will dig deeper tomorrow. That will be very useful. Cheers Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 20, 2020 Share Posted July 20, 2020 (edited) 18 hours ago, pedgarcia said: Why did you do that? Was to have more efficient code, or simply to have only what you would need? For 3 reasons: 1. to save memory by picking exactly what I need from runtime 2. to make binary (xex file) working without cartridge 3. speed I use one of those runtimes (I belie von Jeff Reister was the one) but noticed what SETBLOCK procedure is 3x slower then PROC on Action! cartridge, I'll fix this later. Edited July 20, 2020 by zbyti SETBLOCK info Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 20, 2020 Share Posted July 20, 2020 (edited) @pedgarcia I only compile code using Atari800 but I'm writing the code outside Action! env. It's looks (early version) this way: I think this way I can use more variables on ZERO PAGE (>= $80) because I don't have to worry about the correct work of the Action! editor after running my own code. Edited July 20, 2020 by zbyti >= $80 1 Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted July 20, 2020 Author Share Posted July 20, 2020 Hey @zbyti, it looks great! I've been using Action! editor (full immersion ) and I found it excellent, even for today's standards, but the Atari's 40 columns display doesn't help much to visualize the code. I will try to get going something similar you showed in your video using an external editor. Another point I wasn't thinking is the amount of memory the editor and the code would take. My current game is very small so that's ok, but at some point I can see things will start to get more complicated to manage. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted July 21, 2020 Share Posted July 21, 2020 If someone is interested in I run some Action! tests in this thread: 1 Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted September 10, 2020 Author Share Posted September 10, 2020 The tutorial series progress slowly so I decided to go ahead and publish the first article. https://vintageisthenewold.com/going-into-action-with-atari-xl-xe-part-1-hello-world/ Comments and suggestions are welcome. Cheers 3 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 10, 2020 Share Posted September 10, 2020 @pedgarcia great work! carry on! 1 Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted September 19, 2020 Author Share Posted September 19, 2020 Part 2 is out now https://vintageisthenewold.com/going-into-action-with-atari-xl-xe-part-2-graphics/ Cheers! 1 1 Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 19, 2020 Share Posted September 19, 2020 (edited) @pedgarcia I read the article from top to the bottom, very instructive :] Edited September 19, 2020 by zbyti Good job! Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted September 19, 2020 Author Share Posted September 19, 2020 59 minutes ago, zbyti said: @pedgarcia I read the article from top to the bottom, very instructive :] Thank you! Quote Link to comment Share on other sites More sharing options...
DocSavage2001 Posted September 20, 2020 Share Posted September 20, 2020 Yes, good stuff. I will need to pull that image for Action! in your first tutorial. I just picked up an 800 with Basic, Logo and Mac/65 and I need to have Action! too! Dave Quote Link to comment Share on other sites More sharing options...
pedgarcia Posted September 20, 2020 Author Share Posted September 20, 2020 17 hours ago, DocSavage2001 said: Yes, good stuff. I will need to pull that image for Action! in your first tutorial. I just picked up an 800 with Basic, Logo and Mac/65 and I need to have Action! too! Dave Thanks. The first article contains a link to an image I created for the series. It is nothing fancy but this way I can point to folders or specific things without thinking on different types of images, etc. Cheers Quote Link to comment Share on other sites More sharing options...
zbyti Posted September 25, 2020 Share Posted September 25, 2020 I really liked this effect https://demozoo.org/productions/280623/ LANDSCAP.ACT LANDSCAP.XEX 2 Quote Link to comment 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.