NP-41 Emulator (may be)
|
01-25-2016, 01:45 PM
(This post was last modified: 01-25-2016 01:55 PM by jch.)
Post: #121
|
|||
|
|||
RE: NP-41 Emulator (may be)
Chris,
I just looked at your 'Just another image test' thread. (Edit : In between you updated the thread ;-)) It's really amazing. Though some members may miss the original 14 segments LCD, I find the COG LCD display very cool. I can see many advantages using it : lowering I/O pins, very nice stack display... About the thickness, what about putting processor and connector on the other side of the PCB, under the display ? Many thanks for this smart emulator. Jean-Christophe. |
|||
01-25-2016, 03:08 PM
Post: #122
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 01:45 PM)jch Wrote: Chris, Thanks for your comment. I enjoy doing this project as well. I am going to build both the segment version and the COG version. As a matter of fact I am using the same project source w/ compiler directives for different MCU and LCDs. The "Slim" version has a good chance to make into a kit as it will be relatively easy to build. And I think it could be made into an everyday-carry calculator. I was thinking the same regarding the layout. Having all components on one side would be a lot cleaner. Except that I am hesitate to place the MCU under the display as it will increase thickness and disable trouble-shooting / repairs. I am imagining a layout that places the top 4 buttons (ON, USER, PGRM, ALPHA) as 2 x 2 and on one side, where the CR2032 will be placed on the other side. And the MCU can be in the middle. I will fiddle w/ a PCB design to see how it looks. Also I would like to reserve space for pin connectors to facilitate firmware update and a USB-Serial connection. Would like to build a program loader (HP-41C programs) for transferring programs. |
|||
01-25-2016, 04:23 PM
Post: #123
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 03:08 PM)Chris Chung Wrote: ...Also I would like to reserve space for pin connectors to facilitate firmware update and a USB-Serial connection. Would like to build a program loader (HP-41C programs) for transferring programs. Chris - This project is moving along nicely, it's exciting to watch it evolve. One suggestion to consider - perhaps there is a way (socket?) to accommodate some sort of chip from Diego, to allow "insertion/upgrade/whatever" enabling use of ROMs (RAM, etc.) using his NoV-64d design. This single socket would basically open up the design to allow use of ALL the 41 ROMs, including esoteric stuff like CCD, HEPAX, Zenrom, etc. I've no idea if Eric's code even accommodates expansion ROMs, etc. so this may not even be feasible, but it would dramatically expand what one could do with this DIY 41C, allowing folks to buy an upgrade chip from Diego if they desire to expand their system. Just an idea... --Bob Prosperi |
|||
01-25-2016, 05:04 PM
Post: #124
|
|||
|
|||
RE: NP-41 Emulator (may be)
Just take my money!!!
:D Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
01-25-2016, 06:36 PM
Post: #125
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 01:30 PM)Chris Chung Wrote: Progress Update Chris, this is a textbook example of a community project evolving well. And exemplary communication of progress. Thanks a lot! Truely made in Canada! Keep up your good work and habits! I'll read your earlier messages again - though if you didn't mention yet: what's the display resolution? The one you're using here? And its dimensions? TIA d:-) |
|||
01-25-2016, 06:49 PM
Post: #126
|
|||
|
|||
RE: NP-41 Emulator (may be)
Would it also be possible to put hte PCB into a original HP-41? I would love the same design / layout as I could also use the original templates.
|
|||
01-25-2016, 07:03 PM
Post: #127
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 04:23 PM)rprosperi Wrote: Chris - This project is moving along nicely, it's exciting to watch it evolve. One suggestion to consider - perhaps there is a way (socket?) to accommodate some sort of chip from Diego, to allow "insertion/upgrade/whatever" enabling use of ROMs (RAM, etc.) using his NoV-64d design. This single socket would basically open up the design to allow use of ALL the 41 ROMs, including esoteric stuff like CCD, HEPAX, Zenrom, etc. I am rather new to HP-41 and had not explore the ROM and peripheral options. In Eric's code, there are provisions made to bank switch the 16 page of 4k ROM / RAM addresses. I will have to do more reading to understand both the code and the HP-41 architecture before fixing a solution. I did play around w/ different program listings. Initially via manual key in. And after a while got lazy and developed a way to "save" and "load" them via the MCU programming interface. My personal goal / plan is to hack together some utilities so that I can cut and paste program listing from this site, compile and download them to NP41 via USB-Serial cable to play w/. As I am not a old-time user, the extension / peripheral system is still new to me and it is unwise to dictate a interface. It is, though, possible to add a SD card reader to the system to make available ROM images. Another thing to consider is that I am using this "value line" MSP430 MCU. It has 56K flash and 4K ram. The CV's 319 registers are within this 4K space and the simulator + boot rom is using around 36K. So there is not much room for storage or emulate from RAM. I did allocate 8+ GPIO pins (including hardware SPI / I2C) for expansion. So serial ROM / RAM is possible, except may be slower execution as there will be fetch time penalties. However I will be very interested to know what potential users want and see if additional requirements can be implemented. The current goal is to deliver a basic HP-41CV functionality at a low cost reliably w/ Eric's base code. Though I would definitely put in some program "save and load" functionality. |
|||
01-25-2016, 07:29 PM
Post: #128
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 07:03 PM)Chris Chung Wrote: I am rather new to HP-41 and had not explore the ROM and peripheral options. In Eric's code, there are provisions made to bank switch the 16 page of 4k ROM / RAM addresses. I will have to do more reading to understand both the code and the HP-41 architecture before fixing a solution. So, it sounds like the basics are there. In a nutshell, Diego's product is a Flash chip with some logic, that emulates up to 12 of the 4K ROM Pages. He has built an easy-to-use Windows utility to "install" various ROM images, thus allowing one to utilize all the old (and even recently released) ROMs. So accommodating this single "chip" opens-up access to all the application ROMs, with each user building his/her own combination, and not requiring any of the internal ROM/RAM space. But I agree the core feature is to allow easy import/export of FOCAL programs. There are several (Gene, Massimo, Warren, Angel, others - a little help with specifics?) available program file formats already existing, so when you look at that aspect, no need to reinvent something, the existing one(s) have not only figured all that out, there are libraries of programs already in that/those formats to test with and use, and possibly also reusable utility programs for USB transfers. Very, very cool project! --Bob Prosperi |
|||
01-25-2016, 07:33 PM
(This post was last modified: 01-25-2016 07:38 PM by Chris Chung.)
Post: #129
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 06:36 PM)walter b Wrote:(01-25-2016 01:30 PM)Chris Chung Wrote: Progress Update Walter, the display is of 132 x 32 pixels. The module measures 55 x 28mm w/ display area of about 48 x 13mm. The PCB as shown [edit] in the video [/edit] is 100 x 58mm. The next version will be 120 x 60mm. The 3d printed enclosure will be [edit] have a shell wall of [/edit] about 1mm thick, so the unit should be 122 x 62 x 10mm, or close to that. I really want to make it thin and handy to put in a shirt pocket. My imaginary enclose is like this. The coin cell (and also may be the MCU) will move to the top side of the PCB to keep the unit thin. The 4 1st row keys will be squeeze to the right side of the unit. I will put some thoughts on expansion elements (type of connectors / sockets, etc). |
|||
01-25-2016, 07:44 PM
Post: #130
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 06:49 PM)HP-Collection Wrote: Would it also be possible to put hte PCB into a original HP-41? I would love the same design / layout as I could also use the original templates. Unfortunately I don't have the HP-41C template dimensions. I would think that they are larger than this "slim" unit. If you can point me to some source regarding the size / layout of a typical template, I can take a look. I would think that this could only happen in the 14-segment NP-41 as the 14-segment display is modeled from the original HP-41C display size, and the button layout could as well follows the same dimension. I am waiting for a keyboard PCB for the 14-segment version. So probably the next project progress will be showcasing the 14-segment version. |
|||
01-25-2016, 08:00 PM
(This post was last modified: 01-25-2016 08:14 PM by jch.)
Post: #131
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 07:03 PM)Chris Chung Wrote: It is, though, possible to add a SD card reader to the system to make available ROM images.I was almost asking for this kind of extension, but after looking at the MCU specs, especially available RAM, I didn't dare. Wasn't your first design based on MSP430FR family ? Much more, hum... FRAM. (01-25-2016 07:03 PM)Chris Chung Wrote: However I will be very interested to know what potential users want and see if additional requirements can be implemented.HP-IL ? even on serial port ? (01-25-2016 01:30 PM)Chris Chung Wrote: It has potential to double the speed by running at 16Mhz vs 8Mhz, but that I need to throw in 2 x 3V coin cell and have a regulator. Not sure If I want to do that.While I was looking at the MCU specs, I also read the speed vs voltage curves. 3.6V, something like a Lithium Thionyl Chloride battery ? Though not a coin cell, but with optionnal connector, you could also extend runtime, and thickness too :-(. Jean-Christophe. |
|||
01-25-2016, 09:34 PM
Post: #132
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 07:29 PM)rprosperi Wrote: So, it sounds like the basics are there. In a nutshell, Diego's product is a Flash chip with some logic, that emulates up to 12 of the 4K ROM Pages. He has built an easy-to-use Windows utility to "install" various ROM images, thus allowing one to utilize all the old (and even recently released) ROMs. So accommodating this single "chip" opens-up access to all the application ROMs, with each user building his/her own combination, and not requiring any of the internal ROM/RAM space. I would love to explore more on ROM module. And I am a newbie on the HP-41C. I acquire my knowledge on Eric's Nonpareil under Linux, and as you mentioned there is no support of ROM modules. So I never see how it works! I would imagine that once a module is "parked" into one of the 4 ports (is it 4?), additional functions / programs will show on the "CAT" list and be available for use. I can see there are microcode instructions to check memory location availability and I assume the boot code will do that to determine / setup when ROM modules are present. Currently on NP41 these functions are blocked. And I would like to explore them. Would you suggest a very basic ROM module where I can download the binary and play w/? This is the only way I could understand the mechanism better. I used to run gdb w/ nonpareil to understand certain mechanism. (01-25-2016 08:00 PM)jch Wrote: I was almost asking for this kind of extension, but after looking at the MCU specs, especially available RAM, I didn't dare.The 14-segment version still is using a 128K flash FRAM. This chip causes about $15 in single units versus the G2955's $4. The 14-segment version is difficult to build mainly because of the direct LCD driving. The extended registers are represented in nibbles (half-bytes) so that I am using 7 bytes per register. And of course it is tight, so it is quite different to ask for more. However, depending on how the ROM modules works, I might be able to extend via parallel or serial flash memory. (01-25-2016 08:00 PM)jch Wrote: HP-IL ? even on serial port ?Another topic for me to read. My understanding is that it is a PC interface. My current design has uart at up to 115200. With a USB-Serial cable, I can do binary transfer. The format though is still open. (I am just using intel ihex format to fill memory holes) [/quote] (01-25-2016 08:00 PM)jch Wrote: While I was looking at the MCU specs, I also read the speed vs voltage curves. Not sure about the battery you mentioned, will look it up. One option is to use the re-chargable LIR2032 which is 3.6V. The MCU can detect voltage and switch clock frequency on the fly. So this can be made into auto-detect / allow fast mode option. |
|||
01-26-2016, 12:04 AM
Post: #133
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 09:34 PM)Chris Chung Wrote: I would love to explore more on ROM module. And I am a newbie on the HP-41C. I acquire my knowledge on Eric's Nonpareil under Linux, and as you mentioned there is no support of ROM modules. So I never see how it works! I would imagine that once a module is "parked" into one of the 4 ports (is it 4?), additional functions / programs will show on the "CAT" list and be available for use. Yes, the 41C family had 4 physical Ports, each of which could address 2 x 4K "Pages", and said Pages could also be banked up to 4 layers deep. Note that 41C ROM code consists of 10-bit "words" (I may not have the exact terminology correct). Port-1 addressed Pages 8/9, Port-2 - A/B, Port-3 - C/D, and Port-4 - E/F. As you guessed, the Functions in these ROMs were added into the CAT-2 listing. There are,also some special cases, where devices inserted into physical ports were mapped to different memory Pages, e.g. the Printer was mapped to Page-6, HP-IL Mass Storage to Page-7, and others. I will email you a copy of Paul Kaarup's Superb "HP-41 Programmers Handbook". It contains a huge amount of useful information all in one place, and may provide insights and reference material as you explore this. I can also email you a sample ROM image (e.g. for the MATH ROM) if that's what you mean. --Bob Prosperi |
|||
01-26-2016, 12:45 AM
Post: #134
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-26-2016 12:04 AM)rprosperi Wrote: Yes, the 41C family had 4 physical Ports, each of which could address 2 x 4K "Pages", and said Pages could also be banked up to 4 layers deep. Note that 41C ROM code consists of 10-bit "words" (I may not have the exact terminology correct). Port-1 addressed Pages 8/9, Port-2 - A/B, Port-3 - C/D, and Port-4 - E/F. As you guessed, the Functions in these ROMs were added into the CAT-2 listing. Yes, I would like to play w/ a basic / typical ROM. There are about 20K free flash memory on the "Slim" unit that I can play w/. Will map it w/ the MATH ROM you mentioned and give it a go. If the ROM code are the same byte code as in the 41C system ROM, then I am familiar w/ them and be able to trace the ROM execution to gain more understanding. I was not sure before and thought that the ROM contains user domain key codes. I understand the 10 bit instruction codes but am lost on the user entered program codes. Hopefully after reading the Programmers Handbook I can gain the needed knowledge. For my current register memory "save" and "load", I just dump and load the memory image after entering the user programs by hand w/o understanding the instructions / data. |
|||
01-26-2016, 01:38 AM
Post: #135
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-26-2016 12:45 AM)Chris Chung Wrote: I was not sure before and thought that the ROM contains user domain key codes. I understand the 10 bit instruction codes but am lost on the user entered program codes. Hopefully after reading the Programmers Handbook I can gain the needed knowledge. For my current register memory "save" and "load", I just dump and load the memory image after entering the user programs by hand w/o understanding the instructions / data. Most ROM memory is comprised of MCODE, similar (I believe) to that found in the 41 OS ROMs, however some ROMs (most notably the PPC ROM) do contain large amounts of FOCAL (user program code), however I'm not sure how these are stored. In RAM (registers), FOCAL programs are stored using byte code as defined in the "Synthetic Quick Reference Card" found on pages 37-38 of the Programmer's Guide. Entire books (many) have been written on this subject, but the essence of the instruction format can be seen on the QRC. "Synthetic Programming" refers to using unintended (by HP) byte sequences of user code, created by odd key sequences to edit/merge bytes, which form new instructions, which provide access to otherwise unavailable memory areas and functions. These will almost certainly be one of the first things MoHPC users will try on the NP-41. --Bob Prosperi |
|||
01-26-2016, 03:09 AM
Post: #136
|
|||
|
|||
RE: NP-41 Emulator (may be)
Chris,
There are several things you need to know about the HP-41. -> NUT processor instructions are 10 bits wide -> RPN instructions are 8 bits wide -> MCode (assembly) is the native language of the NUT processor -> RPN language (FOCAL) is a user language intepreted by the routines contained in the 41OS -> ROM is 10 bits wide -> RAM is 56 bits wide (called registers, 1 register = 7 bytes = 56 bits) -> NUT ALU registers are 56 bits wide -> ROM is memory mapped -> RAM is not memory mapped and treated like a peripheral (similar to SPI or I2C external memory) -> ROM chips were initially build in 4K 10 bits word -> RAM chips were initially build in 64 registers (64x7 bytes or 448 bytes) -> ROM total addressable space is 64KB (16 pages of 4K word) -> RAM total addressable space is 1024 registers (7KB) [less in reality] -> Like Robert said before, the NUT processor support bank switching of up to 4 banks of 4K word at the page level giving a theoretical 256K word of ROM addressable code. [less in reality] -> Devices like MLDL, Clonix-D, NoV-64 and others simulate 4K word ROM pages using EPROM, EEPROM, Flash, RAM or FRAM. There is a lot more that can be said, but this is like the starting point. Sylvain |
|||
01-26-2016, 07:50 AM
Post: #137
|
|||
|
|||
RE: NP-41 Emulator (may be) | |||
01-26-2016, 08:01 AM
Post: #138
|
|||
|
|||
RE: NP-41 Emulator (may be)
(01-25-2016 09:34 PM)Chris Chung Wrote:(01-25-2016 08:00 PM)jch Wrote: HP-IL ? even on serial port ?Another topic for me to read. My understanding is that it is a PC interface. My current design has uart at up to 115200. With a USB-Serial cable, I can do binary transfer. The format though is still open. (I am just using intel ihex format to fill memory holes) A 115kbps UART link is just what you need to communicate with an external HPIL/serial converter (also called PIL-Box) to control *real* external HP-IL hardware as the HP-41C. My open-source Emu41 emulator implemented such link. It could be nice ... J-F |
|||
01-26-2016, 08:51 AM
Post: #139
|
|||
|
|||
RE: NP-41 Emulator (may be) | |||
01-26-2016, 09:27 AM
Post: #140
|
|||
|
|||
RE: NP-41 Emulator (may be) | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)