Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BASIC FROGGER
#1
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


Attached Files
.tap   basicFrogg.tap (Size: 45.91 KB / Downloads: 5)
Reply
#2
(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

The game is BASIC FROGGER

Enjoy the attached file basicFrogg.tap

How did you copy the memory finally?
Did you use PEEK + POKE?
Reply
#3
(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

The game is BASIC FROGGER

Enjoy the attached file basicFrogg.tap

How did you copy the memory finally?
Did you use PEEK + POKE?

I dont know exactly what do you mean with this copy  But i dont do any copy now in all the game  Smile 
( 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
Reply
#4
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
   POKE 16384 + i , PEEK 25000 + i
NEXT i

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. Shy


Also, please, please,  Angel I'd like to add DEFCC compatibility in PRINT (not sure if you read my private msg?).
If you could tell me more about it (I couldn't find much info), I'll be gratetul.
Reply
#5
(10-05-2021, 06:58 PM)boriel Wrote: 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
   POKE 16384 + i , PEEK 25000 + i
NEXT i

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. Shy


Also, please, please,  Angel I'd like to add DEFCC compatibility in PRINT (not sure if you read my private msg?).
If you could tell me more about it (I couldn't find much info), I'll be gratetul.

Sorry but I did not look at the private message I just saw it now Smile

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
Reply
#6
(10-05-2021, 07:43 PM)maeloterkim Wrote:
(10-05-2021, 06:58 PM)boriel Wrote: 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
   POKE 16384 + i , PEEK 25000 + i
NEXT i

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. Shy


Also, please, please,  Angel I'd like to add DEFCC compatibility in PRINT (not sure if you read my private msg?).
If you could tell me more about it (I couldn't find much info), I'll be gratetul.

Sorry but I did not look at the private message I just saw it now Smile

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

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-...ta5.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...-beta5.zip
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...cos.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). Sad
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)