-
I would like to know how to create a standalone program from the words I have created and execute the word MAIN once loaded. I have tried to follow the instructions in the manual but I failed miserably, I find the info a bit hard to understand, I am new to forth. I have also looked at #382 10 print turnkey demo and I think that this is what I need in my code but I don't know how to adapt it to my needs:
I tried to add this to my code changing 10print to main but it didn't work...
I get the error 62, file not found Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 36 comments 44 replies
-
I have found why I was getting the error I was using the durex forth cartridge and I needed the disk to include turnkey ! and I have an executable now working. |
Beta Was this translation helpful? Give feedback.
-
Good job. How is your experience with durexForth? |
Beta Was this translation helpful? Give feedback.
-
Storing screen codes to screen memory rather than printing could be the fastest way to deal with that.
|
Beta Was this translation helpful? Give feedback.
-
Good morning, tscreen is a table of 16bit pointers to each row/line of the screen.
|
Beta Was this translation helpful? Give feedback.
-
Untested. : painttile ( tile x y -- )
2* tscreen + @ + >r
2* 2* ttiles + dup @ r@ ! \ oops fixed
2+ @ r> 40 + ! ; |
Beta Was this translation helpful? Give feedback.
-
Thank you @jkotlinski , indeed I had the hope forth would be the fastest option, but on the other hand I am glad I have come to know a little about it as it is very interesting and very different from other languages I have used or use. @Whammo What I understand is, I need to have all the calculations done, say the pointers and then just call the words to paint whatever is needed . This is what I do when not using double buffer in other languages, calculate everything that there is to calculate regading screen manipulation and then when the raster line reaches the low border I can paint everything to avoid flicker (when not using double buffer of course). |
Beta Was this translation helpful? Give feedback.
-
Is the code produced by 2* the same as 1 lshift ? If so could we use 2 lshift instead of 2* 2* ? |
Beta Was this translation helpful? Give feedback.
-
The result of ”2 lshift” and ”2* 2*” is the same. ”2* 2*” should be faster,
as it avoids putting a temporary 2 on the stack.
…On Sat, 12 Nov 2022 at 12:45, S Mestre ***@***.***> wrote:
Is the code produced by 2* the same as 1 lshift ? If so could we use 2
lshift instead of 2* 2* ?
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O4CJ7Y5DBOEMTMHTYDWH57MJANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
So this is the raster time taken to delete and paint two tiles, white and cyan. The red portion is the free raste time in a frame. |
Beta Was this translation helpful? Give feedback.
-
I need to add sprite data and a charset to specific ram locations how is this done in Durex Forth? thx I mean so that I have the data in one file without using loadb when the game runs. And how to prevent the game code to overwrite those areas? |
Beta Was this translation helpful? Give feedback.
-
Here you can see what I have done up to now in my game written in Durex Forth: https://youtu.be/MVJj0l9JW5c I have added the vertical movement and animation to baddies. |
Beta Was this translation helpful? Give feedback.
-
Wow! That looks amazing! Great job!
…On Thu, 17 Nov 2022 at 22:50, S Mestre ***@***.***> wrote:
Here you can see what I have done up to now in my game written in Durex
Forth: https://youtu.be/MVJj0l9JW5c
I have added the vertical movement and animation to baddies.
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O3PXEZPPYQY7COEUILWI2SD3ANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have added colour to the tiles: https://www.youtube.com/watch?v=PHorOC0ZlxU One question, I am checking if a value is 1, 2 or 4. what I am doing is:
Is there a better way of doing it? If I use 'case' will it be faster ? thx |
Beta Was this translation helpful? Give feedback.
-
The standard way:
: 124? case
1 of -1 endof
2 of -1 endof
4 of -1 endof
0 swap endcase ;
Not sure its strictly better or just different…
…On Mon, 21 Nov 2022 at 11:56, S Mestre ***@***.***> wrote:
I have added colour to the tiles:
https://www.youtube.com/watch?v=PHorOC0ZlxU
One question, I am checking if a value is 1, 2 or 4. what I am doing is:
dup dup
0 > swap 3 < and swap 4 = or
if
...
Is there a better way of doing it? thx
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O7JNBGMHQFZ2B7PFJDWJNIPXANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
How big is the file now, in kilobytes?
…On Wed, 30 Nov 2022 at 20:45, S Mestre ***@***.***> wrote:
I am using Visual Studio Code on the pc and pasting on vice, so I won't
have problems if I continue to do it like this? I hope so :)
—
Reply to this email directly, view it on GitHub
<#491 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34OZGAQY2UNSCOOKTYHTWK6VF5ANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you are using a PC for text editing, perhaps this technique can be
useful for you? It is a way to configure durexforth to load and evaluate a
given source file automatically at start up:
https://jkotlinski.github.io/durexforth/#_custom_start_up
Then, you would copy the source file to the .d64 image using a program such
as c1541.
…On Thu, 1 Dec 2022 at 09:56, S Mestre ***@***.***> wrote:
11.0 KB (11,304 bytes)
—
Reply to this email directly, view it on GitHub
<#491 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34OY5S7XUCALVFSQTXFLWLBR4VANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Update https://www.youtube.com/watch?v=kVgsS6nDCFM Now it will be the hardest part for me: design levels. |
Beta Was this translation helpful? Give feedback.
-
update : https://youtu.be/_wzHEYgT--4 |
Beta Was this translation helpful? Give feedback.
-
Which zero page addresses are free to use? I need to add a music player to the game but it needs some zp addresses to work. Thanks |
Beta Was this translation helpful? Give feedback.
-
… On Fri, 9 Dec 2022 at 11:20, S Mestre ***@***.***> wrote:
Which zero page addresses are free to use? I need to add a music player to
the game but it needs some zp addresses to work. Thanks
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O26G4OCWUB6OJFGZPLWMMBYHANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just to confirm, as I am not using the editor can I use the memory from $a000 to $cfff for data/machine code? |
Beta Was this translation helpful? Give feedback.
-
Yes, that is correct :-)
…On Fri, 9 Dec 2022 at 11:58, S Mestre ***@***.***> wrote:
Just to confirm, as I am not using the editor can I use the memory from
$a000 to $cfff for data/machine code?
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O5Q256NLLCFTXOKFFDWMMGEDANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I presume that it is not possible to bank out the kernal area $e000 - $ffff?! so I will have to use the irq vectores at $314, $315 instead.. |
Beta Was this translation helpful? Give feedback.
-
It is possible to temporarily swap out the kernal. Look at kernal-in,
kernal-out in gfx.fs
…On Fri, 9 Dec 2022 at 13:36, S Mestre ***@***.***> wrote:
I presume that it is not possible to bank out the kernal area $e000 -
$ffff?! so I will have to use the irq vectores at $314, $315 instead..
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O5MXREOZYIJ6GO6D4DWMMRWPANCNFSM6AAAAAAR4ZU3XI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have a problem with turn-key again The game is working fine when running from the interpreter, but when I do: the file game.prg loads fine and the game loads the files it needs but then it hangs. I tried to use save-pack instead but I get the same result. I am using interrupts and also loading stuff to $a000, $e800,$f000: Any clue to what might be happening here? Thanks |
Beta Was this translation helpful? Give feedback.
-
Yes, I paste all the code in the interpreter, I think this way all is
compiled no?!
…On Sun, Oct 22, 2023 at 9:21 PM Whammo ***@***.***> wrote:
Compile everything before overwriting the dictionary?
—
Reply to this email directly, view it on GitHub
<#491 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI4D5DAYJ5MZYFBYT6RA4OLYAV535AVCNFSM6AAAAAAR4ZU3XKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGNJSHA4TK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
it worked fine when using: : build save-prg run start @ execute ; run is the word to launch the game So what can be causing the problem when using to save the program file?: ' run start ! thanks |
Beta Was this translation helpful? Give feedback.
-
I have found the problem! I was using ' irq inside a word, instead of ['] irq |
Beta Was this translation helpful? Give feedback.
-
Nice find!
tis 24 okt. 2023 kl. 22:55 skrev S Mestre ***@***.***>:
… I have found the problem!
I was using
' irq
inside a word, instead of
['] irq
—
Reply to this email directly, view it on GitHub
<#491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O42J7NXH3TO2OBP3GLYBATMTAVCNFSM6AAAAAAR4ZU3XKVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TGNZUGUYTS>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
I have found why I was getting the error
I was using the durex forth cartridge and I needed the disk to include turnkey !
and I have an executable now working.