Previous 199869 Revisions Next

r36347 Monday 9th March, 2015 at 18:09:42 UTC by Osso
sidearms.c: added save state support (nw)
[src/mame/drivers]sidearms.c
[src/mame/includes]sidearms.h
[src/mame/video]sidearms.c

trunk/src/mame/drivers/sidearms.c
r244858r244859
4646    membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x8000, 0x4000);
4747}
4848
49WRITE8_MEMBER(sidearms_state::sidearms_bankswitch_w)
49WRITE8_MEMBER(sidearms_state::bankswitch_w)
5050{
5151    membank("bank1")->set_entry(data & 0x07);
5252}
r244858r244859
7171   AM_RANGE(0xc000, 0xc3ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
7272   AM_RANGE(0xc400, 0xc7ff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext")
7373   AM_RANGE(0xc800, 0xc800) AM_READ_PORT("SYSTEM") AM_WRITE(soundlatch_byte_w)
74   AM_RANGE(0xc801, 0xc801) AM_READ_PORT("P1") AM_WRITE(sidearms_bankswitch_w)
74   AM_RANGE(0xc801, 0xc801) AM_READ_PORT("P1") AM_WRITE(bankswitch_w)
7575   AM_RANGE(0xc802, 0xc802) AM_READ_PORT("P2") AM_WRITE(watchdog_reset_w)
7676   AM_RANGE(0xc803, 0xc803) AM_READ_PORT("DSW0")
77   AM_RANGE(0xc804, 0xc804) AM_READ_PORT("DSW1") AM_WRITE(sidearms_c804_w)
78   AM_RANGE(0xc805, 0xc805) AM_READ_PORT("DSW2") AM_WRITE(sidearms_star_scrollx_w)
79   AM_RANGE(0xc806, 0xc806) AM_WRITE(sidearms_star_scrolly_w)
77   AM_RANGE(0xc804, 0xc804) AM_READ_PORT("DSW1") AM_WRITE(c804_w)
78   AM_RANGE(0xc805, 0xc805) AM_READ_PORT("DSW2") AM_WRITE(star_scrollx_w)
79   AM_RANGE(0xc806, 0xc806) AM_WRITE(star_scrolly_w)
8080   AM_RANGE(0xc808, 0xc809) AM_WRITEONLY AM_SHARE("bg_scrollx")
8181   AM_RANGE(0xc80a, 0xc80b) AM_WRITEONLY AM_SHARE("bg_scrolly")
82   AM_RANGE(0xc80c, 0xc80c) AM_WRITE(sidearms_gfxctrl_w)   /* background and sprite enable */
83   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(sidearms_videoram_w) AM_SHARE("videoram")
84   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(sidearms_colorram_w) AM_SHARE("colorram")
82   AM_RANGE(0xc80c, 0xc80c) AM_WRITE(gfxctrl_w)   /* background and sprite enable */
83   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
84   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
8585   AM_RANGE(0xe000, 0xefff) AM_RAM
8686   AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("spriteram")
8787ADDRESS_MAP_END
r244858r244859
9595   AM_RANGE(0xe400, 0xe7ff) AM_RAM_DEVWRITE("palette", palette_device, write_ext) AM_SHARE("palette_ext")
9696   AM_RANGE(0xe800, 0xe807) AM_READ(turtship_ports_r)
9797   AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_byte_w)
98   AM_RANGE(0xe801, 0xe801) AM_WRITE(sidearms_bankswitch_w)
98   AM_RANGE(0xe801, 0xe801) AM_WRITE(bankswitch_w)
9999   AM_RANGE(0xe802, 0xe802) AM_WRITE(watchdog_reset_w)
100   AM_RANGE(0xe804, 0xe804) AM_WRITE(sidearms_c804_w)
101   AM_RANGE(0xe805, 0xe805) AM_WRITE(sidearms_star_scrollx_w)
102   AM_RANGE(0xe806, 0xe806) AM_WRITE(sidearms_star_scrolly_w)
100   AM_RANGE(0xe804, 0xe804) AM_WRITE(c804_w)
101   AM_RANGE(0xe805, 0xe805) AM_WRITE(star_scrollx_w)
102   AM_RANGE(0xe806, 0xe806) AM_WRITE(star_scrolly_w)
103103   AM_RANGE(0xe808, 0xe809) AM_WRITEONLY AM_SHARE("bg_scrollx")
104104   AM_RANGE(0xe80a, 0xe80b) AM_WRITEONLY AM_SHARE("bg_scrolly")
105   AM_RANGE(0xe80c, 0xe80c) AM_WRITE(sidearms_gfxctrl_w)   /* background and sprite enable */
106   AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(sidearms_videoram_w) AM_SHARE("videoram")
107   AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(sidearms_colorram_w) AM_SHARE("colorram")
105   AM_RANGE(0xe80c, 0xe80c) AM_WRITE(gfxctrl_w)   /* background and sprite enable */
106   AM_RANGE(0xf000, 0xf7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
107   AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
108108ADDRESS_MAP_END
109109
110110static ADDRESS_MAP_START( sidearms_sound_map, AS_PROGRAM, 8, sidearms_state )
r244858r244859
139139   AM_RANGE(0xc801, 0xc801) AM_READ_PORT("DSW1") AM_WRITE(whizz_bankswitch_w)
140140   AM_RANGE(0xc802, 0xc802) AM_READ_PORT("DSW2") AM_WRITE(watchdog_reset_w)
141141   AM_RANGE(0xc803, 0xc803) AM_READ_PORT("IN0") AM_WRITENOP
142   AM_RANGE(0xc804, 0xc804) AM_READ_PORT("IN1") AM_WRITE(sidearms_c804_w)
142   AM_RANGE(0xc804, 0xc804) AM_READ_PORT("IN1") AM_WRITE(c804_w)
143143   AM_RANGE(0xc805, 0xc805) AM_READ_PORT("IN2") AM_WRITENOP
144144   AM_RANGE(0xc806, 0xc806) AM_READ_PORT("IN3")
145145   AM_RANGE(0xc807, 0xc807) AM_READ_PORT("IN4")
146146   AM_RANGE(0xc808, 0xc809) AM_WRITEONLY AM_SHARE("bg_scrollx")
147147   AM_RANGE(0xc80a, 0xc80b) AM_WRITEONLY AM_SHARE("bg_scrolly")
148   AM_RANGE(0xe805, 0xe805) AM_WRITE(sidearms_star_scrollx_w)
149   AM_RANGE(0xe806, 0xe806) AM_WRITE(sidearms_star_scrolly_w)
150   AM_RANGE(0xc80c, 0xc80c) AM_WRITE(sidearms_gfxctrl_w)
151   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(sidearms_videoram_w) AM_SHARE("videoram")
152   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(sidearms_colorram_w) AM_SHARE("colorram")
148   AM_RANGE(0xe805, 0xe805) AM_WRITE(star_scrollx_w)
149   AM_RANGE(0xe806, 0xe806) AM_WRITE(star_scrolly_w)
150   AM_RANGE(0xc80c, 0xc80c) AM_WRITE(gfxctrl_w)
151   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
152   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
153153   AM_RANGE(0xe000, 0xefff) AM_RAM
154154   AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("spriteram")
155155ADDRESS_MAP_END
r244858r244859
580580   GFXDECODE_ENTRY( "gfx3", 0, spritelayout,        512, 16 )  /* colors 512-767 */
581581GFXDECODE_END
582582
583/* handler called by the 2203 emulator when the internal timers cause an IRQ */
584WRITE_LINE_MEMBER( sidearms_state::irqhandler )
585{
586   m_audiocpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE);
587}
588583
589584static MACHINE_CONFIG_START( sidearms, sidearms_state )
590585
r244858r244859
604599   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
605600   MCFG_SCREEN_SIZE(64*8, 32*8)
606601   MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 )
607   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update_sidearms)
602   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update)
608603   MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram8_device, vblank_copy_rising)
609604   MCFG_SCREEN_PALETTE("palette")
610605
r244858r244859
617612   MCFG_SPEAKER_STANDARD_MONO("mono")
618613
619614   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
620   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
615   MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
621616   MCFG_SOUND_ROUTE(0, "mono", 0.15)
622617   MCFG_SOUND_ROUTE(1, "mono", 0.15)
623618   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r244858r244859
650645   MCFG_SCREEN_SIZE(64*8, 32*8)
651646   MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 )
652647   MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram8_device, vblank_copy_rising)
653   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update_sidearms)
648   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update)
654649   MCFG_SCREEN_PALETTE("palette")
655650
656651   MCFG_GFXDECODE_ADD("gfxdecode", "palette", turtship)
r244858r244859
662657   MCFG_SPEAKER_STANDARD_MONO("mono")
663658
664659   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
665   MCFG_YM2203_IRQ_HANDLER(WRITELINE(sidearms_state, irqhandler))
660   MCFG_YM2203_IRQ_HANDLER(INPUTLINE("audiocpu", 0))
666661   MCFG_SOUND_ROUTE(0, "mono", 0.15)
667662   MCFG_SOUND_ROUTE(1, "mono", 0.15)
668663   MCFG_SOUND_ROUTE(2, "mono", 0.15)
r244858r244859
697692   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
698693   MCFG_SCREEN_SIZE(64*8, 32*8)
699694   MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 )
700   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update_sidearms)
695   MCFG_SCREEN_UPDATE_DRIVER(sidearms_state, screen_update)
701696   MCFG_SCREEN_VBLANK_DEVICE("spriteram", buffered_spriteram8_device, vblank_copy_rising)
702697   MCFG_SCREEN_PALETTE("palette")
703698
r244858r244859
11481143
11491144// date string is at 0xaa2 in 'rom 03' it does not appear to be displayed
11501145
1151GAME( 1986, sidearms,   0,        sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom",                   "Side Arms - Hyper Dyne (World, 861129)", GAME_IMPERFECT_GRAPHICS )
1152GAME( 1986, sidearmsu,  sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US, 861202)", GAME_IMPERFECT_GRAPHICS )
1153GAME( 1986, sidearmsur1,sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US, 861128)", GAME_IMPERFECT_GRAPHICS )
1154GAME( 1986, sidearmsj,  sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom",                   "Side Arms - Hyper Dyne (Japan, 861128)", GAME_IMPERFECT_GRAPHICS )
1146GAME( 1986, sidearms,   0,        sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom",                   "Side Arms - Hyper Dyne (World, 861129)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1147GAME( 1986, sidearmsu,  sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US, 861202)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1148GAME( 1986, sidearmsur1,sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom (Romstar license)", "Side Arms - Hyper Dyne (US, 861128)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1149GAME( 1986, sidearmsj,  sidearms, sidearms, sidearms, sidearms_state, sidearms, ROT0,   "Capcom",                   "Side Arms - Hyper Dyne (Japan, 861128)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
11551150
1156GAME( 1988, turtship, 0,        turtship, turtship, sidearms_state, turtship, ROT0,   "Philko (Sharp Image license)",   "Turtle Ship (North America)", 0 )
1157GAME( 1988, turtshipj,turtship, turtship, turtship, sidearms_state, turtship, ROT0,   "Philko (Pacific Games license)", "Turtle Ship (Japan)", 0 )
1158GAME( 1988, turtshipk,turtship, turtship, turtship, sidearms_state, turtship, ROT0,   "Philko",                         "Turtle Ship (Korea)", 0 )
1151GAME( 1988, turtship, 0,        turtship, turtship, sidearms_state, turtship, ROT0,   "Philko (Sharp Image license)",   "Turtle Ship (North America)", GAME_SUPPORTS_SAVE )
1152GAME( 1988, turtshipj,turtship, turtship, turtship, sidearms_state, turtship, ROT0,   "Philko (Pacific Games license)", "Turtle Ship (Japan)", GAME_SUPPORTS_SAVE )
1153GAME( 1988, turtshipk,turtship, turtship, turtship, sidearms_state, turtship, ROT0,   "Philko",                         "Turtle Ship (Korea)", GAME_SUPPORTS_SAVE )
11591154
1160GAME( 1989, dyger,    0,        turtship, dyger, sidearms_state,    dyger,    ROT270, "Philko", "Dyger (Korea set 1)", 0 )
1161GAME( 1989, dygera,   dyger,    turtship, dyger, sidearms_state,    dyger,    ROT270, "Philko", "Dyger (Korea set 2)", 0 )
1155GAME( 1989, dyger,    0,        turtship, dyger, sidearms_state,    dyger,    ROT270, "Philko", "Dyger (Korea set 1)", GAME_SUPPORTS_SAVE )
1156GAME( 1989, dygera,   dyger,    turtship, dyger, sidearms_state,    dyger,    ROT270, "Philko", "Dyger (Korea set 2)", GAME_SUPPORTS_SAVE )
11621157
1163GAME( 1989, twinfalc, 0,        whizz,    whizz, sidearms_state,    whizz,    ROT0,   "Philko (Poara Enterprises license)", "Twin Falcons", 0 )
1164GAME( 1989, whizz,    twinfalc, whizz,    whizz, sidearms_state,    whizz,    ROT0,   "Philko",                             "Whizz", 0 )
1158GAME( 1989, twinfalc, 0,        whizz,    whizz, sidearms_state,    whizz,    ROT0,   "Philko (Poara Enterprises license)", "Twin Falcons", GAME_SUPPORTS_SAVE )
1159GAME( 1989, whizz,    twinfalc, whizz,    whizz, sidearms_state,    whizz,    ROT0,   "Philko",                             "Whizz", GAME_SUPPORTS_SAVE )
trunk/src/mame/includes/sidearms.h
r244858r244859
1616      m_colorram(*this, "colorram"),
1717      m_ports(*this, ports) { }
1818
19   int m_gameid;
20
2119   required_device<cpu_device> m_maincpu;
2220   required_device<cpu_device> m_audiocpu;
2321   required_device<gfxdecode_device> m_gfxdecode;
r244858r244859
3230   DECLARE_IOPORT_ARRAY(ports);
3331   optional_ioport_array<5> m_ports;
3432
33   int m_gameid;
34
3535   UINT8 *m_tilerom;
3636   tilemap_t *m_bg_tilemap;
3737   tilemap_t *m_fg_tilemap;
r244858r244859
4747   UINT32 m_vcount_191;
4848   UINT32 m_latch_374;
4949
50   DECLARE_WRITE8_MEMBER(sidearms_bankswitch_w);
50   DECLARE_WRITE8_MEMBER(bankswitch_w);
51   DECLARE_WRITE8_MEMBER(videoram_w);
52   DECLARE_WRITE8_MEMBER(colorram_w);
53   DECLARE_WRITE8_MEMBER(c804_w);
54   DECLARE_WRITE8_MEMBER(gfxctrl_w);
55   DECLARE_WRITE8_MEMBER(star_scrollx_w);
56   DECLARE_WRITE8_MEMBER(star_scrolly_w);
57   
5158   DECLARE_READ8_MEMBER(turtship_ports_r);
59   
5260   DECLARE_WRITE8_MEMBER(whizz_bankswitch_w);
53   DECLARE_WRITE8_MEMBER(sidearms_videoram_w);
54   DECLARE_WRITE8_MEMBER(sidearms_colorram_w);
55   DECLARE_WRITE8_MEMBER(sidearms_c804_w);
56   DECLARE_WRITE8_MEMBER(sidearms_gfxctrl_w);
57   DECLARE_WRITE8_MEMBER(sidearms_star_scrollx_w);
58   DECLARE_WRITE8_MEMBER(sidearms_star_scrolly_w);
61
5962   DECLARE_DRIVER_INIT(dyger);
6063   DECLARE_DRIVER_INIT(sidearms);
6164   DECLARE_DRIVER_INIT(whizz);
6265   DECLARE_DRIVER_INIT(turtship);
66   virtual void machine_start();
67    virtual void video_start();
68
6369   TILE_GET_INFO_MEMBER(get_sidearms_bg_tile_info);
6470   TILE_GET_INFO_MEMBER(get_philko_bg_tile_info);
6571   TILE_GET_INFO_MEMBER(get_fg_tile_info);
66   TILEMAP_MAPPER_MEMBER(sidearms_tilemap_scan);
67    virtual void machine_start();
68    virtual void video_start();
69   UINT32 screen_update_sidearms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
70   DECLARE_WRITE_LINE_MEMBER(irqhandler);
72   TILEMAP_MAPPER_MEMBER(tilemap_scan);
73
74   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7175   void draw_sprites_region(bitmap_ind16 &bitmap, const rectangle &cliprect, int start_offset, int end_offset );
72   void sidearms_draw_starfield( bitmap_ind16 &bitmap );
76   void draw_starfield( bitmap_ind16 &bitmap );
7377   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
7478};
trunk/src/mame/video/sidearms.c
r244858r244859
11/***************************************************************************
22
3  video.c
3  sidearms.c
44
55  Functions to emulate the video hardware of the machine.
66
r244858r244859
99#include "emu.h"
1010#include "includes/sidearms.h"
1111
12WRITE8_MEMBER(sidearms_state::sidearms_videoram_w)
12WRITE8_MEMBER(sidearms_state::videoram_w)
1313{
1414   m_videoram[offset] = data;
1515   m_fg_tilemap->mark_tile_dirty(offset);
1616}
1717
18WRITE8_MEMBER(sidearms_state::sidearms_colorram_w)
18WRITE8_MEMBER(sidearms_state::colorram_w)
1919{
2020   m_colorram[offset] = data;
2121   m_fg_tilemap->mark_tile_dirty(offset);
2222}
2323
24WRITE8_MEMBER(sidearms_state::sidearms_c804_w)
24WRITE8_MEMBER(sidearms_state::c804_w)
2525{
2626   /* bits 0 and 1 are coin counters */
2727   coin_counter_w(machine(), 0, data & 0x01);
r244858r244859
6565   }
6666}
6767
68WRITE8_MEMBER(sidearms_state::sidearms_gfxctrl_w)
68WRITE8_MEMBER(sidearms_state::gfxctrl_w)
6969{
7070   m_objon = data & 0x01;
7171   m_bgon = data & 0x02;
7272}
7373
74WRITE8_MEMBER(sidearms_state::sidearms_star_scrollx_w)
74WRITE8_MEMBER(sidearms_state::star_scrollx_w)
7575{
7676   UINT32 last_state = m_hcount_191;
7777
r244858r244859
8383      m_hflop_74a_n ^= 1;
8484}
8585
86WRITE8_MEMBER(sidearms_state::sidearms_star_scrolly_w)
86WRITE8_MEMBER(sidearms_state::star_scrolly_w)
8787{
8888   m_vcount_191++;
8989   m_vcount_191 &= 0xff;
r244858r244859
125125   SET_TILE_INFO_MEMBER(0, code, color, 0);
126126}
127127
128TILEMAP_MAPPER_MEMBER(sidearms_state::sidearms_tilemap_scan)
128TILEMAP_MAPPER_MEMBER(sidearms_state::tilemap_scan)
129129{
130130   /* logical (col,row) -> memory offset */
131131   int offset = ((row << 7) + col) << 1;
r244858r244859
140140
141141   if (!m_gameid)
142142   {
143      m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sidearms_state::get_sidearms_bg_tile_info),this), tilemap_mapper_delegate(FUNC(sidearms_state::sidearms_tilemap_scan),this),
143      m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sidearms_state::get_sidearms_bg_tile_info),this), tilemap_mapper_delegate(FUNC(sidearms_state::tilemap_scan),this),
144144            32, 32, 128, 128);
145145
146146      m_bg_tilemap->set_transparent_pen(15);
147147   }
148148   else
149149   {
150      m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sidearms_state::get_philko_bg_tile_info),this), tilemap_mapper_delegate(FUNC(sidearms_state::sidearms_tilemap_scan),this), 32, 32, 128, 128);
150      m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sidearms_state::get_philko_bg_tile_info),this), tilemap_mapper_delegate(FUNC(sidearms_state::tilemap_scan),this), 32, 32, 128, 128);
151151   }
152152
153153   m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(sidearms_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS,
r244858r244859
159159   m_latch_374 = m_vcount_191 = m_hcount_191 = 0;
160160
161161   m_flipon = m_charon = m_staron = m_objon = m_bgon = 0;
162   
163   save_item(NAME(m_bgon));
164   save_item(NAME(m_objon));
165   save_item(NAME(m_staron));
166   save_item(NAME(m_charon));
167   save_item(NAME(m_flipon));
168   save_item(NAME(m_hflop_74a_n));
169   save_item(NAME(m_hcount_191));
170   save_item(NAME(m_vcount_191));
171   save_item(NAME(m_latch_374));
162172}
163173
164174void sidearms_state::draw_sprites_region(bitmap_ind16 &bitmap, const rectangle &cliprect, int start_offset, int end_offset )
r244858r244859
193203   }
194204}
195205
196void sidearms_state::sidearms_draw_starfield( bitmap_ind16 &bitmap )
206void sidearms_state::draw_starfield( bitmap_ind16 &bitmap )
197207{
198208   int x, y, i;
199209   UINT32 hadd_283, vadd_283, _hflop_74a_n, _hcount_191, _vcount_191;
r244858r244859
329339   }
330340}
331341
332UINT32 sidearms_state::screen_update_sidearms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
342UINT32 sidearms_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
333343{
334   sidearms_draw_starfield(bitmap);
344   draw_starfield(bitmap);
335345
336346   m_bg_tilemap->set_scrollx(0, m_bg_scrollx[0] + (m_bg_scrollx[1] << 8 & 0xf00));
337347   m_bg_tilemap->set_scrolly(0, m_bg_scrolly[0] + (m_bg_scrolly[1] << 8 & 0xf00));


Previous 199869 Revisions Next


© 1997-2024 The MAME Team