void nes_state::famicom(machine_config &config) { nes(config); NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad"); NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad"); NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr); m_exp->set_brightpixel_callback(FUNC(nes_state::bright_pixel)); SOFTWARE_LIST(config, "flop_list").set_original("famicom_flop"); SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass"); }
int main(int argc, char* argv[]) { NESSDLDisplay display; NES nes(Region::REGION_NTSC, &display); GamePak cartridge; cartridge.loadFromFile(argv[1]); nes.insertCartridge(&cartridge, false); nes.runFrame(); return 0; }
/** * Check if a pkg is informative. * * Used by dselect and dpkg query options as an aid to decide whether to * display things, and by dump to decide whether to write them out. */ bool pkg_is_informative(struct pkginfo *pkg, struct pkgbin *pkgbin) { /* We ignore Section and Priority, as these tend to hang around. */ if (pkgbin == &pkg->installed && (pkg->want != want_unknown || pkg->eflag != eflag_ok || pkg->status != stat_notinstalled || informativeversion(&pkg->configversion))) return true; if (pkgbin->depends || nes(pkgbin->description) || nes(pkgbin->maintainer) || nes(pkgbin->origin) || nes(pkgbin->bugs) || nes(pkgbin->installedsize) || nes(pkgbin->source) || informativeversion(&pkgbin->version) || pkgbin->conffiles || pkgbin->arbs) return true; return false; }
int informative(struct pkginfo *pkg, struct pkginfoperfile *info) { /* Used by dselect and dpkg query options as an aid to decide * whether to display things, and by dump to decide whether to write them * out. */ if (info == &pkg->installed && (pkg->want != want_unknown || pkg->eflag != eflagv_ok || pkg->status != stat_notinstalled || informativeversion(&pkg->configversion))) /* We ignore Section and Priority, as these tend to hang around. */ return 1; if (!info->valid) return 0; if (info->depends || nes(info->description) || nes(info->maintainer) || nes(info->origin) || nes(info->bugs) || nes(info->installedsize) || nes(info->source) || informativeversion(&info->version) || info->conffiles || info->arbs) return 1; return 0; }
int main(int argc, char *argv[]) { try { std::ifstream script; NES nes("res/smb.nes", script); nes.run(); } catch (int) { std::cout << "died\n"; } }
void nes_state::nespal(machine_config &config) { nes(config); /* basic machine hardware */ m_maincpu->set_clock(PAL_APU_CLOCK); PPU_2C07(config.replace(), m_ppu); m_ppu->set_cpu_tag(m_maincpu); m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI); m_cartslot->set_clock(PAL_APU_CLOCK); /* video hardware */ m_screen->set_refresh_hz(50.0070); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC((106.53/(PAL_APU_CLOCK.dvalue()/1000000)) * (ppu2c0x_device::VBLANK_LAST_SCANLINE_PAL-ppu2c0x_device::VBLANK_FIRST_SCANLINE+1+2))); m_screen->set_size(32*8, 312); m_screen->set_visarea(0*8, 32*8-1, 0*8, 30*8-1); }