Post Reply 
How to create custom 41C modules from keystroke programs?
10-07-2020, 10:43 PM
Post: #1
How to create custom 41C modules from keystroke programs?
Now that I've got my DM41X, I have a clear use case for being able to create my own module ROM images to "plug in". I only do standard keystroke programming - no synthetics or ML stuff yet. What's the most painless way to take keystroke programs and turn them into module ROMs? Are there any restrictions or limitations on what such a module can do, such as calling functions that are located in other modules?
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 02:35 AM
Post: #2
RE: How to create custom 41C modules from keystroke programs?
The easiest way, that I know of, to create an application ROM is to use a W&W RAMBOX or a NoV-64 with the 41CY emulation.
Each 4K page of the RAMBOX is built to be compatible with the standard ROM format.
When you format a 4K page, you give it a XROM id, then you load each program in it and when full, you just do a full page copy to a mass storage medium.
I do not know if the DM41X currently support the RAMBOX emulation.
Sylvain
Find all posts by this user
Quote this message in a reply
10-08-2020, 02:47 AM
Post: #3
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 02:35 AM)Sylvain Cote Wrote:  The easiest way, that I know of, to create an application ROM is to use a W&W RAMBOX or a NoV-64 with the 41CY emulation.
Each 4K page of the RAMBOX is built to be compatible with the standard ROM format.
When you format a 4K page, you give it a XROM id, then you load each program in it and when full, you just do a full page copy to a mass storage medium.
I do not know if the DM41X currently support the RAMBOX emulation.
Sylvain

Thanks, I'll have to look into that. I don't think the DM41X has any special RAMBOX emulation, but perhaps I could do that step with a 41 emulator for Windows that does support it.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 03:08 AM
Post: #4
RE: How to create custom 41C modules from keystroke programs?
Or go the HEPAX route. 4, 8 or 16K of ram from user programs would be available.
Find all posts by this user
Quote this message in a reply
10-08-2020, 03:12 AM
Post: #5
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 03:08 AM)Gene Wrote:  Or go the HEPAX route. 4, 8 or 16K of ram from user programs would be available.
I thought of that, but the HEPAX RAM although externally compatible with the ROM format the internal structure is different and need the HEPAX ROM to interpret it correctly.
Dave question was "I have a clear use case for being able to create my own module ROM images to plug in" so HEPAX was rule out.
Find all posts by this user
Quote this message in a reply
10-08-2020, 03:16 AM
Post: #6
RE: How to create custom 41C modules from keystroke programs?
It depends on what you want to do with the module. If you simply want to use those programs, then just install HEPAX and store your FOCAL programs in the 4/8/12/16k of HRAM. You don't need to know anything technical, it's as simple to use as extended memory, except programs stored in HRAM are always 'online' in the sense that you can just run them.

If you have the FOCAL program "FOO" in normal program RAM:

"FOO" [XEQ] HSAVEP to save the program into HRAM
[XEQ] "CLP" "FOO" to erase FOO from normal RAM

Then you simply do

[XEQ] "FOO" and it runs normally

And the upper RAM allocated to and managed by the HEPAX 4H module, can be saved to FAT and later loaded again.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
10-08-2020, 03:38 AM
Post: #7
RE: How to create custom 41C modules from keystroke programs?
I agree with you Gene and Robert that HEPAX can store and run program from HEPAX RAM.
If Dave initial requirement was not a ROM image, then sure this is the easiest way to do it and it is available in the DM41X today.
But if he want a standalone ROM then HEPAX is not an option.
Find all posts by this user
Quote this message in a reply
10-08-2020, 03:44 AM
Post: #8
RE: How to create custom 41C modules from keystroke programs?
I'm not entirely against the idea of using a RAM module like HEPAX. It's more that I wasn't really aware of the option. Smile I'm definitely no under-the-hood 41C expert! Mostly I want a way to store and run programs that doesn't chew up main memory, and doesn't require a lot of saving/loading .raw files or extended memory files. A few custom ROM modules seemed like a good option, but a RAM expansion has its advantages too. I'll have to play around with HEPAX and figure out how it works in the context of the DM41X.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 05:30 AM (This post was last modified: 10-08-2020 05:33 AM by Ángel Martin.)
Post: #9
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 03:38 AM)Sylvain Cote Wrote:  I agree with you Gene and Robert that HEPAX can store and run program from HEPAX RAM.
If Dave initial requirement was not a ROM image, then sure this is the easiest way to do it and it is available in the DM41X today.
But if he want a standalone ROM then HEPAX is not an option.

