trunk/src/mame/includes/jack.h
r18118 | r18119 | |
8 | 8 | { |
9 | 9 | public: |
10 | 10 | jack_state(const machine_config &mconfig, device_type type, const char *tag) |
11 | | : driver_device(mconfig, type, tag) , |
| 11 | : driver_device(mconfig, type, tag), |
| 12 | m_maincpu(*this, "maincpu"), |
| 13 | m_audiocpu(*this, "audiocpu"), |
12 | 14 | m_spriteram(*this, "spriteram"), |
13 | 15 | m_videoram(*this, "videoram"), |
14 | | m_colorram(*this, "colorram"){ } |
| 16 | m_colorram(*this, "colorram") |
| 17 | { } |
15 | 18 | |
16 | | /* memory pointers */ |
| 19 | /* device- and memory pointers */ |
| 20 | required_device<cpu_device> m_maincpu; |
| 21 | required_device<cpu_device> m_audiocpu; |
17 | 22 | required_shared_ptr<UINT8> m_spriteram; |
18 | 23 | required_shared_ptr<UINT8> m_videoram; |
19 | 24 | required_shared_ptr<UINT8> m_colorram; |
20 | | // UINT8 * paletteram; // currently this uses generic palette handling |
21 | 25 | |
22 | 26 | /* video-related */ |
23 | 27 | tilemap_t *m_bg_tilemap; |
r18118 | r18119 | |
29 | 33 | int m_question_rom; |
30 | 34 | int m_remap_address[16]; |
31 | 35 | |
32 | | |
33 | | /* devices */ |
34 | | cpu_device *m_audiocpu; |
35 | 36 | DECLARE_WRITE8_MEMBER(jack_sh_command_w); |
36 | 37 | DECLARE_WRITE8_MEMBER(joinem_misc_w); |
37 | 38 | DECLARE_READ8_MEMBER(striv_question_r); |
r18118 | r18119 | |
42 | 43 | DECLARE_WRITE8_MEMBER(jack_flipscreen_w); |
43 | 44 | DECLARE_CUSTOM_INPUT_MEMBER(sound_check_r); |
44 | 45 | DECLARE_READ8_MEMBER(timer_r); |
| 46 | |
45 | 47 | DECLARE_DRIVER_INIT(zzyzzyxx); |
46 | 48 | DECLARE_DRIVER_INIT(striv); |
47 | 49 | DECLARE_DRIVER_INIT(treahunt); |
48 | 50 | DECLARE_DRIVER_INIT(loverboy); |
49 | 51 | DECLARE_DRIVER_INIT(jack); |
| 52 | |
50 | 53 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
51 | 54 | TILEMAP_MAPPER_MEMBER(tilemap_scan_cols_flipy); |
52 | 55 | TILE_GET_INFO_MEMBER(joinem_get_bg_tile_info); |
53 | | virtual void machine_start(); |
54 | | virtual void machine_reset(); |
55 | | virtual void video_start(); |
56 | 56 | DECLARE_VIDEO_START(joinem); |
57 | 57 | DECLARE_PALETTE_INIT(joinem); |
| 58 | |
58 | 59 | UINT32 screen_update_jack(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
59 | 60 | UINT32 screen_update_joinem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 61 | |
| 62 | virtual void machine_start(); |
| 63 | virtual void machine_reset(); |
| 64 | virtual void video_start(); |
| 65 | |
60 | 66 | INTERRUPT_GEN_MEMBER(joinem_vblank_irq); |
61 | 67 | }; |
trunk/src/mame/drivers/jack.c
r18118 | r18119 | |
164 | 164 | AM_RANGE(0xbc00, 0xbfff) AM_RAM_WRITE(jack_colorram_w) AM_SHARE("colorram") |
165 | 165 | ADDRESS_MAP_END |
166 | 166 | |
| 167 | static ADDRESS_MAP_START( unclepoo_map, AS_PROGRAM, 8, jack_state ) |
| 168 | AM_RANGE(0x9000, 0x97ff) AM_RAM |
| 169 | AM_IMPORT_FROM( joinem_map ) |
| 170 | ADDRESS_MAP_END |
167 | 171 | |
| 172 | |
168 | 173 | static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, jack_state ) |
169 | 174 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
170 | 175 | AM_RANGE(0x4000, 0x43ff) AM_RAM |
r18118 | r18119 | |
787 | 792 | |
788 | 793 | void jack_state::machine_start() |
789 | 794 | { |
790 | | |
791 | | m_audiocpu = machine().device<cpu_device>("audiocpu"); |
792 | | |
793 | 795 | save_item(NAME(m_joinem_snd_bit)); |
794 | 796 | save_item(NAME(m_question_address)); |
795 | 797 | save_item(NAME(m_question_rom)); |
r18118 | r18119 | |
813 | 815 | /* basic machine hardware */ |
814 | 816 | MCFG_CPU_ADD("maincpu", Z80, 18000000/6) /* 3 MHz */ |
815 | 817 | MCFG_CPU_PROGRAM_MAP(jack_map) |
816 | | MCFG_CPU_VBLANK_INT_DRIVER("screen", jack_state, irq0_line_hold) /* jack needs 1 or its too fast */ |
| 818 | MCFG_CPU_VBLANK_INT_DRIVER("screen", jack_state, irq0_line_hold) |
817 | 819 | |
818 | 820 | MCFG_CPU_ADD("audiocpu", Z80,18000000/12) /* 1.5 MHz */ |
819 | 821 | MCFG_CPU_PROGRAM_MAP(sound_map) |
r18118 | r18119 | |
874 | 876 | MACHINE_CONFIG_END |
875 | 877 | |
876 | 878 | |
| 879 | static MACHINE_CONFIG_DERIVED( unclepoo, joinem ) |
| 880 | |
| 881 | /* basic machine hardware */ |
| 882 | MCFG_CPU_MODIFY("maincpu") |
| 883 | MCFG_CPU_PROGRAM_MAP(unclepoo_map) |
| 884 | MACHINE_CONFIG_END |
| 885 | |
| 886 | |
877 | 887 | static MACHINE_CONFIG_DERIVED( loverboy, jack ) |
878 | 888 | |
879 | 889 | /* basic machine hardware */ |
r18118 | r18119 | |
1371 | 1381 | |
1372 | 1382 | DRIVER_INIT_MEMBER(jack_state,loverboy) |
1373 | 1383 | { |
1374 | | |
1375 | 1384 | /* this doesn't make sense.. the startup code, and irq0 have jumps to 0.. |
1376 | 1385 | I replace the startup jump with another jump to what appears to be |
1377 | 1386 | the start of the game code. |
r18118 | r18119 | |
1446 | 1455 | GAME( 1981, tripool, 0, tripool, tripool, jack_state, jack, ROT90, "Noma (Casino Tech license)", "Tri-Pool (Casino Tech)", GAME_SUPPORTS_SAVE ) |
1447 | 1456 | GAME( 1981, tripoola, tripool, tripool, tripool, jack_state, jack, ROT90, "Noma (Costal Games license)", "Tri-Pool (Costal Games)", GAME_SUPPORTS_SAVE ) |
1448 | 1457 | GAME( 1983, joinem, 0, joinem, joinem, jack_state, zzyzzyxx, ROT90, "Global Corporation", "Joinem", GAME_SUPPORTS_SAVE ) |
1449 | | GAME( 1983, unclepoop, unclepoo, joinem, joinem, jack_state, zzyzzyxx, ROT90, "Diatec", "Uncle Poo (nincompoop version)", GAME_NOT_WORKING ) |
| 1458 | GAME( 1983, unclepoop, unclepoo, unclepoo, joinem, jack_state, zzyzzyxx, ROT90, "Diatec", "Uncle Poo (nincompoop version)", GAME_NOT_WORKING ) |
1450 | 1459 | GAME( 1983, loverboy, 0, loverboy,loverboy, jack_state, loverboy, ROT90, "G.T Enterprise Inc", "Lover Boy", GAME_SUPPORTS_SAVE ) |
1451 | 1460 | GAME( 1985, striv, 0, jack, striv, jack_state, striv, ROT270, "Hara Industries", "Super Triv", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |