Post Reply 
HP-41 module files
10-31-2015, 07:00 AM
Post: #1
HP-41 module files
Looking at the MODFile.h file for the format, I get a bit puzzled by
the two combinations ODD/EVEN and UPPER/LOWER.

Judgning from the comment it seems that a page group of ODD/EVEN does
not impose that any page need to be together in any way?

How does UPPER/LOWER work? They seem to be placed next to each other,
but what happens if there are more than two pages?

To me it seems that it is not really possible to specify a traditional
8K module with these. ODD/EVEN does not that the pages should be next
to each other, and LOWER/UPPER does not impose that they should be
allocated in the same pair 8/9, A/B, C/D or E/F.
What do I misunderstand?

/* relative position codes- do not mix these in a group except ODD/EVEN and UPPER/LOWER */
/* ODD/EVEN, UPPER/LOWER can only place ROMS in 16K blocks */
#define POSITION_MIN 0x1f /* minimum POSITION_ define value */
#define POSITION_ANY 0x1f /* position in any port page (8-F) */
#define POSITION_LOWER 0x2f /* position in lower port page relative to any upper image(s) (8-F) */
#define POSITION_UPPER 0x3f /* position in upper port page */
#define POSITION_EVEN 0x4f /* position in any even port page (8,A,C,E) */
#define POSITION_ODD 0x5f /* position in any odd port page (9,B,D,F) */
#define POSITION_ORDERED 0x6f /* position sequentially in order of MOD file loading, one image per page regardless of bank */


Also, what is the point of POSITION_ORDERED? Flatten out banks? How is
that useful?
Find all posts by this user
Quote this message in a reply
11-02-2015, 11:38 PM
Post: #2
RE: HP-41 module files
Replying to myself...

I decided to treat a page group with Odd/Even and Upper/Lower as they should be allocated together in increasing memory pages. It seems the most sensible way to do it. If you do not want them together, do not put them into the same page group.
Find all posts by this user
Quote this message in a reply
11-03-2015, 11:29 PM
Post: #3
RE: HP-41 module files
I think you have published the most information that has ever been available about .MOD file structure. It seems to NOT EXIST anywhere. DA
Find all posts by this user
Quote this message in a reply
11-04-2015, 06:12 AM
Post: #4
RE: HP-41 module files
Isn't there any documentation on the MOD format on TOS? That's where the most part of information is available, and the MOD files were a result of Warren's development on V41 as well.

"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
11-04-2015, 07:04 PM
Post: #5
RE: HP-41 module files
I did not find any real documentation at TOS, but I managed to find a header file that I snipped the code from above. It was not totally clear to me, that is why I asked. Eventually, I decided to just implement it in a way that seemed to make sense to me.

The way I see it, you may want to have consecutive page allocation, and you may want the first to start in an even (or odd) page. That is basically what I implemented on my side.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: