本文整理汇总了C#中BizHawk.Emulation.Cores.Nintendo.NES.NES类的典型用法代码示例。如果您正苦于以下问题:C# NES类的具体用法?C# NES怎么用?C# NES使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NES类属于BizHawk.Emulation.Cores.Nintendo.NES命名空间,在下文中一共展示了NES类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER033":
break;
case "TAITO-TC0190FMC":
case "TAITO-TC0350FMR":
AssertPrg(128, 256); AssertChr(128, 256); AssertWram(0); AssertVram(0);
pal16 = false;
break;
case "TAITO-TC0190FMC+PAL16R4":
//this is the same as the base TAITO-TC0190FMC, with an added PAL16R4ACN which is a "programmable TTL device", presumably just the IRQ and mirroring
AssertPrg(128, 256); AssertChr(256); AssertWram(0); AssertVram(0);
pal16 = true;
mmc3 = new MMC3Variant(this);
break;
default:
return false;
}
prg_bank_mask = Cart.prg_size / 8 - 1;
chr_bank_mask = Cart.chr_size - 1;
prg_regs_8k[0] = 0x00;
prg_regs_8k[1] = 0x00;
prg_regs_8k[2] = 0xFE; //constant
prg_regs_8k[3] = 0xFF; //constant
SyncMirror();
return true;
}
示例2: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER013":
AssertPrg(32);
AssertChr(0);
Cart.vram_size = 16;
Cart.wram_size = 0;
break;
case "NES-CPROM": //videomation
AssertPrg(32); AssertChr(0); AssertVram(16); AssertWram(0);
break;
default:
return false;
}
//TODO - assert that mirror type is vertical?
//set it in the cart?
SetMirrorType(NES.NESBoardBase.EMirrorType.Vertical);
return true;
}
示例3: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER091":
break;
default:
return false;
}
int chrSize = Cart.chr_size;
if (chrSize > 256) // Hack to support some bad dumps
{
chrSize = 512;
}
chr_bank_mask_2k = chrSize / 2 - 1;
prg_bank_mask_8k = Cart.prg_size / 8 - 1;
prg_regs_8k[3] = 0xFF;
prg_regs_8k[2] = 0xFE;
mmc3 = new MMC3(this, 0x7FFFFFFF);
SetMirrorType(Cart.pad_h, Cart.pad_v);
return true;
}
示例4: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "UNIF_UNL-DRIPGAME":
break;
default:
return false;
}
Cart.wram_size = 8;
Cart.wram_battery = false;
AssertPrg(16, 32, 64, 128, 256); // 4 bits x 16
AssertChr(8, 16, 32); // 4 bits x 2
AutoMapperProps.Apply(this);
prgmask = Cart.prg_size / 16 - 1;
chrmask = Cart.prg_size / 2 - 1;
prg[1] = prgmask;
SetMirror(0);
if (NES.apu != null) // don't start up sound when in configurator
{
sound0 = new SoundChannel(NES.apu.ExternalQueue);
sound1 = new SoundChannel(NES.apu.ExternalQueue);
}
return true;
}
示例5: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER080":
break;
case "MAPPER207":
tlsrewire = true;
break;
case "TAITO-X1-005":
if (Cart.pcb == "アシユラー")
tlsrewire = true;
break;
default:
return false;
}
SetMirrorType(EMirrorType.Vertical);
chr_bank_mask = Cart.chr_size / 1 - 1;
prg_bank_mask = Cart.prg_size / 8 - 1;
// the chip has 128 bytes of WRAM built into it, which we have to instantiate ourselves
Cart.wram_size = 0;
prg_regs_8k[3] = 0xFF;
return true;
}
示例6: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER090":
case "UNIF_UNL-TEK90":
mapper_090 = true;
nt_advanced_control = false;
break;
case "MAPPER209":
mapper_209 = true;
break;
case "MAPPER211":
nt_advanced_control = true;
mapper_211 = true;
break;
default:
return false;
}
prg_bank_mask_8k = Cart.prg_size / 8 - 1;
chr_bank_mask_1k = Cart.chr_size - 1;
InitValues();
return true;
}
示例7: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER071":
break;
case "CAMERICA-ALGN": //Linus Spacehead's Cosmic Crusade (U)
AssertPrg(128,256); AssertChr(0); AssertWram(0);
AssertVram(8,16); //zero 22-mar-2012 - added 16 here as a hack to make micro machines (aladdin) load. should remove this after it is fixed in the DB
break;
case "CAMERICA-BF9093": //Big Nose Freaks Out (U)
AssertPrg(64,128,256); AssertChr(0); AssertWram(0); AssertVram(8);
break;
case "CAMERICA-BF9097": //Fire Hawk
AssertPrg(128); AssertChr(0); AssertWram(0); AssertVram(8);
mirror_control_enabled = true;
break;
case "CODEMASTERS-NR8N": // untested
AssertPrg(256); AssertChr(0); AssertWram(0); AssertVram(8);
break;
default:
return false;
}
prg_bank_mask_16k = Cart.prg_size / 16 - 1;
prg_banks_16k[0] = 0x00;
prg_banks_16k[1] = 0xFF & prg_bank_mask_16k;
SetMirrorType(Cart.pad_h, Cart.pad_v);
return true;
}
示例8: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "AVE-NINA-07": // wally bear and the gang
// it's not the NINA_001 but something entirely different; actually a colordreams with VRAM
// this actually works
AssertPrg(128); AssertChr(0); AssertWram(0); AssertVram(8);
break;
case "IREM-BNROM": //Mashou (J).nes
case "NES-BNROM": //Deadly Towers (U)
AssertPrg(128); AssertChr(0); AssertWram(0); AssertVram(8);
break;
default:
return false;
}
prg_bank_mask_32k = Cart.prg_size / 32 - 1;
SetMirrorType(Cart.pad_h, Cart.pad_v);
return true;
}
示例9: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER011":
break;
case "Discrete_74x377-FLEX":
break;
case "COLORDREAMS-74*377":
AssertPrg(32, 64, 128); AssertChr(16, 32, 64, 128); AssertVram(0); AssertWram(0);
break;
case "AGCI-47516":
SetMirrorType(Cart.pad_h, Cart.pad_v);
break;
case "AGCI-50282": // death race
case "MAPPER144":
bus_conflict_50282 = true;
bus_conflict = false;
SetMirrorType(Cart.pad_h, Cart.pad_v);
break;
default:
return false;
}
AssertPrg(32, 64, 128);
AssertChr(8, 16, 32, 64, 128);
prg_bank_mask_32k = Cart.prg_size / 32 - 1;
chr_bank_mask_8k = Cart.chr_size / 8 - 1;
return true;
}
示例10: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER105":
break;
case "NES-EVENT":
AssertPrg(256); AssertChr(0); AssertVram(8); AssertWram(8);
break;
default:
return false;
}
prg_bank_mask_16k = Cart.prg_size / 16 - 1;
SetMirrorType(EMirrorType.Vertical);
scnt = new MMC1.MMC1_SerialController();
scnt.WriteRegister = SerialWriteRegister;
scnt.Reset = SerialReset;
Sync();
return true;
}
示例11: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER176":
break;
default:
return false;
}
prg_bank_mask_8k = (Cart.prg_size / 8) - 1;
chr_bank_mask_8k = (Cart.chr_size / 8) - 1;
mirror = 0;
SyncMirror();
sbw = 0;
prg_banks_8k[0] = 0;
prg_banks_8k[1] = 1;
prg_banks_8k[2] = 62;
prg_banks_8k[3] = 63;
ApplyMemoryMapMask(prg_bank_mask_8k,prg_banks_8k);
chr_banks_8k[0] = 0;
ApplyMemoryMapMask(chr_bank_mask_8k, chr_banks_8k);
return true;
}
示例12: Apply
public static void Apply(NES.INESBoard board)
{
var fields = board.GetType().GetFields();
foreach (var field in fields)
{
var attribs = field.GetCustomAttributes(false);
foreach (var attrib in attribs)
{
if (attrib is MapperPropAttribute)
{
string Name = ((MapperPropAttribute)attrib).Name ?? field.Name;
string Value;
if (board.InitialRegisterValues.TryGetValue(Name, out Value))
{
try
{
field.SetValue(board, Convert.ChangeType(Value, field.FieldType));
}
catch (Exception e)
{
if (e is InvalidCastException || e is FormatException || e is OverflowException)
throw new InvalidDataException("Auto Mapper Properties were in a bad format!", e);
else
throw e;
}
}
break;
}
}
}
}
示例13: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER087":
AssertPrg(8, 16, 32);
AssertChr(8, 16, 32);
AssertVram(0);
Cart.wram_size = 0;
break;
case "JALECO-JF-05":
case "JALECO-JF-06":
case "TAITO-74*139/74":
case "JALECO-JF-07":
case "JALECO-JF-08":
case "JALECO-JF-09": // untested
case "KONAMI-74*139/74":
case "JALECO-JF-10":
AssertPrg(16, 32); AssertChr(16, 32); AssertVram(0); AssertWram(0);
break;
default:
return false;
}
prg_byte_mask = Cart.prg_size * 1024 - 1;
chr_mask_8k = Cart.chr_size / 8 - 1;
SetMirrorType(Cart.pad_h, Cart.pad_v);
return true;
}
示例14: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
//configure
switch (Cart.board_type)
{
case "MAPPER032":
break;
case "IREM-G101":
if (Cart.pcb == "UNK-IF-13")
{
//special case for major league
oneScreenHack = true;
}
AssertPrg(128, 256); AssertChr(128); AssertWram(0, 8); AssertVram(0);
break;
default:
return false;
}
prg_bank_mask = Cart.prg_size / 8 - 1;
chr_bank_mask = Cart.chr_size - 1;
prg_regs_8k[0] = 0x00;
prg_regs_8k[1] = 0x01;
prg_regs_8k[2] = 0xFE; //constant
prg_regs_8k[3] = 0xFF; //constant
prg_regs_8k[4] = 0xFE; //constant //** NOTE ** according to disch's doc this would be fixed to 0. but it needs to be this to work. someone should let him know.
prg_regs_8k[5] = 0x01;
prg_regs_8k[6] = 0x00;
prg_regs_8k[7] = 0xFF; //constant
SyncMirror();
return true;
}
示例15: Configure
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "NAMCOT-175":
//wagyan land 2
//splatter house
SetMirrorType(Cart.pad_h, Cart.pad_v);
break;
case "NAMCOT-340":
//family circuit '91
//dream master
//famista '92
enablemirror = true;
break;
case "MAPPER210":
// not sure what to do here because the popular public collection
// has nothing in mapper 210 except some mortal kombat pirate cart
enablemirror = true;
SetMirrorType(Cart.pad_h, Cart.pad_v);
break;
default:
return false;
}
AssertPrg(64, 128, 256, 512);
AssertChr(64, 128, 256);
AssertVram(0);
prg_bank_mask_8k = Cart.prg_size / 8 - 1;
chr_bank_mask_1k = Cart.chr_size / 1 - 1;
prg[3] = prg_bank_mask_8k;
return true;
}