Rybags Posted October 8, 2018 Share Posted October 8, 2018 Yep, the keycaps aren't always related per same key like cursor keys etc. But for something like simple alphanum entry you could do the shorthand version. Quote Link to comment Share on other sites More sharing options...
tebe Posted October 8, 2018 Share Posted October 8, 2018 BLIBS by Bocianu (Pac-Mad etc.) Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 8, 2018 Author Share Posted October 8, 2018 Hi good afternoon. I am looking for a solution, as I find in fastbasic a startaddress from a PROC for a VBI. and a solution how to build a VBI in fastbasic. Thank you. greeting Quote Link to comment Share on other sites More sharing options...
dmsc Posted October 9, 2018 Share Posted October 9, 2018 (edited) Hi Funkheld! Hi good afternoon. I am looking for a solution, as I find in fastbasic a startaddress from a PROC for a VBI. and a solution how to build a VBI in fastbasic. I advice against using a VBI, it will complicate the code and don't buy you anything. The proper way to code a game loop in Fastbasic should be using a loop with the following logic: Exec Init ' Calls an initialization function, this sets graphics, loads P/M, etc. do Exec StartGame ' Starts game Exec GameLoop ' Loops inside game screen loop Now, the GameLoop procedure should be coded also in a loop like: proc GameLoop do pause 0 ' Write all registers and move P/M ' ... ' Game Logic if IAmDead then Exit ' ... loop endproc You can study the attached game source for a full example of a game in FastBasic, using P/M, a play-field, collision registers and sounds. I tried to comment the source as possible, but you can ask for any doubt. gameloop.bas gameloop.xex Edited October 9, 2018 by dmsc 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 9, 2018 Author Share Posted October 9, 2018 Hi good afternoon. I became curious at the age of 70 and also for ACTION! who can help me once and explain exactly how I use this RSCAN and RWRITE, maybe with a small DEMO. I do not know what files are used as include in the actions program and how everything works with RSCAN and RWRITE. which names do I enter with rscan when rscan is started? I dont know. when I start rscan and enter 2 names: 1. meinprog.act and 2. meintest.act comes a write error. also the rwrite worries me with the function. I do not understand the runtime.txt. Thank you. greeting RunTime.zip Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 9, 2018 Author Share Posted October 9, 2018 (edited) hello many thanks this PAUSE 0 does all the work for the complicated VBI ??? how did you do that with the multicolored pm please? does that have something to do with pause 0 ? ' as we are synchronized to the screen. How do you know now that this vbi is no longer effective? ' Now, the game logic, this does not need to be synchronized great. the program code xex wonderfully small, only 2.5 kb !!!! Thank you. greeting Edited October 9, 2018 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 10, 2018 Author Share Posted October 10, 2018 Hi good afternoon. is it possible to call a PROC via ASM in fastbasic? How can you do it? Thank you. Quote Link to comment Share on other sites More sharing options...
vitoco Posted October 10, 2018 Share Posted October 10, 2018 You have a BASIC code with embeded ASM code and you would like that the ASM code to perform a JSR to a PROC subroutine? If I understood well, let me clarify something about FastBasic: this is an interpreted language like Atari BASIC and TurboBasic XL, and "compiled" FastBasic programs are just a sequence of tokens, which are stored inside an XEX file along the interpreter (runtime module) for them. "Compiled" FastBasic programs are NOT assembly code. The parser just optimizes the source code to generate the best sequence of tokens and their args for the program. Then, the program flow is managed by the interpreter, and when it finds a token for USR, it pass the control to that subroutine, but expects it to return and give the control in order to resume with the next token. Said that, you can conclude that a USR routine cannot call back to an arbitrary PROC routine without tricking the pointers and counters of the FastBasic interpreter (the runtime code). I'm not saying that it could not be done, but it is not in this language's design (AFAIK). 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 10, 2018 Author Share Posted October 10, 2018 the "pause 0" in fastbasic is not a VBI routine to call a new procedur but just for image syncronization. Can you still build a real vbi for fast basic? Thank you. greeting Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 10, 2018 Author Share Posted October 10, 2018 hello thanks for the info. greeting. Quote Link to comment Share on other sites More sharing options...
dmsc Posted October 11, 2018 Share Posted October 11, 2018 Hi funkheld! the "pause 0" in fastbasic is not a VBI routine to call a new procedur but just for image syncronization.Yes, "Pause 0" synchronizes with the screen redraw. The same as a VBI!. I think that you have a misunderstanding of what a VBI is and what it is used for. Can you still build a real vbi for fast basic?Any interrupt routine must be implemented in assembler, as interrupts can trigger anywhere in your main code and you can't preserve all execution state easily. So, yes, you can call a VBI written in assembly in Fastbasic, just set the VBI pointer to the address of the assembly routine. See this example: data vbi() byte = 8,72,165,20,41,16,74,74,74,141,243,2,104,40,76,0,0 old = dpeek(548) dpoke adr(vbi) + 15, old pause 0 : dpoke 548, adr(vbi) ? "Hello"; repeat ' do nothing! until key() ' restore pause 0 : dpoke 548, old Some remarks:- to write to the VBI pointer, use a "Pause 0" just before, so that the VBI does not occur when you are changing the pointer. - the VBI terminates via a jump to the original VBI, this address must be patched into the VBI itself. If you want to write this in assembly, you can export the address from the assembly (via ".global myvbi") and use "@myvbi" as the address. Also, remember to export the jump code to allow patching the old address. Again, I advice against using VBI in your code, it is bad programming practice because it complicates the code and is fragile. 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted October 11, 2018 Share Posted October 11, 2018 Hi! ... very good explanation by Vitoco ... And just to clarify, as "PROC" has many meanings: - There are "PROC" as written in Fastbasic, this is a Basic procedure, that you call with "EXEC name". - There are ".proc" assembly procedures, written in assembler, that you call with "USR(@name)". But more to the point, to Funkheld, instead of asking random short questions, try to explain "what you want to accomplish", as many times there are other ways to accomplish the same result. And, if some useful functionality is missing from Fastbasic, we can work on adding a way to do that! 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 11, 2018 Author Share Posted October 11, 2018 Hi good afternoon. is the crosscompiler from fastbasic also an interpreter? Thank you. greeting Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 11, 2018 Author Share Posted October 11, 2018 I would like to query a joystick in a vbi and always store the value in a variable which I then evaluate in a do / loop.Thank you.greeting Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted October 11, 2018 Share Posted October 11, 2018 (edited) The operating system is already doing this for you? (please read as much of De Re Atari as you can) Obtain the value from STICK0/1 at hex $278/9 (dec 632/3) Edited October 11, 2018 by Wrathchild Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 11, 2018 Author Share Posted October 11, 2018 (edited) I demo: this crashes: asm: .global VSCROL .proc VSCROL lda $2080 sta $d405 rti .endproc this crashes: data vbi() byte = 8,72,165,20,41,16,74,74,74,141,243,2,104,40,76,0,0 old = dpeek(548) dpoke adr(vbi) + 15, @vscrol pause 0 dpoke 548, @vscrol ? "Hello"; repeat ' do nothing! until key() ' restore pause 0 dpoke 548, old Edited October 15, 2018 by funkheld Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 11, 2018 Author Share Posted October 11, 2018 tanks . greeting. Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 11, 2018 Author Share Posted October 11, 2018 Hi good afternoon. I would like to write my files xex, asm with a disk manager on a disk. this dir2atr always manufactures a self-boat manager on the atr. I do not need that. I just want to transfer my files to disk with a batch file of windows, that's all. this diratr is not suitable for that, I mean. Thanks & Greetings Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted October 13, 2018 Share Posted October 13, 2018 I would like to use please the memory in the atari800xl of c000-cfff with madpascal. what do you have to put there please? You cannot. At least not without some trickery because this memory region is used by the operating system on the XL series. Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 13, 2018 Author Share Posted October 13, 2018 Hello thanks for the info. greeting Quote Link to comment Share on other sites More sharing options...
ClausB Posted October 13, 2018 Share Posted October 13, 2018 Some of it is available for use. CC00-CFFF holds the international character set and can be overwritten without crashing the OS. 1 Quote Link to comment Share on other sites More sharing options...
funkheld Posted October 14, 2018 Author Share Posted October 14, 2018 (edited) Hi good afternoon. is ok... thanks Edited October 14, 2018 by funkheld Quote Link to comment Share on other sites More sharing options...
+JAC! Posted October 14, 2018 Share Posted October 14, 2018 If you have activated horizontal scrolling in the DL, that changes the cycles/timing available in that line. This may cause less cycles being available for your DLI code, so it reaches into the next line.Without any code posted here it's hard to guess what you did.In any case using HSCROLL values 12-15 instead of 0-3 might help. 1 Quote Link to comment Share on other sites More sharing options...
sanny Posted October 15, 2018 Share Posted October 15, 2018 funkheld, can't you think and research a little bit yourself, before you are posting a question? There's information about all aspects of Atari programming available on the internet. Read the manuals of the tools you are using (e.g. Fastbasic) and hardware and system docs. Then, if you still can't find a solution, post your question. You are currently coming around like someone who has no idea what he's doing, but wants to create a super-duper program. Start small and build up on it... regards, chris 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted October 15, 2018 Share Posted October 15, 2018 Hi! I demo: this crashes: asm: .global VSCROL .proc VSCROL lda $2080 sta $d405 .endproc this crashes: data vbi() byte = 8,72,165,20,41,16,74,74,74,141,243,2,104,40,76,0,0 old = dpeek(548) dpoke adr(vbi) + 15, @vscrol pause 0 dpoke 548, adr(vbi) ? "Hello"; repeat ' do nothing! until key() ' restore pause 0 dpoke 548, old That code crashes because it does not make sense. You are patching the provided VBI() assembly to jump to your assembly. But, from your assembly, you don't return nor jump to anything, so it crashes. 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.