Previous 15994 Revisions Next

r5880 Thursday 24th September, 2009 at 16:21:09 UTC by Wilbert Pol
[GBCOLOR] Added hashes for real bios.
[docs]messnew.txt
[src/mess/drivers]gb.c
[src/mess/machine]gb.c
[src/mess/video]gb.c

src/mess/video/gb.c
r5879r5880
13671367      gb_lcd.hdma_enabled = 0;
13681368      gb_lcd.hdma_possible = 0;
13691369
1370      /* Make sure the VBlank interrupt is set when the first instruction gets executed */
1371      timer_set(machine,  cputag_clocks_to_attotime(machine, "maincpu", 1), NULL, 0, gb_video_init_vbl );
1372
1373      /* Initialize some video registers */
1374      gbc_video_w( space, 0x0, 0x91 );    /* LCDCONT */
1375      gbc_video_w( space, 0x7, 0xFC );    /* BGRDPAL */
1376      gbc_video_w( space, 0x8, 0xFC );    /* SPR0PAL */
1377      gbc_video_w( space, 0x9, 0xFC );    /* SPR1PAL */
1378      gbc_video_w( space, 0x0F, 0x00 );
1379      CURLINE = gb_lcd.current_line = 0x90;
1380      LCDSTAT = ( LCDSTAT & 0xF8 ) | 0x01;
13811370      gb_lcd.mode = 1;
1382      timer_adjust_oneshot(gb_lcd.lcd_timer, cputag_clocks_to_attotime(machine, "maincpu", 292), GB_LCD_STATE_LY9X_M1_INC);
1383      gb_lcd.oam_locked = UNLOCKED;
1384      gb_lcd.vram_locked = UNLOCKED;
1385      gb_lcd.pal_locked = UNLOCKED;
13861371      break;
13871372   }
13881373}
src/mess/machine/gb.c
r5879r5880
175175{
176176   memory_set_bankptr( machine, 5, addr );
177177   memory_set_bankptr( machine, 10, addr + 0x0100 );
178   memory_set_bankptr( machine, 6, addr + 0x0150 );
179   memory_set_bankptr( machine, 11, addr + 0x0400 );
178   memory_set_bankptr( machine, 6, addr + 0x0200 );
179   memory_set_bankptr( machine, 11, addr + 0x0900 );
180180}
181181
182182static void gb_rom16_4000( running_machine *machine, UINT8 *addr )
src/mess/drivers/gb.c
r5879r5880
443443
444444
445445/* Initial value of the cpu registers (hacks until we get bios dumps) */
446//static const UINT16 sgb_cpu_regs[6] = { 0x01B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };    /* Super Game Boy                    */
447446static const UINT16 mgb_cpu_regs[6] = { 0xFFB0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* Game Boy Pocket / Super Game Boy 2 */
448//static const UINT16 cgb_cpu_regs[6] = { 0x11B0, 0x0013, 0x00D8, 0x014D, 0xFFFE, 0x0100 };   /* Game Boy Color  / Game Boy Advance */
449447static const UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 };   /* Megaduck */
450448
451449static const lr35902_cpu_core dmg_cpu_reset = { NULL, LR35902_FEATURE_HALT_BUG, gb_timer_callback };
r5879r5880
457455static ADDRESS_MAP_START(gb_map, ADDRESS_SPACE_PROGRAM, 8)
458456   ADDRESS_MAP_UNMAP_HIGH
459457   AM_RANGE(0x0000, 0x00ff) AM_ROMBANK(5)               /* BIOS or ROM */
460   AM_RANGE(0x0100, 0x014f) AM_ROMBANK(10)               /* ROM bank */
461   AM_RANGE(0x0150, 0x03ff) AM_ROMBANK(6)
462   AM_RANGE(0x0400, 0x3fff) AM_ROMBANK(11)
458   AM_RANGE(0x0100, 0x01ff) AM_ROMBANK(10)               /* ROM bank */
459   AM_RANGE(0x0200, 0x08ff) AM_ROMBANK(6)
460   AM_RANGE(0x0900, 0x3fff) AM_ROMBANK(11)
463461   AM_RANGE(0x4000, 0x5fff) AM_ROMBANK(1)               /* 8KB/16KB switched ROM bank */
464462   AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(4)               /* 8KB/16KB switched ROM bank */
465463   AM_RANGE(0x8000, 0x9fff) AM_READWRITE( gb_vram_r, gb_vram_w ) /* 8k VRAM */
r5879r5880
478476static ADDRESS_MAP_START(sgb_map, ADDRESS_SPACE_PROGRAM, 8)
479477   ADDRESS_MAP_UNMAP_HIGH
480478   AM_RANGE(0x0000, 0x00ff) AM_ROMBANK(5)               /* BIOS or ROM */
481   AM_RANGE(0x0100, 0x014f) AM_ROMBANK(10)               /* ROM bank */
482   AM_RANGE(0x0150, 0x03ff) AM_ROMBANK(6)
483   AM_RANGE(0x0400, 0x3fff) AM_ROMBANK(11)
479   AM_RANGE(0x0100, 0x01ff) AM_ROMBANK(10)               /* ROM bank */
480   AM_RANGE(0x0200, 0x08ff) AM_ROMBANK(6)
481   AM_RANGE(0x0900, 0x3fff) AM_ROMBANK(11)
484482   AM_RANGE(0x4000, 0x5fff) AM_ROMBANK(1)               /* 8KB/16KB switched ROM bank */
485483   AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(4)               /* 8KB/16KB switched ROM bank */
486484   AM_RANGE(0x8000, 0x9fff) AM_READWRITE( gb_vram_r, gb_vram_w ) /* 8k VRAM */
r5879r5880
499497static ADDRESS_MAP_START(gbc_map, ADDRESS_SPACE_PROGRAM, 8)
500498   ADDRESS_MAP_UNMAP_HIGH
501499   AM_RANGE(0x0000, 0x00ff) AM_ROMBANK(5)               /* 16k fixed ROM bank */
502   AM_RANGE(0x0100, 0x014f) AM_ROMBANK(10)               /* ROM bank */
503   AM_RANGE(0x0150, 0x03ff) AM_ROMBANK(6)
504   AM_RANGE(0x0400, 0x3fff) AM_ROMBANK(11)
500   AM_RANGE(0x0100, 0x01ff) AM_ROMBANK(10)               /* ROM bank */
501   AM_RANGE(0x0200, 0x08ff) AM_ROMBANK(6)
502   AM_RANGE(0x0900, 0x3fff) AM_ROMBANK(11)
505503   AM_RANGE(0x4000, 0x5fff) AM_ROMBANK(1)               /* 8KB/16KB switched ROM bank */
506504   AM_RANGE(0x6000, 0x7fff) AM_ROMBANK(4)               /* 8KB/16KB switched ROM bank */
507505   AM_RANGE(0x8000, 0x9fff) AM_READWRITE( gb_vram_r, gb_vram_w )      /* 8k switched VRAM bank */
r5879r5880
704702
705703ROM_START( gbcolor )
706704   ROM_REGION( 0x03B0 + 1792, "maincpu", 0 )
707   ROM_LOAD( "gbc_boot.1", 0x0000, 0x0100, BAD_DUMP CRC(88d4d695) SHA1(81017173358fccf72246150abf914d8cac9a735a) )   /* Bootstrap code part 1 */
708   ROM_LOAD( "gbc_boot.2", 0x0100, 0x02B0, BAD_DUMP CRC(35ced848) SHA1(2730f3eea908ec1208c9fc05b52afeb2011d36fc) ) /* Bootstrap code part 2 */
709   ROM_LOAD( "gbc_boot.3", 0x03B0, 1792, NO_DUMP )   /* DMG game - palette lookup table(?) */
705   ROM_LOAD( "gbc_boot.1", 0x0000, 0x0100, CRC(779ea374) SHA1(e4b40c9fd593a97a1618cfb2696f290cf9596a62) )   /* Bootstrap code part 1 */
706   ROM_LOAD( "gbc_boot.2", 0x0100, 0x0700, CRC(f741807d) SHA1(f943b1e0b640cf1d371e1d8f0ada69af03ebb396) ) /* Bootstrap code part 2 */
710707ROM_END
711708
712709
docs/messnew.txt
r5879r5880
1919- [EINSTEIN] Made it possible to select single or double sided
2020  disk drives.  [Dirk Best]
2121
22- [GBCOLOR] Added BIOS.  [Wilbert Pol]
23
2224- [NES] Fixed crash of MMC3 games with no CHR-ROM (bug
2325  #1860) [Fabio Priuli, Rob Bohms]
2426

Previous 15994 Revisions Next


© 1998-2018 The MESS Team