That's a misunderstanding. The HEPAX RAM structure is totally compatible with the stand-alone ROM format and therefore a set of programs copied to HRAM using HSAVEP can be transferred to ROM file (and MOD files) without a problem.

I very much prefer using the HEPAX over the other options because of its more advanced tool set.

ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
10-08-2020, 07:02 AM
Post: #10
RE: How to create custom 41C modules from keystroke programs?
And is there a way to turn a HEPAX RAM page filled with programs into a ROM?
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
10-08-2020, 09:26 AM
Post: #11
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 07:02 AM)Werner Wrote:  And is there a way to turn a HEPAX RAM page filled with programs into a ROM?
Werner

Yes, it is. I did this a couple of years ago. You can port/save FOCAL programs or RAW files what the space allows in a HEPAX filesystem. You can even span across multiple blocks and thus overcome the 4K hurdle. For starters, I suggest to handle a single 4K block first. This block can be detached from the HEPAX filesystem and handled as a ROM file. Details are given in Sections 4 and 5 of Volume 1 of the HEPAX Owner's Manual.

As for the DM41X its is mentioned in the user manual that you can install and access RAM pages. However, the description is more of a generalized nature, and I wish there was a walkthrough how to do this for HEPAX RAM.
Find all posts by this user
Quote this message in a reply
10-08-2020, 10:52 AM (This post was last modified: 10-08-2020 10:53 AM by Ángel Martin.)
Post: #12
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 07:02 AM)Werner Wrote:  And is there a way to turn a HEPAX RAM page filled with programs into a ROM?
Werner

Since a HEPAX RAM page already *is* a ROM page you just need to "extract" it into a .ROM file.

If you use V41 the easiest way to do this is with the MLDL2K Manager, it has an option in the user interface that does exactly that. BTW the MLDL2k Manager does *not* require the actual MLDL2k hardware to run.

If you use the DM41X then use the MLDL2k Manager on the HEPAX.MOD and apply the same user interface option to extract the HEPRAM pages as ROM files.

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
10-08-2020, 11:44 AM
Post: #13
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 10:52 AM)Ángel Martin Wrote:  
(10-08-2020 07:02 AM)Werner Wrote:  And is there a way to turn a HEPAX RAM page filled with programs into a ROM?
Werner

Since a HEPAX RAM page already *is* a ROM page you just need to "extract" it into a .ROM file.

If you use V41 the easiest way to do this is with the MLDL2K Manager, it has an option in the user interface that does exactly that. BTW the MLDL2k Manager does *not* require the actual MLDL2k hardware to run.

If you use the DM41X then use the MLDL2k Manager on the HEPAX.MOD and apply the same user interface option to extract the HEPRAM pages as ROM files.

Cheers,
ÁM

So does the DM41X write any HEPAX RAM changes directly back to the module file in the flash module area? (Which would mean using HEPAX for data files is unwise, as it would cause a lot of extra flash wear.)

I'm assuming you'd thus need to save the module back to FAT before you can copy and tinker with it.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 12:16 PM
Post: #14
RE: How to create custom 41C modules from keystroke programs?
Unless I'm mistaken, "plugging" a module into the DM41X actually copies it to static RAM along with the rest of the calculator state, so no problem writing to it as often as you like. Only modules that have been imported into the "Available Modules" area are in flash.

There are only 10 types of people in this world. Those who understand binary and those who don't.
Find all posts by this user
Quote this message in a reply
10-08-2020, 12:38 PM
Post: #15
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 12:16 PM)grsbanks Wrote:  Unless I'm mistaken, "plugging" a module into the DM41X actually copies it to static RAM along with the rest of the calculator state, so no problem writing to it as often as you like. Only modules that have been imported into the "Available Modules" area are in flash.

Ah! Okay. I assumed that the need for copying modules to the dedicated flash area was so the CPU could address them directly from a consistent (non-FAT) location.

How is the HEPAX RAM handled on the DM41X? i.e. how do I make sure RAM isn't lost when swapping modules and such? Do I just need to use the "Save RAM Pages" function to safeguard the contents?

I'm looking through scans of Datafile for HEPAX info, and found this in V6N8:

