Ejemplo n.º 1
0
 public T this[pRom offset] {
     get {
         return(this[(int)offset]);
     }
     set {
         this[(int)offset] = value;
     }
 }
Ejemplo n.º 2
0
 /// <summary>Gets the address that would be used to refer to the specified offset if its bank were loaded into the $8000-$9FFF address range</summary>
 internal static pCpu GetAddress8000(pRom offset)
 {
     if (offset < 0x10)
     {
         throw new ArgumentException("The specified offset refers to a position before the beginning of the ROM.");
     }
     return(new pCpu((0x1FFF & (int)(offset - 0x10)) | 0x8000));
 }
Ejemplo n.º 3
0
 /// <summary>Returns the bank number the specified offset occurs in.</summary>
 internal static int GetBank(pRom offset)
 {
     if (offset < 0x10)
     {
         throw new ArgumentException("The specified offset refers to a position before the beginning of the ROM.");
     }
     return(((int)(offset - 0x10)) / PrgBankSize);
 }
Ejemplo n.º 4
0
        public pCpu ToPtr(pRom offset)
        {
            offset -= this.Offset;

            if (offset < 0 || offset > 0x3fff)
            {
                throw new ArgumentException("Offset does not belong to this bank");
            }
            if (Fixed)
            {
                return(new pCpu(0xC000 | offset));
            }
            else
            {
                return(new pCpu(0x8000 | offset));
            }
        }
Ejemplo n.º 5
0
 public PpuMacro(MetroidRom rom, pRom offset)
 {
     this.rom    = rom;
     this.offset = offset;
 }
Ejemplo n.º 6
0
 public RomObjectBase(TOwner owner, pRom offset)
     : base(offset)
 {
     this.Owner = owner;
 }
Ejemplo n.º 7
0
 public RomObject(pRom o)
 {
     Offset = o;
 }
Ejemplo n.º 8
0
 public TileEditor(byte[] data, pRom offset)
 {
     this.offset = offset;
     this.data   = data;
 }
Ejemplo n.º 9
0
 public TileEditor(MetroidRom rom, pRom offset)
 {
     this.rom    = rom;
     this.offset = offset;
     data        = rom.data;
 }
Ejemplo n.º 10
0
 public LevelPointerTable(pRom offset)
 {
     this.Offset = offset;
 }