![]() |
BASIC FROGGER - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: Gallery (https://www.boriel.com/forum/forumdisplay.php?fid=18) +---- Thread: BASIC FROGGER (/showthread.php?tid=1447) |
BASIC FROGGER - maeloterkim - 10-04-2021 After all the hacking questions about the compiler i ended the game and is presented to bytemanicos contest The game is BASIC FROGGER Enjoy the attached file basicFrogg.tap RE: BASIC FROGGER - boriel - 10-05-2021 (10-04-2021, 10:14 PM)maeloterkim Wrote: After all the hacking questions about the compiler i ended the game and is presented to bytemanicos contest How did you copy the memory finally? Did you use PEEK + POKE? RE: BASIC FROGGER - maeloterkim - 10-05-2021 (10-05-2021, 05:41 PM)boriel Wrote:(10-04-2021, 10:14 PM)maeloterkim Wrote: After all the hacking questions about the compiler i ended the game and is presented to bytemanicos contest I dont know exactly what do you mean with this copy But i dont do any copy now in all the game ![]() ( assuming this copy involves copying a lot of bytes ) If you ask for my questions about DEFADD etc tricks as they simply did not work, I could not use them RE: BASIC FROGGER - boriel - 10-05-2021 Yes, I was referring to DEF ADD. It seems you wanted to copy memory from one place to another. You could do it with: Code: FOR i = 1 to 128 Not sure if this would be fast enough, but compiling with -O3 or -O4 and measuring the speed will give you a hint. DEF ADD cannot be used because variables are static, not dynamic in compiled BASIC and this var is not used at all. But probably there's a workaround that can be admitted in the contest. ![]() Also, please, please, ![]() If you could tell me more about it (I couldn't find much info), I'll be gratetul. RE: BASIC FROGGER - maeloterkim - 10-05-2021 (10-05-2021, 06:58 PM)boriel Wrote: Yes, I was referring to DEF ADD. Sorry but I did not look at the private message I just saw it now ![]() The only thing I know about the DEFCC is what I told you In principle, this variable is updated every time a print is made with the first memory address of the X Y coordinates of the next position. for example if you do in the original zx spectrum print at 0,0; the variable will have the value 16384 that corresponds to the address of the first byte of the character that we would print in 0,0 If you do print at 0,0; "A" the variable has the value of 16416 which is the same that if you had made print at 1,0; that is, it is the first address of the next byte where the cursor is because there is no coma ( ; ) the end of the print go to next line the variable points to the next first address of the down char If you do it with any other address, it updates the same. The variable will point to the first address where it will start printing next time you print In this link https://skoolkid.github.io/rom/ you have all zx spectrum dissasembly with a lot of explanations And in this link https://skoolkid.github.io/rom/asm/5C84.html you have more info about this variable and the routines that updates it You must only go to the last link and follow the links PO_FETCH that reads the variable and PO_STORE THAT UPDATES IT RE: BASIC FROGGER - boriel - 11-15-2021 (10-05-2021, 07:43 PM)maeloterkim Wrote:(10-05-2021, 06:58 PM)boriel Wrote: Yes, I was referring to DEF ADD. The thing is I don't want to use the ROM (but a flag will be available to do so). Can you try this version, please? http://www.boriel.com/files/zxb/zxbasic-1.16.1-beta5.tar.gz http://www.boriel.com/files/zxb/zxbasic-1.16.1-beta5.zip http://www.boriel.com/files/zxb/zxbasic-1.16.1-beta5-win32.zip http://www.boriel.com/files/zxb/zxbasic-1.16.1-beta5-linux64.tar.gz http://www.boriel.com/files/zxb/zxbasic-1.16.1-beta5-macos.tar.gz It should be faster, and update DFCC correctly (without calling PO_FETCH and PO_STORE). Sorry for the delay (I know the contest is over). ![]() |