Previous 15994 Revisions Next

r5784 Friday 18th September, 2009 at 06:21:36 UTC by Jonathan Gevaryahu
[supergb] actually use sgb bios. be warned this code doesn't work (causes sigsegv) due to several bugs, at least one of which is in the supergb 'hle' of the snes side.
[src/mess/machine]gb.c

src/mess/machine/gb.c
r5783r5784
320320   gb_init_regs(machine);
321321
322322   gb_rom16_0000( machine, ROMMap[ROMBank00] ? ROMMap[ROMBank00] : gb_dummy_rom_bank );
323   //gb_rom16_0000( machine, ROMMap[ROMBank00] ); // which of these is correct?
323324
325   /* Enable BIOS rom */
326   memory_set_bankptr(machine, 5, memory_region(machine, "maincpu") );
327
324328   sgb_tile_data = auto_alloc_array_clear(machine, UINT8, 0x2000 );
325329   memset( sgb_tile_data, 0, 0x2000 );
326330
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);
331335
332336   sgb_window_mask = 0;
333337   memset( sgb_pal_map, 0, sizeof(sgb_pal_map) );
r5783r5784
345349            sgb_hack = 1;
346350   }
347351
348   gb_timer.divcount = 0xABC8;
352   gb_timer.divcount = 0x0004; //0xABC8; // needs to be fixed for bootrom, probably should be 0x0004 like dmg
349353}
350354
351355MACHINE_RESET( gbpocket )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team