Previous 199869 Revisions Next

r39869 Wednesday 22nd July, 2015 at 01:15:33 UTC by David Haywood
Merge pull request #264 from JoakimLarsson/force68k

Force68k
[/trunk].travis.yml
[3rdparty/mongoose]mongoose.c
[nl_examples]congo_bongo.c
[src/emu/bus/msx_cart]moonsound.c moonsound.h
[src/emu/cpu/ucom4]ucom4.c ucom4.h ucom4op.c
[src/emu/machine]smpc.c stvcd.c
[src/emu/netlist]nl_factory.c nl_factory.h nl_parser.c nl_setup.c nl_setup.h
[src/emu/netlist/analog]nld_bjt.c nld_bjt.h nld_opamps.c nld_opamps.h nld_twoterm.c nld_twoterm.h
[src/emu/netlist/devices]net_lib.c nld_system.h
[src/emu/netlist/plib]plists.h
[src/emu/sound]scsp.c ymf278b.c ymf278b.h
[src/mame]arcade.lst
[src/mame/audio]scramble.c
[src/mame/drivers]ddenlovr.c dec0.c fuukifg3.c paranoia.c scramble.c seta2.c system1.c system16.c taitoair.c tnzs.c wecleman.c
[src/mame/includes]scramble.h system1.h system16.h
[src/mame/machine]scramble.c
[src/mess/drivers]hh_tms1k.c sdk80.c tb303.c vk100.c
[src/mess/layout]tb303.lay
[src/tools]nltool.c

