Thanks! That makes sense. I have not looked at the readout display at all. Now that you mention it, I should search for the address of word 12 and will likely find the readout code.
I found the code. The function that does this starts at 0x0a39. I am still investigating the details, but similar to the settings I see three sets three words. Calculation with the three words looks fairly similar to the setting. I am not sure yet what the third set of three words refers to yet, I will have to look at the ADC code in more detail.
It involves a checksum (bytewise XOR) over a bunch of bitfields that are modified at various places. By toggling bits in the bitfields, it turns off bits in the checksum. The program relies on the checksum to tell which value to update. I need to identify all variables and trace where they are being updated and what they mean.
There appears to be support for a multiplier for VSET (for lower voltage ranges) through 0x099f (I plan to check the PS310 firmware from the other thread to see if it has non-zero values as I would expect). [...]
I checked the PS310 1.4 (without GPIB) firmware from the previous thread Sandra linked to, and indeed the block of four bytes (located at a slightly different address) is non zero:
ROM:095C unk_95C: db 2 ; DATA XREF: sub_898+53o
ROM:095D db 2
ROM:095E db 1
ROM:095F db 1
This would scale the values sent to the DAC so the smaller voltage range would still correspond to full scale on the DAC. Though it appears that current values are also scaled up. I wonder if there is a separate block for readout, or that they just change the readout calibration constants to match? I am not sure if figuring this out is really a priority, but it at least it confirms my theory that the parameters at 0x99F (0x95C in the PS310 firmware) are model-specific.
And for the end the new memory map. Still a few locations are unknown. Any Ideas?
I will find the readout code and see if I can find a third readout calibration factor.
See above. Working on it.
Other thing I noticed. Sandra (and the schematic) has U507 Q4 as NC, but this code (that appears to shutdown the supply in case of I_FAULT, PRI_FAULT or V_FAULT), sets it:
ROM:0D42 shutdown: ; CODE XREF: sub_D94+15p
ROM:0D42 ; sub_D94+57p ...
ROM:0D42 ld hl, port_78h_value
ROM:0D45 set 4, (hl) ; spare???
ROM:0D47 res 0, (hl) ; set -shutdown low
ROM:0D49 ld a, (port_78h_value)
ROM:0D4C out (78h), a ; set misc switches (u507)
Old code? different model? Error in schematic?
Does anyone know what J504 (status1 bit 6) connects to? My copy of the schematics is not searchable, and a quick scan through the schematic pages did not reveal anything. There is a function at 0x108c that checks it and shuts down the power and sets the voltage to zero if it is high. Could be another fault or interlock indicator?
Does anyone know what port 0x3a is connected to? It is reading from it in a function that also writes to the display (for now named something_display
):
ROM:01C9 loc_1C9: ; CODE XREF: sub_15D+66j
ROM:01C9 in a, (3Ah)
ROM:01CB bit 7, a
ROM:01CD jp z, loc_227
ROM:01D0 set 1, c
ROM:01D2 jp loc_227
Appears to be related to editing values on the display, so could be keyboard or display.