SamCoVT / TaliForth2

A Subroutine Threaded Code (STC) ANSI-like Forth for the 65c02
Other
29 stars 7 forks source link

Simplify platform config, add KEY? support #90

Closed patricksurry closed 5 months ago

patricksurry commented 6 months ago

Based on my own experience, it seemed like it would simplify custom configuration to move a bunch of the default platform settings into definitions.asm, and a lot of the documentation into README.md.

I also made c65's getc non-blocking to match py65mon, and added kbhit support for both to illustrate how to implement KEY? with kernel buffering (pymon) or simple kbhit (c65).

Wanted to get your opinion on it before I went too far.

Wasn't sure the best way to test KEY? in automated tests - interactively I used : foo 0 begin 1+ key? until key ; to test both py65mon and c65 platform. You can really see the speed difference there.

Fix #87 Fix #86 Fix #84 Fix #62

patricksurry commented 6 months ago

If you like the refactoring to definitions/README we could probably remove a bunch of boilerplate from the other platform files, tho hard to test the changes I guess

SamCoVT commented 6 months ago

I can test several of the other platforms, and for the remainder, we just make sure it compiles and has Tali at the same starting location. Some platforms put Tali in different places, and I believe one has the "RAM" dictionary AFTER tali instead of before (eg. Tali loads at a low address). That may make the "memory arrangement" section of the platform file a bit difficult to move.

SamCoVT commented 5 months ago

Is this ready to merge?

patricksurry commented 5 months ago

Yes, if it looks good to you. I built all the platform variants without errors tho can't test most of them.