[FRAM71] Pre-Production Batch
|
05-07-2015, 03:45 PM
Post: #100
|
|||
|
|||
RE: [FRAM71] Pre-Production Batch
In the documentation Hans gives sample programs to load images into your FRAM71 using a serial connection, however since I do not have a PILBOX, and I found the setup using a serial connection through a 82164A required what seemed like lot of setup, so I came up with this alternate solution.
My solution is to load a ASCII HEX dump of the image from a file instead of across a serial link. In the package of ROM images that has been made available these are the xxxxxxx.MEM files. The .MEM files as distributed are DOS text files ie the records are terminated with a CRLF sequence which is not compatible with the 71B's idea of a text file, which is no surprise I think every system HP built has a different text file format. The 71B text file format starts each record with one byte of 00 and a second byte with the record length, I found the easiest way to convert the files was to us HP's lifutil to copy the DOS files to a LIF format diskette with the conversion option "DOS text to HP BASIC ASCII" however it would probably be a trivial exercise to write a program to make the conversion. Below are two of my programs that are the equivalent of Hans' programs to load the OS image and to load the hard FORTH image respectively. These programs could also be used to load other ROM images as well, things you may need to modify are the source file name in line 20, target address in line 30, and the size of the image in line 40. The size may seem a bit cryptic but here is how it works on each pass of the loop starting on line 40, one record containing 64 bytes of data is read from the file the 32*64 is 2048 or the ASCII HEX equivalent of 1K bytes of binary code so in the example of the OS image the size is expressed as 64*32-1 or 64K so if you image was 16K line 40 would read "FOR I=0 TO 16*32-1" Code: 10 DIM A$[64] Code: 10 DIM A$[64] I also wrote a simple C program to convert binary images to DOS text HEX dumps. It was written for an ancient version of Waterloo C but I think the only function that might not be standard in it is 'nibble = div(inbyte,0x10)' this div function does an integer divide and returns and integer quotient and remainder. The program is very rough and has fixed input and output file names, but it does work. Code: /* One other problem you may encounter is if your 71B has had extra 32K memory modules installed inside, they will most likely be found and configured ahead of the 32K FRAM71 space you may wish to load the hard FORTH image to, so that FRAM71 "chip" will not be located at 0x30000. The 71B maps RAM into the address space with the largest chunks first and in the order that they are found, so memory that was installed internally will likely be attached to port 0 and will always be found ahead of memory in the card reader bay which is on port 5. Even before I received my first FRAM71 I had a requirement to know where specific memory modules got plugged into the memory map so I wrote this program that parses the OS's table where it keep track of this. Code: 10 REAL S1(15) @ S2=15 @ FOR S3=1 TO 15 @ S1(S3)=2^S2/4 @ S2=S2-1 @ NEXT S3 @ S1(15)=.5 Here is a sample of the output from the program for my 71B that has three 32K memory modules hard wired inside it. Misc memory will contain ROM and freed port memory. The memory modules found are listed in the order they are discovered so the addresses will seem to jump around you will note the three 32K modules on Port 0 have lower addresses than the one 32K "chip" found on port 5. Code: System RAM |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)