Previous 199869 Revisions Next

r33388 Saturday 15th November, 2014 at 13:17:44 UTC by Scott Stone
Merge pull request #46 from p1pkin/naomi#4

Naomi updates and corrections [Metallic]
Ferrari F355 (original no-link deluxe) USA BIOS added [Andy Geezer]
[src/emu/bus/plus4]c1551.h
[src/emu/cpu/mips]mips3drc.c
[src/emu/drivers]xtal.h
[src/emu/machine]pla.c pla.h
[src/lib/util]plaparse.c
[src/mame]mame.lst
[src/mame/drivers]3x3puzzl.c alinvade.c cps2.c dynax.c fastfred.c goldngam.c lethal.c oneshot.c popobear.c segas16b.c ttchamp.c
[src/mame/includes]lethal.h
[src/mame/video]lethal.c
[src/mess]mess.mak
[src/mess/drivers]comp4.c gamecom.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*
[src/mess/machine]gamecom.c

trunk/src/emu/bus/plus4/c1551.h
r241899r241900
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/cpu/mips/mips3drc.c
r241899r241900
27762776               {
27772777                  UML_FDNEG(block, FPR64(FDREG), FPR64(FSREG));               // fdneg   <fdreg>,<fsreg>
27782778                  UML_CMP(block, FPR64(FSREG), 0);                            // cmp     <fsreg>,0.0
2779                  UML_DMOVc(block, COND_E, FPR64(FDREG), 0x8000000000000000L);// dmov    <fdreg>,-0.0,e
2779                  UML_DMOVc(block, COND_E, FPR64(FDREG), U64(0x8000000000000000));// dmov    <fdreg>,-0.0,e
27802780               }
27812781               return TRUE;
27822782
trunk/src/emu/drivers/xtal.h
r241899r241900
117117   XTAL_12MHz          = 12000000,     /* Extremely common, used on 100's of PCBs */
118118   XTAL_12_096MHz      = 12096000,     /* Some early 80's Atari games */
119119   XTAL_12_288MHz      = 12288000,     /* Sega Model 3 digital audio board */
120   XTAL_12_432MHz      = 12432000,     /* Kaneko Fly Boy/Fast Freddie Hardware */
120121   XTAL_12_4725MHz     = 12472500,     /* Bonanza's Mini Boy 7 */
121122   XTAL_12_48MHz       = 12480000,     /* TRS-80 Model II */
122123   XTAL_12_5MHz        = 12500000,     /* Red Alert audio board */
trunk/src/emu/machine/pla.c
r241899r241900
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.
r241899r241900
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++)
r241899r241900
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
r241899r241900
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
r241899r241900
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
r241899r241900
3215#define __PLA__
3316
3417#include "emu.h"
35#include "jedparse.h"
3618
3719
3820
r241899r241900
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
5258#define MCFG_PLS100_ADD(_tag) \
53   MCFG_DEVICE_ADD(_tag, PLS100, 0)
59   MCFG_PLA_ADD(_tag, 16, 8, 48)
5460
61// MOS 8721 PLA
62// TODO: actual number of terms is unknown
5563#define MCFG_MOS8721_ADD(_tag) \
56   MCFG_DEVICE_ADD(_tag, MOS8721, 0)
64   MCFG_PLA_ADD(_tag, 27, 18, 379)
5765
5866
67
5968///*************************************************************************
6069//  TYPE DEFINITIONS
6170///*************************************************************************
6271
6372// ======================> pla_device
6473
65class pla_device : public device_t
74class pla_device : public device_t
6675{
6776public:
6877   // 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);
78   pla_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
7079
71   virtual UINT32 read(UINT32 input);
80   // static configuration helpers
81   static void set_num_inputs(device_t &device, UINT32 i) { downcast<pla_device &>(device).m_inputs = i; }
82   static void set_num_outputs(device_t &device, UINT32 o) { downcast<pla_device &>(device).m_outputs = o; }
83   static void set_num_terms(device_t &device, UINT32 t) { downcast<pla_device &>(device).m_terms = t; }
84   static void set_inputmask(device_t &device, UINT32 mask) { downcast<pla_device &>(device).m_input_mask = mask; } // UINT32!
85   static void set_format(device_t &device, int format) { downcast<pla_device &>(device).m_format = format; }
7286
87   UINT32 read(UINT32 input);
88
7389protected:
7490   // device-level overrides
7591   virtual void device_start();
7692
93private:
7794   void parse_fusemap();
7895
79   int m_inputs;
80   int m_outputs;
81   int m_terms;
96   int m_format;
97   
98   UINT32 m_inputs;
99   UINT32 m_outputs;
100   UINT32 m_terms;
82101   UINT64 m_input_mask;
83102   UINT64 m_xor;
84103
104   int m_cache_size;
105   dynamic_array<UINT32> m_cache;
106   UINT64 m_cache2[CACHE2_SIZE];
107   UINT8 m_cache2_ptr;
108
85109   struct term
86110   {
87111      UINT64 m_and;
88112      UINT64 m_or;
89   };
90
91   term m_term[MAX_TERMS];
92
93   UINT64 m_cache[CACHE_SIZE];
94   UINT8 m_cache_ptr;
113   } m_term[MAX_TERMS];
95114};
96115
97116
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
124117// device type definition
125extern const device_type PLS100;
126extern const device_type MOS8721;
118extern const device_type PLA;
127119
128120
129
130121#endif
trunk/src/lib/util/plaparse.c
r241899r241900
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/3x3puzzl.c
r241899r241900
501501
502502GAME( 1998, 3x3puzzl,  0,          _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace Enterprise",      "3X3 Puzzle (Enterprise)", GAME_SUPPORTS_SAVE ) // 1998. 5. 28
503503GAME( 1998, 3x3puzzla, 3x3puzzl,   _3x3puzzle,  _3x3puzzle,  driver_device, 0,       ROT0, "Ace Enterprise",      "3X3 Puzzle (Normal)", GAME_SUPPORTS_SAVE ) // 1998. 5. 28
504GAME( 199?, casanova,  0,          _3x3puzzle,  casanova,    driver_device, 0,       ROT0, "<unknown>",           "Casanova", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
504GAME( 199?, casanova,  0,          _3x3puzzle,  casanova,    driver_device, 0,       ROT0, "Promat",              "Casanova", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/alinvade.c
r241899r241900
44 
55 does it use any off-the shelf chips in addition to the 6502?
66
7 Driver by David Haywood and Mariusz Wojcieszek
78
89*/
910
r241899r241900
1415{
1516public:
1617   alinvade_state(const machine_config &mconfig, device_type type, const char *tag)
17      : driver_device(mconfig, type, tag)
18      : driver_device(mconfig, type, tag),
19         m_videoram(*this, "videoram")
1820   { }
1921
22   required_shared_ptr<UINT8> m_videoram;
2023
2124public:
2225   virtual void machine_start();
r241899r241900
2730
2831
2932static ADDRESS_MAP_START( alinvade_map, AS_PROGRAM, 8, alinvade_state )
30   AM_RANGE(0x0000, 0x0fff) AM_RAM   
31   AM_RANGE(0xe000, 0xe3ff) AM_ROM
32   AM_RANGE(0xe800, 0xebff) AM_RAM   
33   AM_RANGE(0xec00, 0xffff) AM_ROM
33    AM_RANGE(0x0000, 0x01ff) AM_RAM
34    AM_RANGE(0x0400, 0x0bff) AM_RAM AM_SHARE("videoram")
35   AM_RANGE(0x0c00, 0x0dff) AM_RAM
36    AM_RANGE(0x2000, 0x2000) AM_WRITENOP //??
37    AM_RANGE(0x4000, 0x4000) AM_READ_PORT("COIN")
38    AM_RANGE(0x6000, 0x6000) AM_READ_PORT("DSW")
39    AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0")
40    AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN1")
41    AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN2")
42    AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN3")
43    AM_RANGE(0x8004, 0x8004) AM_READ_PORT("IN4")
44    AM_RANGE(0xa000, 0xa000) AM_WRITENOP //??
45    AM_RANGE(0xc400, 0xc7ff) AM_ROM
46    AM_RANGE(0xc800, 0xcbff) AM_ROM
47    AM_RANGE(0xe000, 0xe3ff) AM_ROM
48    AM_RANGE(0xe400, 0xe400) AM_WRITENOP //??
49    AM_RANGE(0xe800, 0xe800) AM_READNOP AM_WRITENOP //??
50    AM_RANGE(0xec00, 0xffff) AM_ROM
51ADDRESS_MAP_END
3452
3553
36ADDRESS_MAP_END
54static INPUT_PORTS_START( alinvade )
55    PORT_START("COIN")
56    PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN1 )
57    PORT_BIT(0xef, IP_ACTIVE_LOW, IPT_UNKNOWN )
3758
59    PORT_START("IN0")
60    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
61    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
3862
39static INPUT_PORTS_START( alinvade )
63    PORT_START("IN1")
64    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
65    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
66
67    PORT_START("IN2")
68    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
69    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
70
71    PORT_START("IN3")
72    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START1 )
73    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
74
75    PORT_START("IN4")
76    PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_START2 )
77    PORT_BIT(0xdf, IP_ACTIVE_HIGH, IPT_UNKNOWN )
78
79    PORT_START("DSW")
80    PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
81    PORT_DIPSETTING(    0x00, "2" )
82    PORT_DIPSETTING(    0x01, "3" )
83    PORT_DIPSETTING(    0x02, "4" )
84    PORT_DIPSETTING(    0x03, "5" )
85    PORT_DIPNAME( 0x04, 0x00, DEF_STR ( Unknown ) )    // read, but not tested afterwards?
86    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
87    PORT_DIPSETTING(    0x04, DEF_STR( On ) )
88    PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
4089INPUT_PORTS_END
4190
4291
43
4492void alinvade_state::machine_start()
4593{
4694}
r241899r241900
5199
52100UINT32 alinvade_state::screen_update_alinvade(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
53101{
102   offs_t offs;
103
104   for (offs = 0; offs < m_videoram.bytes(); offs++)
105   {
106      int i;
107
108      UINT8 x = (offs << 3)&0x7f;
109      int y = (offs >> 4)&0x7f;
110      UINT8 data = m_videoram[offs];
111
112      for (i = 0; i < 8; i++)
113      {
114         pen_t pen = (data & 0x01) ? rgb_t::white : rgb_t::black;
115         bitmap.pix32(y, x) = pen;
116
117         data = data >> 1;
118         x = x + 1;
119      }
120   }
121
122
54123   return 0;
55124}
56125
r241899r241900
66135   MCFG_SCREEN_ADD("screen", RASTER)
67136   MCFG_SCREEN_REFRESH_RATE(60)
68137   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
69   MCFG_SCREEN_SIZE(256, 256)
70   MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
138   MCFG_SCREEN_SIZE(128, 128)
139   MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 128-1)
71140   MCFG_SCREEN_UPDATE_DRIVER(alinvade_state, screen_update_alinvade)
72141
73142   /* sound hardware */
r241899r241900
77146
78147
79148ROM_START( alinvade )
80   ROM_REGION( 0x10000, "maincpu", 0 )
81   ROM_LOAD( "alien28.708", 0xe000, 0x0400, CRC(de376295) SHA1(e8eddbb1be1f8661c6b5b39c0d78a65bded65db2) )
82   ROM_LOAD( "alien29.708", 0xec00, 0x0400, CRC(20212977) SHA1(9d24a6b403d968267079fa6241545bd5a01afebb) )
83   ROM_LOAD( "alien30.708", 0xf000, 0x0400, CRC(734b691c) SHA1(9e562159061eecf4b1dee4ea0ee4752c901a54aa) )
84   ROM_LOAD( "alien31.708", 0xf400, 0x0400, CRC(5a70535c) SHA1(2827e7d4bffca78bd035da04481e1e972ee2da39) )
85   ROM_LOAD( "alien32.708", 0xf800, 0x0400, CRC(332dd234) SHA1(9974668344a2a351868a9e7757d1c3a497dc5621) )
86   ROM_LOAD( "alien33.708", 0xfc00, 0x0400, CRC(e0d57fc7) SHA1(7b8ddcb4a86811592d2d0bbc61b2f19e5caa9ccc) )
149   ROM_REGION( 0x10000, "maincpu", 0 ) // todo, check mapping
150
151   ROM_FILL( 0xc400, 0x800, 0x60 )    // rts for whole area, interrupt code jumps to various addresses here
152
153    ROM_LOAD( "alien28.708", 0xe000, 0x0400, CRC(de376295) SHA1(e8eddbb1be1f8661c6b5b39c0d78a65bded65db2) )
154    ROM_LOAD( "alien29.708", 0xec00, 0x0400, CRC(20212977) SHA1(9d24a6b403d968267079fa6241545bd5a01afebb) )
155    ROM_LOAD( "alien30.708", 0xf000, 0x0400, CRC(734b691c) SHA1(9e562159061eecf4b1dee4ea0ee4752c901a54aa) )
156    ROM_LOAD( "alien31.708", 0xf400, 0x0400, CRC(5a70535c) SHA1(2827e7d4bffca78bd035da04481e1e972ee2da39) )
157    ROM_LOAD( "alien32.708", 0xf800, 0x0400, CRC(332dd234) SHA1(9974668344a2a351868a9e7757d1c3a497dc5621) )
158    ROM_LOAD( "alien33.708", 0xfc00, 0x0400, CRC(e0d57fc7) SHA1(7b8ddcb4a86811592d2d0bbc61b2f19e5caa9ccc) )
87159ROM_END
88160
89161
90GAME( 198?, alinvade,  0,    alinvade, alinvade, driver_device,  0, ROT0, "Forbes?", "Alien Invaders", GAME_NOT_WORKING )
162GAME( 198?, alinvade,  0,    alinvade, alinvade, driver_device,  0, ROT90, "Forbes?", "Alien Invaders", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS )
trunk/src/mame/drivers/cps2.c
r241899r241900
317317            have the ROM details over 2 lines, in this case 'SSFA' would be on the first line and '03B'
318318            on the second line. Each part of this label name is detailed below...
319319
320            SSF -  The game title shortened to 3 characters, this game is 'Super Street Fighter 2'.
320            SSF -  The game title shortened to 3 characters, this game is 'Super Street Fighter II'.
321321
322322            A   -  The region of the game, in this case 'Asia'. Known regions are...
323323                   J = Japan          E = ETC (World and Euro)
r241899r241900
498498      There is sufficient space next to the B-Board to enable this board to plug into the B-Board
499499      into CN7 and still be fully enclosed inside the housing. The housing has holes in it to allow
500500      the TX, RX and Register connectors to be accessed without opening the case.
501      This board is known to be used with "Super Street Fighter 2 : The Tournament Battle" and some
501      This board is known to be used with "Super Street Fighter II : The Tournament Battle" and some
502502      yellow rent boards also have this daughter board attached.
503503
504504      SCN1    - Network Data IN
r241899r241900
88228822GAME( 1998, sfz3a,      sfa3,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Zero 3 (Asia 980904)", GAME_SUPPORTS_SAVE )
88238823GAME( 1998, sfz3ar1,    sfa3,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Street Fighter Zero 3 (Asia 980701)", GAME_SUPPORTS_SAVE )
88248824GAME( 1999, jyangoku,   0,        cps2, cps2_1p2b, cps_state, cps2,     ROT0,   "Capcom", "Jyangokushi: Haoh no Saihai (Japan 990527)", GAME_SUPPORTS_SAVE )
8825GAME( 2004, hsf2,       0,        cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (USA 040202)", GAME_SUPPORTS_SAVE )
8826GAME( 2004, hsf2a,      hsf2,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Asia 040202)", GAME_SUPPORTS_SAVE )
8827GAME( 2004, hsf2j,      hsf2,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter 2: The Anniversary Edition (Japan 031222)", GAME_SUPPORTS_SAVE )
8825GAME( 2004, hsf2,       0,        cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter II: The Anniversary Edition (USA 040202)", GAME_SUPPORTS_SAVE )
8826GAME( 2004, hsf2a,      hsf2,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter II: The Anniversary Edition (Asia 040202)", GAME_SUPPORTS_SAVE )
8827GAME( 2004, hsf2j,      hsf2,     cps2, cps2_2p6b, cps_state, cps2,     ROT0,   "Capcom", "Hyper Street Fighter II: The Anniversary Edition (Japan 031222)", GAME_SUPPORTS_SAVE )
88288828
88298829/* Games released on CPS-2 hardware by Takumi */
88308830
trunk/src/mame/drivers/dynax.c
r241899r241900
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
r241899r241900
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***************************************************************************/
r241899r241900
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/fastfred.c
r241899r241900
44  driver by Zsolt Vasvari
55
66  TODO:
7  - remove protection hack
7  - remove protection hack (protection may be done by the 'H2' chip on the pcb)
88
99***************************************************************************/
1010
r241899r241900
620620   GFXDECODE_ENTRY( "gfx4", 0,      imago_char_1bpp, 0x140,  1 )
621621GFXDECODE_END
622622
623#define CLOCK 18432000  /* The crystal is 18.432MHz */
624
625623INTERRUPT_GEN_MEMBER(fastfred_state::vblank_irq)
626624{
627625   if(m_nmi_mask)
r241899r241900
637635static MACHINE_CONFIG_START( fastfred, fastfred_state )
638636
639637   /* basic machine hardware */
640   MCFG_CPU_ADD("maincpu", Z80, CLOCK/6)     /* 3.072 MHz */
638   MCFG_CPU_ADD("maincpu", Z80, XTAL_12_432MHz/4)   /* 3.108 MHz; xtal from pcb pics, divider not verified */
641639   MCFG_CPU_PROGRAM_MAP(fastfred_map)
642640   MCFG_CPU_VBLANK_INT_DRIVER("screen", fastfred_state,  vblank_irq)
643641
644   MCFG_CPU_ADD("audiocpu", Z80, CLOCK/12)  /* 1.536 MHz */
642   MCFG_CPU_ADD("audiocpu", Z80, XTAL_12_432MHz/8)  /* 1.554 MHz; xtal from pcb pics, divider not verified */
645643   MCFG_CPU_PROGRAM_MAP(sound_map)
646644   MCFG_CPU_PERIODIC_INT_DRIVER(fastfred_state, sound_timer_irq, 4*60)
647645
r241899r241900
664662   /* sound hardware */
665663   MCFG_SPEAKER_STANDARD_MONO("mono")
666664
667   MCFG_SOUND_ADD("ay8910.1", AY8910, CLOCK/12)
665   MCFG_SOUND_ADD("ay8910.1", AY8910, XTAL_12_432MHz/8) /* 1.554 MHz; xtal from pcb pics, divider not verified */
668666   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
669667
670   MCFG_SOUND_ADD("ay8910.2", AY8910, CLOCK/12)
668   MCFG_SOUND_ADD("ay8910.2", AY8910, XTAL_12_432MHz/8) /* 1.554 MHz; xtal from pcb pics, divider not verified */
671669   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
672670MACHINE_CONFIG_END
673671
trunk/src/mame/drivers/goldngam.c
r241899r241900
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
r241899r241900
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      ?
r241899r241900
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)
r241899r241900
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
r241899r241900
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
r241899r241900
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}
r241899r241900
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)
r241899r241900
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 )
r241899r241900
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()
r241899r241900
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 )
r241899r241900
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
r241899r241900
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/oneshot.c
r241899r241900
2929
3030NOTE: An eBay auction of the PCB shows "1996.9.16 PROMAT" on the JAMMA+ adapter for
3131      One Shot One Kill.  This information was used for the year & manufacturer.
32      Also listed in an Approved Game list on a HK government site as "Promet"
3233
3334*/
3435
trunk/src/mame/drivers/popobear.c
r241899r241900
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")
r241899r241900
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);
r241899r241900
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);
r241899r241900
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();
r241899r241900
158152      m_bg_tilemap[3]->mark_all_dirty();
159153
160154   }
161   DECLARE_READ16_MEMBER(popo_vram_r) { return m_vram[offset]; }
162155
163156};
164157
r241899r241900
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) },
r241899r241900
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{
r241899r241900
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);
r241899r241900
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
r241899r241900
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
r241899r241900
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))
r241899r241900
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 */
r241899r241900
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/drivers/segas16b.c
r241899r241900
44704470//
44714471ROM_START( dunkshot )
44724472   ROM_REGION( 0x30000, "maincpu", 0 ) // 68000 code
4473   ROM_LOAD16_BYTE( "epr-10520c.a1", 0x000001, 0x8000, CRC(ba9c5d10) SHA1(370d0455903c1bce3b5ad2ffa1d02ccd6da78840) )
4474   ROM_LOAD16_BYTE( "epr-10523c.a4", 0x000000, 0x8000, CRC(106733c2) SHA1(d792b3d5073becbd9f440faff45692ab9e6309b9) )
4475   ROM_LOAD16_BYTE( "epr-10521.a2",  0x010001, 0x8000, CRC(e2d5f97a) SHA1(bf7b4a029580633fee65be89d5c9c83ff76a8484) ) // == epr-10468.a2
4476   ROM_LOAD16_BYTE( "epr-10524.a5",  0x010000, 0x8000, CRC(22777314) SHA1(fbc35505a94c8d4bdb44ee058e9e2e9e9b377c5c) ) // == epr-10471.a5
4477   ROM_LOAD16_BYTE( "epr-10522.a3",  0x020001, 0x8000, CRC(e5b5f754) SHA1(af02c46437e3cf62331753dc405211b7f90e3f62) )
4478   ROM_LOAD16_BYTE( "epr-10525.a6",  0x020000, 0x8000, CRC(7f41f334) SHA1(631f6113f3c0c47f2dd1ee0ea6e7db4321d7366d) )
4479
4480   ROM_REGION( 0x18000, "gfx1", 0 ) // tiles
4481   ROM_LOAD( "epr-10528.b9",  0x00000, 0x8000, CRC(a8a3762d) SHA1(af75df6eda0df903e2b3f9680cd128da4227961d) )
4482   ROM_LOAD( "epr-10529.b10", 0x08000, 0x8000, CRC(80cbff50) SHA1(3641ee337194d56d774bf1be91939d03f3c0f77b) )
4483   ROM_LOAD( "epr-10530.b11", 0x10000, 0x8000, CRC(2dbe1e52) SHA1(a6b74f88e2f47322fbde1f6682cae58caf79f6c8) )
4484
4485   ROM_REGION16_BE( 0x80000, "sprites", 0 ) // sprites
4486   ROM_LOAD16_BYTE( "epr-10481.b5", 0x00000, 0x8000, CRC(feb04bc9) SHA1(233dc8e3b887a88ac114723d58a909a58f0ae771) )
4487   ROM_RELOAD(                      0x10000, 0x8000 )
4488   ROM_LOAD16_BYTE( "epr-10477.b1", 0x00001, 0x8000, CRC(f9d3b2cb) SHA1(b530fe16882c718122bfd1de098f39e54993de28) )
4489   ROM_RELOAD(                      0x10001, 0x8000 )
4490   ROM_LOAD16_BYTE( "epr-10482.b6", 0x20000, 0x8000, CRC(5bc07618) SHA1(f4c88f81b407d467f958181770ea4fd32aab3daf) )
4491   ROM_RELOAD(                      0x30000, 0x8000 )
4492   ROM_LOAD16_BYTE( "epr-10478.b2", 0x20001, 0x8000, CRC(5b5c5c92) SHA1(1c6f1cafa0788678c80ade11560f4a8d8bb7272a) )
4493   ROM_RELOAD(                      0x30001, 0x8000 )
4494   ROM_LOAD16_BYTE( "epr-10483.b7", 0x40000, 0x8000, CRC(7cab4f9e) SHA1(2310a9fe604f78d74d84bea301c95e6f0e6a6085) )
4495   ROM_RELOAD(                      0x50000, 0x8000 )
4496   ROM_LOAD16_BYTE( "epr-10479.b3", 0x40001, 0x8000, CRC(e84190a0) SHA1(23a8799adf81e1884a8c6b4c55397b8bca2f1850) )
4497   ROM_RELOAD(                      0x50001, 0x8000 )
4498   ROM_LOAD16_BYTE( "epr-10527.b8", 0x60000, 0x8000, CRC(39b1a242) SHA1(cf0c0768d006a18345b66dd389acba1e8192ec53) )
4499   ROM_RELOAD(                      0x70000, 0x8000 )
4500   ROM_LOAD16_BYTE( "epr-10526.b4", 0x60001, 0x8000, CRC(bf200754) SHA1(60900d80cfea147b011813dde558c1d39fdd274c) )
4501   ROM_RELOAD(                      0x70001, 0x8000 )
4502
4503   ROM_REGION( 0x50000, "soundcpu", 0 ) // sound CPU
4504   ROM_LOAD( "epr-10473.a7",   0x00000, 0x08000, CRC(7f1f5a27) SHA1(7ff91b95c883b395ab4ff5e440d78e553a09e623) )
4505   ROM_LOAD( "epr-10474.a8",   0x10000, 0x08000, CRC(419a656e) SHA1(aa734ae835761badeb069f99acc5fded2a19b3a3) )
4506   ROM_LOAD( "epr-10475.a9",   0x20000, 0x08000, CRC(17d55e85) SHA1(0c414bafecbfaa82679cc155f15f5255c186358d) )
4507   ROM_LOAD( "epr-10476.a10",  0x30000, 0x08000, CRC(a6be0956) SHA1(fc4d6e25e0b46679f94fddbb1850fb0b02f8d84b) )
4508
4509   ROM_REGION( 0x2000, "maincpu:key", 0 ) // decryption key
4510   ROM_LOAD( "317-0022.key", 0x0000, 0x2000, CRC(4eedc66d) SHA1(50588fa13bf25a2d1322579cdc9937450543c978) )
4511ROM_END
4512
4513
4514ROM_START( dunkshoto )
4515   ROM_REGION( 0x30000, "maincpu", 0 ) // 68000 code
44734516   ROM_LOAD16_BYTE( "epr-10467.a1", 0x000001, 0x8000, CRC(29774114) SHA1(3a88739213afd4ef7807ddbd3acdfddeb9636fd3) )
44744517   ROM_LOAD16_BYTE( "epr-10470.a4", 0x000000, 0x8000, CRC(8c60761f) SHA1(aba009f482df7023b460ab20e50225ab5f6dff6d) )
44754518   ROM_LOAD16_BYTE( "epr-10468.a2", 0x010001, 0x8000, CRC(e2d5f97a) SHA1(bf7b4a029580633fee65be89d5c9c83ff76a8484) )
r241899r241900
68176860GAME( 1988, dduxj,      ddux,     system16b_fd1094,    ddux,     segas16b_state,generic_5521,       ROT0,   "Sega", "Dynamite Dux (set 2, Japan, FD1094 317-0094)", 0 )
68186861GAME( 1988, ddux1,      ddux,     system16b_i8751,     ddux,     segas16b_state,ddux_5704,          ROT0,   "Sega", "Dynamite Dux (set 1, 8751 317-0095)", 0 )
68196862
6820GAME( 1986, dunkshot,   0,        system16b_fd1089a,   dunkshot, segas16b_state,dunkshot_5358_small,ROT0,   "Sega", "Dunk Shot (FD1089A 317-0022)", 0 )
6863GAME( 1987, dunkshot,   0,        system16b_fd1089a,   dunkshot, segas16b_state,dunkshot_5358_small,ROT0,   "Sega", "Dunk Shot (Rev C, FD1089A 317-0022)", 0 )
6864GAME( 1986, dunkshoto,  dunkshot, system16b_fd1089a,   dunkshot, segas16b_state,dunkshot_5358_small,ROT0,   "Sega", "Dunk Shot (FD1089A 317-0022)", 0 )
68216865
68226866GAME( 1989, eswat,      0,        system16b_fd1094_5797,eswat,   segas16b_state,generic_5797,       ROT0,   "Sega", "E-Swat - Cyber Police (set 4, World, FD1094 317-0130)", 0 )
68236867GAME( 1989, eswatu,     eswat,    system16b_fd1094_5797,eswat,   segas16b_state,generic_5797,       ROT0,   "Sega", "E-Swat - Cyber Police (set 3, US, FD1094 317-0129)", 0 )
trunk/src/mame/drivers/ttchamp.c
r241899r241900
382382   membank("bank2")->set_base(&ROM1[0x180000]);
383383}
384384
385GAME( 199?, ttchamp, 0,        ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0,  "Gamart?", "Table Tennis Champions (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND )
386GAME( 199?, ttchampa,ttchamp,  ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0,  "Gamart?", "Table Tennis Champions (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND )
385GAME( 1995, ttchamp, 0,        ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0,  "Gamart", "Table Tennis Champions (set 1)", GAME_NOT_WORKING|GAME_NO_SOUND )
386GAME( 1995, ttchampa,ttchamp,  ttchamp, ttchamp, ttchamp_state, ttchamp, ROT0,  "Gamart", "Table Tennis Champions (set 2)", GAME_NOT_WORKING|GAME_NO_SOUND )
trunk/src/mame/includes/lethal.h
r241899r241900
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") { }
r241899r241900
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;
r241899r241900
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;
r241899r241900
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/mame.lst
r241899r241900
45844584dduxj           // (c) 1989 (FD1094, decrypted)
45854585ddux1           // (c) 1989 (8751)
45864586dunkshot        // (c) 1986 (FD1094, decrypted)
4587dunkshoto      // (c) 1986 (FD1094, decrypted)
45874588eswat           // (c) 1989 (FD1094, decrypted)
45884589eswatu          // (c) 1989 (FD1094, decrypted)
45894590eswatj          // (c) 1989 (FD1094, decrypted)
trunk/src/mame/video/lethal.c
r241899r241900
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)
r241899r241900
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)
r241899r241900
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
r241899r241900
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/gamecom.c
r241899r241900
1818***************************************************************************/
1919
2020#include "includes/gamecom.h"
21#include "gamecom.lh"
2122
2223static ADDRESS_MAP_START(gamecom_mem_map, AS_PROGRAM, 8, gamecom_state)
2324   AM_RANGE( 0x0000, 0x0013 )  AM_RAM
r241899r241900
3132   AM_RANGE( 0x4000, 0x5FFF )  AM_ROMBANK("bank2")                                   /* External ROM/Flash. Controlled by MMU2 */
3233   AM_RANGE( 0x6000, 0x7FFF )  AM_ROMBANK("bank3")                                   /* External ROM/Flash. Controlled by MMU3 */
3334   AM_RANGE( 0x8000, 0x9FFF )  AM_ROMBANK("bank4")                                   /* External ROM/Flash. Controlled by MMU4 */
34   AM_RANGE( 0xA000, 0xDFFF )  AM_RAM AM_SHARE("p_videoram")             /* VRAM */
35   AM_RANGE( 0xE000, 0xFFFF )  AM_RAM AM_SHARE("p_nvram")// AM_SHARE("nvram")           /* Extended I/O, Extended RAM */
35   AM_RANGE( 0xA000, 0xDFFF )  AM_RAM AM_SHARE("videoram")             /* VRAM */
36   AM_RANGE( 0xE000, 0xFFFF )  AM_RAM AM_SHARE("nvram")           /* Extended I/O, Extended RAM */
3637ADDRESS_MAP_END
3738
3839static INPUT_PORTS_START( gamecom )
r241899r241900
4344   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME( "Right" )
4445   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Menu" ) PORT_CODE( KEYCODE_M )
4546   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR(Pause) ) PORT_CODE( KEYCODE_V )
46   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Sound" ) PORT_CODE( KEYCODE_B )
47   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Button A" )
47   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Sound" ) PORT_CODE( KEYCODE_S )
48   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Button A" ) PORT_CODE( KEYCODE_A ) PORT_CODE( KEYCODE_LCONTROL )
4849
4950   PORT_START("IN1")
50   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Button B" )
51   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Button C" )
51   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Button B" ) PORT_CODE( KEYCODE_B ) PORT_CODE( KEYCODE_LALT )
52   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Button C" ) PORT_CODE( KEYCODE_C ) PORT_CODE( KEYCODE_SPACE )
5253
5354   PORT_START("IN2")
5455   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Reset" ) PORT_CODE( KEYCODE_N )
55   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Button D" )
56   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Button D" ) PORT_CODE( KEYCODE_D ) PORT_CODE( KEYCODE_LSHIFT )
5657   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Stylus press" ) PORT_CODE( KEYCODE_Z ) PORT_CODE( MOUSECODE_BUTTON1 )
5758
58   PORT_START("STYX")
59   PORT_BIT( 0xff, 100, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1, 0, 0) PORT_MINMAX(0,199) PORT_SENSITIVITY(50) PORT_KEYDELTA(8)
59   PORT_START("GRID.0")
60   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
61   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
62   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
63   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
64   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
65   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
66   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
67   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
68   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
69   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
6070
61   PORT_START("STYY")
62   PORT_BIT( 0xff, 80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1, 0, 0) PORT_MINMAX(0,159) PORT_SENSITIVITY(50) PORT_KEYDELTA(8)
63INPUT_PORTS_END
71   PORT_START("GRID.1")
72   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
73   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
74   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
75   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
76   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
77   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
78   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
79   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
80   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
81   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
6482
83   PORT_START("GRID.2")
84   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
85   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
86   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
87   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
88   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
89   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
90   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
91   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
92   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
93   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
94
95   PORT_START("GRID.3")
96   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
97   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
98   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
99   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
100   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
101   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
102   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
103   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
104   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
105   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
106
107   PORT_START("GRID.4")
108   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
109   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
110   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
111   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
112   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
113   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
114   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
115   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
116   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
117   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
118
119   PORT_START("GRID.5")
120   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
121   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
122   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
123   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
124   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
125   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
126   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
127   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
128   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
129   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
130
131   PORT_START("GRID.6")
132   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
133   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
134   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
135   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
136   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
137   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
138   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
139   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
140   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
141   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
142
143   PORT_START("GRID.7")
144   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
145   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
146   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
147   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
148   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
149   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
150   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
151   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
152   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
153   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
154
155   PORT_START("GRID.8")
156   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
157   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
158   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
159   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
160   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
161   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
162   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
163   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
164   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
165   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
166
167   PORT_START("GRID.9")
168   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
169   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
170   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
171   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
172   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
173   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
174   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
175   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
176   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
177   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
178
179   PORT_START("GRID.10")
180   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
181   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
182   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
183   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
184   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
185   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
186   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
187   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
188   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
189   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
190
191   PORT_START("GRID.11")
192   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
193   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
194   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
195   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
196   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
197   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
198   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
199   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
200   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
201   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
202
203   PORT_START("GRID.12")
204   PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_OTHER)
205   PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_OTHER)
206   PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_OTHER)
207   PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_OTHER)
208   PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_OTHER)
209   PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_OTHER)
210   PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_OTHER)
211   PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_OTHER)
212   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_OTHER)
213   PORT_BIT( 0x200, IP_ACTIVE_HIGH, IPT_OTHER)
214   INPUT_PORTS_END
215
65216static const unsigned char palette_gamecom[] =
66217{
67218   0xDF, 0xFF, 0x8F,   /* White */
r241899r241900
108259   MCFG_SCREEN_REFRESH_RATE( 59.732155 )
109260   MCFG_SCREEN_VBLANK_TIME(500)
110261   MCFG_SCREEN_UPDATE_DRIVER(gamecom_state, screen_update)
111   MCFG_SCREEN_SIZE( 200, 200 )
112   MCFG_SCREEN_VISIBLE_AREA( 0, 199, 0, 159 )
262   MCFG_SCREEN_SIZE( 208, 160 )
263   MCFG_SCREEN_VISIBLE_AREA( 0, 207, 0, 159 )
113264   MCFG_SCREEN_PALETTE("palette")
114265
115   MCFG_DEFAULT_LAYOUT(layout_lcd)
266   MCFG_DEFAULT_LAYOUT(layout_gamecom)
116267   MCFG_PALETTE_ADD("palette", 5)
117268   MCFG_PALETTE_INIT_OWNER(gamecom_state, gamecom)
118269
r241899r241900
143294   ROM_LOAD( "external.bin", 0x00000, 0x40000, CRC(e235a589) SHA1(97f782e72d738f4d7b861363266bf46b438d9b50) )
144295ROM_END
145296
146/*    YEAR  NAME     PARENT COMPAT MACHINE  INPUT    INIT    COMPANY  FULLNAME */
147CONS( 1997, gamecom, 0,     0,     gamecom, gamecom, gamecom_state, gamecom,"Tiger", "Game.com", GAME_NOT_WORKING | GAME_NO_SOUND)
297/*    YEAR  NAME     PARENT COMPAT MACHINE  INPUT    CLASS            INIT    COMPANY  FULLNAME */
298CONS( 1997, gamecom, 0,     0,     gamecom, gamecom, gamecom_state, gamecom, "Tiger", "Game.com", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND)
trunk/src/mess/drivers/ngen.c
r241899r241900
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{
r241899r241900
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);
r241899r241900
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)
r241899r241900
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;
120   case 0x144:
121      if(mem_mask & 0x00ff)
122         m_crtc->address_w(space,0,data & 0xff);
123      break;
124   case 0x145:
125      if(mem_mask & 0x00ff)
126         m_crtc->register_w(space,0,data & 0xff);
127      break;
128   case 0x146:
129      if(mem_mask & 0x00ff)
130         m_iouart->ba_cd_w(space,0,data & 0xff);
131      logerror("Video write offset 0x146 data %04x mask %04x\n",data,mem_mask);
132      break;
104133   case 0x147:
105      if(mem_mask & 0xff00)
106         m_pic->write(space,0,(data >> 8) & 0xff);
107134      if(mem_mask & 0x00ff)
108         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);
109137      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);
110140   }
111   logerror("Peripheral write offset %04x data %04x mask %04x\n",offset,data,mem_mask);
112141}
113142
114143READ16_MEMBER(ngen_state::peripheral_r)
115144{
116   UINT16 ret = 0xff;
145   UINT16 ret = 0xffff;
117146   switch(offset)
118147   {
148   case 0x141:
149      ret = m_periph141;
150      break;
151   case 0x144:
152      if(mem_mask & 0x00ff)
153         ret = m_crtc->status_r(space,0);
154      break;
155   case 0x145:
156      if(mem_mask & 0x00ff)
157         ret = m_crtc->register_r(space,0);
158      break;
119159   case 0x146:
120160      if(mem_mask & 0x00ff)
121         ret = m_pic->read(space,0);
161         ret = m_iouart->ba_cd_r(space,0);
122162      break;
123   case 0x147:
163   case 0x147:  // definitely video related, likely UART sending data to the video board
124164      if(mem_mask & 0x00ff)
125         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;
126168      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);
127171   }
128   logerror("Peripheral read offset %04x mask %04x\n",offset,mem_mask);
129172   return ret;
130173}
131174
r241899r241900
147190
148191MC6845_UPDATE_ROW( ngen_state::crtc_update_row )
149192{
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   }
150206}
151207
152208static ADDRESS_MAP_START( ngen_mem, AS_PROGRAM, 16, ngen_state )
153   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")
154212   AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("bios",0)
155213ADDRESS_MAP_END
156214
r241899r241900
197255
198256   MCFG_DEVICE_ADD("dmac", AM9517A, XTAL_14_7456MHz / 3)  // NEC D8237A, divisor unknown
199257
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
200261   // video board
201262   MCFG_SCREEN_ADD("screen", RASTER)
202263   MCFG_SCREEN_SIZE(720,348)
264   MCFG_SCREEN_VISIBLE_AREA(0,719,0,347)
203265   MCFG_SCREEN_REFRESH_RATE(60)
204266   MCFG_SCREEN_UPDATE_DEVICE("crtc",mc6845_device, screen_update)
205267
206   MCFG_MC6845_ADD("crtc", MC6845, NULL, 19980000 / 16)  // divisor unknown
268   MCFG_MC6845_ADD("crtc", MC6845, NULL, 19980000 / 9)  // divisor unknown -- /9 gives 60Hz output, so likely correct
207269   MCFG_MC6845_SHOW_BORDER_AREA(false)
208270   MCFG_MC6845_CHAR_WIDTH(9)
209271   MCFG_MC6845_UPDATE_ROW_CB(ngen_state, crtc_update_row)
272   MCFG_VIDEO_SET_SCREEN("screen")
210273
211   MCFG_DEVICE_ADD("videouart", I8251, 19980000 / 16)  // divisor unknown
274   MCFG_DEVICE_ADD("videouart", I8251, 19980000 / 9)  // divisor unknown
212275
213276MACHINE_CONFIG_END
214277
trunk/src/mess/drivers/simon.c
r241899r241900
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
r241899r241900
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
r241899r241900
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
r241899r241900
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;
r241899r241900
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
r241899r241900
1616#include "sound/dac.h"
1717#include "bus/generic/slot.h"
1818#include "bus/generic/carts.h"
19#include "machine/nvram.h"
1920
20#include "rendlay.h"
21
2221/* SM8521 register addresses */
2322enum
2423{
r241899r241900
212211{
213212public:
214213   gamecom_state(const machine_config &mconfig, device_type type, const char *tag)
215      : driver_device(mconfig, type, tag),
216      m_maincpu(*this, "maincpu"),
217      m_dac(*this, "dac"),
218      m_cart1(*this, "cartslot1"),
219      m_cart2(*this, "cartslot2"),
220      m_p_nvram(*this,"p_nvram"),
221      m_p_videoram(*this,"p_videoram"),
222      m_bank1(*this, "bank1"),
223      m_bank2(*this, "bank2"),
224      m_bank3(*this, "bank3"),
225      m_bank4(*this, "bank4"),
226      m_region_maincpu(*this, "maincpu"),
227      m_region_kernel(*this, "kernel"),
228      m_io_in0(*this, "IN0"),
229      m_io_in1(*this, "IN1"),
230      m_io_in2(*this, "IN2"),
231      m_io_styx(*this, "STYX"),
232      m_io_styy(*this, "STYY")
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")
233231      { }
234232
235   required_device<cpu_device> m_maincpu;
236   required_device<dac_device> m_dac;
237   required_device<generic_slot_device> m_cart1;
238   required_device<generic_slot_device> m_cart2;
239233   DECLARE_READ8_MEMBER( gamecom_internal_r );
240234   DECLARE_READ8_MEMBER( gamecom_pio_r );
241235   DECLARE_WRITE8_MEMBER( gamecom_internal_w );
242236   DECLARE_WRITE8_MEMBER( gamecom_pio_w );
243   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:
244248   UINT8 *m_p_ram;
245   required_shared_ptr<UINT8> m_p_videoram;
246249   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;
247255   memory_region *m_cart1_rom;
248256   memory_region *m_cart2_rom;
249257   emu_timer *m_clock_timer;
r241899r241900
251259   GAMECOM_DMA m_dma;
252260   GAMECOM_TIMER m_timer[2];
253261   gamecom_sound_t m_sound;
254   int m_stylus_x;
255   int m_stylus_y;
256   int m_scanline;
257   unsigned int m_base_address;
258262   bitmap_ind16 m_bitmap;
259263   void gamecom_set_mmu(UINT8 mmu, UINT8 data);
260264   void handle_stylus_press(int column);
261   UINT8 m_lcdc_reg;
262   UINT8 m_lch_reg;
263   UINT8 m_lcv_reg;
264265   void recompute_lcd_params();
265266   void handle_input_press(UINT16 mux_data);
266
267   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
268   DECLARE_DRIVER_INIT(gamecom);
267   int common_load(device_image_interface &image, generic_slot_device *slot);
269268   virtual void machine_reset();
270269   virtual void video_start();
271   DECLARE_PALETTE_INIT(gamecom);
272   INTERRUPT_GEN_MEMBER(gamecom_interrupt);
273   TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback);
274   TIMER_CALLBACK_MEMBER(gamecom_scanline);
275   DECLARE_WRITE8_MEMBER( gamecom_handle_dma );
276   DECLARE_WRITE8_MEMBER( gamecom_update_timers );
277   int common_load(device_image_interface &image, generic_slot_device *slot);
278   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 );
279   DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 );
280
281protected:
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;
282276   required_memory_bank m_bank1;
283277   required_memory_bank m_bank2;
284278   required_memory_bank m_bank3;
r241899r241900
288282   required_ioport m_io_in0;
289283   required_ioport m_io_in1;
290284   required_ioport m_io_in2;
291   required_ioport m_io_styx;
292   required_ioport m_io_styy;
285   required_ioport_array<13> m_io_grid;
293286};
294287
295288#endif /* GAMECOM_H_ */
trunk/src/mess/includes/pet.h
r241899r241900
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
r241899r241900
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{
r241899r241900
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
r0r241900
1<!-- gamecom.lay -->
2
3<mamelayout version="2">
4
5   <element name="grid"><rect><color red="0.0" green="0.0" blue="0.0" alpha="0.0"/></rect></element>
6
7   <view name="Default Grid">
8
9      <backdrop element="grid" inputtag="GRID.0" inputmask="0x01" >
10         <bounds x="0" y="0" width="16" height="16" />
11      </backdrop>
12      <backdrop element="grid" inputtag="GRID.1" inputmask="0x01" >
13         <bounds x="16" y="0" width="16" height="16" />
14      </backdrop>
15      <backdrop element="grid" inputtag="GRID.2" inputmask="0x01" >
16         <bounds x="32" y="0" width="16" height="16" />
17      </backdrop>
18      <backdrop element="grid" inputtag="GRID.3" inputmask="0x01" >
19         <bounds x="48" y="0" width="16" height="16" />
20      </backdrop>
21      <backdrop element="grid" inputtag="GRID.4" inputmask="0x01" >
22         <bounds x="64" y="0" width="16" height="16" />
23      </backdrop>
24      <backdrop element="grid" inputtag="GRID.5" inputmask="0x01" >
25         <bounds x="80" y="0" width="16" height="16" />
26      </backdrop>
27      <backdrop element="grid" inputtag="GRID.6" inputmask="0x01" >
28         <bounds x="96" y="0" width="16" height="16" />
29      </backdrop>
30      <backdrop element="grid" inputtag="GRID.7" inputmask="0x01" >
31         <bounds x="112" y="0" width="16" height="16" />
32      </backdrop>
33      <backdrop element="grid" inputtag="GRID.8" inputmask="0x01" >
34         <bounds x="128" y="0" width="16" height="16" />
35      </backdrop>
36      <backdrop element="grid" inputtag="GRID.9" inputmask="0x01" >
37         <bounds x="144" y="0" width="16" height="16" />
38      </backdrop>
39      <backdrop element="grid" inputtag="GRID.10" inputmask="0x01" >
40         <bounds x="160" y="0" width="16" height="16" />
41      </backdrop>
42      <backdrop element="grid" inputtag="GRID.11" inputmask="0x01" >
43         <bounds x="176" y="0" width="16" height="16" />
44      </backdrop>
45      <backdrop element="grid" inputtag="GRID.12" inputmask="0x01" >
46         <bounds x="192" y="0" width="16" height="16" />
47      </backdrop>
48
49      <backdrop element="grid" inputtag="GRID.0" inputmask="0x02" >
50         <bounds x="0" y="16" width="16" height="16" />
51      </backdrop>
52      <backdrop element="grid" inputtag="GRID.1" inputmask="0x02" >
53         <bounds x="16" y="16" width="16" height="16" />
54      </backdrop>
55      <backdrop element="grid" inputtag="GRID.2" inputmask="0x02" >
56         <bounds x="32" y="16" width="16" height="16" />
57      </backdrop>
58      <backdrop element="grid" inputtag="GRID.3" inputmask="0x02" >
59         <bounds x="48" y="16" width="16" height="16" />
60      </backdrop>
61      <backdrop element="grid" inputtag="GRID.4" inputmask="0x02" >
62         <bounds x="64" y="16" width="16" height="16" />
63      </backdrop>
64      <backdrop element="grid" inputtag="GRID.5" inputmask="0x02" >
65         <bounds x="80" y="16" width="16" height="16" />
66      </backdrop>
67      <backdrop element="grid" inputtag="GRID.6" inputmask="0x02" >
68         <bounds x="96" y="16" width="16" height="16" />
69      </backdrop>
70      <backdrop element="grid" inputtag="GRID.7" inputmask="0x02" >
71         <bounds x="112" y="16" width="16" height="16" />
72      </backdrop>
73      <backdrop element="grid" inputtag="GRID.8" inputmask="0x02" >
74         <bounds x="128" y="16" width="16" height="16" />
75      </backdrop>
76      <backdrop element="grid" inputtag="GRID.9" inputmask="0x02" >
77         <bounds x="144" y="16" width="16" height="16" />
78      </backdrop>
79      <backdrop element="grid" inputtag="GRID.10" inputmask="0x02" >
80         <bounds x="160" y="16" width="16" height="16" />
81      </backdrop>
82      <backdrop element="grid" inputtag="GRID.11" inputmask="0x02" >
83         <bounds x="176" y="16" width="16" height="16" />
84      </backdrop>
85      <backdrop element="grid" inputtag="GRID.12" inputmask="0x02" >
86         <bounds x="192" y="16" width="16" height="16" />
87      </backdrop>
88
89      <backdrop element="grid" inputtag="GRID.0" inputmask="0x04" >
90         <bounds x="0" y="32" width="16" height="16" />
91      </backdrop>
92      <backdrop element="grid" inputtag="GRID.1" inputmask="0x04" >
93         <bounds x="16" y="32" width="16" height="16" />
94      </backdrop>
95      <backdrop element="grid" inputtag="GRID.2" inputmask="0x04" >
96         <bounds x="32" y="32" width="16" height="16" />
97      </backdrop>
98      <backdrop element="grid" inputtag="GRID.3" inputmask="0x04" >
99         <bounds x="48" y="32" width="16" height="16" />
100      </backdrop>
101      <backdrop element="grid" inputtag="GRID.4" inputmask="0x04" >
102         <bounds x="64" y="32" width="16" height="16" />
103      </backdrop>
104      <backdrop element="grid" inputtag="GRID.5" inputmask="0x04" >
105         <bounds x="80" y="32" width="16" height="16" />
106      </backdrop>
107      <backdrop element="grid" inputtag="GRID.6" inputmask="0x04" >
108         <bounds x="96" y="32" width="16" height="16" />
109      </backdrop>
110      <backdrop element="grid" inputtag="GRID.7" inputmask="0x04" >
111         <bounds x="112" y="32" width="16" height="16" />
112      </backdrop>
113      <backdrop element="grid" inputtag="GRID.8" inputmask="0x04" >
114         <bounds x="128" y="32" width="16" height="16" />
115      </backdrop>
116      <backdrop element="grid" inputtag="GRID.9" inputmask="0x04" >
117         <bounds x="144" y="32" width="16" height="16" />
118      </backdrop>
119      <backdrop element="grid" inputtag="GRID.10" inputmask="0x04" >
120         <bounds x="160" y="32" width="16" height="16" />
121      </backdrop>
122      <backdrop element="grid" inputtag="GRID.11" inputmask="0x04" >
123         <bounds x="176" y="32" width="16" height="16" />
124      </backdrop>
125      <backdrop element="grid" inputtag="GRID.12" inputmask="0x04" >
126         <bounds x="192" y="32" width="16" height="16" />
127      </backdrop>
128
129      <backdrop element="grid" inputtag="GRID.0" inputmask="0x08" >
130         <bounds x="0" y="48" width="16" height="16" />
131      </backdrop>
132      <backdrop element="grid" inputtag="GRID.1" inputmask="0x08" >
133         <bounds x="16" y="48" width="16" height="16" />
134      </backdrop>
135      <backdrop element="grid" inputtag="GRID.2" inputmask="0x08" >
136         <bounds x="32" y="48" width="16" height="16" />
137      </backdrop>
138      <backdrop element="grid" inputtag="GRID.3" inputmask="0x08" >
139         <bounds x="48" y="48" width="16" height="16" />
140      </backdrop>
141      <backdrop element="grid" inputtag="GRID.4" inputmask="0x08" >
142         <bounds x="64" y="48" width="16" height="16" />
143      </backdrop>
144      <backdrop element="grid" inputtag="GRID.5" inputmask="0x08" >
145         <bounds x="80" y="48" width="16" height="16" />
146      </backdrop>
147      <backdrop element="grid" inputtag="GRID.6" inputmask="0x08" >
148         <bounds x="96" y="48" width="16" height="16" />
149      </backdrop>
150      <backdrop element="grid" inputtag="GRID.7" inputmask="0x08" >
151         <bounds x="112" y="48" width="16" height="16" />
152      </backdrop>
153      <backdrop element="grid" inputtag="GRID.8" inputmask="0x08" >
154         <bounds x="128" y="48" width="16" height="16" />
155      </backdrop>
156      <backdrop element="grid" inputtag="GRID.9" inputmask="0x08" >
157         <bounds x="144" y="48" width="16" height="16" />
158      </backdrop>
159      <backdrop element="grid" inputtag="GRID.10" inputmask="0x08" >
160         <bounds x="160" y="48" width="16" height="16" />
161      </backdrop>
162      <backdrop element="grid" inputtag="GRID.11" inputmask="0x08" >
163         <bounds x="176" y="48" width="16" height="16" />
164      </backdrop>
165      <backdrop element="grid" inputtag="GRID.12" inputmask="0x08" >
166         <bounds x="192" y="48" width="16" height="16" />
167      </backdrop>
168
169      <backdrop element="grid" inputtag="GRID.0" inputmask="0x10" >
170         <bounds x="0" y="64" width="16" height="16" />
171      </backdrop>
172      <backdrop element="grid" inputtag="GRID.1" inputmask="0x10" >
173         <bounds x="16" y="64" width="16" height="16" />
174      </backdrop>
175      <backdrop element="grid" inputtag="GRID.2" inputmask="0x10" >
176         <bounds x="32" y="64" width="16" height="16" />
177      </backdrop>
178      <backdrop element="grid" inputtag="GRID.3" inputmask="0x10" >
179         <bounds x="48" y="64" width="16" height="16" />
180      </backdrop>
181      <backdrop element="grid" inputtag="GRID.4" inputmask="0x10" >
182         <bounds x="64" y="64" width="16" height="16" />
183      </backdrop>
184      <backdrop element="grid" inputtag="GRID.5" inputmask="0x10" >
185         <bounds x="80" y="64" width="16" height="16" />
186      </backdrop>
187      <backdrop element="grid" inputtag="GRID.6" inputmask="0x10" >
188         <bounds x="96" y="64" width="16" height="16" />
189      </backdrop>
190      <backdrop element="grid" inputtag="GRID.7" inputmask="0x10" >
191         <bounds x="112" y="64" width="16" height="16" />
192      </backdrop>
193      <backdrop element="grid" inputtag="GRID.8" inputmask="0x10" >
194         <bounds x="128" y="64" width="16" height="16" />
195      </backdrop>
196      <backdrop element="grid" inputtag="GRID.9" inputmask="0x10" >
197         <bounds x="144" y="64" width="16" height="16" />
198      </backdrop>
199      <backdrop element="grid" inputtag="GRID.10" inputmask="0x10" >
200         <bounds x="160" y="64" width="16" height="16" />
201      </backdrop>
202      <backdrop element="grid" inputtag="GRID.11" inputmask="0x10" >
203         <bounds x="176" y="64" width="16" height="16" />
204      </backdrop>
205      <backdrop element="grid" inputtag="GRID.12" inputmask="0x10" >
206         <bounds x="192" y="64" width="16" height="16" />
207      </backdrop>
208
209      <backdrop element="grid" inputtag="GRID.0" inputmask="0x20" >
210         <bounds x="0" y="80" width="16" height="16" />
211      </backdrop>
212      <backdrop element="grid" inputtag="GRID.1" inputmask="0x20" >
213         <bounds x="16" y="80" width="16" height="16" />
214      </backdrop>
215      <backdrop element="grid" inputtag="GRID.2" inputmask="0x20" >
216         <bounds x="32" y="80" width="16" height="16" />
217      </backdrop>
218      <backdrop element="grid" inputtag="GRID.3" inputmask="0x20" >
219         <bounds x="48" y="80" width="16" height="16" />
220      </backdrop>
221      <backdrop element="grid" inputtag="GRID.4" inputmask="0x20" >
222         <bounds x="64" y="80" width="16" height="16" />
223      </backdrop>
224      <backdrop element="grid" inputtag="GRID.5" inputmask="0x20" >
225         <bounds x="80" y="80" width="16" height="16" />
226      </backdrop>
227      <backdrop element="grid" inputtag="GRID.6" inputmask="0x20" >
228         <bounds x="96" y="80" width="16" height="16" />
229      </backdrop>
230      <backdrop element="grid" inputtag="GRID.7" inputmask="0x20" >
231         <bounds x="112" y="80" width="16" height="16" />
232      </backdrop>
233      <backdrop element="grid" inputtag="GRID.8" inputmask="0x20" >
234         <bounds x="128" y="80" width="16" height="16" />
235      </backdrop>
236      <backdrop element="grid" inputtag="GRID.9" inputmask="0x20" >
237         <bounds x="144" y="80" width="16" height="16" />
238      </backdrop>
239      <backdrop element="grid" inputtag="GRID.10" inputmask="0x20" >
240         <bounds x="160" y="80" width="16" height="16" />
241      </backdrop>
242      <backdrop element="grid" inputtag="GRID.11" inputmask="0x20" >
243         <bounds x="176" y="80" width="16" height="16" />
244      </backdrop>
245      <backdrop element="grid" inputtag="GRID.12" inputmask="0x20" >
246         <bounds x="192" y="80" width="16" height="16" />
247      </backdrop>
248
249      <backdrop element="grid" inputtag="GRID.0" inputmask="0x40" >
250         <bounds x="0" y="96" width="16" height="16" />
251      </backdrop>
252      <backdrop element="grid" inputtag="GRID.1" inputmask="0x40" >
253         <bounds x="16" y="96" width="16" height="16" />
254      </backdrop>
255      <backdrop element="grid" inputtag="GRID.2" inputmask="0x40" >
256         <bounds x="32" y="96" width="16" height="16" />
257      </backdrop>
258      <backdrop element="grid" inputtag="GRID.3" inputmask="0x40" >
259         <bounds x="48" y="96" width="16" height="16" />
260      </backdrop>
261      <backdrop element="grid" inputtag="GRID.4" inputmask="0x40" >
262         <bounds x="64" y="96" width="16" height="16" />
263      </backdrop>
264      <backdrop element="grid" inputtag="GRID.5" inputmask="0x40" >
265         <bounds x="80" y="96" width="16" height="16" />
266      </backdrop>
267      <backdrop element="grid" inputtag="GRID.6" inputmask="0x40" >
268         <bounds x="96" y="96" width="16" height="16" />
269      </backdrop>
270      <backdrop element="grid" inputtag="GRID.7" inputmask="0x40" >
271         <bounds x="112" y="96" width="16" height="16" />
272      </backdrop>
273      <backdrop element="grid" inputtag="GRID.8" inputmask="0x40" >
274         <bounds x="128" y="96" width="16" height="16" />
275      </backdrop>
276      <backdrop element="grid" inputtag="GRID.9" inputmask="0x40" >
277         <bounds x="144" y="96" width="16" height="16" />
278      </backdrop>
279      <backdrop element="grid" inputtag="GRID.10" inputmask="0x40" >
280         <bounds x="160" y="96" width="16" height="16" />
281      </backdrop>
282      <backdrop element="grid" inputtag="GRID.11" inputmask="0x40" >
283         <bounds x="176" y="96" width="16" height="16" />
284      </backdrop>
285      <backdrop element="grid" inputtag="GRID.12" inputmask="0x40" >
286         <bounds x="192" y="96" width="16" height="16" />
287      </backdrop>
288
289      <backdrop element="grid" inputtag="GRID.0" inputmask="0x80" >
290         <bounds x="0" y="112" width="16" height="16" />
291      </backdrop>
292      <backdrop element="grid" inputtag="GRID.1" inputmask="0x80" >
293         <bounds x="16" y="112" width="16" height="16" />
294      </backdrop>
295      <backdrop element="grid" inputtag="GRID.2" inputmask="0x80" >
296         <bounds x="32" y="112" width="16" height="16" />
297      </backdrop>
298      <backdrop element="grid" inputtag="GRID.3" inputmask="0x80" >
299         <bounds x="48" y="112" width="16" height="16" />
300      </backdrop>
301      <backdrop element="grid" inputtag="GRID.4" inputmask="0x80" >
302         <bounds x="64" y="112" width="16" height="16" />
303      </backdrop>
304      <backdrop element="grid" inputtag="GRID.5" inputmask="0x80" >
305         <bounds x="80" y="112" width="16" height="16" />
306      </backdrop>
307      <backdrop element="grid" inputtag="GRID.6" inputmask="0x80" >
308         <bounds x="96" y="112" width="16" height="16" />
309      </backdrop>
310      <backdrop element="grid" inputtag="GRID.7" inputmask="0x80" >
311         <bounds x="112" y="112" width="16" height="16" />
312      </backdrop>
313      <backdrop element="grid" inputtag="GRID.8" inputmask="0x80" >
314         <bounds x="128" y="112" width="16" height="16" />
315      </backdrop>
316      <backdrop element="grid" inputtag="GRID.9" inputmask="0x80" >
317         <bounds x="144" y="112" width="16" height="16" />
318      </backdrop>
319      <backdrop element="grid" inputtag="GRID.10" inputmask="0x80" >
320         <bounds x="160" y="112" width="16" height="16" />
321      </backdrop>
322      <backdrop element="grid" inputtag="GRID.11" inputmask="0x80" >
323         <bounds x="176" y="112" width="16" height="16" />
324      </backdrop>
325      <backdrop element="grid" inputtag="GRID.12" inputmask="0x80" >
326         <bounds x="192" y="112" width="16" height="16" />
327      </backdrop>
328
329      <backdrop element="grid" inputtag="GRID.0" inputmask="0x100" >
330         <bounds x="0" y="128" width="16" height="16" />
331      </backdrop>
332      <backdrop element="grid" inputtag="GRID.1" inputmask="0x100" >
333         <bounds x="16" y="128" width="16" height="16" />
334      </backdrop>
335      <backdrop element="grid" inputtag="GRID.2" inputmask="0x100" >
336         <bounds x="32" y="128" width="16" height="16" />
337      </backdrop>
338      <backdrop element="grid" inputtag="GRID.3" inputmask="0x100" >
339         <bounds x="48" y="128" width="16" height="16" />
340      </backdrop>
341      <backdrop element="grid" inputtag="GRID.4" inputmask="0x100" >
342         <bounds x="64" y="128" width="16" height="16" />
343      </backdrop>
344      <backdrop element="grid" inputtag="GRID.5" inputmask="0x100" >
345         <bounds x="80" y="128" width="16" height="16" />
346      </backdrop>
347      <backdrop element="grid" inputtag="GRID.6" inputmask="0x100" >
348         <bounds x="96" y="128" width="16" height="16" />
349      </backdrop>
350      <backdrop element="grid" inputtag="GRID.7" inputmask="0x100" >
351         <bounds x="112" y="128" width="16" height="16" />
352      </backdrop>
353      <backdrop element="grid" inputtag="GRID.8" inputmask="0x100" >
354         <bounds x="128" y="128" width="16" height="16" />
355      </backdrop>
356      <backdrop element="grid" inputtag="GRID.9" inputmask="0x100" >
357         <bounds x="144" y="128" width="16" height="16" />
358      </backdrop>
359      <backdrop element="grid" inputtag="GRID.10" inputmask="0x100" >
360         <bounds x="160" y="128" width="16" height="16" />
361      </backdrop>
362      <backdrop element="grid" inputtag="GRID.11" inputmask="0x100" >
363         <bounds x="176" y="128" width="16" height="16" />
364      </backdrop>
365      <backdrop element="grid" inputtag="GRID.12" inputmask="0x100" >
366         <bounds x="192" y="128" width="16" height="16" />
367      </backdrop>
368
369      <backdrop element="grid" inputtag="GRID.0" inputmask="0x200" >
370         <bounds x="0" y="144" width="16" height="16" />
371      </backdrop>
372      <backdrop element="grid" inputtag="GRID.1" inputmask="0x200" >
373         <bounds x="16" y="144" width="16" height="16" />
374      </backdrop>
375      <backdrop element="grid" inputtag="GRID.2" inputmask="0x200" >
376         <bounds x="32" y="144" width="16" height="16" />
377      </backdrop>
378      <backdrop element="grid" inputtag="GRID.3" inputmask="0x200" >
379         <bounds x="48" y="144" width="16" height="16" />
380      </backdrop>
381      <backdrop element="grid" inputtag="GRID.4" inputmask="0x200" >
382         <bounds x="64" y="144" width="16" height="16" />
383      </backdrop>
384      <backdrop element="grid" inputtag="GRID.5" inputmask="0x200" >
385         <bounds x="80" y="144" width="16" height="16" />
386      </backdrop>
387      <backdrop element="grid" inputtag="GRID.6" inputmask="0x200" >
388         <bounds x="96" y="144" width="16" height="16" />
389      </backdrop>
390      <backdrop element="grid" inputtag="GRID.7" inputmask="0x200" >
391         <bounds x="112" y="144" width="16" height="16" />
392      </backdrop>
393      <backdrop element="grid" inputtag="GRID.8" inputmask="0x200" >
394         <bounds x="128" y="144" width="16" height="16" />
395      </backdrop>
396      <backdrop element="grid" inputtag="GRID.9" inputmask="0x200" >
397         <bounds x="144" y="144" width="16" height="16" />
398      </backdrop>
399      <backdrop element="grid" inputtag="GRID.10" inputmask="0x200" >
400         <bounds x="160" y="144" width="16" height="16" />
401      </backdrop>
402      <backdrop element="grid" inputtag="GRID.11" inputmask="0x200" >
403         <bounds x="176" y="144" width="16" height="16" />
404      </backdrop>
405      <backdrop element="grid" inputtag="GRID.12" inputmask="0x200" >
406         <bounds x="192" y="144" width="16" height="16" />
407      </backdrop>
408      <screen index="0">
409         <bounds left="0" top="0" right="208" bottom="160" />
410      </screen>
411
412   </view>
413</mamelayout>
No newline at end of file
trunk/src/mess/machine/gamecom.c
r241899r241900
6262
6363void gamecom_state::handle_stylus_press( int column )
6464{
65   static const UINT16 row_data[17] = { 0x3FE, 0x3FD, 0x3FB, 0x3F7, 0x3EF, 0x3DF, 0x3BF, 0x37F, 0x2FF, 0x1FF };
66
67   if ( column == 0 )
65   UINT16 data = m_io_grid[column]->read();
66   if (data)
6867   {
69      if ( !BIT( m_io_in2->read(), 2) )
70      {
71         m_stylus_x = m_io_styx->read() >> 4;
72         m_stylus_y = m_io_styy->read() >> 4;
73      }
74      else
75      {
76         m_stylus_x = 16;
77         m_stylus_y = 16;
78      }
68      UINT16 stylus_y = data ^ 0x3ff;
69      m_p_ram[SM8521_P0] = stylus_y;
70      m_p_ram[SM8521_P1] = ( m_p_ram[SM8521_P1] & 0xFC ) | ( stylus_y >> 8 );
7971   }
80
81   if ( m_stylus_x == column )
82   {
83      m_p_ram[SM8521_P0] = row_data[m_stylus_y];
84      m_p_ram[SM8521_P1] = ( m_p_ram[SM8521_P1] & 0xFC ) | ( ( row_data[m_stylus_y] >> 8 ) & 3 );
85   }
8672   else
8773   {
8874      m_p_ram[SM8521_P0] = 0xFF;
89      m_p_ram[SM8521_P1] = ( m_p_ram[SM8521_P1] & 0xFC ) | 3;
75      m_p_ram[SM8521_P1] |= 3;
9076   }
9177}
9278
trunk/src/mess/mess.mak
r241899r241900
20862086$(MESS_DRIVERS)/fidelz80.o: $(MESS_LAYOUT)/fidelz80.lh \
20872087                     $(MESS_LAYOUT)/bridgec3.lh \
20882088                     $(MESS_LAYOUT)/vsc.lh
2089$(MESS_DRIVERS)/gamecom.o:  $(MESS_LAYOUT)/gamecom.lh
20892090$(MESS_DRIVERS)/glasgow.o:  $(MESS_LAYOUT)/glasgow.lh
20902091$(MESS_DRIVERS)/h8.o:       $(MESS_LAYOUT)/h8.lh
20912092$(MESS_DRIVERS)/ie15.o:     $(MESS_LAYOUT)/ie15.lh


Previous 199869 Revisions Next


© 1997-2024 The MAME Team