trunk/src/emu/cpu/lr35902/lr35902.h
| r30975 | r30976 | |
| 8 | 8 | lr35902_cpu_device::set_timer_cb(*device, DEVCB_##_devcb); |
| 9 | 9 | #define MCFG_LR35902_HALT_BUG \ |
| 10 | 10 | lr35902_cpu_device::set_halt_bug(*device); |
| 11 | | // This should be removed/improved once all gameboy boot roms have been dumped |
| 12 | | #define MCFG_LR35902_RESET_VALUES(_regs) \ |
| 13 | | lr35902_cpu_device::set_reset_values(*device, _regs); |
| 14 | 11 | |
| 15 | 12 | enum |
| 16 | 13 | { |
| r30975 | r30976 | |
| 32 | 29 | // static configuration helpers |
| 33 | 30 | template<class _Object> static devcb_base &set_timer_cb(device_t &device, _Object object) { return downcast<lr35902_cpu_device &>(device).m_timer_func.set_callback(object); } |
| 34 | 31 | static void set_halt_bug(device_t &device) { downcast<lr35902_cpu_device &>(device).m_features |= LR35902_FEATURE_HALT_BUG; } |
| 35 | | static void set_reset_values(device_t &device, const UINT16 *regs) { downcast<lr35902_cpu_device &>(device).c_regs = regs; } |
| 36 | 32 | |
| 37 | 33 | UINT8 get_speed(); |
| 38 | 34 | void set_speed( UINT8 speed_request ); |
| r30975 | r30976 | |
| 108 | 104 | int m_enable; |
| 109 | 105 | int m_doHALTbug; |
| 110 | 106 | UINT8 m_features; |
| 111 | | const UINT16 *c_regs; |
| 112 | | const struct lr35902_config *m_config; |
| 113 | 107 | }; |
| 114 | 108 | |
| 115 | 109 | extern const device_type LR35902; |
trunk/src/mess/drivers/gb.c
| r30975 | r30976 | |
| 425 | 425 | #include "bus/gameboy/mbc.h" |
| 426 | 426 | |
| 427 | 427 | |
| 428 | | /* Initial value of the cpu registers (hacks until we get bios dumps) */ |
| 429 | | static const UINT16 megaduck_cpu_regs[6] = { 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFE, 0x0000 }; /* Megaduck */ |
| 430 | | |
| 431 | | |
| 432 | 428 | READ8_MEMBER(gb_state::gb_cart_r) |
| 433 | 429 | { |
| 434 | 430 | if (m_bios_disable && m_cartslot) |
| r30975 | r30976 | |
| 827 | 823 | MCFG_CPU_PROGRAM_MAP( megaduck_map) |
| 828 | 824 | MCFG_LR35902_TIMER_CB( WRITE8( gb_state, gb_timer_callback ) ) |
| 829 | 825 | MCFG_LR35902_HALT_BUG |
| 830 | | MCFG_LR35902_RESET_VALUES(megaduck_cpu_regs) |
| 831 | 826 | |
| 832 | 827 | /* video hardware */ |
| 833 | 828 | MCFG_SCREEN_ADD("screen", LCD) |
| r30975 | r30976 | |
| 899 | 894 | CONS( 1996, gbpocket, gameboy, 0, gbpocket, gameboy, driver_device, 0, "Nintendo", "Game Boy Pocket", GAME_SUPPORTS_SAVE ) |
| 900 | 895 | CONS( 1998, gbcolor, gameboy, 0, gbcolor, gameboy, driver_device, 0, "Nintendo", "Game Boy Color", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) |
| 901 | 896 | |
| 902 | | /* Sound is not 100% yet, it generates some sounds which could be ok. Since we're lacking a real |
| 903 | | system there's no way to verify. Same goes for the colors of the LCD. We are no using the default |
| 904 | | Game Boy green colors */ |
| 905 | | CONS( 1993, megaduck, 0, 0, megaduck, gameboy, driver_device, 0, "Creatronic/Videojet/Timlex/Cougar", "MegaDuck/Cougar Boy" , GAME_SUPPORTS_SAVE ) |
| 897 | // Sound is not 100% yet, it generates some sounds which could be ok. Since we're lacking a real system there's no way to verify. |
| 898 | CONS( 1993, megaduck, 0, 0, megaduck, gameboy, driver_device, 0, "Welback Holdings (Timlex International) / Creatronic / Videojet / Cougar USA", "Mega Duck / Cougar Boy", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |