How to create a custom RPN application ROM on a DM41X with the HEPAX module.
To symplify things, I have create a custom HEPAX module that contains only 1 page of RAM.
References:
- HEPAX, VM Electronics, HP-41 module
- ROM Handler, Meindert Kuipers, Windows Application
Win-PC: download files from the web
- create a DM41X folder under your home folder that will serve as a work folder → [home]/DM41X
- download HEPAX custom module image to the work folder → HEPAX-1D-4K.mod
- download ROM Handler zip file to the work folder → ROMHandler-main.zip
- unzip ROMHandler-main.zip file in the work folder, zip file content ...
- ROMHandler.exe
- ROMHandler.INI
- README.TXT
- SYSTEMLABELS.TXT
- XROM.TXT
Win-PC: copy the HEPAX custom module image to the DM41X (part 1)
- plug the DM41X to the computer with the appropriate USB cable
DM41X: activating the USB disk
Code: Select all
[SETUP] // enter in the setup menu
1. File > // select file sub-menu
5. Activating USB Disk // activating USB file sharing
... you should see ...
Code: Select all
USB disk mode ...
WARNING: ...
Press ON key to end
Win-PC: copy the HEPAX custom module image to the DM41X (part 2)
- mount the DM41X flash drive (if not done automatically)
- copy HEPAX-1D-4K.mod file from the work folder to the [DM41X_flash_drive]/MODS folder
- eject/unmount the [DM41X_flash_drive] from the computer
- unplug the DM41X from the computer
DM41X: leaving menu
Code: Select all
[←] // leave the file menu
[←] // leave the menu system
DM41X: import custom HEPAX module
Code: Select all
[SETUP] // enter in the setup menu
2. Module > // select module sub-menu
2. Manage Modules in Flash // enter module management screen
[Imprt] // import a new module
HEPAX-1D-4K... // select HEPAX module from the list
[ENTER] // import the file
[←] // leave Manage Modules in Flash screen
Code: Select all
1. Active Modules // enter module activation screen
[Plug] // plug a new virtual module
HEPAX-1D-4K // select HEPAX module from the list
[Add] // add the selected module
[ENTER] // activate configuration and leave menu system
DM41X: validate setup
Code: Select all
// power cycle the calculator (off then on)
CAT 2 // you should see "-HEPAX 1D" appears
DM41X: clear HEPAX RAM
Code: Select all
"OK" // CLRAM confirmation message
9
CLRAM // clear page 9
// power cycle: OFF then ON
HEPDIR // should display: H:DIR EMPTY
[<-] // clear message & display available HEPAX RAM registers
// should display: 651.0000 // 1 page (#9) of 4K 10-bit word
DM41X: add your programs to HEPAX RAM
Code: Select all
"FIRST" // program name in ALPHA
HSAVEP // copy program from main memory to HEPAX RAM
"SECOND" // program name in ALPHA
HSAVEP // copy program from main memory to HEPAX RAM
...
"LAST" // program name in ALPHA
HSAVEP // copy program from main memory to HEPAX RAM
HEPDIR // list programs in HEPAX RAM
DM41X: remove page 9 from HEPAX RAM chain
Code: Select all
HEXEDIT
ADR: ____ // enter: 9FF3 // HEPAX RAM page state
9FF3 200 ___ // enter: 300 // change page state from 200 (use page) to 300 (exclude page)
9FF4 xxx ___ // press [gold] then [SST] keys to do a [BST]
9FF3 300 ___ // value should be 300
[←] // leave edit mode, display: ADR: ____
[←] // leave hexedit, display: 0.0000
Code: Select all
// power cycle: OFF then ON
HEPDIR // should display: H:NO FILESYS which is normal here
[←] // clear message & display available HEPAX RAM registers
// should display: 0
DM41X: validate page 9 QROM content
Code: Select all
CAT 2 // catalog ROMs
[R/S] // to pause the running catalog
[SST] // until you see: -EXT FNC 2X
[ENTER] // to enter that catalog
[R/S] // to pause the running catalog
[gold] [BST] // until you see your last program
[gold] [BST] // until you see your first program
[←] // to exit catalog
DM41X: validate/set XROM value
Code: Select all
HEXEDIT // ROM Editor
ADR: ____ // enter: 9000 // XROM ID address for page 9
9000 00B ___ // keep the same XROM ID (11) or enter a value between 001 (1) and 01F (31)
[←] // leave edit mode, display: ADR: ____
[←] // leave hexedit, display: 0.0000
// power cycle: OFF then ON
DM41X: save QROM to the DM41X Flash file system
Code: Select all
[SETUP] // enter in the setup menu
2. Module > // select module sub-menu
7. Save RAM Pages // enter RAM Pages saving screen
<New File> // select this option
myrom.ram // choose a name for your RAM page
[R/S] // save the file and leave menu system
Win-PC: copy RAM file from the DM41X to your Windows PC (part 1)
- plug the DM41X to the computer with the appropriate USB cable
DM41X: activating the USB disk
Code: Select all
[SETUP] // enter in the setup menu
1. File > // select file sub-menu
5. Activating USB Disk // activating USB file sharing
... you should see ...
Code: Select all
USB disk mode ...
WARNING: ...
Press ON key to end
Win-PC: copy RAM file from the DM41X to your Windows PC (part 2)
- mount the DM41X flash drive (if not done automatically)
- copy [DM41X_flash_drive]/RAM/myrom.ram file to the work folder
- eject/unmount the DM41X flash drive from the computer
- unplug the DM41X from the computer
Win-PC: extract ROM image from DM41X RAM image file
- go to the work folder
- run the ROM handler application → ROMHandler.exe
- press the Open button
- go to the work folder → [home]/DM41X
- in the drop down list box located at the window bottom right, select DM41X RAM (*.ram) option
- select the ram file → myrom.ram
- press the Open button
- you should see the following ...
Code: Select all
Reading RAM File: [work folder]/myrom.ram
File size: 5120bytes
RAM pages: 1
File Size OK, start reading
writing file: [work folder]/myrom_0.rom
- exit the ROM handler application
Win-PC: validating ROM image
- go to the work folder
- run the ROM handler application → ROMHandler.exe
- press the Open button
- go to the work folder → [home]/DM41X
- select the rom file → myrom_0.rom
- press the Open button
you should see something like the following ...
Code: Select all
ROM Filename : [work folder]/myrom_0.rom
------------------hex---dec----------------
XROM : $00B 011
# Functions : $005 005
ROM Name : LBL "FIRST" (User Code) (first function name) (first function name)
Pause Entry : $000
Program Entry : $000
Sleep Entry : $000
OFF Entry : $000
Service Entry : $000
ON Entry : $000
MemLost Entry : $000
ROM Revision : @@-@@
Checksum : $000 CHECKSUM NOT GOOD, should be $0D5
NOPs Counted : 3947
41CL YCRC : $244326FF
- press the List FAT button
you should see something like the following ...
Code: Select all
-XROM----ADDR--FUNCTION --------------
011.00 A0A0 "FIRST" UCode XROM 11.00 "FIRST" // your first program name
011.01 A0BE "SECOND" UCode XROM 11.01 "SECOND" // your second program name
011.02 A0DD "THIRD" UCode XROM 11.02 "THIRD" // ...
011.03 A0FB "FOURTH" UCode XROM 11.03 "FOURTH"
011.04 A11A "LAST" UCode XROM 11.04 "LAST"
- exit the ROM handler application
Thank you very much Meindert for creating the ROM Handler application and also for having added the RAM extraction part, it saved me to write my own application.
Sylvain
edit: typos