[go67/97 for Android] Creating .pck files in a text editor?
|
08-11-2015, 06:46 PM
Post: #21
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
Here's the listing generated for the first program in the Standard Pack for HP-67"
Code:
Attached is the translate table I am using. The first column is the hex code. The second would be used for searching for a hex code from a program step. I have removed the spaces and put everything in upper case with exception of lower case labels. The third column is how the code is printed when looked up from the hex code. I can add variations of program codes to this table to allow for multiple variations for some steps. I would appreciate any comments or suggestions. Thanks, Bill Smithville, NJ |
|||
08-11-2015, 06:58 PM
Post: #22
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
Bill, this is really awesome. I am really looking forward to the finished product.
I am surmising that going the other way--listings to pck files--is a bit more challenging, given the need to fully understand the information encoded in the header line and the computation of check sums. Also, I think the pck file structure is really fussy, with every bit of white space actually a placeholder for something. Les |
|||
08-12-2015, 12:49 AM
(This post was last modified: 08-12-2015 01:06 PM by Bill (Smithville NJ).)
Post: #23
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
Got most of the Header Card figured out.
Code: Header Card Format EDIT: I have updated the last two digits to indicate SCI/FIX/ENG notation. But it looks a little odd, like some addition info is also being stored with it. Now to find some time to work on the second utility to create a PCK file. Bill Smithville, NJ |
|||
08-12-2015, 06:37 AM
(This post was last modified: 08-12-2015 06:40 AM by lcwright1964.)
Post: #24
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 12:49 AM)Bill (Smithville NJ) Wrote: Got most of the Header Card figured out. This is awesome. I wonder if one of those two digits has something to do with FIX/SCI/ENG... It is a shame that M. de Smet isn't replying to our queries are popping in on this thread. He could answer this header question in a jiffy. You have deciphered everything else. Les |
|||
08-12-2015, 12:57 PM
Post: #25
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-09-2015 08:43 AM)PANAMATIK Wrote: According to the HP-67 manual the information in the header contains: Bernhard, I wanted to say think you for the information you provided above. It was a lot of help in helping me to decipher the layout and being able to create the crude program that I did to printout the program listings from the PCK file. I think I now have the Header figured out. But not sure if any additional information is being stored in it or not. But for my purposes, I think I have enough. Thanks, Bill Smithville, NJ |
|||
08-12-2015, 01:08 PM
Post: #26
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 06:37 AM)lcwright1964 Wrote: This is awesome. Les, You are correct. I've updated the Header Listing to include SCI/FIX/ENG for the last two digits. Thanks, Bill Smithville, NJ |
|||
08-12-2015, 01:11 PM
Post: #27
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 06:37 AM)lcwright1964 Wrote: I wonder if one of those two digits has something to do with FIX/SCI/ENG... Try 22=FIX 00=SCI 40=ENG Bernhard That's one small step for a man - one giant leap for mankind. |
|||
08-12-2015, 01:39 PM
Post: #28
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 01:11 PM)PANAMATIK Wrote:(08-12-2015 06:37 AM)lcwright1964 Wrote: I wonder if one of those two digits has something to do with FIX/SCI/ENG... Hi Bernard, Yep, that's what I figured out also. But the 22 for FIX seems funny. I would have thought 00/20/40 and then maybe the last digit is storing some other settings. For the purpose of creating a header record for use in PCK file, I think we have what we need. But always curious about any oddities. Bill Smithville, NJ |
|||
08-12-2015, 03:17 PM
Post: #29
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 01:39 PM)Bill (Smithville NJ) Wrote:(08-12-2015 01:11 PM)PANAMATIK Wrote: Try 22=FIX 00=SCI 40=ENG The HP-67 stores the display format in external RAM with these numbers and obviously they were copied partially to magnetic card. To understand why it is 22 you have to analyze the firmware. Often the HP engineers choose bit patterns as jump table offsets. So don't try to understand or guess logically. Bernhard That's one small step for a man - one giant leap for mankind. |
|||
08-12-2015, 04:53 PM
Post: #30
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-12-2015 03:17 PM)PANAMATIK Wrote: To understand why it is 22 you have to analyze the firmware. Often the HP engineers choose bit patterns as jump table offsets. So don't try to understand or guess logically. No kidding! To use two digits to store such a simple three-way parameter strikes me as counterintuitive. Thank you so much for answering questions on this. I am no programmer when it comes to scripts and utilities, so I am so tickled that, with help of you and others, Bill was inspired by my original query to revisit this project. Les |
|||
08-13-2015, 11:41 PM
(This post was last modified: 08-17-2015 11:42 AM by Bill (Smithville NJ).)
Post: #31
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
I cleaned up the PCK2TXT program that can generate files listing the individual programs in the PCK file.
I have also created the TXT2PCK program which can create a PCK file from a list of program files. NOTE: I have modified the programs and the xlate table to correct for some errors. Please re-download the latest utilities. I have attached HP67 PCK UTILITIES.ZIP which includes the following files: PCK2TXT.PAS The Turbo Pascal Source Code PCT2TXT.EXE The compiled program TXT2PCK.PAS Pascal Source TXT2PCK.EXE Compiled program XLATE.TXT The translation table HEX to Program Step STD.PCK PCK file of the Standard Pack Various PCK files and support files. {Attachment has been removed due to problems with it} {Please refer to Later Message in this Thread for current } {file attachment} NOTE: MSDOS Turbo Pascal TP6 was used. This means the EXE file will need to be run in a DOSBOX window and file names are limited to 8.3 format. Run the PCK2TXT program with the PACK file name as a parameter. For Example: PCK2TXT STD.PCK Run the TXT2PCK file with a File as a parameter that has a list of the Program Listings to include. For Example: TXT2PCK STANDARD Where Standard contains the following list: STANDARD PACK 15 SD-01A.001 SD-02A.002 SD-03A.003 SD-04A.004 SD-05A.005 SD-06A.006 SD-07A.007 SD-08A.008 SD-09A.009 SD-10A.010 SD-11B.011 SD-12B.012 SD-13A.013 SD-14A.014 SD-15C.015 I have also entered a couple of programs from the EE(LAB) and Games Pack. If you execute: TXT2PCK MISC, then you will generate a PCK files with two programs: "Wire Table" from the EE(LAB) pack and "Risk" from the Games Pack. Make sure the XLATE.TXT file is in the same directory. It is read to generate the HEX to Program Step Translation Table. The program will use the first 8 characters of the Second Title on the Cards with the card number as the extension. In the Standard PCK, this would be SD-01A.001, SD-02A.002, etc. There is virtually NO error checking, so it is very possible that it may not always work, especially if the PCK file has been modified. One last item - Since Turbo Pascal expects the text files to have CR/LF, you may need to run the pack files through UNIX2DOS utility to add the CR to a unix pack file that only has LF's. Like I said - it's crude, but works for my purposes. The XLATE.TXT file can be expanded at the bottom to include other variations of Program Steps. For Example, I had added "Run Stop" as the last line. Thus, the program listing could use either R/S or Run Stop as a program step. DO NOT modify or delete the first 256 lines (down to FF), since these are the normal program steps that are used. Appreciate comments/suggestions. Also feel free to modify to your hearts content. Bill Smithville, NJ (Edited August 16: Updated the File Attachment to include TXT2PCK and for updates to all files. Also edited text above to reflect changes.) (Edited August 16 - Removed File Attachment.) |
|||
08-14-2015, 12:13 AM
Post: #32
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
Bill, that is gorgeous!
As a Mac user, I am delighted that it runs in DOSBox, for which there is an excellent OS X version which is easy to use and works beautifully. Thank you for this. Les |
|||
08-17-2015, 12:38 AM
(This post was last modified: 08-17-2015 12:39 AM by Bill (Smithville NJ).)
Post: #33
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
I have updated the utilities and added TXT2PCK to create a PCK file from a list of programs. I found some errors in both the PCK2TXT program and the XLATE table. So please download the latest utilities.
Refer to my edited post above for new zip file. Thanks, Bill Smithville, NJ |
|||
08-17-2015, 03:50 AM
Post: #34
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-17-2015 12:38 AM)Bill (Smithville NJ) Wrote: I have updated the utilities and added TXT2PCK to create a PCK file from a list of programs. I found some errors in both the PCK2TXT program and the XLATE table. So please download the latest utilities. Bill, can you double check what's actually at that link? I am downloading a 33KB zip that doesn't have nearly all the stuff you say it should. As an alternative you can just email it to me too. As an aside, I wonder what I can do to tweak you code to compile as a command line utility in an OS X in a Terminal window. I know a little Pascal and have Lazarus/Free Pascal, so I suspect it can be done. Of course, if there are DOS-Unix variances in text file reading and writing, I might get stuck... Les |
|||
08-17-2015, 11:43 AM
Post: #35
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-17-2015 03:50 AM)lcwright1964 Wrote: Bill, can you double check what's actually at that link? I am downloading a 33KB zip that doesn't have nearly all the stuff you say it should. As an alternative you can just email it to me too. Hi Les, Not sure what's going on with the attachment. For some reason, I wasn't able to update it to the new file. I have removed it from the above post and will create a new post with the current files. Bill Smithville, NJ |
|||
08-17-2015, 11:46 AM
Post: #36
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
I had some problems with updating the file attachment in my earlier post. So I have removed that link.
Following is the latest set of files: HP67 PCK UTILITIES.zip (Size: 38.35 KB / Downloads: 25) Hopefully this will work. Bill Smithville, NJ |
|||
08-17-2015, 08:29 PM
Post: #37
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
Got it. Generated cards read fine in go67 and go97.
I am going to see if I can port to Free Pascal and compile executables to run in Mac terminal window. Failing that running a DOSBox is fine. This is excellent work. Thank you! Les |
|||
08-19-2015, 09:00 AM
Post: #38
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-17-2015 08:29 PM)lcwright1964 Wrote: I am going to see if I can port to Free Pascal and compile executables to run in Mac terminal window. Actually, nix this. I did a little research and it seems that in such porting there are subtleties far beyond my amateur programmer abilities. It is easier for me to put all of my DOS calculator utilities, like this and hp41uc for compiling and decompiling hp41 RAW programs, into one folder, mount that as the C: drive for DOSBox, and go from there. That said, I can see Linux/Unix nerds taking your Pascal source and getting a Perl script out of it, akin to the assembler/disassembler scripts that pack with WP34S. One final question: What is the the interpretation of the 13th line of the text listings beginning with PC? Les |
|||
08-19-2015, 12:20 PM
Post: #39
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-19-2015 09:00 AM)lcwright1964 Wrote: One final question: What is the the interpretation of the 13th line of the text listings beginning with PC? Hi Les, The line PC: in the Program listings is the number of program steps. For Example, PC: 96 means that 96 lines of Program Steps follows. I had given some thought to re-compiling in FreePas for windows. One big item is that FreePas would allow for long file names. But I am basically a MSDOS programmer, and am very comfortable in DosBox and, more importantly, a very lazy person. I'm just happy that it works. I'll leave it for others to make any improvement they may want. Bill Smithville, NJ |
|||
08-19-2015, 03:15 PM
Post: #40
|
|||
|
|||
RE: [go67/97 for Android] Creating .pck files in a text editor?
(08-19-2015 12:20 PM)Bill (Smithville NJ) Wrote:(08-19-2015 09:00 AM)lcwright1964 Wrote: One final question: What is the the interpretation of the 13th line of the text listings beginning with PC? Ah, it is obvious now. So if one wants to get DSP, FIX/SCI/ENG, or DEG/(G)RAD info into a PCK listing, one needs to rewrite the virtual card in the emulator with those parameters set. Doesn't seem to be a means to put that info in a program listing--indeed I just notice that your code writes xx00222 as the first line of each card side by default (i.e., all flags clear, DEG mode, FIX 2). But a 67/97 programmer who needs this just so will know to rewrite his cards to adjust the header and checksum lines if other presets are needed for a program. Les |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)