trunk/src/mame/drivers/shadfrce.c
| r243708 | r243709 | |
| 8 | 8 | |
| 9 | 9 | - As for some other M68000 Technos games (or games running on similar hardware |
| 10 | 10 | such as 'mugsmash'), the Inputs and the Dip Switches are mangled, so you need |
| 11 | | a specific read handler so end-uers can see them in a "standard" order. |
| 11 | a specific read handler so end-users can see them in a "standard" order. |
| 12 | 12 | |
| 13 | 13 | 01-Sept-2008 - Pierpaolo Prazzoli |
| 14 | 14 | - Added irqs ack |
| r243708 | r243709 | |
| 141 | 141 | #include "cpu/z80/z80.h" |
| 142 | 142 | #include "cpu/m68000/m68000.h" |
| 143 | 143 | #include "sound/2151intf.h" |
| 144 | | #include "sound/okim6295.h" |
| 145 | 144 | #include "includes/shadfrce.h" |
| 146 | 145 | |
| 147 | 146 | |
| r243708 | r243709 | |
| 149 | 148 | #define CPU_CLOCK MASTER_CLOCK / 2 |
| 150 | 149 | #define PIXEL_CLOCK MASTER_CLOCK / 4 |
| 151 | 150 | |
| 152 | | WRITE16_MEMBER(shadfrce_state::shadfrce_flip_screen) |
| 151 | WRITE16_MEMBER(shadfrce_state::flip_screen) |
| 153 | 152 | { |
| 154 | 153 | flip_screen_set(data & 0x01); |
| 155 | 154 | } |
| r243708 | r243709 | |
| 234 | 233 | */ |
| 235 | 234 | |
| 236 | 235 | |
| 237 | | READ16_MEMBER(shadfrce_state::shadfrce_input_ports_r) |
| 236 | READ16_MEMBER(shadfrce_state::input_ports_r) |
| 238 | 237 | { |
| 239 | 238 | UINT16 data = 0xffff; |
| 240 | 239 | |
| r243708 | r243709 | |
| 258 | 257 | } |
| 259 | 258 | |
| 260 | 259 | |
| 261 | | WRITE16_MEMBER(shadfrce_state::shadfrce_sound_brt_w) |
| 260 | WRITE16_MEMBER(shadfrce_state::sound_brt_w) |
| 262 | 261 | { |
| 263 | 262 | if (ACCESSING_BITS_8_15) |
| 264 | 263 | { |
| r243708 | r243709 | |
| 275 | 274 | } |
| 276 | 275 | } |
| 277 | 276 | |
| 278 | | WRITE16_MEMBER(shadfrce_state::shadfrce_irq_ack_w) |
| 277 | WRITE16_MEMBER(shadfrce_state::irq_ack_w) |
| 279 | 278 | { |
| 280 | 279 | m_maincpu->set_input_line(offset ^ 3, CLEAR_LINE); |
| 281 | 280 | } |
| 282 | 281 | |
| 283 | | WRITE16_MEMBER(shadfrce_state::shadfrce_irq_w) |
| 282 | WRITE16_MEMBER(shadfrce_state::irq_w) |
| 284 | 283 | { |
| 285 | 284 | m_irqs_enable = data & 1; /* maybe, it's set/unset inside every trap instruction which is executed */ |
| 286 | 285 | m_video_enable = data & 8; /* probably */ |
| r243708 | r243709 | |
| 300 | 299 | m_prev_value = data; |
| 301 | 300 | } |
| 302 | 301 | |
| 303 | | WRITE16_MEMBER(shadfrce_state::shadfrce_scanline_w) |
| 302 | WRITE16_MEMBER(shadfrce_state::scanline_w) |
| 304 | 303 | { |
| 305 | 304 | m_raster_scanline = data; /* guess, 0 is always written */ |
| 306 | 305 | } |
| 307 | 306 | |
| 308 | | TIMER_DEVICE_CALLBACK_MEMBER(shadfrce_state::shadfrce_scanline) |
| 307 | TIMER_DEVICE_CALLBACK_MEMBER(shadfrce_state::scanline) |
| 309 | 308 | { |
| 310 | 309 | int scanline = param; |
| 311 | 310 | |
| r243708 | r243709 | |
| 360 | 359 | |
| 361 | 360 | static ADDRESS_MAP_START( shadfrce_map, AS_PROGRAM, 16, shadfrce_state ) |
| 362 | 361 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 363 | | AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(shadfrce_bg0videoram_w) AM_SHARE("bg0videoram") /* video */ |
| 362 | AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(bg0videoram_w) AM_SHARE("bg0videoram") /* video */ |
| 364 | 363 | AM_RANGE(0x101000, 0x101fff) AM_RAM |
| 365 | | AM_RANGE(0x102000, 0x1027ff) AM_RAM_WRITE(shadfrce_bg1videoram_w) AM_SHARE("bg1videoram") /* bg 2 */ |
| 364 | AM_RANGE(0x102000, 0x1027ff) AM_RAM_WRITE(bg1videoram_w) AM_SHARE("bg1videoram") /* bg 2 */ |
| 366 | 365 | AM_RANGE(0x102800, 0x103fff) AM_RAM |
| 367 | | AM_RANGE(0x140000, 0x141fff) AM_RAM_WRITE(shadfrce_fgvideoram_w) AM_SHARE("fgvideoram") |
| 366 | AM_RANGE(0x140000, 0x141fff) AM_RAM_WRITE(fgvideoram_w) AM_SHARE("fgvideoram") |
| 368 | 367 | AM_RANGE(0x142000, 0x143fff) AM_RAM AM_SHARE("spvideoram") /* sprites */ |
| 369 | 368 | AM_RANGE(0x180000, 0x187fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") |
| 370 | | AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(shadfrce_bg0scrollx_w) /* SCROLL X */ |
| 371 | | AM_RANGE(0x1c0002, 0x1c0003) AM_WRITE(shadfrce_bg0scrolly_w) /* SCROLL Y */ |
| 372 | | AM_RANGE(0x1c0004, 0x1c0005) AM_WRITE(shadfrce_bg1scrollx_w) /* SCROLL X */ |
| 373 | | AM_RANGE(0x1c0006, 0x1c0007) AM_WRITE(shadfrce_bg1scrolly_w) /* SCROLL Y */ |
| 369 | AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(bg0scrollx_w) /* SCROLL X */ |
| 370 | AM_RANGE(0x1c0002, 0x1c0003) AM_WRITE(bg0scrolly_w) /* SCROLL Y */ |
| 371 | AM_RANGE(0x1c0004, 0x1c0005) AM_WRITE(bg1scrollx_w) /* SCROLL X */ |
| 372 | AM_RANGE(0x1c0006, 0x1c0007) AM_WRITE(bg1scrolly_w) /* SCROLL Y */ |
| 374 | 373 | AM_RANGE(0x1c0008, 0x1c0009) AM_WRITENOP /* ?? */ |
| 375 | | AM_RANGE(0x1c000a, 0x1c000b) AM_READNOP AM_WRITE(shadfrce_flip_screen) |
| 374 | AM_RANGE(0x1c000a, 0x1c000b) AM_READNOP AM_WRITE(flip_screen) |
| 376 | 375 | AM_RANGE(0x1c000c, 0x1c000d) AM_WRITENOP /* ?? */ |
| 377 | | AM_RANGE(0x1d0000, 0x1d0005) AM_WRITE(shadfrce_irq_ack_w) |
| 378 | | AM_RANGE(0x1d0006, 0x1d0007) AM_WRITE(shadfrce_irq_w) |
| 379 | | AM_RANGE(0x1d0008, 0x1d0009) AM_WRITE(shadfrce_scanline_w) |
| 380 | | AM_RANGE(0x1d000c, 0x1d000d) AM_READNOP AM_WRITE(shadfrce_sound_brt_w) /* sound command + screen brightness */ |
| 376 | AM_RANGE(0x1d0000, 0x1d0005) AM_WRITE(irq_ack_w) |
| 377 | AM_RANGE(0x1d0006, 0x1d0007) AM_WRITE(irq_w) |
| 378 | AM_RANGE(0x1d0008, 0x1d0009) AM_WRITE(scanline_w) |
| 379 | AM_RANGE(0x1d000c, 0x1d000d) AM_READNOP AM_WRITE(sound_brt_w) /* sound command + screen brightness */ |
| 381 | 380 | AM_RANGE(0x1d0010, 0x1d0011) AM_WRITENOP /* ?? */ |
| 382 | 381 | AM_RANGE(0x1d0012, 0x1d0013) AM_WRITENOP /* ?? */ |
| 383 | 382 | AM_RANGE(0x1d0014, 0x1d0015) AM_WRITENOP /* ?? */ |
| 384 | 383 | AM_RANGE(0x1d0016, 0x1d0017) AM_WRITE(watchdog_reset16_w) |
| 385 | | AM_RANGE(0x1d0020, 0x1d0027) AM_READ(shadfrce_input_ports_r) |
| 384 | AM_RANGE(0x1d0020, 0x1d0027) AM_READ(input_ports_r) |
| 386 | 385 | AM_RANGE(0x1f0000, 0x1fffff) AM_RAM |
| 387 | 386 | ADDRESS_MAP_END |
| 388 | 387 | |
| r243708 | r243709 | |
| 544 | 543 | |
| 545 | 544 | MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) /* verified on pcb */ |
| 546 | 545 | MCFG_CPU_PROGRAM_MAP(shadfrce_map) |
| 547 | | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", shadfrce_state, shadfrce_scanline, "screen", 0, 1) |
| 546 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", shadfrce_state, scanline, "screen", 0, 1) |
| 548 | 547 | |
| 549 | 548 | MCFG_CPU_ADD("audiocpu", Z80, XTAL_3_579545MHz) /* verified on pcb */ |
| 550 | 549 | MCFG_CPU_PROGRAM_MAP(shadfrce_sound_map) |
| 551 | 550 | |
| 552 | 551 | MCFG_SCREEN_ADD("screen", RASTER) |
| 553 | 552 | MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 432, 0, 320, 272, 8, 248) /* HTOTAL and VTOTAL are guessed */ |
| 554 | | MCFG_SCREEN_UPDATE_DRIVER(shadfrce_state, screen_update_shadfrce) |
| 555 | | MCFG_SCREEN_VBLANK_DRIVER(shadfrce_state, screen_eof_shadfrce) |
| 553 | MCFG_SCREEN_UPDATE_DRIVER(shadfrce_state, screen_update) |
| 554 | MCFG_SCREEN_VBLANK_DRIVER(shadfrce_state, screen_eof) |
| 556 | 555 | MCFG_SCREEN_PALETTE("palette") |
| 557 | 556 | |
| 558 | 557 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", shadfrce) |
| r243708 | r243709 | |
| 662 | 661 | ROM_END |
| 663 | 662 | |
| 664 | 663 | |
| 665 | | GAME( 1993, shadfrce, 0, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (US Version 2)", GAME_NO_COCKTAIL ) |
| 666 | | GAME( 1993, shadfrcej, shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 3)", GAME_NO_COCKTAIL ) |
| 667 | | GAME( 1993, shadfrcejv2, shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 2)", GAME_NO_COCKTAIL ) |
| 664 | GAME( 1993, shadfrce, 0, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (US Version 2)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 665 | GAME( 1993, shadfrcej, shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 3)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
| 666 | GAME( 1993, shadfrcejv2, shadfrce, shadfrce, shadfrce, driver_device, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 2)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) |
trunk/src/mame/includes/shadfrce.h
| r243708 | r243709 | |
| 5 | 5 | public: |
| 6 | 6 | shadfrce_state(const machine_config &mconfig, device_type type, const char *tag) |
| 7 | 7 | : driver_device(mconfig, type, tag), |
| 8 | | m_fgvideoram(*this, "fgvideoram"), |
| 9 | | m_bg0videoram(*this, "bg0videoram"), |
| 10 | | m_bg1videoram(*this, "bg1videoram"), |
| 11 | | m_spvideoram(*this, "spvideoram"), |
| 12 | 8 | m_maincpu(*this, "maincpu"), |
| 13 | 9 | m_audiocpu(*this, "audiocpu"), |
| 14 | 10 | m_oki(*this, "oki"), |
| 15 | 11 | m_gfxdecode(*this, "gfxdecode"), |
| 16 | 12 | m_screen(*this, "screen"), |
| 17 | | m_palette(*this, "palette") { } |
| 13 | m_palette(*this, "palette"), |
| 14 | m_fgvideoram(*this, "fgvideoram"), |
| 15 | m_bg0videoram(*this, "bg0videoram"), |
| 16 | m_bg1videoram(*this, "bg1videoram"), |
| 17 | m_spvideoram(*this, "spvideoram") { } |
| 18 | 18 | |
| 19 | | tilemap_t *m_fgtilemap; |
| 20 | | tilemap_t *m_bg0tilemap; |
| 21 | | tilemap_t *m_bg1tilemap; |
| 19 | required_device<cpu_device> m_maincpu; |
| 20 | required_device<cpu_device> m_audiocpu; |
| 21 | required_device<okim6295_device> m_oki; |
| 22 | required_device<gfxdecode_device> m_gfxdecode; |
| 23 | required_device<screen_device> m_screen; |
| 24 | required_device<palette_device> m_palette; |
| 22 | 25 | |
| 23 | 26 | required_shared_ptr<UINT16> m_fgvideoram; |
| 24 | 27 | required_shared_ptr<UINT16> m_bg0videoram; |
| 25 | 28 | required_shared_ptr<UINT16> m_bg1videoram; |
| 26 | 29 | required_shared_ptr<UINT16> m_spvideoram; |
| 30 | |
| 27 | 31 | UINT16 *m_spvideoram_old; |
| 28 | | |
| 32 | tilemap_t *m_fgtilemap; |
| 33 | tilemap_t *m_bg0tilemap; |
| 34 | tilemap_t *m_bg1tilemap; |
| 29 | 35 | int m_video_enable; |
| 30 | 36 | int m_irqs_enable; |
| 31 | 37 | int m_raster_scanline; |
| 32 | 38 | int m_raster_irq_enable; |
| 33 | 39 | int m_vblank; |
| 34 | 40 | int m_prev_value; |
| 35 | | DECLARE_WRITE16_MEMBER(shadfrce_flip_screen); |
| 36 | | DECLARE_READ16_MEMBER(shadfrce_input_ports_r); |
| 37 | | DECLARE_WRITE16_MEMBER(shadfrce_sound_brt_w); |
| 38 | | DECLARE_WRITE16_MEMBER(shadfrce_irq_ack_w); |
| 39 | | DECLARE_WRITE16_MEMBER(shadfrce_irq_w); |
| 40 | | DECLARE_WRITE16_MEMBER(shadfrce_scanline_w); |
| 41 | | DECLARE_WRITE16_MEMBER(shadfrce_fgvideoram_w); |
| 42 | | DECLARE_WRITE16_MEMBER(shadfrce_bg0videoram_w); |
| 43 | | DECLARE_WRITE16_MEMBER(shadfrce_bg1videoram_w); |
| 44 | | DECLARE_WRITE16_MEMBER(shadfrce_bg0scrollx_w); |
| 45 | | DECLARE_WRITE16_MEMBER(shadfrce_bg0scrolly_w); |
| 46 | | DECLARE_WRITE16_MEMBER(shadfrce_bg1scrollx_w); |
| 47 | | DECLARE_WRITE16_MEMBER(shadfrce_bg1scrolly_w); |
| 41 | |
| 42 | DECLARE_WRITE16_MEMBER(flip_screen); |
| 43 | DECLARE_READ16_MEMBER(input_ports_r); |
| 44 | DECLARE_WRITE16_MEMBER(sound_brt_w); |
| 45 | DECLARE_WRITE16_MEMBER(irq_ack_w); |
| 46 | DECLARE_WRITE16_MEMBER(irq_w); |
| 47 | DECLARE_WRITE16_MEMBER(scanline_w); |
| 48 | DECLARE_WRITE16_MEMBER(fgvideoram_w); |
| 49 | DECLARE_WRITE16_MEMBER(bg0videoram_w); |
| 50 | DECLARE_WRITE16_MEMBER(bg1videoram_w); |
| 51 | DECLARE_WRITE16_MEMBER(bg0scrollx_w); |
| 52 | DECLARE_WRITE16_MEMBER(bg0scrolly_w); |
| 53 | DECLARE_WRITE16_MEMBER(bg1scrollx_w); |
| 54 | DECLARE_WRITE16_MEMBER(bg1scrolly_w); |
| 48 | 55 | DECLARE_WRITE8_MEMBER(oki_bankswitch_w); |
| 49 | | TILE_GET_INFO_MEMBER(get_shadfrce_fgtile_info); |
| 50 | | TILE_GET_INFO_MEMBER(get_shadfrce_bg0tile_info); |
| 51 | | TILE_GET_INFO_MEMBER(get_shadfrce_bg1tile_info); |
| 56 | |
| 57 | TILE_GET_INFO_MEMBER(get_fgtile_info); |
| 58 | TILE_GET_INFO_MEMBER(get_bg0tile_info); |
| 59 | TILE_GET_INFO_MEMBER(get_bg1tile_info); |
| 60 | |
| 52 | 61 | virtual void video_start(); |
| 53 | | UINT32 screen_update_shadfrce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | | void screen_eof_shadfrce(screen_device &screen, bool state); |
| 55 | | TIMER_DEVICE_CALLBACK_MEMBER(shadfrce_scanline); |
| 62 | |
| 63 | TIMER_DEVICE_CALLBACK_MEMBER(scanline); |
| 64 | |
| 65 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 66 | void screen_eof(screen_device &screen, bool state); |
| 56 | 67 | void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 57 | | required_device<cpu_device> m_maincpu; |
| 58 | | required_device<cpu_device> m_audiocpu; |
| 59 | | required_device<okim6295_device> m_oki; |
| 60 | | required_device<gfxdecode_device> m_gfxdecode; |
| 61 | | required_device<screen_device> m_screen; |
| 62 | | required_device<palette_device> m_palette; |
| 63 | 68 | }; |
trunk/src/mame/video/shadfrce.c
| r243708 | r243709 | |
| 1 | 1 | #include "emu.h" |
| 2 | 2 | #include "includes/shadfrce.h" |
| 3 | 3 | |
| 4 | | TILE_GET_INFO_MEMBER(shadfrce_state::get_shadfrce_fgtile_info) |
| 4 | TILE_GET_INFO_MEMBER(shadfrce_state::get_fgtile_info) |
| 5 | 5 | { |
| 6 | 6 | /* ---- ---- tttt tttt ---- ---- pppp TTTT */ |
| 7 | 7 | int tileno, colour; |
| r243708 | r243709 | |
| 12 | 12 | SET_TILE_INFO_MEMBER(0,tileno,colour*4,0); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | | WRITE16_MEMBER(shadfrce_state::shadfrce_fgvideoram_w) |
| 15 | WRITE16_MEMBER(shadfrce_state::fgvideoram_w) |
| 16 | 16 | { |
| 17 | 17 | m_fgvideoram[offset] = data; |
| 18 | 18 | m_fgtilemap->mark_tile_dirty(offset/2); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | | TILE_GET_INFO_MEMBER(shadfrce_state::get_shadfrce_bg0tile_info) |
| 21 | TILE_GET_INFO_MEMBER(shadfrce_state::get_bg0tile_info) |
| 22 | 22 | { |
| 23 | 23 | /* ---- ---- ---- cccc --TT TTTT TTTT TTTT */ |
| 24 | 24 | int tileno, colour,fyx; |
| r243708 | r243709 | |
| 31 | 31 | SET_TILE_INFO_MEMBER(2,tileno,colour,TILE_FLIPYX(fyx)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg0videoram_w) |
| 34 | WRITE16_MEMBER(shadfrce_state::bg0videoram_w) |
| 35 | 35 | { |
| 36 | 36 | m_bg0videoram[offset] = data; |
| 37 | 37 | m_bg0tilemap->mark_tile_dirty(offset/2); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | | TILE_GET_INFO_MEMBER(shadfrce_state::get_shadfrce_bg1tile_info) |
| 40 | TILE_GET_INFO_MEMBER(shadfrce_state::get_bg1tile_info) |
| 41 | 41 | { |
| 42 | 42 | int tileno, colour; |
| 43 | 43 | |
| r243708 | r243709 | |
| 47 | 47 | SET_TILE_INFO_MEMBER(2,tileno,colour+64,0); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg1videoram_w) |
| 50 | WRITE16_MEMBER(shadfrce_state::bg1videoram_w) |
| 51 | 51 | { |
| 52 | 52 | m_bg1videoram[offset] = data; |
| 53 | 53 | m_bg1tilemap->mark_tile_dirty(offset); |
| r243708 | r243709 | |
| 58 | 58 | |
| 59 | 59 | void shadfrce_state::video_start() |
| 60 | 60 | { |
| 61 | | m_fgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_shadfrce_fgtile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32); |
| 61 | m_fgtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_fgtile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32); |
| 62 | 62 | m_fgtilemap->set_transparent_pen(0); |
| 63 | 63 | |
| 64 | | m_bg0tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_shadfrce_bg0tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32); |
| 64 | m_bg0tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_bg0tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32); |
| 65 | 65 | m_bg0tilemap->set_transparent_pen(0); |
| 66 | 66 | |
| 67 | | m_bg1tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_shadfrce_bg1tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32); |
| 67 | m_bg1tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_bg1tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32); |
| 68 | 68 | |
| 69 | 69 | m_spvideoram_old = auto_alloc_array(machine(), UINT16, m_spvideoram.bytes()/2); |
| 70 | |
| 71 | save_item(NAME(m_video_enable)); |
| 72 | save_item(NAME(m_irqs_enable)); |
| 73 | save_item(NAME(m_raster_scanline)); |
| 74 | save_item(NAME(m_raster_irq_enable)); |
| 75 | save_item(NAME(m_vblank)); |
| 76 | save_item(NAME(m_prev_value)); |
| 70 | 77 | } |
| 71 | 78 | |
| 72 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg0scrollx_w) |
| 79 | WRITE16_MEMBER(shadfrce_state::bg0scrollx_w) |
| 73 | 80 | { |
| 74 | 81 | m_bg0tilemap->set_scrollx(0, data & 0x1ff ); |
| 75 | 82 | } |
| 76 | 83 | |
| 77 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg0scrolly_w) |
| 84 | WRITE16_MEMBER(shadfrce_state::bg0scrolly_w) |
| 78 | 85 | { |
| 79 | 86 | m_bg0tilemap->set_scrolly(0, data & 0x1ff ); |
| 80 | 87 | } |
| 81 | 88 | |
| 82 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg1scrollx_w) |
| 89 | WRITE16_MEMBER(shadfrce_state::bg1scrollx_w) |
| 83 | 90 | { |
| 84 | 91 | m_bg1tilemap->set_scrollx(0, data & 0x1ff ); |
| 85 | 92 | } |
| 86 | 93 | |
| 87 | | WRITE16_MEMBER(shadfrce_state::shadfrce_bg1scrolly_w) |
| 94 | WRITE16_MEMBER(shadfrce_state::bg1scrolly_w) |
| 88 | 95 | { |
| 89 | 96 | m_bg1tilemap->set_scrolly(0, data & 0x1ff ); |
| 90 | 97 | } |
| r243708 | r243709 | |
| 139 | 146 | } |
| 140 | 147 | } |
| 141 | 148 | |
| 142 | | UINT32 shadfrce_state::screen_update_shadfrce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 149 | UINT32 shadfrce_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 143 | 150 | { |
| 144 | 151 | screen.priority().fill(0, cliprect); |
| 145 | 152 | |
| r243708 | r243709 | |
| 158 | 165 | return 0; |
| 159 | 166 | } |
| 160 | 167 | |
| 161 | | void shadfrce_state::screen_eof_shadfrce(screen_device &screen, bool state) |
| 168 | void shadfrce_state::screen_eof(screen_device &screen, bool state) |
| 162 | 169 | { |
| 163 | 170 | // rising edge |
| 164 | 171 | if (state) |