private static Overlay[] loadOvTable(File table) { Overlay[] ovs = new Overlay[table.fileSize/32]; ByteArrayInputStream tbl = new ByteArrayInputStream(table.getContents()); int i = 0; while (tbl.lengthAvailable(32)) { uint ovId = tbl.readUInt(); uint ramAddr = tbl.readUInt(); uint ramSize = tbl.readUInt(); uint bssSize = tbl.readUInt(); uint staticInitStart = tbl.readUInt(); uint staticInitEnd = tbl.readUInt(); ushort fileID = tbl.readUShort(); tbl.skip(6); //unused 0's ovs[ovId] = new Overlay(FS.getFileById(fileID), table, (uint)i*32); i++; } return ovs; }