Swissmicros DM41X FORTH Firmware with N-Queens, Graphics, Sound and Snake Game

  Рет қаралды 3,296

Calculator Clique

Calculator Clique

Күн бұрын

Пікірлер: 36
@davidlopanful
@davidlopanful Жыл бұрын
cool. forth the language that will never die
@CalculatorClique
@CalculatorClique Жыл бұрын
Yes, there's still a large FORTH community out there. Checkout the Forth2020 Facebook group if you are interested in what people are currently doing with FORTH.
@johan0234523
@johan0234523 Жыл бұрын
That looks really cool! I think it's time to dig out my DM41X again :-)
@johan0234523
@johan0234523 Жыл бұрын
And running :-)
@CalculatorClique
@CalculatorClique Жыл бұрын
Great to hear 😊. Let me know how you go - there's definitely room for improvement and likely some bugs 🐛
@rideon41
@rideon41 Жыл бұрын
This is awesome, looking forward to playing with it!
@CalculatorClique
@CalculatorClique Жыл бұрын
Thanks - let me know how you go
@johan0234523
@johan0234523 Жыл бұрын
@@CalculatorClique where did you get the DM41.pgm from?
@CalculatorClique
@CalculatorClique Жыл бұрын
I extracted it from the firmware .bin file using the Mac / Linux command dd. The format is detailed at github.com/swissmicros/DMCP_SDK/tree/master/keymap_utils#making-dmcppgm-combo. Let me know how you go and I can dig out the exact command I used if necessary.
@hegedusuk
@hegedusuk Жыл бұрын
I used to - in the 1980s - write n-queens programs for different languages and devices to work out how fast they were. My 'AO' level (at age 16) computer studies project was to write an n-queens program in Algol-60. my program used to calculate how many solutions there were for an n-size board (92 for 8x8) and I remember taking it to extremes on the HP-71 with it written in FORTH and Assembler. The code is lost now, and I can't remember how long it took other than about 20 seconds to find the first solution. I'd go and buy a DM41X just to be able to play around with FORTH on a small device again. I have a DM42 actually. Anyway, excellent video. As a fellow calculator nerd, I salute you!
@CalculatorClique
@CalculatorClique Жыл бұрын
Very interesting. I used a lot of programming languages in uni, including IBM 370 assembler, but have never used Algol-60. Checkout the Calculator Benchmark link in the video description for a number of different versions of N-Queens including FORTH versions. Although the program should run on the DM42 it would need significant modification to support the different keyboard layout and softkeys. I don't have a DM42 to test and look into it unfortunately.
@N.A._McBee
@N.A._McBee Жыл бұрын
Excellent work, thanks for sharing! Will definitely give it a try!
@CalculatorClique
@CalculatorClique Жыл бұрын
Thank you. Let me know how you go.
@N.A._McBee
@N.A._McBee Жыл бұрын
@@CalculatorClique Not so good right from the start ;) Seriously, I remember times when Swissmicros offered the DCMP and the calculator software (DM41.pgm) separately. But they don't do this anymore. So, before I start further experiments, how did you create DM41.pgm? How can I extract this from the current bin file? Thanks for your help!
@N.A._McBee
@N.A._McBee Жыл бұрын
@@CalculatorClique Second, when I try to load FORTH.pgm on my DM41X, it shows only the line "File: FORTH.pgm", then 3 lines at the bottom: 1. Program load error: 2. Cannot open file. 3. Press any key. That's it. What can I do? The filesize is 48K like it should have according to your video.
@N.A._McBee
@N.A._McBee Жыл бұрын
@@CalculatorClique And just a friendly suggestion: Why not upload the whole stuff to github? Wouldn't that be the place to keep it? Just an idea...
@CalculatorClique
@CalculatorClique Жыл бұрын
Firstly, thank you for trying to test this, you are the first person I've heard from that has, much appreciated! I have added the md5 hash to the video description so please check that your downloaded FORTH.pgm matches (and maybe check the one on your calculator by copying it back to a PC). You can use md5sum on a Mac or certutil on Windows to do this. Are you running the latest DMCP firmware for your DM41X? The firmware file is DMCP_flash_3.20_DM41X-2.1.bin and the calculator will list "DMCP v3.20" when you choose About. To extract DM41.pgm I used the information at github.com/swissmicros/DMCP_SDK/tree/master/keymap_utils#making-dmcppgm-combo. Let me know how you go.
@JSRFFD2
@JSRFFD2 11 ай бұрын
This is an interesting project. It looks like you've done a good job to improve ergonomics of programming on the calculator. Are you considering releasing the source code?
@CalculatorClique
@CalculatorClique 11 ай бұрын
Thanks 😊. Yes, I do intend to release the source code once I've cleaned it up a bit, it's on my todo list 😂
@LeicaM11
@LeicaM11 Жыл бұрын
This seems to be great. I don’t understand everything, but I am Happy to see graphics and the possibility for using display pixels, I am missing so hard with standard DM41X. Imdb not understand, why Swissmicros did not donate an access to pixels via some new commands. I really,would,appreciate that! You seem to have done an incredible job. Would you please explain, how you did that?
@CalculatorClique
@CalculatorClique Жыл бұрын
Swissmicros developed a programming environment for their hardware called DMCP which they use to create their various calculator emulators and simulators. DMCP is available along with some sample code (and the full DM42 implementation) on the Swissmicros Github so you can learn how to use it and develop your own programs for the Swissmicros hardware which is what I did to get FORTH running on the DM41X hardware. DMCP includes display pixel access, text display with various fonts and access to most of the hardware features easily from C or C++ programming languages. Regarding making full display access available from the DM41X, they have implemented an emulator so it basically runs the original system ROMs (and optional plugin ROMs) and adding commands would require space (in the 41C architecture) and would change the way it works from the original. I believe space is an issue in doing this and many would not want the original functionality changed. Have a look at the Swissmicros forums as this does come up from time to time.
@merlin7766
@merlin7766 Жыл бұрын
Fantastic video, I would like to use this calculator as an interface to. Microcontroller for debug info. I am a pretty good ‘c’ programmer. Can you assist me in the c compiler used and how to manage the display and keyboard etc from within the program👍
@CalculatorClique
@CalculatorClique Жыл бұрын
Thank you for the feedback, much appreciated 😊. I have added details and links to the video description for the tools I used, DMCP documentation and example code on the Swissmicros Github site. Let me know how you go.
@brianodell4530
@brianodell4530 11 ай бұрын
This is really cool. Have you setup a repository for the code? Can't find it on github. Depending on your License, I'm very interested in modifying the keyboard layout for the DM42. I have a DM42, not a MD41, unfortunately for me in this case.
@CalculatorClique
@CalculatorClique 11 ай бұрын
Thanks 😊. Yes, still planning to setup a repository but want to tidy up the code a bit first as I threw it together pretty quickly. I’ve been side tracked by other things. What were you thinking of doing for use on the DM42 keyboard?
@brianodell4530
@brianodell4530 11 ай бұрын
I think you responded to another comment indicating the key layout in DMForth mimics the dm41 keyboard. I’d like to take your work and make a dm42 version perhaps altering the expected keys to better match that calculator’s keyboard.
@CalculatorClique
@CalculatorClique 11 ай бұрын
Ok, I’ve just had a closer look at the DM42 keyboard and manual and the improved alpha input mode (over the original 42S) looks good and should make this pretty easy to do and as useable as on the DM41X. Sounds like a plan 👌🏻
@hide-347
@hide-347 5 ай бұрын
Any updates on a github repo for this yet?
@CalculatorClique
@CalculatorClique 5 ай бұрын
Sorry, I haven't got back to it yet as I've moved on to other projects. In the meantime, if you've started developing something yourself and have any questions then feel free to email me and I'll answer as best I can and provide code snippets.
@autoauto2000
@autoauto2000 11 ай бұрын
i love forth…is this working on the 42
@CalculatorClique
@CalculatorClique 11 ай бұрын
Hi, I love FORTH too 🤓. DM-FORTH will load and run on the DM42 (you will get a hardware check error which you can just proceed past), however, the keyboard layout and keycodes are different so it will be difficult to use. I used the DM41X / 41C keyboard layout as much as possible so an overlay is not required. I don't have a DM42 to test and workout the best way to do the keyboard. If you want to test and let me know how you think it could work on the DM42 I might be able to do it without the hardware (no promises though 😊). Getting rid of the hardware warning is easy.
@N.A._McBee
@N.A._McBee Жыл бұрын
When you try this and give DM-FORTH a shot, put the FORTH.pgm file into the DM41X's root directory! Otherwise it cannot be loaded correctly.
@eekee6034
@eekee6034 Жыл бұрын
I've been slowly making plans for a pocket forth gadget based on a microcontroller. I'm thinking of building a chording keyboard, and this here making keys insert whole words is giving me ideas. I could use a key for VARIABLE on my PC! ;) Which FORTH did you use? I use Pforth for a C-based forth. I have no idea of its performance as I've never run it on anything under 400MHz. It has FORGET.
@CalculatorClique
@CalculatorClique Жыл бұрын
I thought assigning words to keys would make it much easier to use on a a calculator keyboard. I used a simple, portable C implementation of Jones FORTH first, the same as what I used for the HP 50G (see separate video on this). There is a link in the video description to the original C version this is based on. Larger, better implementations may be able to be ported but I thought this was a reasonable starting point that I could get working fairly quickly.
@eekee6034
@eekee6034 Жыл бұрын
@@CalculatorClique Oh, Jones FORTH! I got stuck trying to understand that years ago, and then forgot about it. My brain's working a little better these days, I should give it another go. Anyway, PForth is a bit big. I had a look at Pforth's FORGET code the other day and found it surprisingly complex. I'm not sure what-all use cases it covers, but it must be more than I knew existed. :)
@CalculatorCulture
@CalculatorCulture Жыл бұрын
Super cool. 👏
Swissmicros DM42 FORTH Firmware runs N-Queens, Graphics and  Snake Game
3:18
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
HP 75C portable computer from 1982 runs FORTH and N-Queens
15:40
Calculator Clique
Рет қаралды 1,3 М.
HP 41C and Swissmicros DM41X run FORTH and N-Queens
11:52
Calculator Clique
Рет қаралды 9 М.
Swissmicros DM42 CHIP-8 Firmware and Games
1:54
Calculator Clique
Рет қаралды 834
DM-15L Swissmicros 2-line firmware V33
9:01
DM319
Рет қаралды 171
HP Prime runs FORTH in Python
11:16
Calculator Clique
Рет қаралды 4,5 М.
PARKSIDE 65W USB Type-C Phone Charger
7:05
ErCan Everything
Рет қаралды 16 М.
Writing Safe SQL Queries in .NET
9:19
Nick Chapsas
Рет қаралды 24 М.
PX41CX Emulator of the Classic HP-41CX Calculator
10:40
Calculator Clique
Рет қаралды 1,9 М.