trunk/src/mess/drivers/gb.c
r32765 | r32766 | |
818 | 818 | MCFG_GB_LCD_MGB_ADD("lcd") |
819 | 819 | MACHINE_CONFIG_END |
820 | 820 | |
821 | | static MACHINE_CONFIG_DERIVED( gbcolor, gameboy ) |
| 821 | static MACHINE_CONFIG_START( gbcolor, gb_state ) |
822 | 822 | |
823 | 823 | /* basic machine hardware */ |
824 | | MCFG_CPU_MODIFY("maincpu") // todo XTAL_8_388MHz |
| 824 | MCFG_CPU_ADD("maincpu", LR35902, XTAL_4_194304Mhz) // todo XTAL_8_388MHz |
825 | 825 | MCFG_CPU_PROGRAM_MAP(gbc_map) |
826 | 826 | MCFG_LR35902_TIMER_CB( WRITE8(gb_state, gb_timer_callback ) ) |
827 | 827 | |
r32765 | r32766 | |
829 | 829 | MCFG_MACHINE_RESET_OVERRIDE(gb_state,gbc) |
830 | 830 | |
831 | 831 | /* video hardware */ |
832 | | MCFG_PALETTE_MODIFY("palette") |
833 | | MCFG_PALETTE_ENTRIES(32768) |
| 832 | MCFG_SCREEN_ADD("screen", LCD) |
| 833 | MCFG_SCREEN_REFRESH_RATE(DMG_FRAMES_PER_SECOND) |
| 834 | MCFG_SCREEN_VBLANK_TIME(0) |
| 835 | MCFG_SCREEN_UPDATE_DEVICE("lcd", gb_lcd_device, screen_update) |
| 836 | MCFG_SCREEN_PALETTE("palette") |
| 837 | |
| 838 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 839 | // MCFG_SCREEN_SIZE(20*8, 18*8) |
| 840 | MCFG_SCREEN_SIZE( 458, 154 ) |
| 841 | MCFG_SCREEN_VISIBLE_AREA(0*8, 20*8-1, 0*8, 18*8-1) |
| 842 | |
| 843 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", gb) |
| 844 | |
| 845 | MCFG_PALETTE_ADD("palette", 32768) |
834 | 846 | MCFG_PALETTE_INIT_OWNER(gb_state,gbc) |
835 | 847 | |
836 | | MCFG_DEVICE_REMOVE("lcd") |
837 | 848 | MCFG_GB_LCD_CGB_ADD("lcd") |
838 | 849 | |
| 850 | /* sound hardware */ |
| 851 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 852 | MCFG_SOUND_ADD("custom", GAMEBOY, 0) |
| 853 | MCFG_SOUND_ROUTE(0, "lspeaker", 0.50) |
| 854 | MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) |
| 855 | |
839 | 856 | /* internal ram */ |
840 | 857 | MCFG_RAM_ADD(RAM_TAG) |
841 | 858 | MCFG_RAM_DEFAULT_SIZE("48K") /* 2 pages of 8KB VRAM, 8 pages of 4KB RAM */ |
842 | 859 | |
843 | | MCFG_DEVICE_REMOVE("cart_list") |
844 | | MCFG_DEVICE_REMOVE("gbc_list") |
| 860 | /* cartslot */ |
| 861 | MCFG_GB_CARTRIDGE_ADD("gbslot", gb_cart, NULL) |
| 862 | |
845 | 863 | MCFG_SOFTWARE_LIST_ADD("cart_list","gbcolor") |
846 | 864 | MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("gb_list","gameboy") |
847 | 865 | MACHINE_CONFIG_END |