示例#1
0
        private static ushort ics2115_0_word_r(int offset)
        {
            switch (offset)
            {
            case 0:
                return(ICS2115.ics2115_r(0));

            case 1:
                return(ICS2115.ics2115_r(1));

            case 2:
                return((ushort)((ICS2115.ics2115_r(3) << 8) | ICS2115.ics2115_r(2)));
            }
            return(0xff);
        }
示例#2
0
        private static byte ics2115_0_word_r1(int offset)
        {
            switch (offset)
            {
            case 0:
                return(0);

            case 1:
                return(0);

            case 2:
                return(ICS2115.ics2115_r(3));
            }
            return(0);
        }
示例#3
0
        private static byte ics2115_0_word_r2(int offset)
        {
            switch (offset)
            {
            case 0:
                return(ICS2115.ics2115_r(0));

            case 1:
                return(ICS2115.ics2115_r(1));

            case 2:
                return(ICS2115.ics2115_r(2));
            }
            return(0xff);
        }
示例#4
0
        public static byte ZReadHardware(ushort address)
        {
            byte result = 0;

            if (address >= 0x8000 && address <= 0x8003)
            {
                int offset = address - 0x8000;
                result = ICS2115.ics2115_r(offset);
            }
            else if (address >= 0x8100 && address <= 0x81ff)
            {
                result = (byte)Sound.soundlatch3_r();
            }
            else if (address >= 0x8200 && address <= 0x82ff)
            {
                result = (byte)Sound.soundlatch_r();
            }
            else if (address >= 0x8400 && address <= 0x84ff)
            {
                result = (byte)Sound.soundlatch2_r();
            }
            return(result);
        }