Example #1
0
        public byte PeekReg(int addr)
        {
            switch (addr)
            {
            case 0x4000:
            case 0x4001:
            case 0x4002:
            case 0x4003:
            case 0x4004:
            case 0x4005:
            case 0x4006:
            case 0x4007:
            case 0x4008:
            case 0x4009:
            case 0x400A:
            case 0x400B:
            case 0x400C:
            case 0x400D:
            case 0x400E:
            case 0x400F:
            case 0x4010:
            case 0x4011:
            case 0x4012:
            case 0x4013:
                return(apu.PeekReg(addr));

            case 0x4014: /*OAM DMA*/ break;

            case 0x4015: return(apu.PeekReg(addr));

            case 0x4016:
            case 0x4017:
                return(peek_joyport(addr));

            default:
                //Console.WriteLine("read register: {0:x4}", addr);
                break;
            }
            return(0xFF);
        }