![]() |
Forum Index : Microcontroller and PC projects : 4 state linear automata
Author | Message | ||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Here's my first project/contribution. Not a game ![]() So, this is like Life...but different. I learned about this back in 1988, from Transactor Magazine, for Commodore 8 bit and later 16 bit computers. I typed in the program and played with it for a while...struggled to understand the assembly code and over the years since, I've written this program for Palm OS, using a Pascal language, the still in development Commander X16, 'Commodore' retro computer, for the emulator, using an obscure language - cross compiler, developed for the SCPU 64, called Slang and now for the CMM2, using BASIC. The program has been tested pretty thoroughly using the mouse, less well using the keyboard, but I think I have the bugs out. I still have a few thoughts about some refinements, but it's otherwise complete! Just another time waster...looking at interesting, computer generated images. Steve automata.zip |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Interesting. This might be like a Computer Science 100 assignment I had in the 80's. I say 'might be' because I can't actually run the program. ![]() It errors on the two lines with pixel px%(),py%(),row%() (lines 327 and 333)This is with firmware CMM2V5.06.00b4 I like the file selection dialog! ![]() Visit Vegipete's *Mite Library for cool programs. |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
I was waiting for something like this, I'm only on b2. I'll flash b4 and see if there is anything I can do to fix it....perhaps temporarily ditch using the array method...which did give me a nice bump (relatively) in drawing time. If the old way works, I can add some logic to use the one that works, based on the firmware. It could use a csub routine for drawing, which would likely make using arrays in pixel look slow, but I haven't gone down that rabbit hole yet. Steve |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10310 |
This is a bug I introduced fixing a bug. Please wait for b6 later today |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Thanks Peter! Works with 5.06 beta 2 and now beta 6. I added a check for firmware version, with note about b2 & b6, since we only get 5.06 from mm.info(version). Steve automata_1.zip |
||||
yock1960 Senior Member ![]() Joined: 18/08/2020 Location: United StatesPosts: 167 |
Here is a new version, that incorporates a CSUB for the calculations to determine inheritance from row to row. This is a good example of how CSUBS can really speed up portions of the MMBASIC code, that are slower than you might like. In this case, the CSUB speeds up the drawing of the automata display window by about 45x. It wasn't too painful, especially with the help of Peter, Leo, Epsilon & Jiri, to get me over the bumps! Steve automata_1.zip |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |