Colour Maximite 2 - 3D BASIC Engine
Michael Gilligan | 15/12/2020 17:55:30 |
![]() 23121 forum posts 1360 photos | Posted by Michael Gilligan on 15/12/2020 13:36:03:
[…] No idea if they ever made it to the Internet. . ’ere we go ... **LINK** http://www.figuk.plus.com/articles.htm MichaelG. |
Frances IoM | 15/12/2020 18:16:56 |
1395 forum posts 30 photos | dave think about palindromes of octal number the set is 0,1,2,3,4,5,6,7 to add 4 to 2 move the index from 2(assuming set starts from index 0) then move 4 positions, adding 6 to 2 will wrap around in set thus triggering a carry thus the structures needed are (n,array of digits[index set 0..n-1) - adding 2 of these structures needs n to be equal (if not a copy into a larger array is needed) - the carry array is always on size n+1 and may have 1 in several positions this if carry set not all zero first extend the addition to size n+1 + add carry and repeat whilst carry set not all 0. |
IanT | 15/12/2020 21:26:15 |
2147 forum posts 222 photos | Posted by Frances IoM on 15/12/2020 18:16:56:
dave think about palindromes of octal number the set is 0,1,2,3,4,5,6,7 to add 4 to 2 move the index from 2(assuming set starts from index 0) then move 4 positions, adding 6 to 2 will wrap around in set thus triggering a carry thus the structures needed are (n,array of digits[index set 0..n-1) - adding 2 of these structures needs n to be equal (if not a copy into a larger array is needed) - the carry array is always on size n+1 and may have 1 in several positions this if carry set not all zero first extend the addition to size n+1 + add carry and repeat whilst carry set not all 0.
IanT |
Frances IoM | 15/12/2020 21:50:02 |
1395 forum posts 30 photos | IanT - I'm old - Honeywell 316 + 516s - one of my home computers is in the Science museum collection (long story but one of the first UK built machines - 68008 based running a variant of Unix in the late70s) |
Gerard O'Toole | 16/12/2020 06:58:31 |
159 forum posts 13 photos | Posted by IanT on 15/12/2020 13:03:35:
'Starting Forth' by Leo Brodie - the classic intro book for learning Forth. Can be found here as a PDF or online version. The illustrations really help to understand stack manipulation in an amusing way. Regards, IanT
I just found my old copy. A bit battered but all there. Now to see if i can make any sense of it |
Gerard O'Toole | 16/12/2020 16:34:39 |
159 forum posts 13 photos | Not as concise as Python but works . ( C#) On 196 problem , the highest integer before crashing was was 7197636720180367016 , using Int64 and highest value using Int32 is set at 2,147,483,647 I was surprised at the number of integers which became palindrome after only one loop. |
SillyOldDuffer | 16/12/2020 17:40:36 |
10668 forum posts 2415 photos | Posted by Gerard O'Toole on 16/12/2020 16:34:39:
... On 196 problem , the highest integer before crashing was was 7197636720180367016 , using Int64 and highest value using Int32 is set at 2,147,483,647 I was surprised at the number of integers which became palindrome after only one loop. Looks good to me, and I think it can be souped up. Never done C# myself, but I believe C# strings can be longer than telephone lines while BigInteger does arbitrarily big arithmetic. Maybe simply substituting BigInteger for Int32 in your declarations will allow the program to generate monster numbers? After working out how to reverse and add huge numbers the next challenge is to it efficiently which my attempt isn't. Your C# program is likely faster than mine because C# reverses strings directly, whereas I convert between lists and strings, an awful spiralling overhead as the number of digits grows. Most numbers quickly become palindromic, some take many reversed additions before a palindrome appears, and a few - like 196 - might never produce a palindrome. No one knows! Mathematicians find it an interesting problem, I think it's a good way of stressing computer languages. Dave |
Frances IoM | 16/12/2020 17:52:25 |
1395 forum posts 30 photos | Dave - I pointed out that you never treat as 'integer's of any size but always treat as a string of 'digits' of whatever radix you want to play with - one simple approach is to use a struct (length,array[max length]) and add in place |
SillyOldDuffer | 16/12/2020 20:46:52 |
10668 forum posts 2415 photos | Posted by Frances IoM on 16/12/2020 17:52:25:
Dave - I pointed out that you never treat as 'integer's of any size but always treat as a string of 'digits' of whatever radix you want to play with - one simple approach is to use a struct (length,array[max length]) and add in place I'm on the case Frances! My comment about Gerard's program is separate. Just that by replacing his Int32 with BigInteger declarations I think it will do big numbers! I'm musing on how best to code your method: a c++ class (struct on steroids!) feels right, probably with a vector rather than array so it can grow. Dave
|
Frances IoM | 16/12/2020 21:51:25 |
1395 forum posts 30 photos | Dave - simplest is a fixed size array, this will however limit the maximum number of digits in any derived number but an array of bytes will suffice as long as there is a check that the maximum is not exceeded. Personally (I guess I ought to code it but don't have any C compiler set up on this machine which is used foe email, but more for database work on WW1 internees with limited browsing when I get bored with such work. My own feeling is just to use a simple C struct of byte(holding length of sequence), + byte array[size less that 255] another similar struct is used to hold overflows from addition of two digits and then added to the derived sum (any carrys noted and added ad repitum until carry array = 0 or overflows max length |
Another JohnS | 16/12/2020 22:23:53 |
842 forum posts 56 photos | Posted by Frances IoM on 15/12/2020 21:50:02:
IanT - I'm old - Honeywell 316 + 516s - one of my home computers is in the Science museum collection (long story but one of the first UK built machines - 68008 based running a variant of Unix in the late70s) Well, my shared Virtual Reality stuff is in the Canadian Science and Tech museum; I can confirm that by the time I created this stuff, we were well and truly into Hexadecimal. (I remember the 68008 being released - are you sure about the decade? I would have pegged it later; in the 70s, it was almost all 8 bit processors, if I remember that far back correctly) (no matter, those were the fun days; I loved the 1802 because as a kid, I could single step it and debug the hardware with only a really inexpensive analogue volt meter) |
Frances IoM | 16/12/2020 22:45:55 |
1395 forum posts 30 photos | It was very early it may have been in first yrs of the 80's - certainly by 82 at latest - what the science museum got was a working machine built from the surviving working models, but I know mine was in full working order when I swapped it with the company for a 286 system so I assumed most of the gift was my machine - I was a consultant and paid towards my machine (meant I was free to use it for other purposes (I wrote cross-assembers in C for use in teaching lab + later on a set of tools for a universal cross assembler for industrial use) - I know I was first staff member to have a home computer that was not a toy tho by current standards it was slow, I still have the CRT terminal) - I think the company (only a small startup) had the machines a few months before me - the operating system was IDRIS - a unix 'lookalike' by a guy who left Bell labs - Bill Plauger rings a bell but it was 40 yrs ago + my memory is not what it was Edited By Frances IoM on 16/12/2020 22:48:37 |
Another JohnS | 17/12/2020 00:04:16 |
842 forum posts 56 photos | Posted by Frances IoM on 16/12/2020 22:45:55:
It was very early it may have been in first yrs of the 80's - certainly by 82 at latest - what the science museum got was a working machine built from the surviving working models, but I know mine was in full working order when I swapped it with the company for a 286 system so I assumed most of the gift was my machine - I was a consultant and paid towards my machine (meant I was free to use it for other purposes (I wrote cross-assembers in C for use in teaching lab + later on a set of tools for a universal cross assembler for industrial use) - I know I was first staff member to have a home computer that was not a toy tho by current standards it was slow, I still have the CRT terminal) - I think the company (only a small startup) had the machines a few months before me - the operating system was IDRIS - a unix 'lookalike' by a guy who left Bell labs - Bill Plauger rings a bell but it was 40 yrs ago + my memory is not what it was Edited By Frances IoM on 16/12/2020 22:48:37 Ok, that makes more sense - I left high-school (Canada) in 1978 and University in 1982, and a lot changed in that time. That's how I remember time-frames - In high school it was the 1802 and 8080, by the end of University, it was totally changed. Things went quickly back then. (I guess they do today, too). Many years ago, I was on an overnight train (would have been autumn/winter 1982, maybe spring 1983) I went on an overnight train here in Canada (almost 9 hours long journey), almost nobody on it. My task was to further a S-100 bus-based 1802/8085 computer, wire-wrapped. The old crusty conductor (they were all crusty old conductors back then) came by and said in the typical gruff voice "What you building, a Bomb??" I said "Yeah", his answer "Good luck" and kept on walking, checking to see if anyone was likely going to give him trouble. These days, that cocky little kid would be taken down by a SWAT team or something equivalent. Sigh!
|
SillyOldDuffer | 17/12/2020 10:01:22 |
10668 forum posts 2415 photos | Posted by John Alexander Stewart on 16/12/2020 22:23:53:
Posted by Frances IoM on 15/12/2020 21:50:02:
IanT - I'm old - Honeywell 316 + 516s - one of my home computers is in the Science museum collection (long story but one of the first UK built machines - 68008 based running a variant of Unix in the late70s) ... I remember the 68008 being released - are you sure about the decade? I would have pegged it later... Memory's unreliable but I think you're both right. Late 70's I was a data processing department customer focussed on the future of microcomputers as office tools. The machines of the day were useful, but puny, but I saw no reason why they wouldn't eventually rule the world. (Mainframe colleagues disagreed violently!) I was much taken with the promise of the Motorola 68000 family but they existed on paper long before hitting the street. Motorola must have had trouble making them in volume because they took years to arrive, and cost more than expected. Delayed so long that Intel grabbed the PC market by releasing the 8088 and successors, running MS-DOS and Windows. Intel's chips may have been technically inferior, but they worked and you could buy them. The computing world would be very different had Motorola delivered the powerful 68000 family on time: we would all have gone UNIX, and Microsoft would never have existed! Dave |
Frances IoM | 17/12/2020 10:02:44 |
1395 forum posts 30 photos | Wire wrapped systems were great until you made a mistake usually discovered after you had wired another lead to the same post - then it could be 100x the time to correct the fault. The 68008 system also used the S100 bus - probably the most mismatched scheme possible but I guess it allows use of existing boards. Edited By Frances IoM on 17/12/2020 10:03:06 |
Roger Hart | 17/12/2020 12:17:35 |
157 forum posts 31 photos | @SOD, liked the palindrome, put it into my list of pythons. Reminded me of back pages of Sci Am way back. Anyone know how the CMM2 produces VGA. Is it some kind of fast loop does it use dma? Just curious, not really sure if I want to spend too much time on a VGA gadget, but I have a vga screen that has been kicking round the shop for too long.
|
IanT | 18/12/2020 16:53:57 |
2147 forum posts 222 photos | Posted by Roger Hart on 17/12/2020 12:17:35:
Anyone know how the CMM2 produces VGA. Is it some kind of fast loop does it use dma? Just curious, not really sure if I want to spend too much time on a VGA gadget, but I have a vga screen that has been kicking round the shop for too long. Hi Roger, The VGA graphics are generated by the underlying hardware but much of the 'programable' functionality is built into the BASIC engine. The CMM2 is built around a single 'Waveshare' MCU chip, which uses a Cortex-M7 32-bit RISC CPU core, running at 480Mhz and producing 1027 DMIPS. The MCU also has a double-precision FPU and Chrom-ART graphic accelerator. So just about every 'hard' feature of the CMM2 is on the MCU chip with just a few external components to enable connections to the real world. MM Basic is closely coupled to this hardware platform, meaning that it has direct access to the 'metal' and whilst firmware upgrades have been happening pretty regularly, the MCU provides a well defined (e.g. fixed) hardware reference to base these upgrades upon. The VGA graphics are a good example, with a combination of very fast hardware combined with firmware designed to get the best out of it. In many ways I think that's why the "Retro" guys like the CMM2 so much - it's like the 80's consoles (such as C64, Atari and Amiga etc) which were specific (e.g. stable) hardware platforms that could be explored and further 'tweeked'. There are disadvantages to devices like the RPi where both the OS and underlying hardware are constantly evolving - for some, they also present a constantly moving target... Not really my thing but the retro-gamers are re-coding old 80's games (in Basic) and getting 30 frames per minute performance (it was originally half that). They've also recently introduced 3D graphics commands into the CMM2's Basic which are based on advanced MATH functions that I (frankly) don't understand but which apparently have all sorts of other useful applications. The key thing is that MMB is implemented to get the best from it's platform - be that a tiny 28 pin MicroMite or the CMM2. There's nothing in-between to suck performance away. Many might see that as a major disadvantage but clearly some do not - and that is who this little box of tricks is for. With regards VGA/HDMI - there are a lot of adapters around ranging from a fiver upwards. CMM2 owners seem to like the GANA boxes which are a bit more (about £12 on Amazon). I've got several older VGA monitors that still work very well and in fact I use an HDMI to VGA converter to connect my Pi 3B to one. Regards, IanT Edited By IanT on 18/12/2020 16:56:35 |
Brian Smith 1 | 27/04/2023 18:24:40 |
15 forum posts 1 photos | I'll pass this on as an interesting video Program like a rockstar...
|
SillyOldDuffer | 28/04/2023 09:11:26 |
10668 forum posts 2415 photos | Posted by Brian Smith 1 on 27/04/2023 18:24:40:
I'll pass this on as an interesting video Program like a rockstar...
Wow! Thanks for that/ Trouble is, it made me feel stupid. I knew about Game of Life the time, but just thought it was just an interesting novelty. Ditto Mandlelbrot. Forty years later I find out clever chaps have taken computer science to a whole new level, whilst I was plodding along... I'm not musical but Sonic Pi has got to be tried! (The website implies it's only available for Mac, Windows, and Raspian: not so - it's in the standard Ubuntu repository.) Dave |
Bazyle | 28/04/2023 11:29:33 |
![]() 6956 forum posts 229 photos | "sound of code". Anyone else remember attaching an amp to chip select lines to get a feel for whether the computer was accessing the right bits of memory? Interesting that despite the advances in computing people inventing new programming systems still resort to stilted syntax. Nowadays their simple example 'haunted bells' should, instead of several awkward code phrases, be an English sentence like "play random bell sounds". Roll on AI. |
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.