Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:59 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 4 state linear automata

Author Message
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 02:49am 26 Nov 2020
Copy link to clipboard 
Print this post

Here's my first project/contribution. Not a game  , perhaps I will make a game someday...something....not flashy/fancy...at least not for a while.

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: Canada
Posts: 1132
Posted: 04:49am 26 Nov 2020
Copy link to clipboard 
Print this post

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 States
Posts: 167
Posted: 09:21am 26 Nov 2020
Copy link to clipboard 
Print this post

  vegipete said  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!  


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 Kingdom
Posts: 10310
Posted: 09:43am 26 Nov 2020
Copy link to clipboard 
Print this post

This is a bug I introduced fixing a bug. Please wait for b6 later today
 
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 11:27am 26 Nov 2020
Copy link to clipboard 
Print this post

  matherp said  This is a bug I introduced fixing a bug. Please wait for b6 later today


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 States
Posts: 167
Posted: 01:51am 03 Dec 2020
Copy link to clipboard 
Print this post

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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025