Post Reply 
HP67 running
05-29-2016, 05:17 AM
Post: #4
RE: HP67 running
Hi all,

Thinking about the problem mentioned in the previous post, I've been going through the 67's card reader code trace from the simulator.

Data blocks on the cards consist of 7 bytes and 38 of these blocks are written to each card side. This was what the emulator expected the calculator code was going to want in its entirety, but this was not the case.

After a card has been detected by the calculator, the key wait loop exits, Read Mode is set and then the code makes its first CRC 1700 call 'before' turning on the card motor. This I assume, does some initialization before card reading actually starts. If a read error occurs during this process, S[3] is ignored because it is not tested for in this section of code.

As the card begins its journey through the card reader, there are 0's appearing in the first 3 blocks (bytes 0 - 20) of the card header and I am thinking these are used for syncing purposes inside the card reader chip. The first non zero value will be the first byte for the [PrevStatus] data block - (byte 21). It is here where I think valid data is assumed to start and 7 bytes of zero will be sitting in buffer ($9B) ready to be read.

The code then executes the 2nd CRC 1700 and this block of zeros is fetched from the card reader and makes room for the incoming block. The 3rd CRC 1700 then reads the [PrevStatus] block, then 32 blocks of program data and finally, 2 blocks for the checksum.

What this means is that the fist 2 blocks of data are ignored by the calculator, which is what my code failed to take into account.


cheers

Tony
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP67 running - teenix - 05-27-2016, 03:10 AM
RE: HP67 running - PANAMATIK - 05-27-2016, 06:30 PM
RE: HP67 running - teenix - 05-27-2016, 11:09 PM
RE: HP67 running - teenix - 05-29-2016 05:17 AM
RE: HP67 running - PANAMATIK - 05-29-2016, 09:00 AM
RE: HP67 running - teenix - 05-29-2016, 10:37 AM
RE: HP67 running - PANAMATIK - 05-29-2016, 08:49 PM
RE: HP67 running - teenix - 05-31-2016, 10:33 AM
RE: HP67 running - PANAMATIK - 05-31-2016, 07:25 PM
RE: HP67 running - teenix - 05-31-2016, 12:55 PM
RE: HP67 running - Harald - 06-10-2016, 12:23 PM
RE: HP67 running - teenix - 06-12-2016, 02:14 AM



User(s) browsing this thread: 1 Guest(s)