src/mess/machine/gb.c
| r5783 | r5784 | |
| 320 | 320 | gb_init_regs(machine); |
| 321 | 321 | |
| 322 | 322 | gb_rom16_0000( machine, ROMMap[ROMBank00] ? ROMMap[ROMBank00] : gb_dummy_rom_bank ); |
| 323 | //gb_rom16_0000( machine, ROMMap[ROMBank00] ); // which of these is correct? |
| 323 | 324 | |
| 325 | /* Enable BIOS rom */ |
| 326 | memory_set_bankptr(machine, 5, memory_region(machine, "maincpu") ); |
| 327 | |
| 324 | 328 | sgb_tile_data = auto_alloc_array_clear(machine, UINT8, 0x2000 ); |
| 325 | 329 | memset( sgb_tile_data, 0, 0x2000 ); |
| 326 | 330 | |
| 327 | | /* Initialize the Sound Registers */ |
| 328 | | gb_sound_w(devtag_get_device(machine, "custom"), 0x16,0xF0); /* F0 for SGB */ |
| 329 | | gb_sound_w(devtag_get_device(machine, "custom"), 0x15,0xF3); |
| 330 | | gb_sound_w(devtag_get_device(machine, "custom"), 0x14,0x77); |
| 331 | /* Initialize the Sound Registers */ // should be unnecessary with the bootrom |
| 332 | //gb_sound_w(devtag_get_device(machine, "custom"), 0x16,0xF0); /* F0 for SGB */ |
| 333 | //gb_sound_w(devtag_get_device(machine, "custom"), 0x15,0xF3); |
| 334 | //gb_sound_w(devtag_get_device(machine, "custom"), 0x14,0x77); |
| 331 | 335 | |
| 332 | 336 | sgb_window_mask = 0; |
| 333 | 337 | memset( sgb_pal_map, 0, sizeof(sgb_pal_map) ); |
| r5783 | r5784 | |
| 345 | 349 | sgb_hack = 1; |
| 346 | 350 | } |
| 347 | 351 | |
| 348 | | gb_timer.divcount = 0xABC8; |
| 352 | gb_timer.divcount = 0x0004; //0xABC8; // needs to be fixed for bootrom, probably should be 0x0004 like dmg |
| 349 | 353 | } |
| 350 | 354 | |
| 351 | 355 | MACHINE_RESET( gbpocket ) |