trunk/src/mame/drivers/rotaryf.c
| r245602 | r245603 | |
| 23 | 23 | rotaryf_state(const machine_config &mconfig, device_type type, const char *tag) |
| 24 | 24 | : driver_device(mconfig, type, tag), |
| 25 | 25 | m_maincpu(*this,"maincpu"), |
| 26 | | m_videoram(*this, "videoram"), |
| 27 | 26 | m_samples(*this, "samples"), |
| 28 | | m_sn(*this, "snsnd") |
| 27 | m_sn(*this, "snsnd"), |
| 28 | m_videoram(*this, "videoram") |
| 29 | 29 | { } |
| 30 | 30 | |
| 31 | required_device<cpu_device> m_maincpu; |
| 32 | required_device<samples_device> m_samples; |
| 33 | required_device<sn76477_device> m_sn; |
| 34 | |
| 35 | required_shared_ptr<UINT8> m_videoram; |
| 36 | |
| 31 | 37 | DECLARE_READ8_MEMBER(port29_r); |
| 32 | 38 | DECLARE_WRITE8_MEMBER(port28_w); |
| 33 | 39 | DECLARE_WRITE8_MEMBER(port30_w); |
| 40 | |
| 34 | 41 | bool m_flipscreen; |
| 35 | 42 | UINT8 m_last; |
| 36 | | required_device<cpu_device> m_maincpu; |
| 37 | | required_shared_ptr<UINT8> m_videoram; |
| 38 | | required_device<samples_device> m_samples; |
| 39 | | required_device<sn76477_device> m_sn; |
| 40 | | UINT32 screen_update_rotaryf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 43 | |
| 44 | virtual void machine_start(); |
| 45 | |
| 46 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 47 | |
| 41 | 48 | TIMER_DEVICE_CALLBACK_MEMBER(rotaryf_interrupt); |
| 42 | 49 | }; |
| 43 | 50 | |
| r245602 | r245603 | |
| 58 | 65 | }; |
| 59 | 66 | |
| 60 | 67 | |
| 68 | void rotaryf_state::machine_start() |
| 69 | { |
| 70 | save_item(NAME(m_flipscreen)); |
| 71 | save_item(NAME(m_last)); |
| 72 | } |
| 73 | |
| 61 | 74 | READ8_MEMBER( rotaryf_state::port29_r ) |
| 62 | 75 | { |
| 63 | 76 | UINT8 data = ioport("INPUTS")->read(); |
| r245602 | r245603 | |
| 126 | 139 | * |
| 127 | 140 | *************************************/ |
| 128 | 141 | |
| 129 | | UINT32 rotaryf_state::screen_update_rotaryf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 142 | UINT32 rotaryf_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 130 | 143 | { |
| 131 | 144 | offs_t offs; |
| 132 | 145 | pen_t pens[2]; |
| r245602 | r245603 | |
| 238 | 251 | MCFG_SCREEN_SIZE(32*8, 262) /* vert size is a guess, taken from mw8080bw */ |
| 239 | 252 | MCFG_SCREEN_VISIBLE_AREA(1*8, 30*8-1, 0*8, 32*8-1) |
| 240 | 253 | MCFG_SCREEN_REFRESH_RATE(60) |
| 241 | | MCFG_SCREEN_UPDATE_DRIVER(rotaryf_state, screen_update_rotaryf) |
| 254 | MCFG_SCREEN_UPDATE_DRIVER(rotaryf_state, screen_update) |
| 242 | 255 | |
| 243 | 256 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 244 | 257 | |
| r245602 | r245603 | |
| 276 | 289 | ROM_END |
| 277 | 290 | |
| 278 | 291 | |
| 279 | | GAME( 1979, rotaryf, 0, rotaryf, rotaryf, driver_device, 0, ROT270, "Kasco", "Rotary Fighter", GAME_IMPERFECT_SOUND ) |
| 292 | GAME( 1979, rotaryf, 0, rotaryf, rotaryf, driver_device, 0, ROT270, "Kasco", "Rotary Fighter", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/drivers/roul.c
| r245602 | r245603 | |
| 22 | 22 | Z80 x2 |
| 23 | 23 | Altera Ep1810LC-45 |
| 24 | 24 | 20.000 MHz crystal |
| 25 | | video 464p10 x4 (board silcksreeend 4416) |
| 25 | video 464p10 x4 (board silkscreened 4416) |
| 26 | 26 | AY-3-8912A |
| 27 | 27 | |
| 28 | 28 | ROM text showed SUPER LUCKY ROULETTE LEISURE ENT |
| r245602 | r245603 | |
| 77 | 77 | m_maincpu(*this, "maincpu"), |
| 78 | 78 | m_soundcpu(*this, "soundcpu") { } |
| 79 | 79 | |
| 80 | required_device<cpu_device> m_maincpu; |
| 81 | required_device<cpu_device> m_soundcpu; |
| 82 | |
| 80 | 83 | UINT8 m_reg[0x10]; |
| 81 | 84 | UINT8 *m_videobuf; |
| 82 | 85 | UINT8 m_lamp_old; |
| 86 | |
| 83 | 87 | DECLARE_READ8_MEMBER(blitter_status_r); |
| 84 | 88 | DECLARE_WRITE8_MEMBER(blitter_cmd_w); |
| 85 | 89 | DECLARE_WRITE8_MEMBER(sound_latch_w); |
| 86 | 90 | DECLARE_WRITE8_MEMBER(ball_w); |
| 91 | |
| 87 | 92 | virtual void video_start(); |
| 88 | 93 | DECLARE_PALETTE_INIT(roul); |
| 89 | | UINT32 screen_update_roul(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 90 | | required_device<cpu_device> m_maincpu; |
| 91 | | required_device<cpu_device> m_soundcpu; |
| 94 | |
| 95 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 92 | 96 | }; |
| 93 | 97 | |
| 94 | 98 | |
| r245602 | r245603 | |
| 219 | 223 | void roul_state::video_start() |
| 220 | 224 | { |
| 221 | 225 | m_videobuf = auto_alloc_array_clear(machine(), UINT8, VIDEOBUF_SIZE); |
| 226 | |
| 227 | save_item(NAME(m_reg)); |
| 228 | save_pointer(NAME(m_videobuf), VIDEOBUF_SIZE); |
| 229 | save_item(NAME(m_lamp_old)); |
| 222 | 230 | } |
| 223 | 231 | |
| 224 | | UINT32 roul_state::screen_update_roul(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 232 | UINT32 roul_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 225 | 233 | { |
| 226 | 234 | int i,j; |
| 227 | 235 | for (i = 0; i < 256; i++) |
| r245602 | r245603 | |
| 300 | 308 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 301 | 309 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 302 | 310 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) |
| 303 | | MCFG_SCREEN_UPDATE_DRIVER(roul_state, screen_update_roul) |
| 311 | MCFG_SCREEN_UPDATE_DRIVER(roul_state, screen_update) |
| 304 | 312 | MCFG_SCREEN_PALETTE("palette") |
| 305 | 313 | |
| 306 | 314 | MCFG_PALETTE_ADD("palette", 0x100) |
| r245602 | r245603 | |
| 324 | 332 | ROM_LOAD( "roul.u38", 0x0020, 0x0020, CRC(23ae22c1) SHA1(bf0383462976ec6341ffa8a173264ce820bc654a) ) |
| 325 | 333 | ROM_END |
| 326 | 334 | |
| 327 | | GAMEL( 1990, roul, 0, roul, roul, driver_device, 0, ROT0, "bootleg", "Super Lucky Roulette", GAME_IMPERFECT_GRAPHICS, layout_roul ) |
| 335 | GAMEL( 1990, roul, 0, roul, roul, driver_device, 0, ROT0, "bootleg", "Super Lucky Roulette", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_roul ) |
trunk/src/mame/drivers/sauro.c
| r245602 | r245603 | |
| 123 | 123 | #include "emu.h" |
| 124 | 124 | #include "cpu/z80/z80.h" |
| 125 | 125 | #include "sound/3812intf.h" |
| 126 | | #include "sound/sp0256.h" |
| 127 | 126 | #include "includes/sauro.h" |
| 128 | 127 | #include "machine/nvram.h" |
| 129 | 128 | |
| r245602 | r245603 | |
| 141 | 140 | return ret; |
| 142 | 141 | } |
| 143 | 142 | |
| 144 | | WRITE8_MEMBER(sauro_state::sauro_coin1_w) |
| 143 | WRITE8_MEMBER(sauro_state::coin1_w) |
| 145 | 144 | { |
| 146 | 145 | coin_counter_w(machine(), 0, data); |
| 147 | 146 | coin_counter_w(machine(), 0, 0); // to get the coin counter working in sauro, as it doesn't write 0 |
| 148 | 147 | } |
| 149 | 148 | |
| 150 | | WRITE8_MEMBER(sauro_state::sauro_coin2_w) |
| 149 | WRITE8_MEMBER(sauro_state::coin2_w) |
| 151 | 150 | { |
| 152 | 151 | coin_counter_w(machine(), 1, data); |
| 153 | 152 | coin_counter_w(machine(), 1, 0); // to get the coin counter working in sauro, as it doesn't write 0 |
| r245602 | r245603 | |
| 167 | 166 | AM_RANGE(0x0000, 0xdfff) AM_ROM |
| 168 | 167 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram") |
| 169 | 168 | AM_RANGE(0xe800, 0xebff) AM_RAM AM_SHARE("spriteram") |
| 170 | | AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(tecfri_videoram_w) AM_SHARE("videoram") |
| 171 | | AM_RANGE(0xf400, 0xf7ff) AM_RAM_WRITE(tecfri_colorram_w) AM_SHARE("colorram") |
| 172 | | AM_RANGE(0xf800, 0xfbff) AM_RAM_WRITE(tecfri_videoram2_w) AM_SHARE("videoram2") |
| 173 | | AM_RANGE(0xfc00, 0xffff) AM_RAM_WRITE(tecfri_colorram2_w) AM_SHARE("colorram2") |
| 169 | AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") |
| 170 | AM_RANGE(0xf400, 0xf7ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") |
| 171 | AM_RANGE(0xf800, 0xfbff) AM_RAM_WRITE(sauro_videoram2_w) AM_SHARE("videoram2") |
| 172 | AM_RANGE(0xfc00, 0xffff) AM_RAM_WRITE(sauro_colorram2_w) AM_SHARE("colorram2") |
| 174 | 173 | ADDRESS_MAP_END |
| 175 | 174 | |
| 176 | 175 | static ADDRESS_MAP_START( sauro_io_map, AS_IO, 8, sauro_state ) |
| r245602 | r245603 | |
| 180 | 179 | AM_RANGE(0x40, 0x40) AM_READ_PORT("P1") |
| 181 | 180 | AM_RANGE(0x60, 0x60) AM_READ_PORT("P2") |
| 182 | 181 | AM_RANGE(0x80, 0x80) AM_WRITE(sauro_sound_command_w) |
| 183 | | AM_RANGE(0xa0, 0xa0) AM_WRITE(tecfri_scroll_bg_w) |
| 182 | AM_RANGE(0xa0, 0xa0) AM_WRITE(scroll_bg_w) |
| 184 | 183 | AM_RANGE(0xa1, 0xa1) AM_WRITE(sauro_scroll_fg_w) |
| 185 | 184 | AM_RANGE(0xc0, 0xc0) AM_WRITE(flip_screen_w) |
| 186 | 185 | AM_RANGE(0xc2, 0xc2) AM_WRITENOP /* coin reset */ |
| 187 | | AM_RANGE(0xc3, 0xc3) AM_WRITE(sauro_coin1_w) |
| 186 | AM_RANGE(0xc3, 0xc3) AM_WRITE(coin1_w) |
| 188 | 187 | AM_RANGE(0xc4, 0xc4) AM_WRITENOP /* coin reset */ |
| 189 | | AM_RANGE(0xc5, 0xc5) AM_WRITE(sauro_coin2_w) |
| 188 | AM_RANGE(0xc5, 0xc5) AM_WRITE(coin2_w) |
| 190 | 189 | AM_RANGE(0xc6, 0xc7) AM_WRITENOP /* same as 0x80 - verified with debugger */ |
| 191 | 190 | AM_RANGE(0xc8, 0xc8) AM_WRITENOP /* written every int: 0 written at end of isr */ |
| 192 | 191 | AM_RANGE(0xc9, 0xc9) AM_WRITENOP /* written every int: 1 written at start of isr */ |
| r245602 | r245603 | |
| 213 | 212 | AM_RANGE(0x0000, 0xdfff) AM_ROM |
| 214 | 213 | AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_SHARE("nvram") |
| 215 | 214 | AM_RANGE(0xe800, 0xebff) AM_RAM AM_MIRROR(0x400) AM_SHARE("spriteram") |
| 216 | | AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(tecfri_videoram_w) AM_SHARE("videoram") |
| 217 | | AM_RANGE(0xf400, 0xf7ff) AM_RAM_WRITE(tecfri_colorram_w) AM_SHARE("colorram") |
| 215 | AM_RANGE(0xf000, 0xf3ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") |
| 216 | AM_RANGE(0xf400, 0xf7ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") |
| 218 | 217 | AM_RANGE(0xf800, 0xf800) AM_READ_PORT("DSW1") |
| 219 | 218 | AM_RANGE(0xf808, 0xf808) AM_READ_PORT("DSW2") |
| 220 | 219 | AM_RANGE(0xf810, 0xf810) AM_READ_PORT("P1") |
| 221 | 220 | AM_RANGE(0xf818, 0xf818) AM_READ_PORT("P2") |
| 222 | 221 | AM_RANGE(0xf820, 0xf821) AM_DEVWRITE("ymsnd", ym3812_device, write) |
| 223 | 222 | AM_RANGE(0xf828, 0xf828) AM_READ(watchdog_reset_r) |
| 224 | | AM_RANGE(0xf830, 0xf830) AM_WRITE(tecfri_scroll_bg_w) |
| 223 | AM_RANGE(0xf830, 0xf830) AM_WRITE(scroll_bg_w) |
| 225 | 224 | AM_RANGE(0xf838, 0xf838) AM_WRITENOP /* only written at startup */ |
| 226 | 225 | AM_RANGE(0xf839, 0xf839) AM_WRITE(flip_screen_w) |
| 227 | | AM_RANGE(0xf83a, 0xf83a) AM_WRITE(sauro_coin1_w) |
| 228 | | AM_RANGE(0xf83b, 0xf83b) AM_WRITE(sauro_coin2_w) |
| 226 | AM_RANGE(0xf83a, 0xf83a) AM_WRITE(coin1_w) |
| 227 | AM_RANGE(0xf83b, 0xf83b) AM_WRITE(coin2_w) |
| 229 | 228 | AM_RANGE(0xf83c, 0xf83c) AM_WRITE(watchdog_reset_w) |
| 230 | 229 | AM_RANGE(0xf83f, 0xf83f) AM_WRITENOP /* only written at startup */ |
| 231 | 230 | ADDRESS_MAP_END |
| r245602 | r245603 | |
| 583 | 582 | RAM[0xe000] = 1; |
| 584 | 583 | } |
| 585 | 584 | |
| 586 | | GAME( 1987, sauro, 0, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri", "Sauro", 0 ) |
| 587 | | GAME( 1987, saurop, sauro, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri (Philko license)", "Sauro (Philko license)", 0 ) |
| 588 | | GAME( 1987, saurorr, sauro, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri (Recreativos Real S.A. license)","Sauro (Recreativos Real S.A. license)", 0 ) |
| 585 | GAME( 1987, sauro, 0, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri", "Sauro", GAME_SUPPORTS_SAVE ) |
| 586 | GAME( 1987, saurop, sauro, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri (Philko license)", "Sauro (Philko license)", GAME_SUPPORTS_SAVE ) |
| 587 | GAME( 1987, saurorr, sauro, sauro, tecfri, sauro_state, tecfri, ROT0, "Tecfri (Recreativos Real S.A. license)","Sauro (Recreativos Real S.A. license)", GAME_SUPPORTS_SAVE ) |
| 589 | 588 | |
| 590 | | GAME( 1987, trckydoc, 0, trckydoc, tecfri, sauro_state, tecfri, ROT0, "Tecfri", "Tricky Doc (set 1)", 0 ) |
| 591 | | GAME( 1987, trckydoca,trckydoc, trckydoc, trckydoca, sauro_state, tecfri, ROT0, "Tecfri", "Tricky Doc (set 2)", 0 ) |
| 589 | GAME( 1987, trckydoc, 0, trckydoc, tecfri, sauro_state, tecfri, ROT0, "Tecfri", "Tricky Doc (set 1)", GAME_SUPPORTS_SAVE ) |
| 590 | GAME( 1987, trckydoca,trckydoc, trckydoc, trckydoca, sauro_state, tecfri, ROT0, "Tecfri", "Tricky Doc (set 2)", GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/sauro.h
| r245602 | r245603 | |
| 7 | 7 | public: |
| 8 | 8 | sauro_state(const machine_config &mconfig, device_type type, const char *tag) |
| 9 | 9 | : driver_device(mconfig, type, tag), |
| 10 | m_maincpu(*this, "maincpu"), |
| 11 | m_gfxdecode(*this, "gfxdecode"), |
| 12 | m_palette(*this, "palette"), |
| 10 | 13 | m_sp0256(*this, "speech"), |
| 11 | 14 | m_spriteram(*this, "spriteram"), |
| 12 | 15 | m_videoram(*this, "videoram"), |
| 13 | 16 | m_colorram(*this, "colorram"), |
| 14 | 17 | m_videoram2(*this, "videoram2"), |
| 15 | | m_colorram2(*this, "colorram2"), |
| 16 | | m_maincpu(*this, "maincpu"), |
| 17 | | m_gfxdecode(*this, "gfxdecode"), |
| 18 | | m_palette(*this, "palette") { } |
| 18 | m_colorram2(*this, "colorram2") { } |
| 19 | 19 | |
| 20 | required_device<cpu_device> m_maincpu; |
| 21 | required_device<gfxdecode_device> m_gfxdecode; |
| 22 | required_device<palette_device> m_palette; |
| 20 | 23 | optional_device<sp0256_device> m_sp0256; |
| 24 | |
| 21 | 25 | required_shared_ptr<UINT8> m_spriteram; |
| 22 | 26 | required_shared_ptr<UINT8> m_videoram; |
| 23 | 27 | required_shared_ptr<UINT8> m_colorram; |
| r245602 | r245603 | |
| 27 | 31 | tilemap_t *m_bg_tilemap; |
| 28 | 32 | tilemap_t *m_fg_tilemap; |
| 29 | 33 | UINT8 m_palette_bank; |
| 34 | |
| 35 | // common |
| 36 | DECLARE_WRITE8_MEMBER(coin1_w); |
| 37 | DECLARE_WRITE8_MEMBER(coin2_w); |
| 38 | DECLARE_WRITE8_MEMBER(flip_screen_w); |
| 39 | DECLARE_WRITE8_MEMBER(videoram_w); |
| 40 | DECLARE_WRITE8_MEMBER(colorram_w); |
| 41 | DECLARE_WRITE8_MEMBER(scroll_bg_w); |
| 42 | |
| 43 | // sauro specific |
| 30 | 44 | DECLARE_WRITE8_MEMBER(sauro_sound_command_w); |
| 31 | 45 | DECLARE_READ8_MEMBER(sauro_sound_command_r); |
| 32 | | DECLARE_WRITE8_MEMBER(sauro_coin1_w); |
| 33 | | DECLARE_WRITE8_MEMBER(sauro_coin2_w); |
| 34 | | DECLARE_WRITE8_MEMBER(flip_screen_w); |
| 35 | | DECLARE_WRITE8_MEMBER(tecfri_videoram_w); |
| 36 | | DECLARE_WRITE8_MEMBER(tecfri_colorram_w); |
| 37 | | DECLARE_WRITE8_MEMBER(tecfri_videoram2_w); |
| 38 | | DECLARE_WRITE8_MEMBER(tecfri_colorram2_w); |
| 39 | | DECLARE_WRITE8_MEMBER(tecfri_scroll_bg_w); |
| 40 | 46 | DECLARE_WRITE8_MEMBER(sauro_palette_bank_w); |
| 41 | 47 | DECLARE_WRITE8_MEMBER(sauro_scroll_fg_w); |
| 48 | DECLARE_WRITE8_MEMBER(sauro_videoram2_w); |
| 49 | DECLARE_WRITE8_MEMBER(sauro_colorram2_w); |
| 42 | 50 | DECLARE_WRITE8_MEMBER(adpcm_w); |
| 43 | | DECLARE_DRIVER_INIT(tecfri); |
| 51 | |
| 44 | 52 | TILE_GET_INFO_MEMBER(get_tile_info_bg); |
| 45 | 53 | TILE_GET_INFO_MEMBER(get_tile_info_fg); |
| 54 | |
| 55 | DECLARE_DRIVER_INIT(tecfri); |
| 46 | 56 | DECLARE_VIDEO_START(trckydoc); |
| 47 | 57 | DECLARE_VIDEO_START(sauro); |
| 58 | |
| 48 | 59 | UINT32 screen_update_trckydoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 49 | 60 | UINT32 screen_update_sauro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 50 | 61 | void sauro_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 62 | void trckydoc_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | | required_device<cpu_device> m_maincpu; |
| 53 | | required_device<gfxdecode_device> m_gfxdecode; |
| 54 | | required_device<palette_device> m_palette; |
| 55 | 63 | }; |