ZX81 Toddy Forth-79
Re: ZX81 Toddy Forth-79
How large of a program can Toddy Forth-79 handle?
Re: ZX81 Toddy Forth-79
Depends on how big you want your dictionary to be.
A fresh install without any of the extensions added has 13846 bytes free. Personally I have the doubles extension plus a few added permanent definitions of my own and have about 9k to play with which for Forth is quite a useful amount, considering that if you cannot do what you want in a couple of K with Forth then something's wrong with whatever you are trying to program.
I have routines to calculate things such as time dilation,energy yields for a given mass using the E = mc2 equation,pendulum period/frequency and various other scientific routines and these seldom take more than a screen or a couple of K tops.
A fresh install without any of the extensions added has 13846 bytes free. Personally I have the doubles extension plus a few added permanent definitions of my own and have about 9k to play with which for Forth is quite a useful amount, considering that if you cannot do what you want in a couple of K with Forth then something's wrong with whatever you are trying to program.
I have routines to calculate things such as time dilation,energy yields for a given mass using the E = mc2 equation,pendulum period/frequency and various other scientific routines and these seldom take more than a screen or a couple of K tops.
Re: ZX81 Toddy Forth-79
It's like Moggy said above, initially you have 13846 bytes available for the dictionary which is already a fair amount considering that Forth is much more compact than BASIC. But this value can be changed if you need more space at the expense of a decrease in the size of the area allocated to the RAM disk. See section 11.4 of the User Guide for more details on how to do it and also Appendix B for the memory diagrams.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Re: ZX81 Toddy Forth-79
Awesome thank you. I wrote a port of Jet Pac (Spectrum) for the TI 99/4A in TurboForth a few years ago ( https://youtu.be/HZZ2pu5BrF4 ) and I was really impressed by the capabilities of Forth, so I'm hoping to develop something for the Zeddy in Forth as well.
Re: ZX81 Toddy Forth-79 - New fix release
Hello guys!
After a long time away and motivated by this video on YouTube, I turned my attention to the TF79 and ended up discovering issues in the behavior of the words INKEY and WAIT, which motivated a new release.
I also took the opportunity to correct what I now recognize was a bad decision: the existence of two versions (UDG and NOUDG). The new TF79 release unifies these two versions, facilitating the operation and maintenance of the system.
The use of UDG characters is now switched by the word CHR$128, modified to incorporate the new functionality, as can be seen in the video below.
As usual, the download is available in the first post.
After a long time away and motivated by this video on YouTube, I turned my attention to the TF79 and ended up discovering issues in the behavior of the words INKEY and WAIT, which motivated a new release.
I also took the opportunity to correct what I now recognize was a bad decision: the existence of two versions (UDG and NOUDG). The new TF79 release unifies these two versions, facilitating the operation and maintenance of the system.
The use of UDG characters is now switched by the word CHR$128, modified to incorporate the new functionality, as can be seen in the video below.
As usual, the download is available in the first post.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Re: ZX81 Toddy Forth-79
Thanks Kelly for this, I did have some problems at first but they were all down to me and now all is good.
Re: ZX81 Toddy Forth-79
I saved the kernel and a changed chr$ set using 8192 8192 BSAVE >TF79.BIN but upon reloading the chr$ set still defaults to the system font not my changed font and I have to change it manually every time.
Saving using 8192 8192 BSAVE >TF79.BIN works ok in v113 and always boots up with the changed font but this version does not.
Also using 0 chr$128 does not switch of the UDG's, it is stuck in 1 chr$128 mode all the time.
Saving using 8192 8192 BSAVE >TF79.BIN works ok in v113 and always boots up with the changed font but this version does not.
Also using 0 chr$128 does not switch of the UDG's, it is stuck in 1 chr$128 mode all the time.
Re: ZX81 Toddy Forth-79
COLD start with ROM characters (1E00h), to initialize with UDG characters make the following change:
61 15215 C!
8192 8192 BSAVE >TF79.BIN
Now the system will boot using UDG characters in CHR$128 mode (128 unique characters).
The word CHR$128 switches between 64 and 128 character modes, but always takes into account the content of address 16420. So when using it, make sure that this address contains the desired value (30 for ROM characters, or 60 for characters stored in 15360).Also using 0 chr$128 does not switch of the UDG's, it is stuck in 1 chr$128 mode all the time.
The INKEY fix affected the Editor requiring it to be changed, so use the new ones (EDITOR.F79, EDASM.F79 and EDHGR.F79) provided with the new version.
Last edited by kmurta on Sun Mar 03, 2024 11:40 pm, edited 1 time in total.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
Re: ZX81 Toddy Forth-79
Thanks Kelly all's good many thanks for quick reply.
PS what was the problem with INKEY and the editor? I never had a problem with the editor I have say worked ok for me.
Try this little compilation...
1 GET FRAME
1 LOAD
FRAME1
BEST IN INVERSE MODE.
Just realised I created two words not in the vocab' for this they are....
: CLS PAGE ;
and
: BRK ?TERMINAL IF LEAVE THEN ;
Either create them or edit them out of the compilation.
PS what was the problem with INKEY and the editor? I never had a problem with the editor I have say worked ok for me.
Try this little compilation...
1 GET FRAME
1 LOAD
FRAME1
BEST IN INVERSE MODE.
Just realised I created two words not in the vocab' for this they are....
: CLS PAGE ;
and
: BRK ?TERMINAL IF LEAVE THEN ;
Either create them or edit them out of the compilation.
- Attachments
-
- FRAME.P
- (6 KiB) Downloaded 26 times
-
- 360_F_217188426_smgwnDFnQC5DHQ8mKGkdsMO7oDDP5nZn.jpg (22.95 KiB) Viewed 1076 times
Re: ZX81 Toddy Forth-79
In fact, it was the correction of the INKEY problem that affected the EDITOR, so it was necessary to change it by replacing INKEY with a direct call to the keyboard reading routine.
Basically the problem was that when holding down a key during a loop with INKEY, the values of 0 and the key code were returned alternately, when only the code of the pressed key was expected.
Very cool and nice effect!Try this little compilation...
Tips:
- You don't need the first 5 lines, TF79 includes the words RAND and RND to generate random numbers. Check section 1.9 of the manual.
- The word BRK is also unnecessary since any program running in SLOW can be interrupted with SHIFT-SPACE. Try this:
: INFINITELOOP 0 BEGIN DUP . 1+ AGAIN ;
INFINITELOOP
and when you want, press SHIFT+SPACE to stop execution.
I find it strange that you use the .p extension for the block file, I personally prefer to use .BLK to differentiate it from a common program. But I imagine it is a matter of your preference, since ZXpand automatically adds the .p when the extension is not informed, so, it´s ok.
1 x ZX81, 2 x TK85 , 1 TK82C, 1 TK95, 1 x Alphacom 32 printer, 1 x ZXpand
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
http://zx81.eu5.org
https://toddysoftware.itch.io/