Previous 199869 Revisions Next

r37146 Sunday 12th April, 2015 at 21:11:40 UTC by Luca Elia
sigmab98.c: fixed position of zoomed sprites and added sprite RAM buffer.
Emulated background color register. Removed some ROM patches [Luca Elia]

New games added or promoted from NOT_WORKING status
---------------------------------------------------
Minna Atsumare! Dodge Hero [anonyMous, Luca Elia]
Itazura Daisuki! Sushimaru Kun [anonyMous, Luca Elia]
Burning Sanrinsya - Burning Tricycle [anonyMous, Luca Elia]
Transformers Beast Wars II [anonyMous, Luca Elia]

New games marked as GAME_NOT_WORKING
------------------------------------
Minna Ganbare! Dash Hero [anonyMous, Luca Elia]
[src/mame]mame.lst
[src/mame/drivers]sigmab98.c

trunk/src/mame/drivers/sigmab98.c
r245657r245658
1010NVRAM   :   93C46, Battery
1111
1212Graphics are made of sprites only.
13Each sprite is composed of X x Y tiles and can be zoomed / shrunk.
13Each sprite is composed of X x Y tiles and can be zoomed / shrunk and rotated.
1414Tiles can be 16x16x4 or 16x16x8.
1515
16----------------------------------------------------------------
16Some videos:
17https://www.youtube.com/channel/UCYFiPd3FukrmNJa3pfIKf-Q/search?query=sigma
18https://www.youtube.com/channel/UCYFiPd3FukrmNJa3pfIKf-Q/search?query=sammy
19https://www.youtube.com/user/analysis08/search?query=sammy
20http://www.nicozon.net/watch/sm14334996
1721
22Dumped games:
23
241997 Minna Atsumare! Dodge Hero         b9802   https://youtu.be/2eXDQnKCT6A
251997 Itazura Daisuki! Sushimaru Kun      b9803   https://youtu.be/nhvbZ71KWr8
261997 GeGeGe no Kitarou Youkai Slot      b9804
271997 Burning Sanrinsya                b9805
281997 PEPSI Man                     b9806   https://youtu.be/p3cbZ67m4lo
291998 Transformers Beast Wars II         b9808
301997 Uchuu Tokkyuu Medalian            b9809   https://youtu.be/u813kBOZbwI
312000 Minna Ganbare! Dash Hero         b9811
32
33--------------------------------------------------------------------------------------
34
1835Sammy Kids Medal Series
1936
2037CPU     :   KL5C80A120FP (Z80 Compatible High Speed Microcontroller)
r245657r245658
3148
3249Dumped games:
3350
34Animal Catch
35Itazura Monkey
36Taihou de Doboon
37Pye-nage Taikai
38Hae Hae Ka Ka Ka
512000 Animal Catch      https://youtu.be/U4L5EwWbxqw
522000 Itazura Monkey      https://youtu.be/GHxiqUQRpV8
532000 Pye-nage Taikai   https://youtu.be/oL2OIbrv-KI
542000 Taihou de Doboon   https://youtu.be/loPP3jt0Ob0
552001 Hae Hae Ka Ka Ka   https://youtu.be/37IxYCg0tic
3956
4057Games with the same cabinet which might be on the same hardware:
4158
42591999 Shatekids
43601999 Otakara Locomo
44611999 Dokidoki Kingyosukui
452000 Taihou de Doboon
462000 Pye-nage Taikai
472000 Animal Catch
482000 Itazura Monkey
49622000 Otoshicha Ottotto
50632000 Go Go Cowboy
51642001 Mushitori Meijin
52652001 Morino Dodgeball Senshuken
53662001 Waiwai Wanage
542001 Hae Hae Ka Ka Ka
55672001 Zarigani Tsuri
56682001 Kotekitai Slot
57692002 Shateki Yokochou
r245657r245658
6880from:
6981http://www.tsc-acnet.com/index.php?sort=8&action=cataloglist&s=1&mode=3&genre_id=40&freeword=%25A5%25B5%25A5%25DF%25A1%25BC
7082
83--------------------------------------------------------------------------------------
84
7185To Do:
7286
7387- KL5C80 emulation is needed to consolidate the sammymdl games in one memory map and to run the BIOS
74- Remove ROM patches from gegege, pepsiman
75- gegege checks the EEPROM output after reset, and wants a timed 0->1 transition or locks up while
88- Sprites rotation, e.g. logo in dashhero, pepsiman https://youtu.be/p3cbZ67m4lo?t=1m24s, tdoboon https://youtu.be/loPP3jt0Ob0
89- Remove ROM patches: gegege checks the EEPROM output after reset, and wants a timed 0->1 transition or locks up while
7690  saving setting in service mode. Using a reset_delay of 7 works, unless when "play style" is set
7791  to "coin" (it probably changes the number of reads from port $C0).
7892  I guess the reset_delay mechanism should be implemented with a timer in eeprom.c.
79- animalc needs a green backgound during part of the intro (floating animals in and out of the screen).
80  This can be achieved using either pen 0 or ff as background color, but messes up the other games.
8193- pyenaget intro: when the theater scrolls out to the left, the train should scroll in from the right,
8294  with no visible gaps. It currently leaves the screen empty instead, for several seconds.
95- dashhero does not acknowledge the button bashing correctly, it's very hard to win (a slower pace works better!)
8396
8497Notes:
8598
r245657r245658
89102
90103#include "emu.h"
91104#include "cpu/z80/z80.h"
105#include "video/bufsprite.h"
92106#include "sound/okim9810.h"
93107#include "sound/ymz280b.h"
94108#include "machine/eepromser.h"
95109#include "machine/nvram.h"
96110#include "machine/ticket.h"
97111
98
99112class sigmab98_state : public driver_device
100113{
101114public:
102115   sigmab98_state(const machine_config &mconfig, device_type type, const char *tag)
103116      : driver_device(mconfig, type, tag),
104117      m_maincpu(*this,"maincpu"),
118      m_buffered_spriteram(*this, "spriteram"),
105119      m_spriteram(*this, "spriteram"),
120      m_vregs(*this, "vregs"),
121      m_vtable(*this, "vtable"),
106122      m_nvram(*this, "nvram"),
107123      m_eeprom(*this, "eeprom"),
108124      m_gfxdecode(*this, "gfxdecode"),
109125      m_screen(*this, "screen"),
110      m_palette(*this, "palette") { }
126      m_palette(*this, "palette")
127   { }
111128
112129   required_device<cpu_device> m_maincpu;
113   optional_shared_ptr<UINT8> m_spriteram;
130   optional_device<buffered_spriteram8_device> m_buffered_spriteram;   // not on sammymdl?
131   optional_shared_ptr<UINT8> m_spriteram;   // optional as some games allocate it themselves (due to banking)
132   optional_shared_ptr<UINT8> m_vregs;      // optional as some games allocate it themselves (due to banking)
133   optional_shared_ptr<UINT8> m_vtable;   // optional as some games allocate it themselves (due to banking)
114134   required_shared_ptr<UINT8> m_nvram;
115135   required_device<eeprom_serial_93cxx_device> m_eeprom;
116136   required_device<gfxdecode_device> m_gfxdecode;
r245657r245658
132152   UINT8 m_vblank_vector;
133153   UINT8 m_timer0_vector;
134154   UINT8 m_timer1_vector;
135   DECLARE_WRITE8_MEMBER(regs_w);
136   DECLARE_READ8_MEMBER(regs_r);
137   DECLARE_WRITE8_MEMBER(regs2_w);
138   DECLARE_READ8_MEMBER(regs2_r);
155
156   DECLARE_WRITE8_MEMBER(gegege_regs_w);
157   DECLARE_READ8_MEMBER(gegege_regs_r);
158   DECLARE_WRITE8_MEMBER(gegege_regs2_w);
159   DECLARE_READ8_MEMBER(gegege_regs2_r);
160
161   DECLARE_WRITE8_MEMBER(dodghero_regs_w);
162   DECLARE_READ8_MEMBER(dodghero_regs_r);
163   DECLARE_WRITE8_MEMBER(dodghero_regs2_w);
164   DECLARE_READ8_MEMBER(dodghero_regs2_r);
165
166   DECLARE_WRITE8_MEMBER(dashhero_regs_w);
167   DECLARE_READ8_MEMBER(dashhero_regs_r);
168   DECLARE_WRITE8_MEMBER(dashhero_regs2_w);
169   DECLARE_READ8_MEMBER(dashhero_regs2_r);
170
171   DECLARE_WRITE8_MEMBER(vregs_w);
172   DECLARE_READ8_MEMBER(vregs_r);
173   DECLARE_READ8_MEMBER(d013_r);
174   DECLARE_READ8_MEMBER(d021_r);
175
139176   DECLARE_WRITE8_MEMBER(c4_w);
140177   DECLARE_WRITE8_MEMBER(c6_w);
141178   DECLARE_WRITE8_MEMBER(c8_w);
179
142180   DECLARE_WRITE8_MEMBER(animalc_rombank_w);
143181   DECLARE_READ8_MEMBER(animalc_rombank_r);
144182   DECLARE_WRITE8_MEMBER(animalc_rambank_w);
145183   DECLARE_READ8_MEMBER(animalc_rambank_r);
184
146185   DECLARE_READ8_MEMBER(unk_34_r);
186   DECLARE_WRITE8_MEMBER(vblank_w);
147187   DECLARE_READ8_MEMBER(vblank_r);
148   DECLARE_WRITE8_MEMBER(vblank_w);
149188   DECLARE_WRITE8_MEMBER(sammymdl_coin_w);
150189   DECLARE_WRITE8_MEMBER(sammymdl_leds_w);
151190   DECLARE_WRITE8_MEMBER(sammymdl_hopper_w);
152191   DECLARE_READ8_MEMBER(sammymdl_coin_hopper_r);
192
153193   DECLARE_WRITE8_MEMBER(haekaka_rombank_w);
154194   DECLARE_READ8_MEMBER(haekaka_rombank_r);
155195   DECLARE_WRITE8_MEMBER(haekaka_rambank_w);
r245657r245658
159199   DECLARE_WRITE8_MEMBER(haekaka_b000_w);
160200   DECLARE_WRITE8_MEMBER(haekaka_leds_w);
161201   DECLARE_WRITE8_MEMBER(haekaka_coin_w);
202
162203   DECLARE_WRITE8_MEMBER(itazuram_rombank_w);
163204   DECLARE_READ8_MEMBER(itazuram_rombank_r);
164205   DECLARE_WRITE8_MEMBER(itazuram_rambank_w);
r245657r245658
166207   DECLARE_WRITE8_MEMBER(itazuram_nvram_palette_w);
167208   DECLARE_WRITE8_MEMBER(itazuram_palette_w);
168209   DECLARE_READ8_MEMBER(itazuram_palette_r);
210
169211   DECLARE_WRITE8_MEMBER(tdoboon_rombank_w);
170212   DECLARE_READ8_MEMBER(tdoboon_rombank_r);
171213   DECLARE_WRITE8_MEMBER(tdoboon_rambank_w);
172214   DECLARE_READ8_MEMBER(tdoboon_rambank_r);
173215   DECLARE_READ8_MEMBER(tdoboon_c000_r);
174216   DECLARE_WRITE8_MEMBER(tdoboon_c000_w);
217
175218   void show_outputs();
176219   void show_3_outputs();
177220   DECLARE_WRITE8_MEMBER(eeprom_w);
178221   DECLARE_READ8_MEMBER(sammymdl_eeprom_r);
179222   DECLARE_WRITE8_MEMBER(sammymdl_eeprom_w);
223
224   DECLARE_DRIVER_INIT(dodghero);
225   DECLARE_DRIVER_INIT(b3rinsya);
226   DECLARE_DRIVER_INIT(tbeastw2);
227   DECLARE_DRIVER_INIT(dashhero);
180228   DECLARE_DRIVER_INIT(gegege);
181229   DECLARE_DRIVER_INIT(pepsiman);
182230   DECLARE_DRIVER_INIT(itazuram);
183231   DECLARE_DRIVER_INIT(animalc);
184232   DECLARE_DRIVER_INIT(ucytokyu);
185233   DECLARE_DRIVER_INIT(haekaka);
234
235   DECLARE_MACHINE_RESET(sigmab98);
186236   DECLARE_MACHINE_RESET(sammymdl);
237
187238   UINT32 screen_update_sigmab98(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
188239   void screen_eof_sammymdl(screen_device &screen, bool state);
189   INTERRUPT_GEN_MEMBER(gegege_vblank_interrupt);
190   TIMER_DEVICE_CALLBACK_MEMBER(sammymd1_irq);
240   INTERRUPT_GEN_MEMBER(sigmab98_vblank_interrupt);
241   TIMER_DEVICE_CALLBACK_MEMBER(sammymdl_irq);
191242   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask);
192243};
193244
r245657r245658
223274    7                         Y (Low)
224275    8                         Shrink Factor (<< 8, High)
225276    9                         Shrink Factor (<< 8, Low)
226    a
227    b
277    a                         ? rotation, see dashhero (Sigma logo)
278    b                         ? and pepsiman (when falling)
228279    c           7654 3---
229280                ---- -210     Delta X (High)
230281    d                         Delta X (Low)
r245657r245658
236287
237288void sigmab98_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask)
238289{
239   UINT8 *end      =   m_spriteram - 0x10;
240   UINT8 *s        =   end + m_spriteram.bytes();
290   UINT8 *end      =   (m_buffered_spriteram ? m_buffered_spriteram->buffer() : m_spriteram) - 0x10;
291   UINT8 *s        =   end + 0x1000;
241292
242293   for ( ; s != end; s -= 0x10 )
243294   {
244      int gfx, code, color, zoom, dim, scale;
295      int gfx, code, color, zoom, /*rot,*/ dim, scale;
245296      int sx, nx, x, x0, x1, dx, flipx;
246297      int sy, ny, y, y0, y1, dy, flipy;
247298
r245657r245658
265316
266317      sy      =   (s[ 0x06 ] & 0x03) * 256 + s[ 0x07 ];
267318
268      zoom    =   (s[ 0x08 ] & 0xff) * 256 + s[ 0x09 ];
319      zoom    =   (s[ 0x08 ] & 0xff) * 256 + s[ 0x09 ];   // 0x100 means no zoom
269320
270      dx      =   (s[ 0x0c ] & 0x03) * 256 + s[ 0x0d ];
271      dy      =   (s[ 0x0e ] & 0x03) * 256 + s[ 0x0f ];
321//      rot     =   (s[ 0x0a ] & 0xff) * 256 + s[ 0x0b ];   // unimplemented!
272322
323      dx      =   (s[ 0x0c ] & 0xff) * 256 + s[ 0x0d ];
324      dy      =   (s[ 0x0e ] & 0xff) * 256 + s[ 0x0f ];
325
273326      // Sign extend the position
274327      sx      =   (sx & 0x1ff) - (sx & 0x200);
275328      sy      =   (sy & 0x1ff) - (sy & 0x200);
276      dx      =   (dx & 0x1ff) - (dx & 0x200);
277      dy      =   (dy & 0x1ff) - (dy & 0x200);
329      dx      =   (dx & 0x7fff) - (dx & 0x8000);
330      dy      =   (dy & 0x7fff) - (dy & 0x8000);
278331
279      // Add shift (negated, as it seems more correct in haekaka)
280      sx      -=  dx;
281      sy      -=  dy;
282
283332      // Use fixed point values (16.16), for accuracy
284333      sx      <<= 16;
285334      sy      <<= 16;
286335
287336      zoom    =   (1 << 16) / (zoom ? zoom : 1);
288337      dim     =   (0x10 << 8) * zoom;
338      // Add shift (negated)
339      sx      -=  (dx << 8) * zoom;
340      sy      -=  (dy << 8) * zoom;
289341      scale   =   dim / 0x10;
290342
291343      // Let's approximate to the nearest greater integer value
r245657r245658
331383   }
332384#endif
333385
334   bitmap.fill(m_palette->black_pen(), cliprect);
386   bitmap.fill(m_palette->pens()[0x100], cliprect);
335387
336388   // Draw from priority 3 (bottom, converted to a bitmask) to priority 0 (top)
337389   draw_sprites(bitmap, cliprect, layers_ctrl & 8);
r245657r245658
342394   return 0;
343395}
344396
397/***************************************************************************
345398
399    Video Regs
400
401    Offset:     Bits:         Value:
402
403    01                        Screen Width / 2 - 1
404    03
405    05
406    07
407    09                        Screen Height - 1
408    0b
409    0d
410    0f
411    11
412    13           76-- ----
413                 --5- ----    VBlank?
414                 ---4 3---
415                 ---- -2--    Sprites Buffered?
416                 ---- --10
417    15
418    17
419    19
420    1b                        Background Color (Low)
421    1d                        Background Color (High)
422    1f
423    21
424
425***************************************************************************/
426
427WRITE8_MEMBER(sigmab98_state::vregs_w)
428{
429   m_vregs[offset] = data;
430
431   switch (offset)
432   {
433      case 0x1b:   // background color
434      case 0x1d:
435      {
436         int x = (m_vregs[0x1d] << 8) + m_vregs[0x1b];
437         int r = (x >> 10) & 0x1f;
438         int g = (x >>  5) & 0x1f;
439         int b = (x >>  0) & 0x1f;
440         m_palette->set_pen_color(0x100, pal5bit(r), pal5bit(g), pal5bit(b));
441         break;
442      }
443//      default:
444//         logerror("%s: unknown video reg written: %02x = %02x\n", machine().describe_context(), offset, data);
445   }
446}
447
448READ8_MEMBER(sigmab98_state::vregs_r)
449{
450   switch (offset)
451   {
452      default:
453         logerror("%s: unknown video reg read: %02x\n", machine().describe_context(), offset);
454         return m_vregs[offset];
455   }
456}
457
458READ8_MEMBER(sigmab98_state::d013_r)
459{
460   // bit 5 must go 0->1 (vblank?)
461   // bit 2 must set (sprite buffered? triggered by pulsing bit 3 of port C6?)
462   return (m_screen->vblank() ? 0x20 : 0) | 0x04;
463//   return machine().rand();
464}
465READ8_MEMBER(sigmab98_state::d021_r)
466{
467   // bit 5 must be 0?
468   return 0;
469//   return machine().rand();
470}
471
472
346473/***************************************************************************
347474
348475    Memory Maps
349476
350477***************************************************************************/
351478
479/***************************************************************************
480                          Minna Atsumare! Dodge Hero
481***************************************************************************/
352482
483// rombank
484WRITE8_MEMBER(sigmab98_state::dodghero_regs_w)
485{
486   if (offset == 0)
487   {
488      m_reg = data;
489      return;
490   }
491
492   switch ( m_reg )
493   {
494      case 0x1f:
495         m_rombank = data;
496         if (data >= 0x18)
497            logerror("%s: unknown rom bank = %02x\n", machine().describe_context(), data);
498         else
499            membank("rombank")->set_entry(data * 2);
500         break;
501
502      case 0x9f:
503         m_rombank = data;
504         if (data >= 0x18)
505            logerror("%s: unknown rom bank2 = %02x\n", machine().describe_context(), data);
506         else
507            membank("rombank")->set_entry(data * 2 + 1);
508         break;
509
510      default:
511         logerror("%s: unknown reg written: %02x = %02x\n", machine().describe_context(), m_reg, data);
512   }
513}
514READ8_MEMBER(sigmab98_state::dodghero_regs_r)
515{
516   if (offset == 0)
517      return m_reg;
518
519   switch ( m_reg )
520   {
521      case 0x1f:
522      case 0x9f:
523         return m_rombank;
524
525      default:
526         logerror("%s: unknown reg read: %02x\n", machine().describe_context(), m_reg);
527         return 0x00;
528   }
529}
530
531// rambank
532WRITE8_MEMBER(sigmab98_state::dodghero_regs2_w)
533{
534   if (offset == 0)
535   {
536      m_reg2 = data;
537      return;
538   }
539
540   switch ( m_reg2 )
541   {
542      case 0x37:
543         m_rambank = data;
544         switch (data)
545         {
546            case 0x32:
547               membank("rambank")->set_entry(0);
548               break;
549            case 0x36:
550               membank("rambank")->set_entry(1);
551               break;
552            default:
553               logerror("%s: unknown ram bank = %02x\n", machine().describe_context(), data);
554         }
555         break;
556
557      default:
558         logerror("%s: unknown reg2 written: %02x = %02x\n", machine().describe_context(), m_reg2, data);
559   }
560}
561READ8_MEMBER(sigmab98_state::dodghero_regs2_r)
562{
563   if (offset == 0)
564      return m_reg2;
565
566   switch ( m_reg2 )
567   {
568      case 0x37:
569         return m_rambank;
570
571      default:
572         logerror("%s: unknown reg2 read: %02x\n", machine().describe_context(), m_reg2);
573         return 0x00;
574   }
575}
576
577static ADDRESS_MAP_START( dodghero_mem_map, AS_PROGRAM, 8, sigmab98_state )
578   AM_RANGE( 0x0000, 0x7fff ) AM_ROM
579   AM_RANGE( 0x8000, 0xa7ff ) AM_ROMBANK("rombank")
580
581   AM_RANGE( 0xa800, 0xb7ff ) AM_RAM AM_SHARE("spriteram")
582
583   AM_RANGE( 0xc800, 0xc9ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
584
585   AM_RANGE( 0xd001, 0xd07f ) AM_RAM AM_SHARE("vtable")
586
587   AM_RANGE( 0xd813, 0xd813 ) AM_READ(d013_r)
588   AM_RANGE( 0xd821, 0xd821 ) AM_READ(d021_r)
589   AM_RANGE( 0xd800, 0xd821 ) AM_READWRITE(vregs_r, vregs_w) AM_SHARE("vregs")
590   AM_RANGE( 0xd800, 0xdfff ) AM_RAMBANK("rambank")   // not used, where is it mapped?
591
592   AM_RANGE( 0xe000, 0xefff ) AM_RAM AM_SHARE("nvram") // battery
593
594   AM_RANGE( 0xf000, 0xffff ) AM_RAM
595ADDRESS_MAP_END
596
597static ADDRESS_MAP_START( dodghero_io_map, AS_IO, 8, sigmab98_state )
598   ADDRESS_MAP_GLOBAL_MASK(0xff)
599
600   AM_RANGE( 0x00, 0x01 ) AM_DEVREADWRITE("ymz", ymz280b_device, read, write )
601
602   AM_RANGE( 0xa0, 0xa1 ) AM_READWRITE(dodghero_regs_r,  dodghero_regs_w )
603//  AM_RANGE( 0xa2, 0xa3 )
604   AM_RANGE( 0xa4, 0xa5 ) AM_READWRITE(dodghero_regs2_r, dodghero_regs2_w )
605
606   AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" ) AM_WRITE(eeprom_w)
607   AM_RANGE( 0xc2, 0xc2 ) AM_READ_PORT( "BUTTON" )
608   AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "PAYOUT" ) AM_WRITE(c4_w )
609   AM_RANGE( 0xc6, 0xc6 ) AM_WRITE(c6_w )
610   AM_RANGE( 0xc8, 0xc8 ) AM_WRITE(c8_w )
611ADDRESS_MAP_END
612
353613/***************************************************************************
354614                        GeGeGe no Kitarou Youkai Slot
355615***************************************************************************/
356616
357617// rombank
358WRITE8_MEMBER(sigmab98_state::regs_w)
618WRITE8_MEMBER(sigmab98_state::gegege_regs_w)
359619{
360620   if (offset == 0)
361621   {
r245657r245658
377637         logerror("%s: unknown reg written: %02x = %02x\n", machine().describe_context(), m_reg, data);
378638   }
379639}
380READ8_MEMBER(sigmab98_state::regs_r)
640READ8_MEMBER(sigmab98_state::gegege_regs_r)
381641{
382642   if (offset == 0)
383643      return m_reg;
r245657r245658
394654}
395655
396656// rambank
397WRITE8_MEMBER(sigmab98_state::regs2_w)
657WRITE8_MEMBER(sigmab98_state::gegege_regs2_w)
398658{
399659   if (offset == 0)
400660   {
r245657r245658
423683         logerror("%s: unknown reg2 written: %02x = %02x\n", machine().describe_context(), m_reg2, data);
424684   }
425685}
426READ8_MEMBER(sigmab98_state::regs2_r)
686READ8_MEMBER(sigmab98_state::gegege_regs2_r)
427687{
428688   if (offset == 0)
429689      return m_reg2;
r245657r245658
445705void sigmab98_state::show_outputs()
446706{
447707#ifdef MAME_DEBUG
448//  popmessage("0: %02X  4: %02X  6: %02X  8: %02X",m_c0,m_c4,m_c6,m_c8);
708   popmessage("0: %02X  4: %02X  6: %02X  8: %02X", m_c0, m_c4, m_c6, m_c8);
449709#endif
450710}
451711
r245657r245658
479739// Port c6
480740// 03 lockout (active low, 02 is cleared when reaching 99 credits)
481741// 04 pulsed on coin in
482// 08 always blinks
742// 08 buffer sprites?
483743// 10 led?
484// 20 blinks after coin up
744// 20 led? (starts blinking after coin in)
485745WRITE8_MEMBER(sigmab98_state::c6_w)
486746{
487747   coin_lockout_w(machine(), 0, (~data) & 0x02);
488748
489749   coin_counter_w(machine(), 0,   data  & 0x04);
490750
491   set_led_status(machine(), 1,   data  & 0x08);
492   set_led_status(machine(), 2,   data  & 0x10);
493   set_led_status(machine(), 3,   data  & 0x20);   //
751   if ((data & 0x08) && !(m_c6 & 0x08))
752      m_buffered_spriteram->copy();
494753
754   set_led_status(machine(), 1,   data  & 0x10);
755   set_led_status(machine(), 2,   data  & 0x20);
756
495757   m_c6 = data;
496758   show_outputs();
497759}
r245657r245658
515777
516778   AM_RANGE( 0xc000, 0xc1ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
517779
518   AM_RANGE( 0xc800, 0xc87f ) AM_RAM
780   AM_RANGE( 0xc800, 0xc87f ) AM_RAM AM_SHARE("vtable")
519781
520//  AM_RANGE( 0xd001, 0xd021 ) AM_RAM
782   AM_RANGE( 0xd013, 0xd013 ) AM_READ(d013_r)
783   AM_RANGE( 0xd021, 0xd021 ) AM_READ(d021_r)
784   AM_RANGE( 0xd000, 0xd021 ) AM_READWRITE(vregs_r, vregs_w) AM_SHARE("vregs")
785
521786   AM_RANGE( 0xd800, 0xdfff ) AM_RAMBANK("rambank")
522787
523788   AM_RANGE( 0xe000, 0xefff ) AM_RAM AM_SHARE("nvram") // battery
r245657r245658
528793static ADDRESS_MAP_START( gegege_io_map, AS_IO, 8, sigmab98_state )
529794   ADDRESS_MAP_GLOBAL_MASK(0xff)
530795
531   AM_RANGE( 0x00, 0x01 ) AM_DEVWRITE("ymz", ymz280b_device, write )
796   AM_RANGE( 0x00, 0x01 ) AM_DEVREADWRITE("ymz", ymz280b_device, read, write )
532797
533   AM_RANGE( 0xa0, 0xa1 ) AM_READWRITE(regs_r,  regs_w )
798   AM_RANGE( 0xa0, 0xa1 ) AM_READWRITE(gegege_regs_r,  gegege_regs_w )
534799//  AM_RANGE( 0xa2, 0xa3 )
535   AM_RANGE( 0xa4, 0xa5 ) AM_READWRITE(regs2_r, regs2_w )
800   AM_RANGE( 0xa4, 0xa5 ) AM_READWRITE(gegege_regs2_r, gegege_regs2_w )
536801
537   AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" )
538   AM_RANGE( 0xc0, 0xc0 ) AM_WRITE(eeprom_w)
802   AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" ) AM_WRITE(eeprom_w)
803   AM_RANGE( 0xc2, 0xc2 ) AM_READ_PORT( "BUTTON" )
804   AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "PAYOUT" ) AM_WRITE(c4_w )
805   AM_RANGE( 0xc6, 0xc6 ) AM_WRITE(c6_w )
806   AM_RANGE( 0xc8, 0xc8 ) AM_WRITE(c8_w )
539807
540   AM_RANGE( 0xc2, 0xc2 ) AM_READ_PORT( "IN1" )
808   AM_RANGE( 0xe5, 0xe5 ) AM_READNOP   // during irq
809ADDRESS_MAP_END
541810
542   AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "IN2" )
543   AM_RANGE( 0xc4, 0xc4 ) AM_WRITE(c4_w )
811/***************************************************************************
812                           Minna Ganbare! Dash Hero
813***************************************************************************/
544814
815// rambank
816WRITE8_MEMBER(sigmab98_state::dashhero_regs2_w)
817{
818   if (offset == 0)
819   {
820      m_reg2 = data;
821      return;
822   }
823
824   switch ( m_reg2 )
825   {
826      case 0x75:
827      case 0xb5:
828      case 0xf5:
829         m_rambank = data;
830         switch (data)
831         {
832            case 0x32:
833               membank("rambank")->set_entry(0);
834               break;
835            case 0x34:
836               membank("rambank")->set_entry(1);
837               break;
838            case 0x36:
839               membank("rambank")->set_entry(2);
840               break;
841            case 0x39:
842               membank("rambank")->set_entry(3);
843               break;
844            default:
845               logerror("%s: unknown ram bank = %02x\n", machine().describe_context(), data);
846         }
847         break;
848
849      default:
850         logerror("%s: unknown reg2 written: %02x = %02x\n", machine().describe_context(), m_reg2, data);
851   }
852}
853READ8_MEMBER(sigmab98_state::dashhero_regs2_r)
854{
855   if (offset == 0)
856      return m_reg2;
857
858   switch ( m_reg2 )
859   {
860      case 0x75:
861      case 0xb5:
862      case 0xf5:
863         return m_rambank;
864
865      default:
866         logerror("%s: unknown reg2 read: %02x\n", machine().describe_context(), m_reg2);
867         return 0x00;
868   }
869}
870
871static ADDRESS_MAP_START( dashhero_io_map, AS_IO, 8, sigmab98_state )
872   ADDRESS_MAP_GLOBAL_MASK(0xff)
873
874   AM_RANGE( 0x00, 0x01 ) AM_DEVREADWRITE("ymz", ymz280b_device, read, write )
875
876   AM_RANGE( 0xa0, 0xa1 ) AM_READWRITE(gegege_regs_r,  gegege_regs_w )
877   //  AM_RANGE( 0xa2, 0xa3 )
878   AM_RANGE( 0xa4, 0xa5 ) AM_READWRITE(dashhero_regs2_r, dashhero_regs2_w )
879
880   AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" )   AM_WRITE(eeprom_w)
881   AM_RANGE( 0xc2, 0xc2 ) AM_READ_PORT( "BUTTON" )
882   AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "PAYOUT" )   AM_WRITE(c4_w )
545883   AM_RANGE( 0xc6, 0xc6 ) AM_WRITE(c6_w )
546
547884   AM_RANGE( 0xc8, 0xc8 ) AM_WRITE(c8_w )
548885
549886   AM_RANGE( 0xe5, 0xe5 ) AM_READNOP   // during irq
r245657r245658
6991036void sigmab98_state::show_3_outputs()
7001037{
7011038#ifdef MAME_DEBUG
702//  popmessage("COIN: %02X  LED: %02X  HOP: %02X", m_out[0], m_out[1], m_out[2]);
1039   popmessage("COIN: %02X  LED: %02X  HOP: %02X", m_out[0], m_out[1], m_out[2]);
7031040#endif
7041041}
7051042// Port 31
r245657r245658
7571094   AM_RANGE( 0xb000, 0xbfff ) AM_RAMBANK("sprbank")
7581095
7591096   AM_RANGE( 0xd000, 0xd1ff ) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
760   AM_RANGE( 0xd800, 0xd87f ) AM_RAM   // table?
1097   AM_RANGE( 0xd800, 0xd87f ) AM_RAM AM_SHARE("vtable")
7611098
7621099   AM_RANGE( 0xe011, 0xe011 ) AM_WRITENOP  // IRQ Enable? Screen disable?
7631100   AM_RANGE( 0xe013, 0xe013 ) AM_READWRITE(vblank_r, vblank_w )    // IRQ Ack?
1101   AM_RANGE( 0xe000, 0xe021 ) AM_READWRITE(vregs_r, vregs_w) AM_SHARE("vregs")
7641102
7651103   AM_RANGE( 0xfe00, 0xffff ) AM_RAM   // High speed internal RAM
7661104ADDRESS_MAP_END
r245657r245658
8201158            case 0x1f:
8211159
8221160            case 0x65:  // SPRITERAM
823            case 0x67:  // PALETTE RAM + TABLE + REGS
1161            case 0x67:  // PALETTE RAM + VTABLE + VREGS
8241162               break;
8251163
8261164            default:
r245657r245658
9221260         if (offset < 0x1000)
9231261            return m_spriteram[offset];
9241262
925      case 0x67:  // PALETTERAM + TABLE? + REGS
1263      case 0x67:  // PALETTERAM + VTABLE + VREGS
9261264         if (offset < 0x200)
9271265            return m_paletteram[offset];
928         else if (offset == (0xc013-0xb000))
929            return haekaka_vblank_r(space, offset);
1266         else if ((offset >= 0x800) && (offset < 0x880))
1267         {
1268            return m_vtable[offset-0x800];
1269         }
1270         else if (offset >= (0xc000-0xb000) && offset <= (0xc021-0xb000))
1271         {
1272            if (offset == (0xc013-0xb000))
1273               return haekaka_vblank_r(space, 0);
1274            return vregs_r(space, offset-(0xc000-0xb000));
1275         }
9301276         break;
9311277   }
9321278
r245657r245658
9461292         }
9471293         break;
9481294
949      case 0x67:  // PALETTERAM + TABLE? + REGS
1295      case 0x67:  // PALETTERAM + VTABLE + VREGS
9501296         if (offset < 0x200)
9511297         {
9521298            m_palette->write(space, offset, data);
953//              m_generic_paletteram_8[offset] = data;
9541299            return;
9551300         }
9561301         else if ((offset >= 0x800) && (offset < 0x880))
9571302         {
958            // table?
1303            m_vtable[offset-0x800] = data;
9591304            return;
9601305         }
1306         else if (offset >= (0xc000-0xb000) && offset <= (0xc021-0xb000))
1307         {
1308            vregs_w(space, offset-(0xc000-0xb000), data);
1309            return;
1310         }
9611311         break;
9621312   }
9631313
r245657r245658
9831333WRITE8_MEMBER(sigmab98_state::haekaka_coin_w)
9841334{
9851335   coin_counter_w(machine(), 0,   data & 0x01 );   // medal out
986//                                      data & 0x02 ?
987//                                      data & 0x04 ?
988//                                      data & 0x10 ?
1336//                                 data & 0x02 ?
1337//                                 data & 0x04 ?
1338//                                 data & 0x10 ?
9891339
9901340   m_out[0] = data;
9911341   show_3_outputs();
r245657r245658
10511401         m_rombank = data;
10521402         switch (data)
10531403         {
1404//            case 0x0f:  // demo mode, after title
1405
10541406            case 0x14:  // 3800 IS ROM
10551407               membank("rombank0")->set_base(rom + 0x8000);
10561408               membank("rombank1")->set_base(rom + 0x9000);
r245657r245658
11571509         m_rambank = data;
11581510         switch (data)
11591511         {
1160            case 0x52:  membank("palbank")->set_base(m_nvram);                                  break;
1512            case 0x52:  membank("palbank")->set_base(m_nvram);        break;
11611513            case 0x64:  membank("palbank")->set_base(m_paletteram);   break;
11621514            default:
11631515               logerror("%s: unknown ram bank = %02x, reg2 = %02x\n", machine().describe_context(), data, m_reg2);
r245657r245658
11911543   if (m_rambank == 0x64)
11921544   {
11931545      m_palette->write(space, offset, data);
1194//      m_generic_paletteram_8[offset] = data;
11951546   }
11961547   else if (m_rambank == 0x52)
11971548   {
r245657r245658
12091560   {
12101561      if (offset < 0x200)
12111562         m_palette->write(space, offset, data);
1212//          m_generic_paletteram_8[offset] = data;
12131563   }
12141564   else
12151565   {
r245657r245658
12281578   AM_RANGE( 0x4800, 0x57ff ) AM_READ_BANK( "rombank1" ) AM_WRITE_BANK( "sprbank1" )
12291579
12301580   AM_RANGE( 0x5800, 0x59ff ) AM_READWRITE(itazuram_palette_r, itazuram_palette_w )
1231   AM_RANGE( 0x6000, 0x607f ) AM_RAM   // table?
1581   AM_RANGE( 0x6000, 0x607f ) AM_RAM AM_SHARE("vtable")
12321582
12331583   AM_RANGE( 0x6811, 0x6811 ) AM_WRITENOP  // IRQ Enable? Screen disable?
12341584   AM_RANGE( 0x6813, 0x6813 ) AM_WRITENOP  // IRQ Ack?
1585   AM_RANGE( 0x6800, 0x6821 ) AM_READWRITE(vregs_r, vregs_w) AM_SHARE("vregs")
12351586   AM_RANGE( 0xdc00, 0xfdff ) AM_READ_BANK( "palbank" ) AM_WRITE(itazuram_nvram_palette_w ) AM_SHARE( "nvram" )    // nvram | paletteram
12361587
12371588   AM_RANGE( 0xfe00, 0xffff ) AM_RAM   // High speed internal RAM
r245657r245658
13001651            case 0x1f:
13011652
13021653            case 0x64:  // SPRITERAM
1303            case 0x66:  // PALETTE RAM + TABLE
1304            case 0x67:  // REGS
1654            case 0x66:  // PALETTE RAM + VTABLE
1655            case 0x67:  // VREGS
13051656               break;
13061657
13071658            default:
r245657r245658
13991750            return m_spriteram[offset];
14001751         break;
14011752
1402      case 0x66:  // PALETTERAM + TABLE?
1753      case 0x66:  // PALETTERAM + VTABLE
14031754         if (offset < 0x200)
14041755            return m_paletteram[offset];
1756         else if ((offset >= 0x800) && (offset < 0x880))
1757         {
1758            return m_vtable[offset-0x800];
1759         }
14051760         break;
14061761
1407      case 0x67:  // REGS
1408         if (offset == (0xc013-0xc000))
1409            return haekaka_vblank_r(space, offset);
1762      case 0x67:  // VREGS
1763         if (offset >= (0xc000-0xc000) && offset <= (0xc021-0xc000))
1764         {
1765            if (offset == (0xc013-0xc000))
1766               return haekaka_vblank_r(space, 0);
1767            return vregs_r(space, offset-(0xc000-0xc000));
1768         }
14101769         break;
14111770   }
14121771
r245657r245658
14261785         }
14271786         break;
14281787
1429      case 0x66:  // PALETTERAM + TABLE?
1788      case 0x66:  // PALETTERAM + VTABLE
14301789         if (offset < 0x200)
14311790         {
14321791            m_palette->write(space, offset, data);
1433//              m_generic_paletteram_8[offset] = data;
14341792            return;
14351793         }
14361794         else if ((offset >= 0x800) && (offset < 0x880))
14371795         {
1438            // table?
1796            m_vtable[offset-0x800] = data;
14391797            return;
14401798         }
14411799         break;
1800
1801      case 0x67:  // VREGS
1802         if (offset >= (0xc000-0xc000) && offset <= (0xc021-0xc000))
1803         {
1804            vregs_w(space, offset-(0xc000-0xc000), data);
1805            return;
1806         }
1807         break;
14421808   }
14431809
14441810   logerror("%s: unknown write to %02x = %02x with rombank = %02x\n", machine().describe_context(), offset+0xc000, data, m_rombank);
r245657r245658
15101876***************************************************************************/
15111877
15121878/***************************************************************************
1513                        GeGeGe no Kitarou Youkai Slot
1879                             Sigma B-98 Games
15141880***************************************************************************/
15151881
1516static INPUT_PORTS_START( gegege )
1517
1882// 1 button (plus bet and payout)
1883static INPUT_PORTS_START( sigma_1b )
15181884   PORT_START("EEPROM")
1519   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )   // protection? checks. Must be 0
1520   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_CUSTOM  ) PORT_VBLANK("screen") // protection? checks. Must be 0
1885   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )                       // Related to d013. Must be 0
1886   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_CUSTOM  ) PORT_VBLANK("screen") // Related to d013. Must be 0
15211887   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15221888   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15231889   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_UNKNOWN )
r245657r245658
15251891   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15261892   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
15271893
1528   PORT_START("IN1")
1894   PORT_START("BUTTON")
15291895   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN2   ) PORT_IMPULSE(5)   // ? (coin error, pulses mask 4 of port c6)
15301896   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN1   ) PORT_IMPULSE(5) PORT_NAME("Medal")    // coin/medal in (coin error)
15311897   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
15321898   PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
1533   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_BUTTON2 ) PORT_NAME("Bet")  // bet / select in test menu
1534   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_BUTTON1 ) PORT_NAME("Play") // play game / select in test menu
1899   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_1)  // bet / select in test menu
1900   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_BUTTON1 )
15351901   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15361902   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15371903
1538   PORT_START("IN2")
1539   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_BUTTON3 ) PORT_NAME("Pay Out")  // pay out / change option in test menu
1904   PORT_START("PAYOUT")
1905   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_GAMBLE_PAYOUT )  // pay out / change option in test menu
15401906   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15411907   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15421908   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
r245657r245658
15441910   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15451911   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
15461912   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1547
15481913INPUT_PORTS_END
15491914
1550/***************************************************************************
1551                                PEPSI Man
1552***************************************************************************/
1915// 3 buttons (plus bet and payout)
1916static INPUT_PORTS_START( sigma_3b )
1917   PORT_INCLUDE( sigma_1b )
15531918
1554static INPUT_PORTS_START( pepsiman )
1919   PORT_MODIFY("BUTTON")
1920   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_BUTTON2 )
1921   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON3 )
1922INPUT_PORTS_END
15551923
1556   PORT_START("EEPROM")
1557   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )   // protection? checks. Must be 0
1558   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_CUSTOM  ) PORT_VBLANK("screen") // protection? checks. Must be 0
1559   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1560   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1561   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1562   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1563   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1564   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
1924// 5 buttons (plus bet and payout)
1925static INPUT_PORTS_START( sigma_5b )
1926   PORT_INCLUDE( sigma_1b )
15651927
1566   PORT_START("IN1")
1567   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN2   ) PORT_IMPULSE(5)   // ? (coin error, pulses mask 4 of port c6)
1568   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN1   ) PORT_IMPULSE(5) PORT_NAME("Medal")    // coin/medal in (coin error)
1569   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
1570   PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
1571   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_1)   // bet / select in test menu
1572   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_BUTTON1 ) PORT_NAME("Rock (Gu)")
1573   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_BUTTON2 ) PORT_NAME("Scissors (Choki)")
1574   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON3 ) PORT_NAME("Paper (Par)")
1928   PORT_MODIFY("BUTTON")
1929   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_BUTTON2 )
1930   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON3 )
15751931
1576   PORT_START("IN2")
1577   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_GAMBLE_PAYOUT ) // pay out / enter in test menu
1578   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1579   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1580   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1581   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1582   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1583   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1584   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1585
1932   PORT_MODIFY("PAYOUT")
1933   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_BUTTON4 )
1934   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_BUTTON5 )
15861935INPUT_PORTS_END
15871936
1588/***************************************************************************
1589                             Uchuu Tokkyuu Medalian
1590***************************************************************************/
1937// Joystick (plus bet and payout)
1938static INPUT_PORTS_START( sigma_js )
1939   PORT_INCLUDE( sigma_1b )
15911940
1592static INPUT_PORTS_START( ucytokyu )
1593
1594   PORT_START("EEPROM")
1595   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )   // protection? checks. Must be 0
1596   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_CUSTOM  ) PORT_VBLANK("screen") // protection? checks. Must be 0
1597   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1598   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1599   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1600   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1601   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1602   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )   PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
1603
1604   PORT_START("IN1")
1605   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN2   ) PORT_IMPULSE(10)  // ? (coin error, pulses mask 4 of port c6)
1606   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN1   ) PORT_IMPULSE(10) PORT_NAME("Medal")   // coin/medal in (coin error)
1607   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
1608   PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
1609   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_GAMBLE_BET ) PORT_CODE(KEYCODE_1)   // bet / enter in test menu
1941   PORT_MODIFY("BUTTON")
16101942   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_JOYSTICK_DOWN  )
16111943   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_JOYSTICK_UP    )
16121944   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_JOYSTICK_RIGHT )
16131945
1614   PORT_START("IN2")
1615   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_GAMBLE_PAYOUT ) // pay out / back in test menu
1946   PORT_MODIFY("PAYOUT")
16161947   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_JOYSTICK_LEFT )
1617   PORT_BIT( 0x04, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1618   PORT_BIT( 0x08, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1619   PORT_BIT( 0x10, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1620   PORT_BIT( 0x20, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1621   PORT_BIT( 0x40, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1622   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_UNKNOWN )
1623
16241948INPUT_PORTS_END
16251949
16261950/***************************************************************************
r245657r245658
16792003***************************************************************************/
16802004
16812005/***************************************************************************
1682                        GeGeGe no Kitarou Youkai Slot
2006                             Sigma B-98 Games
16832007***************************************************************************/
16842008
1685INTERRUPT_GEN_MEMBER(sigmab98_state::gegege_vblank_interrupt)
2009MACHINE_RESET_MEMBER(sigmab98_state,sigmab98)
16862010{
2011   m_rombank = 0;
2012   membank("rombank")->set_entry(0);
2013
2014   m_rambank = 0;
2015   membank("rambank")->set_entry(0);
2016}
2017
2018INTERRUPT_GEN_MEMBER(sigmab98_state::sigmab98_vblank_interrupt)
2019{
16872020   device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x5a);
16882021}
16892022
1690static MACHINE_CONFIG_START( gegege, sigmab98_state )
2023static MACHINE_CONFIG_START( sigmab98, sigmab98_state )
16912024   MCFG_CPU_ADD("maincpu", Z80, 10000000)  // !! TAXAN KY-80, clock @X1? !!
16922025   MCFG_CPU_PROGRAM_MAP(gegege_mem_map)
16932026   MCFG_CPU_IO_MAP(gegege_io_map)
1694   MCFG_CPU_VBLANK_INT_DRIVER("screen", sigmab98_state,  gegege_vblank_interrupt)
2027   MCFG_CPU_VBLANK_INT_DRIVER("screen", sigmab98_state,  sigmab98_vblank_interrupt)
16952028
2029   MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sigmab98)
2030
16962031   MCFG_NVRAM_ADD_0FILL("nvram")
16972032   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
16982033
16992034   MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW )
17002035
2036   // video hardware
17012037   MCFG_SCREEN_ADD("screen", RASTER)
17022038   MCFG_SCREEN_REFRESH_RATE(60)                    // ?
17032039   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)   // game reads vblank state
1704   MCFG_SCREEN_SIZE(0x200, 0x200)
2040   MCFG_SCREEN_SIZE(0x140, 0x100)
17052041   MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0,0xf0-1)
17062042   MCFG_SCREEN_UPDATE_DRIVER(sigmab98_state, screen_update_sigmab98)
17072043   MCFG_SCREEN_PALETTE("palette")
17082044
17092045   MCFG_GFXDECODE_ADD("gfxdecode", "palette", sigmab98)
1710   MCFG_PALETTE_ADD("palette", 0x100)
2046   MCFG_PALETTE_ADD("palette", 0x100 + 1)
17112047   MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
17122048   MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
17132049
2050   MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
2051
17142052   // sound hardware
17152053   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
17162054
r245657r245658
17192057   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
17202058MACHINE_CONFIG_END
17212059
2060static MACHINE_CONFIG_DERIVED( dodghero, sigmab98 )
2061   MCFG_CPU_MODIFY("maincpu")
2062   MCFG_CPU_PROGRAM_MAP( dodghero_mem_map )
2063   MCFG_CPU_IO_MAP( dodghero_io_map )
2064MACHINE_CONFIG_END
2065
2066static MACHINE_CONFIG_DERIVED( gegege, sigmab98 )
2067   MCFG_CPU_MODIFY("maincpu")
2068   MCFG_CPU_PROGRAM_MAP( gegege_mem_map )
2069   MCFG_CPU_IO_MAP( gegege_io_map )
2070MACHINE_CONFIG_END
2071
2072static MACHINE_CONFIG_DERIVED( dashhero, sigmab98 )
2073   MCFG_CPU_MODIFY("maincpu")
2074   MCFG_CPU_PROGRAM_MAP( gegege_mem_map )
2075   MCFG_CPU_IO_MAP( dashhero_io_map )
2076
2077   MCFG_DEVICE_REMOVE("nvram")   // FIXME: does not survive between sessions otherwise
2078MACHINE_CONFIG_END
2079
2080
17222081/***************************************************************************
17232082                             Sammy Medal Games
17242083***************************************************************************/
r245657r245658
17282087   m_maincpu->set_state_int(Z80_PC, 0x400);  // code starts at 400 ??? (000 = cart header)
17292088}
17302089
2090TIMER_DEVICE_CALLBACK_MEMBER(sigmab98_state::sammymdl_irq)
2091{
2092   int scanline = param;
2093
2094   if(scanline == 240)
2095      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_vblank_vector);
2096
2097   if(scanline == 128)
2098      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_timer0_vector);
2099
2100   if(scanline == 32)
2101      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_timer1_vector);
2102}
2103
17312104static MACHINE_CONFIG_START( sammymdl, sigmab98_state )
17322105   MCFG_CPU_ADD("maincpu", Z80, XTAL_20MHz / 2)    // !! KL5C80A120FP @ 10MHz? (actually 4 times faster than Z80) !!
17332106   MCFG_CPU_PROGRAM_MAP( animalc_map )
r245657r245658
17422115
17432116   // video hardware
17442117   MCFG_SCREEN_ADD("screen", RASTER)
1745   MCFG_SCREEN_REFRESH_RATE(60)
2118   MCFG_SCREEN_REFRESH_RATE(60)                    // ?
2119   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)   // game reads vblank state
17462120   MCFG_SCREEN_SIZE(0x140, 0x100)
17472121   MCFG_SCREEN_VISIBLE_AREA(0, 0x140-1, 0, 0xf0-1)
17482122   MCFG_SCREEN_UPDATE_DRIVER(sigmab98_state, screen_update_sigmab98)
r245657r245658
17502124   MCFG_SCREEN_PALETTE("palette")
17512125
17522126   MCFG_GFXDECODE_ADD("gfxdecode", "palette", sigmab98)
1753   MCFG_PALETTE_ADD("palette", 0x100)
2127   MCFG_PALETTE_ADD("palette", 0x100 + 1)
17542128   MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
17552129   MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG)
17562130
2131//   MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
2132
17572133   // sound hardware
17582134   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
17592135
r245657r245658
17622138   MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
17632139MACHINE_CONFIG_END
17642140
1765
1766/***************************************************************************
1767                                 Animal Catch
1768***************************************************************************/
1769
1770TIMER_DEVICE_CALLBACK_MEMBER(sigmab98_state::sammymd1_irq)
1771{
1772   int scanline = param;
1773
1774   if(scanline == 240)
1775      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_vblank_vector);
1776
1777   if(scanline == 128)
1778      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_timer0_vector);
1779
1780   if(scanline == 32)
1781      m_maincpu->set_input_line_and_vector(0,HOLD_LINE, m_timer1_vector);
1782}
1783
17842141static MACHINE_CONFIG_DERIVED( animalc, sammymdl )
17852142   MCFG_CPU_MODIFY("maincpu")
17862143   MCFG_CPU_PROGRAM_MAP( animalc_map )
17872144   MCFG_CPU_IO_MAP( animalc_io )
1788   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymd1_irq, "screen", 0, 1)
2145   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymdl_irq, "screen", 0, 1)
17892146MACHINE_CONFIG_END
17902147
1791/***************************************************************************
1792                             Hae Hae Ka Ka Ka
1793***************************************************************************/
1794
17952148static MACHINE_CONFIG_DERIVED( haekaka, sammymdl )
17962149   MCFG_CPU_MODIFY("maincpu")
17972150   MCFG_CPU_PROGRAM_MAP( haekaka_map )
17982151   MCFG_CPU_IO_MAP( haekaka_io )
1799   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymd1_irq, "screen", 0, 1)
2152   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymdl_irq, "screen", 0, 1)
18002153MACHINE_CONFIG_END
18012154
1802/***************************************************************************
1803                              Itazura Monkey
1804***************************************************************************/
1805
18062155static MACHINE_CONFIG_DERIVED( itazuram, sammymdl )
18072156   MCFG_CPU_MODIFY("maincpu")
18082157   MCFG_CPU_PROGRAM_MAP( itazuram_map )
18092158   MCFG_CPU_IO_MAP( itazuram_io )
1810   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymd1_irq, "screen", 0, 1)
2159   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymdl_irq, "screen", 0, 1)
18112160MACHINE_CONFIG_END
18122161
1813/***************************************************************************
1814                             Pye-nage Taikai
1815***************************************************************************/
1816
18172162static MACHINE_CONFIG_DERIVED( pyenaget, sammymdl )
18182163   MCFG_CPU_MODIFY("maincpu")
18192164   MCFG_CPU_PROGRAM_MAP( haekaka_map )
18202165   MCFG_CPU_IO_MAP( pyenaget_io )
1821   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymd1_irq, "screen", 0, 1)
2166   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymdl_irq, "screen", 0, 1)
18222167MACHINE_CONFIG_END
18232168
1824/***************************************************************************
1825                             Taihou de Doboon
1826***************************************************************************/
1827
18282169static MACHINE_CONFIG_DERIVED( tdoboon, sammymdl )
18292170   MCFG_CPU_MODIFY("maincpu")
18302171   MCFG_CPU_PROGRAM_MAP( tdoboon_map )
18312172   MCFG_CPU_IO_MAP( tdoboon_io )
1832   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymd1_irq, "screen", 0, 1)
2173   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", sigmab98_state, sammymdl_irq, "screen", 0, 1)
18332174
18342175   MCFG_SCREEN_MODIFY("screen")
18352176   MCFG_SCREEN_VISIBLE_AREA(0,0x140-1, 0+4,0xf0+4-1)
r245657r245658
18442185
18452186/***************************************************************************
18462187
2188  Minna Atsumare! Dodge Hero
2189
2190***************************************************************************/
2191
2192ROM_START( dodghero )
2193   ROM_REGION( 0x20000, "maincpu", 0 )
2194   ROM_LOAD( "b9802-1d.ic7", 0x00000, 0x20000, CRC(093492e3) SHA1(d4dd104dc2410d97add532eea031cbc1ede3b0b1) )
2195
2196   ROM_REGION( 0x100000, "sprites", 0 )
2197   ROM_LOAD( "b9802-2.ic12",  0x00000, 0x80000, CRC(bb810ab8) SHA1(02bb1bb9b6dd0d24401c8a8c579f5ebcba963d8f) )
2198   ROM_LOAD( "b9802-3a.ic13", 0x80000, 0x80000, CRC(8792e487) SHA1(c5ed8059cd40a00656016b33762a04b9bedd7f06) )
2199
2200   ROM_REGION( 0x100000, "ymz", 0 )
2201   ROM_LOAD( "b9802-5.ic16", 0x00000, 0x80000, CRC(4840bdbd) SHA1(82f286ef848df9b6dcb5ff3b3aaa11d8e93e995b) )
2202   ROM_LOAD( "b9802-6.ic26", 0x80000, 0x80000, CRC(d83d8537) SHA1(9a5afdc68417db828a09188d653552452930b136) )
2203ROM_END
2204
2205DRIVER_INIT_MEMBER(sigmab98_state,dodghero)
2206{
2207   // ROM banks
2208   UINT8 *rom = memregion("maincpu")->base();
2209   membank("rombank")->configure_entries(0, 0x18*2, rom + 0x8000, 0x800);
2210
2211   // RAM banks
2212   UINT8 *bankedram = auto_alloc_array(machine(), UINT8, 0x800 * 2);
2213   membank("rambank")->configure_entries(0, 2, bankedram, 0x800);
2214}
2215
2216/***************************************************************************
2217
2218  Itazura Daisuki! Sushimaru Kun
2219
2220***************************************************************************/
2221
2222ROM_START( sushimar )
2223   ROM_REGION( 0x20000, "maincpu", 0 )
2224   ROM_LOAD( "b9803-1c.ic7", 0x00000, 0x20000, CRC(8ad3b7be) SHA1(14d8cec6723f230d4167de91b5b1103fe40755bc) )
2225
2226   ROM_REGION( 0x100000, "sprites", 0 )
2227   ROM_LOAD( "b9803-2.ic12",  0x00000, 0x80000, CRC(cae710a4) SHA1(c0511412d8feaa032b8bcd72074522d1b90f22b2) )
2228   ROM_LOAD( "b9803-03.ic13", 0x80000, 0x80000, CRC(f69f37f6) SHA1(546045b50dbc3ef45fc4dd1c7f2f6a23dfdc53d8) )
2229
2230   ROM_REGION( 0x80000, "ymz", 0 )
2231   ROM_LOAD( "b9803-5a.ic16", 0x00000, 0x80000, CRC(da3f36aa) SHA1(0caffbe6726afd41763f25378f8820724aa7bbce) )
2232ROM_END
2233
2234/***************************************************************************
2235
18472236  GeGeGe no Kitarou Youkai Slot
18482237
18492238  (C) 1997 Banpresto, Sigma
r245657r245658
18942283{
18952284   UINT8 *rom = memregion("maincpu")->base();
18962285
1897   // Protection?
1898   rom[0x0bdd] = 0xc9;
2286   // Related to d013
2287//   rom[0x0bdd] = 0xc9;
18992288
1900   rom[0x0bf9] = 0xc9;
2289//   rom[0x0bf9] = 0xc9;
19012290
1902   rom[0x0dec] = 0x00;
1903   rom[0x0ded] = 0x00;
2291//   rom[0x0dec] = 0x00;
2292//   rom[0x0ded] = 0x00;
19042293
19052294   // EEPROM timing checks
19062295   rom[0x8138] = 0x00;
r245657r245658
19202309   membank("rambank")->set_entry(0);
19212310}
19222311
2312/***************************************************************************
19232313
2314  Burning Sanrinsya - Burning Tricycle
2315
2316***************************************************************************/
2317
2318ROM_START( b3rinsya )
2319   ROM_REGION( 0x20000, "maincpu", 0 )
2320   ROM_LOAD( "b9805-1c.ic7", 0x00000, 0x20000, CRC(a8cde2f4) SHA1(74d1f3f1710084d788a71dec0366f2c3f756fdf8) )
2321
2322   ROM_REGION( 0x100000, "sprites", 0 )
2323   ROM_LOAD( "b9805-2.ic12", 0x00000, 0x80000, CRC(7ec2e957) SHA1(1eb9095663d4f8f8f0c77f151918af1978332b3d) )
2324   ROM_LOAD( "b9805-3.ic13", 0x80000, 0x80000, CRC(449d0848) SHA1(63e91e4be8b58a6ebf1777ed5a9c23416bacba48) )
2325
2326   ROM_REGION( 0x80000, "ymz", 0 )
2327   ROM_LOAD( "b9805-5.ic16", 0x00000, 0x80000, CRC(f686f886) SHA1(ab68d12c5cb3a9fbc8a178739f39a2ff3104a0a1) )
2328ROM_END
2329
2330DRIVER_INIT_MEMBER(sigmab98_state,b3rinsya)
2331{
2332   UINT8 *rom = memregion("maincpu")->base();
2333
2334   // EEPROM timing checks
2335   rom[0x8138] = 0x00;
2336   rom[0x8139] = 0x00;
2337
2338   rom[0x8164] = 0x00;
2339   rom[0x8165] = 0x00;
2340
2341   // ROM banks
2342   membank("rombank")->configure_entries(0, 0x18, rom + 0x8000, 0x1000);
2343   membank("rombank")->set_entry(0);
2344
2345   // RAM banks
2346   UINT8 *bankedram = auto_alloc_array(machine(), UINT8, 0x800 * 2);
2347   membank("rambank")->configure_entries(0, 2, bankedram, 0x800);
2348   membank("rambank")->set_entry(0);
2349}
2350
19242351/***************************************************************************
19252352
19262353  PEPSI Man
r245657r245658
19432370{
19442371   UINT8 *rom = memregion("maincpu")->base();
19452372
1946   // Protection?
1947   rom[0x058a] = 0xc9;
2373   // Related to d013
2374//   rom[0x058a] = 0xc9;
19482375
1949   rom[0x05a6] = 0xc9;
2376//   rom[0x05a6] = 0xc9;
19502377
1951   rom[0xa00e] = 0x00;
1952   rom[0xa00f] = 0x00;
2378//   rom[0xa00e] = 0x00;
2379//   rom[0xa00f] = 0x00;
19532380
19542381   // EEPROM timing checks
19552382   rom[0x8138] = 0x00;
r245657r245658
19692396   membank("rambank")->set_entry(0);
19702397}
19712398
2399/***************************************************************************
19722400
2401  Transformers Beast Wars II
2402
2403***************************************************************************/
2404
2405ROM_START( tbeastw2 )
2406   ROM_REGION( 0x20000, "maincpu", 0 )
2407   ROM_LOAD( "b9808-1b.ic7.bin", 0x00000, 0x20000, CRC(65f7e079) SHA1(d421da3c99d62d3228e1b9c1cfb2de51f0fcc56e) )
2408
2409   ROM_REGION( 0x180000, "sprites", 0 )
2410   ROM_LOAD( "b9808-2.ic12.bin", 0x000000, 0x80000, CRC(dda5c2d2) SHA1(1bb21e7251df93b0f502b716e958d81f4e4e46dd) )
2411   ROM_LOAD( "b9808-3.ic13.bin", 0x080000, 0x80000, CRC(80df49c6) SHA1(14342be3a176cdf015c0ac07a4f1c109862c67aa) )
2412   ROM_LOAD( "b9808-4.ic17.bin", 0x100000, 0x80000, CRC(d90961ea) SHA1(c2f226a528238eafc1ba37200da4ee6ce9b54325) )
2413
2414   ROM_REGION( 0x100000, "ymz", 0 )
2415   ROM_LOAD( "b9808-5.ic16.bin", 0x00000, 0x80000, CRC(762c6d5f) SHA1(0d4e35b7f346c8cc0c49163474f34c1fc462998a) )
2416   ROM_LOAD( "b9808-6.ic26.bin", 0x80000, 0x80000, CRC(9ed759c9) SHA1(963db80b8a107ce9292bbc776ba91bc76ad82d5b) )
2417ROM_END
2418
2419DRIVER_INIT_MEMBER(sigmab98_state,tbeastw2)
2420{
2421   UINT8 *rom = memregion("maincpu")->base();
2422
2423   // EEPROM timing checks
2424   rom[0x8138] = 0x00;
2425   rom[0x8139] = 0x00;
2426
2427   rom[0x8164] = 0x00;
2428   rom[0x8165] = 0x00;
2429
2430   // ROM banks
2431   membank("rombank")->configure_entries(0, 0x18, rom + 0x8000, 0x1000);
2432   membank("rombank")->set_entry(0);
2433
2434   // RAM banks
2435   UINT8 *bankedram = auto_alloc_array(machine(), UINT8, 0x800 * 2);
2436   membank("rambank")->configure_entries(0, 2, bankedram, 0x800);
2437   membank("rambank")->set_entry(0);
2438}
2439
19732440/***************************************************************************
19742441
19752442  Uchuu Tokkyuu Medalian
r245657r245658
19942461{
19952462   UINT8 *rom = memregion("maincpu")->base();
19962463
1997   // Protection?
1998   rom[0x0bfa] = 0xc9;
2464   // Related to d013
2465//   rom[0x0bfa] = 0xc9;
19992466
2000   rom[0x0c16] = 0xc9;
2467//   rom[0x0c16] = 0xc9;
20012468
2002   rom[0xa43a] = 0x00;
2003   rom[0xa43b] = 0x00;
2469//   rom[0xa43a] = 0x00;
2470//   rom[0xa43b] = 0x00;
20042471
20052472   // EEPROM timing checks
20062473   rom[0x8138] = 0x00;
r245657r245658
20202487   membank("rambank")->set_entry(0);
20212488}
20222489
2490/***************************************************************************
20232491
2492  Minna Ganbare! Dash Hero
2493
2494***************************************************************************/
2495
2496ROM_START( dashhero )
2497   ROM_REGION( 0x20000, "maincpu", 0 )
2498   ROM_LOAD( "b098111-0101.ic7", 0x00000, 0x20000, CRC(46488393) SHA1(898bafbf5273b368cf963d863fb93e9fa0da816f) )
2499
2500   ROM_REGION( 0x180000, "sprites", 0 )
2501   ROM_LOAD( "b98114-0100.ic12", 0x000000, 0x80000, CRC(067625ea) SHA1(f9dccfc85adbb840da7512db0c88f554b453d2d2) )
2502   ROM_LOAD( "b98115-0100.ic13", 0x080000, 0x80000, CRC(d6f0b89d) SHA1(33b5f2f6529fd9a145ccb1b4deffabf5fa0d46cb) )
2503   ROM_LOAD( "b98116-0100.ic17", 0x100000, 0x80000, CRC(c0dbe953) SHA1(a75e202a0c1be988b8fd7d4ee23ebc82f6110e5f) )
2504
2505   ROM_REGION( 0x80000, "ymz", 0 )
2506   ROM_LOAD( "b098112-0100.ic16", 0x00000, 0x80000, CRC(26e5d6f5) SHA1(6fe6a26e51097886db58a6619b12a73cd21e7130) )
2507ROM_END
2508
2509DRIVER_INIT_MEMBER(sigmab98_state,dashhero)
2510{
2511   UINT8 *rom = memregion("maincpu")->base();
2512
2513   // EEPROM timing checks
2514   rom[0x8138] = 0x00;
2515   rom[0x8139] = 0x00;
2516
2517   rom[0x8162] = 0x00;
2518   rom[0x8163] = 0x00;
2519
2520   // ROM banks
2521   membank("rombank")->configure_entries(0, 0x18, rom + 0x8000, 0x1000);
2522   membank("rombank")->set_entry(0);
2523
2524   // RAM banks
2525   UINT8 *bankedram = auto_alloc_array(machine(), UINT8, 0x800 * 4);
2526   membank("rambank")->configure_entries(0, 4, bankedram, 0x800);
2527   membank("rambank")->set_entry(0);
2528}
2529
2530
20242531/***************************************************************************
20252532
20262533  Sammy Medal Games
r245657r245658
22672774   m_spriteram.allocate(0x1000);
22682775   memset(m_spriteram, 0, 0x1000);
22692776
2777   m_vregs.allocate(0x22);
2778   memset(m_vregs, 0, 0x22);
2779
2780   m_vtable.allocate(0x80);
2781   memset(m_vtable, 0, 0x80);
2782
22702783   m_rombank = 0x65;
22712784   m_rambank = 0x53;
22722785
r245657r245658
22822795
22832796***************************************************************************/
22842797
2285GAME( 1997, gegege,   0,        gegege,   gegege, sigmab98_state,   gegege,   ROT0, "Banpresto / Sigma", "GeGeGe no Kitarou Youkai Slot", 0 )
2286GAME( 1997, pepsiman, 0,        gegege,   pepsiman, sigmab98_state, pepsiman, ROT0, "Sigma",             "PEPSI Man",                     0 )
2287GAME( 1997, ucytokyu, 0,        gegege,   ucytokyu, sigmab98_state, ucytokyu, ROT0, "Sigma",             "Uchuu Tokkyuu Medalian",        0 )   // Banpresto + others in the ROM
2798GAME( 1997, dodghero, 0,        dodghero, sigma_1b, sigmab98_state, dodghero, ROT0, "Sigma",             "Minna Atsumare! Dodge Hero",           GAME_IMPERFECT_GRAPHICS )
2799GAME( 1997, sushimar, 0,        dodghero, sigma_3b, sigmab98_state, dodghero, ROT0, "Sigma",             "Itazura Daisuki! Sushimaru Kun",       GAME_IMPERFECT_GRAPHICS )
2800GAME( 1997, gegege,   0,        gegege,   sigma_1b, sigmab98_state, gegege,   ROT0, "Sigma / Banpresto", "GeGeGe no Kitarou Youkai Slot",        GAME_IMPERFECT_GRAPHICS )
2801GAME( 1997, b3rinsya, 0,        gegege,   sigma_5b, sigmab98_state, b3rinsya, ROT0, "Sigma",             "Burning Sanrinsya - Burning Tricycle", GAME_IMPERFECT_GRAPHICS ) // 1997 in the rom
2802GAME( 1997, pepsiman, 0,        gegege,   sigma_3b, sigmab98_state, pepsiman, ROT0, "Sigma",             "PEPSI Man",                            GAME_IMPERFECT_GRAPHICS )
2803GAME( 1998, tbeastw2, 0,        gegege,   sigma_3b, sigmab98_state, tbeastw2, ROT0, "Sigma / Transformer Production Company / Takara", "Transformers Beast Wars II", GAME_IMPERFECT_GRAPHICS ) // 1997 in the rom
2804GAME( 1997, ucytokyu, 0,        gegege,   sigma_js, sigmab98_state, ucytokyu, ROT0, "Sigma",             "Uchuu Tokkyuu Medalian",               GAME_IMPERFECT_GRAPHICS ) // Banpresto + others in the ROM
2805GAME( 2000, dashhero, 0,        dashhero, sigma_1b, sigmab98_state, dashhero, ROT0, "Sigma",             "Minna Ganbare! Dash Hero",             GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING ) // 1999 in the rom
22882806// Sammy Medal Games:
2289GAME( 2000, sammymdl, 0,        sammymdl, sammymdl, driver_device, 0,        ROT0, "Sammy",             "Sammy Medal Game System Bios",  GAME_IS_BIOS_ROOT )
2290GAME( 2000, animalc,  sammymdl, animalc,  sammymdl, sigmab98_state, animalc,  ROT0, "Sammy",             "Animal Catch",                  0 )
2291GAME( 2000, itazuram, sammymdl, itazuram, sammymdl, sigmab98_state, itazuram, ROT0, "Sammy",             "Itazura Monkey",                0 )
2292GAME( 2000, pyenaget, sammymdl, pyenaget, sammymdl, sigmab98_state, haekaka,  ROT0, "Sammy",             "Pye-nage Taikai",               0 )
2293GAME( 2000, tdoboon,  sammymdl, tdoboon,  haekaka, sigmab98_state,  haekaka,  ROT0, "Sammy",             "Taihou de Doboon",              0 )
2294GAME( 2001, haekaka,  sammymdl, haekaka,  haekaka, sigmab98_state,  haekaka,  ROT0, "Sammy",             "Hae Hae Ka Ka Ka",              0 )
2807GAME( 2000, sammymdl, 0,        sammymdl, sammymdl, driver_device,  0,        ROT0, "Sammy",             "Sammy Medal Game System Bios",         GAME_IS_BIOS_ROOT )
2808GAME( 2000, animalc,  sammymdl, animalc,  sammymdl, sigmab98_state, animalc,  ROT0, "Sammy",             "Animal Catch",                         GAME_IMPERFECT_GRAPHICS )
2809GAME( 2000, itazuram, sammymdl, itazuram, sammymdl, sigmab98_state, itazuram, ROT0, "Sammy",             "Itazura Monkey",                       GAME_IMPERFECT_GRAPHICS )
2810GAME( 2000, pyenaget, sammymdl, pyenaget, sammymdl, sigmab98_state, haekaka,  ROT0, "Sammy",             "Pye-nage Taikai",                      GAME_IMPERFECT_GRAPHICS )
2811GAME( 2000, tdoboon,  sammymdl, tdoboon,  haekaka,  sigmab98_state, haekaka,  ROT0, "Sammy",             "Taihou de Doboon",                     GAME_IMPERFECT_GRAPHICS )
2812GAME( 2001, haekaka,  sammymdl, haekaka,  haekaka,  sigmab98_state, haekaka,  ROT0, "Sammy",             "Hae Hae Ka Ka Ka",                     GAME_IMPERFECT_GRAPHICS )
trunk/src/mame/mame.lst
r245657r245658
97269726jwildb52h       // (c) 199? Sigma
97279727
97289728// Sigma B98 / Sammy Medal Games
9729gegege          // (c) 1997 Banpresto / Sigma
9730pepsiman        // (c) 1997 Sigma
9731ucytokyu        // (c) 1997 Sigma
9729dodghero        // b9802 (c) 1997 Sigma
9730sushimar        // b9803 (c) 1997 Sigma
9731gegege          // b9804 (c) 1997 Sigma / Banpresto
9732b3rinsya        // b9805 (c) 1997 Sigma
9733pepsiman        // b9806 (c) 1997 Sigma
9734tbeastw2        // b9808 (c) 1998 Sigma / Transformer Production Company / Takara
9735ucytokyu        // b9809 (c) 1997 Sigma
9736dashhero        // b9811 (c) 1999 Sigma
97329737sammymdl        // (c) 2000-2003 Sammy
97339738animalc         // (c) 2000 Sammy
97349739itazuram        // (c) 2000 Sammy


Previous 199869 Revisions Next


© 1997-2024 The MAME Team