예제 #1
0
        public static bool TryMapRomToRam(this IRomMapper mapper, int romAddress, out int value)
        {
            ulong i = (uint)romAddress;
            ulong o;
            bool  b = mapper.TryMapRomToRam(i, out o);

            value = (int)(uint)(o & 0xffffffffu);
            return(b);
        }
예제 #2
0
        public static bool TryMapRomToRam(this IRomMapper mapper, long romAddress, out long value)
        {
            ulong i = (ulong)romAddress;
            ulong o;
            bool  b = mapper.TryMapRomToRam(i, out o);

            value = (long)o;
            return(b);
        }
예제 #3
0
        public static long MapRomToRam(this IRomMapper mapper, long romAddress)
        {
            long v;

            if (mapper.TryMapRomToRam(romAddress, out v))
            {
                return(v);
            }
            throw new Exception("Address not mappable.");
        }