"Since HEPAX organises its memory as blocks of ROM then a HEPAX 4K or 8K block of programs (or data) can be directly copied to, say, a ZEPROM to make it totally permanent. Building your own custom ROMs is now within the reach of everyone."

So it sounds like that will meet my needs. Do I need to worry about setting a module name or XROM ID with this approach?
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 12:50 PM
Post: #16
RE: How to create custom 41C modules from keystroke programs?
If you have only the DM41X then extracting a RAM page (HEPAX or other) is not so trivial. You can save RAM pages, but this is not in ROM format, and all RAM pages are saved together in one file. So today the M2kM software is not able to read this and convert into a MOD file. Will add this to my list of things to do.
And the HEPAX way is by far the easiest way to create your ROM with FOCAL programs. Just a step is missing to convert to a ROM (or MOD) file on the DM41X. Actually I am not certain if V41 allows to save an individual RAM page, anyone? Probably easiest with virtual IL and one of the utils to save a ROM to tape.

Regards, Meindert
Find all posts by this user
Quote this message in a reply
10-08-2020, 01:14 PM (This post was last modified: 10-08-2020 01:28 PM by Ángel Martin.)
Post: #17
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 12:50 PM)MeindertKuipers Wrote:  If you have only the DM41X then extracting a RAM page (HEPAX or other) is not so trivial. You can save RAM pages, but this is not in ROM format, and all RAM pages are saved together in one file. So today the M2kM software is not able to read this and convert into a MOD file. Will add this to my list of things to do.
And the HEPAX way is by far the easiest way to create your ROM with FOCAL programs. Just a step is missing to convert to a ROM (or MOD) file on the DM41X. Actually I am not certain if V41 allows to save an individual RAM page, anyone? Probably easiest with virtual IL and one of the utils to save a ROM to tape.

You're right, I had assumed that the HEPAX_4H.MOD would be updated when you load/save programs using HSAVEP but that's not the case in the DM41X - contrary to the V41 case, that's what tripped me up.

I'm somewhat sketchy on the workings of the module loader, but it'd appear the RAM pages are independent and only "attached" to the HEPAX by the module loader - and upon CALC_ON I guess? I don't know if there's more information on this in the technical reference available on the SwissMicros site.

ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
10-08-2020, 01:32 PM
Post: #18
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 12:38 PM)Dave Britten Wrote:  So it sounds like that will meet my needs. Do I need to worry about setting a module name or XROM ID with this approach?

Yes, absolutely. The HEPAX uses C/D by default which may not be what you want for your XROM id#. Also there won't be any module section header like "-ADV FNCS" in CAT"2, afraid for that you'll need some MCODE editing capabilities

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
10-08-2020, 02:33 PM
Post: #19
RE: How to create custom 41C modules from keystroke programs?
(10-08-2020 01:32 PM)Ángel Martin Wrote:  
(10-08-2020 12:38 PM)Dave Britten Wrote:  So it sounds like that will meet my needs. Do I need to worry about setting a module name or XROM ID with this approach?

Yes, absolutely. The HEPAX uses C/D by default which may not be what you want for your XROM id#. Also there won't be any module section header like "-ADV FNCS" in CAT"2, afraid for that you'll need some MCODE editing capabilities

I can live with the CAT 2 limitation, since I can just throw HEPDIR in the CST menu for quick access. The MCODE stuff can wait until later. Smile

Seems like it's working well; I tossed a couple programs into HEPAX RAM and deleted them from main RAM.

A few things I need to figure out still:

How do I configure HEPAX RAM size? I see HEPAX M6-4R in A1, M6-5R in B1, and M6-[0-3] occupying 61-64.

Can I have multiple HEPAX RAMs and swap them in and out?

How do I export the HEPAX RAM to a ROM .mod file?

I imagine the DM41X HEPAX functionality will mature and become more convenient to use as time goes on.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-08-2020, 04:05 PM
Post: #20
RE: How to create custom 41C modules from keystroke programs?
If you have a Linux or MacOS machine available, you might try NutStudio from Håkan Thörngren. See the link below for details. You can develop both FOCAL and machine level programs, then generate a MOD file for output. A little more complicated than on-calculator development, but certainly more comfortable for extended typing!

https://www.hpmuseum.org/forum/thread-15125.html

~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 5 Guest(s)