Previous 199869 Revisions Next

r32831 Monday 20th October, 2014 at 03:57:09 UTC by Alex Jackson
bwing.c: replace achocode with clean modern stuff (bankdev, correct TILEMAP_MAPPER_MEMBER, GFXDECODE_RAM) (nw)
[src/mame/drivers]bwing.c
[src/mame/includes]bwing.h
[src/mame/video]bwing.c

trunk/src/mame/includes/bwing.h
r32830r32831
44
55***************************************************************************/
66
7#include "machine/bankdev.h"
8
79#define BW_DEBUG 0
810
911class bwing_state : public driver_device
r32830r32831
1113public:
1214   bwing_state(const machine_config &mconfig, device_type type, const char *tag)
1315      : driver_device(mconfig, type, tag),
14      m_bwp1_sharedram1(*this, "bwp1_sharedram1"),
1516      m_videoram(*this, "videoram"),
1617      m_spriteram(*this, "spriteram"),
1718      m_paletteram(*this, "paletteram"),
18      m_bwp2_sharedram1(*this, "bwp2_sharedram1"),
19      m_bwp3_rombase(*this, "bwp3_rombase"),
19      m_fgscrollram(*this, "fgscrollram"),
20      m_bgscrollram(*this, "bgscrollram"),
21      m_gfxram(*this, "gfxram"),
2022      m_maincpu(*this, "maincpu"),
2123      m_subcpu(*this, "sub"),
2224      m_audiocpu(*this, "audiocpu"),
2325      m_gfxdecode(*this, "gfxdecode"),
24      m_palette(*this, "palette") { }
26      m_palette(*this, "palette"),
27      m_vrambank(*this, "vrambank") { }
2528
2629   /* memory pointers */
27   required_shared_ptr<UINT8> m_bwp1_sharedram1;
2830   required_shared_ptr<UINT8> m_videoram;
2931   required_shared_ptr<UINT8> m_spriteram;
3032   required_shared_ptr<UINT8> m_paletteram;
31   required_shared_ptr<UINT8> m_bwp2_sharedram1;
32   required_shared_ptr<UINT8> m_bwp3_rombase;
33   required_shared_ptr<UINT8> m_fgscrollram;
34   required_shared_ptr<UINT8> m_bgscrollram;
35   required_shared_ptr<UINT8> m_gfxram;
3336
3437   /* video-related */
3538   tilemap_t *m_charmap;
3639   tilemap_t *m_fgmap;
3740   tilemap_t *m_bgmap;
38   UINT8 *m_srbase[4];
39   UINT8 *m_fgdata;
40   UINT8 *m_bgdata;
41   int *m_srxlat;
4241   unsigned m_sreg[8];
4342   unsigned m_palatch;
44   unsigned m_srbank;
4543   unsigned m_mapmask;
46   unsigned m_mapflip;
4744
4845   /* sound-related */
4946   int m_bwp3_nmimask;
r32830r32831
5855   required_device<cpu_device> m_audiocpu;
5956   required_device<gfxdecode_device> m_gfxdecode;
6057   required_device<palette_device> m_palette;
58   required_device<address_map_bank_device> m_vrambank;
6159
62   DECLARE_WRITE8_MEMBER(bwp12_sharedram1_w);
6360   DECLARE_WRITE8_MEMBER(bwp3_u8F_w);
6461   DECLARE_WRITE8_MEMBER(bwp3_nmimask_w);
6562   DECLARE_WRITE8_MEMBER(bwp3_nmiack_w);
r32830r32831
6865   DECLARE_WRITE8_MEMBER(bwp2_ctrl_w);
6966   DECLARE_WRITE8_MEMBER(bwing_spriteram_w);
7067   DECLARE_WRITE8_MEMBER(bwing_videoram_w);
71   DECLARE_READ8_MEMBER(bwing_scrollram_r);
72   DECLARE_WRITE8_MEMBER(bwing_scrollram_w);
68   DECLARE_WRITE8_MEMBER(fgscrollram_w);
69   DECLARE_WRITE8_MEMBER(bgscrollram_w);
70   DECLARE_WRITE8_MEMBER(gfxram_w);
7371   DECLARE_WRITE8_MEMBER(bwing_scrollreg_w);
7472   DECLARE_WRITE8_MEMBER(bwing_paletteram_w);
7573   DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
r32830r32831
8482   virtual void video_start();
8583   UINT32 screen_update_bwing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8684   INTERRUPT_GEN_MEMBER(bwp3_interrupt);
87   void fill_srxlat( int *xlat );
8885   void draw_sprites( bitmap_ind16 &bmp, const rectangle &clip, UINT8 *ram, int pri );
8986   void fix_bwp3(  );
9087};
91
92/*----------- defined in video/bwing.c -----------*/
93extern const gfx_layout bwing_tilelayout;
trunk/src/mame/video/bwing.c
r32830r32831
44Zaviga   (c) 1984 Data East Corporation
55
66drivers by Acho A. Tang
7revised by Alex W. Jackson
78
89*****************************************************************************/
910// Directives
r32830r32831
1213#include "includes/bwing.h"
1314
1415
15#define BW_DEBUG 0
16
17#define BW_NTILES_L2    7
18#define BW_NTILES      (1<<BW_NTILES_L2)
19
20
2116//****************************************************************************
22// Local Functions
23
24void bwing_state::fill_srxlat( int *xlat )
25{
26   unsigned base, offset, i;
27
28   for (base = 0; base < 0x2000; base += 0x400)
29   {
30      for(i = 0; i < 0x100; i++)
31      {
32         offset = base + (i<<2 & ~0x3f) + (i & 0x0f);
33
34         xlat[base + i] = offset;
35         xlat[base + i + 0x100] = offset + 0x10;
36         xlat[base + i + 0x200] = offset + 0x20;
37         xlat[base + i + 0x300] = offset + 0x30;
38      }
39   }
40}
41
42//****************************************************************************
4317// Exports
4418
45const gfx_layout bwing_tilelayout =
46{
47   16, 16,
48   BW_NTILES,
49   3,
50   { 0x4000*8, 0x2000*8, 0 },
51   { 7, 6, 5, 4, 3, 2, 1, 0, 128+7, 128+6, 128+5, 128+4, 128+3, 128+2, 128+1, 128+0 },
52   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
53      8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
54   32*8
55};
5619
57
58WRITE8_MEMBER(bwing_state::bwing_spriteram_w)
59{
60   m_spriteram[offset] = data;
61}
62
6320WRITE8_MEMBER(bwing_state::bwing_videoram_w)
6421{
6522   m_videoram[offset] = data;
r32830r32831
6724}
6825
6926
70READ8_MEMBER(bwing_state::bwing_scrollram_r)
27WRITE8_MEMBER(bwing_state::fgscrollram_w)
7128{
72   int offs;
73
74   if (!m_srbank)
75      offs = m_srxlat[offset];
76   else
77      offs = offset;
78
79   return ((m_srbase[m_srbank])[offs]);
29   m_fgscrollram[offset] = data;
30   m_fgmap->mark_tile_dirty(offset);
8031}
8132
8233
83WRITE8_MEMBER(bwing_state::bwing_scrollram_w)
34WRITE8_MEMBER(bwing_state::bgscrollram_w)
8435{
85   int offs;
36   m_bgscrollram[offset] = data;
37   m_bgmap->mark_tile_dirty(offset);
38}
8639
87   if (!m_srbank)
88   {
89      offs = m_srxlat[offset];
90      if (offs >> 12)
91         m_bgmap->mark_tile_dirty(offs & 0xfff);
92      else
93         m_fgmap->mark_tile_dirty(offs & 0xfff);
94   }
95   else
96   {
97      offs = offset;
98      if (offset < 0x1000)
99         m_gfxdecode->gfx(2)->mark_dirty(offset / 32);
100      else
101         m_gfxdecode->gfx(3)->mark_dirty(offset / 32);
102   }
10340
104   (m_srbase[m_srbank])[offs] = data;
41WRITE8_MEMBER(bwing_state::gfxram_w)
42{
43   m_gfxram[offset] = data;
44   int whichgfx = (offset & 0x1000) ? 3 : 2;
45   m_gfxdecode->gfx(whichgfx)->mark_dirty((offset & 0xfff) / 32);
10546}
10647
10748
r32830r32831
11455      case 6: m_palatch = data; break; // one of the palette components is latched through I/O(yike)
11556
11657      case 7:
117         // tile graphics are decoded in RAM on the fly and tile codes are banked + interleaved(ouch)
11858         m_mapmask = data;
119         m_srbank = data >> 6;
120
121         #if BW_DEBUG
122            logerror("(%s)%04x: w=%02x a=%04x f=%d\n", device().tag, space.device().safe_pc(), data, 0x1b00 + offset, m_screen->frame_number());
123         #endif
59         m_vrambank->set_bank(data >> 6);
12460      break;
12561   }
126
127   #if BW_DEBUG
128      (memregion(REGION_CPU1)->base())[0x1b10 + offset] = data;
129   #endif
13062}
13163
13264
r32830r32831
16193   }
16294
16395   m_palette->set_pen_color(offset, rgb_t(r, g, b));
164
165   #if BW_DEBUG
166      m_paletteram[offset + 0x40] = m_palatch;
167   #endif
16896}
16997
17098//****************************************************************************
r32830r32831
172100
173101TILE_GET_INFO_MEMBER(bwing_state::get_fgtileinfo)
174102{
175   SET_TILE_INFO_MEMBER(2, m_fgdata[tile_index] & 0x7f, m_fgdata[tile_index] >> 7, 0);
103   SET_TILE_INFO_MEMBER(2, m_fgscrollram[tile_index] & 0x7f, m_fgscrollram[tile_index] >> 7, 0);
176104}
177105
178106TILE_GET_INFO_MEMBER(bwing_state::get_bgtileinfo)
179107{
180   SET_TILE_INFO_MEMBER(3, m_bgdata[tile_index] & 0x7f, m_bgdata[tile_index] >> 7, 0);
108   SET_TILE_INFO_MEMBER(3, m_bgscrollram[tile_index] & 0x7f, m_bgscrollram[tile_index] >> 7, 0);
181109}
182110
183111TILE_GET_INFO_MEMBER(bwing_state::get_charinfo)
r32830r32831
187115
188116TILEMAP_MAPPER_MEMBER(bwing_state::bwing_scan_cols)
189117{
190   return ((col << 6) + row);
118   return (row & 0xf) | ((col & 0xf) << 4) | ((row & 0x30) << 4) | ((col & 0x30) << 6);
191119}
192120
193121
194122void bwing_state::video_start()
195123{
196//  UINT32 *dwptr;
197124   int i;
198125
199126   m_charmap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bwing_state::get_charinfo),this), TILEMAP_SCAN_COLS, 8, 8, 32, 32);
r32830r32831
203130   m_charmap->set_transparent_pen(0);
204131   m_fgmap->set_transparent_pen(0);
205132
206   m_srxlat = auto_alloc_array(machine(), int, 0x2000);
207   save_pointer(NAME(m_srxlat), 0x2000);
208
209   fill_srxlat(m_srxlat);
210
211   m_fgdata = memregion("gpu")->base();
212   m_bgdata = m_fgdata + 0x1000;
213
214   for (i = 0; i < 4; i++)
215      m_srbase[i] = m_fgdata + i * 0x2000;
216
217133   for (i = 0; i < 8; i++)
218134      m_sreg[i] = 0;
219
220//  m_fgfx = m_gfxdecode->gfx(2);
221   m_gfxdecode->gfx(2)->set_source(m_srbase[1]);
222
223//  m_bgfx = m_gfxdecode->gfx(3);
224   m_gfxdecode->gfx(3)->set_source(m_srbase[1] + 0x1000);
225135}
226136
227137//****************************************************************************
r32830r32831
270180
271181UINT32 bwing_state::screen_update_bwing(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
272182{
273   unsigned x, y, shiftx;
183   unsigned flip, x, y, shiftx;
274184
275185   if (m_mapmask & 0x20)
276186   {
277      m_mapflip = TILEMAP_FLIPX;
187      flip = TILEMAP_FLIPX;
278188      shiftx = -8;
279189   }
280190   else
281191   {
282      m_mapflip = TILEMAP_FLIPY;
192      flip = TILEMAP_FLIPY;
283193      shiftx = 8;
284194   }
285195
286196   // draw background
287197   if (!(m_mapmask & 1))
288198   {
289      m_bgmap->set_flip(m_mapflip);
199      m_bgmap->set_flip(flip);
290200      x = ((m_sreg[1]<<2 & 0x300) + m_sreg[2] + shiftx) & 0x3ff;
291201      m_bgmap->set_scrollx(0, x);
292202      y = (m_sreg[1]<<4 & 0x300) + m_sreg[3];
r32830r32831
302212   // draw foreground
303213   if (!(m_mapmask & 2))
304214   {
305      m_fgmap->set_flip(m_mapflip);
215      m_fgmap->set_flip(flip);
306216      x = ((m_sreg[1] << 6 & 0x300) + m_sreg[4] + shiftx) & 0x3ff;
307217      m_fgmap->set_scrollx(0, x);
308218      y = (m_sreg[1] << 8 & 0x300) + m_sreg[5];
r32830r32831
316226   // draw text layer
317227//  if (m_mapmask & 4)
318228   {
319      m_charmap->set_flip(m_mapflip);
229      m_charmap->set_flip(flip);
320230      m_charmap->draw(screen, bitmap, cliprect, 0, 0);
321231   }
322232   return 0;
trunk/src/mame/drivers/bwing.c
r32830r32831
44Zaviga   (c) 1984 Data East Corporation
55
66driver by Acho A. Tang
7revised by Alex W. Jackson
78
89Known issues:
910
r32830r32831
4142//****************************************************************************
4243// Memory and I/O Handlers
4344
44WRITE8_MEMBER(bwing_state::bwp12_sharedram1_w)
45{
46   m_bwp1_sharedram1[offset] = m_bwp2_sharedram1[offset] = data;
47}
48
4945WRITE8_MEMBER(bwing_state::bwp3_u8F_w)
5046{
5147   m_bwp3_u8F_d = data;  // prepares custom chip for various operations
r32830r32831
110106      // hardwired to SWAP
111107      case 7: break;
112108   }
113
114   #if BW_DEBUG
115      (m_bwp123_membase[0])[0x1c00 + offset] = data;
116   #endif
117109}
118110
119111
r32830r32831
129121
130122      case 3: m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); break;
131123   }
132
133   #if BW_DEBUG
134   {
135      (m_bwp123_membase[1])[0x1800 + offset] = data;
136   }
137   #endif
138124}
139125
140126//****************************************************************************
r32830r32831
143129// Main CPU
144130static ADDRESS_MAP_START( bwp1_map, AS_PROGRAM, 8, bwing_state )
145131   AM_RANGE(0x1b00, 0x1b07) AM_READ(bwp1_io_r)
146   AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(bwp12_sharedram1_w) AM_SHARE("bwp1_sharedram1")
132   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("sharedram")
147133   AM_RANGE(0x0800, 0x0fff) AM_RAM
148134   AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(bwing_videoram_w) AM_SHARE("videoram")
149135   AM_RANGE(0x1400, 0x17ff) AM_RAM
150   AM_RANGE(0x1800, 0x19ff) AM_RAM_WRITE(bwing_spriteram_w) AM_SHARE("spriteram")
136   AM_RANGE(0x1800, 0x19ff) AM_RAM AM_SHARE("spriteram")
151137   AM_RANGE(0x1a00, 0x1aff) AM_RAM_WRITE(bwing_paletteram_w) AM_SHARE("paletteram")
152138   AM_RANGE(0x1b00, 0x1b07) AM_RAM_WRITE(bwing_scrollreg_w)
153139   AM_RANGE(0x1c00, 0x1c07) AM_RAM_WRITE(bwp1_ctrl_w)
154   AM_RANGE(0x2000, 0x3fff) AM_READWRITE(bwing_scrollram_r, bwing_scrollram_w)
140   AM_RANGE(0x2000, 0x3fff) AM_DEVICE("vrambank", address_map_bank_device, amap8)
155141   AM_RANGE(0x4000, 0xffff) AM_ROM // "B-Wings US" writes to 9631-9632(debug?)
156142ADDRESS_MAP_END
157143
144// Banked video RAM
145static ADDRESS_MAP_START( bank_map, AS_PROGRAM, 8, bwing_state )
146   AM_RANGE(0x0000, 0x0fff) AM_RAM_WRITE(fgscrollram_w) AM_SHARE("fgscrollram")
147   AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(bgscrollram_w) AM_SHARE("bgscrollram")
148   AM_RANGE(0x2000, 0x7fff) AM_RAM_WRITE(gfxram_w) AM_SHARE("gfxram")
149ADDRESS_MAP_END
158150
159151// Sub CPU
160152static ADDRESS_MAP_START( bwp2_map, AS_PROGRAM, 8, bwing_state )
161   AM_RANGE(0x0000, 0x07ff) AM_RAM_WRITE(bwp12_sharedram1_w) AM_SHARE("bwp2_sharedram1")
153   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_SHARE("sharedram")
162154   AM_RANGE(0x0800, 0x0fff) AM_RAM
163155   AM_RANGE(0x1800, 0x1803) AM_WRITE(bwp2_ctrl_w)
164156   AM_RANGE(0xa000, 0xffff) AM_ROM
r32830r32831
176168   AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_device, address_w)
177169   AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r)
178170   AM_RANGE(0xd000, 0xd000) AM_WRITE(bwp3_nmimask_w)
179   AM_RANGE(0xe000, 0xffff) AM_ROM AM_SHARE("bwp3_rombase")
171   AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("audiocpu", 0)
180172ADDRESS_MAP_END
181173
182174
r32830r32831
298290static const gfx_layout charlayout =
299291{
300292   8, 8,
301   256,
293   RGN_FRAC(1,2),
302294   2,
303   { 0, 0x4000 },
295   { 0, RGN_FRAC(1,2) },
304296   { 7, 6, 5, 4, 3, 2, 1, 0 },
305297   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
306298   8*8
r32830r32831
309301static const gfx_layout spritelayout =
310302{
311303   16, 16,
312   512,
304   RGN_FRAC(1,3),
313305   3,
314   { 0x40000, 0x20000, 0 },
306   { RGN_FRAC(2,3), RGN_FRAC(1,3), 0 },
315307   { 7, 6, 5, 4, 3, 2, 1, 0, 128+7, 128+6, 128+5, 128+4, 128+3, 128+2, 128+1, 128+0 },
316308   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
317309      8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
318310   32*8
319311};
320312
313static const gfx_layout ram_tilelayout =
314{
315   16, 16,
316   RGN_FRAC(1,6), // two sets interleaved in the same RAM
317   3,
318   { RGN_FRAC(2,3), RGN_FRAC(1,3), 0 },
319   { 7, 6, 5, 4, 3, 2, 1, 0, 128+7, 128+6, 128+5, 128+4, 128+3, 128+2, 128+1, 128+0 },
320   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
321      8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
322   32*8
323};
321324
322325static GFXDECODE_START( bwing )
323   GFXDECODE_ENTRY( "gfx1",  0, charlayout,       0x00, 1 ) // chars
324   GFXDECODE_ENTRY( "gfx2",  0, spritelayout,     0x20, 2 ) // sprites
325   GFXDECODE_ENTRY( "gpu",   0, bwing_tilelayout, 0x10, 2 ) // foreground tiles place holder
326   GFXDECODE_ENTRY( "gpu",   0, bwing_tilelayout, 0x30, 2 ) // background tiles place holder
326   GFXDECODE_ENTRY( "gfx1",      0, charlayout,     0x00, 1 ) // chars
327   GFXDECODE_ENTRY( "gfx2",      0, spritelayout,   0x20, 2 ) // sprites
328   GFXDECODE_RAM( "gfxram",      0, ram_tilelayout, 0x10, 2 ) // foreground tiles
329   GFXDECODE_RAM( "gfxram", 0x1000, ram_tilelayout, 0x30, 2 ) // background tiles
327330GFXDECODE_END
328331
329332//****************************************************************************
r32830r32831
332335void bwing_state::machine_start()
333336{
334337   save_item(NAME(m_palatch));
335   save_item(NAME(m_srbank));
336338   save_item(NAME(m_mapmask));
337   save_item(NAME(m_mapflip));
338339   save_item(NAME(m_bwp3_nmimask));
339340   save_item(NAME(m_bwp3_u8F_d));
340341
r32830r32831
344345void bwing_state::machine_reset()
345346{
346347   m_palatch = 0;
347   m_srbank = 0;
348348   m_mapmask = 0;
349   m_mapflip = 0;
350349
351350   m_bwp3_nmimask = 0;
352351   m_bwp3_u8F_d = 0;
r32830r32831
368367
369368   MCFG_QUANTUM_TIME(attotime::from_hz(18000))     // high enough?
370369
370   MCFG_DEVICE_ADD("vrambank", ADDRESS_MAP_BANK, 0)
371   MCFG_DEVICE_PROGRAM_MAP(bank_map)
372   MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_BIG)
373   MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
374   MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(15)
375   MCFG_ADDRESS_MAP_BANK_STRIDE(0x2000)
371376
372377   // video hardware
373378   MCFG_SCREEN_ADD("screen", RASTER)
r32830r32831
411416   ROM_LOAD( "bw_bv-05-.9d", 0x0c000, 0x02000, CRC(1e393300) SHA1(8d847256eb5dbccf5f524ec3aa836073d70b4edc) )  // different
412417   ROM_LOAD( "bw_bv-04-.7d", 0x0e000, 0x02000, CRC(6548c5bb) SHA1(d12cc8d0d5692c3de766f5c42c818dd8f685760a) )  // different
413418
414   ROM_REGION( 0x10000, "audiocpu", 0 ) // sound CPU(encrypted)
415   ROM_LOAD( "bw_bv-03.13a", 0x0e000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
419   ROM_REGION( 0x2000, "audiocpu", 0 ) // sound CPU(encrypted)
420   ROM_LOAD( "bw_bv-03.13a", 0x00000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
416421
417422   // Bottom Board(CCU-01)
418423   ROM_REGION( 0x01000, "gfx1", 0 ) // chars
r32830r32831
423428   ROM_LOAD( "bw_bv-07.1l",  0x00000, 0x04000, CRC(3d5ab2be) SHA1(2b3a039914ebfcc3993da74853a67546fc22c191) )
424429   ROM_LOAD( "bw_bv-08.1k",  0x04000, 0x04000, CRC(7a585f1e) SHA1(99e5d947b6b1fa96b90c676a282376d67fc377f0) )
425430   ROM_LOAD( "bw_bv-09.1h",  0x08000, 0x04000, CRC(a14c0b57) SHA1(5033354793d77922f5ef7f268cbe212e551efadf) )
426
427   // GPU Banks
428   ROM_REGION( 0x08000, "gpu", ROMREGION_ERASE00 )
429431ROM_END
430432
431433
r32830r32831
441443   ROM_LOAD( "bw_bv-05.9d",  0x0c000, 0x02000, CRC(f283f39a) SHA1(9f7f4c39d49f4dfff73fe74cd457480e8a43a3c5) )
442444   ROM_LOAD( "bw_bv-04.7d",  0x0e000, 0x02000, CRC(29ae75b6) SHA1(48c94e996857f2ac995bcd25f0e67b9f7c17d807) )
443445
444   ROM_REGION( 0x10000, "audiocpu", 0 ) // sound CPU(encrypted)
445   ROM_LOAD( "bw_bv-03.13a", 0x0e000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
446   ROM_REGION( 0x2000, "audiocpu", 0 ) // sound CPU(encrypted)
447   ROM_LOAD( "bw_bv-03.13a", 0x00000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
446448
447449   // Bottom Board(CCU-01)
448450   ROM_REGION( 0x01000, "gfx1", 0 ) // chars
r32830r32831
453455   ROM_LOAD( "bw_bv-07.1l",  0x00000, 0x04000, CRC(3d5ab2be) SHA1(2b3a039914ebfcc3993da74853a67546fc22c191) )
454456   ROM_LOAD( "bw_bv-08.1k",  0x04000, 0x04000, CRC(7a585f1e) SHA1(99e5d947b6b1fa96b90c676a282376d67fc377f0) )
455457   ROM_LOAD( "bw_bv-09.1h",  0x08000, 0x04000, CRC(a14c0b57) SHA1(5033354793d77922f5ef7f268cbe212e551efadf) )
456
457   // GPU Banks
458   ROM_REGION( 0x08000, "gpu", ROMREGION_ERASE00 )
459458ROM_END
460459
461460
r32830r32831
472471   ROM_LOAD( "bw_bv-05.9d",  0x0c000, 0x02000, CRC(f283f39a) SHA1(9f7f4c39d49f4dfff73fe74cd457480e8a43a3c5) )
473472   ROM_LOAD( "bw_bv-04.7d",  0x0e000, 0x02000, CRC(29ae75b6) SHA1(48c94e996857f2ac995bcd25f0e67b9f7c17d807) )
474473
475   ROM_REGION( 0x10000, "audiocpu", 0 ) // sound CPU(encrypted)
476   ROM_LOAD( "bw_bv-03.13a", 0x0e000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
474   ROM_REGION( 0x2000, "audiocpu", 0 ) // sound CPU(encrypted)
475   ROM_LOAD( "bw_bv-03.13a", 0x00000, 0x02000, CRC(e8ac9379) SHA1(aaf5c20aa33ed05747a8a27739e9d09e094a518d) )
477476
478477   // Bottom Board(CCU-01)
479478   ROM_REGION( 0x01000, "gfx1", 0 ) // chars
r32830r32831
484483   ROM_LOAD( "bw_bv-07.1l",  0x00000, 0x04000, CRC(3d5ab2be) SHA1(2b3a039914ebfcc3993da74853a67546fc22c191) )
485484   ROM_LOAD( "bw_bv-08.1k",  0x04000, 0x04000, CRC(7a585f1e) SHA1(99e5d947b6b1fa96b90c676a282376d67fc377f0) )
486485   ROM_LOAD( "bw_bv-09.1h",  0x08000, 0x04000, CRC(a14c0b57) SHA1(5033354793d77922f5ef7f268cbe212e551efadf) )
487
488   // GPU Banks
489   ROM_REGION( 0x08000, "gpu", ROMREGION_ERASE00 )
490486ROM_END
491487
492488ROM_START( zaviga )
r32830r32831
501497   ROM_LOAD( "as07.9d", 0x0c000, 0x02000, CRC(dc1170e3) SHA1(c8e4d1564fd272d726d0e4ffd4f33f67f1b37cd7) )
502498   ROM_LOAD( "as06.7d", 0x0e000, 0x02000, CRC(ba888f84) SHA1(f94de8553cd4704d9b3349ded881a7cc62fa9b57) )
503499
504   ROM_REGION( 0x10000, "audiocpu", 0 ) // sound CPU(encrypted)
505   ROM_LOAD( "as05.13a", 0x0e000, 0x02000, CRC(afe9b0ac) SHA1(3c653cd4fff7f4e00971249900b5a810b6e74dfe) )
500   ROM_REGION( 0x2000, "audiocpu", 0 ) // sound CPU(encrypted)
501   ROM_LOAD( "as05.13a", 0x00000, 0x02000, CRC(afe9b0ac) SHA1(3c653cd4fff7f4e00971249900b5a810b6e74dfe) )
506502
507503   // Bottom Board(DE-0170-0)
508504   ROM_REGION( 0x01000, "gfx1", 0 ) // chars
r32830r32831
513509   ROM_LOAD( "as11.1l", 0x00000, 0x04000, CRC(aa84af24) SHA1(af4ff085dc44b3d1493ec1c8b4a8d18dccecc872) )
514510   ROM_LOAD( "as12.1k", 0x04000, 0x04000, CRC(84af9041) SHA1(8fbd5995ca8e708cd7fb9cdfcdb174e12084f526) )
515511   ROM_LOAD( "as13.1h", 0x08000, 0x04000, CRC(15d0922b) SHA1(b8d715a9e610531472d516c19f6035adbce93c84) )
516
517   // GPU Banks
518   ROM_REGION( 0x08000, "gpu", ROMREGION_ERASE00 )
519512ROM_END
520513
521514
r32830r32831
531524   ROM_LOAD( "as07.9d",  0x0c000, 0x02000, CRC(dc1170e3) SHA1(c8e4d1564fd272d726d0e4ffd4f33f67f1b37cd7) )
532525   ROM_LOAD( "as06-.7d", 0x0e000, 0x02000, CRC(b02d270c) SHA1(beea3d44d367543b5b5075c5892580e690691e75) )  // different
533526
534   ROM_REGION( 0x10000, "audiocpu", 0 ) // sound CPU(encrypted)
535   ROM_LOAD( "as05.13a", 0x0e000, 0x02000, CRC(afe9b0ac) SHA1(3c653cd4fff7f4e00971249900b5a810b6e74dfe) )
527   ROM_REGION( 0x2000, "audiocpu", 0 ) // sound CPU(encrypted)
528   ROM_LOAD( "as05.13a", 0x00000, 0x02000, CRC(afe9b0ac) SHA1(3c653cd4fff7f4e00971249900b5a810b6e74dfe) )
536529
537530   // Bottom Board(DE-0170-0)
538531   ROM_REGION( 0x01000, "gfx1", 0 ) // chars
r32830r32831
543536   ROM_LOAD( "as11.1l", 0x00000, 0x04000, CRC(aa84af24) SHA1(af4ff085dc44b3d1493ec1c8b4a8d18dccecc872) )
544537   ROM_LOAD( "as12.1k", 0x04000, 0x04000, CRC(84af9041) SHA1(8fbd5995ca8e708cd7fb9cdfcdb174e12084f526) )
545538   ROM_LOAD( "as13.1h", 0x08000, 0x04000, CRC(15d0922b) SHA1(b8d715a9e610531472d516c19f6035adbce93c84) )
546
547   // GPU Banks
548   ROM_REGION( 0x08000, "gpu", ROMREGION_ERASE00 )
549539ROM_END
550540
551541//****************************************************************************
r32830r32831
553543
554544void bwing_state::fix_bwp3(  )
555545{
556   UINT8 *rom = m_bwp3_rombase;
557   int i, j = m_bwp3_rombase.bytes();
546   UINT8 *rom = memregion("audiocpu")->base();
547   int j = memregion("audiocpu")->bytes();
558548
559549   // swap nibbles
560   for (i = 0; i < j; i++)
550   for (int i = 0; i < j; i++)
561551      rom[i] = ((rom[i] & 0xf0) >> 4) | ((rom[i] & 0xf) << 4);
562552
563553   // relocate vectors

Previous 199869 Revisions Next


© 1997-2024 The MAME Team