Previous 199869 Revisions Next

r18595 Thursday 18th October, 2012 at 19:54:41 UTC by Luca Elia
suna8.c update [Luca Elia]
* Emulated the protection in sparkman
* Support for two sprite chips
* Support for two sample ROMs
* Fixed color cycling in hardhea2
* Per-game tile banking

New games added or promoted from NOT_WORKING status
---------------------------------------------------
Spark Man (v2.0, 2 sets) [Luca Elia, Stefan Lindberg]
[src/mame/audio]suna8.c
[src/mame/drivers]suna8.c
[src/mame/includes]suna8.h
[src/mame/video]suna8.c

trunk/src/mame/audio/suna8.c
r18594r18595
99#include "includes/suna8.h"
1010
1111#define FREQ_HZ 8000
12#define NUMSAMPLES 0x1000
12#define SAMPLEN 0x1000
1313
14SAMPLES_START( suna8_sh_start )
15{
16   suna8_state *state = device.machine().driver_data<suna8_state>();
17   running_machine &machine = device.machine();
18
19   int i, len = state->memregion("samples")->bytes() * 2;   // 2 samples per byte
20   UINT8 *ROM = state->memregion("samples")->base();
21
22   state->m_samplebuf = auto_alloc_array(machine, INT16, len);
23
24   // Convert 4 bit to 16 bit samples
25   for(i = 0; i < len; i++)
26      state->m_samplebuf[i] = (INT8)(((ROM[i/2] << ((i & 1)?0:4)) & 0xf0)  ^ 0x80) * 0x100;
27
28   state->m_numsamples = len / SAMPLEN;
29}
30
31WRITE8_MEMBER(suna8_state::suna8_samples_number_w)
32{
33   m_sample = data & 0xf;
34   logerror("%s: sample number = %02X\n", machine().describe_context(), data);
35}
36
37void suna8_state::play_sample(int index)
38{
39   samples_device *samples = downcast<samples_device *>(machine().device("samples"));
40
41   if (index < m_numsamples)
42   {
43      samples->start_raw(0, &m_samplebuf[SAMPLEN * index], SAMPLEN, FREQ_HZ);
44      logerror("%s: starting sample %02X\n", machine().describe_context(), index);
45   }
46   else
47   {
48      logerror("%s: warning, invalid sample %02X\n", machine().describe_context(), index);
49   }
50}
51
1452WRITE8_MEMBER(suna8_state::suna8_play_samples_w)
1553{
54   logerror("%s: play sample = %02X\n", machine().describe_context(), data);
1655   if ( data )
1756   {
18      samples_device *samples = downcast<samples_device *>(machine().device("samples"));
1957      if ( ~data & 0x10 )
2058      {
21         samples->start_raw(0, &m_samplebuf[NUMSAMPLES * m_sample], NUMSAMPLES, FREQ_HZ);
59         play_sample(m_sample);
2260      }
2361      else if ( ~data & 0x08 )
2462      {
25         m_sample &= 3;
26         samples->start_raw(0, &m_samplebuf[NUMSAMPLES * (m_sample+7)], NUMSAMPLES, FREQ_HZ);
63         play_sample((m_sample & 3) + 7);
2764      }
65      else if ( ~data & 0x40 )   // sparkman, second sample rom
66      {
67         play_sample(m_sample + 0x10);
68      }
2869   }
2970}
3071
r18594r18595
3475   {
3576      if (( m_sample != 0 ) && ( ~data & 0x30 ))   // don't play sample zero when those bits are active
3677      {
37         samples_device *samples = downcast<samples_device *>(machine().device("samples"));
38         samples->start_raw(0, &m_samplebuf[NUMSAMPLES * m_sample], NUMSAMPLES, FREQ_HZ);
78         play_sample(m_sample);
3979      }
4080   }
4181}
42
43WRITE8_MEMBER(suna8_state::suna8_samples_number_w)
44{
45   m_sample = data & 0xf;
46}
47
48SAMPLES_START( suna8_sh_start )
49{
50   suna8_state *state = device.machine().driver_data<suna8_state>();
51   running_machine &machine = device.machine();
52
53   int i, len = state->memregion("samples")->bytes() * 2;   // 2 samples per byte
54   UINT8 *ROM = state->memregion("samples")->base();
55
56   state->m_samplebuf = auto_alloc_array(machine, INT16, len);
57
58   // Convert 4 bit to 16 bit samples
59   for(i = 0; i < len; i++)
60      state->m_samplebuf[i] = (INT8)(((ROM[i/2] << ((i & 1)?0:4)) & 0xf0)  ^ 0x80) * 0x100;
61}
trunk/src/mame/includes/suna8.h
r18594r18595
1010      m_maincpu(*this,"maincpu"),
1111      m_hardhead_ip(*this, "hardhead_ip"),
1212      m_spriteram(*this, "spriteram"),
13      m_wram(*this, "wram")
13      m_wram(*this, "wram"),
14      m_banked_paletteram(*this, "paletteram")
1415   { }
1516
1617   required_device<cpu_device> m_maincpu;
1718   optional_shared_ptr<UINT8> m_hardhead_ip;
1819   optional_shared_ptr<UINT8> m_spriteram;
1920   optional_shared_ptr<UINT8> m_wram;
21   optional_shared_ptr<UINT8> m_banked_paletteram;
2022
2123   UINT8 m_rombank;
2224   UINT8 m_rombank_latch;
2325   UINT8 m_spritebank;
24   UINT8 m_gfxbank;      // starfigh
25   UINT8 m_use_gfxbank;   // ""
2626   UINT8 m_palettebank;
2727   UINT8 m_paletteram_enab;
2828   UINT8 m_prot2;
r18594r18595
3131   UINT8 m_protection_val;
3232   UINT8 m_nmi_enable;
3333   UINT8 m_spritebank_latch;
34   UINT8 m_trash_prot;
34   UINT8 m_write_disable;
3535
36   enum GFXBANK_TYPE_T
37   {
38      GFXBANK_TYPE_SPARKMAN,
39      GFXBANK_TYPE_BRICKZN,
40      GFXBANK_TYPE_STARFIGH
41   }   m_gfxbank_type;
42   UINT8 m_gfxbank;
3643
37   int m_text_dim; /* specifies format of text layer */
44   int m_text_dim; // vertical size of the text layer (0 = no text layer)
3845
46   // samples
47   INT16 *m_samplebuf;
48   int m_sample;
49   int m_numsamples;
50
3951#if TILEMAPS
4052   tilemap_t *m_bg_tilemap;
4153   int m_tiles;
r18594r18595
4557   TILE_GET_INFO_MEMBER(get_tile_info);
4658#endif
4759
48   INT16 *m_samplebuf;
49   int m_sample;
50
5160   DECLARE_READ8_MEMBER(hardhead_protection_r);
5261   DECLARE_WRITE8_MEMBER(hardhead_protection_w);
5362   DECLARE_READ8_MEMBER(hardhead_ip_r);
r18594r18595
6574   DECLARE_WRITE8_MEMBER(brickzn_rombank_w);
6675   DECLARE_WRITE8_MEMBER(brickzn_enab_palram_w);
6776   DECLARE_WRITE8_MEMBER(brickzn_disab_palram_w);
77   DECLARE_WRITE8_MEMBER(brickzn_pcm_w);
78   DECLARE_WRITE8_MEMBER(brickzn_banked_paletteram_w);
6879
80   // hardhea2
6981   DECLARE_WRITE8_MEMBER(hardhea2_nmi_w);
7082   DECLARE_WRITE8_MEMBER(hardhea2_flipscreen_w);
7183   DECLARE_WRITE8_MEMBER(hardhea2_leds_w);
r18594r18595
8496   DECLARE_READ8_MEMBER(starfigh_cheats_r);
8597   DECLARE_WRITE8_MEMBER(starfigh_leds_w);
8698
87   DECLARE_WRITE8_MEMBER(sparkman_cmd_prot_w);
99   // sparkman
100   DECLARE_WRITE8_MEMBER(sparkman_rombank_latch_w);
101   DECLARE_WRITE8_MEMBER(sparkman_rombank_w);
102   DECLARE_WRITE8_MEMBER(sparkman_spritebank_latch_w);
103   DECLARE_WRITE8_MEMBER(sparkman_spritebank_w);
104   DECLARE_WRITE8_MEMBER(sparkman_write_disable_w);
88105   DECLARE_WRITE8_MEMBER(suna8_wram_w);
89   DECLARE_WRITE8_MEMBER(sparkman_flipscreen_w);
90   DECLARE_WRITE8_MEMBER(sparkman_leds_w);
91106   DECLARE_WRITE8_MEMBER(sparkman_coin_counter_w);
92   DECLARE_WRITE8_MEMBER(sparkman_spritebank_w);
93   DECLARE_WRITE8_MEMBER(sparkman_rombank_w);
94107   DECLARE_READ8_MEMBER(sparkman_c0a3_r);
95   DECLARE_WRITE8_MEMBER(sparkman_en_trash_w);
96   DECLARE_WRITE8_MEMBER(brickzn_pcm_w);
97108
98109   DECLARE_READ8_MEMBER(banked_paletteram_r);
99   DECLARE_WRITE8_MEMBER( brickzn_banked_paletteram_w );
100110   DECLARE_READ8_MEMBER(suna8_banked_spriteram_r);
101111   DECLARE_WRITE8_MEMBER(suna8_spriteram_w);
102112   DECLARE_WRITE8_MEMBER(suna8_banked_spriteram_w);
r18594r18595
108118   DECLARE_DRIVER_INIT(brickzn);
109119   DECLARE_DRIVER_INIT(hardhead);
110120   DECLARE_DRIVER_INIT(suna8);
121
122   void suna8_vh_start_common(int text_dim, GFXBANK_TYPE_T gfxbank_type);
123   DECLARE_VIDEO_START(suna8_textdim8);
111124   DECLARE_VIDEO_START(suna8_textdim12);
112   DECLARE_VIDEO_START(suna8_textdim8);
125   DECLARE_VIDEO_START(suna8_sparkman);
126   DECLARE_VIDEO_START(suna8_brickzn);
127   DECLARE_VIDEO_START(suna8_starfigh);
128
113129   DECLARE_MACHINE_RESET(brickzn);
114   DECLARE_VIDEO_START(suna8_textdim0);
115   DECLARE_VIDEO_START(suna8_textdim0_gfxbank);
116130   DECLARE_MACHINE_RESET(hardhea2);
117131   UINT32 screen_update_suna8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
118132   TIMER_DEVICE_CALLBACK_MEMBER(brickzn_interrupt);
119133   TIMER_DEVICE_CALLBACK_MEMBER(hardhea2_interrupt);
134
135   // samples
120136   DECLARE_WRITE8_MEMBER(suna8_play_samples_w);
121137   DECLARE_WRITE8_MEMBER(rranger_play_samples_w);
122138   DECLARE_WRITE8_MEMBER(suna8_samples_number_w);
139   void play_sample(int index);
123140};
124141
125142/*----------- defined in audio/suna8.c -----------*/
trunk/src/mame/video/suna8.c
r18594r18595
9191      attr = m_spriteram[ 2 * tile_index + 1 ];
9292   }
9393   SET_TILE_INFO_MEMBER(
94         0,
94         m_page / 8,
9595         ( (attr & 0x03) << 8 ) + code + m_tiles*0x400,
9696         (attr >> 2) & 0xf,
9797         TILE_FLIPYX( (attr >> 6) & 3 ));
r18594r18595
102102READ8_MEMBER( suna8_state::banked_paletteram_r )
103103{
104104   offset += m_palettebank * 0x200;
105   return m_generic_paletteram_8[offset];
105   return m_banked_paletteram[offset];
106106}
107107
108108READ8_MEMBER(suna8_state::suna8_banked_spriteram_r)
r18594r18595
140140   UINT16 rgb;
141141
142142   offset += m_palettebank * 0x200;
143   m_generic_paletteram_8[offset] = data;
144   rgb = (m_generic_paletteram_8[offset&~1] << 8) + m_generic_paletteram_8[offset|1];
143   m_banked_paletteram[offset] = data;
144   rgb = (m_banked_paletteram[offset&~1] << 8) + m_banked_paletteram[offset|1];
145145
146146   if (m_prot2_prev == 0x3c && m_prot2 == 0x80)
147147   {
r18594r18595
179179
180180
181181
182static void suna8_vh_start_common(running_machine &machine, int dim)
182void suna8_state::suna8_vh_start_common(int text_dim, GFXBANK_TYPE_T gfxbank_type)
183183{
184   suna8_state *state = machine.driver_data<suna8_state>();
184   m_text_dim      =   text_dim;
185   m_spritebank   =   0;
186   m_gfxbank      =   0;
187   m_gfxbank_type   =   gfxbank_type;
188   m_palettebank   =   0;
185189
186   state->m_text_dim      =   dim;
187   state->m_spritebank      =   0;
188   state->m_gfxbank      =   0;
189   state->m_use_gfxbank   =   0;
190   state->m_palettebank   =   0;
190   if (!m_text_dim)
191   {
192      m_banked_paletteram.allocate(0x200 * 2);
191193
192   if (!state->m_text_dim)
193   {
194      state->m_generic_paletteram_8.allocate(0x200 * 2);
195      state->m_spriteram.allocate(0x2000 * 2);
196      memset(state->m_spriteram,0,0x2000 * 2);   // helps debugging
194      m_spriteram.allocate(0x2000 * 2 * 2);   // 2 RAM banks, sparkman has 2 "chips"
195      memset(m_spriteram,0,0x2000 * 2 * 2);   // helps debugging
197196   }
198197
199198#if TILEMAPS
200   state->m_bg_tilemap = &machine.tilemap().create(tilemap_get_info_delegate(FUNC(suna8_state::get_tile_info),state), TILEMAP_SCAN_COLS,
199   m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(suna8_state::get_tile_info),this), TILEMAP_SCAN_COLS,
201200
202                        8, 8, 0x20*(state->m_text_dim ? 4 : 8), 0x20);
201                        8, 8, 0x20*(m_text_dim ? 4 : 16), 0x20);
203202
204   state->m_bg_tilemap->set_transparent_pen(15);
203   m_bg_tilemap->set_transparent_pen(15);
205204#endif
206205}
207206
208VIDEO_START_MEMBER(suna8_state,suna8_textdim0)   { suna8_vh_start_common(machine(),  0); }
209VIDEO_START_MEMBER(suna8_state,suna8_textdim8)   { suna8_vh_start_common(machine(),  8); }
210VIDEO_START_MEMBER(suna8_state,suna8_textdim12)   { suna8_vh_start_common(machine(), 12); }
207VIDEO_START_MEMBER(suna8_state,suna8_textdim8)         { suna8_vh_start_common(  8, GFXBANK_TYPE_SPARKMAN); }
208VIDEO_START_MEMBER(suna8_state,suna8_textdim12)         { suna8_vh_start_common( 12, GFXBANK_TYPE_SPARKMAN); }
209VIDEO_START_MEMBER(suna8_state,suna8_sparkman)         { suna8_vh_start_common(  0, GFXBANK_TYPE_SPARKMAN); }
210VIDEO_START_MEMBER(suna8_state,suna8_brickzn)         { suna8_vh_start_common(  0, GFXBANK_TYPE_BRICKZN);  }
211VIDEO_START_MEMBER(suna8_state,suna8_starfigh)         { suna8_vh_start_common(  0, GFXBANK_TYPE_STARFIGH); }
211212
212VIDEO_START_MEMBER(suna8_state,suna8_textdim0_gfxbank)   { suna8_vh_start_common(machine(),  0); m_use_gfxbank = 1; }
213
214213/***************************************************************************
215214
216215
r18594r18595
219218
220219***************************************************************************/
221220
222static void draw_normal_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect)
221static void draw_normal_sprites(running_machine &machine, bitmap_ind16 &bitmap,const rectangle &cliprect, int which)
223222{
224223   suna8_state *state = machine.driver_data<suna8_state>();
225   UINT8 *spriteram = state->m_spriteram;
224
225   UINT8 *spriteram = state->m_spriteram + which * 0x2000 * 2;
226
226227   int i;
227228   int mx = 0;   // multisprite x counter
228229
r18594r18595
290291            flipy = bank & 0x10;
291292            srcy  = (((bank & 0x80)>>4) + (bank & 0x04) + ((~bank >> 4)&2)) * 2;
292293            srcpg = ((code >> 4) & 3) + 4;
293            gfxbank = (bank & 0x3) + 4;   // brickzn: 06,a6,a2,b2->6
294            if (state->m_use_gfxbank)
294            gfxbank = (bank & 0x3);
295            switch (state->m_gfxbank_type)
295296            {
296               // starfigh: boss 2 head, should be p7 g7 x8/c y4:
297               //      67 74 88 03
298               //      67 76 ac 03
299               // starfigh: boss 2 chainguns should be p6 g7:
300               //      a8 68/a/c/e 62 23
301               //      48 68/a/c/e 62 23
302               // starfigh: player, p4 g0:
303               //      64 40 d3 20
304               // starfigh: title star, p5 g1 / p7 g0:
305               //      70 56/8/a/c 0e 01 (gfxhi=1)
306               //      6f 78/a/c/e 0f 04 ""
307               gfxbank = (bank & 0x3);
308               if (gfxbank == 3)   gfxbank += state->m_gfxbank;
297               case suna8_state::GFXBANK_TYPE_SPARKMAN:
298                  break;
299
300               case suna8_state::GFXBANK_TYPE_BRICKZN:
301                  gfxbank += 4;   // brickzn: 06,a6,a2,b2->6
302                  break;
303
304               case suna8_state::GFXBANK_TYPE_STARFIGH:
305                  // starfigh: boss 2 head, should be p7 g7 x8/c y4:
306                  //      67 74 88 03
307                  //      67 76 ac 03
308                  // starfigh: boss 2 chainguns should be p6 g7:
309                  //      a8 68/a/c/e 62 23
310                  //      48 68/a/c/e 62 23
311                  // starfigh: player, p4 g0:
312                  //      64 40 d3 20
313                  // starfigh: title star, p5 g1 / p7 g0:
314                  //      70 56/8/a/c 0e 01 (gfxhi=1)
315                  //      6f 78/a/c/e 0f 04 ""
316                  if (gfxbank == 3)
317                     gfxbank += state->m_gfxbank;
318                  break;
309319            }
310320            colorbank = (bank & 8) >> 3;
311321            break;
r18594r18595
318328            srcy  = (((bank & 0x80)>>4) + (bank & 0x04) + ((~bank >> 4)&3)) * 2;
319329            srcpg = (code >> 4) & 3;
320330            gfxbank = bank & 0x03;
321            if (state->m_use_gfxbank)
331            switch (state->m_gfxbank_type)
322332            {
323               // starfigh: boss 2 tail, p2 g7:
324               //      61 20 1b 27
325               if (gfxbank == 3)   gfxbank += state->m_gfxbank;
333               case suna8_state::GFXBANK_TYPE_STARFIGH:
334                  // starfigh: boss 2 tail, p2 g7:
335                  //      61 20 1b 27
336                  if (gfxbank == 3)
337                     gfxbank += state->m_gfxbank;
338               break;
339
340               default:
341               break;
326342            }
327343            break;
328344         }
r18594r18595
364380               sy = max_y - sy;   tile_flipy = !tile_flipy;
365381            }
366382
367            drawgfx_transpen(   bitmap,cliprect,machine.gfx[0],
383            drawgfx_transpen(   bitmap, cliprect, machine.gfx[which],
368384                     tile + (attr & 0x3)*0x100 + gfxbank,
369385                     (((attr >> 2) & 0xf) | colorbank) + 0x10 * state->m_palettebank,   // hardhea2 player2
370386                     tile_flipx, tile_flipy,
371                     sx, sy,15);
387                     sx, sy, 0xf);
372388         }
373389      }
374390
r18594r18595
384400   int max_x = machine.primary_screen->width() - 8;
385401   int max_y = machine.primary_screen->height() - 8;
386402
387   /* Earlier games only */
388   if (!state->m_text_dim)   return;
389
390403   for (i = 0x1900; i < 0x19ff; i += 4)
391404   {
392405      int srcpg, srcx,srcy, dimx,dimy, tx, ty;
r18594r18595
436449                     tile + (attr & 0x3)*0x100 + bank,
437450                     (attr >> 2) & 0xf,
438451                     flipx, flipy,
439                     sx, sy,15);
452                     sx, sy, 0xf);
440453         }
441454      }
442455
r18594r18595
462475   {
463476      int max_tiles = memregion("gfx1")->bytes() / (0x400 * 0x20);
464477
465      if (machine().input().code_pressed_once(KEYCODE_Q))   { m_page--;   machine().tilemap().mark_all_dirty();   }
466      if (machine().input().code_pressed_once(KEYCODE_W))   { m_page++;   machine().tilemap().mark_all_dirty();   }
478      if (machine().input().code_pressed_once(KEYCODE_Q))   { m_page--;      machine().tilemap().mark_all_dirty();   }
479      if (machine().input().code_pressed_once(KEYCODE_W))   { m_page++;      machine().tilemap().mark_all_dirty();   }
467480      if (machine().input().code_pressed_once(KEYCODE_E))   { m_tiles--;   machine().tilemap().mark_all_dirty();   }
468481      if (machine().input().code_pressed_once(KEYCODE_R))   { m_tiles++;   machine().tilemap().mark_all_dirty();   }
469482      if (machine().input().code_pressed_once(KEYCODE_A))   { m_trombank--;   machine().tilemap().mark_all_dirty();   }
470483      if (machine().input().code_pressed_once(KEYCODE_S))   { m_trombank++;   machine().tilemap().mark_all_dirty();   }
471484
472      m_rombank  &= 0xf;
473      m_page  &= m_text_dim ? 3 : 7;
474      m_tiles %= max_tiles;
485      m_trombank   &=   0xf;
486      m_page      &=   m_text_dim ? 3 : (machine().gfx[1] ? 15 : 7);
487      m_tiles      %=   max_tiles;
475488      if (m_tiles < 0) m_tiles += max_tiles;
476489
477490      m_bg_tilemap->set_scrollx(0, 0x100 * m_page);
r18594r18595
487500#endif
488501#endif
489502   {
490      draw_normal_sprites(machine() ,bitmap,cliprect);
491      draw_text_sprites(machine(), bitmap,cliprect);
503      // Normal sprites
504      draw_normal_sprites(machine(), bitmap,cliprect, 0);
505
506      // More normal sprites (second sprite "chip" in sparkman)
507      if (machine().gfx[1])
508         draw_normal_sprites(machine(), bitmap,cliprect, 1);
509
510      // Text sprites (earlier games only)
511      if (m_text_dim)
512         draw_text_sprites(machine(), bitmap,cliprect);
492513   }
493514   return 0;
494515}
trunk/src/mame/drivers/suna8.c
r18594r18595
1414Year + Game         Game     PCB         Epoxy CPU  Samples  Notes
1515--------------------------------------------------------------------------------------
161688  Hard Head       KRB-14   60138-0083  S562008    Yes      Encryption + Protection
1788  Rough Ranger    K030087  ?           S562008    Yes
1889  Spark Man       KRB-16   60136-081   T568009    Yes      Not Working (Protection)
1788  Rough Ranger    K030087  ?           S562008    Yes      Not Encrypted
1889  Spark Man       KRB-16   60136-081   T568009    Yes      Encryption + Protection
191990  Star Fighter    KRB-17   60484-0082  T568009    Yes      Encryption + Protection
202091  Hard Head 2     ?        ?           T568009    -        Encryption + Protection
212192  Brick Zone      ?        ?           Yes        -        Encryption + Protection
r18594r18595
2323
2424Notes:
2525
26- sparkman: to get past the roms test screen put a watchpoint at ca40.
27  When hit, clear ca41. Most of the garbage you'll see is probably due
28  to imperfect graphics emulation (e.g. gfx banking) than protection.
29
3026- hardhea2: in test mode press P1&P2 button 2 to see a picture of each level
3127
3228***************************************************************************/
r18594r18595
402398
403399   /* Address lines scrambling */
404400   memcpy(decrypt, RAM, size);
405   for (i = 0; i < 0x8000; i++)
401   for (i = 0; i < 0x50000; i++)
406402   {
407      static const UINT8 swaptable[8] =
403      static const UINT8 swaptable[0x50] =
408404      {
409         1,1,1,1,0,0,1,1
405         1,1,1,1,   0,0,1,1,   0,0,0,0,   0,0,0,0,   // 8000-ffff not used
406         0,0,0,0,   0,0,0,0,   0,0,0,0,   0,0,0,0,
407         0,0,0,0,   0,0,0,0,   0,0,0,0,   0,0,0,0,
408         0,0,0,0,   0,0,0,0,   0,0,0,0,   0,0,0,0,
409         0,0,0,0,   0,0,0,0,   1,1,0,0,   0,0,0,0      // bank $0e, $8xxx, $9xxx (hand in title screen)
410410      };
411411      int addr = i;
412412
413      if (swaptable[(i & 0x7000) >> 12])
414         addr = BITSWAP16(addr, 15,14,13,12,11,10,9,7,8,6,5,4,3,2,1,0);
413      if (swaptable[(i & 0xff000) >> 12])
414         addr = BITSWAP24(addr, 23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,7,8,6,5,4,3,2,1,0);
415415
416416      RAM[i] = decrypt[addr];
417417   }
r18594r18595
449449         RAM[i] = BITSWAP8(RAM[i], 5,6,7,4,3,2,1,0) ^ 0x44;
450450   }
451451
452   // !!!!!! PATCHES !!!!!!
453
454   // c083 bit 7 protection
455   decrypt[0x0ee0] = 0x00;
456   decrypt[0x0ee1] = 0x00;
457   decrypt[0x0ee2] = 0x00;
458
459   // c083 bit 7 protection
460   decrypt[0x1ac3] = 0x00;
461   decrypt[0x1ac4] = 0x00;
462   decrypt[0x1ac5] = 0x00;
463
452464   machine().root_device().membank("bank1")->configure_entries(0, 16, machine().root_device().memregion("maincpu")->base() + 0x10000, 0x4000);
453465}
454466
r18594r18595
618630   AM_RANGE(0xc280, 0xc280) AM_READ_PORT("DSW1")            // DSW 1
619631   AM_RANGE(0xc2c0, 0xc2c0) AM_READ_PORT("DSW2")            // DSW 2
620632   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram")   // Palette
621   AM_RANGE(0xc800, 0xdfff) AM_RAM                        // RAM
622   AM_RANGE(0xe000, 0xffff) AM_RAM_WRITE(suna8_spriteram_w) AM_SHARE("spriteram")   // Sprites
633   AM_RANGE(0xc800, 0xdfff) AM_RAM                                                      // Work RAM
634   AM_RANGE(0xe000, 0xffff) AM_RAM_WRITE(suna8_spriteram_w) AM_SHARE("spriteram")                  // Sprites
623635ADDRESS_MAP_END
624636
625637
r18594r18595
792804   // c144 reads?
793805   // c14a reads?
794806
795   AM_RANGE(0xc600, 0xc7ff) AM_READWRITE(banked_paletteram_r, brickzn_banked_paletteram_w)   // Palette (Banked)
796   AM_RANGE(0xc800, 0xdfff) AM_RAM   AM_SHARE("wram")                        // RAM
807   AM_RANGE(0xc600, 0xc7ff) AM_READWRITE(banked_paletteram_r, brickzn_banked_paletteram_w) AM_SHARE("paletteram")      // Palette (Banked)
808   AM_RANGE(0xc800, 0xdfff) AM_RAM   AM_SHARE("wram")                                 // Work RAM
797809   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)   // Sprites (Banked)
798810ADDRESS_MAP_END
799811
r18594r18595
912924   AM_RANGE(0xc533, 0xc533) AM_WRITE(hardhea2_rambank_0_w )
913925   // Protection ***
914926
915   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram"   )   // Palette (Banked??)
916   AM_RANGE(0xc800, 0xdfff) AM_RAMBANK("bank2")                     // RAM (Banked?)
917   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)   // Sprites (Banked)
927   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram")   // Palette
928   AM_RANGE(0xc800, 0xdfff) AM_RAMBANK("bank2")                                          // Work RAM (Banked)
929   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)         // Sprites (Banked)
918930ADDRESS_MAP_END
919931
920932
r18594r18595
923935***************************************************************************/
924936
925937/*
926  C280-C2FF:  7--- ----
927              -6-- ----   Disable Sound Latch Writes?
928              --54 ----
938  C280-C2FF:  76-- ----
939              --5- ----   Disable Sound Latch Writes
940              ---4 ----
929941              ---- 3210   ROM Bank (Latched)
930942*/
931943WRITE8_MEMBER(suna8_state::starfigh_rombank_latch_w)
r18594r18595
10161028   AM_RANGE(0xc500, 0xc500) AM_WRITE(starfigh_sound_latch_w      )   // To Sound CPU (can be disabled)
10171029//  (c522 + R & 0x1f) write?
10181030
1019   AM_RANGE(0xc600, 0xc7ff) AM_READWRITE(banked_paletteram_r, paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram"   )   // Palette (Banked??)
1020   AM_RANGE(0xc800, 0xdfff) AM_RAM                              // RAM
1021   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)   // Sprites (Banked)
1031   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram")   // Palette
1032   AM_RANGE(0xc800, 0xdfff) AM_RAM                                                      // Work RAM
1033   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)         // Sprites (Banked)
10221034ADDRESS_MAP_END
10231035
10241036
r18594r18595
10271039***************************************************************************/
10281040
10291041/*
1030Thrash protection code snippet:
1031
10320B48: 3E 81         ld   a,$81
10330B4A: 32 BF C3      ld   ($C3BF),a
10340B4D: 21 10 D0      ld   hl,$C808
10350B50: 11 11 D0      ld   de,$C809
10360B53: ED 5F         ld   a,r  ;check this, pretty pointless
10370B55: 77            ld   (hl),a
10380B56: 01 80 00      ld   bc,$0080
10390B59: ED B0         ldir
10400B5B: 3E 18         ld   a,$18
10410B5D: 32 C4 C3      ld   ($C3C4),a
10420B60: 21 67 13      ld   hl,$0B67
10430B63: 22 00 D0      ld   ($C800),hl
10440B66: C9            ret
1045
1042    C200: 765432--
1043          ------1-   Sprite RAM Bank (Inverted by Sprite Bank Latch)
1044          -------0   Sprite "chip"   ""
10461045*/
1046WRITE8_MEMBER(suna8_state::sparkman_spritebank_w)
1047{
1048   m_spritebank = ((data >> 1) & 0x01) | ((data << 1) & 0x02);
1049   if ((m_spritebank_latch >> 1) & 0x01)
1050      m_spritebank ^= 0x03;
10471051
1048/* This is a command-based protection. */
1049WRITE8_MEMBER(suna8_state::sparkman_cmd_prot_w)
1050{
1051   switch(data)
1052   {
1053      case 0xa6: m_nmi_enable = 1; break;
1054      case 0x00: m_nmi_enable = 0; break;
1055      case 0x18: m_trash_prot = 0; break;
1056      case 0xce: m_trash_prot = 0; break;
1057      case 0x81: m_trash_prot = 1; break;
1058      case 0x99: m_trash_prot = 1; break;
1059      case 0x54: m_spritebank = 1; break;
1060      default: logerror("CPU #0 - PC %04X: unknown protection command: %02X\n",space.device().safe_pc(),data);
1061   }
1052   logerror("CPU #0 - PC %04X: spritebank = %02X (%X)\n",space.device().safe_pc(),data,m_spritebank);
10621053}
10631054
1064WRITE8_MEMBER(suna8_state::suna8_wram_w)
1055/*
1056    C280:  76-- ----
1057           --5- ----   Disable Sound Latch Writes
1058           ---4 ----
1059           ---- 3210   ROM Bank (Latched)
1060*/
1061WRITE8_MEMBER(suna8_state::sparkman_rombank_latch_w)
10651062{
1066   if (!m_trash_prot)
1067      m_wram[offset] = data;
1063   m_rombank_latch = data;
1064   logerror("CPU #0 - PC %04X: rom bank latch %04X = %02X\n",space.device().safe_pc(), 0xc280 + offset, data);
10681065}
10691066
10701067/*
1071    7654 321-
1072    ---- ---0   Flip Screen
1068    C300: 76-- ----
1069          --5- ----   Invert Sprite Chip and Bank
1070          ---4 ----   Almost Always On?
1071          ---- 321-
1072          ---- ---0   Flip Screen
10731073*/
1074WRITE8_MEMBER(suna8_state::sparkman_flipscreen_w)
1074WRITE8_MEMBER(suna8_state::sparkman_spritebank_latch_w)
10751075{
10761076   flip_screen_set(data & 0x01);
1077   //if (data & ~0x01)     logerror("CPU #0 - PC %04X: unknown flipscreen bits: %02X\n",space.device().safe_pc(),data);
1077   m_spritebank_latch   =   (data >> 4) & 0x03;
1078   logerror("CPU #0 - PC %04X: spritebank latch = %02X\n",space.device().safe_pc(),data);
10781079}
10791080
1080WRITE8_MEMBER(suna8_state::sparkman_leds_w)
1081/*
1082    C380: 76------
1083          --5-----   NMI Enable
1084          ---4321-
1085          -------0   Work RAM Writes Disable
1086*/
1087WRITE8_MEMBER(suna8_state::sparkman_write_disable_w)
10811088{
1082   set_led_status(machine(), 0, data & 0x01);
1083   set_led_status(machine(), 1, data & 0x02);
1084   //if (data & ~0x03) logerror("CPU #0 - PC %04X: unknown leds bits: %02X\n",space.device().safe_pc(),data);
1089   m_write_disable      =   (data >> 0) & 1;   // bit 0 = disable RAM writes. See code at b48, d4d
1090   m_nmi_enable      =   (data >> 5) & 1;   // see code at 66
1091   if (data & ~0x21)   logerror("CPU #0 - PC %04X: unknown spritebank bits: %02X\n",space.device().safe_pc(),data);
10851092}
10861093
1087WRITE8_MEMBER(suna8_state::sparkman_coin_counter_w)
1094// RAM writes can be disabled
1095WRITE8_MEMBER(suna8_state::suna8_wram_w)
10881096{
1089   coin_counter_w(machine(), 0, data & 0x01);
1097   if (!m_write_disable)
1098      m_wram[offset] = data;
10901099}
10911100
10921101/*
1093    7654 32--
1094    ---- --1-   Sprite RAM Bank
1095    ---- ---0   Sprite RAM Bank?
1096*/
1097WRITE8_MEMBER(suna8_state::sparkman_spritebank_w)
1098{
1099   if(data == 0xf7) //???
1100      m_spritebank = 0;
1101   else
1102      m_spritebank = (data) & 1;
1103   //if (data & ~0x02)     logerror("CPU #0 - PC %04X: unknown spritebank bits: %02X\n",space.device().safe_pc(),data);
1104}
1102  C400:  7654 32--
1103         ---- --1-   Start 2 Led
1104         ---- ---0   Start 1 Led
11051105
1106/*
1107    7654 ----
1108    ---- 3210   ROM Bank
1106  Writes to C400 also set ROM bank from latch
11091107*/
11101108WRITE8_MEMBER(suna8_state::sparkman_rombank_w)
11111109{
1112   int bank = data & 0x0f;
1110   set_led_status(machine(), 0,    data & 0x01);
1111   set_led_status(machine(), 1,    data & 0x02);
11131112
1114   //if (data & ~0x0f)     logerror("CPU #0 - PC %04X: unknown rom bank bits: %02X\n",space.device().safe_pc(),data);
1113   if (data & ~0x03)   logerror("CPU #0 - PC %04X: unknown leds bits: %02X\n",space.device().safe_pc(),data);
11151114
1115   // ROM Bank:
1116
1117   int bank = m_rombank_latch & 0x0f;
1118
11161119   membank("bank1")->set_entry(bank);
1117   m_rombank = data;
1120
1121   m_rombank = m_rombank_latch;
1122   logerror("CPU #0 - PC %04X: rom bank = %02X\n",space.device().safe_pc(), m_rombank);
11181123}
11191124
1120READ8_MEMBER(suna8_state::sparkman_c0a3_r)
1125/*
1126    C480: 7654321-
1127          -------0   Coin Counter
1128*/
1129WRITE8_MEMBER(suna8_state::sparkman_coin_counter_w)
11211130{
1122   return (machine().primary_screen->frame_number() & 1) ? 0x80 : 0;
1131   coin_counter_w(machine(), 0, data & 0x01);
11231132}
11241133
1125#if 0
1126WRITE8_MEMBER(suna8_state::sparkman_en_trash_w)
1134// To do: implement this, affects the duration of copyright screen
1135READ8_MEMBER(suna8_state::sparkman_c0a3_r)
11271136{
1128   m_trash_prot = 1;
1137   return (machine().primary_screen->frame_number() & 1) ? 0x80 : 0;
11291138}
1130#endif
11311139
11321140static ADDRESS_MAP_START( sparkman_map, AS_PROGRAM, 8, suna8_state )
1133   AM_RANGE(0x0000, 0x7fff) AM_ROM                           // ROM
1134   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")                     // Banked ROM
1135   AM_RANGE(0xc000, 0xc000) AM_READ_PORT("P1")                  // P1 (Inputs)
1136   AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P2")                  // P2
1137   AM_RANGE(0xc002, 0xc002) AM_READ_PORT("DSW1")               // DSW 1
1138   AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW2")               // DSW 2
1139   AM_RANGE(0xc080, 0xc080) AM_READ_PORT("BUTTONS")            // Buttons
1140   AM_RANGE(0xc0a3, 0xc0a3) AM_READ(sparkman_c0a3_r         )   // ???
1141   AM_RANGE(0xc200, 0xc200) AM_WRITE(sparkman_spritebank_w      )   // Sprite RAM Bank
1142   AM_RANGE(0xc280, 0xc280) AM_WRITE(sparkman_rombank_w      )   // ROM Bank (?mirrored up to c2ff?)
1143   AM_RANGE(0xc300, 0xc300) AM_WRITE(sparkman_flipscreen_w      )   // Flip Screen
1144   AM_RANGE(0xc380, 0xc3ff) AM_WRITE(sparkman_cmd_prot_w      )   // Protection
1145   AM_RANGE(0xc400, 0xc400) AM_WRITE(sparkman_leds_w         )   // Leds
1146   AM_RANGE(0xc480, 0xc480) AM_WRITE(sparkman_coin_counter_w   )   // Coin Counter
1147   AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_byte_w            )   // To Sound CPU
1148   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram"   )   // Palette (Banked??)
1149   AM_RANGE(0xc800, 0xdfff) AM_RAM_WRITE(suna8_wram_w) AM_SHARE("wram")                        // RAM
1141   AM_RANGE(0x0000, 0x7fff) AM_ROM                              // ROM
1142   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")                  // Banked ROM
1143
1144   AM_RANGE(0xc000, 0xc000) AM_READ_PORT("P1")                     // P1 (Inputs)
1145   AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P2")                     // P2
1146   AM_RANGE(0xc002, 0xc002) AM_READ_PORT("DSW1")                  // DSW 1
1147   AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW2")                  // DSW 2
1148   AM_RANGE(0xc080, 0xc080) AM_READ_PORT("BUTTONS")               // Buttons
1149   AM_RANGE(0xc0a3, 0xc0a3) AM_READ(sparkman_c0a3_r            )   // ???
1150
1151   AM_RANGE(0xc200, 0xc27f) AM_WRITE(sparkman_spritebank_w         )   // Sprite RAM Bank
1152   AM_RANGE(0xc280, 0xc2ff) AM_WRITE(sparkman_rombank_latch_w      )   // ROM Bank Latch
1153   AM_RANGE(0xc300, 0xc37f) AM_WRITE(sparkman_spritebank_latch_w   )   // Sprite RAM Bank Latch (Invert) + Flip Screen
1154   AM_RANGE(0xc380, 0xc3ff) AM_WRITE(sparkman_write_disable_w      )   // Work RAM Writes Disable + NMI Enable
1155   AM_RANGE(0xc400, 0xc47f) AM_WRITE(sparkman_rombank_w         )   // ROM Bank + Leds
1156   AM_RANGE(0xc480, 0xc480) AM_WRITE(sparkman_coin_counter_w      )   // Coin Counter
1157   AM_RANGE(0xc500, 0xc57f) AM_WRITE(starfigh_sound_latch_w      )   // To Sound CPU (can be disabled)
1158
1159   AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram")   // Palette
1160   AM_RANGE(0xc800, 0xdfff) AM_RAM_WRITE(suna8_wram_w) AM_SHARE("wram")                  // RAM
11501161   AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w)   // Sprites (Banked)
11511162ADDRESS_MAP_END
11521163
r18594r18595
17011712   PORT_DIPSETTING(    0x00, "5" )
17021713
17031714   PORT_START("BUTTONS") // Buttons - $c080
1704   PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
1705   PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
1706   PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1715   PORT_BIT(  0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)   // P1 bomb
1716   PORT_BIT(  0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   // P2 bomb
1717   PORT_BIT(  0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )               // ?
17071718   PORT_BIT(  0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
17081719   PORT_BIT(  0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
17091720   PORT_BIT(  0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
17101721   PORT_BIT(  0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1711   PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1722   PORT_BIT(  0x80, IP_ACTIVE_LOW, IPT_SPECIAL )               // protection
17121723
17131724INPUT_PORTS_END
17141725
r18594r18595
17371748   GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0, 16*2 ) // [0] Sprites (brickzn has 2 palette RAMs)
17381749GFXDECODE_END
17391750
1751static GFXDECODE_START( suna8_x2 )
1752   GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0, 16*2 ) // [0] Sprites
1753   GFXDECODE_ENTRY( "gfx2", 0, layout_8x8x4, 0, 16*2 ) // [1] Sprites (sparkman has 2 sprite "chips")
1754GFXDECODE_END
17401755
17411756
1757
17421758/***************************************************************************
17431759
17441760
r18594r18595
19311947   MCFG_GFXDECODE(suna8)
19321948   MCFG_PALETTE_LENGTH(256 * 2)   // 2 x Palette RAM
19331949
1934   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim0)
1950   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_brickzn)
19351951
19361952   /* sound hardware */
19371953   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r18594r18595
20312047   MCFG_GFXDECODE(suna8)
20322048   MCFG_PALETTE_LENGTH(256)
20332049
2034   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim0_gfxbank)
2050   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_starfigh)
20352051
20362052   /* sound hardware */
20372053   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r18594r18595
20752091   MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0+16, 256-16-1)
20762092   MCFG_SCREEN_UPDATE_DRIVER(suna8_state, screen_update_suna8)
20772093
2078   MCFG_GFXDECODE(suna8)
2094   MCFG_GFXDECODE(suna8_x2)   // 2 sprite "chips"
20792095   MCFG_PALETTE_LENGTH(512)
20802096
2081   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_textdim0)
2097   MCFG_VIDEO_START_OVERRIDE(suna8_state,suna8_sparkman)
20822098
20832099   /* sound hardware */
20842100   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r18594r18595
25852601
25862602ROM_START( sparkman )
25872603   ROM_REGION( 0x50000, "maincpu", 0 )      /* Main Z80 Code */
2588   ROM_LOAD( "sparkman.e7", 0x00000, 0x08000, CRC(d89c5780) SHA1(177f0ae21c00575a7eb078e86f3a790fc95211e4) )   /* "SPARK MAN MAIN PROGRAM 1989,8,12 K.H.T (SUNA ELECTRPNICS) V 2.0 SOULE KOREA" */
2589   ROM_LOAD( "sparkman.g7", 0x10000, 0x10000, CRC(48b4a31e) SHA1(771d1f1a2ce950ce2b661a4081471e98a7a7d53e) )
2590   ROM_LOAD( "sparkman.g8", 0x20000, 0x10000, CRC(b8a4a557) SHA1(10251b49fb44fb1e7c71fde8fe9544df29d27346) )
2591   ROM_LOAD( "sparkman.i7", 0x30000, 0x10000, CRC(f5f38e1f) SHA1(25f0abbac1298fad1f8e7202db05e48c3598bc88) )
2592   ROM_LOAD( "sparkman.i8", 0x40000, 0x10000,  CRC(e54eea25) SHA1(b8ea884ee1a24953b6406f2d1edf103700f542d2) )
2604   ROM_LOAD( "sparkman.e7", 0x00000, 0x08000, CRC(d89c5780) SHA1(177f0ae21c00575a7eb078e86f3a790fc95211e4) )   // "SPARK MAN MAIN PROGRAM 1989,8,12 K.H.T (SUNA ELECTRPNICS) V 2.0 SOULE KOREA"
2605   ROM_LOAD( "10.g7",       0x10000, 0x10000, CRC(48b4a31e) SHA1(771d1f1a2ce950ce2b661a4081471e98a7a7d53e) )
2606   ROM_LOAD( "12.g8",       0x20000, 0x10000, CRC(b8a4a557) SHA1(10251b49fb44fb1e7c71fde8fe9544df29d27346) )
2607   ROM_LOAD( "11.i7",       0x30000, 0x10000, CRC(f5f38e1f) SHA1(25f0abbac1298fad1f8e7202db05e48c3598bc88) )
2608   ROM_LOAD( "13.i8",       0x40000, 0x10000, CRC(e54eea25) SHA1(b8ea884ee1a24953b6406f2d1edf103700f542d2) )
25932609
25942610   ROM_REGION( 0x10000, "audiocpu", 0 )      /* Music Z80 Code */
2595   ROM_LOAD( "sparkman.h11", 0x00000, 0x08000, CRC(06822f3d) SHA1(d30592cecbcd4dbf67e5a8d9c151d60b3232a54d) )
2611   ROM_LOAD( "14.h11", 0x00000, 0x08000, CRC(06822f3d) SHA1(d30592cecbcd4dbf67e5a8d9c151d60b3232a54d) )
25962612
2597   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )   /* Sprites */
2598   ROM_LOAD( "sparkman.u4", 0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) )
2599   ROM_LOAD( "sparkman.t1", 0x10000, 0x10000, CRC(2e474203) SHA1(a407126d92e529568129d5246f89d51330ff5d32) )
2600   ROM_LOAD( "sparkman.r1", 0x20000, 0x08000, CRC(7115cfe7) SHA1(05fde6279a1edc97e79b1ff3f72b2da400a6a409) )
2601   ROM_LOAD( "sparkman.u1", 0x30000, 0x10000, CRC(39dbd414) SHA1(03fe938ed1191329b6a2f7ed54c6ef69273998df) )
2613   ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT | ROMREGION_ERASEFF)   /* Sprites (0) */
2614   // bitplanes 0-1
2615   ROM_LOAD( "p3.u1", 0x00000, 0x10000, CRC(39dbd414) SHA1(03fe938ed1191329b6a2f7ed54c6ef69273998df) )   // banks 00-03
2616   ROM_LOAD( "p2.t1", 0x10000, 0x10000, CRC(2e474203) SHA1(a407126d92e529568129d5246f89d51330ff5d32) )   // banks 04-07
2617   ROM_FILL(          0x20000, 0x10000, 0xFF )
2618   ROM_FILL(          0x30000, 0x10000, 0xFF )
2619   ROM_LOAD( "p1.r1", 0x40000, 0x08000, CRC(7115cfe7) SHA1(05fde6279a1edc97e79b1ff3f72b2da400a6a409) )   // banks 10,11
2620   ROM_FILL(          0x50000, 0x10000, 0xFF )
2621   ROM_FILL(          0x60000, 0x10000, 0xFF )
2622   ROM_FILL(          0x70000, 0x10000, 0xFF )
2623   // bitplanes 2-3
2624   ROM_LOAD( "p6.u2", 0x80000, 0x10000, CRC(e6551db9) SHA1(bed2a9ba72895f3ba876b4e0a41c33ea8a3c5af2) )
2625   ROM_LOAD( "p5.t2", 0x90000, 0x10000, CRC(0df5da2a) SHA1(abbd5ba22b30f17d203ecece7afafa0cbe78352c) )
2626   ROM_FILL(          0xa0000, 0x10000, 0xFF )
2627   ROM_FILL(          0xb0000, 0x10000, 0xFF )
2628   ROM_LOAD( "p4.r2", 0xc0000, 0x08000, CRC(6904bde2) SHA1(c426fa0c29b1874c729b981467f219c422f863aa) )
2629   ROM_FILL(          0xd0000, 0x10000, 0xFF )
2630   ROM_FILL(          0xe0000, 0x10000, 0xFF )
2631   ROM_FILL(          0xf0000, 0x10000, 0xFF )
26022632
2603   ROM_LOAD( "sparkman.u6", 0x40000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
2604   ROM_LOAD( "sparkman.t2", 0x50000, 0x10000, CRC(0df5da2a) SHA1(abbd5ba22b30f17d203ecece7afafa0cbe78352c) )
2605   ROM_LOAD( "sparkman.r2", 0x60000, 0x08000, CRC(6904bde2) SHA1(c426fa0c29b1874c729b981467f219c422f863aa) )
2606   ROM_LOAD( "sparkman.u2", 0x70000, 0x10000, CRC(e6551db9) SHA1(bed2a9ba72895f3ba876b4e0a41c33ea8a3c5af2) )
2633   ROM_REGION( 0x100000, "gfx2", ROMREGION_INVERT | ROMREGION_ERASEFF)   /* Sprites (1) */
2634   // bitplanes 0-1
2635   ROM_LOAD( "p7.u4",         0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) )   // banks 00-03 (alt gfx)
2636   ROM_COPY( "gfx2", 0x00000, 0x10000, 0x10000 )
2637   ROM_COPY( "gfx2", 0x00000, 0x20000, 0x10000 )
2638   ROM_COPY( "gfx2", 0x00000, 0x30000, 0x10000 )
2639   ROM_COPY( "gfx2", 0x00000, 0x40000, 0x10000 )
2640   ROM_COPY( "gfx2", 0x00000, 0x50000, 0x10000 )
2641   ROM_COPY( "gfx2", 0x00000, 0x60000, 0x10000 )
2642   ROM_COPY( "gfx2", 0x00000, 0x70000, 0x10000 )
2643   // bitplanes 2-3
2644   ROM_LOAD( "p8.u6",         0x80000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
2645   ROM_COPY( "gfx2", 0x80000, 0x90000, 0x10000 )
2646   ROM_COPY( "gfx2", 0x80000, 0xa0000, 0x10000 )
2647   ROM_COPY( "gfx2", 0x80000, 0xb0000, 0x10000 )
2648   ROM_COPY( "gfx2", 0x80000, 0xc0000, 0x10000 )
2649   ROM_COPY( "gfx2", 0x80000, 0xd0000, 0x10000 )
2650   ROM_COPY( "gfx2", 0x80000, 0xe0000, 0x10000 )
2651   ROM_COPY( "gfx2", 0x80000, 0xf0000, 0x10000 )
26072652
2608   ROM_REGION( 0x8000, "samples", 0 )      /* Samples */
2609   ROM_LOAD( "sparkman.b10", 0x0000, 0x8000, CRC(46c7d4d8) SHA1(99f38cc044390ee4646498667ad2bf536ce91e8f) )
2610
2611   ROM_REGION( 0x8000, "samples2", 0 )      /* Samples */
2612   ROM_LOAD( "sprkman.b11", 0x0000, 0x8000, CRC(d6823a62) SHA1(f8ce748aa7bdc9c95799dd111fd872717e46d416) )
2653   ROM_REGION( 0x8000 * 2, "samples", 0 )      /* Samples */
2654   ROM_LOAD( "15.b10", 0x0000, 0x8000, CRC(46c7d4d8) SHA1(99f38cc044390ee4646498667ad2bf536ce91e8f) )
2655   ROM_LOAD( "16.b11", 0x8000, 0x8000, CRC(d6823a62) SHA1(f8ce748aa7bdc9c95799dd111fd872717e46d416) )
26132656ROM_END
26142657
2615
26162658ROM_START( sparkmana )
26172659   ROM_REGION( 0x50000, "maincpu", 0 )      /* Main Z80 Code */
2618   ROM_LOAD( "p9.7f",       0x00000, 0x08000, CRC(b114cb2b) SHA1(4f79bf65ef17147004f7a8d1d6a58dac0293cdc7) ) // sparkman.e7 99.972534% (9 bytes differ, version string is the same)
2619   ROM_LOAD( "sparkman.g7", 0x10000, 0x10000, CRC(48b4a31e) SHA1(771d1f1a2ce950ce2b661a4081471e98a7a7d53e) )
2620   ROM_LOAD( "sparkman.g8", 0x20000, 0x10000, CRC(b8a4a557) SHA1(10251b49fb44fb1e7c71fde8fe9544df29d27346) )
2621   ROM_LOAD( "sparkman.i7", 0x30000, 0x10000, CRC(f5f38e1f) SHA1(25f0abbac1298fad1f8e7202db05e48c3598bc88) )
2622   ROM_LOAD( "sparkman.i8", 0x40000, 0x10000,  CRC(e54eea25) SHA1(b8ea884ee1a24953b6406f2d1edf103700f542d2) )
2660   ROM_LOAD( "p9.7f", 0x00000, 0x08000, CRC(b114cb2b) SHA1(4f79bf65ef17147004f7a8d1d6a58dac0293cdc7) ) // sparkman.e7 99.972534% (9 bytes differ, version string is the same)
2661   ROM_LOAD( "10.g7", 0x10000, 0x10000, CRC(48b4a31e) SHA1(771d1f1a2ce950ce2b661a4081471e98a7a7d53e) )
2662   ROM_LOAD( "12.g8", 0x20000, 0x10000, CRC(b8a4a557) SHA1(10251b49fb44fb1e7c71fde8fe9544df29d27346) )
2663   ROM_LOAD( "11.i7", 0x30000, 0x10000, CRC(f5f38e1f) SHA1(25f0abbac1298fad1f8e7202db05e48c3598bc88) )
2664   ROM_LOAD( "13.i8", 0x40000, 0x10000, CRC(e54eea25) SHA1(b8ea884ee1a24953b6406f2d1edf103700f542d2) )
26232665
26242666   ROM_REGION( 0x10000, "audiocpu", 0 )      /* Music Z80 Code */
2625   ROM_LOAD( "sparkman.h11", 0x00000, 0x08000, CRC(06822f3d) SHA1(d30592cecbcd4dbf67e5a8d9c151d60b3232a54d) )
2667   ROM_LOAD( "14.h11", 0x00000, 0x08000, CRC(06822f3d) SHA1(d30592cecbcd4dbf67e5a8d9c151d60b3232a54d) )
26262668
2627   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT )   /* Sprites */
2628   ROM_LOAD( "sparkman.u4", 0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) )
2629   ROM_LOAD( "sparkman.t1", 0x10000, 0x10000, CRC(2e474203) SHA1(a407126d92e529568129d5246f89d51330ff5d32) )
2630   ROM_LOAD( "sparkman.r1", 0x20000, 0x08000, CRC(7115cfe7) SHA1(05fde6279a1edc97e79b1ff3f72b2da400a6a409) )
2631   ROM_LOAD( "sparkman.u1", 0x30000, 0x10000, CRC(39dbd414) SHA1(03fe938ed1191329b6a2f7ed54c6ef69273998df) )
2669   ROM_REGION( 0x100000, "gfx1", ROMREGION_INVERT | ROMREGION_ERASEFF)   /* Sprites (0) */
2670   // bitplanes 0-1
2671   ROM_LOAD( "p3.u1", 0x00000, 0x10000, CRC(39dbd414) SHA1(03fe938ed1191329b6a2f7ed54c6ef69273998df) )   // banks 00-03
2672   ROM_LOAD( "p2.t1", 0x10000, 0x10000, CRC(2e474203) SHA1(a407126d92e529568129d5246f89d51330ff5d32) )   // banks 04-07
2673   ROM_FILL(          0x20000, 0x10000, 0xFF )
2674   ROM_FILL(          0x30000, 0x10000, 0xFF )
2675   ROM_LOAD( "p1.r1", 0x40000, 0x08000, CRC(7115cfe7) SHA1(05fde6279a1edc97e79b1ff3f72b2da400a6a409) )   // banks 10,11
2676   ROM_FILL(          0x50000, 0x10000, 0xFF )
2677   ROM_FILL(          0x60000, 0x10000, 0xFF )
2678   ROM_FILL(          0x70000, 0x10000, 0xFF )
2679   // bitplanes 2-3
2680   ROM_LOAD( "p6.u2", 0x80000, 0x10000, CRC(e6551db9) SHA1(bed2a9ba72895f3ba876b4e0a41c33ea8a3c5af2) )
2681   ROM_LOAD( "p5.t2", 0x90000, 0x10000, CRC(0df5da2a) SHA1(abbd5ba22b30f17d203ecece7afafa0cbe78352c) )
2682   ROM_FILL(          0xa0000, 0x10000, 0xFF )
2683   ROM_FILL(          0xb0000, 0x10000, 0xFF )
2684   ROM_LOAD( "p4.r2", 0xc0000, 0x08000, CRC(6904bde2) SHA1(c426fa0c29b1874c729b981467f219c422f863aa) )
2685   ROM_FILL(          0xd0000, 0x10000, 0xFF )
2686   ROM_FILL(          0xe0000, 0x10000, 0xFF )
2687   ROM_FILL(          0xf0000, 0x10000, 0xFF )
26322688
2633   ROM_LOAD( "sparkman.u6", 0x40000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
2634   ROM_LOAD( "sparkman.t2", 0x50000, 0x10000, CRC(0df5da2a) SHA1(abbd5ba22b30f17d203ecece7afafa0cbe78352c) )
2635   ROM_LOAD( "sparkman.r2", 0x60000, 0x08000, CRC(6904bde2) SHA1(c426fa0c29b1874c729b981467f219c422f863aa) )
2636   ROM_LOAD( "sparkman.u2", 0x70000, 0x10000, CRC(e6551db9) SHA1(bed2a9ba72895f3ba876b4e0a41c33ea8a3c5af2) )
2689   ROM_REGION( 0x100000, "gfx2", ROMREGION_INVERT | ROMREGION_ERASEFF)   /* Sprites (1) */
2690   // bitplanes 0-1
2691   ROM_LOAD( "p7.u4",         0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) )   // banks 00-03 (alt gfx)
2692   ROM_COPY( "gfx2", 0x00000, 0x10000, 0x10000 )
2693   ROM_COPY( "gfx2", 0x00000, 0x20000, 0x10000 )
2694   ROM_COPY( "gfx2", 0x00000, 0x30000, 0x10000 )
2695   ROM_COPY( "gfx2", 0x00000, 0x40000, 0x10000 )
2696   ROM_COPY( "gfx2", 0x00000, 0x50000, 0x10000 )
2697   ROM_COPY( "gfx2", 0x00000, 0x60000, 0x10000 )
2698   ROM_COPY( "gfx2", 0x00000, 0x70000, 0x10000 )
2699   // bitplanes 2-3
2700   ROM_LOAD( "p8.u6",         0x80000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
2701   ROM_COPY( "gfx2", 0x80000, 0x90000, 0x10000 )
2702   ROM_COPY( "gfx2", 0x80000, 0xa0000, 0x10000 )
2703   ROM_COPY( "gfx2", 0x80000, 0xb0000, 0x10000 )
2704   ROM_COPY( "gfx2", 0x80000, 0xc0000, 0x10000 )
2705   ROM_COPY( "gfx2", 0x80000, 0xd0000, 0x10000 )
2706   ROM_COPY( "gfx2", 0x80000, 0xe0000, 0x10000 )
2707   ROM_COPY( "gfx2", 0x80000, 0xf0000, 0x10000 )
26372708
2638   ROM_REGION( 0x8000, "samples", 0 )      /* Samples */
2639   ROM_LOAD( "sparkman.b10", 0x0000, 0x8000, CRC(46c7d4d8) SHA1(99f38cc044390ee4646498667ad2bf536ce91e8f) )
2640
2641   ROM_REGION( 0x8000, "samples2", 0 )      /* Samples */
2642   ROM_LOAD( "sprkman.b11", 0x0000, 0x8000, CRC(d6823a62) SHA1(f8ce748aa7bdc9c95799dd111fd872717e46d416) )
2709   ROM_REGION( 0x8000 * 2, "samples", 0 )      /* Samples */
2710   ROM_LOAD( "15.b10", 0x0000, 0x8000, CRC(46c7d4d8) SHA1(99f38cc044390ee4646498667ad2bf536ce91e8f) )
2711   ROM_LOAD( "16.b11", 0x8000, 0x8000, CRC(d6823a62) SHA1(f8ce748aa7bdc9c95799dd111fd872717e46d416) )
26432712ROM_END
26442713
26452714/***************************************************************************
r18594r18595
26552724   machine().root_device().membank("bank1")->configure_entries(0, 16, machine().root_device().memregion("maincpu")->base() + 0x10000, 0x4000);
26562725}
26572726
2658// Working Games
26592727GAME( 1988, sranger,   0,        rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA",               "Super Ranger (v2.0)",         0 )
26602728GAME( 1988, rranger,   sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "SunA (Sharp Image license)", "Rough Ranger (v2.0, unprotected, bootleg?)", 0) // protection is patched out in this.
26612729GAME( 1988, srangerb,  sranger,  rranger,  rranger,  suna8_state, suna8,     ROT0,  "bootleg",            "Super Ranger (bootleg)",      0 )
r18594r18595
26632731GAME( 1988, hardhead,  0,        hardhead, hardhead, suna8_state, hardhead,  ROT0,  "SunA",               "Hard Head",                   0 )
26642732GAME( 1988, hardheadb, hardhead, hardhead, hardhead, suna8_state, hardhedb,  ROT0,  "bootleg",            "Hard Head (bootleg)",         0 )
26652733GAME( 1988, pop_hh,    hardhead, hardhead, hardhead, suna8_state, hardhedb,  ROT0,  "bootleg",            "Popper (Hard Head bootleg)",  0 )
2734GAME( 1989, sparkman,  0,        sparkman, sparkman, suna8_state, sparkman,  ROT0,  "SunA",               "Spark Man (v2.0, set 1)",     0 )
2735GAME( 1989, sparkmana, sparkman, sparkman, sparkman, suna8_state, sparkman,  ROT0,  "SunA",               "Spark Man (v2.0, set 2)",     0 )
26662736GAME( 1990, starfigh,  0,        starfigh, starfigh, suna8_state, starfigh,  ROT90, "SunA",               "Star Fighter (v1)",           0 )
26672737GAME( 1991, hardhea2,  0,        hardhea2, hardhea2, suna8_state, hardhea2,  ROT0,  "SunA",               "Hard Head 2 (v2.0)",          0 )
26682738GAME( 1992, brickzn,   0,        brickzn,  brickzn,  suna8_state, brickzn,   ROT90, "SunA",               "Brick Zone (v5.0, Joystick)", 0 )
26692739GAME( 1992, brickznv4, brickzn,  brickzn,  brickzn,  suna8_state, brickznv4, ROT90, "SunA",               "Brick Zone (v4.0, Spinner)",  0 )
2670
2671// Non Working Games
2672GAME( 1989, sparkman,  0,        sparkman, sparkman, suna8_state, sparkman,  ROT0,  "SunA",               "Spark Man (v2.0, set 1)",     GAME_NOT_WORKING )
2673GAME( 1989, sparkmana, sparkman, sparkman, sparkman, suna8_state, sparkman,  ROT0,  "SunA",               "Spark Man (v2.0, set 2)",     GAME_NOT_WORKING )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team