Previous 199869 Revisions Next

r33403 Sunday 16th November, 2014 at 01:37:32 UTC by Alex W. Jackson
Merge pull request #47 from cuavas/master

tilemap.c internal documentation update; dooyong.c cleanups; prehisle.c pdrawgfx conversion
[src/emu/bus/plus4]c1551.h
[src/emu/machine]pla.c pla.h
[src/lib/util]plaparse.c
[src/mame]mame.lst mame.mak
[src/mame/drivers]alinvade.c dynax.c goldngam.c lethal.c meritm.c naomi.c popobear.c
[src/mame/etc]template_cpu.c template_cpu.h template_device.c template_device.h template_driver.c template_readme.txt*
[src/mame/includes]lethal.h
[src/mame/layout]alinvade.lay*
[src/mame/machine]naomim4.c naomim4.h
[src/mame/video]lethal.c
[src/mess/drivers]comp4.c ngen.c simon.c
[src/mess/includes]c128.h c64.h cbm2.h gamecom.h pet.h plus4.h
[src/mess/layout]gamecom.lay

trunk/src/emu/bus/plus4/c1551.h
r241914r241915
8484   required_device<tpi6525_device> m_tpi0;
8585   required_device<tpi6525_device> m_tpi1;
8686   required_device<c64h156_device> m_ga;
87   required_device<pls100_device> m_pla;
87   required_device<pla_device> m_pla;
8888   required_device<floppy_image_device> m_floppy;
8989   required_device<plus4_expansion_slot_device> m_exp;
9090   required_ioport m_jp1;
trunk/src/emu/machine/pla.c
r241914r241915
22// copyright-holders:Curt Coder
33/**********************************************************************
44
5    PLS100 16x48x8 Programmable Logic Array emulation
5    PLA (Programmable Logic Array) emulation
66
77    Copyright MESS Team.
88    Visit http://mamedev.org for licensing and usage restrictions.
r241914r241915
1010**********************************************************************/
1111
1212#include "pla.h"
13#include "jedparse.h"
14#include "plaparse.h"
1315
1416
17const device_type PLA = &device_creator<pla_device>;
1518
16//**************************************************************************
17//  DEVICE TYPE DEFINITIONS
18//**************************************************************************
19
20const device_type PLS100 = &device_creator<pls100_device>;
21const device_type MOS8721 = &device_creator<mos8721_device>;
22
23
24
25//**************************************************************************
26//  LIVE DEVICE
27//**************************************************************************
28
2919//-------------------------------------------------
3020//  pla_device - constructor
3121//-------------------------------------------------
3222
33pla_device::pla_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int inputs, int outputs, int terms, UINT32 input_mask, const char *shortname, const char *source) :
34   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
35   m_inputs(inputs),
36   m_outputs(outputs),
37   m_terms(terms),
38   m_input_mask(((UINT64)input_mask << 32) | input_mask)
23pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
24   : device_t(mconfig, PLA, "PLA", tag, owner, clock, "pla", __FILE__),
25      m_format(PLA_FMT_JEDBIN),
26      m_inputs(0),
27      m_outputs(0),
28      m_terms(0),
29      m_input_mask(0)
3930{
4031}
4132
42pls100_device::pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
43   pla_device(mconfig, PLS100, "PLS100", tag, owner, clock, 16, 8, 48, 0xffff, "pls100", __FILE__),
44   m_output(*this, "output")
45{
46}
4733
48mos8721_device::mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
49   pla_device(mconfig, MOS8721, "MOS8721", tag, owner, clock, 27, 18, 379, 0x7ffffff, "mos8721", __FILE__) // TODO actual number of terms is unknown
50{
51}
52
53
5434//-------------------------------------------------
5535//  device_start - device-specific startup
5636//-------------------------------------------------
5737
5838void pla_device::device_start()
5939{
60   assert(machine().root_device().memregion(tag()) != NULL);
40   assert(region() != NULL);
41   assert(m_terms < MAX_TERMS);
42   assert(m_inputs < 32 && m_outputs <= 32);
6143
44   if (m_input_mask == 0)
45      m_input_mask = ((UINT64)1 << m_inputs) - 1;
46   m_input_mask = ((UINT64)m_input_mask << 32) | m_input_mask;
47
6248   // parse fusemap
6349   parse_fusemap();
6450
65   // clear cache
66   for (int i = 0; i < CACHE_SIZE; i++)
67   {
68      m_cache[i] = 0;
69   }
51   // initialize cache
52   m_cache2_ptr = 0;
53   for (int i = 0; i < CACHE2_SIZE; i++)
54      m_cache2[i] = 0x80000000;
7055
71   m_cache_ptr = 0;
56   m_cache_size = 0;
57   int csize = 1 << ((m_inputs > MAX_CACHE_BITS) ? MAX_CACHE_BITS : m_inputs);
58   m_cache.resize(csize);
59   for (int i = 0; i < csize; i++)
60      m_cache[i] = read(i);
61   
62   m_cache_size = csize;
7263}
7364
74void pls100_device::device_start()
75{
76   pla_device::device_start();
7765
78   m_output.allocate(0x10000);
79
80   for (UINT32 input = 0; input < 0x10000; input++)
81   {
82      m_output[input] = pla_device::read(input);
83   }
84}
85
86
8766//-------------------------------------------------
8867//  parse_fusemap -
8968//-------------------------------------------------
9069
9170void pla_device::parse_fusemap()
9271{
93   memory_region *region = machine().root_device().memregion(tag());
9472   jed_data jed;
95
96   jedbin_parse(region->base(), region->bytes(), &jed);
97
73   int result = JEDERR_NONE;
74   
75   // read pla file
76   switch (m_format)
77   {
78      case PLA_FMT_JEDBIN:
79         result = jedbin_parse(region()->base(), region()->bytes(), &jed);
80         break;
81     
82      case PLA_FMT_BERKELEY:
83         result = pla_parse(region()->base(), region()->bytes(), &jed);
84         break;
85   }
86   
87   if (result != JEDERR_NONE)
88      fatalerror("%s PLA parse error %d\n", tag(), result);
89   
90   // parse it
9891   UINT32 fusenum = 0;
9992
10093   for (int p = 0; p < m_terms; p++)
r241914r241915
143136UINT32 pla_device::read(UINT32 input)
144137{
145138   // try the cache first
146   for (int i = 0; i < CACHE_SIZE; ++i)
139   if (input < m_cache_size)
140      return m_cache[input];
141   
142   for (int i = 0; i < CACHE2_SIZE; ++i)
147143   {
148      UINT64 cache_entry = m_cache[i];
144      UINT64 cache2_entry = m_cache2[i];
149145
150      if ((UINT32)cache_entry == input)
146      if ((UINT32)cache2_entry == input)
151147      {
152         // cache hit
153         return cache_entry >> 32;
148         // cache2 hit
149         return cache2_entry >> 32;
154150      }
155151   }
156152
r241914r241915
170166
171167   s ^= m_xor;
172168
173   // store output in cache
174   m_cache[m_cache_ptr] = s | input;
175   ++m_cache_ptr &= (CACHE_SIZE - 1);
169   // store output in cache2
170   m_cache2[m_cache2_ptr] = s | input;
171   ++m_cache2_ptr &= (CACHE2_SIZE - 1);
176172
177173   return s >> 32;
178174}
179
180
181//-------------------------------------------------
182//  read -
183//-------------------------------------------------
184
185UINT32 pls100_device::read(UINT32 input)
186{
187   return m_output[input];
188}
trunk/src/emu/machine/pla.h
r241914r241915
22// copyright-holders:Curt Coder
33/**********************************************************************
44
5    PLS100 16x48x8 Programmable Logic Array emulation
5    PLA (Programmable Logic Array) emulation
66
77    Copyright MESS Team.
88    Visit http://mamedev.org for licensing and usage restrictions.
99
10**********************************************************************
11                            _____   _____
12                    FE   1 |*    \_/     | 28  Vcc
13                    I7   2 |             | 27  I8
14                    I6   3 |             | 26  I9
15                    I5   4 |             | 25  I10
16                    I4   5 |             | 24  I11
17                    I3   6 |    82S100   | 23  I12
18                    I2   7 |    82S101   | 22  I13
19                    I1   8 |    PLS100   | 21  I14
20                    I0   9 |    PLS101   | 20  I15
21                    F7  10 |             | 19  _CE
22                    F6  11 |             | 18  F0
23                    F5  12 |             | 17  F1
24                    F4  13 |             | 16  F2
25                   GND  14 |_____________| 15  F3
26
2710**********************************************************************/
2811
2912#pragma once
r241914r241915
3215#define __PLA__
3316
3417#include "emu.h"
35#include "jedparse.h"
3618
3719
3820
r241914r241915
4123//**************************************************************************
4224
4325#define MAX_TERMS       512
44#define CACHE_SIZE      8
26#define MAX_CACHE_BITS  16
27#define CACHE2_SIZE     8
4528
29enum
30{
31   PLA_FMT_JEDBIN = 0,
32   PLA_FMT_BERKELEY
33};
4634
4735
36
4837///*************************************************************************
4938//  INTERFACE CONFIGURATION MACROS
5039///*************************************************************************
5140
41#define MCFG_PLA_ADD(_tag, _inputs, _outputs, _terms) \
42   MCFG_DEVICE_ADD(_tag, PLA, 0) \
43   pla_device::set_num_inputs(*device, _inputs); \
44   pla_device::set_num_outputs(*device, _outputs); \
45   pla_device::set_num_terms(*device, _terms);
46
47#define MCFG_PLA_INPUTMASK(_mask) \
48   pla_device::set_inputmask(*device, _mask);
49
50#define MCFG_PLA_FILEFORMAT(_format) \
51   pla_device::set_format(*device, _format);
52
53
54// macros for known (and used) devices
55
56// 82S100, 82S101, PLS100, PLS101
57// 16x48x8 PLA, 28-pin:
58/*           _____   _____
59     FE   1 |*    \_/     | 28  Vcc
60     I7   2 |             | 27  I8
61     I6   3 |             | 26  I9
62     I5   4 |             | 25  I10
63     I4   5 |             | 24  I11
64     I3   6 |    82S100   | 23  I12
65     I2   7 |    82S101   | 22  I13
66     I1   8 |    PLS100   | 21  I14
67     I0   9 |    PLS101   | 20  I15
68     F7  10 |             | 19  _CE
69     F6  11 |             | 18  F0
70     F5  12 |             | 17  F1
71     F4  13 |             | 16  F2
72    GND  14 |_____________| 15  F3
73*/
5274#define MCFG_PLS100_ADD(_tag) \
53   MCFG_DEVICE_ADD(_tag, PLS100, 0)
75   MCFG_PLA_ADD(_tag, 16, 8, 48)
5476
77// MOS 8721 PLA
78// TODO: actual number of terms is unknown
5579#define MCFG_MOS8721_ADD(_tag) \
56   MCFG_DEVICE_ADD(_tag, MOS8721, 0)
80   MCFG_PLA_ADD(_tag, 27, 18, 379)
5781
5882
83
5984///*************************************************************************
6085//  TYPE DEFINITIONS
6186///*************************************************************************
6287
6388// ======================> pla_device
6489
65class pla_device : public device_t
90class pla_device : public device_t
6691{
6792public:
6893   // construction/destruction
69   pla_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int inputs, int outputs, int terms, UINT32 output_mask, const char *shortname, const char *source);
94   pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
7095
71   virtual UINT32 read(UINT32 input);
96   // static configuration helpers
97   static void set_num_inputs(device_t &device, UINT32 i) { downcast<pla_device &>(device).m_inputs = i; }
98   static void set_num_outputs(device_t &device, UINT32 o) { downcast<pla_device &>(device).m_outputs = o; }
99   static void set_num_terms(device_t &device, UINT32 t) { downcast<pla_device &>(device).m_terms = t; }
100   static void set_inputmask(device_t &device, UINT32 mask) { downcast<pla_device &>(device).m_input_mask = mask; } // UINT32!
101   static void set_format(device_t &device, int format) { downcast<pla_device &>(device).m_format = format; }
72102
103   UINT32 read(UINT32 input);
104
73105protected:
74106   // device-level overrides
75107   virtual void device_start();
76108
109private:
77110   void parse_fusemap();
78111
79   int m_inputs;
80   int m_outputs;
81   int m_terms;
112   int m_format;
113   
114   UINT32 m_inputs;
115   UINT32 m_outputs;
116   UINT32 m_terms;
82117   UINT64 m_input_mask;
83118   UINT64 m_xor;
84119
120   int m_cache_size;
121   dynamic_array<UINT32> m_cache;
122   UINT64 m_cache2[CACHE2_SIZE];
123   UINT8 m_cache2_ptr;
124
85125   struct term
86126   {
87127      UINT64 m_and;
88128      UINT64 m_or;
89   };
90
91   term m_term[MAX_TERMS];
92
93   UINT64 m_cache[CACHE_SIZE];
94   UINT8 m_cache_ptr;
129   } m_term[MAX_TERMS];
95130};
96131
97132
98// ======================> pls100_device
99
100class pls100_device : public pla_device
101{
102public:
103   pls100_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
104
105   // device-level overrides
106   virtual void device_start();
107
108   virtual UINT32 read(UINT32 input);
109
110private:
111   optional_shared_ptr<UINT8> m_output;
112};
113
114
115// ======================> mos8721_device
116
117class mos8721_device : public pla_device
118{
119public:
120   mos8721_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
121};
122
123
124133// device type definition
125extern const device_type PLS100;
126extern const device_type MOS8721;
134extern const device_type PLA;
127135
128136
129
130137#endif
trunk/src/lib/util/plaparse.c
r241914r241915
183183
184184      // end of file
185185      case 'e':
186         printf("End of file\n");
186         if (LOG_PARSE) printf("End of file\n");
187187         break;
188188   }
189189
trunk/src/mame/drivers/alinvade.c
r241914r241915
22
33 tiny bartop b&w Space Invaders type game with colour overlay
44 
5 does it use any off-the shelf chips in addition to the 6502?
5 Driver by David Haywood and Mariusz Wojcieszek
66
7 TODO:
8 - 16 bytes are protected in the c*** range. I'm guessing they used a PROM to protect a
9 simple sub-routine because just after that the program has a left-over located at 0xe000-0xe00f (yup, NOPs + a RTS)
10 It's unknown at current stage what it really protects tho ...
11 
12 */
713
8*/
9
1014#include "emu.h"
1115#include "cpu/m6502/m6502.h"
16#include "alinvade.lh"
1217
1318class alinvade_state : public driver_device
1419{
1520public:
1621   alinvade_state(const machine_config &mconfig, device_type type, const char *tag)
1722      : driver_device(mconfig, type, tag),
23       m_maincpu(*this, "maincpu"),
1824         m_videoram(*this, "videoram")
1925   { }
20
26   
27   UINT8 irqmask;
28   UINT8 irqff;
29   DECLARE_READ8_MEMBER(irqmask_r);
30   DECLARE_WRITE8_MEMBER(irqmask_w);
31   INTERRUPT_GEN_MEMBER(vblank_irq);
32   required_device<cpu_device> m_maincpu;
2133   required_shared_ptr<UINT8> m_videoram;
2234
2335public:
r241914r241915
2638   UINT32 screen_update_alinvade(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
2739};
2840
41READ8_MEMBER(alinvade_state::irqmask_r)
42{
43   return 0; // TODO: might be anything
44}
2945
3046
47WRITE8_MEMBER(alinvade_state::irqmask_w)
48{
49   if((!(irqff & 1)) && (data & 1)) // f/f, active high? If the above actually returns 0xff this could be active low ...
50      irqmask^= 1;
51     
52   irqff = data;
53}
54
3155static ADDRESS_MAP_START( alinvade_map, AS_PROGRAM, 8, alinvade_state )
32   AM_RANGE(0x0000, 0x01ff) AM_RAM   
33   AM_RANGE(0x0400, 0x0bff) AM_RAM   AM_SHARE("videoram")
56    AM_RANGE(0x0000, 0x01ff) AM_RAM
57    AM_RANGE(0x0400, 0x0bff) AM_RAM AM_SHARE("videoram")
58   AM_RANGE(0x0c00, 0x0dff) AM_RAM
59    AM_RANGE(0x2000, 0x2000) AM_WRITENOP //??
60    AM_RANGE(0x4000, 0x4000) AM_READ_PORT("COIN")
61    AM_RANGE(0x6000, 0x6000) AM_READ_PORT("DSW")
62    AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0")
63    AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN1")
64    AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN2")
65    AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN3")
66    AM_RANGE(0x8004, 0x8004) AM_READ_PORT("IN4")
67    AM_RANGE(0xa000, 0xa000) AM_WRITENOP //??
68    AM_RANGE(0xc000, 0xc00f) AM_MIRROR(0xff0) AM_ROM AM_REGION("proms",0)
69    AM_RANGE(0xe000, 0xe3ff) AM_ROM
70    AM_RANGE(0xe400, 0xe400) AM_WRITENOP //??
71    AM_RANGE(0xe800, 0xe800) AM_READWRITE(irqmask_r,irqmask_w) //??
72    AM_RANGE(0xec00, 0xffff) AM_ROM
73ADDRESS_MAP_END
3474
35   AM_RANGE(0xe000, 0xe3ff) AM_ROM
36   AM_RANGE(0xe800, 0xebff) AM_RAM   
37   AM_RANGE(0xec00, 0xffff) AM_ROM
3875
76static INPUT_PORTS_START( alinvade )
77    PORT_START("COIN")
78    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN1 )
79    PORT_BIT(0xef, IP_ACTIVE_LOW, IPT_UNKNOWN )
3980
40ADDRESS_MAP_END
81    PORT_START("IN0")
82    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
83    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
4184
85    PORT_START("IN1")
86    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
87    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
4288
43static INPUT_PORTS_START( alinvade )
89    PORT_START("IN2")
90    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
91    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
92
93    PORT_START("IN3")
94    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START1 )
95    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
96
97    PORT_START("IN4")
98    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START2 )
99    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
100
101    PORT_START("DSW")
102    PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
103    PORT_DIPSETTING(    0x00, "2" )
104    PORT_DIPSETTING(    0x01, "3" )
105    PORT_DIPSETTING(    0x02, "4" )
106    PORT_DIPSETTING(    0x03, "5" )
107    PORT_DIPNAME( 0x04, 0x00, DEF_STR ( Unknown ) )    // read, but not tested afterwards?
108    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
109    PORT_DIPSETTING(    0x04, DEF_STR( On ) )
110    PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
44111INPUT_PORTS_END
45112
46113
47
48114void alinvade_state::machine_start()
49115{
50116}
51117
52118void alinvade_state::machine_reset()
53119{
120   irqmask = 1;
54121}
55122
56123UINT32 alinvade_state::screen_update_alinvade(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
r241914r241915
79146   return 0;
80147}
81148
149INTERRUPT_GEN_MEMBER(alinvade_state::vblank_irq)
150{
151   if(irqmask & 1)
152      m_maincpu->set_input_line(0,HOLD_LINE);
153}
82154
83155static MACHINE_CONFIG_START( alinvade, alinvade_state )
84156
85157   /* basic machine hardware */
86158   MCFG_CPU_ADD("maincpu", M6502,2000000)         /* ? MHz */
87159   MCFG_CPU_PROGRAM_MAP(alinvade_map)
88//   MCFG_CPU_VBLANK_INT_DRIVER("screen", alinvade_state,  irq0_line_hold)
160   MCFG_CPU_VBLANK_INT_DRIVER("screen", alinvade_state,  vblank_irq)
89161
90162   /* video hardware */
91163   MCFG_SCREEN_ADD("screen", RASTER)
r241914r241915
95167   MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 128-1)
96168   MCFG_SCREEN_UPDATE_DRIVER(alinvade_state, screen_update_alinvade)
97169
170   // TODO: MCFG_DEFAULT_LAYOUT for square pixels
171   
98172   /* sound hardware */
99173   MCFG_SPEAKER_STANDARD_MONO("mono")
100174MACHINE_CONFIG_END
r241914r241915
103177
104178ROM_START( alinvade )
105179   ROM_REGION( 0x10000, "maincpu", 0 ) // todo, check mapping
106   ROM_LOAD( "alien28.708", 0xe000, 0x0400, CRC(de376295) SHA1(e8eddbb1be1f8661c6b5b39c0d78a65bded65db2) )
107   ROM_LOAD( "alien29.708", 0xec00, 0x0400, CRC(20212977) SHA1(9d24a6b403d968267079fa6241545bd5a01afebb) )
108   ROM_LOAD( "alien30.708", 0xf000, 0x0400, CRC(734b691c) SHA1(9e562159061eecf4b1dee4ea0ee4752c901a54aa) )
109   ROM_LOAD( "alien31.708", 0xf400, 0x0400, CRC(5a70535c) SHA1(2827e7d4bffca78bd035da04481e1e972ee2da39) )
110   ROM_LOAD( "alien32.708", 0xf800, 0x0400, CRC(332dd234) SHA1(9974668344a2a351868a9e7757d1c3a497dc5621) )
111   ROM_LOAD( "alien33.708", 0xfc00, 0x0400, CRC(e0d57fc7) SHA1(7b8ddcb4a86811592d2d0bbc61b2f19e5caa9ccc) )
180    ROM_LOAD( "alien28.708", 0xe000, 0x0400, CRC(de376295) SHA1(e8eddbb1be1f8661c6b5b39c0d78a65bded65db2) )
181    ROM_LOAD( "alien29.708", 0xec00, 0x0400, CRC(20212977) SHA1(9d24a6b403d968267079fa6241545bd5a01afebb) )
182    ROM_LOAD( "alien30.708", 0xf000, 0x0400, CRC(734b691c) SHA1(9e562159061eecf4b1dee4ea0ee4752c901a54aa) )
183    ROM_LOAD( "alien31.708", 0xf400, 0x0400, CRC(5a70535c) SHA1(2827e7d4bffca78bd035da04481e1e972ee2da39) )
184    ROM_LOAD( "alien32.708", 0xf800, 0x0400, CRC(332dd234) SHA1(9974668344a2a351868a9e7757d1c3a497dc5621) )
185    ROM_LOAD( "alien33.708", 0xfc00, 0x0400, CRC(e0d57fc7) SHA1(7b8ddcb4a86811592d2d0bbc61b2f19e5caa9ccc) )
186
187   ROM_REGION( 0x20, "proms", 0 )
188   ROM_LOAD( "prom", 0, 0x20, NO_DUMP )
189   ROM_FILL( 0x00, 0x0f, 0xea )   
190   ROM_FILL( 0x0f, 0x01, 0x60 )    // rts for whole area, interrupt code jumps to various addresses here, check note on top.   
112191ROM_END
113192
114193
115GAME( 198?, alinvade,  0,    alinvade, alinvade, driver_device,  0, ROT90, "Forbes?", "Alien Invaders", GAME_NOT_WORKING )
194GAMEL( 198?, alinvade,  0,    alinvade, alinvade, driver_device,  0, ROT90, "Forbes?", "Alien Invaders", GAME_UNEMULATED_PROTECTION | GAME_NO_SOUND, layout_alinvade )
trunk/src/mame/drivers/dynax.c
r241914r241915
482482   AM_RANGE( 0x8000, 0x81ff ) AM_WRITE(yarunara_palette_w) // Palette or RTC
483483ADDRESS_MAP_END
484484
485//identical to yarunara, but nvram is in the 0x6000 - 0x6fff range
486static ADDRESS_MAP_START( quiztvqq_mem_map, AS_PROGRAM, 8, dynax_state )
487   AM_RANGE( 0x0000, 0x5fff ) AM_ROM
488   AM_RANGE( 0x6000, 0x6fff ) AM_RAM AM_SHARE("nvram")
489   AM_RANGE( 0x7000, 0x7fff ) AM_RAM
490   AM_RANGE( 0x8000, 0xffff ) AM_ROMBANK("bank1")
491   AM_RANGE( 0x8000, 0x81ff ) AM_WRITE(yarunara_palette_w) // Palette or RTC
492ADDRESS_MAP_END
493
485494static ADDRESS_MAP_START( jantouki_mem_map, AS_PROGRAM, 8, dynax_state )
486495   AM_RANGE( 0x0000, 0x5fff ) AM_ROM
487496   AM_RANGE( 0x6000, 0x6fff ) AM_RAM
r241914r241915
43284337   MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz)
43294338MACHINE_CONFIG_END
43304339
4340static MACHINE_CONFIG_DERIVED( quiztvqq, yarunara )
43314341
4342   /* basic machine hardware */
4343   MCFG_CPU_MODIFY("maincpu")
4344   MCFG_CPU_PROGRAM_MAP(quiztvqq_mem_map)
4345MACHINE_CONFIG_END
4346
4347
43324348/***************************************************************************
43334349                            Mahjong Campus Hunting
43344350***************************************************************************/
r241914r241915
69026918GAME( 1991, mjdialq2, 0,        mjdialq2, mjdialq2, driver_device, 0,        ROT180, "Dynax",                    "Mahjong Dial Q2 (Japan)",                                       GAME_SUPPORTS_SAVE )
69036919GAME( 1991, yarunara, 0,        yarunara, yarunara, driver_device, 0,        ROT180, "Dynax",                    "Mahjong Yarunara (Japan)",                                      GAME_SUPPORTS_SAVE )
69046920GAME( 1991, mjangels, 0,        yarunara, yarunara, driver_device, 0,        ROT180, "Dynax",                    "Mahjong Angels - Comic Theater Vol.2 (Japan)",                  GAME_SUPPORTS_SAVE )
6905GAME( 1992, quiztvqq, 0,        yarunara, quiztvqq, driver_device, 0,        ROT180, "Dynax",                    "Quiz TV Gassyuukoku Q&Q (Japan)",                               GAME_SUPPORTS_SAVE )
6921GAME( 1992, quiztvqq, 0,        quiztvqq, quiztvqq, driver_device, 0,        ROT180, "Dynax",                    "Quiz TV Gassyuukoku Q&Q (Japan)",                               GAME_SUPPORTS_SAVE )
69066922GAME( 1993, mjelctrn, 0,        mjelctrn, mjelctrn, dynax_state,   mjelct3,  ROT180, "Dynax",                    "Mahjong Electron Base (parts 2 & 4, Japan)",                    GAME_SUPPORTS_SAVE )
69076923GAME( 1990, mjelct3,  mjelctrn, mjelctrn, mjelct3,  dynax_state,   mjelct3,  ROT180, "Dynax",                    "Mahjong Electron Base (parts 2 & 3, Japan)",                    GAME_SUPPORTS_SAVE )
69086924GAME( 1990, mjelct3a, mjelctrn, mjelctrn, mjelct3,  dynax_state,   mjelct3a, ROT180, "Dynax",                    "Mahjong Electron Base (parts 2 & 3, alt., Japan)",              GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/goldngam.c
r241914r241915
264264
265265UINT32 goldngam_state::screen_update_goldngam(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
266266{
267   int x, y;
268
269   // ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
270   UINT8 *tmp = reinterpret_cast<UINT8 *>(m_videoram.target());
271267   int index = 0;
272268
273   for(y = 0; y < 512; ++y)
269   for(int y = 0; y < 512; ++y)
274270   {
275      for(x = 0; x < 384; ++x)
271      for(int x = 0; x < 384; x += 2)
276272      {
277         bitmap.pix16(y, x) = tmp[index ^ 1]; /* swapped bytes in 16 bit word */
273         UINT16 word = m_videoram[index];
274         bitmap.pix16(y, x) = word >> 8;
275         bitmap.pix16(y, x+1) = word & 0xff;
278276         ++index;
279277      }
280278   }
trunk/src/mame/drivers/lethal.c
r241914r241915
109109---------------- --- -------- --------- -----------------------
110110000xxxxxxxxxxxxx R   xxxxxxxx PROM      program ROM (banked)
111111001xxxxxxxxxxxxx R/W xxxxxxxx WRAM      work RAM
112010000--00xxxxxx   W xxxxxxxx VREG      056832 control
113010000--01--xxxx   W xxxxxxxx VSCG      056832 control
112010000--00xxxxxx   W xxxxxxxx VREG      054156 control
113010000--01--xxxx   W xxxxxxxx VSCG      054157 control
114114010000--1000---- R/W -------- AFR       watchdog reset
115115010000--1001----   W          SDON      sound enable?
116116010000--1010                  CCLR      ?
r241914r241915
121121010000--11-000--   W --x----- CRDB      /
122122010000--11-001--   W -----xxx EEP       EEPROM DI, CS, CLK
123123010000--11-001--   W ----x--- MUT       sound mute?
124010000--11-001--   W ---x---- CBNK      bank switch 4800-7FFF region between palette and 053245/056832
124010000--11-001--   W ---x---- CBNK      bank switch 4400-7FFF region between palette and 053245/054156
125125010000--11-001--   W --x----- n.c.
126126010000--11-001--   W xx------ SHD0/1    shadow control
127127010000--11-010--   W -----xxx PCU1/XBA  palette bank (tilemap A)
r241914r241915
138138010000--11-11011 R   -------x NCPU      ?
139139010000--11-111--   W --xxxxxx BREG      ROM bank select
140140010010--00------              n.c.
141010010--01---xxx R/W xxxxxxxx OREG      053244
141010010--01---xxx R/W xxxxxxxx OREG      053244/053245 control
142142010010--10-xxxxx R/W xxxxxxxx HIP       054000
143143010010--11       R/W xxxxxxxx PAR       sound communication
144010100xxxxxxxxxx R/W xxxxxxxx OBJ       053245
145011xxxxxxxxxxxxx R/W xxxxxxxx VRAM      056832
144010100xxxxxxxxxx R/W xxxxxxxx OBJ       053245 sprite RAM
145011xxxxxxxxxxxxx R/W xxxxxxxx VRAM      054156 video RAM
1461461xxxxxxxxxxxxxxx R   xxxxxxxx PROM      program ROM
147147
148148
r241914r241915
231231
232232note:
233233
234lethal enforcers has 2 sprite rendering chips working in parallel mixing
235data together to give 6bpp.. we cheat by using a custom function in
236konamiic.c and a fixed 6bpp decode.
234Lethal Enforcers has two sprite rendering chips working in parallel with their
235output mixed to give 6bpp, and two tilemap rendering chips working in parallel
236to give 8bpp. We currently cheat, using just one of each device but using
237alternate gfx layouts. Emulating it accurately will require separating the
238"front end" chips (053245, 054156) from the "back end" chips (053244, 054157)
239as only the latter are doubled.
237240
238241mirror not set up correctly
239242
r241914r241915
265268   /* bit 1 is cs (active low) */
266269   /* bit 2 is clock (active high) */
267270   /* bit 3 is "MUT" on the schematics (audio mute?) */
268   /* bit 4 bankswitches the 4800-7fff region: 0 = registers, 1 = RAM ("CBNK" on schematics) */
271   /* bit 4 bankswitches the 4400-7fff region: 0 = registers, 1 = palette RAM ("CBNK" on schematics) */
269272   /* bit 6 is "SHD0" (some kind of shadow control) */
270273   /* bit 7 is "SHD1" (ditto) */
271274
272275   m_cur_control2 = data;
273276
274   m_bank4800->set_bank((m_cur_control2 >> 4) & 1);
277   m_bank4000->set_bank(BIT(m_cur_control2, 4));
275278
276279   ioport("EEPROMOUT")->write(m_cur_control2, 0xff);
277280}
r241914r241915
302305   membank("bank1")->set_entry(data);
303306}
304307
305// use one more palette entry for the BG color
306WRITE8_MEMBER(lethal_state::le_bgcolor_w)
307{
308   m_palette->write(space, 0x3800 + offset, data);
309}
310
311308READ8_MEMBER(lethal_state::guns_r)
312309{
313310   switch (offset)
r241914r241915
356353   AM_RANGE(0x40d9, 0x40d9) AM_READ_PORT("INPUTS")
357354   AM_RANGE(0x40db, 0x40db) AM_READ(gunsaux_r)     // top X bit of guns
358355   AM_RANGE(0x40dc, 0x40dc) AM_WRITE(le_bankswitch_w)
359   AM_RANGE(0x47fe, 0x47ff) AM_WRITE(le_bgcolor_w)     // BG color
360   AM_RANGE(0x4800, 0x7fff) AM_DEVICE("bank4800", address_map_bank_device, amap8)
356   AM_RANGE(0x4000, 0x43ff) AM_UNMAP // first 0x400 bytes of palette RAM are inaccessible
357   AM_RANGE(0x4000, 0x7fff) AM_DEVICE("bank4000", address_map_bank_device, amap8)
361358   AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION("maincpu", 0x38000)
362359ADDRESS_MAP_END
363360
364static ADDRESS_MAP_START( bank4800_map, AS_PROGRAM, 8, lethal_state )
365   AM_RANGE(0x0040, 0x004f) AM_DEVREADWRITE("k053244", k05324x_device, k053244_r, k053244_w)
366   AM_RANGE(0x0080, 0x009f) AM_DEVREADWRITE("k054000", k054000_device, read, write)
367   AM_RANGE(0x00c6, 0x00c6) AM_WRITE(sound_cmd_w)
368   AM_RANGE(0x00c7, 0x00c7) AM_WRITE(sound_irq_w)
369   AM_RANGE(0x00ca, 0x00ca) AM_READ(sound_status_r)
370   AM_RANGE(0x0800, 0x17ff) AM_MASK(0x07ff) AM_DEVREADWRITE("k053244", k05324x_device, k053245_r, k053245_w)
371   AM_RANGE(0x1800, 0x1fff) AM_DEVREADWRITE("k056832", k056832_device, ram_code_lo_r, ram_code_lo_w)
372   AM_RANGE(0x2000, 0x27ff) AM_DEVREADWRITE("k056832", k056832_device, ram_code_hi_r, ram_code_hi_w)
373   AM_RANGE(0x2800, 0x2fff) AM_DEVREADWRITE("k056832", k056832_device, ram_attr_lo_r, ram_attr_lo_w)
374   AM_RANGE(0x3000, 0x37ff) AM_DEVREADWRITE("k056832", k056832_device, ram_attr_hi_r, ram_attr_hi_w)
375   AM_RANGE(0x3800, 0x7001) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") // 2 extra bytes for the BG color
361static ADDRESS_MAP_START( bank4000_map, AS_PROGRAM, 8, lethal_state )
362    // VRD = 0 or 1, CBNK = 0
363   AM_RANGE(0x0840, 0x084f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k053244", k05324x_device, k053244_r, k053244_w)
364   AM_RANGE(0x0880, 0x089f) AM_MIRROR(0x8000) AM_DEVREADWRITE("k054000", k054000_device, read, write)
365   AM_RANGE(0x08c6, 0x08c6) AM_MIRROR(0x8000) AM_WRITE(sound_cmd_w)
366   AM_RANGE(0x08c7, 0x08c7) AM_MIRROR(0x8000) AM_WRITE(sound_irq_w)
367   AM_RANGE(0x08ca, 0x08ca) AM_MIRROR(0x8000) AM_READ(sound_status_r)
368   AM_RANGE(0x1000, 0x17ff) AM_MIRROR(0x8000) AM_DEVREADWRITE("k053244", k05324x_device, k053245_r, k053245_w)
369
370   // VRD = 0, CBNK = 0
371   AM_RANGE(0x2000, 0x27ff) AM_DEVREADWRITE("k056832", k056832_device, ram_code_lo_r, ram_code_lo_w)
372   AM_RANGE(0x2800, 0x2fff) AM_DEVREADWRITE("k056832", k056832_device, ram_code_hi_r, ram_code_hi_w)
373   AM_RANGE(0x3000, 0x37ff) AM_DEVREADWRITE("k056832", k056832_device, ram_attr_lo_r, ram_attr_lo_w)
374   AM_RANGE(0x3800, 0x3fff) AM_DEVREADWRITE("k056832", k056832_device, ram_attr_hi_r, ram_attr_hi_w)
375
376   // VRD = 1, CBNK = 0 or 1
377   AM_RANGE(0xa000, 0xbfff) AM_MIRROR(0x4000) AM_UNMAP // AM_DEVREAD("k056832", k056832_device, rom_byte_r)
378
379   // CBNK = 1; partially overlaid when VRD = 1
380   AM_RANGE(0x4000, 0x7fff) AM_MIRROR(0x8000) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
376381ADDRESS_MAP_END
377382
378383static ADDRESS_MAP_START( le_sound, AS_PROGRAM, 8, lethal_state )
r241914r241915
467472   membank("bank1")->set_entry(0);
468473
469474   save_item(NAME(m_cur_control2));
475   save_item(NAME(m_layer_colorbase));
470476   save_item(NAME(m_sprite_colorbase));
471   save_item(NAME(m_layer_colorbase));
477   save_item(NAME(m_back_colorbase));
472478}
473479
474480void lethal_state::machine_reset()
r241914r241915
477483      m_layer_colorbase[i] = 0;
478484
479485   m_sprite_colorbase = 0;
486   m_back_colorbase = 0;
480487   m_cur_control2 = 0;
481   m_bank4800->set_bank(0);
488   m_bank4000->set_bank(0);
482489}
483490
484491static MACHINE_CONFIG_START( lethalen, lethal_state )
r241914r241915
491498   MCFG_CPU_ADD("soundcpu", Z80, MAIN_CLOCK/4)  /* verified on pcb */
492499   MCFG_CPU_PROGRAM_MAP(le_sound)
493500
494   MCFG_DEVICE_ADD("bank4800", ADDRESS_MAP_BANK, 0)
495   MCFG_DEVICE_PROGRAM_MAP(bank4800_map)
501   MCFG_DEVICE_ADD("bank4000", ADDRESS_MAP_BANK, 0)
502   MCFG_DEVICE_PROGRAM_MAP(bank4000_map)
496503   MCFG_ADDRESS_MAP_BANK_ENDIANNESS(ENDIANNESS_BIG)
497504   MCFG_ADDRESS_MAP_BANK_DATABUS_WIDTH(8)
498   MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(15)
499   MCFG_ADDRESS_MAP_BANK_STRIDE(0x3800)
505   MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(16)
506   MCFG_ADDRESS_MAP_BANK_STRIDE(0x4000)
500507
501508   MCFG_EEPROM_SERIAL_ER5911_8BIT_ADD("eeprom")
502509
r241914r241915
511518   MCFG_SCREEN_UPDATE_DRIVER(lethal_state, screen_update_lethalen)
512519   MCFG_SCREEN_PALETTE("palette")
513520
514   MCFG_PALETTE_ADD("palette", 7168+1)
521   MCFG_PALETTE_ADD("palette", 8192)
515522   MCFG_PALETTE_ENABLE_SHADOWS()
516523   MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR)
517524
trunk/src/mame/drivers/meritm.c
r241914r241915
9494  Pit Boss Superstar III 30 (c)1993
9595  Pit Boss Megastar (c)1994
9696  Pit Boss Supertouch 30 (c)1993/4
97  Pit Boss Megatouch (c)1994
9798
9899Custom Program Versions (Superstar 30 / Supertouch 30):
99100
r241914r241915
109110
110111
111112  CRT-260:
112  *Megatouch Video (c)1994?
113113  Megatouch II (c)1994
114114  Megatouch III (c)1995
115115  Megatouch III Tournament Edition (c)1996
r241914r241915
11911191The Touchscreen Calibration routine doesn't seem to work?
11921192
11931193*/
1194
11951194ROM_START( mtjpoker ) /* Uses the CRT-258 touch controller board & Dallas DS1225Y NV SRAM */
11961195   ROM_REGION( 0x80000, "maincpu", 0 )
11971196   ROM_LOAD( "9132-00-02_u9-r0.u9", 0x00000, 0x10000, CRC(4ec683b6) SHA1(7cff76ba1517deede3dfa2a419e11fd603dcf695) ) /* 9132-00-02 R0 46  940416 */
r241914r241915
12131212 Hold5 advances through the list.
12141213 Hi-Score will clear the High Scores
12151214
1216Is the "Stand" & "Hi-Score" keys the same? Without a sperate Stand key, you cannot set up the "TWIN" bonus feature
1215Is the "Stand" & "Hi-Score" keys the same? Without a separate Stand key, you cannot set up the "TWIN" bonus feature
12171216
12181217*/
1219
12201218ROM_START( americna ) /* Uses a small daughter card CRT-251 & Dallas DS1225Y NV SRAM */
12211219   ROM_REGION( 0x80000, "maincpu", 0 )
12221220   ROM_LOAD( "9131-00_u9-2.u9",   0x00000, 0x10000, CRC(8a741fb6) SHA1(2d77c67e5a0bdaf6199c31c4055df214672db3e1) ) /* 9131-00 U9-2  888020 */
r241914r241915
12311229   ROM_LOAD( "9131-02_u11-0.u11", 0x20000, 0x10000, CRC(f137d70c) SHA1(8ec04ec17300aa3a6ef14bcca1ca1c2aec0eea18) )
12321230ROM_END
12331231
1234/*
1235    Pit Boss II - Merit Industries Inc. 1988
1236    ----------------------------------------
1237
1238    All eproms are 27C512
1239
1240    One 8 bank dip switch.
1241
1242    Two YAMAHA V9938 Video Processors.
1243
1244    21.47727 MHz Crystal
1245
1246    CPU Z80
1247
1248    Audio AY8930
1249
1250    Two Z80A-PIO
1251
1252    One bq4010YMA-150 NVRAM
1253    Eight V53C464AP80 (41464) RAMS
1254
1255    One PAL16L8AN
1256    One PAL20L10NC
1257*/
1258
12591232ROM_START( pitboss2 )
12601233   ROM_REGION( 0x80000, "maincpu", 0 )
12611234   ROM_LOAD( "9221-01_u9-0c.u9",  0x00000, 0x10000, CRC(a1b6ac15) SHA1(b7b395f3e7e14dbb84003e03bf7d054e795a7211) ) /* 9221-01C  880221 */
r241914r241915
12701243
12711244ROM_START( spitboss )
12721245   ROM_REGION( 0x80000, "maincpu", 0 )
1273   ROM_LOAD( "9221-02_u9-0a.u9",   0x00000, 0x10000, CRC(e0c45c9c) SHA1(534bff67c8fee08f1c348275de8977659efa9f69) ) /* 9221-02A   886021 (actual, but should be 880621) */
1246   ROM_LOAD( "9221-02_u9-0a.u9",   0x00000, 0x10000, CRC(e0c45c9c) SHA1(534bff67c8fee08f1c348275de8977659efa9f69) ) /* 9221-02A   886021 */
12741247   ROM_LOAD( "9221-02_u10-0.u10",  0x10000, 0x10000, CRC(ed010c58) SHA1(02750944a28c1c27ce2a9904d11b7e46272a940e) )
12751248   ROM_LOAD( "9221-02_u11-0a.u11", 0x20000, 0x10000, CRC(0c65fa86) SHA1(7906a8d615116ca67bf370dfb2da8cb2389a313d) )
12761249   ROM_LOAD( "9221-02_u12-0.u12",  0x30000, 0x10000, CRC(0cf95b0e) SHA1(c6ffc13703892b9ae0da39a02db37c4ec890f79e) )
r241914r241915
12941267
12951268ROM_START( pitbosssa )
12961269   ROM_REGION( 0x80000, "maincpu", 0 )
1297   ROM_LOAD( "9221-10_u9-0a.u9",   0x00000, 0x10000, CRC(41be6b30) SHA1(c4df87a599e310ce29ee9277e5adc916ff68f060) ) /* 9221-10-00A  090370 (actual, but should be 090390) */
1270   ROM_LOAD( "9221-10_u9-0a.u9",   0x00000, 0x10000, CRC(41be6b30) SHA1(c4df87a599e310ce29ee9277e5adc916ff68f060) ) /* 9221-10-00A  090370 */
12981271   ROM_LOAD( "9221-10_u10-0.u10",  0x10000, 0x10000, CRC(853a1a99) SHA1(45e33442aa7e51c05c9ac8b8458937ee3ff4c21d) )
12991272   ROM_LOAD( "9221-10_u11-0a.u11", 0x20000, 0x10000, CRC(c9137469) SHA1(618680609bdffa92b919a2417bd3ec41a4c8bf2b) )
13001273   ROM_LOAD( "9221-10_u12-0.u12",  0x30000, 0x10000, CRC(3577a203) SHA1(80f9c827ad9dea2c6af788bd3b46ab65e8c594eb) )
r241914r241915
13301303   ROM_LOAD( "9233-00-01_u15-r0", 0x60000, 0x10000, CRC(5810840e) SHA1(bad6457752ac212c3c11360a13a8d3473662a287) )
13311304
13321305   ROM_REGION( 0x000022, "ds1204", 0 )
1333   ROM_LOAD( "9233-01_u1-ro1_c1993_mii", 0x000000, 0x000022, BAD_DUMP CRC(93459659) SHA1(73ad4c3a7c52d3db3acb43662c535f8c2ed2376a) )
1306   ROM_LOAD( "9233-01_u1-r01_c1993_mii", 0x000000, 0x000022, BAD_DUMP CRC(93459659) SHA1(73ad4c3a7c52d3db3acb43662c535f8c2ed2376a) )
13341307
13351308   ROM_REGION( 0xc0000, "extra", 0 ) // question roms
13361309   ROM_LOAD( "qs9233-01_u7-r0",  0x00000, 0x40000, CRC(176dd688) SHA1(306cf78101219ef1122023a01d16dff5e9f2aecf) ) /* These 3 roms are on CRT-256 sattalite PCB */
r241914r241915
13381311   ROM_LOAD( "qs9233-01_u5-r0",  0x80000, 0x40000, CRC(740b1274) SHA1(14eab68fc137b905a5a2739c7081900a48cba562) )
13391312ROM_END
13401313
1314/*
1315Basically this Pit Boss Megatouch set is Pit Boss Supertouch 30 v2.0 but marks the first time Merit
1316 started using the Megatouch name.
1317
1318NOTE: Once again U10, U12 & U13 doesn't change between this set and the Pit Boss Supertouch 30 sets
1319      and the question roms are the same data with a new label and game number ID
1320*/
1321ROM_START( megat ) /* Dallas DS1204V security key attached to CRT-254 connected to J2 connector labeled 9234-20 U1-RO C1994 MII */
1322   ROM_REGION( 0x80000, "maincpu", 0 )
1323   ROM_LOAD( "9234-20-01_u9-r0a",  0x00000, 0x10000, CRC(5a9fd092) SHA1(756b6a925dafb17451e7dc37c95a26d09ecfe2d7) ) /* 9234-20-01 R0A 940519 */
1324   ROM_LOAD( "9234-20-01_u10-r0a", 0x10000, 0x10000, CRC(853a1a99) SHA1(45e33442aa7e51c05c9ac8b8458937ee3ff4c21d) ) /* Also found as PBC U10 */
1325   ROM_LOAD( "9234-20-01_u11-r0a", 0x20000, 0x10000, CRC(8bd5f6bb) SHA1(95b23d7d14207fcafc01ee975400ebdd1e7b5ad5) )
1326   ROM_LOAD( "9234-20-01_u12-r0a", 0x30000, 0x10000, CRC(b9fb4203) SHA1(84b514d9739d9c2ab1081cfc7cdedb41155ee038) ) /* Also found as PBC U12 */
1327   ROM_LOAD( "9234-20-01_u13-r0a", 0x40000, 0x10000, CRC(574fb3c7) SHA1(213741df3055b97ddd9889c2aa3d3e863e2c86d3) ) /* Also found as PBC U13 */
1328   ROM_LOAD( "9234-20-01_u14-r0a", 0x50000, 0x10000, CRC(40d78506) SHA1(5e1d8e4ef8aa02faa2a323f5e988bf56d4747b60) )
1329   ROM_LOAD( "9234-20-01_u15-r0a", 0x60000, 0x10000, CRC(9adc67b8) SHA1(271e6b6473eeea01f2923ef82c192a583bb5e338) )
1330
1331   ROM_REGION( 0x000022, "ds1204", 0 )
1332   ROM_LOAD( "9234-20_u1-r0_c1994_mii", 0x000000, 0x000022, BAD_DUMP CRC(6cbdbde1) SHA1(b076ee21fc792a5e85cdaed427bc41554568811e) )
1333
1334   ROM_REGION( 0xc0000, "extra", 0 ) // question roms
1335   ROM_LOAD( "qs9234-20_u7-r0",  0x00000, 0x40000, CRC(c0534aaa) SHA1(4b3cbf03f29fd5b4b8fd423e73c0c8147692fa75) ) /* These 3 roms are on CRT-256 sattalite PCB */
1336   ROM_LOAD( "qs9234-20_u6-r0",  0x40000, 0x40000, CRC(fe2cd934) SHA1(623011dc53ed6eefefa0725dba6fd1efee2077c1) ) /* Same data as Pit Boss Supertouch 30 sets, different label - verified */
1337   ROM_LOAD( "qs9234-20_u5-r0",  0x80000, 0x40000, CRC(293fe305) SHA1(8a551ae8fb4fa4bf329128be1bfd6f1c3ff5a366) )
1338ROM_END
1339
13411340ROM_START( pbst30 ) /* Dallas DS1204V security key attached to CRT-254 connected to J2 connector labeled 9234-10 U1-RO1 C1994 MII */
13421341   ROM_REGION( 0x80000, "maincpu", 0 )
13431342   ROM_LOAD( "9234-10-01_u9-r0",  0x00000, 0x10000, CRC(96f39c9a) SHA1(df698e94a5204cf050ceadc5c257ca5f68171114) ) /* 9234-10-01 032294 */
r241914r241915
13491348   ROM_LOAD( "9234-10-01_u15-r0", 0x60000, 0x10000, CRC(9fbd8582) SHA1(c0f68c8a7cdca34c8736cefc71767c421bcaba8a) )
13501349
13511350   ROM_REGION( 0x000022, "ds1204", 0 )
1352   ROM_LOAD( "9234-10_u1-ro1_c1994_mii", 0x000000, 0x000022, BAD_DUMP CRC(1c782f78) SHA1(8255afcffbe21a43f53cfb41867552681403ea47) )
1351   ROM_LOAD( "9234-10_u1-r01_c1994_mii", 0x000000, 0x000022, BAD_DUMP CRC(1c782f78) SHA1(8255afcffbe21a43f53cfb41867552681403ea47) )
13531352
13541353   ROM_REGION( 0xc0000, "extra", 0 ) // question roms
13551354   ROM_LOAD( "qs9234-01_u7-r0",  0x00000, 0x40000, CRC(c0534aaa) SHA1(4b3cbf03f29fd5b4b8fd423e73c0c8147692fa75) ) /* These 3 roms are on CRT-256 sattalite PCB */
r241914r241915
13571356   ROM_LOAD( "qs9234-01_u5-r0",  0x80000, 0x40000, CRC(293fe305) SHA1(8a551ae8fb4fa4bf329128be1bfd6f1c3ff5a366) )
13581357ROM_END
13591358
1360ROM_START( pbst30b ) /* Dallas DS1204V security key attached to CRT-254 connected to J2 connector labeled 9234-01 U1-RO1 C1993 MII */
1359ROM_START( pbst30a ) /* Dallas DS1204V security key attached to CRT-254 connected to J2 connector labeled 9234-01 U1-RO1 C1993 MII */
13611360   ROM_REGION( 0x80000, "maincpu", 0 )
13621361   ROM_LOAD( "9234-00-01_u9-r0a",  0x00000, 0x10000, CRC(5f058f95) SHA1(98382935340a076bdb1b20c7f16c25b6084599fe) ) /* 9234-00-01  122293 */
13631362   ROM_LOAD( "9234-00-01_u10-r0",  0x10000, 0x10000, CRC(853a1a99) SHA1(45e33442aa7e51c05c9ac8b8458937ee3ff4c21d) )
r241914r241915
13681367   ROM_LOAD( "9234-00-01_u15-r0a", 0x60000, 0x10000, CRC(f10f0d39) SHA1(2b5d5a93adb5251e09160b10c067b6e70289f608) )
13691368
13701369   ROM_REGION( 0x000022, "ds1204", 0 )
1371   ROM_LOAD( "9234-01_u1-ro1_c1993_mii", 0x000000, 0x000022, BAD_DUMP CRC(74bf0546) SHA1(eb44a057cf797279ee3456a74e166fa711547ea4) )
1370   ROM_LOAD( "9234-01_u1-r01_c1993_mii", 0x000000, 0x000022, BAD_DUMP CRC(74bf0546) SHA1(eb44a057cf797279ee3456a74e166fa711547ea4) )
13721371
13731372   ROM_REGION( 0xc0000, "extra", 0 ) // question roms
13741373   ROM_LOAD( "qs9234-01_u7-r0",  0x00000, 0x40000, CRC(c0534aaa) SHA1(4b3cbf03f29fd5b4b8fd423e73c0c8147692fa75) ) /* These 3 roms are on CRT-256 sattalite PCB */
r241914r241915
13871386   ROM_LOAD( "9243-00-01_u15-r0", 0x60000, 0x10000, CRC(27034061) SHA1(cff6be592a4a3ab01c204b081470f224e6186c4d) )
13881387   ROM_RELOAD(     0x70000, 0x10000)
13891388
1390
13911389   ROM_REGION( 0xc0000, "extra", 0 ) // question roms
13921390   ROM_LOAD( "qs9243-00-01_u7-r0",  0x00000, 0x40000, CRC(35f4ca46) SHA1(87917b3017f505fae65d6bfa2c7d6fb503c2da6a) ) /* These 3 roms are on CRT-256 sattalite PCB */
13931391   ROM_LOAD( "qs9243-00-01_u6-r0",  0x40000, 0x40000, CRC(606f1656) SHA1(7f1e3a698a34d3c3b8f9f2cd8d5224b6c096e941) )
r241914r241915
142614241- Great Draw Poker and 7 Stud Poker have been added to the program set
142714252- On page 3-1 legend artwork has changed. PASS has been replaced with
14281426   PASS/PLAY and COLLECT/QUIT has been replaced with COLLECT/QUIT/RAISE
14293- An additional Solitaire Instruction decal has beed added to the kit.
1430   This new Instruction decal is to be mounted in a visivle loction for
14273- An additional Solitaire Instruction decal has been added to the kit.
1428   This new Instruction decal is to be mounted in a visible location for
14311429   players use.
14321430
14331431*/
1434
14351432ROM_START( pitbossm ) /* Dallas DS1204V security key attached to CRT-254 connected to J2 connector labeled 9244-00 U1-RO1 C1994 MII */
14361433   ROM_REGION( 0x80000, "maincpu", 0 )
14371434   ROM_LOAD( "9244-00-01_u9-r0",  0x00000, 0x10000, CRC(8317fea1) SHA1(eb84fdca7cd51883153561785571790d12d0d612) ) /* 9244-00-01 R0  940822 */
r241914r241915
14911488It's currently unknown how to access / enable those features or if it's possible to do so.
14921489
14931490*/
1494
14951491ROM_START( realbrod ) /* Dallas DS1204U-3 security key labeled 9131-20-00-U5-R0A */
14961492   ROM_REGION( 0x400000, "maincpu", 0 )
14971493   /* U32 Empty */
r241914r241915
15221518             one PC16550DN
15231519             one PB255a or L5220574
15241520             One Dallas DS1204 Data Key
1525             One Dallas DS1225Y 64k Non-volitile SRAM (Mega Touch 4)
1526              or Dallas DS1230Y 256K Non-volitile SRAM (Mega Touch 6)
1521             One Dallas DS1225Y 64k Non-volatile SRAM (Mega Touch 4)
1522              or Dallas DS1230Y 256K Non-volatile SRAM (Mega Touch 6)
15271523              or Dallas DS1644 32K NVRAM + RTC (Tournament sets)
15281524             Two Z80APIO (Z0842004PSC)
15291525
r241914r241915
22922288
22932289/* CRT-250 + CRT-252 + CRT-256 + CRT-258 */
22942290GAME( 1994, mtjpoker,  0,        meritm_crt250_crt252_crt258, mtjpoker,   driver_device, 0,  ROT0, "Merit", "Merit Touch Joker Poker (9132-00)", GAME_IMPERFECT_GRAPHICS )
2291GAME( 1994, megat,     0,        meritm_crt250_crt252_crt258, pbst30,     driver_device, 0,  ROT0, "Merit", "Pit Boss Megatouch (9234-20-01)", GAME_IMPERFECT_GRAPHICS )
22952292GAME( 1994, pbst30,    0,        meritm_crt250_crt252_crt258, pbst30,     driver_device, 0,  ROT0, "Merit", "Pit Boss Supertouch 30 (9234-10-01)", GAME_IMPERFECT_GRAPHICS )
2296GAME( 1993, pbst30b,   pbst30,   meritm_crt250_crt252_crt258, pbst30,     driver_device, 0,  ROT0, "Merit", "Pit Boss Supertouch 30 (9234-00-01)", GAME_IMPERFECT_GRAPHICS )
2293GAME( 1993, pbst30a,   pbst30,   meritm_crt250_crt252_crt258, pbst30,     driver_device, 0,  ROT0, "Merit", "Pit Boss Supertouch 30 (9234-00-01)", GAME_IMPERFECT_GRAPHICS )
22972294
22982295/* CRT-250 + CRT-254 + CRT-256 */
22992296GAME( 1993, pbss330,   0,        meritm_crt250_questions, pbss330,  driver_device, 0, ROT0, "Merit", "Pit Boss Superstar III 30 (9233-00-01)", GAME_IMPERFECT_GRAPHICS )
trunk/src/mame/drivers/naomi.c
r241914r241915
254254                                              Sticker    EPROM   FLASHROMs   X76F100  EPM7064S  315-5881
255255Game                                          on cart    IC22#   # of SOP56  IC37#    IC41#     IC42#         Notes
256256----------------------------------------------------------------------------------------------------------------------------------
257Club Kart: European Session (2003, prototype)   no cart  *       21 (64Mb)   present  315-6206  not present   *instead of EPROM have tiny PCB with 2 flashroms on it
258Crackin' DJ part 2                            840-0068C  23674   20 (64Mb)   present  315-6206  317-0311-COM  PCB have label 840-0068B-01 837-14124
257Club Kart: European Session (2003, prototype)   no cart  *       21 (64Mb)   present  315-6206  not present   * instead of EPROM have tiny PCB with 2 flashroms on it
258Crackin' DJ part 2                            840-0068C  23674   20 (64Mb)   present  315-6206  317-0311-COM  PCB have label 840-0068B-01 837-14124, requires regular 837-13551 and 837-13938 rotary JVS boards, and turntable simulation
259Ferrari F355 Challenge (twin, prototype)        no cart  22848P* 21 (64Mb)   present  315-6206  317-0267-COM  * flash-PCB have CRC 330B A417, the rest is the same as regular cart, not dumped but known to exist
259260Ferrari F355 Challenge 2 (twin)                 no cart  23399   21 (64Mb)   present  315-6206  317-0287-COM  content is the same as regular 171-7919A cart
260261House of the Dead 2 (prototype)                 no cart  A1E2    21 (64Mb)   present  315-6206  present       no label on IC42
261Inu No Osanpo / Dog Walking (Rev A)           840-0073C  22294A  16 (64Mb)   present  315-6206  317-0316-JPN
262Samba de Amigo (prototype)                      no cart  *       21 (64Mb)   present  315-6206  317-0270-COM  *instead of EPROM have tiny PCB with 2 flashroms on it
263Soul Surfer (Rev A)                           840-0095C  23838C  21 (64Mb)   present  315-6206  not present   todo: verify if it's Rev A or Rev C
262Inu No Osanpo / Dog Walking (Rev A)           840-0073C  22294A  16 (64Mb)   present  315-6206  317-0316-JPN  requires 837-13844 JVS IO with special jumpers settings enabling rotary
263Maze of the Kings The (prototype)               no cart  *       21 (64Mb)   present  315-6206  FRI           * flash-PCB, not dumped but known to exist
264Samba de Amigo (prototype)                      no cart  *       21 (64Mb)   present  315-6206  317-0270-COM  * instead of EPROM have tiny PCB with 2 flashroms on it
265Soul Surfer (Rev A)                           840-0095C  23838C  21 (64Mb)   present  315-6206  not present
264266Star Horse (server)                           840-0055C  23626   17 (64Mb)   present  315-6206  not present
265267The King of Route 66 (Rev A)                  840-0087C  23819A  20 (64Mb)   present  315-6206  not present   content is the same as regular 171-8132A cart
266Virtua NBA (prototype)                          no cart  *       21 (64Mb)   present  315-6206  317-0271-COM  *instead of EPROM have tiny PCB with 2 flashroms on it
268Virtua NBA (prototype)                          no cart  *       21 (64Mb)   present  315-6206  317-0271-COM  * instead of EPROM have tiny PCB with 2 flashroms on it
269Virtua Tennis / Power Smash (prototype)         no cart  *       21 (64Mb)   present  315-6206  317-0263-COM  * flash-PCB, title screen have label "SOFT R&D Dept.#3", not dumped but known to exist
267270
268271
269272837-13668  171-7919A (C) Sega 1998
r241914r241915
30130418 Wheeler (deluxe) (Rev A)                     840-0023C    22185A  20 (64Mb)   present     315-6213  317-0273-COM
30230518 Wheeler (standard)                           840-0036C    23298   20 (64Mb)   present     315-6213  317-0273-COM
30330618 Wheeler (upright)                            840-0037C    23299   20 (64Mb)   present     315-6213  317-0273-COM
304Airline Pilots (deluxe) (Rev B)                 ?            21787B  11 (64Mb)   present     315-6213  317-0251-COM   2 know BIOS 21801 (USA), 21802 (EXP)
307Airline Pilots (deluxe) (Rev B)                 ?            21787B  11 (64Mb)   present     315-6213  317-0251-COM   2 known BIOS 21801 (USA), 21802 (EXP)
305308Airline Pilots (Rev A)                          840-0005C    21739A  11 (64Mb)   present     315-6213  317-0251-COM
306309Cosmic Smash                                    840-0044C    23428    8 (64Mb)   ?           315-6213  317-0289-COM   joystick + 2 buttons
307310Cosmic Smash (Rev A)                            840-0044C    23428A   8 (64Mb)   ?           315-6213  317-0289-COM   joystick + 2 buttons
r241914r241915
314317Derby Owners Club 2000 Ver.2 (Rev A)            840-0052C    22284A  16 (64Mb)   present     315-6213  not present
315318Dynamite Baseball '99 / World Series'99 (Rev B) 840-0019C    22141B  19 (64Mb)   ?           315-6213  317-0269-JPN   requires special panel (joystick + 2 buttons + bat controller for each player)
316319Dynamite Baseball Naomi                         840-0001C    21575   21 (64Mb)   ?           315-6213  317-0246-JPN   requires special panel (joystick + 2 buttons + bat controller for each player)
317Ferrari F355 Challenge                          834-13842    21902   21 (64Mb)   present     315-6213  317-0254-COM   requires special BIOS not yet dumped
318Ferrari F355 Challenge (twin)                   834-13950    22848   21 (64Mb)   present     315-6213  317-0267-COM   2 know BIOS 22850 (USA), 22851 (EXP)
319Ferrari F355 Challenge 2 (twin)                 840-0042C    23399   21 (64Mb)   present     315-6213  317-0287-COM   2 know BIOS 22850 (USA), 22851 (EXP)
320Ferrari F355 Challenge (deluxe)                 834-13842    21902   21 (64Mb)   present     315-6213  317-0254-COM   BIOS 21863 (USA), also known  to exists Japanese BIOS, not dumped
321Ferrari F355 Challenge (twin)                   834-13950    22848   21 (64Mb)   present     315-6213  317-0267-COM   2 known BIOS 22850 (USA), 22851 (EXP)
322Ferrari F355 Challenge 2 (twin)                 840-0042C    23399   21 (64Mb)   present     315-6213  317-0287-COM   2 known BIOS 22850 (USA), 22851 (EXP)
320323Giant Gram: All Japan Pro Wrestling 2           840-0007C    21820    9 (64Mb)   ?           315-6213  317-0253-JPN   joystick + 3 buttons
321324Guilty Gear X                                   841-0013C    23356   14 (64Mb)   ?           315-6213  317-5063-COM
322325Gun Spike / Cannon Spike                        841-0012C    23210   12 (64Mb)   present     315-6213  317-5060-COM
323326Heavy Metal Geomatrix (Rev A)                   HMG016007    23716A  11 (64Mb)   present     315-6213  317-5071-COM   joystick + 2 buttons
324327House of the Dead 2 (original)                  834-13636    21385   20 (64Mb)   not present 315-6213  not present
325328House of the Dead 2                             834-13636-01 21585   20 (64Mb)   not present 315-6213  not present
326Idol Janshi Suchie-Pai 3                        841-0002C    21979   14 (64Mb)   ?           315-6213  317-5047-JPN   requires special I/O board and mahjong panel
329Idol Janshi Suchie-Pai 3                        841-0002C    21979   14 (64Mb)   ?           315-6213  317-5047-JPN   requires mahjong panel
327330Jambo! Safari (Rev A)                           840-0013C    22826A   8 (64Mb)   ?           315-6213  317-0264-COM
328331Mars TV                                         840-0025C    22993   15 (64Mb)   present     315-6213  317-0074-JPN
329OutTrigger                                      840-0017C    22163   19 (64Mb)   ?           315-6213  317-0266-COM   requires analog controllers/special panel
332OutTrigger                                      840-0017C    22163   19 (64Mb)   ?           315-6213  317-0266-COM   requires regular 837-13551 and 837-13938 rotary JVS boards, and special panel
330333Power Stone                                     841-0001C    21597    8 (64Mb)   present     315-6213  317-5046-COM   joystick + 3 buttons
331334Power Stone 2                                   841-0008C    23127    9 (64Mb)   present     315-6213  317-5054-COM   joystick + 3 buttons
332335Puyo Puyo Da!                                   841-0006C    22206   20 (64Mb)   ?           315-6213  ?
333Ring Out 4x4                                    840-0004C    21779   10 (64Mb)   present     315-6213  317-0250-COM
336Ring Out 4x4                                    840-0004C    21779   10 (64Mb)   present     315-6213  317-0250-COM   requires 2 JVS boards
334337Samba de Amigo (Rev B)                          840-0020C    22966B  16 (64Mb)   present     315-6213  317-0270-COM   will boot but requires special controller to play it
335Sega Marine Fishing                             840-0027C    22221   10 (64Mb)   ?           315-6213  not present    ROM 3&4 not present. Requires special I/O board and fishing controller
338Sega Marine Fishing                             840-0027C    22221   10 (64Mb)   ?           315-6213  not present    ROM 3&4 not present. Requires fishing controller
336339Sega Strike Fighter (Rev A)                     840-0035C    23323A  20 (64Mb)   present     315-6213  317-0281-COM
337340Sega Tetris                                     840-0018C    22909    6 (64Mb)   present     315-6213  317-0268-COM
338341Slashout                                        840-0041C    23341   17 (64Mb)   ?           315-6213  317-0286-COM   joystick + 4 buttons
339342Spawn In the Demon's Hand (Rev B)               841-0005C    22977B  10 (64Mb)   ?           315-6213  317-5051-COM   joystick + 4 buttons
340343Super Major League '99                          840-0012C    22059   21 (64Mb)   ?           315-6213  ?
341344The Typing of the Dead (Rev A)                  840-0026C    23021A  20 (64Mb)   present     315-6213  not present
342Touch de UNO! / Unou Nouryoku Check Machine     840-0008C    22073    4 (64Mb)   present     315-6213  317-0255-JPN
345Touch de UNO! / Unou Nouryoku Check Machine     840-0008C    22073    4 (64Mb)   present     315-6213  317-0255-JPN   requires special JVS board with touch input and printer
343346Toy Fighter / Waffupu                           840-0011C    22035   10 (64Mb)   present     315-6212  317-0257-COM   joystick + 3 buttons
344347Virtua NBA                                      840-0021C-01 23073   21 (64Mb)   present     315-6213  not present
345348Virtua NBA (original)                           840-0021C    22949   21 (64Mb)   present     315-6213  317-0271-COM
r241914r241915
444447                                               Sticker      EPROM   MASKROMs    25LC040  A54SX32
445448Game                                           on cart      IC11#   # of SOP44  IC13S#   IC1#          Notes
446449-------------------------------------------------------------------------------------------------------------------------------
447Club Kart Prize (Rev A)                        840-0129C    24082A  16 (64Mb)   present  317-0368-COM  A54SX32A
448Club Kart Prize Ver. B                         840-0137C    24149   16 (64Mb)   present  317-0368-COM  A54SX32A
450Club Kart Prize (Rev A)                        840-0129C    24082A  16 (64Mb)   present  317-0368-COM  requires Naomi-based hopper controller (Naomi bd + 840-0130 cart + 837-14381 "G2 EXPANSION BD")
451Club Kart Prize Ver. B                         840-0137C    24149   16 (64Mb)   present  317-0368-COM  requires 837-14438 "SH I/O BD" hopper controller (not dumped)
449452Giant Gram 2000                                840-0039C    23377   20 (64Mb)   present  317-0296-COM
450Kick '4' Cash                                  840-0140C    24212   16 (64Mb)   present  317-0397-COM  A54SX32A
453Kick '4' Cash                                  840-0140C    24212   16 (64Mb)   present  317-0397-COM  requires 837-14438 "SH I/O BD" hopper controller (not dumped)
451454Marvel Vs. Capcom 2 New Age of Heroes (Rev A)  841-0007C-02 23085A  14 (64Mb)*  present  317-5058-COM  *(+2x 32Mb)
452MushiKing The King of Beetles 2K3 2ND          840-0150C    24217    6 (64Mb)   present  317-0394-COM
455MushiKing The King of Beetles 2K3 2ND          840-0150C    24217    6 (64Mb)   present  317-0394-COM  requires 610-0669 barcode reader, 838-14245-92 "MAPLE/232C CONVERT BD" (MIE-based), 838-14243 "RFID CHIP R/W BD" and RFID chip
453456Quiz Ah Megamisama                             840-0030C    23227   16 (64Mb)   present  317-0280-JPN
454Shootout Pool                                  840-0098C    23844    4 (64Mb)   present  317-0336-COM
455Shootout Pool - Shootout Pool Prize (Rev A)    840-0128C    24065A   4 (64Mb)   present  317-0367-COM
456Shootout Pool Medal                            840-0136C    24148    4 (64Mb)   present  317-0367-COM
457Shootout Pool                                  840-0098C    23844    4 (64Mb)   present  317-0336-COM  requires regular 837-13551 and 837-13938 rotary JVS boards
458Shootout Pool Prize / The Medal (Rev A)        840-0128C    24065A   4 (64Mb)   present  317-0367-COM  requires Naomi-based hopper controller
459Shootout Pool Prize / The Medal Ver. B         840-0136C    24148    4 (64Mb)   present  317-0367-COM  requires Naomi-based or 837-14438 hopper controller
457460SWP Hopper Board                               840-0130C    24083   20 (64Mb)   present  317-0339-COM  Maskroms are not really used, they are recycled from other games; there is an additional 837-14381 IO board
458Touch de UNO! 2                                840-0022C    23071    6 (64Mb)   present  317-0276-JPN
461Touch de UNO! 2                                840-0022C    23071    6 (64Mb)   present  317-0276-JPN  requires special JVS board with touch input and printer
459462Virtua Fighter 4 Evolution                     840-0106B    23934   20 (64Mb)   present  317-0339-COM
460463Virtua Tennis 2 / Power Smash 2 (Rev A)        840-0084C    22327A  18 (64Mb)   present  317-0320-COM
461464
r241914r241915
502505Club Kart: European Session                     840-0062C  23704   11 (128Mb)  315-6319A  315-6213  317-0313-COM
503506Club Kart: European Session (Rev C)             840-0062C      *   11 (128Mb)  315-6319A  315-6213  317-0313-COM  * EPR have handwritten Japanese label possibly readable as 'teteto 74 lcl'
504507Club Kart: European Session (Rev D)             840-0062C  23704D  11 (128Mb)  315-6319A  315-6213  317-0313-COM
505Crackin' DJ                                     840-0043C  23450   10 (128Mb)  315-6319   315-6213  317-0288-COM
508Crackin' DJ                                     840-0043C  23450   10 (128Mb)  315-6319   315-6213  317-0288-COM  requires regular 837-13551 and 837-13938 rotary JVS boards, and turntable simulation
506509Derby Owners Club II (Rev B)                    840-0083C  22306B  11 (128Mb)  315-6319A  315-6213  not present
507510Derby Owners Club World Edition (Rev C)         840-0088C  22336C   7 (128Mb)  315-6319A  315-6213  not present
508511Derby Owners Club World Edition (Rev D)         840-0088C  22336D   7 (128Mb)  315-6319A  315-6213  not present   2 MaskROM are different from Rev C
509512Giga Wing 2                                     841-0014C  22270    5 (128Mb)  315-6319A  315-6213  317-5064-COM
510513Mobile Suit Gundam: Federation Vs. Zeon         841-0017C  23638   10 (128Mb)  315-6319A  315-6213  ?
511514Moero Justice Gakuen / Project Justice (Rev A)  841-0015C  23548A  11 (128Mb)  315-6319A  315-6213  317-5065-COM
512MushiKing - The King Of Beetle 2K5 1ST         840-0158C  24286    7 (128Mb)  315-6319A  315-6213  not present
513Oinori-daimyoujin Matsuri                       840-0126B  24053    5 (128Mb)  315-6319A  315-6213  not present
515MushiKing - The King Of Beetle 2K5 1ST          840-0158C  24286    7 (128Mb)  315-6319A  315-6213  not present   requires 610-0669 barcode reader
516Oinori-daimyoujin Matsuri                       840-0126B  24053    5 (128Mb)  315-6319A  315-6213  not present   requires 837-14274 "G2 EXPANSION BD" (similar to hopper 837-14381 but with ARC NET chip)
514517Samba de Amigo Ver. 2000                        840-0047C  23600   11 (128Mb)  315-6319A  315-6213  317-0295-COM
515518Star Horse (big screens)                        840-0054C  23625    4 (128Mb)  315-6319   315-6213  not present
516519Star Horse (client)                             840-0056C  23627    6 (128Mb)* 315-6319   315-6213  not present   * +1 (64Mb)
r241914r241915
566569Dynamite Deka EX / Asian Dynamite                   840-0175C  not present  4 (512Mb)   present  317-0495-COM  present  IC2# is labeled "VER.2"
567570Illmatic Envelope                                   841-0059C  not present  4 (512Mb)   present  317-5131-JPN  present  IC2# is labeled "VER.2" - IC#11 is empty
568571Mamoru-kun wa Norowarete Shimatta                   841-0060C  not present  4 (512Mb)   present  317-5132-JPN  present  IC2# is labeled "VER.2"
569Manic Panic Ghost!                                  840-0170C  not present  5 (512Mb)   present  317-0461-COM  present
572Manic Panic Ghost!                                  840-0170C  not present  5 (512Mb)   present  317-0461-COM  present  requires 837-14672 sensor board (SH4 based)
570573Melty Blood Actress Again                           841-0061C  not present  6 (512Mb)   present  317-5133-JPN  present  IC2# is labeled "REV.A" - IC4# is marked "5A"
571574Melty Blood Actress Again (Rev A)                   841-0061C  24455        6 (512Mb)   present  317-5133-JPN  present  IC2# is labeled "REV.A" - IC4# is marked "5A"
572Mushiking - The King Of Beetles II ENG (Ver. 1.001) 840-0164C  not present  2 (512Mb)   present  317-0437-COM  present
575Mushiking - The King Of Beetles II ENG (Ver. 1.001) 840-0164C  not present  2 (512Mb)   present  317-0437-COM  present  requires 610-0669 barcode reader, 838-14245-92 "MAPLE/232C CONVERT BD" (MIE-based), 838-14243 "RFID CHIP R/W BD" and RFID chip
573576Mushiking - The King Of Beetles II ENG (Ver. 2.001) 840-0164C  24357        2 (512Mb)   present  317-0437-COM  present  IC4# is marked "18"
574Poka Suka Ghost                                     840-0170C  not present  5 (512Mb)   present  317-0461-COM  present
577Poka Suka Ghost                                     840-0170C  not present  5 (512Mb)   present  317-0461-COM  present  requires 837-14672 sensor board (SH4 based)
575578Radirgy Noa                                         841-0062C  not present  4 (512Mb)   present  317-5138-JPN  present  IC2# is labeled "VER.2" - IC4# is marked "8A"
576579Rythm Tengoku                                       841-0177C  not present  4 (512Mb)   present  317-0503-JPN  present  IC2# is labeled "VER.2" - IC4# is marked "8A"
577580Shooting Love 2007                                  841-0057C  not present  4 (512Mb)   present  317-5129-JPN  present  IC2# is labeled "VER.2"
578Touch De Zunou (Rev A)                              840-0166C  not present  2 (512Mb)   present  317-0435-JPN  present  IC4# is marked "18"
581Touch De Zunou (Rev A)                              840-0166C  not present  2 (512Mb)   present  317-0435-JPN  present  IC4# is marked "18", requires 837-14672 sensor board (SH4 based)
579582
580583
581584
r241914r241915
624627 Game                                Type  on cart   FLASHROM  # of SOP48  IC @ 1F      IC @ 1H   IC @ 2K   IC @ 1M       code (1)    Notes
625628------------------------------------------------------------------------------------------------------------------------------------------------------
626629/Gun Survivor 2 Biohazard
627\Code: Veronica                      F1X   25709801  1 (64Mb)  14 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5075-COM  BHF1
630\Code: Veronica                      F1X   25709801  1 (64Mb)  14 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5075-COM  BHF1        uses Namco FCA JVS I/O, will crash if COMM.BOARD not present
628631/Gun Survivor 2 Biohazard
629632\Code: Veronica (Ver. E)             F1X   25709801  1 (64Mb)  14 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5075-COM  BHF2
630633/Shin Nihon Prowrestling Toukon                                                                                                       /FL0 & FL1 have pin55 raised from PCB.
631634\Retsuden 4 Arcade Edition (Ver. A)  F2X   25349801  2 (64Mb)  15 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5040-COM  TRF1        \They are connected togheter and go to pin89 on 2K.
632World Kicks PCB (WKC1 Ver. A)        F2    25509801  2 (64Mb)   9 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5040-COM  WKC1
635World Kicks PCB (WKC1 Ver. A)        F2    25509801  2 (64Mb)   9 (128Mb)  not present  NAODEC2A  NAODEC1B  317-5040-COM  WKC1        uses Namco V226 JVS I/O
633636World Kicks (WK2 Ver. A)             F2    25209801  2 (64Mb)   9 (128Mb)  not present  NAODEC2A  NAODEC1A  317-5040-COM  WK2
634637World Kicks (WK3 Ver. A)             F2    25209801  2 (64Mb)   9 (128Mb)  not present  NAODEC2A  NAODEC1A  317-5040-COM  WK3
635638
r241914r241915
677680                                    Cart  Sticker   FL0-FL3   FLASHROMs   X76F100  CY37128  315-5881      Known Game
678681 Game                               Type  on cart   FLASHROM  # of SOP48  IC @ 1F  IC @ 2J  IC @ 1M       code (1)    Notes
679682--------------------------------------------------------------------------------------------------------------------------------
680Mazan: Flash of the Blade (Ver. A)  F1X   25869812  1 (64Mb)   8 (128Mb)  present  NAODEC3  317-0266-COM  MAZ2
683Mazan: Flash of the Blade (Ver. A)  F1X   25869812  1 (64Mb)   8 (128Mb)  present  NAODEC3  317-0266-COM  MAZ2        uses 2x Namco FCB JVS I/O
681684Mazan: Flash of the Blade (Ver. A)  F1X   25869812  1 (64Mb)   8 (128Mb)  present  NAODEC3  317-0266-COM  MAZ3
682Ninja Assault (Ver. A)              F3    25469801  3 (64Mb)   9 (128Mb)  present  NAODEC3  317-5068-COM  NJA1
685Ninja Assault (Ver. A)              F3    25469801  3 (64Mb)   9 (128Mb)  present  NAODEC3  317-5068-COM  NJA1        uses Namco JYU JVS I/O
683686Ninja Assault (Ver. A)              F3    25469801  3 (64Mb)   9 (128Mb)  present  NAODEC3  317-5068-COM  NJA2
684687Ninja Assault (Ver. A)              F3    25469801  3 (64Mb)   9 (128Mb)  present  NAODEC3  317-5068-COM  NJA3
685688Ninja Assault (Ver. A)              F3    25469801  3 (64Mb)   9 (128Mb)  present  NAODEC3  317-5068-COM  NJA4
r241914r241915
26582661 */
26592662
26602663static MACHINE_CONFIG_DERIVED( naomim4, naomi_base )
2661   MCFG_NAOMI_M4_BOARD_ADD("rom_board", ":rom_key", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
2664   MCFG_NAOMI_M4_BOARD_ADD("rom_board", ":pic_readout", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
26622665MACHINE_CONFIG_END
26632666
26642667/*
r241914r241915
27762779
27772780Ferrari F355 specific Naomi BIOS roms:
27782781
2782EPR-21863 - NAOMI BOOT ROM 1999 07/02  1.34 (USA)
27792783EPR-22850 - NAOMI BOOT ROM 1999 08/30  1.35 (USA)
27802784EPR-22851 - NAOMI BOOT ROM 1999 08/30  1.35 (Export)
27812785
r241914r241915
28642868   ROM_SYSTEM_BIOS( 2, "bios2", "HOTD2 (Proto)" ) \
28652869   ROM_LOAD16_WORD_SWAP_BIOS( 2,  "hotd2biosproto.ic27", 0x000000, 0x200000, CRC(ea74e967) SHA1(e4d037480eb6555d335a8ab9cd6c56122335586d) )
28662870
2871#define F355DLX_BIOS \
2872   ROM_REGION( 0x200000, "maincpu", 0) \
2873   ROM_SYSTEM_BIOS( 0, "bios0", "Ferrari F355 Deluxe (USA)" ) \
2874   ROM_LOAD16_WORD_SWAP_BIOS( 0,  "epr-21863.ic27", 0x000000, 0x200000, CRC(0615a4d1) SHA1(2c6986580b84278af75f396229fdd587bebc1768) )
2875
28672876#define F355_BIOS \
28682877   ROM_REGION( 0x200000, "maincpu", 0) \
28692878   ROM_SYSTEM_BIOS( 0, "bios0", "Ferrari F355 (Export)" ) \
r241914r241915
30013010   ROM_REGION( 0x8400000, "rom_board", ROMREGION_ERASE)
30023011ROM_END
30033012
3013ROM_START( f355dlx )
3014   F355DLX_BIOS
3015   NAOMI_DEFAULT_EEPROM
3016
3017   ROM_REGION( 0x8400000, "rom_board", ROMREGION_ERASE)
3018ROM_END
3019
30043020ROM_START( f355bios )
30053021   F355_BIOS
30063022   NAOMI_DEFAULT_EEPROM
r241914r241915
37003716*/
37013717
37023718ROM_START( f355 )
3703   F355_BIOS /* note: require (undumped) special BIOS, game not compatible with EPR-22850/EPR-22851 from twin-versions */
3719   F355DLX_BIOS
37043720   NAOMI_DEFAULT_EEPROM
37053721
37063722   ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF)
r241914r241915
51655181   ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 )
51665182ROM_END
51675183
5168/*
5184// Shootout Pool
5185ROM_START( shootopl )
5186   NAOMI_BIOS
5187   NAOMI_DEFAULT_EEPROM
51695188
5170SYSTEMID: NAOMI
5171JAP: SHOOTOUT POOL
5172USA: SHOOTOUT POOL
5173EXP: SHOOTOUT POOL PRIZE
5189   ROM_REGION( 0x3000000, "rom_board", ROMREGION_ERASEFF)
5190   ROM_LOAD( "epr-23844.ic11", 0x000000, 0x400000, CRC(5c229638) SHA1(9185f9f2369bb2423faff4222419001ac9037d3f) )
5191   ROM_LOAD32_WORD( "mtp-23840.ic17s", 0x1000000, 0x800000, CRC(985e5ff4) SHA1(a6f529b1855cc2aef3bed8503746c2e38061f944) )
5192   ROM_LOAD32_WORD( "mtp-23841.ic18",  0x1000002, 0x800000, CRC(255fc335) SHA1(34ffec963880383bb9c02642f73ba3c852699831) )
5193   ROM_LOAD32_WORD( "mtp-23842.ic19s", 0x2000000, 0x800000, CRC(80724895) SHA1(ed4fa1160b35b3987702c0178bd31c3c5db69e6e) )
5194   ROM_LOAD32_WORD( "mtp-23843.ic20",  0x2000002, 0x800000, CRC(3574f616) SHA1(40130e8f98fb31c98428d444b79491f6a06ac208) )
51745195
5175*/
5196   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
51765197
5198   ROM_REGION( 4, "rom_key", 0 )
5199   ROM_LOAD( "shootopl-key.bin", 0, 4, CRC(45547e02) SHA1(4f79f478ff1eea14bc939a67ff570143cb56a4bf) )
5200ROM_END
5201
5202// Shootout Pool Prize
51775203ROM_START( shootpl )
51785204   NAOMI_BIOS
51795205   NAOMI_DEFAULT_EEPROM
r241914r241915
51915217   ROM_LOAD( "shootpl-key.bin", 0, 4, CRC(03c30b17) SHA1(e8e8659aa27b3d1cac2268850d3973d9afeaeba9) )
51925218ROM_END
51935219
5194// SHOOTOUT POOL (the original, the above set is a sequel)
5195ROM_START( shootopl )
5196   NAOMI_BIOS
5197   NAOMI_DEFAULT_EEPROM
5198
5199   ROM_REGION( 0x3000000, "rom_board", ROMREGION_ERASEFF)
5200   ROM_LOAD( "epr-23844.ic11", 0x000000, 0x400000, CRC(5c229638) SHA1(9185f9f2369bb2423faff4222419001ac9037d3f) )
5201   ROM_LOAD32_WORD( "mtp-23840.ic17s", 0x1000000, 0x800000, CRC(985e5ff4) SHA1(a6f529b1855cc2aef3bed8503746c2e38061f944) )
5202   ROM_LOAD32_WORD( "mtp-23841.ic18",  0x1000002, 0x800000, CRC(255fc335) SHA1(34ffec963880383bb9c02642f73ba3c852699831) )
5203   ROM_LOAD32_WORD( "mtp-23842.ic19s", 0x2000000, 0x800000, CRC(80724895) SHA1(ed4fa1160b35b3987702c0178bd31c3c5db69e6e) )
5204   ROM_LOAD32_WORD( "mtp-23843.ic20",  0x2000002, 0x800000, CRC(3574f616) SHA1(40130e8f98fb31c98428d444b79491f6a06ac208) )
5205
5206   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
5207
5208   ROM_REGION( 4, "rom_key", 0 )
5209   ROM_LOAD( "shootopl-key.bin", 0, 4, CRC(45547e02) SHA1(4f79f478ff1eea14bc939a67ff570143cb56a4bf) )
5210ROM_END
5211
5212/* Shootout Pool Medal */
5220// Shootout Pool Prize Ver. B
52135221ROM_START( shootplm )
52145222   NAOMI_BIOS
52155223   NAOMI_DEFAULT_EEPROM
r241914r241915
55895597   ROM_LOAD( "fpr-24333.ic8", 0x0000000, 0x4000000, CRC(a467b69c) SHA1(66a841b72ef1bb8cbabbfb1d14081b4dff14b1d3) )
55905598   ROM_LOAD( "fpr-24334.ic9", 0x4000000, 0x4000000, CRC(13d2d1dc) SHA1(6a47cfaddf006e6ff46837fac956fbcc20619d79) )
55915599
5592   ROM_REGION( 4, "rom_key", 0 )
5593   ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5600   // ROM_REGION( 4, "rom_key", 0 )
5601   // ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5602   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5603   ROM_LOAD( "317-0437-com.ic3", 0, 20, NO_DUMP )
55945604
55955605   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
55965606ROM_END
r241914r241915
56045614   ROM_LOAD( "epr-24357.ic7", 0x0000000, 0x0400000, CRC(a2236d58) SHA1(3746b9d3c0f7ecf6340619bb8bf01f170ac4efb7) ) // EPR mode, overwrite FPR data
56055615   ROM_LOAD( "fpr-24334.ic9", 0x4000000, 0x4000000, CRC(13d2d1dc) SHA1(6a47cfaddf006e6ff46837fac956fbcc20619d79) )
56065616
5607   ROM_REGION( 4, "rom_key", 0 )
5608   ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5617   // ROM_REGION( 4, "rom_key", 0 )
5618   // ROM_LOAD( "mushik2e-key.bin", 0, 4, CRC(b32a0633) SHA1(984c01e43cf359d8e8a0c6cb1a04c5dc3da47d39) )
5619   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5620   ROM_LOAD( "317-0437-com.ic3", 0, 20, NO_DUMP )
56095621
56105622   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x82))
56115623ROM_END
r241914r241915
56185630   ROM_LOAD( "fpr-24338.ic8", 0x0000000, 0x4000000, CRC(1423c374) SHA1(e6a3f0eaccd13c161d07705bcd00f447f08fc186) )
56195631   ROM_LOAD( "fpr-24339.ic9", 0x4000000, 0x4000000, CRC(11883792) SHA1(1782db04f74394f981f887ab1a95d687eb2c0b35) )
56205632
5621   ROM_REGION( 4, "rom_key", 0 )
5622   ROM_LOAD( "zunou-key.bin", 0, 4, CRC(cbe35afb) SHA1(78877655800aae27661bf720e1c37d6c6f2e3d1c) )
5633   // ROM_REGION( 4, "rom_key", 0 )
5634   // ROM_LOAD( "zunou-key.bin", 0, 4, CRC(cbe35afb) SHA1(78877655800aae27661bf720e1c37d6c6f2e3d1c) )
5635   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5636   ROM_LOAD( "317-0435-jpn.ic3", 0, 20, NO_DUMP )
56235637
56245638   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x02))
56255639ROM_END
r241914r241915
56345648   ROM_LOAD( "fpr-24415.ic10", 0x8000000, 0x4000000, CRC(133c742c) SHA1(89f857a31731dc918afc72b6cb716f5c77cb9d6e) )
56355649   ROM_LOAD( "fpr-24416.ic11", 0xc000000, 0x4000000, CRC(562fb88e) SHA1(172678e3e27cfad7f7e6217c4653a4ba119bfbdf) )
56365650
5637   ROM_REGION( 4, "rom_key", 0 )
5638   ROM_LOAD( "sl2007-key.bin", 0, 4, CRC(d5d1e807) SHA1(8a0cc371729c622bb05c5d26b3e39ec31d29ace1) )
5651   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5652   ROM_LOAD( "317-5129-jpn.ic3", 0, 20, CRC(b6191cea) SHA1(13e14ff013bf2728203641303141c016e82b10a3) )
56395653
56405654   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
56415655ROM_END
r241914r241915
56505664   ROM_LOAD( "fpr-24384.ic10", 0x8000000, 0x4000000, CRC(2e9116c4) SHA1(58903a33c4ce72a1f75aefcab94393fc2e8bd2d9) )
56515665   ROM_LOAD( "fpr-24385.ic11", 0xc000000, 0x4000000, CRC(2b79f45d) SHA1(db97d980bf1590df4b983a4b7786977687238ef5) )
56525666
5653   ROM_REGION( 4, "rom_key", 0 )
5654   ROM_LOAD( "asndynmt-key.bin", 0, 4, CRC(bf5396a9) SHA1(0b27fdc800143fb977cb2f1e937078d7a7006939) )
5667   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5668   ROM_LOAD( "317-0495-com.ic3", 0, 20, CRC(675aca7b) SHA1(5127189e1f960abf9ed3f643158747d9abcaee1c) )
56555669
56565670   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
56575671ROM_END
r241914r241915
56665680   ROM_LOAD( "fpr-24439.ic10", 0x8000000, 0x4000000, CRC(c02040f9) SHA1(27ad2cb45e8a516433917f060ca9798412bb95f7) )
56675681   // IC11 Populated, Empty
56685682
5669   ROM_REGION( 4, "rom_key", 0 )
5670   ROM_LOAD( "illvelo-key.bin", 0, 4, CRC(e164952f) SHA1(6c0dfe567640e1e843a5d7bf858a24c101dfcf95) )
5683   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5684   ROM_LOAD( "317-5131-jpn.ic3", 0, 20, CRC(44ab8ca9) SHA1(c17b10041e70590547ed010dc16a4dd2510fcc80) )
56715685
56725686   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
56735687ROM_END
r241914r241915
56825696   ROM_LOAD( "ic10.bin", 0x8000000, 0x4000000, CRC(76fb945f) SHA1(448be0c3d9a7c3956dd51aca3c4d8d28f8cec227) )
56835697   // IC11 Populated, Empty
56845698
5685   ROM_REGION( 4, "rom_key", 0 )
5686   ROM_LOAD( "mamonoro-key.bin", 0x000000, 0x000004, CRC(264ca27a) SHA1(3b81b9794d86697f8eac7ea6945d992564ad6199) )
5699   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5700   ROM_LOAD( "317-5132-jpn.ic3", 0, 20, CRC(f2089de5) SHA1(12af0681decb22bbfa4b3e01037c3503846f265a) )
56875701
56885702   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
56895703ROM_END
r241914r241915
57005714   ROM_LOAD( "ic12.bin",     0x10000000, 0x4000000, CRC(b8a6bff2) SHA1(befbc2e917b3107f1c4bfb9169623282ff97bfb2) )
57015715   ROM_LOAD( "ic13.bin",     0x14000000, 0x4000000, CRC(4886329f) SHA1(6ccf6fb83cfdbef3f85f6c06e641c38ff434d605) )
57025716
5703   ROM_REGION( 4, "rom_key", 0 )
5704   ROM_LOAD( "mbaa-key.bin", 0x000000, 0x000004, CRC(f4ad909f) SHA1(27ba44592c2642b5862a24f68c755ad4115e6047) )
5717   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5718   ROM_LOAD( "317-5133-jpn.ic3", 0, 20, CRC(3dc7d902) SHA1(bb70e80dff878bca3652088f3333079e0781f482) )
57055719
57065720   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x06))
57075721ROM_END
r241914r241915
57195733   ROM_LOAD( "ic12.bin",     0x10000000, 0x4000000, CRC(b8a6bff2) SHA1(befbc2e917b3107f1c4bfb9169623282ff97bfb2) )
57205734   ROM_LOAD( "ic13.bin",     0x14000000, 0x4000000, CRC(4886329f) SHA1(6ccf6fb83cfdbef3f85f6c06e641c38ff434d605) )
57215735
5722   ROM_REGION( 4, "rom_key", 0 )
5723   ROM_LOAD( "mbaa-key.bin", 0x000000, 0x000004, CRC(f4ad909f) SHA1(27ba44592c2642b5862a24f68c755ad4115e6047) )
5736   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5737   ROM_LOAD( "317-5133-jpn.ic3", 0, 20, CRC(3dc7d902) SHA1(bb70e80dff878bca3652088f3333079e0781f482) )
57245738
57255739   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x86))
57265740ROM_END
r241914r241915
57345748   ROM_LOAD( "ic9.bin", 0x4000000, 0x4000000, CRC(16cf2e7a) SHA1(ff7c6540e4507f84e3128ba03be4826ba504678c) )
57355749   // IC10 and IC11 Populated, Empty
57365750
5737   ROM_REGION( 4, "rom_key", 0 )
5738   ROM_LOAD( "radirgyn-key.bin", 0x000000, 0x000004, CRC(c158cf3b) SHA1(c128646d7fee79fc10bf7bbaa23121f347df77f4) )
5751   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5752   ROM_LOAD( "317-5138-jpn.ic3", 0, 20, CRC(babcc420) SHA1(653cdcfa388426f4ce03c76506046ec6fd070562) )
57395753
57405754   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57415755ROM_END
r241914r241915
57495763   ROM_LOAD( "ic9.bin",    0x4000000, 0x4000000, CRC(18c994d7) SHA1(159e1425b2fc645133814b0d26d93a90e9849b1a) )
57505764   // IC10 and IC11 Populated, Empty
57515765
5752   ROM_REGION( 4, "rom_key", 0 )
5753   ROM_LOAD( "ausfache-key.bin", 0, 4, CRC(93cdc793) SHA1(f0a0c321a3bdf8ca87cbd840a168a9057c08f16a) )
5766   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5767   ROM_LOAD( "317-5130-jpn.ic3", 0, 20, CRC(3e0c010b) SHA1(b6da97d4ecb228e73fb9a5ada837d0d6699ab0f1) )
57545768
57555769   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
57565770ROM_END
r241914r241915
57695783   ROM_REGION( 0x200000, "ioboard", 0) // touch screen I/O board, program disassembles as little-endian SH-4
57705784   ROM_LOAD( "fpr24351.ic14", 0x000000, 0x200000, CRC(4d1b7b89) SHA1(965b8c6b5a2e7b3f1b1e2eac19c86000c3b66754) )
57715785
5772   ROM_REGION( 4, "rom_key", 0 )
5773   ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5786   // ROM_REGION( 4, "rom_key", 0 )
5787   // ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5788   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5789   ROM_LOAD( "317-0461-com.ic3", 0, 20, NO_DUMP )
57745790
57755791   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
57765792ROM_END
r241914r241915
57895805   ROM_REGION( 0x200000, "ioboard", 0) // touch screen I/O board, program disassembles as little-endian SH-4
57905806   ROM_LOAD( "fpr24351.ic14", 0x000000, 0x200000, CRC(4d1b7b89) SHA1(965b8c6b5a2e7b3f1b1e2eac19c86000c3b66754) )
57915807
5792   ROM_REGION( 4, "rom_key", 0 )
5793   ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5808   // ROM_REGION( 4, "rom_key", 0 )
5809   // ROM_LOAD( "pokasuka-key.bin", 0, 4, CRC(f00bcd61) SHA1(b8315b851656c2e0b7853979988d1c44eab0886b) )
5810   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5811   ROM_LOAD( "317-0461-com.ic3", 0, 20, NO_DUMP )
57945812
57955813   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x05))
57965814ROM_END
r241914r241915
58085826   ROM_LOAD( "fpr-24425.ic10", 0x08000000, 0x4000000, CRC(6223ebac) SHA1(64c0ec61c108acbb557e7d3837f578deba832cb6) )
58095827   ROM_LOAD( "fpr-24426.ic11", 0x0c000000, 0x4000000, CRC(c78b0981) SHA1(f889acf9065566e11ff985a3b6c4824e364d57ae) )
58105828
5811   ROM_REGION( 4, "rom_key", 0 )
5812   ROM_LOAD( "rhytngk-key.bin", 0x000000, 0x000004, CRC(e2560d28) SHA1(46fb9b47a0df3035f92db2b0c63a6e4e0745ad29) )
5829   ROM_REGION( 20, "pic_readout", 0 ) // data obtained using a custom PIC reader
5830   ROM_LOAD( "317-0503-jpn.ic3", 0, 20, CRC(69fc3f47) SHA1(3a887c62e93fa264b307c954eb39a4fca1bdfad6) )
58135831
58145832   ROM_REGION(0x4, "boardid", ROMREGION_ERASEVAL(0x04))
58155833ROM_END
r241914r241915
88468864/* Main board and game specific BIOS */
88478865/* Naomi */ GAME( 1998, naomi,    0, naomi, naomi, naomi_state,   naomi, ROT0, "Sega", "Naomi Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
88488866/* game  */ GAME( 1998, hod2bios, 0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi House of the Dead 2 Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
8849/* game  */ GAME( 1999, f355bios, 0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi Ferrari F355 Challenge Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
8867/* game  */ GAME( 1999, f355dlx,  0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi Ferrari F355 Challenge (deluxe) Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
8868/* game  */ GAME( 1999, f355bios, 0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi Ferrari F355 Challenge (twin) Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
88508869/* game  */ GAME( 1999, airlbios, 0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi Airline Pilots (deluxe) Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
88518870/* Naomi2*/ GAME( 2001, naomi2,   0, naomi, naomi, driver_device, 0,     ROT0, "Sega", "Naomi 2 Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
88528871/* GDROM */ GAME( 2001, naomigd,  0, naomi, naomi, naomi_state,   naomi, ROT0, "Sega", "Naomi GD-ROM Bios", GAME_FLAGS|GAME_IS_BIOS_ROOT )
r241914r241915
88548873/* 834-xxxxx (Sega Naomi cart with game specific BIOS sets) */
88558874/* 13636-01 */ GAME( 1998, hotd2,  hod2bios, naomim2, hotd2, naomi_state,   hotd2, ROT0, "Sega", "House of the Dead 2", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */
88568875/* 13636  */ GAME( 1998, hotd2o,   hotd2,    naomim2, hotd2, naomi_state,   hotd2, ROT0, "Sega", "House of the Dead 2 (original)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */
8857/* 13636? */ GAME( 1998, hotd2p,   hotd2,    naomim2, hotd2, naomi_state,   hotd2, ROT0, "Sega", "House of the Dead 2 (prototype)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */
8858/* 13842  */ GAME( 1999, f355,     f355bios, naomim2, naomi, driver_device, 0,     ROT0, "Sega", "Ferrari F355 Challenge", GAME_FLAGS ) /* specific BIOS "f355bios" needed */
8876/* none   */ GAME( 1998, hotd2p,   hotd2,    naomim2, hotd2, naomi_state,   hotd2, ROT0, "Sega", "House of the Dead 2 (prototype)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */
8877/* 13842  */ GAME( 1999, f355,     f355dlx,  naomim2, naomi, driver_device, 0,     ROT0, "Sega", "Ferrari F355 Challenge (deluxe)", GAME_FLAGS ) /* specific BIOS "f355dlx" needed */
88598878/* 13950  */ GAME( 1999, f355twin, f355bios, naomim2, naomi, driver_device, 0,     ROT0, "Sega", "Ferrari F355 Challenge (twin)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */
88608879/* ?????  */ GAME( 2001, f355twn2, f355bios, naomim2, naomi, driver_device, 0,     ROT0, "Sega", "Ferrari F355 Challenge 2 (twin)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */
88618880/* ?????  */ GAME( 1999, alpiltdx, airlbios, naomim2, naomi, driver_device, 0,     ROT0, "Sega", "Airline Pilots (deluxe) (Rev B)", GAME_FLAGS ) /* specific BIOS "airlbios" needed */
r241914r241915
88788897/* 0018 */ GAME( 1999, sgtetris, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Sega Tetris", GAME_FLAGS )
88798898/* 0019 */ GAME( 1999, dybb99,   naomi,    naomim2, dybbnao, naomi_state, naomi,   ROT0, "Sega", "Dynamite Baseball '99 (JPN) / World Series '99 (USA, EXP, KOR, AUS) (Rev B)", GAME_FLAGS )
88808899/* 0020 */ GAME( 1999, samba,    naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Samba De Amigo (JPN) (Rev B)", GAME_FLAGS )
8881/* 0020? */GAME( 1999, sambap,   samba,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Samba De Amigo (prototype)", GAME_FLAGS )
8882/* 0021 */ GAME( 2000, virnbap,  virnba,   naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Virtua NBA (prototype)", GAME_FLAGS )
8900/* none */ GAME( 1999, sambap,   samba,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Samba De Amigo (prototype)", GAME_FLAGS )
8901/* none */ GAME( 2000, virnbap,  virnba,   naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Virtua NBA (prototype)", GAME_FLAGS )
88838902/* 0021 */ GAME( 2000, virnbao,  virnba,   naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Virtua NBA (JPN, USA, EXP, KOR, AUS) (original)", GAME_FLAGS )
88848903/* 0021-01*/GAME( 2000,virnba,   naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Virtua NBA (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
88858904/* 0022 */ GAME( 2000, tduno2,   naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Touch de Uno! 2", GAME_FLAGS )
r241914r241915
89148933/* 0088 */ GAME( 2001, derbyocw, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Derby Owners Club World Edition (JPN, USA, EXP, KOR, AUS) (Rev D)", GAME_FLAGS )
89158934/* 0088 */ GAME( 2001, drbyocwc, derbyocw, naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Derby Owners Club World Edition (JPN, USA, EXP, KOR, AUS) (Rev C)", GAME_FLAGS )
89168935/* 0098 */ GAME( 2002, shootopl, naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Shootout Pool", GAME_FLAGS )
8917/* 0123 */ GAME( 2001, starhrsp, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Star Horse Progress (Rev A)", GAME_FLAGS )
8936/* 0123 */ GAME( 2003, starhrsp, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Star Horse Progress (Rev A)", GAME_FLAGS )
89188937/* 0126 */ GAME( 2003, oinori,   naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Oinori-daimyoujin Matsuri", GAME_FLAGS )
8919/* 0128 */ GAME( 2002, shootpl,  naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Shootout Pool (JPN, USA, KOR, AUS) / Shootout Pool Prize (EXP) (Rev A)", GAME_FLAGS )
8938/* 0128 */ GAME( 2003, shootpl,  naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Shootout Pool The Medal / Shootout Pool Prize (Rev A)", GAME_FLAGS )
89208939/* 0130 */ GAME( 2002, hopper,   naomi,    naomi,   naomi,   naomi_state, naomi,   ROT0, "Sega", "SWP Hopper Board", GAME_FLAGS )
8921/* 0136 */ GAME( 2001, shootplm, naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Shootout Pool Medal", GAME_FLAGS )
8940/* 0136 */ GAME( 2004, shootplm, naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Shootout Pool The Medal Ver. B / Shootout Pool Prize Ver. B", GAME_FLAGS )
89228941/* 0140 */ GAME( 2004, kick4csh, naomi,    naomim1, naomi,   naomi_state, kick4csh,ROT0, "Sega", "Kick '4' Cash", GAME_FLAGS )
89238942/* 0150 */ GAME( 2003, mtkob2,   naomi,    naomim1, naomi,   naomi_state, naomi,   ROT0, "Sega", "Mushiking The King Of Beetle 2K3 2nd", GAME_FLAGS )
89248943/* 0158 */ GAME( 2005, mushi2k5, naomi,    naomim2, naomi,   naomi_state, naomi,   ROT0, "Sega", "Mushiking The King Of Beetle 2K5 1st", GAME_FLAGS )
r241914r241915
89298948/* 0170 */ GAME( 2007, pokasuka, manicpnc, naomim4, naomi,   naomi_state, naomi,   ROT0, "Sega", "Pokasuka Ghost", GAME_FLAGS )
89308949/* 0175 */ GAME( 2007, asndynmt, naomi,    naomim4, naomi,   naomi_state, naomi,   ROT0, "Sega", "Asian Dynamite", GAME_FLAGS )
89318950/* 0177 */ GAME( 2007, rhytngk,  naomi,    naomim4, naomi,   naomi_state, naomi,   ROT0, "Sega/Nintendo", "Rhythm Tengoku", GAME_FLAGS )
8951// 01?? Star Horse Progress Returns
89328952// 00xx Mayjinsen (Formation Battle in May) - prototype, never released
89338953
89348954/* Cartridge prototypes of games released on GD-ROM */
r241914r241915
89508970/* 0137 */ GAME( 2004, clubkpzb, naomi2,  naomi2m1, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart Prize Ver. B", GAME_FLAGS )
89518971// needs verification is this dump really from 840-0139C cart
89528972/* 0139 */ GAME( 2003, clubk2k3, naomi2,  naomi2m1, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (2003)", GAME_FLAGS )
8953/* ??? */ GAME( 2003, clubk2kp, clubk2k3,naomi2,   naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (2003, prototype)", GAME_FLAGS )
8973/* none */ GAME( 2003, clubk2kp, clubk2k3,naomi2,   naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (2003, prototype)", GAME_FLAGS )
89548974
89558975/* 841-xxxxx ("Licensed by Sega" Naomi cart games)*/
89568976/* 0001 */ GAME( 1999, pstone,   naomi, naomim2, naomi,   naomi_state, naomi,  ROT0,  "Capcom",          "Power Stone (JPN, USA, EUR, ASI, AUS)", GAME_FLAGS )
trunk/src/mame/drivers/popobear.c
r241914r241915
8989      : driver_device(mconfig, type, tag),
9090      m_maincpu(*this,"maincpu"),
9191      m_spr(*this, "spr"),
92      m_vram(*this, "vram"),
9293      m_vregs(*this, "vregs"),
9394      m_gfxdecode(*this, "gfxdecode"),
9495      m_palette(*this, "palette")
r241914r241915
9899      tilemap_base[1] = 0xf4000;
99100      tilemap_base[2] = 0xf8000;
100101      tilemap_base[3] = 0xfc000;
101
102      tilemap_size[0] = 0x04000;
103      tilemap_size[1] = 0x04000;
104      tilemap_size[2] = 0x04000;
105      tilemap_size[3] = 0x04000;
106102   }
107103
108104   required_device<cpu_device> m_maincpu;
109105   required_shared_ptr<UINT16> m_spr;
106   required_shared_ptr<UINT16> m_vram;
110107   required_shared_ptr<UINT16> m_vregs;
111108   optional_device<gfxdecode_device> m_gfxdecode;
112109   required_device<palette_device> m_palette;
113110
114   UINT16* m_vram;
115   UINT16* m_vram_rearranged;
111   dynamic_array<UINT16> m_vram_rearranged;
116112
117113   int tilemap_base[4];
118   int tilemap_size[4];
119114
120115   DECLARE_READ8_MEMBER(popo_620000_r);
121116   DECLARE_WRITE8_MEMBER(popobear_irq_ack_w);
r241914r241915
124119   TIMER_DEVICE_CALLBACK_MEMBER(popobear_irq);
125120   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
126121
127   int m_gfx_index;
128122   tilemap_t    *m_bg_tilemap[4];
129123   TILE_GET_INFO_MEMBER(get_popobear_bg0_tile_info);
130124   TILE_GET_INFO_MEMBER(get_popobear_bg1_tile_info);
r241914r241915
149143
150144
151145      COMBINE_DATA(&m_vram_rearranged[swapped_offset]);
152      m_gfxdecode->gfx(m_gfx_index)->mark_dirty((swapped_offset)/32);
146      m_gfxdecode->gfx(0)->mark_dirty((swapped_offset)/32);
153147
154148      // unfortunately tilemaps and tilegfx share the same ram so we're always dirty if we write to RAM
155149      m_bg_tilemap[0]->mark_all_dirty();
r241914r241915
158152      m_bg_tilemap[3]->mark_all_dirty();
159153
160154   }
161   DECLARE_READ16_MEMBER(popo_vram_r) { return m_vram[offset]; }
162155
163156};
164157
r241914r241915
166159static const gfx_layout popobear_char_layout =
167160{
168161   8,8,
169   0x4000,
162   RGN_FRAC(1,1),
170163   8,
171164   { 0,1,2,3,4,5,6,7 },
172165   { STEP8(0, 8) },
r241914r241915
174167   8*64
175168};
176169
170GFXDECODE_START(popobear)
171   GFXDECODE_RAM( "vram", 0, popobear_char_layout, 0, 1 )
172GFXDECODE_END
177173
178174TILE_GET_INFO_MEMBER(popobear_state::get_popobear_bg0_tile_info)
179175{
r241914r241915
212208
213209void popobear_state::video_start()
214210{
215   /* find first empty slot to decode gfx */
216   for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
217      if (m_gfxdecode->gfx(m_gfx_index) == 0)
218         break;
211   m_vram_rearranged.resize(0x100000 / 2);
219212
220   assert(m_gfx_index != MAX_GFX_ELEMENTS);
213   m_gfxdecode->gfx(0)->set_source(reinterpret_cast<UINT8 *>(&m_vram_rearranged[0]));
221214
222   m_vram = auto_alloc_array_clear(machine(), UINT16, 0x100000/2);
223   m_vram_rearranged = auto_alloc_array_clear(machine(), UINT16, 0x100000/2);
224
225
226   /* create the char set (gfx will then be updated dynamically from RAM) */
227   m_gfxdecode->set_gfx(m_gfx_index, global_alloc(gfx_element(m_palette, popobear_char_layout, (UINT8 *)m_vram_rearranged, NATIVE_ENDIAN_VALUE_LE_BE(8,0), m_palette->entries() / 16, 0)));
228
229215   m_bg_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popobear_state::get_popobear_bg0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
230216   m_bg_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popobear_state::get_popobear_bg1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
231217   m_bg_tilemap[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(popobear_state::get_popobear_bg2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
r241914r241915
243229
244230void popobear_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect)
245231{
246   // ERROR: This cast is NOT endian-safe without the use of BYTE/WORD/DWORD_XOR_* macros!
247232   UINT8* vram = reinterpret_cast<UINT8 *>(m_spr.target());
248233   int i;
249234
r241914r241915
264249      /* 0x*29 = 32 x 32 */
265250      for(i = 0x800-8;i >= 0; i-=8)
266251      {
267         int y = vram[i+0x7f800+2]|(vram[i+0x7f800+3]<<8);
268         int x = vram[i+0x7f800+4]|(vram[i+0x7f800+5]<<8);
269         int spr_num = vram[i+0x7f800+6]|(vram[i+0x7f800+7]<<8);
270         int param = vram[i+0x7f800+0]|(vram[i+0x7f800+1]<<8);
252         UINT16 *sprdata = &m_spr[(0x7f800 + i) / 2];
271253
254         int param = sprdata[0];
272255         int pri = (param & 0x0f00)>>8;
273256
274257         // we do this because it's sprite<->sprite priority,
275258         if (pri!=drawpri)
276259            continue;
277260
261         int y = sprdata[1];
262         int x = sprdata[2];
263         int spr_num = sprdata[3];
264
278265         int width = 8 << ((param & 0x30)>>4);
279266         int height = width; // sprites are always square?
280267
r241914r241915
327314
328315            for(int xi=0;xi<width;xi++)
329316            {
330               UINT8 pix = (vram[spr_num^1] & 0xff);
317               UINT8 pix = vram[BYTE_XOR_BE(spr_num)];
331318               int x_draw = (x_dir) ? x+((width-1) - xi) : x+xi;
332319
333320               if(cliprect.contains(x_draw, y_draw))
r241914r241915
479466   AM_RANGE(0x000000, 0x03ffff) AM_ROM
480467   AM_RANGE(0x210000, 0x21ffff) AM_RAM
481468   AM_RANGE(0x280000, 0x2fffff) AM_RAM AM_SHARE("spr") // unknown boundaries, 0x2ff800 contains a sprite list, lower area = sprite gfx
482   AM_RANGE(0x300000, 0x3fffff) AM_READWRITE( popo_vram_r, popo_vram_w ) // tile definitions + tilemaps
469   AM_RANGE(0x300000, 0x3fffff) AM_RAM_WRITE( popo_vram_w ) AM_SHARE("vram") // tile definitions + tilemaps
483470
484471
485472   /* Most if not all of these are vregs */
r241914r241915
660647
661648   MCFG_SPEAKER_STANDARD_MONO("mono")
662649
663   MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
650   MCFG_GFXDECODE_ADD("gfxdecode", "palette", popobear)
664651
665652   MCFG_SOUND_ADD("ymsnd", YM2413, XTAL_42MHz/16)  // XTAL CORRECT, DIVISOR GUESSED
666653   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
trunk/src/mame/etc/template_cpu.c
r241914r241915
1// license: ?
1// license: BSD-3-Clause
22// copyright-holders: Angelo Salese
33/*****************************************************************************
44 *
trunk/src/mame/etc/template_cpu.h
r241914r241915
1// license: ?
1// license: BSD-3-Clause
22// copyright-holders: Angelo Salese
33/*****************************************************************************
44 *
r241914r241915
1313
1414enum
1515{
16   #if 0
16   #if UNUSED
1717   XXX_R0=1, XXX_R1, XXX_R2, XXX_R3,
1818   XXX_R4, XXX_R5, XXX_R6, XXX_R7
1919   #endif
trunk/src/mame/etc/template_device.c
r241914r241915
1// license: ?
1// license: BSD-3-Clause
22// copyright-holders: Angelo Salese
33/***************************************************************************
44
trunk/src/mame/etc/template_device.h
r241914r241915
1// license: ?
1// license: BSD-3-Clause
22// copyright-holders: Angelo Salese
33/***************************************************************************
44
trunk/src/mame/etc/template_driver.c
r241914r241915
1// license: ?
1// license: BSD-3-Clause
22// copyright-holders: Angelo Salese
33/***************************************************************************
44
r241914r241915
151151   MCFG_SCREEN_UPDATE_DRIVER(xxx_state, screen_update)
152152//  MCFG_SCREEN_SIZE(32*8, 32*8)
153153//  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
154   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240) /* generic video timing, change accordingly */
154   MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK/2, 442, 0, 320, 264, 0, 240) /* generic NTSC video timing, change accordingly */
155155   MCFG_SCREEN_PALETTE("palette")
156156
157157   MCFG_GFXDECODE_ADD("gfxdecode", "palette", xxx)
trunk/src/mame/etc/template_readme.txt
r0r241915
1The template family tree is an attempt to ease the pain to write CPUs/drivers/devices
2from scratch (especially for smaller projects).
3
4===
5Usage:
6- Any "xxx" name is case-sensitive (i.e., XXX -> NAMEOFDEVICE, xxx -> nameofdevice);
7
8===
9License:
10Copyright (c) 2014, Angelo Salese & the MAME team
11All rights reserved.
12
13Redistribution and use in source and binary forms, with or without
14modification, are permitted provided that the following conditions are met:
15    * Redistributions of source code must retain the above copyright
16      notice, this list of conditions and the following disclaimer.
17    * Redistributions in binary form must reproduce the above copyright
18      notice, this list of conditions and the following disclaimer in the
19      documentation and/or other materials provided with the distribution.
20    * Neither the name of the <organization> nor the
21      names of its contributors may be used to endorse or promote products
22      derived from this software without specific prior written permission.
23
24THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
28DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
35===
36TODO:
37- Define convention for template inputs (i.e. optimal for each host);
38- Write template drivers for different endianesses;
39- Write template header for drivers;
40- Write tool program that auto-generate contents;
trunk/src/mame/includes/lethal.h
r241914r241915
1818      : driver_device(mconfig, type, tag),
1919      m_maincpu(*this, "maincpu"),
2020      m_soundcpu(*this, "soundcpu"),
21      m_bank4800(*this, "bank4800"),
21      m_bank4000(*this, "bank4000"),
2222      m_k056832(*this, "k056832"),
2323      m_k053244(*this, "k053244"),
2424      m_palette(*this, "palette") { }
r241914r241915
2626   /* video-related */
2727   int        m_layer_colorbase[4];
2828   int        m_sprite_colorbase;
29   int        m_back_colorbase;
2930
3031   /* misc */
3132   UINT8      m_cur_control2;
r241914r241915
3334   /* devices */
3435   required_device<cpu_device> m_maincpu;
3536   required_device<cpu_device> m_soundcpu;
36   required_device<address_map_bank_device> m_bank4800;
37   required_device<address_map_bank_device> m_bank4000;
3738   required_device<k056832_device> m_k056832;
3839   required_device<k05324x_device> m_k053244;
3940   required_device<palette_device> m_palette;
r241914r241915
4344   DECLARE_WRITE8_MEMBER(sound_irq_w);
4445   DECLARE_READ8_MEMBER(sound_status_r);
4546   DECLARE_WRITE8_MEMBER(le_bankswitch_w);
46   DECLARE_WRITE8_MEMBER(le_bgcolor_w);
4747   DECLARE_READ8_MEMBER(guns_r);
4848   DECLARE_READ8_MEMBER(gunsaux_r);
4949   DECLARE_WRITE8_MEMBER(lethalen_palette_control);
trunk/src/mame/layout/alinvade.lay
r0r241915
1<?xml version="1.0"?>
2<mamelayout version="2">
3   <element name="overlay">
4      <rect>
5         <bounds left="0" top="0" right="127" bottom="23" />
6         <color red="1" green="1" blue="0.60" />
7      </rect>
8      <rect>
9         <bounds left="0" top="24" right="127" bottom="82" />
10         <color red="0.25" green="1" blue="0.65" />
11      </rect>
12      <rect>
13         <bounds left="0" top="83" right="127" bottom="127" />
14         <color red="1" green="0.125" blue="0.125" />
15      </rect>
16   </element>
17
18   <view name="Color Overlay">
19      <screen index="0">
20         <bounds left="0" top="0" right="3" bottom="4" />
21      </screen>
22      <overlay name="overlay" element="overlay">
23         <bounds left="0" top="0" right="3" bottom="4" />
24      </overlay>
25   </view>
26</mamelayout>
trunk/src/mame/machine/naomim4.c
r241914r241915
1616// phase is indeed a nibble-based linear combination.
1717// With that block cipher, a stream cipher is constructed by feeding the output result of the 1st round
1818// of a certain 16-bits block as a whitening value for the next block. The cart dependent data used by
19// the algorithm is comprised by a 16-bits "key" and a 16-bits IV (initialization vector) --though they
20// will be merged in a only 32-bits number in the code--. The hardware auto-reset the feed value
19// the algorithm is a 32-bits key stored in the PIC16C621A. The hardware auto-reset the feed value
2120// to the cart-based IV every 16 blocks (32 bytes); that reset is not address-based, but index-based.
2221
2322const device_type NAOMI_M4_BOARD = &device_creator<naomi_m4_board>;
2423
2524const UINT8 naomi_m4_board::k_sboxes[4][16] = {
26   {13,14,1,11,7,9,10,0,15,6,4,5,8,2,12,3},
27   {12,3,14,6,7,15,2,13,1,4,11,0,9,10,8,5},
28   {6,12,0,10,1,5,14,9,7,2,15,13,4,11,3,8},
29   {9,12,8,7,10,4,0,15,1,11,14,2,13,5,6,3}
25   {9,8,2,11,1,14,5,15,12,6,0,3,7,13,10,4},
26   {2,10,0,15,14,1,11,3,7,12,13,8,4,9,5,6},
27   {4,11,3,8,7,2,15,13,1,5,14,9,6,12,0,10},
28   {1,13,8,2,0,5,6,14,4,11,15,10,12,3,7,9}
3029};
3130
3231// from S29GL512N datasheet
r241914r241915
6766   key = tempkey & 0xffff;
6867#else
6968   const UINT8 *key_data = memregion(key_tag)->base();
70   key = (key_data[2] << 8) | key_data[3];
71   iv = (key_data[0] << 8) | key_data[1];
69   subkey1 = (key_data[17] << 8) | key_data[16];
70   subkey2 = (key_data[19] << 8) | key_data[18];
7271#endif
7372   buffer = auto_alloc_array(machine(), UINT8, BUFFER_SIZE);
7473   enc_init();
r241914r241915
117116   encryption = false;
118117   cfi_mode = false;
119118   counter = 0;
120   cur_iv = 0;
119   iv = 0;
121120}
122121
123122void naomi_m4_board::board_setup_address(UINT32 address, bool is_dma)
r241914r241915
176175void naomi_m4_board::enc_reset()
177176{
178177   buffer_actual_size = 0;
179   cur_iv = iv;
178   iv = 0;
180179   counter = 0;
181180}
182181
182UINT16 naomi_m4_board::decrypt_one_round(UINT16 word, UINT16 subkey)
183{
184   return one_round[word ^ subkey] ^ subkey ;
185}
186
183187void naomi_m4_board::enc_fill()
184188{
185189   const UINT8 *base = m_region->base() + rom_cur_address;
186190   while(buffer_actual_size < BUFFER_SIZE) {
187191      UINT16 enc = base[0] | (base[1] << 8);
188      UINT16 output_whitening = key ^ cur_iv;
189      cur_iv = one_round[enc ^ cur_iv];
190      UINT16 dec = one_round[key ^ cur_iv] ^ output_whitening;
191
192      UINT16 dec = iv;
193      iv = decrypt_one_round(enc ^ iv, subkey1);
194      dec ^= decrypt_one_round(iv, subkey2);
195     
192196      buffer[buffer_actual_size++] = dec;
193197      buffer[buffer_actual_size++] = dec >> 8;
194198
r241914r241915
198202      counter++;
199203      if(counter == 16) {
200204         counter = 0;
201         cur_iv = iv;
205         iv = 0;
202206      }
203207   }
204208}
trunk/src/mame/machine/naomim4.h
r241914r241915
3232   static const UINT8 k_sboxes[4][16];
3333
3434   const char *key_tag;
35   UINT16 key, iv;
35   UINT16 subkey1, subkey2;
3636   UINT16 *one_round;
3737
3838   UINT8 *buffer;
3939   UINT32 rom_cur_address, buffer_actual_size;
40   UINT16 cur_iv;
40   UINT16 iv;
4141   UINT8 counter;
4242   bool encryption;
4343   bool cfi_mode;
r241914r241915
4545   void enc_init();
4646   void enc_reset();
4747   void enc_fill();
48   UINT16 decrypt_one_round(UINT16 word, UINT16 subkey);
4849};
4950
5051extern const device_type NAOMI_M4_BOARD;
trunk/src/mame/mame.lst
r241914r241915
52775277ggram2          // 1999.04 Giant Gram: All Japan Pro Wrestling 2
52785278            // 1999.05 Taisen Puzzle Kurutto Stone
52795279ringout         // 1999.06 Ring Out 4x4
5280f355bios        // 1999.07 F355 Challenge (BIOS)
5281f355            // 1999.07 F355 Challenge
5280f355dlx         // 1999.07 F355 Challenge Deluxe (BIOS)
5281f355bios        // 1999.08 F355 Challenge Twin (BIOS)
5282f355            // 1999.07 F355 Challenge Deluxe
52825283f355twin        // 1999.07 F355 Challenge Twin
52835284shangril        // 1999.08 Dengen Tenshi Taisen Janshi Shangri-la
52845285tduno           // 1999.08 Touch de UNO! / Unou Nouryoku Check Machine
r241914r241915
53225323qmegamis        // 2000.05 Quiz Ah Megamisama
53235324derbyo2k        // 2000.06 Derby Owners Club 2000 Ver.2 (Rev A)
53245325starhrse        // 2000.?? Star Horse (big screens)
5325starhrct        // 2000.?? Star Horse (server)
5326starhrct        // 2000.12 Star Horse (server)
53265327starhrcl        // 2000.?? Star Horse (client)
53275328vonot           // 2000.06 Virtual-on Oratorio Tangram M.S.B.S. Ver.5.66 2000 Edition
53285329ggx             // 2000.07 Guilty Gear X
r241914r241915
53565357sfz3ugd         // 2001.02 Street Fighter ZERO3 Upper
53575358gundmgd         // 2001.03 Mobile Suit Gundam: Federation Vs. Zeon (GD-ROM)
53585359gundmct         // 2001.03 Mobile Suit Gundam: Federation Vs. Zeon (cartridge)
5359starhrsp        // 2001.03 Star Horse Progress (Rev A)
53605360dygolf          // 2001.04.27 Dynamic Golf / Virtua Golf (Rev A)
53615361            // 2001.04 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika
53625362shaktmsp        // 2001.04.04 Shakatto Tambourine 2K1 SPR
r241914r241915
53855385lupinsho        // 2001.12 Lupin the Third: the Shooting
53865386drbyocwc        // 2001.?? Derby Owners Club World Edition (Rev. C)
53875387derbyocw        // 2001.?? Derby Owners Club World Edition (Rev. D)
5388shootplm        // 2001.?? Shootout Pool Medal
53895388            // 2001.?? Star Horse 2001
53905389hopper          // 2002.?? SWP Hopper Board
53915390vathlete        // 2002.03 Virtua Athletics / Virtua Athlete
r241914r241915
54025401            // 2002.?? Pochinya
54035402quizqgd         // 2002.?? Quiz Keitai Q mode
54045403shootopl        // 2002.?? Shootout Pool
5405shootpl         // 2002.?? Shootout Pool / Shootout Pool Prize (Rev A)
5404shootpl         // 2003.?? Shootout Pool The Medal / Shootout Pool Prize (Rev A)
54065405mtkob2          // 2003.02 MushiKing The King Of Beetle
54075406            // 2003.03 Sega Network Taisen Mahjong MJ
54085407ggxxrl          // 2003.03 Guilty Gear XX # Reload (Rev A)
r241914r241915
54135412oinori          // 2003.08 Oinori-daimyoujin Matsuri
54145413psyvar2         // 2003.11 Psyvariar 2 - The Will To Fabricate
54155414puyofev         // 2003.11 Puyo Puyo Fever
5415starhrsp        // 2003.12 Star Horse Progress (Rev A)
54165416puyofevp        // 2003.?? Puyo Puyo Fever (prototype)
54175417            // 2003.?? Dragon Treasure
54185418            // 2003.?? Rabbit 2
r241914r241915
54205420tetkiwam        // 2004.06 Tetris Kiwamemichi (Arcade TV Game List - P.88, Right, 11 from bottom)
54215421trizeal         // 2004.09 Trizeal
54225422            // 2004.?? Dragon Treasure 2
5423shootplm        // 2004.?? Shootout Pool The Medal Ver. B / Shootout Pool Prize Ver. B
54235424kick4csh        // 2004.?? Kick '4' Cash
54245425            // 2004.?? The Quiz Show
54255426            // 2005.03 Melty Blood Act Cadenza
r241914r241915
1053010531pitbossma       // (c) 1994 Merit
1053110532pbss330         // (c) 1994 Merit
1053210533pbst30          // (c) 1994 Merit
10533pbst30b         // (c) 1993 Merit
10534pbst30a         // (c) 1993 Merit
1053410535realbrod        // (c) 1995 Merit
1053510536mtjpoker        // (c) 1994 Merit
10537megat           // (c) 1994 Merit
1053610538megat2          // (c) 1994 Merit
1053710539megat2a         // (c) 1994 Merit
1053810540megat2b         // (c) 1994 Merit
trunk/src/mame/mame.mak
r241914r241915
24802480
24812481$(DRIVERS)/acefruit.o:  $(LAYOUT)/sidewndr.lh
24822482
2483$(DRIVERS)/alinvade.o:  $(LAYOUT)/alinvade.lh
2484
24832485$(DRIVERS)/allied.o:    $(LAYOUT)/allied.lh
24842486
24852487$(DRIVERS)/amaticmg.o:  $(LAYOUT)/suprstar.lh
trunk/src/mame/video/lethal.c
r241914r241915
1414{
1515   int pri = (*color & 0xfff0);
1616   *color = *color & 0x000f;
17   *color += 0x400 / 64; // colourbase?
17   *color += m_sprite_colorbase;
1818
1919   /* this isn't ideal.. shouldn't need to hardcode it? not 100% sure about it anyway*/
2020   if (pri == 0x10)
r241914r241915
6565      m_k056832->set_layer_offs(2, 192, 0);
6666      m_k056832->set_layer_offs(3, 194, 0);
6767   }
68
69   m_layer_colorbase[0] = 0x00;
70   m_layer_colorbase[1] = 0x40;
71   m_layer_colorbase[2] = 0x80;
72   m_layer_colorbase[3] = 0xc0;
7368}
7469
7570WRITE8_MEMBER(lethal_state::lethalen_palette_control)
r241914r241915
7772   switch (offset)
7873   {
7974      case 0: // 40c8 - PCU1 from schematics
80         m_layer_colorbase[0] = ((data & 0x7) - 1) * 0x40;
81         m_layer_colorbase[1] = (((data >> 4) & 0x7) - 1) * 0x40;
75         m_layer_colorbase[0] = (data & 0x7) * 1024 / 16;
76         m_layer_colorbase[1] = ((data >> 4) & 0x7) * 1024 / 16;
8277         m_k056832->mark_plane_dirty( 0);
8378         m_k056832->mark_plane_dirty( 1);
8479         break;
8580
8681      case 4: // 40cc - PCU2 from schematics
87         m_layer_colorbase[2] = ((data & 0x7) - 1) * 0x40;
88         m_layer_colorbase[3] = (((data >> 4) & 0x7) - 1) * 0x40;
82         m_layer_colorbase[2] = (data & 0x7) * 1024 / 16;
83         m_layer_colorbase[3] = ((data >> 4) & 0x7) * 1024 / 16;
8984         m_k056832->mark_plane_dirty( 2);
9085         m_k056832->mark_plane_dirty( 3);
9186         break;
9287
9388      case 8: // 40d0 - PCU3 from schematics
94         m_sprite_colorbase = ((data & 0x7) - 1) * 0x40;
89         m_sprite_colorbase = (data & 0x7) * 1024 / 64;
90         m_back_colorbase = ((data >> 4) & 0x7) * 1024 + 1023;
9591         break;
9692   }
9793}
9894
9995UINT32 lethal_state::screen_update_lethalen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
10096{
101   bitmap.fill(7168, cliprect);
97   bitmap.fill(m_back_colorbase, cliprect);
10298   screen.priority().fill(0, cliprect);
10399
104100   m_k056832->tilemap_draw(screen, bitmap, cliprect, 3, K056832_DRAW_FLAG_MIRROR, 1);
trunk/src/mess/drivers/comp4.c
r241914r241915
77 
88  This is a handheld Mastermind game; a code-breaking game where the player
99  needs to find out the correct sequence of colours (numbers in our case).
10  It is known as Logic 5 in Europe, and as Pythaugoras in Japan.
10  It is known as Logic 5 in Europe, and as Pythaligoras in Japan.
1111 
1212  Press the R key to start, followed by a set of unique numbers and E.
1313  Refer to the official manual for more information.
trunk/src/mess/drivers/ngen.c
r241914r241915
1414#include "machine/am9517a.h"
1515#include "machine/pic8259.h"
1616#include "machine/pit8253.h"
17#include "machine/z80dart.h"
1718
1819class ngen_state : public driver_device
1920{
r241914r241915
2324      m_maincpu(*this,"maincpu"),
2425      m_crtc(*this,"crtc"),
2526      m_viduart(*this,"videouart"),
27      m_iouart(*this,"iouart"),
2628      m_dmac(*this,"dmac"),
2729      m_pic(*this,"pic"),
28      m_pit(*this,"pit")
30      m_pit(*this,"pit"),
31      m_vram(*this,"vram"),
32      m_fontram(*this,"fontram")
2933   {}
3034
3135   DECLARE_WRITE_LINE_MEMBER(pit_out0_w);
r241914r241915
4347   required_device<cpu_device> m_maincpu;
4448   required_device<mc6845_device> m_crtc;
4549   required_device<i8251_device> m_viduart;
50   required_device<upd7201_device> m_iouart;
4651   required_device<am9517a_device> m_dmac;
4752   required_device<pic8259_device> m_pic;
4853   required_device<pit8254_device> m_pit;
54   required_shared_ptr<UINT16> m_vram;
55   required_shared_ptr<UINT16> m_fontram;
4956
5057   UINT16 m_peripheral;
5158   UINT16 m_upper;
5259   UINT16 m_middle;
5360   UINT16 m_port00;
61   UINT16 m_periph141;
5462};
5563
5664WRITE_LINE_MEMBER(ngen_state::pit_out0_w)
5765{
58   m_pic->ir0_w(state);
66   //m_pic->ir0_w(state);
67   logerror("80186 Timer 1 state %i\n",state);
5968}
6069
6170WRITE_LINE_MEMBER(ngen_state::pit_out1_w)
6271{
72   logerror("PIT Timer 1 state %i\n",state);
6373}
6474
6575WRITE_LINE_MEMBER(ngen_state::pit_out2_w)
6676{
77   logerror("PIT Timer 2 state %i\n",state);
6778}
6879
6980WRITE16_MEMBER(ngen_state::cpu_peripheral_cb)
r241914r241915
97108}
98109
99110// 80186 peripheral space
111// Largely guesswork at this stage
100112WRITE16_MEMBER(ngen_state::peripheral_w)
101113{
102114   switch(offset)
103115   {
116   case 0x141:
117      // bit 1 enables speaker?
118      COMBINE_DATA(&m_periph141);
119      break;
104120   case 0x144:
105121      if(mem_mask & 0x00ff)
106122         m_crtc->address_w(space,0,data & 0xff);
r241914r241915
111127      break;
112128   case 0x146:
113129      if(mem_mask & 0x00ff)
114         m_pic->write(space,0,data & 0xff);
130         m_iouart->ba_cd_w(space,0,data & 0xff);
131      logerror("Video write offset 0x146 data %04x mask %04x\n",data,mem_mask);
115132      break;
116133   case 0x147:
117134      if(mem_mask & 0x00ff)
118         m_pic->write(space,1,data & 0xff);
135         m_iouart->ba_cd_w(space,1,data & 0xff);
136      logerror("Video write offset 0x147 data %04x mask %04x\n",data,mem_mask);
119137      break;
138   default:
139      logerror("(PC=%06x) Unknown 80186 peripheral write offset %04x data %04x mask %04x\n",m_maincpu->device_t::safe_pc(),offset,data,mem_mask);
120140   }
121   logerror("Peripheral write offset %04x data %04x mask %04x\n",offset,data,mem_mask);
122141}
123142
124143READ16_MEMBER(ngen_state::peripheral_r)
125144{
126   UINT16 ret = 0xff;
145   UINT16 ret = 0xffff;
127146   switch(offset)
128147   {
148   case 0x141:
149      ret = m_periph141;
150      break;
129151   case 0x144:
130152      if(mem_mask & 0x00ff)
131153         ret = m_crtc->status_r(space,0);
r241914r241915
136158      break;
137159   case 0x146:
138160      if(mem_mask & 0x00ff)
139         ret = m_pic->read(space,0);
161         ret = m_iouart->ba_cd_r(space,0);
140162      break;
141   case 0x147:
163   case 0x147:  // definitely video related, likely UART sending data to the video board
142164      if(mem_mask & 0x00ff)
143         ret = m_pic->read(space,1);
165         ret = m_iouart->ba_cd_r(space,1);
166      // expects bit 0 to be set (Video ready signal?)
167      ret |= 1;
144168      break;
169   default:
170      logerror("(PC=%06x) Unknown 80186 peripheral read offset %04x mask %04x returning %04x\n",m_maincpu->device_t::safe_pc(),offset,mem_mask,ret);
145171   }
146   logerror("Peripheral read offset %04x mask %04x\n",offset,mem_mask);
147172   return ret;
148173}
149174
r241914r241915
165190
166191MC6845_UPDATE_ROW( ngen_state::crtc_update_row )
167192{
193   UINT16 addr = ma;
194
195   for(int x=0;x<bitmap.width();x+=9)
196   {
197      UINT8 ch = m_vram[addr++];
198      for(int z=0;z<9;z++)
199      {
200         if(BIT(m_fontram[ch*16+ra],8-z))
201            bitmap.pix32(y,x+z) = rgb_t(0,0xff,0);
202         else
203            bitmap.pix32(y,x+z) = rgb_t(0,0,0);
204      }
205   }
168206}
169207
170208static ADDRESS_MAP_START( ngen_mem, AS_PROGRAM, 16, ngen_state )
171   AM_RANGE(0x00000, 0xfdfff) AM_RAM
209   AM_RANGE(0x00000, 0xf7fff) AM_RAM
210   AM_RANGE(0xf8000, 0xf9fff) AM_RAM AM_SHARE("vram")
211   AM_RANGE(0xfa000, 0xfbfff) AM_RAM AM_SHARE("fontram")
172212   AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("bios",0)
173213ADDRESS_MAP_END
174214
r241914r241915
215255
216256   MCFG_DEVICE_ADD("dmac", AM9517A, XTAL_14_7456MHz / 3)  // NEC D8237A, divisor unknown
217257
258   // I/O board
259   MCFG_UPD7201_ADD("iouart",XTAL_14_7456MHz / 3, 0,0,0,0) // no clock visible on I/O board, guessing for now
260
218261   // video board
219262   MCFG_SCREEN_ADD("screen", RASTER)
220263   MCFG_SCREEN_SIZE(720,348)
trunk/src/mess/drivers/simon.c
r241914r241915
1212  It is possibly a cost-reduced custom ASIC specifically for Simon.
1313 
1414  Other games assumed to be on similar hardware:
15  - Pocket Simon
16  - Super Simon
15  - Pocket Simon, but there's a chance it only exists with MB4850 chip
16  - Super Simon (TMS1100)
1717
1818***************************************************************************/
1919
trunk/src/mess/includes/c128.h
r241914r241915
105105   required_device<cpu_device> m_maincpu;
106106   required_device<m8502_device> m_subcpu;
107107   required_device<mos8722_device> m_mmu;
108   required_device<mos8721_device> m_pla;
108   required_device<pla_device> m_pla;
109109   required_device<mos8563_device> m_vdc;
110110   required_device<mos6566_device> m_vic;
111111   required_device<mos6581_device> m_sid;
trunk/src/mess/includes/c64.h
r241914r241915
7878   UINT8 *m_charom;
7979
8080   required_device<m6510_device> m_maincpu;
81   required_device<pls100_device> m_pla;
81   required_device<pla_device> m_pla;
8282   required_device<mos6566_device> m_vic;
8383   required_device<mos6581_device> m_sid;
8484   required_device<mos6526_device> m_cia1;
trunk/src/mess/includes/cbm2.h
r241914r241915
113113   { }
114114
115115   required_device<cpu_device> m_maincpu;
116   required_device<pls100_device> m_pla1;
116   required_device<pla_device> m_pla1;
117117   optional_device<mc6845_device> m_crtc;
118118   optional_device<palette_device> m_palette;
119119   required_device<mos6581_device> m_sid;
r241914r241915
274274         m_vic_irq(CLEAR_LINE)
275275   { }
276276
277   required_device<pls100_device> m_pla2;
277   required_device<pla_device> m_pla2;
278278   required_device<mos6566_device> m_vic;
279279   optional_shared_ptr<UINT8> m_color_ram;
280280
trunk/src/mess/includes/gamecom.h
r241914r241915
211211{
212212public:
213213   gamecom_state(const machine_config &mconfig, device_type type, const char *tag)
214      : driver_device(mconfig, type, tag),
215      m_maincpu(*this, "maincpu"),
216      m_dac(*this, "dac"),
217      m_cart1(*this, "cartslot1"),
218      m_cart2(*this, "cartslot2"),
219      m_p_nvram(*this,"nvram"),
220      m_p_videoram(*this,"videoram"),
221      m_bank1(*this, "bank1"),
222      m_bank2(*this, "bank2"),
223      m_bank3(*this, "bank3"),
224      m_bank4(*this, "bank4"),
225      m_region_maincpu(*this, "maincpu"),
226      m_region_kernel(*this, "kernel"),
227      m_io_in0(*this, "IN0"),
228      m_io_in1(*this, "IN1"),
229      m_io_in2(*this, "IN2"),
230      m_io_grid(*this, "GRID")
214      : driver_device(mconfig, type, tag)
215      , m_p_videoram(*this,"videoram")
216      , m_p_nvram(*this,"nvram")
217      , m_maincpu(*this, "maincpu")
218      , m_dac(*this, "dac")
219      , m_cart1(*this, "cartslot1")
220      , m_cart2(*this, "cartslot2")
221      , m_bank1(*this, "bank1")
222      , m_bank2(*this, "bank2")
223      , m_bank3(*this, "bank3")
224      , m_bank4(*this, "bank4")
225      , m_region_maincpu(*this, "maincpu")
226      , m_region_kernel(*this, "kernel")
227      , m_io_in0(*this, "IN0")
228      , m_io_in1(*this, "IN1")
229      , m_io_in2(*this, "IN2")
230      , m_io_grid(*this, "GRID")
231231      { }
232232
233   required_device<cpu_device> m_maincpu;
234   required_device<dac_device> m_dac;
235   required_device<generic_slot_device> m_cart1;
236   required_device<generic_slot_device> m_cart2;
237233   DECLARE_READ8_MEMBER( gamecom_internal_r );
238234   DECLARE_READ8_MEMBER( gamecom_pio_r );
239235   DECLARE_WRITE8_MEMBER( gamecom_internal_w );
240236   DECLARE_WRITE8_MEMBER( gamecom_pio_w );
241   required_shared_ptr<UINT8> m_p_nvram;
237   DECLARE_DRIVER_INIT(gamecom);
238   DECLARE_PALETTE_INIT(gamecom);
239   INTERRUPT_GEN_MEMBER(gamecom_interrupt);
240   TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback);
241   TIMER_CALLBACK_MEMBER(gamecom_scanline);
242   DECLARE_WRITE8_MEMBER( gamecom_handle_dma );
243   DECLARE_WRITE8_MEMBER( gamecom_update_timers );
244   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 );
245   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 );
246   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
247private:
242248   UINT8 *m_p_ram;
243   required_shared_ptr<UINT8> m_p_videoram;
244249   UINT8 *m_cart_ptr;
250   UINT8 m_lcdc_reg;
251   UINT8 m_lch_reg;
252   UINT8 m_lcv_reg;
253   UINT16 m_scanline;
254   UINT16 m_base_address;
245255   memory_region *m_cart1_rom;
246256   memory_region *m_cart2_rom;
247257   emu_timer *m_clock_timer;
r241914r241915
249259   GAMECOM_DMA m_dma;
250260   GAMECOM_TIMER m_timer[2];
251261   gamecom_sound_t m_sound;
252   int m_scanline;
253   unsigned int m_base_address;
254262   bitmap_ind16 m_bitmap;
255263   void gamecom_set_mmu(UINT8 mmu, UINT8 data);
256264   void handle_stylus_press(int column);
257   UINT8 m_lcdc_reg;
258   UINT8 m_lch_reg;
259   UINT8 m_lcv_reg;
260265   void recompute_lcd_params();
261266   void handle_input_press(UINT16 mux_data);
262
263   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
264   DECLARE_DRIVER_INIT(gamecom);
267   int common_load(device_image_interface &image, generic_slot_device *slot);
265268   virtual void machine_reset();
266269   virtual void video_start();
267   DECLARE_PALETTE_INIT(gamecom);
268   INTERRUPT_GEN_MEMBER(gamecom_interrupt);
269   TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback);
270   TIMER_CALLBACK_MEMBER(gamecom_scanline);
271   DECLARE_WRITE8_MEMBER( gamecom_handle_dma );
272   DECLARE_WRITE8_MEMBER( gamecom_update_timers );
273   int common_load(device_image_interface &image, generic_slot_device *slot);
274   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 );
275   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 );
276
277protected:
270   required_shared_ptr<UINT8> m_p_videoram;
271   required_shared_ptr<UINT8> m_p_nvram;
272   required_device<cpu_device> m_maincpu;
273   required_device<dac_device> m_dac;
274   required_device<generic_slot_device> m_cart1;
275   required_device<generic_slot_device> m_cart2;
278276   required_memory_bank m_bank1;
279277   required_memory_bank m_bank2;
280278   required_memory_bank m_bank3;
trunk/src/mess/includes/pet.h
r241914r241915
259259   required_memory_region m_editor_rom;
260260   required_memory_region m_ue5_rom;
261261   required_memory_region m_ue6_rom;
262   required_device<pls100_device> m_pla1;
263   required_device<pls100_device> m_pla2;
262   required_device<pla_device> m_pla1;
263   required_device<pla_device> m_pla2;
264264
265265   DECLARE_MACHINE_START( cbm8296 );
266266   DECLARE_MACHINE_RESET( cbm8296 );
trunk/src/mess/includes/plus4.h
r241914r241915
3131#define SCREEN_TAG          "screen"
3232#define CONTROL1_TAG        "joy1"
3333#define CONTROL2_TAG        "joy2"
34#define PET_USER_PORT_TAG     "user"
34#define PET_USER_PORT_TAG   "user"
3535
3636class plus4_state : public driver_device
3737{
r241914r241915
7171   { }
7272
7373   required_device<m7501_device> m_maincpu;
74   required_device<pls100_device> m_pla;
74   required_device<pla_device> m_pla;
7575   required_device<mos7360_device> m_ted;
7676   optional_device<mos6551_device> m_acia;
7777   optional_device<mos6529_device> m_spi_user;
trunk/src/mess/layout/gamecom.lay
r241914r241915
1010         <bounds x="0" y="0" width="16" height="16" />
1111      </backdrop>
1212      <backdrop element="grid" inputtag="GRID.1" inputmask="0x01" >
13         <bounds x="16" y="16" width="16" height="16" />
13         <bounds x="16" y="0" width="16" height="16" />
1414      </backdrop>
1515      <backdrop element="grid" inputtag="GRID.2" inputmask="0x01" >
16         <bounds x="32" y="16" width="16" height="16" />
16         <bounds x="32" y="0" width="16" height="16" />
1717      </backdrop>
1818      <backdrop element="grid" inputtag="GRID.3" inputmask="0x01" >
19         <bounds x="48" y="16" width="16" height="16" />
19         <bounds x="48" y="0" width="16" height="16" />
2020      </backdrop>
2121      <backdrop element="grid" inputtag="GRID.4" inputmask="0x01" >
22         <bounds x="64" y="16" width="16" height="16" />
22         <bounds x="64" y="0" width="16" height="16" />
2323      </backdrop>
2424      <backdrop element="grid" inputtag="GRID.5" inputmask="0x01" >
25         <bounds x="80" y="16" width="16" height="16" />
25         <bounds x="80" y="0" width="16" height="16" />
2626      </backdrop>
2727      <backdrop element="grid" inputtag="GRID.6" inputmask="0x01" >
28         <bounds x="96" y="16" width="16" height="16" />
28         <bounds x="96" y="0" width="16" height="16" />
2929      </backdrop>
3030      <backdrop element="grid" inputtag="GRID.7" inputmask="0x01" >
31         <bounds x="112" y="16" width="16" height="16" />
31         <bounds x="112" y="0" width="16" height="16" />
3232      </backdrop>
3333      <backdrop element="grid" inputtag="GRID.8" inputmask="0x01" >
34         <bounds x="128" y="16" width="16" height="16" />
34         <bounds x="128" y="0" width="16" height="16" />
3535      </backdrop>
3636      <backdrop element="grid" inputtag="GRID.9" inputmask="0x01" >
37         <bounds x="144" y="16" width="16" height="16" />
37         <bounds x="144" y="0" width="16" height="16" />
3838      </backdrop>
3939      <backdrop element="grid" inputtag="GRID.10" inputmask="0x01" >
40         <bounds x="160" y="16" width="16" height="16" />
40         <bounds x="160" y="0" width="16" height="16" />
4141      </backdrop>
4242      <backdrop element="grid" inputtag="GRID.11" inputmask="0x01" >
43         <bounds x="176" y="16" width="16" height="16" />
43         <bounds x="176" y="0" width="16" height="16" />
4444      </backdrop>
4545      <backdrop element="grid" inputtag="GRID.12" inputmask="0x01" >
46         <bounds x="192" y="16" width="16" height="16" />
46         <bounds x="192" y="0" width="16" height="16" />
4747      </backdrop>
4848
4949      <backdrop element="grid" inputtag="GRID.0" inputmask="0x02" >


Previous 199869 Revisions Next


© 1997-2024 The MAME Team