Search the Community
Showing results for tags 'ANS Forth'.
Found 1 result
I thought it was about time that I create a goto place (no pun intended) for all things Camel99. So from now on I will put updates here. This update is my first Pong Game. It's a little quirky but it uses sound and sprites with no interrupts or multi-tasking. It's not that easy to win. The computer player is very crude but it make enough mistakes so that you can win. :-) Since I never spent much time writing games this has been educational for me. I have added a new simple word to CAMEL99 to create named character patterns. It's called PATTERN: "PATTERN:" words return the address (ie: a pointer) to the data that loads into VDP very fast using VWRITE. If you wanted to add PATTERN: to another Forth the code is: \ PATTERN: lets us define named character patterns \ usage: \ HEX 3C42 A581 A599 423C PATTERN: HAPPY_FACE \ 3C42 A581 99A5 423C PATTERN: SAD_FACE \ DECIMAL \ SAD_FACE 159 CHARDEF : PATTERN: ( u u u u -- ) CREATE >R >R >R \ push 3 values so we can reverse order , R> , R> , R> , \ compile 4 ints in VDP useable order ; The PONG code is in the spoiler. You have to load CAMEL99 with EA5 option and then paste PONG it into the emulator. When the codes finishes compiling type RUN. Latest version of CAMEL99 is on GitHub at the URL in the signature.