
Ice-forth: A self-hosted Forth on the 6502 for creating NES cartridges - todsacerdoti
https://github.com/RussellSprouts/ice-forth
======
pubby
Wow, the big innovation here is that it's self hosted on a system with no
disk. I don't think there's anything like it on the system - it's really an
impressive feat.

FORTH on the 6502 has been done a few times before. There's a fellow named
Garth Wilson who is sorta the self-proclaimed 6502 FORTH guru. He has a
website here if you wanna learn more:
[http://wilsonminesco.com/stacks/](http://wilsonminesco.com/stacks/)

I actually wrote my own FORTH for the system before. My language wasn't very
usable, but what impressed me the most was how quickly I could put it
together. In just an hour and 100 lines of code, I had a fully featured
compiler for a turing-complete language. You can't do that for many languages
but FORTH!

~~~
GarthWilson
Garth Wilson here. Self-proclaimed Forth guru, um...no; enthusiast and user,
definitely. The 6502 Forth I'm using is one that was modified from fig-Forth
to Forth-83, and then I further modified it and added a lot to it, including
zero-overhead interrupt service in high-level Forth, as described in one of
the first articles I ever wrote, at
[http://wilsonminesco.com/0-overhead_Forth_interrupts/](http://wilsonminesco.com/0-overhead_Forth_interrupts/)
.

My 65816 Forth however is something I did pretty much from scratch in the
mid-1990's and has sat collecting dust most of the time since then, but I have
recently pulled it out and implemented a the major upgrade of easy
installation and management of low-overhead prioritized interrupts in both
assembly language and high-level Forth. This was quite a challenge to debug,
because until the new interrupt system was working, there wasn't the
interactiveness that makes Forth so quick to develop in.

There's so much optimizing that can be done on the '816 compared to the '02,
since its ability to handle 16 bits at a gulp takes the memory penalty out of
turning secondaries into primitives. It's actually easier to write for the
'816, and my '816 Forth runs two to three times as fast as my '02 Forth at a
given clock rate. I hope to eventually it ready for publication.

------
Andrex
I would prefer "cartridge" be replaced by "ROM" or "image."

"Creating a NES cartridge" in my mind involves 3D printing and/or some
hardware.

Apologies for the pedantry. This is a really cool project.

~~~
russellsprouts
Fair point, updated it along with some issues in the README

~~~
Andrex
Thank you for being gracious!

------
MaxBarraclough
See also gbforth, a Forth for the original GameBoy.

[https://gbforth.org/](https://gbforth.org/)

------
frompdx
Very interesting project. I recently decided to pick up Forth by reading
Starting Forth and Thinking Forth. I mostly use FlashForth to program an
Arduino Uno. It's great to see the continued interest and innovation around
Forth.

If you are thinking of learning Forth, it is worth the journey.

~~~
MaxBarraclough
Forth turns up on HackerNews surprisingly often if you're keeping an eye out
for it.