trunk/.travis.yml
r248380r248381
1616  - sudo add-apt-repository ppa:shahar-evron/qt-backports -y
1717  - sudo apt-get update -qq
1818  - sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libasound2-dev libqt4-dev libqt4-dev-bin
19notifications:
20  email:
21    - secure: "sK8JJcn1A0yLnbDJ/7vmJgESuXmP6D4QlvQvsYLp1xAx5eTVSJ5Z+GSXLBJ9CnoeJ5AlPVPX4rXdRV93UyxYlTh1O97x8VZZQtYBNPRjk/VCflsOOg7C+jcJKX/knMu/QG2MVEDE5G2b8mHSAgWljG/7Z2N0rYZlWppwklYafOkyW4uE0E7PU5XpmKim4ra6Y1eDSbap+XJiDwgUm9moDZrgAv7eom9NIWGNMRIozSRyR2IkYimlWE92FOy5PzLJtFGK02iumbYN+39mTux59v/h/m6HD6cD7Wf10Lco9+Fnmi9Bs+VvIReJIP9pDABRvJ3MkUV4I9BjUT9xk48lzxqjGtdfUwOMDOTABd4Pb/5cmNtyNUQIosy5oiplR6USBnqD7/gmJw+mfn3A+jdQHGne+akypwzUjSM6XrezjTiZLlDDG+QpA0kwAnxSXw8H2SpVyynMSn4nu0iZmOiOZMtFY0jKlt/W7OFC5wTuJFrky+bBGlVIv3KGOTJNJNgasXV4u0NXOjHyeBFpFYCIf0FZLfYyf7ITu94JxUzXGcVi5D0lBwvKY9HfJ4yJxciyfH6V7yU1+o23E/Meqe/tjt6dTW8DM5xIokrnusfzE5b0zw5GFyg54nbpazXpcPnrMdxhp+t2C7xKrxcZXhBECRYegj+Z86D9BJP/yum1YrQ="
trunk/3rdparty/mongoose/mongoose.c
r248380r248381
54795479  (void) ev;
54805480
54815481  //DBG(("%p [%s]", conn, msg));
5482  if (sscanf(msg, "%p %n", &func, &n) && func != NULL && conn != NULL) {
5482  if (sscanf(msg, "%p %n", (void **) &func, &n) && func != NULL && conn != NULL) {
54835483    conn->mg_conn.callback_param = (void *) (msg + n);
54845484    func(&conn->mg_conn, MG_POLL);
54855485  }
trunk/nl_examples/congo_bongo.c
r248380r248381
7878   /* The opamp actually has an FPF of about 500k. This doesn't work here and causes oscillations.
7979    * FPF here therefore about half the Solver clock.
8080    */
81   PARAM(XU16.B.model, "MB3614_SLOW")
82   PARAM(XU17.C.model, "MB3614_SLOW")
81   PARAM(XU16.B.MODEL, "MB3614_SLOW")
82   PARAM(XU17.C.MODEL, "MB3614_SLOW")
8383
8484   OPTIMIZE_FRONTIER(C51.1, RES_K(20), 50)
8585   OPTIMIZE_FRONTIER(R77.2, RES_K(20), 50)
trunk/src/emu/bus/msx_cart/moonsound.c
r248380r248381
55TODO:
66- Properly hook up correct SRAM sizes for different moonsound compatible
77  cartridges. (Original moonsound has 128KB SRAM)
8- Fix FM support (ymf262 support needs to be added to ymf278b).
98
109**********************************************************************************/
1110
r248380r248381
4241   MCFG_YMF278B_IRQ_HANDLER(WRITELINE(msx_cart_moonsound,irq_w))
4342   MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
4443   MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
44    MCFG_SOUND_ROUTE(2, "lspeaker", 0.40)
45    MCFG_SOUND_ROUTE(3, "rspeaker", 0.40)
46    MCFG_SOUND_ROUTE(4, "lspeaker", 0.40)
47    MCFG_SOUND_ROUTE(5, "rspeaker", 0.40)
4548MACHINE_CONFIG_END
4649
4750
trunk/src/emu/bus/msx_cart/moonsound.h
r248380r248381
3131
3232private:
3333   required_device<ymf278b_device> m_ymf278b;
34
3534};
3635
3736
trunk/src/emu/cpu/ucom4/ucom4.c
r248380r248381
1212  TODO:
1313  - what happens with uCOM-43 opcodes on an uCOM-44/45 MCU?
1414  - what's the data after the ROM data for? (eg. 2000-2047, official ROM size is 2000)
15  - is DPh internally 3-bit or 4-bit? (currently assume 4-bit, it could have effect
16    on specific uCOM-43 exchange opcodes)
17  - RAM access from 0x50-0x7f on data_96x4
18  - invalid port accesses via DPl
19  - documentation is conflicting if IRQ is level or edge triggered
1520
1621*/
1722
r248380r248381
116121   m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ucom4_cpu_device::simple_timer_cb), this));
117122
118123   // resolve callbacks
119   m_read_a.resolve_safe(0xf);
120   m_read_b.resolve_safe(0xf);
121   m_read_c.resolve_safe(0xf);
122   m_read_d.resolve_safe(0xf);
124   m_read_a.resolve_safe(0);
125   m_read_b.resolve_safe(0);
126   m_read_c.resolve_safe(0);
127   m_read_d.resolve_safe(0);
123128
124129   m_write_c.resolve_safe();
125130   m_write_d.resolve_safe();
trunk/src/emu/cpu/ucom4/ucom4.h
r248380r248381
216216   void ram_w(UINT8 data);
217217   void pop_stack();
218218   void push_stack();
219   UINT8 input_r(int index);
220   void output_w(int index, UINT8 data);
219   virtual UINT8 input_r(int index);
220   virtual void output_w(int index, UINT8 data);
221221
222222   bool check_op_43();
223223   TIMER_CALLBACK_MEMBER( simple_timer_cb );
r248380r248381
322322{
323323public:
324324   upd650_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
325
326protected:   
327   virtual UINT8 input_r(int index);
325328};
326329
327330
trunk/src/emu/cpu/ucom4/ucom4op.c
r248380r248381
4343   {
4444      case NEC_UCOM4_PORTA: inp = m_read_a(index, 0xff); break;
4545      case NEC_UCOM4_PORTB: inp = m_read_b(index, 0xff); break;
46      case NEC_UCOM4_PORTC: inp = m_read_c(index, 0xff); break;
47      case NEC_UCOM4_PORTD: inp = m_read_d(index, 0xff); break;
46      case NEC_UCOM4_PORTC: inp = m_read_c(index, 0xff) | m_port_out[index]; break;
47      case NEC_UCOM4_PORTD: inp = m_read_d(index, 0xff) | m_port_out[index]; break;
4848
4949      default:
5050         logerror("%s read from unknown port %c at $%03X\n", tag(), 'A' + index, m_prev_pc);
r248380r248381
5454   return inp & 0xf;
5555}
5656
57UINT8 upd650_cpu_device::input_r(int index)
58{
59   // bidirectional ports are 'push-pull', meaning it will output 0 when it's read
60   if ((index & 0xf) == NEC_UCOM4_PORTC || (index & 0xf) == NEC_UCOM4_PORTD)
61      output_w(index, 0);
62   
63   return ucom4_cpu_device::input_r(index);
64}
65
5766void ucom4_cpu_device::output_w(int index, UINT8 data)
5867{
5968   index &= 0xf;
trunk/src/emu/machine/smpc.c
r248380r248381
686686      case 0x0a:
687687      case 0x0b:
688688         popmessage ("SMPC: NETLINK %s, contact MAMEdev",(data & 1) ? "off" : "on");
689         break;
690      case 0x0d:
689         break;      case 0x0d:
691690         if(LOG_SMPC) printf ("SMPC: System Reset\n");
692691         smpc_system_reset();
693692         break;
r248380r248381
926925      case 2:
927926         res = th<<6;
928927         //  1 C B Right Left Down Up
928         //  WHP actually has a very specific code at 0x6015f30, doesn't like bits 0-1 active here ...
929929         res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>4)) & 0x30); // C & B
930         res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>12)) & 0xf);
930         res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>12)) & 0xc);
931931         break;
932932      case 1:
933933         res = th<<6;
r248380r248381
939939         //  0 Start A 0 0    Down Up
940940         res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>6)) & 0x30); // Start & A
941941         res|= (((machine().root_device().ioport(padnames[pad_n])->read()>>12)) & 0x3);
942         //  ... and actually wants bits 2 - 3 active here.
943         res|= 0xc;
942944         break;
943945   }
944
946   
945947   return res;
946948}
947949
r248380r248381
10251027      {
10261028         if(data & 0x40)
10271029         {
1028            if(LOG_PAD_CMD) printf("SMPC: BREAK request\n");
1030            if(LOG_PAD_CMD) printf("SMPC: BREAK request %02x\n",data);
10291031            m_smpc.SR &= 0x0f;
10301032            m_smpc.intback_stage = 0;
10311033         }
10321034         else if(data & 0x80)
10331035         {
1034            if(LOG_PAD_CMD) printf("SMPC: CONTINUE request\n");
1036            if(LOG_PAD_CMD) printf("SMPC: CONTINUE request %02x\n",data);
10351037            machine().scheduler().timer_set(attotime::from_usec(700), timer_expired_delegate(FUNC(saturn_state::intback_peripheral),this),0); /* TODO: is timing correct? */
10361038            m_smpc.OREG[31] = 0x10;
10371039            m_smpc.SF = 0x01; //TODO: set hand-shake flag?
trunk/src/emu/machine/stvcd.c
r248380r248381
862862               //printf("Partition %08x %04x\n",bufnum,cr4);
863863            }
864864
865            hirqreg |= (CMOK|DRDY);
865            printf("%04x\n",cr4);
866            if(cr4 == 0)
867               hirqreg |= (CMOK);
868            else
869               hirqreg |= (CMOK|DRDY);               
866870            status_type = 1;
867871         }
868872         break;
r248380r248381
19081912      cr1 = data;
19091913      cd_stat &= ~CD_STAT_PERI;
19101914      cmd_pending |= 1;
1915      sh1_timer->adjust(attotime::never);
19111916      break;
19121917   case 0x001c:
19131918   case 0x001e:
trunk/src/emu/netlist/analog/nld_bjt.c
r248380r248381
5555
5656NETLIB_START(Q)
5757{
58   register_param("model", m_model, "");
58   register_param("MODEL", m_model, "");
5959}
6060
6161NETLIB_RESET(Q)
trunk/src/emu/netlist/analog/nld_bjt.h
r248380r248381
1111#include "../nl_base.h"
1212#include "nld_twoterm.h"
1313
14// ----------------------------------------------------------------------------------------
14// -----------------------------------------------------------------------------
1515// Macros
16// ----------------------------------------------------------------------------------------
16// -----------------------------------------------------------------------------
1717
18#define QBJT_SW(_name, _model)                                           \
19      NET_REGISTER_DEV(QBJT_SW, _name)                             \
20      NETDEV_PARAMI(_name,  model,   _model)
18#define QBJT_SW(_name, _model)                                                 \
19      NET_REGISTER_DEV(QBJT_SW, _name)                                       \
20      NETDEV_PARAMI(_name,  MODEL,   _model)
2121
22#define QBJT_EB(_name, _model)                                           \
23      NET_REGISTER_DEV(QBJT_EB, _name)                                 \
24      NETDEV_PARAMI(_name,  model,   _model)
22#define QBJT_EB(_name, _model)                                                 \
23      NET_REGISTER_DEV(QBJT_EB, _name)                                       \
24      NETDEV_PARAMI(_name,  MODEL,   _model)
2525
2626
2727NETLIB_NAMESPACE_DEVICES_START()
2828
29// ----------------------------------------------------------------------------------------
29// -----------------------------------------------------------------------------
3030// nld_Q - Base classes
31// ----------------------------------------------------------------------------------------
31// -----------------------------------------------------------------------------
3232
3333// Have a common start for transistors
3434
r248380r248381
7373
7474
7575
76// ----------------------------------------------------------------------------------------
76// -----------------------------------------------------------------------------
7777// nld_QBJT_switch
78// ----------------------------------------------------------------------------------------
78// -----------------------------------------------------------------------------
7979
8080
8181/*
r248380r248381
126126private:
127127};
128128
129// ----------------------------------------------------------------------------------------
129// -----------------------------------------------------------------------------
130130// nld_QBJT_EB
131// ----------------------------------------------------------------------------------------
131// -----------------------------------------------------------------------------
132132
133133
134134class NETLIB_NAME(QBJT_EB) : public NETLIB_NAME(QBJT)
trunk/src/emu/netlist/analog/nld_opamps.c
r248380r248381
6464   register_output("VH", m_VH);
6565   register_output("VREF", m_VREF);
6666
67   register_param("model", m_model, "");
67   register_param("MODEL", m_model, "");
6868
6969   m_type = m_model.model_value("TYPE");
7070
trunk/src/emu/netlist/analog/nld_opamps.h
r248380r248381
2121
2222#define OPAMP(_name, _model)                                                   \
2323      NET_REGISTER_DEV(OPAMP, _name)                                         \
24      NETDEV_PARAMI(_name, model, _model)
24      NETDEV_PARAMI(_name, MODEL, _model)
2525
2626#define LM3900(_name)                                                          \
2727   SUBMODEL(opamp_lm3900, _name)
trunk/src/emu/netlist/analog/nld_twoterm.c
r248380r248381
264264{
265265   register_terminal("A", m_P);
266266   register_terminal("K", m_N);
267   register_param("model", m_model, "");
267   register_param("MODEL", m_model, "");
268268
269269   m_D.save("m_D", *this);
270270
trunk/src/emu/netlist/analog/nld_twoterm.h
r248380r248381
2424 *  +-----T-----+
2525 *       (l)
2626 *
27 *  This is a resistance in series to a voltage source and paralleled by a current source.
28 *  This is suitable to model voltage sources, current sources, resistors, capacitors,
29 *  inductances and diodes.
27 *  This is a resistance in series to a voltage source and paralleled by a
28 *  current source. This is suitable to model voltage sources, current sources,
29 *  resistors, capacitors, inductances and diodes.
3030 *
3131 */
3232
r248380r248381
3535
3636#include "../nl_base.h"
3737
38// ----------------------------------------------------------------------------------------
38// -----------------------------------------------------------------------------
3939// Macros
40// ----------------------------------------------------------------------------------------
40// -----------------------------------------------------------------------------
4141
4242#define RES(_name, _R)                                                         \
43      NET_REGISTER_DEV(RES, _name)                                             \
43      NET_REGISTER_DEV(RES, _name)                                           \
4444      NETDEV_PARAMI(_name, R, _R)
4545
4646#define POT(_name, _R)                                                         \
r248380r248381
5454
5555
5656#define CAP(_name, _C)                                                         \
57      NET_REGISTER_DEV(CAP, _name)                                             \
57      NET_REGISTER_DEV(CAP, _name)                                           \
5858      NETDEV_PARAMI(_name, C, _C)
5959
6060/* Generic Diode */
6161#define DIODE(_name,  _model)                                                  \
62      NET_REGISTER_DEV(DIODE, _name)                                             \
63      NETDEV_PARAMI(_name, model, _model)
62      NET_REGISTER_DEV(DIODE, _name)                                         \
63      NETDEV_PARAMI(_name, MODEL, _model)
6464
6565#define VS(_name, _V)                                                          \
6666      NET_REGISTER_DEV(VS, _name)                                            \
r248380r248381
7070      NET_REGISTER_DEV(CS, _name)                                            \
7171      NETDEV_PARAMI(_name, I, _I)
7272
73// ----------------------------------------------------------------------------------------
73// -----------------------------------------------------------------------------
7474// Generic macros
75// ----------------------------------------------------------------------------------------
75// -----------------------------------------------------------------------------
7676
7777
7878#ifdef RES_R
r248380r248381
9090#define IND_N(ind) ((double)(ind) * 1e-9)
9191#define IND_P(ind) ((double)(ind) * 1e-12)
9292
93// ----------------------------------------------------------------------------------------
93// -----------------------------------------------------------------------------
9494// Implementation
95// ----------------------------------------------------------------------------------------
95// -----------------------------------------------------------------------------
9696
9797NETLIB_NAMESPACE_DEVICES_START()
9898
99// ----------------------------------------------------------------------------------------
99// -----------------------------------------------------------------------------
100100// nld_twoterm
101// ----------------------------------------------------------------------------------------
101// -----------------------------------------------------------------------------
102102
103103class NETLIB_NAME(twoterm) : public device_t
104104{
r248380r248381
140140private:
141141};
142142
143// ----------------------------------------------------------------------------------------
143// -----------------------------------------------------------------------------
144144// nld_R
145// ----------------------------------------------------------------------------------------
145// -----------------------------------------------------------------------------
146146
147147class NETLIB_NAME(R_base) : public NETLIB_NAME(twoterm)
148148{
r248380r248381
164164   param_double_t m_R;
165165);
166166
167// ----------------------------------------------------------------------------------------
167// -----------------------------------------------------------------------------
168168// nld_POT
169// ----------------------------------------------------------------------------------------
169// -----------------------------------------------------------------------------
170170
171171NETLIB_DEVICE_WITH_PARAMS(POT,
172172   NETLIB_NAME(R_base) m_R1;
r248380r248381
187187);
188188
189189
190// ----------------------------------------------------------------------------------------
190// -----------------------------------------------------------------------------
191191// nld_C
192// ----------------------------------------------------------------------------------------
192// -----------------------------------------------------------------------------
193193
194194class NETLIB_NAME(C) : public NETLIB_NAME(twoterm)
195195{
r248380r248381
212212};
213213
214214
215// ----------------------------------------------------------------------------------------
215// -----------------------------------------------------------------------------
216216// A generic diode model to be used in other devices (Diode, BJT ...)
217// ----------------------------------------------------------------------------------------
217// -----------------------------------------------------------------------------
218218
219219class generic_diode
220220{
r248380r248381
285285   nl_double m_Vcrit;
286286};
287287
288// ----------------------------------------------------------------------------------------
288// -----------------------------------------------------------------------------
289289// nld_D
290// ----------------------------------------------------------------------------------------
290// -----------------------------------------------------------------------------
291291
292292class NETLIB_NAME(D) : public NETLIB_NAME(twoterm)
293293{
r248380r248381
306306   generic_diode m_D;
307307};
308308
309// ----------------------------------------------------------------------------------------
309// -----------------------------------------------------------------------------
310310// nld_VS - Voltage source
311311//
312312// netlist voltage source must have inner resistance
313// ----------------------------------------------------------------------------------------
313// -----------------------------------------------------------------------------
314314
315315class NETLIB_NAME(VS) : public NETLIB_NAME(twoterm)
316316{
r248380r248381
326326   param_double_t m_V;
327327};
328328
329// ----------------------------------------------------------------------------------------
329// -----------------------------------------------------------------------------
330330// nld_CS - Current source
331// ----------------------------------------------------------------------------------------
331// -----------------------------------------------------------------------------
332332
333333class NETLIB_NAME(CS) : public NETLIB_NAME(twoterm)
334334{
trunk/src/emu/netlist/devices/net_lib.c
r248380r248381
5959   ENTRY(POT,                  POT,                    "R")
6060   ENTRY(POT2,                 POT2,                   "R")
6161   ENTRY(C,                    CAP,                    "C")
62   ENTRY(D,                    DIODE,                  "model")
62   ENTRY(D,                    DIODE,                  "MODEL")
6363   ENTRY(VCVS,                 VCVS,                   "-")
6464   ENTRY(VCCS,                 VCCS,                   "-")
6565   ENTRY(CCCS,                 CCCS,                   "-")
6666   ENTRY(LVCCS,                LVCCS,                  "-")
6767   ENTRY(VS,                   VS,                     "V")
6868   ENTRY(CS,                   CS,                     "I")
69   ENTRY(OPAMP,                OPAMP,                  "model")
69   ENTRY(OPAMP,                OPAMP,                  "MODEL")
7070   ENTRY(dummy_input,          DUMMY_INPUT,            "-")
7171   ENTRY(frontier,             FRONTIER_DEV,           "+I,G,Q")   // not intended to be used directly
7272   ENTRY(function,             AFUNC,                   "N,FUNC")   // only for macro devices - NO FEEDBACK loops
73   ENTRY(QBJT_EB,              QBJT_EB,                "model")
74   ENTRY(QBJT_switch,          QBJT_SW,                "model")
73   ENTRY(QBJT_EB,              QBJT_EB,                "MODEL")
74   ENTRY(QBJT_switch,          QBJT_SW,                "MODEL")
7575   ENTRY(logic_input,          TTL_INPUT,              "IN")
7676   ENTRY(logic_input,          LOGIC_INPUT,            "IN,FAMILY")
7777   ENTRY(analog_input,         ANALOG_INPUT,           "IN")
trunk/src/emu/netlist/devices/nld_system.h
r248380r248381
294294      SUB,
295295      DIV,
296296      PUSH_CONST,
297      PUSH_INPUT,
297      PUSH_INPUT
298298   };
299299
300300   struct rpn_inst
trunk/src/emu/netlist/nl_factory.c
r248380r248381
3434}
3535
3636
37factory_list_t::factory_list_t()
37factory_list_t::factory_list_t(   setup_t &setup)
38: m_setup(setup)
3839{
3940}
4041
4142factory_list_t::~factory_list_t()
4243{
43   for (std::size_t i=0; i < m_list.size(); i++)
44   for (std::size_t i=0; i < size(); i++)
4445   {
45      base_factory_t *p = m_list[i];
46      base_factory_t *p = value_at(i);
4647      pfree(p);
4748   }
48   m_list.clear();
49   clear();
4950}
5051
5152#if 0
r248380r248381
6566}
6667#endif
6768
68device_t *factory_list_t::new_device_by_name(const pstring &name, setup_t &setup) const
69void factory_list_t::error(const pstring &s)
6970{
70   base_factory_t *f = factory_by_name(name, setup);
71   m_setup.netlist().error("%s", s.cstr());
72}
73
74device_t *factory_list_t::new_device_by_name(const pstring &name)
75{
76   base_factory_t *f = factory_by_name(name);
7177   return f->Create();
7278}
7379
74base_factory_t * factory_list_t::factory_by_name(const pstring &name, setup_t &setup) const
80base_factory_t * factory_list_t::factory_by_name(const pstring &name)
7581{
76   for (std::size_t i=0; i < m_list.size(); i++)
82   if (contains(name))
83      return (*this)[name];
84   else
7785   {
78      base_factory_t *p = m_list[i];
79      if (p->name() == name)
80      {
81         return p;
82      }
83      p++;
86      m_setup.netlist().error("Class %s not found!\n", name.cstr());
87      return NULL; // appease code analysis
8488   }
85   setup.netlist().error("Class %s not found!\n", name.cstr());
86   return NULL; // appease code analysis
8789}
8890
8991}
trunk/src/emu/netlist/nl_factory.h
r248380r248381
6262      }
6363   };
6464
65   class factory_list_t
65   class factory_list_t : public phashmap_t<pstring, base_factory_t *>
6666   {
6767   public:
68      typedef plist_t<base_factory_t *> list_t;
69
70      factory_list_t();
68      factory_list_t(setup_t &m_setup);
7169      ~factory_list_t();
7270
7371      template<class _C>
7472      ATTR_COLD void register_device(const pstring &name, const pstring &classname,
7573            const pstring &def_param)
7674      {
77         m_list.add(palloc(factory_t< _C >(name, classname, def_param)));
75         if (!add(name, palloc(factory_t< _C >(name, classname, def_param))))
76            error(pstring::sprintf("factory already contains %s", name.cstr()));
7877      }
7978
8079      ATTR_COLD void register_device(base_factory_t *factory)
8180      {
82         m_list.add(factory);
81         if (!add(factory->name(), factory))
82            error(pstring::sprintf("factory already contains %s", factory->name().cstr()));
8383      }
8484
8585      //ATTR_COLD device_t *new_device_by_classname(const pstring &classname) const;
86      ATTR_COLD device_t *new_device_by_name(const pstring &name, setup_t &setup) const;
87      ATTR_COLD base_factory_t * factory_by_name(const pstring &name, setup_t &setup) const;
86      ATTR_COLD device_t *new_device_by_name(const pstring &name);
87      ATTR_COLD base_factory_t * factory_by_name(const pstring &name);
8888
89      const list_t &list() { return m_list; }
90
9189   private:
92      list_t m_list;
90      void error(const pstring &s);
9391
92      setup_t &m_setup;
9493   };
9594
9695}
trunk/src/emu/netlist/nl_parser.c
r248380r248381
360360   }
361361   else
362362   {
363      base_factory_t *f = m_setup.factory().factory_by_name(dev_type, m_setup);
363      base_factory_t *f = m_setup.factory().factory_by_name(dev_type);
364364      device_t *dev;
365365      pstring_list_t termlist = f->term_param_list();
366366      pstring_list_t def_params = f->def_params();
trunk/src/emu/netlist/nl_setup.c
r248380r248381
5252   , m_proxy_cnt(0)
5353{
5454   netlist->set_setup(this);
55   m_factory = palloc(factory_list_t);
55   m_factory = palloc(factory_list_t(*this));
5656}
5757
5858void setup_t::init()
r248380r248381
129129   }
130130   else
131131   {
132      device_t *dev = factory().new_device_by_name(classname, *this);
132      device_t *dev = factory().new_device_by_name(classname);
133133      //device_t *dev = factory().new_device_by_classname(classname);
134134      if (dev == NULL)
135135         netlist().error("Class %s not found!\n", classname.cstr());
r248380r248381
235235            else
236236               term.init_object(dev, dev.name() + "." + name);
237237
238            if (!(m_terminals.add(&term, false)==true))
238            if (!m_terminals.add(term.name(), &term))
239239               netlist().error("Error adding %s %s to terminal list\n", objtype_as_astr(term).cstr(), term.name().cstr());
240240            NL_VERBOSE_OUT(("%s %s\n", objtype_as_astr(term).cstr(), name.cstr()));
241241         }
r248380r248381
412412core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, bool required)
413413{
414414   const pstring &tname = resolve_alias(terminal_in);
415   core_terminal_t *ret;
415   int ret;
416416
417   ret = m_terminals.find_by_name(tname);
417   ret = m_terminals.index_of(tname);
418418   /* look for default */
419   if (ret == NULL)
419   if (ret < 0)
420420   {
421421      /* look for ".Q" std output */
422      pstring s = tname + ".Q";
423      ret = m_terminals.find_by_name(s);
422      ret = m_terminals.index_of(tname + ".Q");
424423   }
425   if (ret == NULL && required)
424
425   core_terminal_t *term = (ret < 0 ? NULL : m_terminals.value_at(ret));
426
427   if (term == NULL && required)
426428      netlist().error("terminal %s(%s) not found!\n", terminal_in.cstr(), tname.cstr());
427   if (ret != NULL)
429   if (term != NULL)
428430      NL_VERBOSE_OUT(("Found input %s\n", tname.cstr()));
429   return ret;
431   return term;
430432}
431433
432434core_terminal_t *setup_t::find_terminal(const pstring &terminal_in, object_t::type_t atype, bool required)
433435{
434436   const pstring &tname = resolve_alias(terminal_in);
435   core_terminal_t *ret;
437   int ret;
436438
437   ret = m_terminals.find_by_name(tname);
439   ret = m_terminals.index_of(tname);
438440   /* look for default */
439   if (ret == NULL && atype == object_t::OUTPUT)
441   if (ret < 0 && atype == object_t::OUTPUT)
440442   {
441443      /* look for ".Q" std output */
442      pstring s = tname + ".Q";
443      ret = m_terminals.find_by_name(s);
444      ret = m_terminals.index_of(tname + ".Q");
444445   }
445   if (ret == NULL && required)
446   if (ret < 0 && required)
446447      netlist().error("terminal %s(%s) not found!\n", terminal_in.cstr(), tname.cstr());
447   if (ret != NULL && ret->type() != atype)
448
449   core_terminal_t *term = (ret < 0 ? NULL : m_terminals.value_at(ret));
450
451   if (term != NULL && term->type() != atype)
448452   {
449453      if (required)
450454         netlist().error("object %s(%s) found but wrong type\n", terminal_in.cstr(), tname.cstr());
451455      else
452         ret = NULL;
456         term = NULL;
453457   }
454   if (ret != NULL)
458   if (term != NULL)
455459      NL_VERBOSE_OUT(("Found input %s\n", tname.cstr()));
456   return ret;
460
461   return term;
457462}
458463
459464param_t *setup_t::find_param(const pstring &param_in, bool required)
r248380r248381
807812   netlist().log("looking for terminals not connected ...");
808813   for (std::size_t i = 0; i < m_terminals.size(); i++)
809814   {
810      if (!m_terminals[i]->has_net())
815      core_terminal_t *term = m_terminals.value_at(i);
816      if (!term->has_net())
811817         errstr += pstring::sprintf("Found terminal %s without a net\n",
812               m_terminals[i]->name().cstr());
813      else if (m_terminals[i]->net().num_cons() == 0)
818               term->name().cstr());
819      else if (term->net().num_cons() == 0)
814820         netlist().warning("Found terminal %s without connections",
815               m_terminals[i]->name().cstr());
821               term->name().cstr());
816822   }
817823   if (errstr != "")
818824      netlist().error("%s", errstr.cstr());
r248380r248381
861867      {
862868         NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr()));
863869         NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr()));
864         device_t *nc = factory().new_device_by_name("LOG", *this);
870         device_t *nc = factory().new_device_by_name("LOG");
865871         pstring name = "log_" + ll[i];
866872         register_dev(nc, name);
867873         register_link(name + ".I", ll[i]);
trunk/src/emu/netlist/nl_setup.h
r248380r248381
127127         const pstring &name() const { return e1; }
128128      };
129129
130      //typedef pnamedlist_t<link_t> tagmap_nstring_t;
131      typedef pnamedlist_t<core_terminal_t *> tagmap_terminal_t;
132
133130      setup_t(netlist_t *netlist);
134131      ~setup_t();
135132
r248380r248381
193190
194191      bool is_library_item(const pstring &name) const { return m_lib.contains(name); }
195192
196      /* not ideal, but needed for save_state */
197      tagmap_terminal_t  m_terminals;
198
199193      void print_stats() const;
200194
201195      /* static support functions */
r248380r248381
207201
208202   private:
209203
204      void connect_terminals(core_terminal_t &in, core_terminal_t &out);
205      void connect_input_output(core_terminal_t &in, core_terminal_t &out);
206      void connect_terminal_output(terminal_t &in, core_terminal_t &out);
207      void connect_terminal_input(terminal_t &term, core_terminal_t &inp);
208      bool connect_input_input(core_terminal_t &t1, core_terminal_t &t2);
209
210      // helpers
211      pstring objtype_as_astr(object_t &in) const;
212
213      const pstring resolve_alias(const pstring &name) const;
214      devices::nld_base_proxy *get_d_a_proxy(core_terminal_t &out);
215
210216      netlist_t *m_netlist;
211217
212218      phashmap_t<pstring, pstring> m_alias;
213219      phashmap_t<pstring, param_t *>  m_params;
214220      phashmap_t<pstring, pstring> m_params_temp;
221      phashmap_t<pstring, core_terminal_t *> m_terminals;
215222
216223      plist_t<link_t> m_links;
217224
r248380r248381
225232      source_t::list_t m_sources;
226233      plist_t<pstring> m_lib;
227234
228
229      void connect_terminals(core_terminal_t &in, core_terminal_t &out);
230      void connect_input_output(core_terminal_t &in, core_terminal_t &out);
231      void connect_terminal_output(terminal_t &in, core_terminal_t &out);
232      void connect_terminal_input(terminal_t &term, core_terminal_t &inp);
233      bool connect_input_input(core_terminal_t &t1, core_terminal_t &t2);
234
235      // helpers
236      pstring objtype_as_astr(object_t &in) const;
237
238      const pstring resolve_alias(const pstring &name) const;
239      devices::nld_base_proxy *get_d_a_proxy(core_terminal_t &out);
240
241235#if 0
242236      template <class T>
243237      void remove_start_with(T &hm, pstring &sw)
trunk/src/emu/netlist/plib/plists.h
r248380r248381
620620template <class C>
621621struct phash_functor
622622{
623   unsigned hash(const C &v) const { return (unsigned) v; }
623   phash_functor()
624   {}
625   phash_functor(const C &v)
626   {
627      m_hash = v;
628   }
629   friend unsigned operator%(const phash_functor &lhs, const unsigned &rhs) { return lhs.m_hash % rhs; }
630   bool operator==(const phash_functor &lhs) const { return (m_hash == lhs.m_hash); }
631private:
632   unsigned m_hash;
624633};
625634
626635template <>
627636struct phash_functor<pstring>
628637{
629#if 1
630#if 1
631   unsigned hash(const pstring &v) const
638   phash_functor()
639   {}
640   phash_functor(const pstring &v)
632641   {
642      /* modified djb2 */
633643      const char *string = v.cstr();
634      unsigned result = *string++;
635      for (UINT8 c = *string++; c != 0; c = *string++)
636         result = (result*33) ^ c;
637      return result;
644      unsigned result = 5381;
645      for (UINT8 c = *string; c != 0; c = *string++)
646         result = ((result << 5) + result ) ^ (result >> (32 - 5)) ^ c;
647         //result = (result*33) ^ c;
648      m_hash = result;
638649   }
639#else
650   friend unsigned operator%(const phash_functor<pstring> &lhs, const unsigned &rhs) { return lhs.m_hash % rhs; }
651   bool operator==(const phash_functor<pstring> &lhs) const { return (m_hash == lhs.m_hash); }
652private:
653   unsigned m_hash;
654};
655
656#if 0
657#if 0
640658   unsigned hash(const pstring &v) const
641659   {
642660      /* Fowler–Noll–Vo hash - FNV-1 */
r248380r248381
647665         // result = (result ^ c) * 16777619; FNV 1a
648666      return result;
649667   }
650#endif
651668#else
652669   unsigned hash(const pstring &v) const
653670   {
r248380r248381
667684       return result;
668685   }
669686#endif
670};
687#endif
671688
672689template <class K, class V, class H = phash_functor<K> >
673690class phashmap_t
674691{
675692public:
676   phashmap_t() : m_hash(17)
693   phashmap_t() : m_hash(37)
677694   {
678695      for (unsigned i=0; i<m_hash.size(); i++)
679696         m_hash[i] = -1;
r248380r248381
686703   struct element_t
687704   {
688705      element_t() { }
689      element_t(K key, unsigned hash, V value)
706      element_t(const K &key, const H &hash, const V &value)
690707      : m_key(key), m_hash(hash), m_value(value), m_next(-1)
691708      {}
692709      K m_key;
693      unsigned m_hash;
710      H m_hash;
694711      V m_value;
695712      int m_next;
696713   };
r248380r248381
736753       * and accept that outside we will not have a prime
737754       *
738755       */
739      if (m_values.size() > m_hash.size())
756      if (m_values.size() * 3 / 2 > m_hash.size())
740757      {
741758         unsigned n = std::sqrt( 2 * m_hash.size());
742759         n = n * n + n + 41;
743760         m_hash.resize(n);
744761         rebuild();
745762      }
746      const H h;
747      const unsigned hash=h.hash(key);
763      const H hash(key);
748764      const unsigned pos = hash % m_hash.size();
749765      if (m_hash[pos] == -1)
750766      {
r248380r248381
780796      return m_values[p].m_value;
781797   }
782798
783   const V& operator[](const K &key) const
784   {
785      int p = get_idx(key);
786      if (p == -1)
787      {
788         p = m_values.size();
789         add(key, V());
790      }
791      return m_values[p].m_value;
792   }
793
794799   V& value_at(const unsigned pos) { return m_values[pos].m_value; }
795800   const V& value_at(const unsigned pos) const { return m_values[pos].m_value; }
796801
r248380r248381
799804
800805   int get_idx(const K &key) const
801806   {
802      H h;
803      const unsigned hash=h.hash(key);
807      H hash(key);
804808      const unsigned pos = hash % m_hash.size();
805809
806810      for (int ep = m_hash[pos]; ep != -1; ep = m_values[ep].m_next)
trunk/src/emu/sound/scsp.c
r248380r248381
3030*/
3131
3232#include "emu.h"
33#include "sound/cdda.h"
3334#include "scsp.h"
3435
3536
r248380r248381
10101011         v= *((unsigned short *) (m_DSP.EFREG+(addr-0xec0)/2));
10111012      else
10121013      {
1013         /*
1014         TODO: Kyuutenkai reads from 0xee0/0xee2, it's an undocumented "DSP internal buffer" register ...
1014         /**!
1015         @todo Kyuutenkai reads from 0xee0/0xee2, it's tied with EXTS register(s) also used for CD-Rom Player equalizer.
1016         This port is actually an external parallel port, directly connected from the CD Block device, hence code is a bit of an hack.
1017         Kyuutenkai code snippet for reference:
10151018         004A3A: 207C 0010 0EE0             movea.l #$100ee0, A0
10161019         004A40: 43EA 0090                  lea     ($90,A2), A1 ;A2=0x700
10171020         004A44: 6100 0254                  bsr     $4c9a
r248380r248381
10441047             004CB0: 4CDF 0002                  movem.l (A7)+, D1
10451048             004CB4: 4E75                       rts
10461049         */
1047         logerror("SCSP: Reading from unmapped register %08x\n",addr);
1050         logerror("SCSP: Reading from EXTS register %08x\n",addr);
10481051         if(addr == 0xee0)
1049            v= m_DSP.TEMP[0] >> 16;
1052            v =   space.machine().device<cdda_device>("cdda")->get_channel_volume(0);
10501053         if(addr == 0xee2)
1051            v= m_DSP.TEMP[0] & 0xffff;
1054            v = space.machine().device<cdda_device>("cdda")->get_channel_volume(1);
10521055      }
10531056   }
10541057   return v;
trunk/src/emu/sound/ymf278b.c
r248380r248381
4343   TODO:
4444   - accurate timing of envelopes
4545   - LFO (vibrato, tremolo)
46   - integrate YMF262 (used by Fuuki games, not used by Psikyo and Metro games)
47   - able to hook up "Moonsound", supporting mixed ROM+RAM (for MSX driver in MESS)
48     (this should be possible now by using a custom address map?)
46   - integrate YMF262 mixing (used by Fuuki games, not used by Psikyo and Metro games)
4947*/
5048
5149#include "emu.h"
5250#include "ymf278b.h"
51#include "ymf262.h"
5352
5453#define VERBOSE 0
5554#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
r248380r248381
226225   INT32 *mixp;
227226   INT32 vl, vr;
228227
228   if (&stream == m_stream_ymf262)
229   {
230      ymf262_update_one(m_ymf262, outputs, samples);
231      return;
232   }
233
229234   memset(m_mix_buffer, 0, sizeof(m_mix_buffer[0])*samples*2);
230235
231236   for (i = 0; i < 24; i++)
r248380r248381
683688         timer_busy_start(0);
684689         m_port_AB = data;
685690         m_lastport = offset>>1 & 1;
691         ymf262_write(m_ymf262, offset, data);
686692         break;
687693
688694      case 1:
r248380r248381
691697         if (m_lastport) B_w(m_port_AB, data);
692698         else A_w(m_port_AB, data);
693699         m_last_fm_data = data;
700         ymf262_write(m_ymf262, offset, data);
694701         break;
695702
696703      case 4:
r248380r248381
830837   m_current_irq = 0;
831838   if (!m_irq_handler.isnull())
832839      m_irq_handler(0);
840
841   ymf262_reset_chip(m_ymf262);
833842}
834843
844void ymf278b_device::device_stop()
845{
846   ymf262_shutdown(m_ymf262);
847   m_ymf262 = NULL;
848}
849
835850void ymf278b_device::precompute_rate_tables()
836851{
837852   int i;
r248380r248381
928943//  device_start - device-specific startup
929944//-------------------------------------------------
930945
946static void ymf278b_ymf262_irq_handler(void *param,int irq)
947{
948}
949
950
951static void ymf278b_ymf262_timer_handler(void *param, int c, const attotime &period)
952{
953}
954
955static void ymf278b_ymf262_update_request(void *param, int interval)
956{
957   ymf278b_device *ymf278b = (ymf278b_device *) param;
958   ymf278b->ymf262_update_request();
959}
960
961
962void ymf278b_device::ymf262_update_request()
963{
964   m_stream_ymf262->update();
965}
966
967
931968void ymf278b_device::device_start()
932969{
933970   int i;
r248380r248381
9731010
9741011   // Register state for saving
9751012   register_save_state();
1013
1014   // YMF262 related
1015
1016   /* stream system initialize */
1017   int ymf262_clock = clock() / (19/8.0);
1018   m_ymf262 = ymf262_init(this, ymf262_clock, ymf262_clock / 288);
1019   assert_always(m_ymf262 != NULL, "Error creating YMF262 chip");
1020
1021   m_stream_ymf262 = machine().sound().stream_alloc(*this, 0, 4, ymf262_clock / 288);
1022
1023   /* YMF262 setup */
1024   ymf262_set_timer_handler (m_ymf262, ymf278b_ymf262_timer_handler, this);
1025   ymf262_set_irq_handler   (m_ymf262, ymf278b_ymf262_irq_handler, this);
1026   ymf262_set_update_handler(m_ymf262, ymf278b_ymf262_update_request, this);
9761027}
9771028
9781029
trunk/src/emu/sound/ymf278b.h
r248380r248381
2525   DECLARE_READ8_MEMBER( read );
2626   DECLARE_WRITE8_MEMBER( write );
2727
28   void ymf262_update_request();
29
2830protected:
2931   // device-level overrides
3032   virtual void device_config_complete();
3133   virtual void device_start();
3234   virtual void device_reset();
35   virtual void device_stop();
3336
3437   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
3538
r248380r248381
132135   const address_space_config m_space_config;
133136   devcb_write_line m_irq_handler;
134137   UINT8 m_last_fm_data;
138
139   // ymf262
140   void *m_ymf262;
141   sound_stream * m_stream_ymf262;
135142};
136143
137144extern const device_type YMF278B;
trunk/src/mame/arcade.lst
r248380r248381
46884688passshtb        // bootleg
46894689shinoblb        // (c) 1987 (but bootleg)
46904690shinobld        // (c) 1987 (but bootleg)
4691shinoblda      //
46914692tetrisbl        // (c) 1988 (but bootleg)
46924693beautyb         // (c) 1991 AMT
46934694iqpipe          // (c) 1991 AMT
r248380r248381
60206021midres          // (c) 1989 Data East Corporation (World)
60216022midresu         // (c) 1989 Data East USA (US)
60226023midresj         // (c) 1989 Data East Corporation (Japan)
6023midresb         // (c) 1989 Data East Corporation (Japan)
6024midresb         // bootleg
6025midresbj      // bootleg
60246026bouldash        // (c) 1990 Data East Corporation (World)
60256027bouldashj       // (c) 1990 Data East Corporation (Japan)
60266028// end of similar hardware
r248380r248381
64806482wecleman        // GX602 (c) 1986
64816483wecleman2       // GX602?(c) 1988
64826484hotchase        // GX763 (c) 1988
6485hotchasea
64836486chqflag         // GX717 (c) 1988
64846487chqflagj        // GX717 (c) 1988 (Japan)
64856488ultraman        // GX910 (c) 1991 Banpresto/Bandai
r248380r248381
97229725ddenlovj        // "112" (c) 1995 Dynax (Japan)
97239726ddenlovrk       // "113" (c) 1995 Dynax (Korea)
97249727ddenlovr        // "113" (c) 1996 Dynax (Hong Kong)
9728mjschuka        // "115" (c) 1995 Dynax
97259729mjchuuka        // "121" (c) 1998 Dynax
97269730ddenlovrb       // bootleg
97279731mjflove         // "500" 1996 Dynax
trunk/src/mame/audio/scramble.c
r248380r248381
162162}
163163
164164
165// Harem
165// Harem (same as scorpion)
166166
167WRITE8_MEMBER( scramble_state::harem_portA_w )
167READ8_MEMBER(scramble_state::harem_digitalker_intr_r)
168168{
169   // Speech?
169   return m_digitalker->digitalker_0_intr_r();
170170}
171WRITE8_MEMBER( scramble_state::harem_portB_w )
171
172WRITE8_MEMBER(scramble_state::harem_digitalker_control_w)
172173{
173   // Speech?
174   m_digitalker->digitalker_0_cs_w (data & 1 ? ASSERT_LINE : CLEAR_LINE);
175   m_digitalker->digitalker_0_cms_w(data & 2 ? ASSERT_LINE : CLEAR_LINE);
176   m_digitalker->digitalker_0_wr_w (data & 4 ? ASSERT_LINE : CLEAR_LINE);
174177}
175178
176179
trunk/src/mame/drivers/ddenlovr.c
r248380r248381
262694 Hf Hana Ginga           D8102048L1          Z80   YM2149 YM2413 M6295 NL-002 1108F0405  1427F0071 4L02?
272794 Super Hana Paradise     N8010178L1+N73RSUB  Z80          YM2413 M6295 NL-002 1108F0406  1427F0071 4L02F2637
282895 Mj Dai Chuuka Ken       D11107218L1         Z80   AY8910 YM2413 M6295 70C160F009
2995 Mj Super Dai Chuuka Ken D11510198L1         Z80   AY8910 YM2413 M6295
293095 Hf Hana Gokou           N83061581L1         Z80   AY8910 YM2413 M6295 NL-002 1108?      1427?     4L02?
303195 Hf Hana Gokou Bangaihen N10805078L1         Z80   AY8910 YM2413 M6295 NL-002 1108?      1427?     4L02?
313295 Nettoh Quiz Champion                        68000 AY8910 YM2413 M6295
r248380r248381
340341   DECLARE_READ8_MEMBER(hanakanz_rand_r);
341342   DECLARE_WRITE8_MEMBER(mjreach1_protection_w);
342343   DECLARE_READ8_MEMBER(mjreach1_protection_r);
344   DECLARE_WRITE8_MEMBER(mjschuka_protection_w);
345   DECLARE_READ8_MEMBER(mjschuka_protection_r);
343346   DECLARE_READ8_MEMBER(mjchuuka_keyb_r);
344347   DECLARE_WRITE8_MEMBER(mjchuuka_blitter_w);
345348   DECLARE_READ8_MEMBER(mjchuuka_gfxrom_0_r);
r248380r248381
30383041
30393042
30403043/***************************************************************************
3044     Mahjong Super Dai Chuuka Ken
3045***************************************************************************/
3046
3047// 255F: 13 34 7A 96 A8
3048// 2564: 13 34 7A 96 13
3049
3050WRITE8_MEMBER(ddenlovr_state::mjschuka_protection_w)
3051{
3052   m_prot_val = data;
3053}
3054
3055READ8_MEMBER(ddenlovr_state::mjschuka_protection_r)
3056{
3057   switch (m_prot_val)
3058   {
3059      case 0xa8:  return 0x13;
3060   }
3061   return m_prot_val;
3062}
3063
3064static ADDRESS_MAP_START( mjschuka_portmap, AS_IO, 8, ddenlovr_state )
3065   ADDRESS_MAP_GLOBAL_MASK(0xff)
3066   AM_RANGE(0x00, 0x0f) AM_DEVREADWRITE("rtc", msm6242_device, read, write)
3067   AM_RANGE(0x1c, 0x1c) AM_READNOP AM_WRITE(sryudens_rambank_w)    // ? ack on RTC int
3068   AM_RANGE(0x1e, 0x1e) AM_WRITE(mjflove_rombank_w)
3069
3070   AM_RANGE(0x20, 0x23) AM_WRITE(ddenlovr_palette_base_w)
3071   AM_RANGE(0x24, 0x27) AM_WRITE(ddenlovr_palette_mask_w)
3072   AM_RANGE(0x28, 0x2b) AM_WRITE(ddenlovr_transparency_pen_w)
3073   AM_RANGE(0x2c, 0x2f) AM_WRITE(ddenlovr_transparency_mask_w)
3074   AM_RANGE(0x34, 0x34) AM_WRITE(ddenlovr_bgcolor_w)
3075   AM_RANGE(0x35, 0x35) AM_WRITE(ddenlovr_priority_w)
3076   AM_RANGE(0x36, 0x36) AM_WRITE(ddenlovr_layer_enable_w)
3077   AM_RANGE(0x38, 0x38) AM_READNOP         // ? ack or watchdog
3078
3079   AM_RANGE(0x40, 0x41) AM_WRITE(mjmyster_blitter_w)
3080   AM_RANGE(0x43, 0x43) AM_READ(rongrong_gfxrom_r)
3081   AM_RANGE(0x50, 0x50) AM_WRITE(mjflove_okibank_w)
3082
3083   AM_RANGE(0x54, 0x54) AM_READWRITE(mjschuka_protection_r, mjschuka_protection_w)
3084   // 58 writes ? (0/1)
3085   AM_RANGE(0x5c, 0x5c) AM_READ(hanakanz_rand_r)
3086
3087   AM_RANGE(0x60, 0x60) AM_WRITE(sryudens_coincounter_w)
3088   AM_RANGE(0x61, 0x61) AM_WRITE(hanakanz_keyb_w)
3089   AM_RANGE(0x62, 0x62) AM_READ_PORT("SYSTEM")
3090   AM_RANGE(0x63, 0x64) AM_READ(sryudens_keyb_r)
3091
3092   AM_RANGE(0x68, 0x68) AM_READ_PORT("DSW1")
3093   AM_RANGE(0x69, 0x69) AM_READ_PORT("DSW2")
3094   AM_RANGE(0x6a, 0x6a) AM_READ_PORT("DSW3")
3095   AM_RANGE(0x6b, 0x6b) AM_READ_PORT("DSW4")
3096   AM_RANGE(0x6c, 0x6c) AM_READ_PORT("DSW5")     // DSW 1-4 high bits
3097   AM_RANGE(0x70, 0x71) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
3098   AM_RANGE(0x74, 0x74) AM_DEVREADWRITE("oki", okim6295_device, read, write)
3099   AM_RANGE(0x78, 0x79) AM_DEVWRITE("ym2413", ym2413_device, write)
3100ADDRESS_MAP_END
3101
3102
3103/***************************************************************************
30413104                        Mahjong The Mysterious World
30423105***************************************************************************/
30433106
r248380r248381
66916754INPUT_PORTS_END
66926755
66936756
6757static INPUT_PORTS_START( mjschuka )
6758
6759   PORT_START("SYSTEM")
6760   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE3 )   // medal out
6761   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
6762   PORT_SERVICE(0x04, IP_ACTIVE_LOW)
6763   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )   // analyzer
6764   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 )   // data clear
6765   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )  // note
6766   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1)
6767   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
6768
6769   PORT_START("KEY0")
6770   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(2)   // A
6771   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(2)   // E
6772   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(2)   // I
6773   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(2)   // M
6774   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(2) // Kan
6775   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // Start 2
6776
6777   PORT_START("KEY1")
6778   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(2)   // B
6779   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(2)   // F
6780   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(2)   // J
6781   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(2)   // N
6782   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(2)   // Reach
6783   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2) // BET
6784
6785   PORT_START("KEY2")
6786   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(2)   // C
6787   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(2)   // G
6788   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(2)   // K
6789   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(2) // Chi
6790   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(2) // Ron
6791   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6792
6793   PORT_START("KEY3")
6794   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(2)   // D
6795   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(2)   // H
6796   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(2)   // L
6797   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(2) // Pon
6798   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6799   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6800
6801   PORT_START("KEY4")
6802   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_PLAYER(2) // "l"
6803   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2)   // "t"
6804   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2)   // "w"
6805   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2)   // Flip Flop
6806   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG   ) PORT_PLAYER(2)   // "b"
6807   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2)   // "s"
6808
6809   PORT_START("KEY5")
6810   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )  // A
6811   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E )  // E
6812   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I )  // I
6813   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M )  // M
6814   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )    // Kan
6815   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) // Start 1
6816
6817   PORT_START("KEY6")
6818   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B )  // B
6819   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F )  // F
6820   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J )  // J
6821   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N )  // N
6822   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )  // Reach
6823   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET )    // BET
6824
6825   PORT_START("KEY7")
6826   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C )  // C
6827   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G )  // G
6828   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K )  // K
6829   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )    // Chi
6830   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON )    // Ron
6831   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6832
6833   PORT_START("KEY8")
6834   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D )  // D
6835   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H )  // H
6836   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L )  // L
6837   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON )    // Pon
6838   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6839   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )    // nothing
6840
6841   PORT_START("KEY9")
6842   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )    // "l"
6843   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )  // "t"
6844   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP )  // "w"
6845   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP )  // Flip Flop
6846   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG )    // "b"
6847   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL )  // "s"
6848
6849   PORT_START("DSW1")
6850   PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate (%)" )
6851   PORT_DIPSETTING(    0x00, "50" )
6852   PORT_DIPSETTING(    0x01, "53" )
6853   PORT_DIPSETTING(    0x02, "56" )
6854   PORT_DIPSETTING(    0x03, "59" )
6855   PORT_DIPSETTING(    0x04, "62" )
6856   PORT_DIPSETTING(    0x05, "65" )
6857   PORT_DIPSETTING(    0x06, "68" )
6858   PORT_DIPSETTING(    0x07, "71" )
6859   PORT_DIPSETTING(    0x08, "75" )
6860   PORT_DIPSETTING(    0x09, "78" )
6861   PORT_DIPSETTING(    0x0a, "81" )
6862   PORT_DIPSETTING(    0x0b, "84" )
6863   PORT_DIPSETTING(    0x0c, "87" )
6864   PORT_DIPSETTING(    0x0d, "90" )
6865   PORT_DIPSETTING(    0x0e, "93" )
6866   PORT_DIPSETTING(    0x0f, "96" )
6867   PORT_DIPNAME( 0x30, 0x30, "Odds Rate" )
6868   PORT_DIPSETTING(    0x20, "1 2 3 4 6 8 10 15" )
6869   PORT_DIPSETTING(    0x30, "1 2 4 8 12 16 24 32" )
6870   PORT_DIPSETTING(    0x00, "1 2 3 5 8 15 30 50" )
6871   PORT_DIPSETTING(    0x10, "1 2 3 5 10 25 50 100" )
6872   PORT_DIPNAME( 0xc0, 0xc0, "Max Bet" )
6873   PORT_DIPSETTING(    0xc0, "1" )
6874   PORT_DIPSETTING(    0x80, "5" )
6875   PORT_DIPSETTING(    0x40, "10" )
6876   PORT_DIPSETTING(    0x00, "20" )
6877
6878   PORT_START("DSW2")
6879   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
6880   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
6881   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
6882   PORT_DIPSETTING(    0x01, DEF_STR( 1C_5C ) )
6883   PORT_DIPSETTING(    0x00, "1 Coin/10 Credits" )
6884   PORT_DIPNAME( 0x0c, 0x0c, "Min Rate To Play" )
6885   PORT_DIPSETTING(    0x0c, "1" )
6886   PORT_DIPSETTING(    0x08, "2" )
6887   PORT_DIPSETTING(    0x04, "3" )
6888   PORT_DIPSETTING(    0x00, "5" )
6889   PORT_DIPNAME( 0x30, 0x30, "Payout" )
6890   PORT_DIPSETTING(    0x30, "300" )
6891   PORT_DIPSETTING(    0x20, "500" )
6892   PORT_DIPSETTING(    0x10, "700" )
6893   PORT_DIPSETTING(    0x00, "1000" )
6894   PORT_DIPNAME( 0x40, 0x40, "W-BET" )
6895   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6896   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6897   PORT_DIPNAME( 0x80, 0x80, "Last Chance" )
6898   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
6899   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6900
6901   PORT_START("DSW3")
6902   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
6903   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
6904   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6905   PORT_DIPNAME( 0x02, 0x00, "In Game Music" )
6906   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
6907   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6908   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
6909   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
6910   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6911   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
6912   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
6913   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6914   PORT_DIPNAME( 0x10, 0x00, "Girls" )
6915   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
6916   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6917   PORT_DIPNAME( 0x20, 0x00, "Girls Speech" )
6918   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
6919   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6920   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
6921   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6922   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6923   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
6924   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
6925   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6926
6927   PORT_START("DSW4")
6928   PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" )
6929   PORT_DIPSETTING(    0x07, "Cut" )
6930   PORT_DIPSETTING(    0x06, "1 T" )
6931   PORT_DIPSETTING(    0x05, "300" )
6932   PORT_DIPSETTING(    0x04, "500" )
6933   PORT_DIPSETTING(    0x03, "700" )
6934   PORT_DIPSETTING(    0x02, "1000" )
6935   PORT_DIPSETTING(    0x01, "1000?" )
6936   PORT_DIPSETTING(    0x00, "1000?" )
6937   PORT_DIPNAME( 0x08, 0x08, "YAKUMAN Times?" )
6938   PORT_DIPSETTING(    0x00, "1" )
6939   PORT_DIPSETTING(    0x08, "2" )
6940   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
6941   PORT_DIPSETTING(    0x00, "140" )
6942   PORT_DIPSETTING(    0x10, "160" )
6943   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
6944   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
6945   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6946   PORT_DIPNAME( 0x40, 0x40, "DonDen Key" )
6947   PORT_DIPSETTING(    0x40, "Start" )
6948   PORT_DIPSETTING(    0x00, "Flip Flop" )
6949   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
6950   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
6951   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6952
6953   PORT_START("DSW5")
6954   PORT_DIPNAME( 0x01, 0x01, "Credits Per Note" )
6955   PORT_DIPSETTING(    0x01, "5" )
6956   PORT_DIPSETTING(    0x00, "10" )
6957   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
6958   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
6959   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6960   PORT_DIPNAME( 0x0c, 0x0c, "Computer Strength?" )
6961   PORT_DIPSETTING(    0x0c, "Weak" )
6962   PORT_DIPSETTING(    0x08, DEF_STR( Normal ))
6963   PORT_DIPSETTING(    0x04, "Strong" )
6964   PORT_DIPSETTING(    0x00, "Very Strong" )
6965   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
6966   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
6967   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6968   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
6969   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
6970   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6971   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
6972   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6973   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6974   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
6975   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
6976   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6977
6978   PORT_START("BET")
6979   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
6980   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6981   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6982
6983   PORT_START("HOPPER")
6984   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
6985   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
6986   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6987
6988INPUT_PORTS_END
6989
6990
66946991static INPUT_PORTS_START( funkyfig )
66956992   PORT_START("IN0")   /* Keys (port 83 with port 80 = 20) */
66966993   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
r248380r248381
991110208
991210209
991310210/***************************************************************************
10211     Mahjong Super Dai Chuuka Ken
10212***************************************************************************/
10213
10214static MACHINE_CONFIG_START( mjschuka, ddenlovr_state )
10215
10216   /* basic machine hardware */
10217   MCFG_CPU_ADD("maincpu",Z80,XTAL_16MHz/2)
10218   MCFG_CPU_PROGRAM_MAP(mjmyster_map)
10219   MCFG_CPU_IO_MAP(mjschuka_portmap)
10220   MCFG_CPU_VBLANK_INT_DRIVER("screen", ddenlovr_state, hginga_irq)
10221
10222   MCFG_MACHINE_START_OVERRIDE(ddenlovr_state,hanakanz)
10223   MCFG_MACHINE_RESET_OVERRIDE(ddenlovr_state,ddenlovr)
10224
10225   /* video hardware */
10226   MCFG_SCREEN_ADD("screen", RASTER)
10227   MCFG_SCREEN_REFRESH_RATE(60)
10228   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
10229   MCFG_SCREEN_SIZE(336, 256+22)
10230   MCFG_SCREEN_VISIBLE_AREA(0, 336-1, 5, 256-11-1)
10231   MCFG_SCREEN_UPDATE_DRIVER(ddenlovr_state, screen_update_ddenlovr)
10232   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_ALWAYS_UPDATE)
10233   MCFG_SCREEN_PALETTE("palette")
10234
10235   MCFG_PALETTE_ADD("palette", 0x200)
10236
10237   MCFG_VIDEO_START_OVERRIDE(ddenlovr_state,mjflove)  // blitter commands in the roms are shuffled around
10238
10239   /* sound hardware */
10240   MCFG_SPEAKER_STANDARD_MONO("mono")
10241
10242   MCFG_SOUND_ADD("ym2413", YM2413, XTAL_28_63636MHz / 8)
10243   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
10244
10245   MCFG_SOUND_ADD("aysnd", AY8910, XTAL_28_63636MHz / 8)
10246   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
10247
10248   MCFG_OKIM6295_ADD("oki", XTAL_28_63636MHz / 28, OKIM6295_PIN7_HIGH)
10249   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
10250
10251   /* devices */
10252   MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz)
10253   MCFG_MSM6242_OUT_INT_HANDLER(WRITELINE(ddenlovr_state, hginga_rtc_irq))
10254MACHINE_CONFIG_END
10255
10256
10257/***************************************************************************
991410258                        Mahjong The Mysterious World
991510259***************************************************************************/
991610260
r248380r248381
1149611840
1149711841/***************************************************************************
1149811842
11843Mahjong Super Dai Chuuka Ken (Dynax, 1995)
11844
11845PCB Layout
11846----------
11847
11848Dynax Inc. Nagoya Japan D11510198L1
11849sticker: D11509208L1
11850|----------------------------------------|
11851| MB3714A   TA7535(x2) M6295 1151 3V_BATT|
11852|   VOL  YMZ284-D   YM2413   1152        |
11853| DSW5                 16MHz      PAL    |
11854|                      CPU  62256        |
11855| ULN2003                   1153 62421RTC|
11856|       PLCC44/68                        |
11857|                                        |
11858|            28.63636MHz         M514262 |
11859|                                M514262 |
11860|                   QFP208       M514262 |
11861|            CXK5863             M514262 |
11862|                            PAL         |
11863|DSW1 DSW2                       1154    |
11864|DSW3 DSW4                       1155    |
11865|----------------------------------------|
11866Notes:
11867      PLCC44 and QFP208 unknown (surface scratched), location has alternative pads for PLCC68
11868      CPU    - surface scratched. clock input 16MHz, looks like TMPZ8400
11869      M6295  - clock 1.0227MHz (28.63636/28). Pin 7 HIGH
11870      YMZ284 - clock 3.579545MHz (28.63636/8)
11871      YM2413 - clock 3.579545MHz (28.63636/8)
11872      DSW1-4 - 10-position DIP switches
11873      DSW5   - 4-position DIP switch
11874      TA7535 - = LM358
11875      VSync  - 60.8529Hz
11876      HSync  - 15.2790kHz
11877      EPROM 1152 is M27C1001, others are MX27C4000
11878
11879***************************************************************************/
11880
11881ROM_START( mjschuka )
11882   ROM_REGION( 0x90000+16*0x1000, "maincpu", 0 )   /* Z80 Code */
11883   ROM_LOAD( "1153.5c", 0x00000, 0x80000, CRC(67cf10db) SHA1(a813f44578eb2d67b4346ffd9c15e44e7fa91ca7) )
11884   ROM_RELOAD(          0x10000, 0x80000 )
11885
11886   ROM_REGION( 0x100000, "blitter", 0 )    /* blitter data */
11887   ROM_LOAD( "1154.11b", 0x00000, 0x80000, CRC(b8d04189) SHA1(1acac851c21e1055843e1398087d7afd8b9201b8) )
11888   ROM_LOAD( "1155.12b", 0x80000, 0x80000, CRC(4208edcf) SHA1(444472107dac548956d2749cd892214efb6ff2f6) )
11889
11890   ROM_REGION( 0x200000, "oki", 0 ) /* Samples */
11891   ROM_LOAD( "1151.1c", 0x000000, 0x80000, CRC(c92065a9) SHA1(65c38c3a31d3f4b8240a16fdcdf376acdf5c17d2) )
11892   ROM_RELOAD(          0x100000, 0x20000 )
11893   ROM_LOAD( "1152.2c", 0x080000, 0x20000, CRC(f9244532) SHA1(b502d8d3569c4b4d655af3baf05a3c79831a84ff) )
11894   ROM_RELOAD(          0x180000, 0x20000 )
11895   ROM_RELOAD(          0x0a0000, 0x20000 )
11896   ROM_RELOAD(          0x1a0000, 0x20000 )
11897   ROM_RELOAD(          0x0c0000, 0x20000 )
11898   ROM_RELOAD(          0x1c0000, 0x20000 )
11899ROM_END
11900
11901
11902/***************************************************************************
11903
1149911904The First Funky Fighter
1150011905Nakanihon, 1994
1150111906
r248380r248381
1261613021GAME( 1994, hparadis,  0,        hparadis,  hparadis, driver_device, 0,        ROT0, "Dynax",                                       "Super Hana Paradise (Japan)",                                     GAME_NO_COCKTAIL  )
1261713022GAME( 1995, hgokou,    0,        hgokou,    hgokou,   driver_device, 0,        ROT0, "Dynax (Alba license)",                        "Hanafuda Hana Gokou (Japan)",                                     GAME_NO_COCKTAIL  )
1261813023GAME( 1995, hgokbang,  hgokou,   hgokbang,  hgokou,   driver_device, 0,        ROT0, "Dynax",                                       "Hanafuda Hana Gokou Bangaihen (Japan)",                           GAME_NO_COCKTAIL  )
12619GAME( 1995, mjdchuka,  0,        mjchuuka,  mjchuuka, driver_device, 0,        ROT0, "Dynax",                                       "Mahjong The Dai Chuuka Ken (China, v. D111)",                     GAME_NO_COCKTAIL  )
13024GAME( 1995, mjdchuka,  0,        mjchuuka,  mjchuuka, driver_device, 0,        ROT0, "Dynax",                                       "Mahjong The Dai Chuuka Ken (China, D111)",                        GAME_NO_COCKTAIL  )
13025GAME( 1995, mjschuka,  0,        mjschuka,  mjschuka, driver_device, 0,        ROT0, "Dynax",                                       "Mahjong Super Dai Chuuka Ken (Japan, D115)",                      GAME_NO_COCKTAIL  )
1262013026GAME( 1995, nettoqc,   0,        nettoqc,   nettoqc,  driver_device, 0,        ROT0, "Nakanihon",                                   "Nettoh Quiz Champion (Japan)",                                    GAME_NO_COCKTAIL  | GAME_IMPERFECT_COLORS )
1262113027GAME( 1995, ultrchmp,  nettoqc,  ultrchmp,  ultrchmp, driver_device, 0,        ROT0, "Nakanihon",                                   "Se Gye Hweng Dan Ultra Champion (Korea)",                         GAME_NO_COCKTAIL  | GAME_IMPERFECT_COLORS )
1262213028GAME( 1995, ultrchmph, nettoqc,  ultrchmp,  ultrchmp, driver_device, 0,        ROT0, "Nakanihon",                                   "Cheng Ba Shi Jie - Chao Shi Kong Guan Jun (Taiwan)",              GAME_NO_COCKTAIL  | GAME_IMPERFECT_COLORS )
r248380r248381
1263613042GAME( 1997, hkagerou,  0,        hkagerou,  hkagerou, driver_device, 0,        ROT0, "Nakanihon / Dynax",                           "Hana Kagerou [BET] (Japan)",                                      GAME_NO_COCKTAIL  )
1263713043GAME( 1998, mjchuuka,  0,        mjchuuka,  mjchuuka, driver_device, 0,        ROT0, "Dynax",                                       "Mahjong Chuukanejyo (China)",                                     GAME_NO_COCKTAIL  )
1263813044GAME( 1998, mjreach1,  0,        mjreach1,  mjreach1, driver_device, 0,        ROT0, "Nihon System",                                "Mahjong Reach Ippatsu (Japan)",                                   GAME_NO_COCKTAIL  )
12639GAME( 1999, jongtei,   0,        jongtei,   jongtei,  driver_device, 0,        ROT0, "Dynax",                                       "Mahjong Jong-Tei (Japan, ver. NM532-01)",                         GAME_NO_COCKTAIL  )
13045GAME( 1999, jongtei,   0,        jongtei,   jongtei,  driver_device, 0,        ROT0, "Dynax",                                       "Mahjong Jong-Tei (Japan, NM532-01)",                              GAME_NO_COCKTAIL  )
1264013046GAME( 2002, daimyojn,  0,        daimyojn,  daimyojn, driver_device, 0,        ROT0, "Dynax / Techno-Top / Techno-Planning",        "Mahjong Daimyojin (Japan, T017-PB-00)",                           GAME_NO_COCKTAIL  )
12641GAME( 2004, momotaro,  0,        daimyojn,  daimyojn, ddenlovr_state,   momotaro, ROT0, "Techno-Top",                               "Mahjong Momotarou (Japan)",                                       GAME_NO_COCKTAIL  | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
13047GAME( 2004, momotaro,  0,        daimyojn,  daimyojn, ddenlovr_state,momotaro, ROT0, "Techno-Top",                                  "Mahjong Momotarou (Japan)",                                       GAME_NO_COCKTAIL  | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
trunk/src/mame/drivers/dec0.c
r248380r248381
29412941ROM_END
29422942
29432943
2944ROM_START( midresbj )
2945   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
2946   ROM_LOAD16_BYTE( "14",         0x00000, 0x10000, CRC(6b3bc886) SHA1(998ef6ae89565148bcb8909f21acbec378ed5f4f) )
2947   ROM_LOAD16_BYTE( "11",         0x00001, 0x10000, CRC(9b6faab3) SHA1(b60e41972f52df910bfa09accd5fde7d858b55bf) )
2948   ROM_LOAD16_BYTE( "13",         0x20000, 0x10000, CRC(d1bb2cd6) SHA1(6d4afd8dd8c4c3e90de199358da27108286637e2) )
2949   ROM_LOAD16_BYTE( "10",         0x20001, 0x10000, CRC(42ccdd0d) SHA1(ef17cc984a8d57e9c52877f4e9b78e9976f99033) )
2950   ROM_LOAD16_BYTE( "12",         0x40000, 0x10000, CRC(258b10b2) SHA1(f0849801ab2c72bc6e929b230d0c6d41823f18ae) )
2951   ROM_LOAD16_BYTE( "9",          0x40001, 0x10000, CRC(dd6985d5) SHA1(bd58a1da2c5152464d7660f5b931d6257cb87c4e) )
2952
2953   ROM_REGION( 0x10000, "audiocpu", 0 )    /* 6502 sound */
2954   ROM_LOAD( "15",         0x0000, 0x10000, CRC(99d47166) SHA1(a9a1adfe47be8dd3e4d6f8c783447e09be1747b2) )
2955
2956   ROM_REGION( 0x10000, "cpu2", ROMREGION_ERASE00 )    /* 68705 MCU */
2957   //ROM_LOAD( "68705r3.bin",              0x00000, 0x1000, CRC(ad5b1c13) SHA1(3616dc5969323a54e3e171d169f76250ae4e711a) ) // unpopulated socket
2958
2959   ROM_REGION( 0x20000, "gfx1", 0 ) /* chars */
2960   ROM_LOAD( "23",             0x08000, 0x08000, CRC(d75aba06) SHA1(cb3b969db3dd8e0c5c3729482f7461cde3a961f3) )
2961   ROM_CONTINUE(                   0x00000, 0x08000 )  /* the two halves are swapped */
2962   ROM_LOAD( "24",             0x18000, 0x08000, CRC(8f5bbb79) SHA1(cb10f68787606111ba5e9967bf0b0cd21269a902) )
2963   ROM_CONTINUE(                   0x10000, 0x08000 )
2964
2965   ROM_REGION( 0x80000, "gfx2", 0 ) /* tiles */
2966   ROM_LOAD( "19",             0x00000, 0x20000, CRC(fd9ba1bd) SHA1(a105a4335eeed19662c89ab0f90485f1029cf03f) )
2967   ROM_LOAD( "18",             0x20000, 0x20000, CRC(a936c03c) SHA1(293e69874ce9b2dfb1d605c9f988fa736b12bbcf) )
2968   ROM_LOAD( "20",             0x40000, 0x20000, CRC(4d8e3cf1) SHA1(db804a608f6ba9ce4cedfec2581bcbb00de3f2ba) )
2969   ROM_LOAD( "17",             0x60000, 0x20000, CRC(b7241ab9) SHA1(3e83f9285ff4c476f1287bf73b514eace482dccc) )
2970
2971   ROM_REGION( 0x40000, "gfx3", 0 ) /* tiles */
2972   ROM_LOAD( "22",             0x10000, 0x10000, CRC(35a54bb4) SHA1(1869eb77a060e9df42b761b02e7fa5ecb7c414d1) )
2973   ROM_CONTINUE(0x00000,0x10000)
2974   ROM_LOAD( "21",             0x30000, 0x10000, CRC(4b9227b3) SHA1(7059f2d07fffa0468a45a42b87bf561da5e9c5a4) )
2975   ROM_CONTINUE(0x20000,0x10000)
2976
2977   ROM_REGION( 0x80000, "gfx4", 0 ) /* sprites */
2978   ROM_LOAD( "4",             0x00000, 0x10000, CRC(3f499acb) SHA1(1a22cfeed0497ddc2d571114d9f246b3ae18ede9) )
2979   ROM_LOAD( "8",             0x10000, 0x10000, CRC(5e7a6800) SHA1(8dd5c9005b6804a30627644053f14e4477fe0074) )
2980   ROM_LOAD( "2",             0x20000, 0x10000, CRC(897ba6e4) SHA1(70fd9cba3922751cb317770d6effdc2fb94c1324) )
2981   ROM_LOAD( "6",             0x30000, 0x10000, CRC(9fefb810) SHA1(863a81540261e78de5c612dea807ba29b12054d4) )
2982   ROM_LOAD( "3",             0x40000, 0x10000, CRC(ebafe720) SHA1(b9f76d2f1b59f1d028e6156b831c5c8ada033641) )
2983   ROM_LOAD( "7",             0x50000, 0x10000, CRC(bb8cf641) SHA1(a22e47a15d38d4f33e5a2c90f3a90a16a4231d2c) ) // slight changes, check (equivalent to 3.bin in above)
2984   ROM_LOAD( "1",             0x60000, 0x10000, CRC(fd0bd8d3) SHA1(d6b19869ddc2a8ed4f38ba9d613b71853f2d13c0) )
2985   ROM_LOAD( "5",             0x70000, 0x10000, CRC(fc46d5ed) SHA1(20ddf3f67f0dfb222ad8d3fd464b892ec9c9e4f5) )
2986
2987   ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
2988   ROM_LOAD( "16",            0x00000, 0x10000, CRC(ccf24b52) SHA1(39b2663c548b30684197284cb8e7a6ca803330c9))
2989ROM_END
2990
29442991ROM_START( bouldash )
29452992   ROM_REGION( 0x60000, "maincpu", 0 ) /* 68000 code */
29462993   ROM_LOAD16_BYTE( "fw-15-2.17l",   0x00000, 0x10000, CRC(ca19a967) SHA1(b9dc2b1323f19b6239e550ed020943bf13de8db0) )
r248380r248381
30823129GAME( 1988, drgninjab,  baddudes, baddudes, drgninja, dec0_state, baddudes, ROT0,   "bootleg", "Dragonninja (bootleg)", GAME_SUPPORTS_SAVE )
30833130
30843131// this is a common bootleg board
3085GAME( 1989, midresb,    midres,   midresb,  midresb, dec0_state,  midresb,  ROT0,   "bootleg", "Midnight Resistance (bootleg with 68705)", GAME_SUPPORTS_SAVE ) // need to hook up 68705?
3132GAME( 1989, midresb,    midres,   midresb,  midresb, dec0_state,  midresb,  ROT0,   "bootleg", "Midnight Resistance (bootleg with 68705)", GAME_SUPPORTS_SAVE ) // need to hook up 68705? (probably unused)
3133GAME( 1989, midresbj,   midres,   midresb,  midresb, dec0_state,  midresb,  ROT0,   "bootleg", "Midnight Resistance (Joystick bootleg)", GAME_SUPPORTS_SAVE )
30863134GAME( 1989, ffantasybl, hippodrm, ffantasybl, ffantasybl, dec0_state, ffantasybl,   ROT0,   "bootleg", "Fighting Fantasy (bootleg with 68705)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // 68705 not dumped, might be the same as midresb
30873135/* A Bad Dudes bootleg with 68705 like the midres and ffantasy ones exists, but is not dumped */
30883136
trunk/src/mame/drivers/fuukifg3.c
r248380r248381
3838- PCM channels of music in asurabus is sometimes off-tune, check Chen-Mao's stage for example
3939  note: srom.u7 (z80 prg) is a good dump
4040
41- YMF278B and YMF262 are hooked up in an awkward way (real chip has YMF262 integrated)
42
4341Asura Blade
4442Fuuki Co. Ltd., 1998
4543
r248380r248381
162160#include "cpu/z80/z80.h"
163161#include "cpu/m68000/m68000.h"
164162#include "sound/ymf278b.h"
165#include "sound/262intf.h"
166163#include "includes/fuukifg3.h"
167164
168165
r248380r248381
258255WRITE8_MEMBER(fuuki32_state::snd_ymf278b_w)
259256{
260257   machine().device<ymf278b_device>("ymf1")->write(space, offset, data);
261
262   // also write to ymf262
263   if (offset < 4)
264      machine().device<ymf262_device>("ymf2")->write(space, offset, data);
265258}
266259
267260static ADDRESS_MAP_START( fuuki32_sound_map, AS_PROGRAM, 8, fuuki32_state )
r248380r248381
584577   MCFG_YMF278B_IRQ_HANDLER(INPUTLINE("soundcpu", 0))
585578   MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
586579   MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
587
588   MCFG_SOUND_ADD("ymf2", YMF262, YMF278B_STD_CLOCK / (19/8.0))
589   MCFG_SOUND_ROUTE(0, "lspeaker", 0.40)
590   MCFG_SOUND_ROUTE(1, "rspeaker", 0.40)
591580   MCFG_SOUND_ROUTE(2, "lspeaker", 0.40)
592581   MCFG_SOUND_ROUTE(3, "rspeaker", 0.40)
582   MCFG_SOUND_ROUTE(4, "lspeaker", 0.40)
583   MCFG_SOUND_ROUTE(5, "rspeaker", 0.40)
593584
594585MACHINE_CONFIG_END
595586
trunk/src/mame/drivers/paranoia.c
r248380r248381
5151   paranoia_state(const machine_config &mconfig, device_type type, const char *tag)
5252      : pce_common_state(mconfig, type, tag) { }
5353
54   DECLARE_WRITE8_MEMBER(paranoia_8085_d000_w);
55   DECLARE_READ8_MEMBER(paranoia_z80_io_01_r);
56   DECLARE_READ8_MEMBER(paranoia_z80_io_02_r);
57   DECLARE_WRITE8_MEMBER(paranoia_z80_io_17_w);
58   DECLARE_WRITE8_MEMBER(paranoia_z80_io_37_w);
59   DECLARE_WRITE8_MEMBER(paranoia_i8155_a_w);
60   DECLARE_WRITE8_MEMBER(paranoia_i8155_b_w);
61   DECLARE_WRITE8_MEMBER(paranoia_i8155_c_w);
62   DECLARE_WRITE_LINE_MEMBER(paranoia_i8155_timer_out);
54   DECLARE_WRITE8_MEMBER(i8085_d000_w);
55   DECLARE_READ8_MEMBER(z80_io_01_r);
56   DECLARE_READ8_MEMBER(z80_io_02_r);
57   DECLARE_WRITE8_MEMBER(z80_io_17_w);
58   DECLARE_WRITE8_MEMBER(z80_io_37_w);
59   DECLARE_WRITE8_MEMBER(i8155_a_w);
60   DECLARE_WRITE8_MEMBER(i8155_b_w);
61   DECLARE_WRITE8_MEMBER(i8155_c_w);
62   DECLARE_WRITE_LINE_MEMBER(i8155_timer_out);
6363};
6464
6565
r248380r248381
9090   AM_RANGE( 0x00, 0x03) AM_DEVREADWRITE( "huc6270", huc6270_device, read, write )
9191ADDRESS_MAP_END
9292
93WRITE8_MEMBER(paranoia_state::paranoia_8085_d000_w)
93WRITE8_MEMBER(paranoia_state::i8085_d000_w)
9494{
9595   //logerror( "D000 (8085) write %02x\n", data );
9696}
r248380r248381
9999   AM_RANGE( 0x0000, 0x7fff) AM_ROM
100100   AM_RANGE( 0x8000, 0x80ff) AM_DEVREADWRITE("i8155", i8155_device, memory_r, memory_w)
101101   AM_RANGE( 0x8100, 0x8107) AM_DEVREADWRITE("i8155", i8155_device, io_r, io_w)
102   AM_RANGE( 0xd000, 0xd000) AM_WRITE(paranoia_8085_d000_w )
102   AM_RANGE( 0xd000, 0xd000) AM_WRITE(i8085_d000_w )
103103   AM_RANGE( 0xe000, 0xe1ff) AM_RAM
104104ADDRESS_MAP_END
105105
r248380r248381
112112   AM_RANGE( 0x7000, 0x73ff) AM_RAM
113113ADDRESS_MAP_END
114114
115READ8_MEMBER(paranoia_state::paranoia_z80_io_01_r)
115READ8_MEMBER(paranoia_state::z80_io_01_r)
116116{
117117   return 0;
118118}
119119
120READ8_MEMBER(paranoia_state::paranoia_z80_io_02_r)
120READ8_MEMBER(paranoia_state::z80_io_02_r)
121121{
122122   return 0;
123123}
124124
125WRITE8_MEMBER(paranoia_state::paranoia_z80_io_17_w)
125WRITE8_MEMBER(paranoia_state::z80_io_17_w)
126126{
127127}
128128
129WRITE8_MEMBER(paranoia_state::paranoia_z80_io_37_w)
129WRITE8_MEMBER(paranoia_state::z80_io_37_w)
130130{
131131}
132132
133133static ADDRESS_MAP_START(paranoia_z80_io_map, AS_IO, 8, paranoia_state )
134134   ADDRESS_MAP_GLOBAL_MASK(0xff)
135   AM_RANGE( 0x01, 0x01 ) AM_READ(paranoia_z80_io_01_r )
136   AM_RANGE( 0x02, 0x02 ) AM_READ(paranoia_z80_io_02_r )
137   AM_RANGE( 0x17, 0x17 ) AM_WRITE(paranoia_z80_io_17_w )
138   AM_RANGE( 0x37, 0x37 ) AM_WRITE(paranoia_z80_io_37_w )
135   AM_RANGE( 0x01, 0x01 ) AM_READ(z80_io_01_r )
136   AM_RANGE( 0x02, 0x02 ) AM_READ(z80_io_02_r )
137   AM_RANGE( 0x17, 0x17 ) AM_WRITE(z80_io_17_w )
138   AM_RANGE( 0x37, 0x37 ) AM_WRITE(z80_io_37_w )
139139ADDRESS_MAP_END
140140
141WRITE8_MEMBER(paranoia_state::paranoia_i8155_a_w)
141WRITE8_MEMBER(paranoia_state::i8155_a_w)
142142{
143143   //logerror("i8155 Port A: %02X\n", data);
144144}
145145
146WRITE8_MEMBER(paranoia_state::paranoia_i8155_b_w)
146WRITE8_MEMBER(paranoia_state::i8155_b_w)
147147{
148148   //logerror("i8155 Port B: %02X\n", data);
149149}
150150
151WRITE8_MEMBER(paranoia_state::paranoia_i8155_c_w)
151WRITE8_MEMBER(paranoia_state::i8155_c_w)
152152{
153153   //logerror("i8155 Port C: %02X\n", data);
154154}
155155
156WRITE_LINE_MEMBER(paranoia_state::paranoia_i8155_timer_out)
156WRITE_LINE_MEMBER(paranoia_state::i8155_timer_out)
157157{
158158   //m_subcpu->set_input_line(I8085_RST55_LINE, state ? CLEAR_LINE : ASSERT_LINE );
159159   //logerror("Timer out %d\n", state);
r248380r248381
175175   MCFG_CPU_IO_MAP(paranoia_z80_io_map)
176176
177177   MCFG_DEVICE_ADD("i8155", I8155, 1000000 /*?*/)
178   MCFG_I8155_OUT_PORTA_CB(WRITE8(paranoia_state, paranoia_i8155_a_w))
179   MCFG_I8155_OUT_PORTB_CB(WRITE8(paranoia_state, paranoia_i8155_b_w))
180   MCFG_I8155_OUT_PORTC_CB(WRITE8(paranoia_state, paranoia_i8155_c_w))
181   MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(paranoia_state, paranoia_i8155_timer_out))
178   MCFG_I8155_OUT_PORTA_CB(WRITE8(paranoia_state, i8155_a_w))
179   MCFG_I8155_OUT_PORTB_CB(WRITE8(paranoia_state, i8155_b_w))
180   MCFG_I8155_OUT_PORTC_CB(WRITE8(paranoia_state, i8155_c_w))
181   MCFG_I8155_OUT_TIMEROUT_CB(WRITELINE(paranoia_state, i8155_timer_out))
182182
183183   /* video hardware */
184184   MCFG_SCREEN_ADD("screen", RASTER)
r248380r248381
217217   ROM_LOAD( "4.352", 0x18000, 0x8000, CRC(11297fed) SHA1(17a294e65ba1c4806307602dee4c7c627ad1fcfd) )
218218ROM_END
219219
220GAME( 1990, paranoia, 0, paranoia, paranoia, pce_common_state, pce_common, ROT0, "Naxat Soft", "Paranoia", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
220GAME( 1990, paranoia, 0, paranoia, paranoia, pce_common_state, pce_common, ROT0, "Naxat Soft", "Paranoia", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/scramble.c
r248380r248381
412412
413413static ADDRESS_MAP_START( harem_sound_map, AS_PROGRAM, 8, scramble_state )
414414   AM_RANGE(0x0000, 0x2fff) AM_ROM
415   AM_RANGE(0x6000, 0x6000) AM_READNOP
415   AM_RANGE(0x6000, 0x6000) AM_READ(harem_digitalker_intr_r)
416416   AM_RANGE(0x8000, 0x83ff) AM_RAM
417417   AM_RANGE(0xa000, 0xafff) AM_WRITE(scramble_filter_w)
418418ADDRESS_MAP_END
r248380r248381
420420static ADDRESS_MAP_START( harem_sound_io_map, AS_IO, 8, scramble_state )
421421   ADDRESS_MAP_GLOBAL_MASK(0xff)
422422
423   // ports->speech?:
423   // ports->speech:
424424   AM_RANGE(0x04, 0x04) AM_DEVWRITE("8910.3", ay8910_device, address_w)
425425   AM_RANGE(0x08, 0x08) AM_DEVREADWRITE("8910.3", ay8910_device, data_r, data_w)
426426   // same as scramble:
r248380r248381
16881688
16891689   MCFG_VIDEO_START_OVERRIDE(scramble_state,harem)
16901690
1691   /* sound hardware */
1691   /* extra AY8910 with I/O ports */
16921692   MCFG_SOUND_ADD("8910.3", AY8910, 14318000/8)
16931693   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
1694   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(scramble_state, harem_portA_w))   // Port A write
1695   MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(scramble_state, harem_portB_w))   // Port B write
1694   MCFG_AY8910_PORT_A_WRITE_CB(DEVWRITE8("digitalker", digitalker_device, digitalker_data_w))
1695   MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(scramble_state, harem_digitalker_control_w))
1696
1697   MCFG_DIGITALKER_ADD("digitalker", 4000000)
1698   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.16)
16961699MACHINE_CONFIG_END
16971700
16981701/***************************************************************************
r248380r248381
22182221   ROM_LOAD( "harem_sound1.ic12", 0x0000, 0x2000, CRC(b54799dd) SHA1(b6aeb010257cba48a52afd33b4f8031c7d99550c) )
22192222   ROM_LOAD( "harem_sound2.ic13", 0x2000, 0x1000, CRC(2d5573a4) SHA1(1fdcd99d89e078509634742b2116a35bb199fe4b) )
22202223
2221   ROM_REGION( 0x2000, "unknown", 0 ) // DigiTalker ROM (same exact sound PCB as Scorpion (galdrv.c))
2224   ROM_REGION( 0x2000, "digitalker", 0 ) // DigiTalker ROM (same exact sound PCB as Scorpion (galaxian.c))
22222225   ROM_LOAD( "harem_h1+h2.ic25",  0x0000, 0x2000, CRC(279f923a) SHA1(166b1b625997766f0de7cc18af52c42268022fcb) )
22232226
22242227   ROM_REGION( 0x4000, "gfx1", 0 )
r248380r248381
22682271
22692272GAME( 1981, turpins,  turtles,  turpins,  turpins,  driver_device,  0,            ROT90, "bootleg",             "Turpin (bootleg on Scramble hardware)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // haven't hooked up the sound CPU yet
22702273
2271GAME( 1983, harem,    0,        harem,    harem,    scramble_state, harem,        ROT90, "I.G.R.",              "Harem",                          GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND ) // colors, missing speech?
2274GAME( 1983, harem,    0,        harem,    harem,    scramble_state, harem,        ROT90, "I.G.R.",              "Harem",                          GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/seta2.c
r248380r248381
21232123   MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB)
21242124
21252125   // sound hardware
2126   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
2126   MCFG_SPEAKER_STANDARD_MONO("mono")
21272127
21282128   MCFG_SOUND_ADD("x1snd", X1_010, XTAL_50MHz/3)   // clock?
2129   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
2130   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
2129   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
21312130MACHINE_CONFIG_END
21322131
21332132
trunk/src/mame/drivers/system1.c
r248380r248381
4747thetogyu    3x16k 1x8k  6x8k  2x16k  no  pio  6073
4848
4949spatter     3x16k 1x8k  6x8k  4x16k  no  pio  6394    6306
50spattera    3x16k 1x8k  6x8k  4x16k  no  pio  6599    6306
5051ssanchan    3x16k 1x8k  6x8k  4x16k  no  pio  6312
5152
5253pitfall2    3x16k 1x8k  6x8k  2x16k  no  pio  6458(a) 6454
r248380r248381
121122
122123*******************************************************************************
123124
125Spatter (315-5099)
126Sega 1984
127
128This game runs on Sega System 1 hardware.
129
130834-5583-12 SPATTER (sticker)
131834-5542 daughter board with 4 eproms (EPR6306, EPR6307, EPR6308, EPR6309)
132834-5540 daughter board with logic ICs
133315-5099 custom Z80 CPU w/security
134
135*******************************************************************************
136
124137Chop Lifter
125138Sega 1985
126139
r248380r248381
28082821
28092822ROM_START( spattera )
28102823   ROM_REGION( 0x10000, "maincpu", 0 )
2811   ROM_LOAD( "epr-6597.116",   0x0000, 0x4000, BAD_DUMP CRC(be80384d) SHA1(9e1f5807492b98c3f36a5b80466dcb2a1f1fead8) ) /* encrypted */ // consistent read, but fails ingame ROM check on PCB
2824   ROM_LOAD( "epr-6597.116",   0x0000, 0x4000, CRC(fb928b9d) SHA1(0a9bede7a147009b9ebb8a0b73681359da665982) ) /* encrypted */
28122825   ROM_LOAD( "epr-6598.109",   0x4000, 0x4000, CRC(5dff037a) SHA1(8e6f6b75a89609ab0498d317c11e6d653343ffbe) ) /* encrypted */
28132826   ROM_LOAD( "epr-6599.96",    0x8000, 0x4000, CRC(7ba9de5b) SHA1(f18542c95e8241433ed995c213924ad1ce03cd5b) )
28142827
r248380r248381
49584971   sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
49594972}
49604973
4974DRIVER_INIT_MEMBER(system1_state,spattera)
4975{
4976   static const UINT8 convtable[32][4] =
4977   {
4978      /*       opcode                   data                     address      */
4979      /*  A    B    C    D         A    B    C    D                           */
4980      { 0xa0,0xa8,0x20,0x28 }, { 0x80,0xa0,0x00,0x20 },   /* ...0...0...0...0 */
4981      { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 },   /* ...0...0...0...1 */
4982      { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 },   /* ...0...0...1...0 */
4983      { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 },   /* ...0...0...1...1 */
4984      { 0xa0,0xa8,0x20,0x28 }, { 0x20,0x28,0x00,0x08 },   /* ...0...1...0...0 */
4985      { 0x28,0xa8,0x20,0xa0 }, { 0x20,0x28,0x00,0x08 },   /* ...0...1...0...1 */
4986      { 0xa0,0xa8,0x20,0x28 }, { 0x08,0x28,0x00,0x20 },   /* ...0...1...1...0 */
4987      { 0x88,0x08,0xa8,0x28 }, { 0x88,0x08,0xa8,0x28 },   /* ...0...1...1...1 */
4988      { 0x28,0xa8,0x20,0xa0 }, { 0xa0,0xa8,0x20,0x28 },   /* ...1...0...0...0 */
4989      { 0x88,0x08,0xa8,0x28 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...0...0...1 */
4990      { 0x28,0xa8,0x20,0xa0 }, { 0x08,0x28,0x00,0x20 },   /* ...1...0...1...0 */
4991      { 0x28,0xa8,0x20,0xa0 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...0...1...1 */
4992      { 0x20,0x28,0x00,0x08 }, { 0x20,0x28,0x00,0x08 },   /* ...1...1...0...0 */
4993      { 0x88,0x08,0xa8,0x28 }, { 0x20,0x28,0x00,0x08 },   /* ...1...1...0...1 */
4994      { 0x08,0x28,0x00,0x20 }, { 0x80,0xa0,0x00,0x20 },   /* ...1...1...1...0 */
4995      { 0x08,0x28,0x00,0x20 }, { 0x88,0x08,0xa8,0x28 }    /* ...1...1...1...1 */
4996   };
4997
4998   DRIVER_INIT_CALL(bank00);
4999   sega_decode(m_maincpu_region->base(), m_decrypted_opcodes, 0x8000, convtable);
5000}
5001
49615002DRIVER_INIT_MEMBER(system1_state,pitfall2)
49625003{
49635004   static const UINT8 convtable[32][4] =
r248380r248381
56155656GAME( 1984, flickys2,   flicky,   sys1pio,   flickys2,  system1_state, bank00,   ROT0,   "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE )
56165657GAME( 1984, thetogyu,   bullfgt,  sys1piox,  bullfgt,   system1_state, bullfgtj, ROT0,   "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE )
56175658GAME( 1984, spatter,    0,        sys1piosx, spatter,   system1_state, spatter,  ROT0,   "Sega", "Spatter (set 1)", GAME_SUPPORTS_SAVE )
5618GAME( 1984, spattera,   spatter,  sys1piosx, spatter,   system1_state, spatter, ROT0,   "Sega", "Spatter (315-5099)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
5659GAME( 1984, spattera,   spatter,  sys1piosx, spatter,   system1_state, spattera, ROT0,   "Sega", "Spatter (315-5099)", GAME_SUPPORTS_SAVE )
56195660GAME( 1984, ssanchan,   spatter,  sys1piosx, spatter,   system1_state, spatter,  ROT0,   "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE )
56205661GAME( 1985, pitfall2,   0,        sys1piox,  pitfall2,  system1_state, pitfall2, ROT0,   "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE )
56215662GAME( 1985, pitfall2a,  pitfall2, sys1piox,  pitfall2,  system1_state, pitfall2, ROT0,   "Sega", "Pitfall II (315-5093, Flicky Conversion)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/system16.c
r248380r248381
9797#include "sound/2612intf.h"
9898#include "sound/rf5c68.h"
9999#include "video/segaic16.h"
100#include "sound/2203intf.h"
100101
101102#define SHADOW_COLORS_MULTIPLIER 3
102103
r248380r248381
118119   }
119120}
120121
122WRITE16_MEMBER(segas1x_bootleg_state::sound_command_irq_w)
123{
124   if (ACCESSING_BITS_0_7)
125   {
126      soundlatch_byte_w(space, 0, data & 0xff);
127      m_soundcpu->set_input_line(0, HOLD_LINE);
128   }
129}
121130
131
122132static ADDRESS_MAP_START( shinobib_map, AS_PROGRAM, 16, segas1x_bootleg_state )
123133   AM_RANGE(0x000000, 0x03ffff) AM_ROM
124134   AM_RANGE(0x400000, 0x40ffff) AM_RAM // tilemap ram on the original, used as a buffer on the bootlegs
r248380r248381
127137   AM_RANGE(0x412000, 0x412fff) AM_RAM AM_SHARE("bg1_tileram")
128138   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
129139   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
130   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w)
140//   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_irq_w)
141   AM_RANGE(0xC42006, 0xC42007) AM_WRITE(sound_command_irq_w)
142   
143   AM_RANGE(0xC44000, 0xC44001) AM_READNOP
131144   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
132145   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
133146   AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
r248380r248381
146159
147160/***************************************************************************/
148161
149WRITE16_MEMBER(segas1x_bootleg_state::sound_command_w)
150{
151   if (ACCESSING_BITS_0_7)
152   {
153      soundlatch_byte_w(space, 0, data & 0xff);
154      m_soundcpu->set_input_line(0, HOLD_LINE);
155   }
156}
157
158162WRITE16_MEMBER(segas1x_bootleg_state::sys16_coinctrl_w)
159163{
160164   if (ACCESSING_BITS_0_7)
r248380r248381
187191   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
188192   AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1")
189193   AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2")
190   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
194   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
191195   AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w)
192196   AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w)
193197   AM_RANGE(0xc46004, 0xc46005) AM_WRITE(s16a_bootleg_fgscrolly_w)
r248380r248381
265269   AM_RANGE(0xc41006, 0xc41007) AM_READ(passht4b_io3_r)
266270   AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2")
267271   AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1")
268   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
272   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
269273   AM_RANGE(0xc43000, 0xc43001) AM_READ_PORT("P1")     // test mode only
270274   AM_RANGE(0xc43002, 0xc43003) AM_READ_PORT("P2")
271275   AM_RANGE(0xc43004, 0xc43005) AM_READ_PORT("P3")
r248380r248381
313317   AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2")
314318   AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2")
315319   AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1")
316   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
320   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
317321   AM_RANGE(0xC44000, 0xC44001) AM_WRITENOP
318322   AM_RANGE(0xc46000, 0xc46001) AM_WRITE(s16a_bootleg_bgscrolly_w)
319323   AM_RANGE(0xc46002, 0xc46003) AM_WRITE(s16a_bootleg_bgscrollx_w)
r248380r248381
424428
425429/*******************************************************************************/
426430
431static ADDRESS_MAP_START(shinobi_datsu_sound_map, AS_PROGRAM, 8, segas1x_bootleg_state )
432   AM_RANGE(0x0000, 0x7fff) AM_ROM
433
434   AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE("ym1", ym2203_device, read, write)
435   AM_RANGE(0xe400, 0xe401) AM_DEVREADWRITE("ym2", ym2203_device, read, write)
436   AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r)
437
438   AM_RANGE(0xf800, 0xffff) AM_RAM
439ADDRESS_MAP_END
440
441static ADDRESS_MAP_START( shinobi_datsu_sound_io, AS_IO, 8, segas1x_bootleg_state )
442   ADDRESS_MAP_GLOBAL_MASK(0xff)
443ADDRESS_MAP_END
444
445
446
447/*******************************************************************************/
448
427449static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, segas1x_bootleg_state )
428450   AM_RANGE(0x0000, 0x7fff) AM_ROM
429451   AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r)
r248380r248381
504526   AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE")
505527   AM_RANGE(0x902002, 0x902003) AM_READ_PORT("DSW1")
506528   AM_RANGE(0x902000, 0x902001) AM_READ_PORT("DSW2")
507   AM_RANGE(0xff0006, 0xff0007) AM_WRITE(sound_command_w)
529   AM_RANGE(0xff0006, 0xff0007) AM_WRITE(sound_command_irq_w)
508530   AM_RANGE(0xff0020, 0xff003f) AM_WRITENOP // config regs
509531ADDRESS_MAP_END
510532#endif
r248380r248381
691713   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
692714   AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1")
693715   AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2")
694   AM_RANGE(0x900006, 0x900007) AM_WRITE(sound_command_w)
716   AM_RANGE(0x900006, 0x900007) AM_WRITE(sound_command_irq_w)
695717   AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w)
696718   AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1")
697719   AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2")
r248380r248381
705727   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
706728   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
707729   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
708   AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_w)
730   AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_irq_w)
709731   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
710732   AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2")
711733   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
r248380r248381
825847   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE(sys16_textram_w) AM_SHARE("textram")
826848   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_SHARE("sprites")
827849
828   AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w)
850   AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_irq_w)
829851   AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE")
830852   AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1")
831853   AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2")
r248380r248381
879901   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
880902   AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1")
881903   AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2")
882   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
904   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
883905   AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP
884906   AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram
885907ADDRESS_MAP_END
r248380r248381
906928   AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
907929   AM_RANGE(0xc42000, 0xc42001) AM_READ_PORT("DSW2")
908930   AM_RANGE(0xc42002, 0xc42003) AM_READ_PORT("DSW1")
909   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
931   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
910932   AM_RANGE(0xc43034, 0xc43035) AM_WRITENOP
911933   AM_RANGE(0xc80000, 0xc80001) AM_NOP
912934   AM_RANGE(0xffc000, 0xffffff) AM_RAM // work ram
r248380r248381
943965   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
944966   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
945967   AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2")
946   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_w)
968   AM_RANGE(0xc42006, 0xc42007) AM_WRITE(sound_command_irq_w)
947969
948970   AM_RANGE(0xc40000, 0xc40001) AM_WRITENOP
949971   AM_RANGE(0xc80000, 0xc80001) AM_WRITENOP // vblank irq ack
r248380r248381
963985   AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w)
964986   AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2")
965987   AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1")
966   AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w)
988   AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_irq_w)
967989   AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE")
968990   AM_RANGE(0x601002, 0x601003) AM_READ_PORT("P1")
969991   AM_RANGE(0x601004, 0x601005) AM_READ_PORT("P2")
r248380r248381
10831105
10841106***************************************************************************/
10851107
1086WRITE16_MEMBER(segas1x_bootleg_state::sound_command_irq_w)
1087{
1088   if (ACCESSING_BITS_0_7)
1089   {
1090      soundlatch_byte_w(space, 0, data & 0xff);
1091      m_soundcpu->set_input_line(0, HOLD_LINE);
1092   }
1093}
10941108
10951109static ADDRESS_MAP_START( shdancbl_map, AS_PROGRAM, 16, segas1x_bootleg_state )
10961110   AM_RANGE(0x000000, 0x07ffff) AM_ROM
r248380r248381
20162030 *************************************/
20172031
20182032/* System 16A/B Bootlegs */
2019static MACHINE_CONFIG_START( system16, segas1x_bootleg_state )
2033static MACHINE_CONFIG_START( system16_base, segas1x_bootleg_state )
20202034
20212035   /* basic machine hardware */
20222036   MCFG_CPU_ADD("maincpu", M68000, 10000000)
20232037   MCFG_CPU_VBLANK_INT_DRIVER("screen", segas1x_bootleg_state,  sys16_interrupt)
20242038
2025   MCFG_CPU_ADD("soundcpu", Z80, 4000000)
2026   MCFG_CPU_PROGRAM_MAP(sound_map)
2027   MCFG_CPU_IO_MAP(sound_io_map)
2028
20292039   /* video hardware */
20302040   MCFG_SCREEN_ADD("screen", RASTER)
20312041   MCFG_SCREEN_REFRESH_RATE(60)
r248380r248381
20392049   MCFG_PALETTE_ADD("palette", 2048*SHADOW_COLORS_MULTIPLIER)
20402050
20412051   MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state,system16)
2052MACHINE_CONFIG_END
20422053
2054static MACHINE_CONFIG_DERIVED( system16, system16_base )
2055
2056   MCFG_CPU_ADD("soundcpu", Z80, 4000000)
2057   MCFG_CPU_PROGRAM_MAP(sound_map)
2058   MCFG_CPU_IO_MAP(sound_io_map)
2059
20432060   /* sound hardware */
20442061   MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
20452062
r248380r248381
20482065   MCFG_SOUND_ROUTE(1, "rspeaker", 0.32)
20492066MACHINE_CONFIG_END
20502067
2051
20522068WRITE_LINE_MEMBER(segas1x_bootleg_state::sound_cause_nmi)
20532069{
20542070   /* upd7759 callback */
r248380r248381
20942110   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80)
20952111MACHINE_CONFIG_END
20962112
2113static MACHINE_CONFIG_DERIVED( shinobi_datsu, system16_base )
20972114
2098static MACHINE_CONFIG_DERIVED( shinobib, system16 )
2099
21002115   /* basic machine hardware */
21012116   MCFG_CPU_MODIFY("maincpu")
21022117   MCFG_CPU_PROGRAM_MAP(shinobib_map)
r248380r248381
21072122   MCFG_VIDEO_START_OVERRIDE(segas1x_bootleg_state, s16a_bootleg_shinobi )
21082123   MCFG_SCREEN_MODIFY("screen")
21092124   MCFG_SCREEN_UPDATE_DRIVER(segas1x_bootleg_state, screen_update_s16a_bootleg)
2125
2126   MCFG_CPU_ADD("soundcpu", Z80, 4000000)
2127   MCFG_CPU_PERIODIC_INT_DRIVER(segas1x_bootleg_state, nmi_line_pulse,  3000) // or from the YM2203?
2128   MCFG_CPU_PROGRAM_MAP(shinobi_datsu_sound_map)
2129   MCFG_CPU_IO_MAP(shinobi_datsu_sound_io)
2130
2131   /* sound hardware */
2132   MCFG_SPEAKER_STANDARD_MONO("mono")
2133
2134   // 2x YM2203C, one at U57, one at U56
2135   MCFG_SOUND_ADD("ym1", YM2203, 4000000)
2136//   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
2137   MCFG_SOUND_ROUTE(0, "mono", 0.50)
2138   MCFG_SOUND_ROUTE(1, "mono", 0.50)
2139   MCFG_SOUND_ROUTE(2, "mono", 0.50)
2140   MCFG_SOUND_ROUTE(3, "mono", 0.80)
2141
2142   MCFG_SOUND_ADD("ym2", YM2203, 4000000)
2143   MCFG_SOUND_ROUTE(0, "mono", 0.50)
2144//   MCFG_YM2203_IRQ_HANDLER(WRITELINE(segas1x_bootleg_state, datsu_irq_handler))
2145   MCFG_SOUND_ROUTE(1, "mono", 0.50)
2146   MCFG_SOUND_ROUTE(2, "mono", 0.50)
2147   MCFG_SOUND_ROUTE(3, "mono", 0.80)
2148
21102149MACHINE_CONFIG_END
21112150
2151
21122152static MACHINE_CONFIG_DERIVED( passshtb, system16_7759 )
21132153
21142154   /* basic machine hardware */
r248380r248381
24312471   ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) )
24322472ROM_END
24332473
2474ROM_START( shinoblda )
2475   ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */
2476   ROM_LOAD16_BYTE( "12.bin", 0x000001, 0x10000, CRC(68c91fd5) SHA1(54dc1d26711c73b30cbb5387dde27ba21cc102f4) ) // sldh
2477   ROM_LOAD16_BYTE( "14.bin", 0x000000, 0x10000, CRC(9e887c80) SHA1(798a3dc499ef14b362bc37ff91b247e367f42ab9) ) // sldh
2478   ROM_LOAD16_BYTE( "13.bin", 0x020001, 0x10000, CRC(c4334bcd) SHA1(ea1dd23ca6fbf632d8e10bbb9ced6515a69bd14a) )
2479   ROM_LOAD16_BYTE( "15.bin", 0x020000, 0x10000, CRC(b70a6ec1) SHA1(79db41c36d6a053bcdc355b46b19ae938a7755a9) )
2480
2481   ROM_REGION( 0x30000, "gfx1", ROMREGION_INVERT ) /* tiles */
2482   ROM_LOAD( "9.bin",  0x00000, 0x10000, CRC(565e11c6) SHA1(e063400b3d0470b932d75da0be9cd4b446189dea) )
2483   ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) )
2484   ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) )
2485
2486   ROM_REGION16_BE( 0x080000, "sprites", ROMREGION_ERASEFF ) /* sprites */
2487   ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
2488   ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
2489   ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
2490   ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
2491   ROM_LOAD16_BYTE( "6.bin", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
2492   ROM_LOAD16_BYTE( "4.bin", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
2493   ROM_LOAD16_BYTE( "7.bin", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
2494   ROM_LOAD16_BYTE( "1.bin", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
2495
2496   ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU + data */
2497   ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) )
2498ROM_END
2499
24342500/* Passing Shot Bootleg is a decrypted version of Passing Shot Japanese (passshtj). It has been heavily modified */
24352501ROM_START( passshtb )
24362502   ROM_REGION( 0x020000, "maincpu", 0 ) /* 68000 code */
r248380r248381
37023768 *************************************/
37033769
37043770/* System 16A based bootlegs (less complex tilemap system) */
3705GAME( 1987, shinobld,    shinobi,   shinobib,    shinobi, segas1x_bootleg_state,   shinobl,    ROT0,   "bootleg (Datsu)", "Shinobi (Datsu bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
3771GAME( 1987, shinobld,    shinobi,   shinobi_datsu,    shinobi, segas1x_bootleg_state,   shinobl,    ROT0,   "bootleg (Datsu)", "Shinobi (Datsu bootleg, set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
3772GAME( 1987, shinoblda,   shinobi,   shinobi_datsu,    shinobi, segas1x_bootleg_state,   shinobl,    ROT0,   "bootleg (Datsu)", "Shinobi (Datsu bootleg, set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
3773
3774
3775
37063776GAME( 1988, passshtb,    passsht,   passshtb,    passsht, segas1x_bootleg_state,   passsht,    ROT270, "bootleg", "Passing Shot (2 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
37073777GAME( 1988, passht4b,    passsht,   passsht4b,   passht4b, segas1x_bootleg_state,  shinobl,    ROT270, "bootleg", "Passing Shot (4 Players) (bootleg)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_SOUND )
37083778GAME( 1988, wb3bbl,      wb3,       wb3bb,       wb3b, segas1x_bootleg_state,      wb3bbl,     ROT0,   "bootleg", "Wonder Boy III - Monster Lair (bootleg)", GAME_NOT_WORKING )
trunk/src/mame/drivers/taitoair.c
r248380r248381
184184
185185****************************************************************************/
186186/*!
187 @todo - Framebuffer DMA requires palette switch to be selected dynamically, see at first stage Course Select in Top Landing.
187 @todo - Framebuffer DMA requires palette switch to be selected dynamically, see at first stage Course Select in Top Landing.
188188         My gut feeling is that 3d poly fill operation actually copies to internal buffer then a DMA op actually do the buffer-to-screen copy, including gradiation ROZ too;
189189      - Air Inferno: missing landing monitor camera (blackened);
190190      - Air Inferno: missing 3d HUD graphics;
191191      - Air Inferno: Expert course has wrong 3d geometry;
192      - Air Inferno: Almost surely crashing during replay has missing smoke effect, looks quit odd atm.
192      - Air Inferno: Almost surely crashing during replay has missing smoke effect, looks quite odd atm.
193193      - Top Landing: Night stages might have wrong priority for stars-above-sea;
194194      - Input limiters / analog thresholds for both games;
195      - Special thanks to syq for being a cunt.
196195 */
197196
198197#include "emu.h"
r248380r248381
355354        [3] both games uses 0xb7, most likely a register setting.
356355*/
357356WRITE16_MEMBER(taitoair_state::dma_regs_w)
358{   
357{
359358   printf("%08x %04x\n",offset,data);
360   
359
361360   if(offset == 0 && ACCESSING_BITS_8_15)
362361   {
363362      if(data == 0x1fff)
r248380r248381
481480{
482481   if(m_dsp_muldiv_c_1 == 0)
483482      return 0xffff; /**< @todo true value? */
484   
483
485484   return m_dsp_muldiv_a_1*m_dsp_muldiv_b_1/m_dsp_muldiv_c_1;
486485}
487486
r248380r248381
504503{
505504   if(m_dsp_muldiv_c_2 == 0)
506505      return 0xffff; /**< @todo true value? */
507   
506
508507   return m_dsp_muldiv_a_2*m_dsp_muldiv_b_2/m_dsp_muldiv_c_2;
509508}
510509
trunk/src/mame/drivers/tnzs.c
r248380r248381
21952195ROM_END
21962196
21972197/* M6100309A PCB
2198   PO-0038A */
2198   P0-0038A */
21992199ROM_START( kageki )
22002200   ROM_REGION( 0x20000, "maincpu", 0 )
22012201   ROM_LOAD( "b35-16.11c", 0x00000, 0x10000, CRC(a4e6fd58) SHA1(7cfe5b3fa6c88cdab45719f5b58541270825ad30) )    /* US ver */
r248380r248381
25022502Taito ID: K1100356A
25032503          J1100156A
25042504          MAIN PCB
2505Seta ID: PO-041A
2505Seta ID: P0-041A
25062506*/
25072507/* This pcb is similar but not identical to the Chuka Taisen pcb above;
25082508   there is an M-chip i8742 (with Taito silkscreen) and no 3rd z80.
trunk/src/mame/drivers/wecleman.c
r248380r248381
14051405   ROM_LOAD( "763a12", 0x000000, 0x008000, CRC(05f1e553) SHA1(8aaeb7374bd93038c24e6470398936f22cabb0fe) )
14061406ROM_END
14071407
1408/*
1409
1410Hot Chase
1411Konami 1988
1412
1413
1414
1415         E08D E08B    E09D E09B  E10D E10B
1416         E08A E08C    E09A E09C  E10A E10C
1417
1418GX763 350861
1419
1420               E09      E10        E11
1421               E08      07232      07232
1422               07232   3.579MHz         2128
1423                               6809     P01.R10
1424      SW1
1425      SW2                               2128  2128
1426               6264 6264                6264  6264
1427                                        R02.P14 R03.R14
1428                            07770       R04.P16 R05.R16
1429      2018-45  D06.E18 D07.H18   10MHz
1430      2018-45  68000-10         07641   68000-10
1431
1432GX763 350860
1433
1434 051316 PSAC    051316 PSAC  A13.H5 A14.J5
1435                                                2018-45 2018-R6
1436                    2018-45
1437                    2018-45                     07558
1438 051316 PSAC        2018-45                            A12.R13
1439
1440                             A15.H14
1441
1442    A23.B17                            07634
1443                                                     07635
1444               2018-45 2018-45
1445               2018-45 2018-45         07557
1446               2018-45 2018-45                       25.2MHz
1447               2018-45 2018-45
1448
1449
1450Left EPROM board
1451
1452                                   E19A.A8 E19B.A7 E19C.A6 E19D.A5
1453E22E.B12 E22F.B11 E22G.B10 E22H.B9 E19E.B8 E19F.B7 E19G.B6 E19H.B5
1454                                   E22A.D9 E22B.D7 E22C.D6 E22D.D5
1455
1456Right EPROM board
1457
1458E21E E21F E21G E21H E17A E17B E17C E17D E18A E18B E18C E18D
1459E20E E20F E20G E20H E17E E17F E17G E17H E18E E18F E18G E18H
1460                    E20A E20B E20C E20D E21A E21B E21C E21D
1461
1462*/
1463
1464// uses EPROM sub-boards in place of some of the MASK roms, different program too
1465ROM_START( hotchasea )
1466   ROM_REGION( 0x40000, "maincpu", 0 ) /* Main Code */
1467   ROM_LOAD16_BYTE( "763r05.r16", 0x000000, 0x010000, CRC(c880d5e4) SHA1(3c3ab3ad5496cfbc8de76620eedc06601ee7a8c7) )
1468   ROM_LOAD16_BYTE( "763r04.p16", 0x000001, 0x010000, CRC(b732ee2c) SHA1(b3d73cf5039980ac74927eef656326515fd2026b) )
1469   ROM_LOAD16_BYTE( "763r03.r14", 0x020000, 0x010000, CRC(13dd71de) SHA1(4b86b81ef79e0e92a1e458010b0b9574183a9c29) )
1470   ROM_LOAD16_BYTE( "763r02.p14", 0x020001, 0x010000, CRC(6cd1a18e) SHA1(0ddfe6a46e95052534325f228b7f0faba121950e) )
1471
1472   ROM_REGION( 0x20000, "sub", 0 ) /* Sub Code */
1473   ROM_LOAD16_BYTE( "763d07.h18", 0x000000, 0x010000, CRC(ae12fa90) SHA1(7f76f09916fe152411b5af3c504ee7be07497ef4) )
1474   ROM_LOAD16_BYTE( "763d06.e18", 0x000001, 0x010000, CRC(b77e0c07) SHA1(98bf492ac889d31419df706029fdf3d51b85c936) )
1475
1476   ROM_REGION( 0x10000, "audiocpu", 0 )    /* Sound Code */
1477   ROM_LOAD( "763p01.r10", 0x8000, 0x8000, CRC(15dbca7b) SHA1(ac0c965b72a8579a3b60dbadfb942248d2cff2d8) )
1478
1479   ROM_REGION( 0x300000 * 2, "gfx1", 0 )   /* x2, do not dispose, zooming sprites */
1480   ROM_LOAD16_BYTE( "763e17a", 0x000000, 0x010000, CRC(8542d7d7) SHA1(a7c8aa7d8e0cabdc5269eb7adff944aaa0f819b6) )
1481   ROM_LOAD16_BYTE( "763e17e", 0x000001, 0x010000, CRC(4b4d919c) SHA1(0364eb74da8db7238888274d12011de876662d5a) )
1482   ROM_LOAD16_BYTE( "763e17b", 0x020000, 0x010000, CRC(ba9d7e72) SHA1(3af618087dcc66552ffabaf655f97b20e597122c) )
1483   ROM_LOAD16_BYTE( "763e17f", 0x020001, 0x010000, CRC(582400bb) SHA1(9479e45087d908c9b20392dba2a752a7ec1482e2) )
1484   ROM_LOAD16_BYTE( "763e17c", 0x040000, 0x010000, CRC(0ed292f8) SHA1(8c161e73c7f27925377799f67585b888bade6d82) )
1485   ROM_LOAD16_BYTE( "763e17g", 0x040001, 0x010000, CRC(35b27ed7) SHA1(e17e7674ee210ff340482a16dce3439b55c29f72) )
1486   ROM_LOAD16_BYTE( "763e17d", 0x060000, 0x010000, CRC(0166d00d) SHA1(e58f6deabc5743f6610252242f97bd5e973316ae) )
1487   ROM_LOAD16_BYTE( "763e17h", 0x060001, 0x010000, CRC(e5b8e8e6) SHA1(ae1349977559ff24dcd1678d6fd3a3e118612d07) )
1488   ROM_LOAD16_BYTE( "763e20a", 0x080000, 0x010000, CRC(256fe63c) SHA1(414325f2ff9abc411e2401dddd216e1a4de8a01e) )
1489   ROM_LOAD16_BYTE( "763e20e", 0x080001, 0x010000, CRC(ee8ca7e1) SHA1(fee544d6508f4106176f39e3765961e9f80fe620) )
1490   ROM_LOAD16_BYTE( "763e20b", 0x0a0000, 0x010000, CRC(b6714c24) SHA1(88f6437e181f36b7e44f1c70872314d8c0cc30e7) )
1491   ROM_LOAD16_BYTE( "763e20f", 0x0a0001, 0x010000, CRC(9dbc4b21) SHA1(31559903707a4f8ba3b044e8aad928de38403dcf) )
1492   ROM_LOAD16_BYTE( "763e20c", 0x0c0000, 0x010000, CRC(5173ad9b) SHA1(afe82c69f7036c7595f1a56b22176ba202b00b5c) )
1493   ROM_LOAD16_BYTE( "763e20g", 0x0c0001, 0x010000, CRC(b8c77f99) SHA1(e3bea1481c5b1c4733130651f9cf18587d3efc46) )
1494   ROM_LOAD16_BYTE( "763e20d", 0x0e0000, 0x010000, CRC(4ebdba32) SHA1(ac7daa291c82f75b09faf7bc5f6257870cc46061) )
1495   ROM_LOAD16_BYTE( "763e20h", 0x0e0001, 0x010000, CRC(0a428654) SHA1(551026f6f57d38aedd3498cce33af7bb2cf07184) )
1496   ROM_LOAD16_BYTE( "763e18a", 0x100000, 0x010000, CRC(09748099) SHA1(1821e2067b9a50a0638c8d105c617f4030d61877) )
1497   ROM_LOAD16_BYTE( "763e18e", 0x100001, 0x010000, CRC(049d4fcf) SHA1(aed18297677a3bb0b7197f59ea329aef9b678c01) )
1498   ROM_LOAD16_BYTE( "763e18b", 0x120000, 0x010000, CRC(ed0c3369) SHA1(84f336546dee01fec31c9c256ee00a9f8448cea4) )
1499   ROM_LOAD16_BYTE( "763e18f", 0x120001, 0x010000, CRC(b596a9ce) SHA1(dea0fe1c3386b5f0d19df4467f42d077678ae220) )
1500   ROM_LOAD16_BYTE( "763e18c", 0x140000, 0x010000, CRC(5a278291) SHA1(05c529baa68ef5877a28901c6f221e3d3593735f) )
1501   ROM_LOAD16_BYTE( "763e18g", 0x140001, 0x010000, CRC(aa7263cd) SHA1(b2acf66c02faf7777c5cb947aaf8e038f29c0f2e) )
1502   ROM_LOAD16_BYTE( "763e18d", 0x160000, 0x010000, CRC(b0b79a71) SHA1(46d0f17b7a6e4fb94ac9b8335bc598339d7707a5) )
1503   ROM_LOAD16_BYTE( "763e18h", 0x160001, 0x010000, CRC(a18b9127) SHA1(890971d2922a59ff4beea00238e710c8d3e0f19d) )
1504   ROM_LOAD16_BYTE( "763e21a", 0x180000, 0x010000, CRC(60788c29) SHA1(4faaa192d07f6acac0e7d11676146ecd0e71541f) )
1505   ROM_LOAD16_BYTE( "763e21e", 0x180001, 0x010000, CRC(844799ff) SHA1(8dc3ae3bb30ecb4e921a5b2068d3cd9421577844) )
1506   ROM_LOAD16_BYTE( "763e21b", 0x1a0000, 0x010000, CRC(1eefed61) SHA1(9c09dbff073d63384bf1ec9df4db4833afa33826) )
1507   ROM_LOAD16_BYTE( "763e21f", 0x1a0001, 0x010000, CRC(3aacfb10) SHA1(fb3eebf1f0850ed2f8f02cd4b5b564524e391afd) )
1508   ROM_LOAD16_BYTE( "763e21c", 0x1c0000, 0x010000, CRC(97e48b37) SHA1(864c73f48d839c2afeecec99605be6111f450ddd) )
1509   ROM_LOAD16_BYTE( "763e21g", 0x1c0001, 0x010000, CRC(74fefb12) SHA1(7746918c3ea8981c9cb2ead79a252939ba8bde3f) )
1510   ROM_LOAD16_BYTE( "763e21d", 0x1e0000, 0x010000, CRC(dd41569e) SHA1(065ee2de9ad6980788807cb563feccef1c3d1b9d) )
1511   ROM_LOAD16_BYTE( "763e21h", 0x1e0001, 0x010000, CRC(7ea52bf6) SHA1(2be93f88ccdea989b05beca13ebbfb77626ea41f) )
1512   ROM_LOAD16_BYTE( "763e19a", 0x200000, 0x010000, CRC(8c912c46) SHA1(e314edc39c32471c6fa2969e7c5c771c19fda88c) )
1513   ROM_LOAD16_BYTE( "763e19e", 0x200001, 0x010000, CRC(0eb34787) SHA1(9b8145dae210a177585e672fce30339b39c3c0f3) )
1514   ROM_LOAD16_BYTE( "763e19b", 0x220000, 0x010000, CRC(79960729) SHA1(f5c20ed7683aad8a435c292fbd5a1acc2a97ecee) )
1515   ROM_LOAD16_BYTE( "763e19f", 0x220001, 0x010000, CRC(1764ec5f) SHA1(4f7a0a3667087523a1ccdfc2d0e54a520f1216b3) )
1516   ROM_LOAD16_BYTE( "763e19c", 0x240000, 0x010000, CRC(f13377ac) SHA1(89f8d730cb457cc9cf55049b7002514302b2b04f) )
1517   ROM_LOAD16_BYTE( "763e19g", 0x240001, 0x010000, CRC(f2102e89) SHA1(41ff5d8904618a77c7c3c78c52c6f1b9c5a318fd) )
1518   ROM_LOAD16_BYTE( "763e19d", 0x260000, 0x010000, CRC(0b2a19f4) SHA1(3689b2c1f6227224fbcecc0d2470048a99510794) )
1519   ROM_LOAD16_BYTE( "763e19h", 0x260001, 0x010000, CRC(cd6d08a5) SHA1(ce13a8bba84f24e7d1fb25254e2e95f591fe1d67) )
1520   ROM_LOAD16_BYTE( "763e22a", 0x280000, 0x010000, CRC(16eec250) SHA1(f50375f207575e9d280285aca493902afbb7d729) )
1521   ROM_LOAD16_BYTE( "763e22e", 0x280001, 0x010000, CRC(c184b1c0) SHA1(d765e6eb2631b77dff5331840ac2a99cf1250362) )
1522   ROM_LOAD16_BYTE( "763e22b", 0x2a0000, 0x010000, CRC(1afe4b0c) SHA1(ce5a855291b443c1e16dbf54730960600c754fee) )
1523   ROM_LOAD16_BYTE( "763e22f", 0x2a0001, 0x010000, CRC(61f27c98) SHA1(d80af1a3e424c8dbab4fd21d494a0580ab96cd8d) )
1524   ROM_LOAD16_BYTE( "763e22c", 0x2c0000, 0x010000, CRC(c19b4b63) SHA1(93708b8769c44d5b93dcd2928a0d1120cc52c6ee) )
1525   ROM_LOAD16_BYTE( "763e22g", 0x2c0001, 0x010000, CRC(5bcbaf29) SHA1(621aa19606a15abb1539c07a033b32fc374a2d6a) )
1526   ROM_LOAD16_BYTE( "763e22d", 0x2e0000, 0x010000, CRC(fd5b669d) SHA1(fd5d82886708187e53c204c574ee252fc8a793af) )
1527   ROM_LOAD16_BYTE( "763e22h", 0x2e0001, 0x010000, CRC(9a9f45d8) SHA1(24fa9425b00441fff124eae7b40df7e65c920323) )
1528
1529   ROM_REGION( 0x20000, "k051316_1", 0 )    /* bg */
1530   ROM_LOAD( "763a14", 0x000000, 0x020000, CRC(60392aa1) SHA1(8499eb40a246587e24f6fd00af2eaa6d75ee6363) )
1531
1532   ROM_REGION( 0x08000, "k051316_2", 0 )    /* fg */
1533   /* first half empty - PCB silkscreen reads "27256/27512" */
1534   ROM_LOAD( "763a13", 0x000000, 0x008000, CRC(8bed8e0d) SHA1(ccff330abc23fe499e76c16cab5783c3daf155dd) )
1535   ROM_CONTINUE( 0x000000, 0x008000 )
1536
1537   ROM_REGION( 0x20000, "gfx4", 0 )    /* road */
1538   ROM_LOAD( "763a15", 0x000000, 0x020000, CRC(7110aa43) SHA1(639dc002cc1580f0530bb5bb17f574e2258d5954) )
1539
1540   ROM_REGION( 0x40000, "k007232_1", 0 ) /* Samples, 2 banks */
1541   ROM_LOAD( "763e11a", 0x000000, 0x010000, CRC(a60a93c8) SHA1(ce319f2b30c82f66fee0bab65d091ef4bef58a89) )
1542   ROM_LOAD( "763e11b", 0x010000, 0x010000, CRC(7750feb5) SHA1(e0900b8af400a50a22907ffa514847003cef342d) )
1543   ROM_LOAD( "763e11c", 0x020000, 0x010000, CRC(78b89bf8) SHA1(b74427e363a486d4be003df39f4ca8d10b9d5fc9) )
1544   ROM_LOAD( "763e11d", 0x030000, 0x010000, CRC(5f38d054) SHA1(ce0c87a7b7c0806e09cce5d48a651f12f790dd27) )
1545
1546   ROM_REGION( 0x40000, "k007232_2", 0 ) /* Samples, 2 banks */
1547   ROM_LOAD( "763e10a", 0x000000, 0x010000, CRC(2b1cbefc) SHA1(f23fb943c277a05f2aa4d25de692d1fb3bb752ac) )
1548   ROM_LOAD( "763e10b", 0x010000, 0x010000, CRC(8209c950) SHA1(944c2afb4cfc67bd243de499f5ca6a7982980f45) )
1549   ROM_LOAD( "763e10c", 0x020000, 0x010000, CRC(b91d6c07) SHA1(ef90457cb495750c5793cd1716d0dc44d33d0a95) )
1550   ROM_LOAD( "763e10d", 0x030000, 0x010000, CRC(5b465d20) SHA1(66f10b58873e738f5539b960468c7f92d07c28bc) )
1551
1552   ROM_REGION( 0x100000, "k007232_3", 0 )    /* Samples, 4 banks for each ROM */
1553   ROM_LOAD( "763e08a", 0x000000, 0x020000, CRC(02e4e7ef) SHA1(1622e4d85a333acae6e5f9304a037389bfeb71dc) )
1554   ROM_LOAD( "763e08b", 0x020000, 0x020000, CRC(94edde2f) SHA1(b124f83f271dab710d5ecb67a70cac7b4b41931c) )
1555   ROM_LOAD( "763e08c", 0x040000, 0x020000, CRC(b1ab1529) SHA1(962ad45fdccf6431e05eaec65d1b2f7842bddc02) )
1556   ROM_LOAD( "763e08d", 0x060000, 0x020000, CRC(ee8d14db) SHA1(098ba4f27b8cbb0ce017b28e5b69d6a3d2efa1df) )
1557
1558   ROM_LOAD( "763e09a", 0x080000, 0x020000, CRC(1e6628ec) SHA1(9d24da1d32cb39dcbe3d0633045054d398ca8eb8) )
1559   ROM_LOAD( "763e09b", 0x0a0000, 0x020000, CRC(f0c2feb8) SHA1(9454d45a97dc2e823baf68dce85acce8e82a18f2) )
1560   ROM_LOAD( "763e09c", 0x0c0000, 0x020000, CRC(a0ade3e4) SHA1(1c94cede76f9350769a589625fadaee855c38866) )
1561   ROM_LOAD( "763e09d", 0x0e0000, 0x020000, CRC(c74e484d) SHA1(dd7ef64c30443847c638291f6cd2b45a5f0b2310) )
1562
1563   ROM_REGION( 0x08000, "user1", 0 )   /* extra data for road effects? */
1564   ROM_LOAD( "763a12", 0x000000, 0x008000, CRC(05f1e553) SHA1(8aaeb7374bd93038c24e6470398936f22cabb0fe) )
1565
1566   ROM_REGION( 0x200, "user2", 0 )
1567   ROM_LOAD( "763a23.b17", 0x00000, 0x200, CRC(81c30352) SHA1(20700aed065929835ef5c3b564a6f531f0a8fedf) )
1568ROM_END
1569
1570
14081571/*      Important: you must leave extra space when listing sprite ROMs
14091572    in a ROM module definition.  This routine unpacks each sprite nibble
14101573    into a byte, doubling the memory consumption. */
r248380r248381
14741637
14751638GAMEL( 1986, wecleman,  0,        wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (set 1)", 0, layout_wecleman )
14761639GAMEL( 1986, wecleman2, wecleman, wecleman, wecleman, wecleman_state, wecleman, ROT0, "Konami", "WEC Le Mans 24 (set 2)", 0, layout_wecleman ) // 1988 release
1477GAMEL( 1988, hotchase,  0,        hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase", 0, layout_wecleman )
1640
1641GAMEL( 1988, hotchase,  0,        hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 1)", 0, layout_wecleman )
1642GAMEL( 1988, hotchasea, hotchase, hotchase, hotchase, wecleman_state, hotchase, ROT0, "Konami", "Hot Chase (set 2)", 0, layout_wecleman )
trunk/src/mame/includes/scramble.h
r248380r248381
33#include "machine/i8255.h"
44#include "includes/galaxold.h"
55#include "sound/tms5110.h"
6#include "sound/digitalk.h"
67
78class scramble_state : public galaxold_state
89{
r248380r248381
1314      m_ppi8255_0(*this, "ppi8255_0"),
1415      m_ppi8255_1(*this, "ppi8255_1"),
1516      m_tmsprom(*this, "tmsprom"),
16      m_soundram(*this, "soundram")
17      m_soundram(*this, "soundram"),
18      m_digitalker(*this, "digitalker")
1719   {
1820   }
1921
r248380r248381
2224   optional_device<i8255_device>  m_ppi8255_1;
2325   optional_device<tmsprom_device>  m_tmsprom;
2426   optional_shared_ptr<UINT8> m_soundram;
27   optional_device<digitalker_device> m_digitalker;
2528
2629   UINT8 m_cavelon_bank;
2730
r248380r248381
5053   DECLARE_WRITE8_MEMBER(mars_ppi8255_1_w);
5154   DECLARE_WRITE8_MEMBER(ad2083_tms5110_ctrl_w);
5255
53   DECLARE_WRITE8_MEMBER(harem_portA_w);
54   DECLARE_WRITE8_MEMBER(harem_portB_w);
55
56   // harem
5657   DECLARE_WRITE8_MEMBER(harem_decrypt_bit_w);
5758   DECLARE_WRITE8_MEMBER(harem_decrypt_clk_w);
5859   DECLARE_WRITE8_MEMBER(harem_decrypt_rst_w);
60   DECLARE_READ8_MEMBER(harem_digitalker_intr_r);
61   DECLARE_WRITE8_MEMBER(harem_digitalker_control_w);
5962
6063   DECLARE_DRIVER_INIT(cavelon);
6164   DECLARE_DRIVER_INIT(mariner);
trunk/src/mame/includes/system1.h
r248380r248381
115115   DECLARE_DRIVER_INIT(seganinj);
116116   DECLARE_DRIVER_INIT(gardia);
117117   DECLARE_DRIVER_INIT(spatter);
118   DECLARE_DRIVER_INIT(spattera);
118119   TILE_GET_INFO_MEMBER(tile_get_info);
119120   virtual void machine_start();
120121   virtual void machine_reset();
trunk/src/mame/includes/system16.h
r248380r248381
125125   optional_shared_ptr<UINT16> m_decrypted_opcodes;
126126
127127   DECLARE_WRITE16_MEMBER(sound_command_nmi_w);
128   DECLARE_WRITE16_MEMBER(sound_command_w);
128   DECLARE_WRITE16_MEMBER(sound_command_irq_w);
129129   DECLARE_WRITE16_MEMBER(sys16_coinctrl_w);
130130   DECLARE_READ16_MEMBER(passht4b_service_r);
131131   DECLARE_READ16_MEMBER(passht4b_io1_r);
r248380r248381
159159   DECLARE_WRITE16_MEMBER(sys18_tilebank_w);
160160   DECLARE_READ8_MEMBER(system18_bank_r);
161161   DECLARE_WRITE8_MEMBER(sys18_soundbank_w);
162   DECLARE_WRITE16_MEMBER(sound_command_irq_w);
163162   DECLARE_WRITE8_MEMBER(shdancbl_msm5205_data_w);
164163   DECLARE_READ8_MEMBER(shdancbl_soundbank_r);
165164   DECLARE_WRITE8_MEMBER(shdancbl_bankctrl_w);
trunk/src/mame/machine/scramble.c
r248380r248381
675675
676676   membank("rombank")->set_base            (m_harem_decrypted_data);
677677   membank("rombank_decrypted")->set_base  (m_harem_decrypted_opcodes);
678
679   save_item(NAME(m_harem_decrypt_mode));
680   save_item(NAME(m_harem_decrypt_bit));
681   save_item(NAME(m_harem_decrypt_clk));
682   save_item(NAME(m_harem_decrypt_count));
678683}
trunk/src/mess/drivers/hh_tms1k.c
r248380r248381
4040  MP3403   TMS1100   1978, Marx Electronic Bowling -> elecbowl.c
4141 @MP3404   TMS1100   1978, Parker Brothers Merlin
4242 @MP3405   TMS1100   1979, Coleco Amaze-A-Tron
43 *MP3415   TMS1100   1978, Coleco Electronic Quarterback
4344 @MP3438A  TMS1100   1979, Kenner Star Wars Electronic Battle Command
4445  MP3450A  TMS1100   1979, MicroVision cartridge: Blockbuster
4546  MP3454   TMS1100   1979, MicroVision cartridge: Star Trek Phaser Strike
trunk/src/mess/drivers/sdk80.c
r248380r248381
195195   /* 512-byte Signetics 2513 character generator ROM at location D2-D3 */
196196   ROM_REGION(0x0200, "gfx1",0)
197197   ROM_LOAD("s2513.d2", 0x0000, 0x0200, CRC(a7e567fc) SHA1(b18aae0a2d4f92f5a7e22640719bbc4652f3f4ee))
198
199   /* 256x4 PROM located on the video board, schematic location P7, to be moved into separate device later */
200   ROM_REGION( 0x0120, "proms", 0 )
201   ROM_LOAD( "6300__d7.p7",    0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) )
198202ROM_END
199203
200204/*    YEAR  NAME    PARENT  COMPAT  MACHINE    INPUT   CLASS           INIT   COMPANY   FULLNAME  FLAGS */
trunk/src/mess/drivers/tb303.c
r248380r248381
3535
3636   DECLARE_WRITE8_MEMBER(ram_w);
3737   DECLARE_READ8_MEMBER(ram_r);
38   DECLARE_WRITE8_MEMBER(strobe_w);
3839   void refresh_ram();
3940
40   DECLARE_WRITE8_MEMBER(led_w);
4141   DECLARE_WRITE8_MEMBER(switch_w);
42   DECLARE_WRITE8_MEMBER(strobe_w);
4342   DECLARE_READ8_MEMBER(input_r);
43   void update_leds();
4444
4545   TIMER_DEVICE_CALLBACK_MEMBER(t3_clock);
4646   TIMER_DEVICE_CALLBACK_MEMBER(t3_off);
r248380r248381
8181
8282***************************************************************************/
8383
84// external ram
85
8486void tb303_state::refresh_ram()
8587{
8688   // MCU E2,E3 goes through a 4556 IC(pin 14,13) to one of uPD444 _CE:
r248380r248381
103105      else
104106         m_ram[m_ram_address] = m_port[NEC_UCOM4_PORTC];
105107   }
106
107   // to switchboard pin 19-22
108   //..
109108}
110109
111110WRITE8_MEMBER(tb303_state::ram_w)
r248380r248381
128127      return 0;
129128}
130129
131WRITE8_MEMBER(tb303_state::led_w)
132{
133   // MCU G: leds state
134   display_matrix(4, 4, data, m_inp_mux);
135}
136
137WRITE8_MEMBER(tb303_state::switch_w)
138{
139   // MCU H: input/led mux
140   m_inp_mux = data;
141}
142
143130WRITE8_MEMBER(tb303_state::strobe_w)
144131{
145132   // MCU I0: RAM _WE
r248380r248381
148135   
149136   // MCU I1: pitch data latch strobe
150137   // MCU I2: gate signal
138
139   m_port[offset] = data;
151140}
152141
142
143// switch board
144
145void tb303_state::update_leds()
146{
147   // 4*4 LED matrix from port G/H:
148   /*
149      0.0 D204    1.0 D211    2.0 D217    3.0 D205
150      0.1 D206    1.1 D213    2.1 D218    3.1 D207
151      0.2 D208    1.2 D215    2.2 D220    3.2 D210
152      0.3 D209    1.3 D216    2.3 D221    3.3 D212
153   */
154   display_matrix(4, 4, m_port[NEC_UCOM4_PORTG], m_port[NEC_UCOM4_PORTH]);
155   
156   // todo: battery led
157   // todo: 4 more leds(see top-left part)
158}
159
160WRITE8_MEMBER(tb303_state::switch_w)
161{
162   // MCU G: leds state
163   // MCU H: input/led mux
164   if (offset == NEC_UCOM4_PORTH)
165      m_inp_mux = data;
166   
167   m_port[offset] = data;
168   update_leds();
169}
170
153171READ8_MEMBER(tb303_state::input_r)
154172{
155173   // MCU A,B: multiplexed inputs
r248380r248381
259277   MCFG_UCOM4_WRITE_D_CB(WRITE8(tb303_state, ram_w))
260278   MCFG_UCOM4_WRITE_E_CB(WRITE8(tb303_state, ram_w))
261279   MCFG_UCOM4_WRITE_F_CB(WRITE8(tb303_state, ram_w))
262   MCFG_UCOM4_WRITE_G_CB(WRITE8(tb303_state, led_w))
280   MCFG_UCOM4_WRITE_G_CB(WRITE8(tb303_state, switch_w))
263281   MCFG_UCOM4_WRITE_H_CB(WRITE8(tb303_state, switch_w))
264282   MCFG_UCOM4_WRITE_I_CB(WRITE8(tb303_state, strobe_w))
265283
trunk/src/mess/drivers/vk100.c
r248380r248381
3737
3838 Tony DiCenzo, now the director of standards and architecture at Oracle, was on the team that developed the VK100
3939 see http://startup.nmnaturalhistory.org/visitorstories/view.php?ii=79
40 Robert "Bob" C. Quinn was definitely lead engineer on the VT125 and may have been lead engineer on the VK100 as well
40 Robert "Bob" C. Quinn was definitely lead engineer on the VT125
41 Robert "Bob" T. Collins was the lead engineer on the VK100
42 Pedro Ortiz (https://www.linkedin.com/pub/pedro-ortiz/16/68b/196) did the drafting for the enclosure and case
4143
4244 The prototype name for the VK100 was 'SMAKY' (Smart Keyboard)
4345
r248380r248381
220222   UINT8 m_VG_MODE; // 2 bits, latched on EXEC
221223   UINT8 m_vgGO; // activated on next SYNC pulse after EXEC
222224   UINT8 m_ACTS;
225   UINT8 m_ADSR;
223226   ioport_port* m_col_array[16];
224227
225228   DECLARE_WRITE8_MEMBER(vgLD_X);
r248380r248381
244247   DECLARE_WRITE_LINE_MEMBER(i8251_txrdy_int);
245248   DECLARE_WRITE_LINE_MEMBER(i8251_rts);
246249   UINT8 vram_read();
250   UINT8 vram_attr_read();
247251   MC6845_UPDATE_ROW(crtc_update_row);
248252   void vram_write(UINT8 data);
249253
r248380r248381
286290   return (block>>(4*nybbleNum))&0xF;
287291}
288292
293// returns the attribute nybble for the current pixel based on X and Y regs
294UINT8 vk100_state::vram_attr_read()
295{
296   // XFinal is (X'&0x3FC)|(X&0x3)
297   UINT16 XFinal = m_trans[(m_vgX&0x3FC)>>2]<<2|(m_vgX&0x3); // appears correct
298   // EA is the effective ram address for a 16-bit block
299   UINT16 EA = ((m_vgY&0x1FE)<<5)|(XFinal>>4); // appears correct
300   // block is the 16 bit block directly (note EA has to be <<1 to correctly index a byte)
301   UINT16 block = m_vram[(EA<<1)+1] | (m_vram[(EA<<1)]<<8);
302   // nybbleNum is the attribute nybble, which in this case is always 3
303   UINT8 nybbleNum = 3;
304   return (block>>(4*nybbleNum))&0xF;
305}
306
307// writes one nybble to vram array based on X and Y regs, and updates the attrib ram if needed
289308void vk100_state::vram_write(UINT8 data)
290309{
291310   // XFinal is (X'&0x3FC)|(X&0x3)
r248380r248381
430449}
431450
432451/* port 0x45: "SOPS" screen options
433 * Blink --Background color--  Blink Serial Select  Reverse
434 * Enable Green  Red    Blue   Control              BG/FG
435 * d7     d6     d5     d4     d3     d2     d1     d0
436 * apparently, 00 = rs232/eia, 01 = 20ma, 10 = hardcopy, 11 = test/loopback
452 * (handled by 74LS273 @ E55, schematic sheet 10, all signals called 'VVG1 BDx' where x is 7 to 0)
453 * Blink   --Background color--    Blink   Serial  Serial  Reverse
454 * Enable  Green   Red     Blue    Control SL1     SL0     BG/FG
455 * d7      d6      d5      d4      d3      d2      d1      d0
456 * apparently, SLx: 00 = rs232/eia(J6), 01 = 20ma(J1), 10 = hardcopy(J7), 11 = test/loopback
457 * Serial Select (SLx) routing controls are rather complex, shown on schematic
458 * page 9:
459 * VDC2    |  I8251 pins                                                      |  SYSTAT_B bits
460 * SL1 SL0 |  8251RXD   8251RTS    8251TXD    8251/DTR    8251/DSR    8251CTS |  SYSTATB_ACTS   SYSTATB_ADSR
461 * 0   0      J6 /RXD   J6 /RTS    J6 TXD     J6 /DTR     J7 URTS     GND        J6 /CTS        J6 /DSR
462 * 0   1      J1 +-R    ACTS(loop) J1 +-T     J6 /DTR     J7 URTS     GND        8251RTS(loop)  J6 /DSR
463 * 1   0      J7 DRXD   J7 DRTS*   J7 DTXD    J6 /DTR     J7 URTS     GND        J7 /DCTS       J6 /DSR
464 * 1   1      8251TXD   ACTS(loop) 8251RXD    J6 /DTR     J7 URTS     GND        8251RTS(loop)  J6 /DSR
465 *                      * and UCTS, the pin drives both pins on J7
437466 */
438467WRITE8_MEMBER(vk100_state::vgSOPS)
439468{
r248380r248381
586615}
587616
588617/* port 0x40-0x47: "SYSTAT A"; various status bits, poorly documented in the tech manual
589 * /GO    BIT3   BIT2   BIT1   BIT0   Dip     RST7.5 GND
590 *                                    Switch  VSYNC
618 * /GO    VDM1   VDM1   VDM1   VDM1   Dip     RST7.5 GND***
619 *        BIT3   BIT2   BIT1   BIT0   Switch  VSYNC
591620 * d7     d6     d5     d4     d3     d2      d1     d0
592621  bit3, 2, 1, 0 are the 4 bits output from the VRAM 12->4 multiplexer
593622   which are also inputs to the pattern rom; they are constantly updated
r248380r248381
597626  d6,5,4,3 are from the 74ls298 at ic4 (right edge of pcb)
598627  d2 is where the dipswitch values are read from, based on the offset
599628  d1 is connected to 8085 rst7.5 (pin 7) and crtc pin 40 (VSYNC) [verified via tracing]
600  d0 is tied to GND [verified via tracing]
629  d0 is tied to GND [verified via tracing] but the schematics both tie it to GND
630     and call it LP FLAG, may be a leftover from development.
601631
602632 31D reads and checks d7 in a loop
603633 205 reads, xors with 0x55 (from reg D), ANDS result with 0x78 and branches if it is not zero (checking for bit pattern 1010?)
r248380r248381
623653 * after this it does something and waits for an rxrdy interrupt
624654
625655 shows the results of:
626 * ACTS (/CTS)  ?      ?      ?      ?      ?      ?      ?
627 * d7           d6     d5     d4     d3     d2     d1     d0
656 * ACTS (/CTS)  ADSR (/DSR)  GND    GND    ATTR3  ATTR2  ATTR1  ATTR0
657 * d7           d6           d5     d4     d3     d2     d1     d0
628658 * the ACTS (inverse of DCTS) signal lives in one of these bits (see 5-62)
629659 * it XORs the read of systat_b with the E register (which holds 0x6)
630660 * and checks the result
661 * The 4 attribute ram bits for the cell being pointed at by the X and Y regs are readable as the low nybble.
662 * The DSR pin is readable as bit 6.
631663 */
632664READ8_MEMBER(vk100_state::SYSTAT_B)
633665{
634666#ifdef SYSTAT_B_VERBOSE
635667   logerror("0x%04X: SYSTAT_B Read!\n", m_maincpu->pc());
636668#endif
637   return (m_ACTS<<7)|0x7F;
669   return (m_ACTS<<7)|(m_ADSR<<6)|vram_attr_read();
638670}
639671
640672READ8_MEMBER(vk100_state::vk100_keyboard_column_r)
r248380r248381
913945   m_VG_MODE = 0;
914946   m_vgGO = 0;
915947   m_ACTS = 1;
948   m_ADSR = 1;
916949   char kbdcol[8];
917950   // look up all 16 tags 'the slow way' but only once on reset
918951   for (int i = 0; i < 16; i++)
r248380r248381
11321165    *            |\-------- Y11 (D out of ls191 left of hd46505) [verified via tracing]
11331166    *            \--------- ERASE L/d5 on the vector rom [verified via tracing]
11341167    * data bits: 3210
1135    *            |||\-- ? wr_1?
1136    *            ||\--- ? wr_2?
1137    *            |\---- ? wr_3?
1138    *            \----- ? wr_4?
1168    *            |||\-- /WE for VRAM Attribute bits
1169    *            ||\--- /WE for VRAM bits 0-3 (leftmost bits, first to be shifted out)
1170    *            |\---- /WE for VRAM bits 4-7
1171    *            \----- /WE for VRAM bits 8-11 (rightmost bits, last to be shifted out)
11391172    * The VT125 prom E93 is mostly equivalent to the ras/erase prom; On the vt125 version, the inputs are:
11401173    *  (X'10 NOR X'11)
11411174    *  (Y9 NOR Y10)
trunk/src/mess/layout/tb303.lay
r248380r248381
44<!-- define elements -->
55
66   <element name="led" defstate="0">
7      <disk state="0"><color red="0.15" green="0.03" blue="0.03" /></disk>
8      <disk state="1"><color red="1.0" green="0.3" blue="0.3" /></disk>
7      <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk>
8      <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk>
99   </element>
1010
1111
12
1312<!-- build screen -->
1413
1514   <view name="Internal Layout">
1615      <bounds left="0" right="100" top="0" bottom="100" />
1716
17   <!-- 21 LEDs: D201-D221 -->
18     
19      <bezel name="x.0" element="led"><bounds x="1" y="10" width="1" height="1" /></bezel> <!-- d201 -->
1820
21      <bezel name="x.0" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> <!-- d202 -->
22      <bezel name="x.0" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> <!-- d203 -->
23
24      <bezel name="0.0" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel>
25      <bezel name="3.0" element="led"><bounds x="23" y="2" width="1" height="1" /></bezel>
26      <bezel name="0.1" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel>
27      <bezel name="3.1" element="led"><bounds x="29" y="2" width="1" height="1" /></bezel>
28      <bezel name="0.2" element="led"><bounds x="32" y="10" width="1" height="1" /></bezel>
29      <bezel name="0.3" element="led"><bounds x="38" y="10" width="1" height="1" /></bezel>
30      <bezel name="3.2" element="led"><bounds x="41" y="2" width="1" height="1" /></bezel>
31      <bezel name="1.0" element="led"><bounds x="44" y="10" width="1" height="1" /></bezel>
32      <bezel name="3.3" element="led"><bounds x="47" y="2" width="1" height="1" /></bezel>
33      <bezel name="1.1" element="led"><bounds x="50" y="10" width="1" height="1" /></bezel>
34      <bezel name="x.0" element="led"><bounds x="53" y="2" width="1" height="1" /></bezel> <!-- d214 -->
35      <bezel name="1.2" element="led"><bounds x="56" y="10" width="1" height="1" /></bezel>
36      <bezel name="1.3" element="led"><bounds x="62" y="10" width="1" height="1" /></bezel>
37
38      <bezel name="2.0" element="led"><bounds x="68" y="10" width="1" height="1" /></bezel>
39      <bezel name="2.1" element="led"><bounds x="74" y="10" width="1" height="1" /></bezel>
40      <bezel name="x.0" element="led"><bounds x="77" y="2" width="1" height="1" /></bezel> <!-- d219 -->
41      <bezel name="2.2" element="led"><bounds x="80" y="10" width="1" height="1" /></bezel>
42      <bezel name="2.3" element="led"><bounds x="86" y="10" width="1" height="1" /></bezel>
43
1944   </view>
2045</mamelayout>
trunk/src/tools/nltool.c
r248380r248381
105105      opt_type("y", "type",        "spice", "spice:eagle", "type of file to be converted: spice,eagle", this),
106106      opt_cmd ("c", "cmd",         "run",   "run|convert|listdevices", this),
107107      opt_verb("v", "verbose",              "be verbose - this produces lots of output", this),
108      opt_quiet("q", "quiet",               "be quiet - no warnings", this),
108109      opt_help("h", "help",                 "display help", this)
109110   {}
110111
r248380r248381
115116   poption_str_limit opt_type;
116117   poption_str    opt_cmd;
117118   poption_bool   opt_verb;
119   poption_bool   opt_quiet;
118120   poption_bool   opt_help;
119121};
120122
r248380r248381
171173public:
172174
173175   netlist_tool_t()
174   : netlist::netlist_t(), m_logs(""), m_verbose(false), m_setup(NULL)
176   : netlist::netlist_t(), m_opts(NULL), m_setup(NULL)
175177   {
176178   }
177179
r248380r248381
206208   void log_setup()
207209   {
208210      NL_VERBOSE_OUT(("Creating dynamic logs ...\n"));
209      pstring_list_t ll(m_logs, ":");
211      pstring_list_t ll(m_opts ? m_opts->opt_logs() : "" , ":");
210212      for (int i=0; i < ll.size(); i++)
211213      {
212214         pstring name = "log_" + ll[i];
r248380r248381
215217      }
216218   }
217219
218   pstring m_logs;
220   tool_options_t *m_opts;
219221
220   bool m_verbose;
221
222222protected:
223223
224224   void verror(const loglevel_e level, const char *format, va_list ap) const
r248380r248381
226226      switch (level)
227227      {
228228         case NL_LOG:
229            if (m_verbose)
229            if (m_opts ? m_opts->opt_verb() : false)
230230            {
231231               vprintf(format, ap);
232232               printf("\n");
233233            }
234234            break;
235235         case NL_WARNING:
236            vprintf(format, ap);
237            printf("\n");
236            if (!(m_opts ? m_opts->opt_quiet() : false))
237            {
238               vprintf(format, ap);
239               printf("\n");
240            }
238241            break;
239242         case NL_ERROR:
240243            vprintf(format, ap);
r248380r248381
265268   netlist_tool_t nt;
266269   osd_ticks_t t = osd_ticks();
267270
271   nt.m_opts = &opts;
268272   nt.init();
269   nt.m_logs = opts.opt_logs();
270   nt.m_verbose = opts.opt_verb();
271273   nt.read_netlist(filetobuf(opts.opt_file()), opts.opt_name());
272274   double ttr = opts.opt_ttr();
273275
r248380r248381
290292{
291293   netlist_tool_t nt;
292294   nt.init();
293   const netlist::factory_list_t::list_t &list = nt.setup().factory().list();
295   const netlist::factory_list_t &list = nt.setup().factory();
294296
295297   nt.setup().register_source(palloc(netlist::source_proc_t("dummy", &netlist_dummy)));
296298   nt.setup().include("dummy");
r248380r248381
300302
301303   for (int i=0; i < list.size(); i++)
302304   {
303      pstring out = pstring::sprintf("%-20s %s(<id>", list[i]->classname().cstr(),
304            list[i]->name().cstr() );
305      netlist::base_factory_t *f = list.value_at(i);
306      pstring out = pstring::sprintf("%-20s %s(<id>", f->classname().cstr(),
307            f->name().cstr() );
305308      pstring terms("");
306309
307      netlist::base_factory_t *f = list[i];
308310      netlist::device_t *d = f->Create();
309311      d->init(nt, pstring::sprintf("dummy%d", i));
310312      d->start_dev();
r248380r248381
318320         terms += "," + inp;
319321      }
320322
321      if (list[i]->param_desc().startsWith("+"))
323      if (f->param_desc().startsWith("+"))
322324      {
323         out += "," + list[i]->param_desc().substr(1);
325         out += "," + f->param_desc().substr(1);
324326         terms = "";
325327      }
326      else if (list[i]->param_desc() == "-")
328      else if (f->param_desc() == "-")
327329      {
328330         /* no params at all */
329331      }
330332      else
331333      {
332         out += "," + list[i]->param_desc();
334         out += "," + f->param_desc();
333335      }
334336      out += ")";
335337      printf("%s\n", out.cstr());


Previous 199869 Revisions Next


© 1997-2024 The MAME Team