Service module (SM1C) and peripherial flags
|
05-27-2024, 08:46 AM
(This post was last modified: 05-27-2024 08:50 AM by ThomasF.)
Post: #1
|
|||
|
|||
Service module (SM1C) and peripherial flags
Hi,
I was pointed to a piece of code in the Service module for the HP41, which apparently checks or tests the peripheral flags. For me, the code looks quite strange, I understand what the test tries to do, but I can't understand how it could or should work! Apparently it loads a flag pattern in the C register, and then checks to see if the FI flags are set accordingly. But I can't understand how the flags are updated, IMHO only specific hardware can drive the FI lines and setting of the flags, this is not possible by just software. Code: We start by initializing the C register ... So after this test is executed, cpu flag 11 is set if any peripheral flag mismatches the value in C. Maybe the pattern in C is only a reference to what is expected, but the values are not used by the code, it would only make sense if C is somehow shifted out on the FI bus - but I can't see how that could be done! Or maybe if no peripheral is selected, does the value of C drive the FI-flags instead? This is something I have missed if that is the case! But that would make no sense either - since normally no peripheral is selected, and any '0' in C[S] would then cause a service request (?FI= 13 aka ?SERV). My next step is to try and write a small test program that executes this code, or just try to trace the Service module to see if this code works, or even if it is actually executed (maybe the code is left in the ROM but never used). Maybe someone has some thoughts or ideas about this? Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
05-27-2024, 09:41 AM
Post: #2
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
Is C used further on in the code?
Initially it is set to FFFF0000FFF000, but at 4633 is cleared to 00000000000000. cheers Tony |
|||
05-27-2024, 10:39 AM
Post: #3
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
(05-27-2024 09:41 AM)teenix Wrote: Is C used further on in the code? Hi Tony, Well, at 4633 only the most significant nibble is cleared, ie. C = 0FFF0000FFF000. After that PRPHSLCT is called, and C[XS] is incremented, both uses only the last 3 last nibbles. RAMSLCT would then select RAM at 0x0100, and we write 0x0FFF0000FFF100 to the register at 0x100, clear the C register and read it back to verify if 0x100 exists in the address space (first register in memory module 1 (in a 41C)). But, I have not looked much at the code yet, but seems like it tries to see what memory is available, but the actual value in C is not used (only last 3 nibbles to point at the wanted reg address). Cheers, Thomas Code: 4633 05E C=0 MS ; C = 0FFF0000FFF000 [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
05-27-2024, 10:43 AM
Post: #4
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
(05-27-2024 08:46 AM)ThomasF Wrote: Apparently it loads a flag pattern in the C register, and then checks to see if the FI flags are set accordingly. Yes, that test won't work without a "flag-wired" module, which presumably loops the DATA signal (which usually presents the value of C) to the FI signal. It might be just a direct connection, though there's a small chance that they might have buffered it. I brought this up once before here, and people didn't seem to believe me. The flag-wired module is mentioned in the service manuals, e.g. in the original 41C Service Manual, Table 4-1 on page 4-1, item ET-11967 "Flag-Wired Memory Module", diagnostic test table step 1 Preparation on page 4-2, and and step 12 on page 4-4, step 1 in table 4-2 on page 4-6, step 12 on page 4-11, and aslo in the Service Note 41C-35 page 3 which is generally found appended to scans of the 41C/CV/CX service manual. (For the 41CV and 41CX it would have to ba a flag-only wired module, and no P/N is given, as compared to the flag-wired-memory module for the 41C.) Diego says that the ET-11967 is a double memory module, hard-addressed, with the flag wiring, but he apparently didn't speciificallly investigate the flag wiring. Perhaps I didn't read closely enough, but I don't recall anything in the service manual suggested to me that it had to be a double mem. |
|||
05-27-2024, 10:56 AM
Post: #5
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
(05-27-2024 10:43 AM)brouhaha Wrote:(05-27-2024 08:46 AM)ThomasF Wrote: Apparently it loads a flag pattern in the C register, and then checks to see if the FI flags are set accordingly. Ah, thanks Eric, that makes much more sense! So, looking at the memory usage further down in the code, it might be possible figure out the memory specs as well. This brings me on a new trail - it should be possible to have the Pico emulating the ET-11976 and get the Service module up and running too ... Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
05-27-2024, 12:56 PM
Post: #6
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
This is great new info. Is there someone here with that module who can help us out? Would be great to be able to borrow it to make some bus traces
Regards, Meindert |
|||
05-28-2024, 06:38 AM
Post: #7
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
Thanks for the info about the ET-11967 module!
I updated my Tiny41 software in the Pico board I have to shortcut DATA into FI if the Service SM-1C ROM is loaded, and yes, that seems to work! As can be seen in the log none of the PF flag tests jumps except ?SERV and we end up at 4633 as expected. Basically I added the following pseudo code (dataFI is active high - if "high" drive FI line low): Code: if( serviceRom ) That the test fails further on is another problem (probably when checking memory - have to trace and see what happens there) - but at least this shows that we are probably able to emulate the 11967 module as well ... Cheers, Thomas Part of a trace from a HP-41CV running Service Module (SM-1C) loaded on the Pico41 board: Code: D 2252>0000|00000000000000 *x 460A 04E - C=0 ALL [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
05-28-2024, 07:06 PM
(This post was last modified: 05-28-2024 07:07 PM by ThomasF.)
Post: #8
|
|||
|
|||
RE: Service module (SM1C) and peripherial flags
(05-27-2024 10:43 AM)brouhaha Wrote: I brought this up once before here, and people didn't seem to believe me. I can only agree - the DATA line must be fed to FI for the test to work (e.g. by connecting DATA and FI pins), and as my test and examine of the source code for the Service ROM shows, there must only by exactly 3 memory modules in the calculator when executing the test - otherwise it will fail. It is also true that the Sevice Module SM-1C and the "IO PORT TEST" only works in a HP-41C (with 2 memory modules and the ET-11967 module) and can not be executed successfully in a CV or CX. It must for the CV or CX be executed with another version of the Service Module (which support full memory) and a FI-wired module without any memory. Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)