001package jmri.jmrix.nce.ph5driver;
002
003/**
004 * Updates for command station memory of the PH5.
005 *
006 * @author Ken Cameron Copyright (C) 2023
007 */
008public class Ph5CmdStationMemory extends jmri.jmrix.nce.NceCmdStationMemory {
009
010    public Ph5CmdStationMemory() {
011        super();
012    }
013
014    /*
015     * give addr for cab data base
016     */
017    @Override
018    public int getCabAddr() {
019        return 0x0000; // start of NCE CS cab context page for cab 0
020    }
021
022    /*
023     * give max cab id
024     */
025    @Override
026    public int getCabMax() {
027        return 59;    // number of cab memory slots
028    }
029    
030    /*
031     * give addr computer cab
032     */
033    @Override
034    public int getCompCabAddr() {
035        return 0x3C00; // start of computer cab context page, PowerPro/CS2
036    }
037    
038    /*
039     * give addr consist head
040     */
041    @Override
042    public int getConsistHeadAddr() {
043        return 0x4e00;  // start of NCE CS Consist Head memory
044    }
045
046    /*
047     * give addr consist tail
048     */
049    @Override
050    public int getConsistTailAddr() {
051        return 0x4F00;  // start of NCE CS Consist Tail memory
052    }
053    
054    /*
055     * give addr consist middle
056     */
057    @Override
058    public int getConsistMidAddr() {
059        return 0x5000;  // start of NCE CS Consist memory
060    }
061
062    /*
063     * give addr macro table
064     */
065    @Override
066    public int getMacroAddr() {
067        return 0x6000; // start of NCE CS Macro memory 
068    }
069    
070    @Override
071    public int getAccyMemAddr() {
072        return 0x5400;
073    }
074
075    @Override
076    public int getAccyMemSize() {
077        return 0x100;
078    }
079    
080    /*
081     * give base addr for clock operations
082     */
083    @Override
084    public int getClockAddr() {
085        return 0x3E00; // base for clock values
086    }
087
088    /*
089     * give the AIU flag address
090     */
091    @Override
092    public int getAiuFlagAddr() {
093        return 0x3E15;
094    }
095
096    /*
097     * give cab index functions 13-20
098     */
099    @Override
100    public int getCabIdxFunct13_20() {
101        return 39; // Function keys 13 - 30
102    }
103    
104    /*
105     * give cab index functions 21-28
106     */
107    @Override
108    public int getCabIdxFunct21_28() {
109        return 40; // Function keys 21 - 28
110    }
111        
112    /*
113     * give cab index functions 29-36
114     */
115    public int getCabIdxFunct29_36() {
116        return 41; // Function keys 29 - 36
117    }
118    
119    /*
120     * give cab index functions 37-44
121     */
122    public int getCabIdxFunct37_44() {
123        return 42; // Function keys 37 - 44
124    }
125    
126    /*
127     * give cab index functions 45-52
128     */
129    public int getCabIdxFunct45_52() {
130        return 43; // Function keys 45 - 52
131    }
132    
133    /*
134     * give cab index functions 53-60
135     */
136    public int getCabIdxFunct53_60() {
137        return 44; // Function keys 53 - 60
138    }
139    
140    /*
141     * give cab index functions 53-60
142     */
143    public int getCabIdxFunct61_68() {
144        return 45; // Function keys 61 - 68
145    }
146
147}