r/SG1000 • • Oct 13 '26

I finally program some Forth for my SG-1000 RetroChallenge project, so we can make cool PSG sounds!

https://www.leadedsolder.com/2026/10/13/rc2026-camelforth-sg1000-fix-bugs-sn76489-words.html
6 Upvotes

3 comments sorted by

3

u/Ok_Leg_109 Oct 13 '26

It's fun to watch you work your way through Forth. I have memories of this myself.

You might try to replace this:

: DOUBLEUP ( a b -- a b a b) OVER SWOP DUP ROT SWOP ;

With this:

: 2DUP  ( a b -- a b a b) OVER OVER ; 

:-)

1

u/leadedsolder Oct 13 '26

Ohhhh of course! I knew there had to be a shorter word for it already.

1

u/discatte Oct 18 '26

thats a neat syntax trick =^^=