void gb_state::machine_reset() { gb_init(); /* Enable BIOS rom */ m_bios_disable = false; }
gb_t *gb_new() { gb_t *gb; if (allocate(sizeof(gb_t), 0, (void **)&gb) != 0) return NULL; if (!gb_init(gb)) return NULL; return gb; }
void gb_state::machine_reset() { gb_init(); /* Enable BIOS rom */ m_bios_disable = 0; m_divcount = 0x0004; }
MACHINE_RESET_MEMBER(gb_state,sgb) { gb_init(); gb_init_regs(); /* Enable BIOS rom */ m_bios_disable = false; }
MACHINE_RESET_MEMBER(gb_state,gb) { gb_init(); /* Enable BIOS rom */ m_bios_disable = 0; m_divcount = 0x0004; }
MACHINE_RESET_MEMBER(gb_state,gbc) { gb_init(); gb_init_regs(); /* Enable BIOS rom */ m_bios_disable = 0; for (int i = 0; i < 8; i++) memset(m_gbc_rammap[i], 0, 0x1000); }
MACHINE_RESET_MEMBER(gb_state,gbc) { gb_init(); gb_init_regs(); /* Enable BIOS rom */ m_bios_disable = false; for (auto & elem : m_gbc_rammap) memset(elem, 0, 0x1000); }
MACHINE_RESET_MEMBER(gb_state,gbpocket) { gb_init(); gb_init_regs(); m_bios_disable = 1; /* Initialize the Sound registers */ m_custom->sound_w(generic_space(), 0x16, 0x80); m_custom->sound_w(generic_space(), 0x15, 0xF3); m_custom->sound_w(generic_space(), 0x14, 0x77); m_divcount = 0xABC8; }
int rom_load(char * rpath) { char tmp[PATH_MAX]; int romsize, ramsize; strcpy(RomPath,rpath); strcpy(tmp, RomPath); *(strrchr(tmp,'/')+1) = 0; strcpy(setting2.lastpath, tmp); bTurbo = 0; gb_destroy(); gb_init(); // w赜t@Cð[h·éB by ruka romsize = load_rom(RomPath); if (!romsize){ renderer_set_msg("ROM Load Failed"); return -1; } ramsize = load_sram(SramPath); if (!gb_load_rom(rom_image, romsize, sram_space, ramsize)){ renderer_set_msg("ROM Load Failed"); return -1; } if(org_gbtype==1) renderer_set_msg("ROM TYPE:GB"); else if(org_gbtype==2) renderer_set_msg("ROM TYPE:SGB"); else if(org_gbtype==3) renderer_set_msg("ROM TYPE:GBC"); free_rewind_states(); allocate_rewind_states(); set_gb_type(); return romsize; }