Previous 199869 Revisions Next

r34972 Sunday 8th February, 2015 at 15:07:22 UTC by Couriersud
sdl render operation moved towards the way window deals with renderers.
[src/emu/bus/coco]coco_multi.c
[src/emu/bus/isa]gblaster.c sblaster.c
[src/emu/cpu/amis2000]amis2000.c amis2000.h
[src/emu/cpu/i86]i186.c
[src/emu/cpu/ucom4]ucom4.c ucom4.h ucom4op.inc
[src/emu/machine]mc2661.c wd_fdc.c
[src/emu/sound]saa1099.c saa1099.h
[src/mame]mame.lst
[src/mame/drivers]armedf.c bingor.c circus.c cyclemb.c dlair2.c equites.c galpanic.c gladiatr.c gsword.c hornet.c igs011.c jpmsys5.c liberate.c manohman.c mastboy.c mcr.c mitchell.c mpu4vid.c namcops2.c nwk-tr.c pokechmp.c quizpani.c rabbit.c segas32.c statriv2.c taxidriv.c tmmjprd.c vamphalf.c wrally.c xorworld.c
[src/mame/includes]gladiatr.h gsword.h liberate.h quizpani.h taxidriv.h wrally.h xorworld.h
[src/mame/layout]superbug.lay
[src/mame/machine]tait8741.c wrally.c
[src/mame/video]gladiatr.c gsword.c liberate.c quizpani.c taxidriv.c wrally.c xorworld.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]alesis.c alnchase.c amaztron.c cnsector.c edracula.c kaypro.c mbee.c merlin.c pc9801.c pcd.c prestige.c samcoupe.c simon.c slicer.c splitsec.c stopthie.c tmtennis.c wildfire.c
[src/mess/includes]alesis.h kaypro.h mbee.h
[src/mess/layout]alnchase.lay bankshot.lay edracula.lay tmtennis.lay wildfire.lay
[src/mess/machine]kaypro.c mbee.c
[src/mess/video]mbee.c
[src/osd/sdl]draw13.c drawbgfx.c drawogl.c drawsdl.c input.c window.c window.h

trunk/src/emu/bus/coco/coco_multi.c
r243483r243484
103103
104104static MACHINE_CONFIG_FRAGMENT(coco_multi)
105105   MCFG_COCO_CARTRIDGE_ADD(SLOT1_TAG, coco_cart_slot1_3, NULL)
106   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
107   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
108   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
106   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_cart_w))
107   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_nmi_w))
108   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_halt_w))
109109   MCFG_COCO_CARTRIDGE_ADD(SLOT2_TAG, coco_cart_slot1_3, NULL)
110   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
111   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
112   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
110   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_cart_w))
111   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_nmi_w))
112   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_halt_w))
113113   MCFG_COCO_CARTRIDGE_ADD(SLOT3_TAG, coco_cart_slot1_3, NULL)
114   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
115   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
116   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
114   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_cart_w))
115   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_nmi_w))
116   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_halt_w))
117117   MCFG_COCO_CARTRIDGE_ADD(SLOT4_TAG, coco_cart_slot4, "fdcv11")
118   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
119   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
120   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
118   MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_cart_w))
119   MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_nmi_w))
120   MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF_OWNER, coco_multipak_device, multi_halt_w))
121121MACHINE_CONFIG_END
122122
123123//**************************************************************************
trunk/src/emu/bus/isa/gblaster.c
r243483r243484
3333{
3434   switch(offset)
3535   {
36      case 0 : m_saa1099_1->control_w( space, offset, data ); break;
37      case 1 : m_saa1099_1->data_w( space, offset, data ); break;
36      case 0 : m_saa1099_1->saa1099_control_w( space, offset, data ); break;
37      case 1 : m_saa1099_1->saa1099_data_w( space, offset, data ); break;
3838   }
3939}
4040
r243483r243484
4242{
4343   switch(offset)
4444   {
45      case 0 : m_saa1099_2->control_w( space, offset, data ); break;
46      case 1 : m_saa1099_2->data_w( space, offset, data ); break;
45      case 0 : m_saa1099_2->saa1099_control_w( space, offset, data ); break;
46      case 1 : m_saa1099_2->saa1099_data_w( space, offset, data ); break;
4747   }
4848}
4949
trunk/src/emu/bus/isa/sblaster.c
r243483r243484
148148{
149149   switch(offset)
150150   {
151      case 0 : m_saa1099_1->control_w( space, offset, data ); break;
152      case 1 : m_saa1099_1->data_w( space, offset, data ); break;
151      case 0 : m_saa1099_1->saa1099_control_w( space, offset, data ); break;
152      case 1 : m_saa1099_1->saa1099_data_w( space, offset, data ); break;
153153   }
154154}
155155
r243483r243484
157157{
158158   switch(offset)
159159   {
160      case 0 : m_saa1099_2->control_w( space, offset, data ); break;
161      case 1 : m_saa1099_2->data_w( space, offset, data ); break;
160      case 0 : m_saa1099_2->saa1099_control_w( space, offset, data ); break;
161      case 1 : m_saa1099_2->saa1099_data_w( space, offset, data ); break;
162162   }
163163}
164164
trunk/src/emu/cpu/amis2000/amis2000.c
r243483r243484
44
55  American Microsystems, Inc.(AMI) S2000-family 4-bit MCU cores, introduced late 1970s
66  Overall functionality is similar to (and probably derived from) NEC uCOM-4.
7
8  References:
9  - AMI MOS Products Catalog Winter 1979
10  - AMI S2000 Programming Manual (rev. 2)
11
7 
128  TODO:
139  - unemulated opcodes (need more testing material)
1410  - support external program map
r243483r243484
207203void amis2000_device::device_reset()
208204{
209205   m_pc = 0;
210   m_op = 0;
211206   m_skip = false;
207   m_op = 0;
212208   
213209   // clear i/o
214210   m_d_polarity = 0;
r243483r243484
241237      {
242238         // always skip over PP prefix
243239         m_skip = ((m_op & 0xf0) == 0x60);
244         m_op = 0; // nop
240         continue;
245241      }
246242
247243      switch (m_op & 0xf0)
trunk/src/emu/cpu/amis2000/amis2000.h
r243483r243484
5151   virtual void device_reset();
5252
5353   // device_execute_interface overrides
54   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
55   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 4); } // "
5654   virtual UINT32 execute_min_cycles() const { return 1; }
5755   virtual UINT32 execute_max_cycles() const { return 2; }
5856   virtual UINT32 execute_input_lines() const { return 1; }
r243483r243484
7876   UINT16 m_callstack_mask;
7977   UINT8 m_callstack_depth;    // callstack levels: 3 on 2000/2150, 5 on 2200/2400
8078   UINT16 m_callstack[5+1];    // max 5
81   int m_icount;
79
8280   UINT16 m_pc;                // 13-bit program counter
8381   UINT8 m_ppr;                // prepared page register (PP 1)
8482   UINT8 m_pbr;                // prepared bank register (PP 2)
r243483r243484
9896   UINT8 m_d_polarity;         // invert d-latch output
9997   UINT16 m_a;                 // 13-bit a-pins latch (master strobe latch)
10098
101   // i/o handlers
10299   devcb_read8 m_read_k;
103100   devcb_read8 m_read_i;
104101   devcb_read8 m_read_d;
105102   devcb_write8 m_write_d;
106103   devcb_write16 m_write_a;
104
105   int m_icount;
107106   
108   // misc internal helpers
109107   UINT8 ram_r();
110108   void ram_w(UINT8 data);
111109   void pop_callstack();
112110   void push_callstack();
113111   void d_latch_out(bool active);
114112   
115   // opcode handlers
116113   void op_lai();
117114   void op_lab();
118115   void op_lae();
trunk/src/emu/cpu/i86/i186.c
r243483r243484
10351035            count = count ? count : 0x10000;
10361036            if(!(t->control & 4))
10371037               t->int_timer->adjust((attotime::from_hz(clock()/8) * count), which);
1038            t->count = 0;
10381039            if (LOG_TIMER) logerror("  Repriming interrupt\n");
10391040         }
10401041         else
1041         {
10421042            t->int_timer->adjust(attotime::never, which);
1043            t->control &= ~0x8000;
1044         }
1045         t->count = 0;
10461043         break;
10471044      }
10481045
r243483r243484
12481245   // Do the transfer, 80188 is incapable of word transfers
12491246   if ((dma->control & BYTE_WORD) && (m_program->data_width() == 16))
12501247   {
1251      dma_word = src_space->read_word_unaligned(dma->source);
1252      dest_space->write_word_unaligned(dma->dest, dma_word);
1248      dma_word = src_space->read_word(dma->source);
1249      dest_space->write_word(dma->dest, dma_word);
12531250      incdec_size = 2;
12541251   }
12551252   else
r243483r243484
16781675         if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", pc(), (offset - 0x65) / 8, data);
16791676         which = (offset - 0x65) / 8;
16801677         update_dma_control(which, data);
1681         if((m_dma[which].control & (SYNC_MASK | ST_STOP | TIMER_DRQ)) == ST_STOP)
1682         {
1683            // TODO: don't do this
1684            while(m_dma[which].control & ST_STOP)
1685               drq_callback(which);
1686         }
16871678         break;
16881679
16891680      case 0x7f:
trunk/src/emu/cpu/ucom4/ucom4.c
r243483r243484
44
55  NEC uCOM-4 MCU family cores
66 
7  References:
8  - 1981 NEC Microcomputers Catalog (later editions may have errors!)
9  - Supplement to uCOM-43 Single Chip Microcomputer Users' Manual
10  I've also looked at asterick's JavaScript D553 emulator for verification, with permission.
7  reference: 1981 NEC Microcomputers Catalog (later editions may have errors!)
8  also looked at asterick's JavaScript D553 emulator for verification, with permission
119
1210  TODO:
1311  - what happens with uCOM-43 opcodes on an uCOM-44/45 MCU?
14  - what's the data after the ROM data for? (eg. 2000-2047, official ROM size is 2000)
1512
1613*/
1714
r243483r243484
5552
5653static ADDRESS_MAP_START(data_96x4, AS_DATA, 8, ucom4_cpu_device)
5754   AM_RANGE(0x00, 0x3f) AM_RAM
58   AM_RANGE(0x40, 0x4f) AM_RAM
59   AM_RANGE(0x70, 0x7f) AM_RAM
55   AM_RANGE(0x40, 0x5f) AM_RAM AM_MIRROR(0x20)
6056ADDRESS_MAP_END
6157
6258
r243483r243484
114110
115111void ucom4_cpu_device::device_start()
116112{
117   assert(NEC_UCOM4_PORTA == 0);
118   
119113   m_program = &space(AS_PROGRAM);
120114   m_data = &space(AS_DATA);
121115   m_prgmask = (1 << m_prgwidth) - 1;
122116   m_datamask = (1 << m_datawidth) - 1;
123117   m_dph_mask = m_datamask >> 4;
124118
125   m_read_a.resolve_safe(0xf);
126   m_read_b.resolve_safe(0xf);
127   m_read_c.resolve_safe(0xf);
128   m_read_d.resolve_safe(0xf);
119   m_read_a.resolve_safe(0);
120   m_read_b.resolve_safe(0);
121   m_read_c.resolve_safe(0);
122   m_read_d.resolve_safe(0);
129123
130124   m_write_c.resolve_safe();
131125   m_write_d.resolve_safe();
r243483r243484
137131
138132   // zerofill
139133   memset(m_stack, 0, sizeof(m_stack));
140   memset(m_port_out, 0, sizeof(m_port_out));
141134   m_op = 0;
142135   m_prev_op = 0;
136   m_arg = 0;
143137   m_skip = false;
144138   m_pc = 0;
145139   m_acc = 0;
r243483r243484
153147
154148   // register for savestates
155149   save_item(NAME(m_stack));
156   save_item(NAME(m_port_out));
157150   save_item(NAME(m_op));
158151   save_item(NAME(m_prev_op));
152   save_item(NAME(m_arg));
159153   save_item(NAME(m_skip));
160154   save_item(NAME(m_pc));
161155   save_item(NAME(m_acc));
r243483r243484
191185   m_pc = 0;
192186   m_op = 0;
193187   m_skip = false;
194
195   // clear i/o
196   for (int i = NEC_UCOM4_PORTC; i <= NEC_UCOM4_PORTI; i++)
197      output_w(i, 0xf);
198188}
199189
200190
r243483r243484
203193//  execute
204194//-------------------------------------------------
205195
206inline void ucom4_cpu_device::increment_pc()
196void ucom4_cpu_device::fetch_arg()
207197{
208   // upper bits (field register) don't auto-increment
209   m_pc = (m_pc & ~0xff) | ((m_pc + 1) & 0xff);
210}
211
212inline void ucom4_cpu_device::fetch_arg()
213{
214198   // 2-byte opcodes: STM/LDI/CLI/CI, JMP/CAL, OCD
215199   if ((m_op & 0xfc) == 0x14 || (m_op & 0xf0) == 0xa0 || m_op == 0x1e)
216200   {
217201      m_icount--;
218202      m_arg = m_program->read_byte(m_pc);
219      increment_pc();
203      m_pc = (m_pc + 1) & m_prgmask;
220204   }
221205}
222206
r243483r243484
231215
232216      debugger_instruction_hook(this, m_pc);
233217      m_op = m_program->read_byte(m_pc);
234      m_bitmask = 1 << (m_op & 0x03);
235      increment_pc();
218      m_pc = (m_pc + 1) & m_prgmask;
236219      fetch_arg();
237220     
238221      if (m_skip)
239222      {
240223         m_skip = false;
241         m_op = 0; // nop
224         continue;
242225      }
243226     
244227      switch (m_op & 0xf0)
trunk/src/emu/cpu/ucom4/ucom4.h
r243483r243484
4545   ucom4_cpu_device::set_write_i_callback(*device, DEVCB_##_devcb);
4646
4747
48enum
49{
50   NEC_UCOM4_PORTA = 0,
51   NEC_UCOM4_PORTB,
52   NEC_UCOM4_PORTC,
53   NEC_UCOM4_PORTD,
54   NEC_UCOM4_PORTE,
55   NEC_UCOM4_PORTF,
56   NEC_UCOM4_PORTG,
57   NEC_UCOM4_PORTH,
58   NEC_UCOM4_PORTI
59};
6048
61
62
6349class ucom4_cpu_device : public cpu_device
6450{
6551public:
r243483r243484
10591   virtual void device_reset();
10692
10793   // device_execute_interface overrides
108   virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 4 - 1) / 4; } // 4 cycles per machine cycle
109   virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 4); } // "
11094   virtual UINT32 execute_min_cycles() const { return 1; }
11195   virtual UINT32 execute_max_cycles() const { return 2; }
11296   virtual UINT32 execute_input_lines() const { return 1; }
11397   virtual void execute_run();
11498   
99   void fetch_arg();
100
115101   // device_memory_interface overrides
116102   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config :((spacenum == AS_DATA) ? &m_data_config : NULL); }
117103
r243483r243484
131117   int m_datawidth;
132118   int m_prgmask;
133119   int m_datamask;
134   int m_family;           // MCU family (43/44/45)
135   int m_stack_levels;     // number of callstack levels
136   UINT16 m_stack[3+1];    // max 3
137   UINT8 m_port_out[0x10]; // last value written to output port
120   int m_family;       // MCU family (43/44/45)
121   int m_stack_levels; // number of callstack levels
122   UINT16 m_stack[3+1]; // max 3
138123   UINT8 m_op;
139   UINT8 m_prev_op;        // previous opcode
140   UINT8 m_arg;            // opcode argument for 2-byte opcodes
141   UINT8 m_bitmask;        // opcode bit argument
142   bool m_skip;            // skip next opcode
124   UINT8 m_prev_op;    // previous opcode
125   UINT8 m_arg;        // opcode argument for 2-byte opcodes
126   bool m_skip;        // skip next opcode
143127   int m_icount;
144128   
145   UINT16 m_pc;            // program counter
146   UINT8 m_acc;            // 4-bit accumulator
147   UINT8 m_dpl;            // 4-bit data pointer low (RAM x)
148   UINT8 m_dph;            // 4-bit(?) data pointer high (RAM y)
129   UINT16 m_pc;        // program counter
130   UINT8 m_acc;        // 4-bit accumulator
131   UINT8 m_dpl;        // 4-bit data pointer low (RAM x)
132   UINT8 m_dph;        // 4-bit(?) data pointer high (RAM y)
149133   UINT8 m_dph_mask;
150   UINT8 m_carry_f;        // carry flag
151   UINT8 m_carry_s_f;      // carry save flag
152   UINT8 m_timer_f;        // timer out flag
153   UINT8 m_int_f;          // interrupt flag
154   UINT8 m_inte_f;         // interrupt enable flag
134   UINT8 m_carry_f;    // carry flag
135   UINT8 m_carry_s_f;  // carry save flag
136   UINT8 m_timer_f;    // timer out flag
137   UINT8 m_int_f;      // interrupt flag
138   UINT8 m_inte_f;     // interrupt enable flag
155139
156140   // i/o handlers
157141   devcb_read8 m_read_a;
r243483r243484
167151   devcb_write8 m_write_h;
168152   devcb_write8 m_write_i;
169153   
170   // misc internal helpers
171   void increment_pc();
172   void fetch_arg();
173
154   // opcode handlers
174155   UINT8 ram_r();
175156   void ram_w(UINT8 data);
176157   void pop_stack();
177158   void push_stack();
178   UINT8 input_r(int index);
179   void output_w(int index, UINT8 data);
180
159   void op_illegal();
181160   bool check_op_43();
182   UINT8 ucom43_reg_r(int index);
183   void ucom43_reg_w(int index, UINT8 data);
184161
185   // opcode handlers
186   void op_illegal();
187
188162   void op_li();
189163   void op_lm();
190164   void op_ldi();
trunk/src/emu/cpu/ucom4/ucom4op.inc
r243483r243484
3131   m_stack[0] = m_pc;
3232}
3333
34UINT8 ucom4_cpu_device::input_r(int index)
35{
36   index &= 0xf;
37   UINT8 inp = 0xf;
38   
39   switch (index)
40   {
41      case NEC_UCOM4_PORTA: inp = m_read_a(index, 0xff); break;
42      case NEC_UCOM4_PORTB: inp = m_read_b(index, 0xff); break;
43      case NEC_UCOM4_PORTC: inp = m_read_c(index, 0xff); break;
44      case NEC_UCOM4_PORTD: inp = m_read_d(index, 0xff); break;
45
46      default:
47         logerror("%s read from unknown port %c at $%03X\n", tag(), 'A' + index, m_pc);
48         break;
49   }
50
51   return inp & 0xf;
52}
53
54void ucom4_cpu_device::output_w(int index, UINT8 data)
55{
56   index &= 0xf;
57   data &= 0xf;
58
59   switch (index)
60   {
61      case NEC_UCOM4_PORTC: m_write_c(index, data, 0xff); break;
62      case NEC_UCOM4_PORTD: m_write_d(index, data, 0xff); break;
63      case NEC_UCOM4_PORTE: m_write_e(index, data, 0xff); break;
64      case NEC_UCOM4_PORTF: m_write_f(index, data, 0xff); break;
65      case NEC_UCOM4_PORTG: m_write_g(index, data, 0xff); break;
66      case NEC_UCOM4_PORTH: m_write_h(index, data, 0xff); break;
67      case NEC_UCOM4_PORTI: m_write_i(index, data & 7, 0xff); break;
68     
69      default:
70         logerror("%s write to unknown port %c = $%X at $%03X\n", tag(), 'A' + index, data & 0xf, m_pc);
71         break;
72   }
73
74   m_port_out[index] = data;
75}
76
7734void ucom4_cpu_device::op_illegal()
7835{
7936   logerror("%s unknown opcode $%02X at $%03X\n", tag(), m_op, m_pc);
r243483r243484
180137void ucom4_cpu_device::op_adc()
181138{
182139   // ADC: Add RAM and carry to ACC, store Carry F/F
183   m_acc += ram_r() + m_carry_f;
184   m_carry_f = m_acc >> 4 & 1;
185   m_acc &= 0xf;
140   op_illegal();
186141}
187142
188143void ucom4_cpu_device::op_ads()
189144{
190145   // ADS: Add RAM and carry to ACC, store Carry F/F, skip next on carry
191   op_adc();
192   m_skip = (m_carry_f != 0);
146   op_illegal();
193147}
194148
195149void ucom4_cpu_device::op_daa()
r243483r243484
286240void ucom4_cpu_device::op_rmb()
287241{
288242   // RMB B: Reset a single bit of RAM
289   ram_w(ram_r() & ~m_bitmask);
243   ram_w(ram_r() & ~(1 << (m_op & 0x03)));
290244}
291245
292246void ucom4_cpu_device::op_smb()
293247{
294248   // SMB B: Set a single bit of RAM
295   ram_w(ram_r() | m_bitmask);
249   ram_w(ram_r() | (1 << (m_op & 0x03)));
296250}
297251
298252void ucom4_cpu_device::op_reb()
299253{
300254   // REB B: Reset a single bit of output port E
301255   m_icount--;
302   output_w(NEC_UCOM4_PORTE, m_port_out[NEC_UCOM4_PORTE] & ~m_bitmask);
256   op_illegal();
303257}
304258
305259void ucom4_cpu_device::op_seb()
306260{
307261   // SEB B: Set a single bit of output port E
308262   m_icount--;
309   output_w(NEC_UCOM4_PORTE, m_port_out[NEC_UCOM4_PORTE] | m_bitmask);
263   op_illegal();
310264}
311265
312266void ucom4_cpu_device::op_rpb()
313267{
314268   // RPB B: Reset a single bit of output port (DPl)
315   output_w(m_dpl, m_port_out[m_dpl] & ~m_bitmask);
269   op_illegal();
316270}
317271
318272void ucom4_cpu_device::op_spb()
319273{
320274   // SPB B: Set a single bit of output port (DPl)
321   output_w(m_dpl, m_port_out[m_dpl] | m_bitmask);
275   op_illegal();
322276}
323277
324278
r243483r243484
329283   // JMP A: Jump to Address / CAL A: Call Address
330284   if (m_op & 0x08)
331285      push_stack();
332   m_pc = ((m_op & 0x07) << 8 | m_arg) & m_prgmask;
286   m_pc = (m_op & 0x07) << 8 | m_arg;
333287}
334288
335289void ucom4_cpu_device::op_jcp()
r243483r243484
341295void ucom4_cpu_device::op_jpa()
342296{
343297   // JPA: Jump to (ACC) in current page
344   m_icount--;
345298   m_pc = (m_pc & ~0x3f) | (m_acc << 2);
346299}
347300
r243483r243484
362315void ucom4_cpu_device::op_rts()
363316{
364317   // RTS: Return from subroutine, skip next
365   op_rt();
318   pop_stack();
366319   m_skip = true;
367320}
368321
r243483r243484
387340void ucom4_cpu_device::op_cmb()
388341{
389342   // CMB B: skip next on bit(ACC) equals bit(RAM)
390   m_skip = ((m_acc & m_bitmask) == (ram_r() & m_bitmask));
343   UINT8 mask = 1 << (m_op & 0x03);
344   m_skip = ((m_acc & mask) == (ram_r() & mask));
391345}
392346
393347void ucom4_cpu_device::op_tab()
394348{
395349   // TAB B: skip next on bit(ACC)
396   m_skip = ((m_acc & m_bitmask) != 0);
350   m_skip = ((m_acc & (1 << (m_op & 0x03))) != 0);
397351}
398352
399353void ucom4_cpu_device::op_cli()
r243483r243484
408362void ucom4_cpu_device::op_tmb()
409363{
410364   // TMB B: skip next on bit(RAM)
411   m_skip = ((ram_r() & m_bitmask) != 0);
365   m_skip = ((ram_r() & (1 << (m_op & 0x03))) != 0);
412366}
413367
414368void ucom4_cpu_device::op_tpa()
415369{
416370   // TPA B: skip next on bit(input port A)
417   m_skip = ((input_r(NEC_UCOM4_PORTA) & m_bitmask) != 0);
371   op_illegal();
418372}
419373
420374void ucom4_cpu_device::op_tpb()
421375{
422376   // TPB B: skip next on bit(input port (DPl))
423   m_skip = ((input_r(m_dpl) & m_bitmask) != 0);
377   op_illegal();
424378}
425379
426380
r243483r243484
438392void ucom4_cpu_device::op_ia()
439393{
440394   // IA: Input port A to ACC
441   m_icount--;
442   m_acc = input_r(NEC_UCOM4_PORTA);
395   op_illegal();
443396}
444397
445398void ucom4_cpu_device::op_ip()
446399{
447400   // IP: Input port (DPl) to ACC
448   m_acc = input_r(m_dpl);
401   op_illegal();
449402}
450403
451404void ucom4_cpu_device::op_oe()
452405{
453406   // OE: Output ACC to port E
454   m_icount--;
455   output_w(NEC_UCOM4_PORTE, m_acc);
407   m_write_e(0, m_acc, 0xff);
456408}
457409
458410void ucom4_cpu_device::op_op()
459411{
460412   // OP: Output ACC to port (DPl)
461   output_w(m_dpl, m_acc);
413   op_illegal();
462414}
463415
464416void ucom4_cpu_device::op_ocd()
465417{
466418   // OCD X: Output X to ports C and D
467   output_w(NEC_UCOM4_PORTD, m_arg >> 4);
468   output_w(NEC_UCOM4_PORTC, m_arg & 0xf);
419   op_illegal();
469420}
470421
471422
r243483r243484
489440   return (m_family == NEC_UCOM43);
490441}
491442
492// extra registers reside in RAM
493enum
494{
495   UCOM43_X = 0,
496   UCOM43_Y,
497   UCOM43_R,
498   UCOM43_S,
499   UCOM43_W,
500   UCOM43_Z,
501   UCOM43_F
502};
503
504inline UINT8 ucom4_cpu_device::ucom43_reg_r(int index)
505{
506   return m_data->read_byte(m_datamask - index) & 0xf;
507}
508
509inline void ucom4_cpu_device::ucom43_reg_w(int index, UINT8 data)
510{
511   m_data->write_byte(m_datamask - index, data & 0xf);
512}
513
514
515443// Transfer
516444
517445void ucom4_cpu_device::op_taw()
r243483r243484
519447   if (!check_op_43()) return;
520448
521449   // TAW: Transfer ACC to W
522   m_icount--;
523   ucom43_reg_w(UCOM43_W, m_acc);
450   op_illegal();
524451}
525452
526453void ucom4_cpu_device::op_taz()
r243483r243484
528455   if (!check_op_43()) return;
529456   
530457   // TAZ: Transfer ACC to Z
531   m_icount--;
532   ucom43_reg_w(UCOM43_Z, m_acc);
458   op_illegal();
533459}
534460
535461void ucom4_cpu_device::op_thx()
r243483r243484
537463   if (!check_op_43()) return;
538464   
539465   // THX: Transfer DPh to X
540   m_icount--;
541   ucom43_reg_w(UCOM43_X, m_dph);
466   op_illegal();
542467}
543468
544469void ucom4_cpu_device::op_tly()
r243483r243484
546471   if (!check_op_43()) return;
547472   
548473   // TLY: Transfer DPl to Y
549   m_icount--;
550   ucom43_reg_w(UCOM43_Y, m_dpl);
474   op_illegal();
551475}
552476
553477
r243483r243484
558482   if (!check_op_43()) return;
559483   
560484   // XAW: Exchange ACC with W
561   m_icount--;
562   UINT8 old_acc = m_acc;
563   m_acc = ucom43_reg_r(UCOM43_W);
564   ucom43_reg_w(UCOM43_W, old_acc);
485   op_illegal();
565486}
566487
567488void ucom4_cpu_device::op_xaz()
r243483r243484
569490   if (!check_op_43()) return;
570491   
571492   // XAZ: Exchange ACC with Z
572   m_icount--;
573   UINT8 old_acc = m_acc;
574   m_acc = ucom43_reg_r(UCOM43_Z);
575   ucom43_reg_w(UCOM43_Z, old_acc);
493   op_illegal();
576494}
577495
578496void ucom4_cpu_device::op_xhr()
r243483r243484
580498   if (!check_op_43()) return;
581499   
582500   // XHR: Exchange DPh with R
583   m_icount--;
584   UINT8 old_dph = m_dph;
585   m_dph = ucom43_reg_r(UCOM43_R);
586   ucom43_reg_w(UCOM43_R, old_dph);
501   op_illegal();
587502}
588503
589504void ucom4_cpu_device::op_xhx()
r243483r243484
591506   if (!check_op_43()) return;
592507   
593508   // XHX: Exchange DPh with X
594   m_icount--;
595   UINT8 old_dph = m_dph;
596   m_dph = ucom43_reg_r(UCOM43_X);
597   ucom43_reg_w(UCOM43_X, old_dph);
509   op_illegal();
598510}
599511
600512void ucom4_cpu_device::op_xls()
r243483r243484
602514   if (!check_op_43()) return;
603515   
604516   // XLS: Exchange DPl with S
605   m_icount--;
606   UINT8 old_dpl = m_dpl;
607   m_dpl = ucom43_reg_r(UCOM43_S);
608   ucom43_reg_w(UCOM43_S, old_dpl);
517   op_illegal();
609518}
610519
611520void ucom4_cpu_device::op_xly()
r243483r243484
613522   if (!check_op_43()) return;
614523   
615524   // XLY: Exchange DPl with Y
616   m_icount--;
617   UINT8 old_dpl = m_dpl;
618   m_dpl = ucom43_reg_r(UCOM43_Y);
619   ucom43_reg_w(UCOM43_Y, old_dpl);
525   op_illegal();
620526}
621527
622528void ucom4_cpu_device::op_xc()
r243483r243484
624530   if (!check_op_43()) return;
625531   
626532   // XC: Exchange Carry F/F with Carry Save F/F
627   UINT8 c = m_carry_f;
628   m_carry_f = m_carry_s_f;
629   m_carry_s_f = c;
533   op_illegal();
630534}
631535
632536
r243483r243484
637541   if (!check_op_43()) return;
638542   
639543   // SFB B: Set a single bit of FLAG
640   m_icount--;
641   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask);
544   op_illegal();
642545}
643546
644547void ucom4_cpu_device::op_rfb()
r243483r243484
646549   if (!check_op_43()) return;
647550   
648551   // RFB B: Reset a single bit of FLAG
649   m_icount--;
650   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask);
552   op_illegal();
651553}
652554
653555void ucom4_cpu_device::op_fbt()
r243483r243484
655557   if (!check_op_43()) return;
656558   
657559   // FBT B: skip next on bit(FLAG)
658   m_icount--;
659   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0);
560   op_illegal();
660561}
661562
662563void ucom4_cpu_device::op_fbf()
r243483r243484
664565   if (!check_op_43()) return;
665566   
666567   // FBF B: skip next on not bit(FLAG)
667   m_icount--;
668   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0);
568   op_illegal();
669569}
670570
671571
r243483r243484
676576   if (!check_op_43()) return;
677577   
678578   // RAR: Rotate ACC Right through Carry F/F
679   UINT8 c = m_acc & 1;
680   m_acc = m_acc >> 1 | m_carry_f << 3;
681   m_carry_f = c;
579   op_illegal();
682580}
683581
684582
r243483r243484
689587   if (!check_op_43()) return;
690588   
691589   // INM: Increment RAM, skip next on carry
692   UINT8 val = (ram_r() + 1) & 0xf;
693   ram_w(val);
694   m_skip = (val == 0);
590   op_illegal();
695591}
696592
697593void ucom4_cpu_device::op_dem()
r243483r243484
699595   if (!check_op_43()) return;
700596   
701597   // DEM: Decrement RAM, skip next on carry
702   UINT8 val = (ram_r() - 1) & 0xf;
703   ram_w(val);
704   m_skip = (val == 0xf);
598   op_illegal();
705599}
706600
707601
r243483r243484
713607   
714608   // STM X: Reset Timer F/F, Start Timer with X
715609   op_illegal();
716
717   if ((m_arg & 0xc0) != 0x80)
718      logerror("%s STM opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xc0, m_pc);
719610}
720611
721612void ucom4_cpu_device::op_ttm()
trunk/src/emu/machine/mc2661.c
r243483r243484
278278         m_write_txrdy(CLEAR_LINE);
279279      }
280280      if(COMMAND_MODE == 0x02)  // loopback - the Wicat will set this after enabling the transmitter
281      {
282281         m_rhr = data;
283         m_sr |= STATUS_RXRDY; // pcd expects this
284         m_write_rxrdy(ASSERT_LINE);
285      }
286282      break;
287283
288284   case REGISTER_SYNC:
trunk/src/emu/machine/wd_fdc.c
r243483r243484
887887   if(!(command & 0x0f)) {
888888      intrq_cond = 0;
889889   } else {
890      intrq_cond = (intrq_cond & I_IMM) | (command & 0x0f);
890      intrq_cond = (intrq_cond & I_IMM) | (command & 0x07);
891891   }
892892
893893   if(intrq_cond & I_IMM) {
trunk/src/emu/sound/saa1099.c
r243483r243484
161161
162162   /* for each chip allocate one stream */
163163   m_stream = stream_alloc(0, 2, m_sample_rate);
164   
165   save_item(NAME(m_noise_params));
166   save_item(NAME(m_env_enable));
167   save_item(NAME(m_env_reverse_right));
168   save_item(NAME(m_env_mode));
169   save_item(NAME(m_env_bits));
170   save_item(NAME(m_env_clock));
171   save_item(NAME(m_env_step));
172   save_item(NAME(m_all_ch_enable));
173   save_item(NAME(m_sync_state));
174   save_item(NAME(m_selected_reg));
175   
176   for (int i = 0; i < 6; i++)
177   {
178      save_item(NAME(m_channels[i].frequency), i);
179      save_item(NAME(m_channels[i].freq_enable), i);
180      save_item(NAME(m_channels[i].noise_enable), i);
181      save_item(NAME(m_channels[i].octave), i);
182      save_item(NAME(m_channels[i].amplitude), i);
183      save_item(NAME(m_channels[i].envelope), i);
184      save_item(NAME(m_channels[i].counter), i);
185      save_item(NAME(m_channels[i].freq), i);
186      save_item(NAME(m_channels[i].level), i);
187   }
188   
189   for (int i = 0; i < 2; i++)
190   {
191      save_item(NAME(m_noise[i].counter), i);
192      save_item(NAME(m_noise[i].freq), i);
193      save_item(NAME(m_noise[i].level), i);
194   }
195164}
196165
197166
r243483r243484
248217
249218            /* eventually clock the envelope counters */
250219            if (ch == 1 && m_env_clock[0] == 0)
251               envelope_w(0);
220               saa1099_envelope(0);
252221            if (ch == 4 && m_env_clock[1] == 0)
253               envelope_w(1);
222               saa1099_envelope(1);
254223         }
255224
256225         /* if the noise is enabled */
r243483r243484
297266}
298267
299268
300void saa1099_device::envelope_w(int ch)
269void saa1099_device::saa1099_envelope(int ch)
301270{
302271   if (m_env_enable[ch])
303272   {
r243483r243484
340309}
341310
342311
343WRITE8_MEMBER( saa1099_device::control_w )
312WRITE8_MEMBER( saa1099_device::saa1099_control_w )
344313{
345314   if ((data & 0xff) > 0x1c)
346315   {
r243483r243484
353322   {
354323      /* clock the envelope channels */
355324      if (m_env_clock[0])
356         envelope_w(0);
325         saa1099_envelope(0);
357326      if (m_env_clock[1])
358         envelope_w(1);
327         saa1099_envelope(1);
359328   }
360329}
361330
362331
363WRITE8_MEMBER( saa1099_device::data_w )
332WRITE8_MEMBER( saa1099_device::saa1099_data_w )
364333{
365334   int reg = m_selected_reg;
366335   int ch;
trunk/src/emu/sound/saa1099.h
r243483r243484
8080   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
8181
8282public:
83   DECLARE_WRITE8_MEMBER( control_w );
84   DECLARE_WRITE8_MEMBER( data_w );
83   DECLARE_WRITE8_MEMBER( saa1099_control_w );
84   DECLARE_WRITE8_MEMBER( saa1099_data_w );
8585
8686private:
87   void envelope_w(int ch);
87   void saa1099_envelope(int ch);
8888
8989private:
9090   sound_stream *m_stream;          /* our stream */
trunk/src/mame/drivers/armedf.c
r243483r243484
3535  - ship rays on Armed F title screen;
3636  - gameplay in Armed F abuses of this effect (shots, player ship lights etc.);
3737  - Terra Force helmet during the intro;
38  - Invincibility flickering of main character in Kozure Ookami;
3938- (1) Kozure Ookami timer over bug:
4039      010118: lea     $63510.l, A0
4140      01011E: tst.w   (A0) ;check time variable, in BCD format
r243483r243484
4948      01016E: btst    #$7, $60621.l ;check dsw2 ram copy bit 15 (debug feature?)
5049      010176: bne     $1017e
5150      010178: bra     $f9f0 ;timer over event occurs
52  btanb perhaps? Currently patched to work, might also be that DSW2 bit 7 is actually a MCU bit ready flag, so it
53  definitely needs PCB tests.
51  btanb perhaps?
5452
5553
5654Stephh's notes (based on the games M68000 code and some tests) :
r243483r243484
945943   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) )       PORT_DIPLOCATION("SW2:7")
946944   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
947945   PORT_DIPSETTING(    0x40, DEF_STR( Yes ) )
948   PORT_DIPNAME( 0x80, 0x80, "Infinite Timer (Cheat)" )       PORT_DIPLOCATION("SW2:8")
949   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
950   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
946   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" )
951947INPUT_PORTS_END
952948
953949static INPUT_PORTS_START( cclimbr2 )
r243483r243484
20792075
20802076DRIVER_INIT_MEMBER(armedf_state,kozure)
20812077{
2082   UINT16 *ROM = (UINT16 *)memregion("maincpu")->base();
2083
2084   /* patch "time over" bug, see notes on top. */
2085   ROM[0x1016c/2] = 0x4e71;
2086   /* ROM check at POST. */
2087   ROM[0x04fc6/2] = 0x4e71;
20882078   m_scroll_type = 0;
20892079
20902080   m_maincpu->space(AS_PROGRAM).install_write_handler(0x07c000, 0x07c001, write16_delegate(FUNC(armedf_state::terraf_io_w),this));
r243483r243484
20962086#if LEGION_HACK
20972087   /* This is a hack to allow you to use the extra features
20982088        of 3 of the "Unused" Dip Switches (see notes above). */
2099   UINT16 *ROM = (UINT16 *)memregion("maincpu")->base();
2089   UINT16 *RAM = (UINT16 *)memregion("maincpu")->base();
21002090   RAM[0x0001d6 / 2] = 0x0001;
21012091   /* To avoid checksum error */
21022092   RAM[0x000488 / 2] = 0x4e71;
r243483r243484
21482138GAME( 1987, terrafj,  terraf,   terraf,   terraf,   armedf_state,   terrafu,  ROT0,   "Nichibutsu Japan",              "Terra Force (Japan)", GAME_SUPPORTS_SAVE )
21492139GAME( 1987, terrafjb, terraf,   terrafjb, terraf,   armedf_state,   terrafjb, ROT0,   "bootleg",                       "Terra Force (Japan bootleg with additional Z80)", GAME_SUPPORTS_SAVE )
21502140GAME( 1987, terrafb,  terraf,   terraf,   terraf,   armedf_state,   terraf,   ROT0,   "bootleg",                       "Terra Force (Japan bootleg set 2)", GAME_SUPPORTS_SAVE )
2151GAME( 1987, kozure,   0,        kozure,   kozure,   armedf_state,   kozure,   ROT0,   "Nichibutsu",                    "Kozure Ookami (Japan)", GAME_SUPPORTS_SAVE )
2141GAME( 1987, kozure,   0,        kozure,   kozure,   armedf_state,   kozure,   ROT0,   "Nichibutsu",                    "Kozure Ookami (Japan)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
21522142GAME( 1988, cclimbr2, 0,        cclimbr2, cclimbr2, armedf_state,   cclimbr2, ROT0,   "Nichibutsu",                    "Crazy Climber 2 (Japan)", GAME_SUPPORTS_SAVE )
21532143GAME( 1988, cclimbr2a,cclimbr2, cclimbr2, cclimbr2, armedf_state,   cclimbr2, ROT0,   "Nichibutsu",                    "Crazy Climber 2 (Japan, Harder)", GAME_SUPPORTS_SAVE  )
21542144GAME( 1988, armedf,   0,        armedf,   armedf,   armedf_state,   armedf,   ROT270, "Nichibutsu",                    "Armed Formation", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/bingor.c
r243483r243484
526526
527527static ADDRESS_MAP_START( bingor_io, AS_IO, 16, bingor_state )
528528//  AM_RANGE(0x0000, 0x00ff) AM_READ(test_r )
529   AM_RANGE(0x0100, 0x0101) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
530   AM_RANGE(0x0102, 0x0103) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
529   AM_RANGE(0x0100, 0x0101) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
530   AM_RANGE(0x0102, 0x0103) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
531531//  AM_RANGE(0x0200, 0x0201) AM_READ(test_r )
532532ADDRESS_MAP_END
533533
trunk/src/mame/drivers/circus.c
r243483r243484
66
77Robot Bowl           1977  6502   4020-4027, 4010-4013
88Circus               1977  6502   9000-9003, 9004-9011
9Trapeze          Jun 1978  6502   unknown
10Football         Aug 1978  6502   unknown
11Rip Cord         May 1979  6502   RC30-0014 (cpu) 0015 (snd)
9Football         Aug,1978  6502   unknown
10Rip Cord         May,1979  6502   RC30-0014 (cpu) 0015 (snd)
1211                                  9023-9026, 9027-9034, 9035
13Crash           July 1979  6502   CR30-3162 (cpu) 3161 (snd)  9036 (?)
12Crash           July,1979  6502   CR30-3162 (cpu) 3161 (snd)  9036 (?)
1413
1514***************************************************************************
1615
trunk/src/mame/drivers/cyclemb.c
r243483r243484
8484      : driver_device(mconfig, type, tag),
8585      m_maincpu(*this, "maincpu"),
8686      m_audiocpu(*this, "audiocpu"),
87      m_gfxdecode(*this, "gfxdecode"),
88      m_palette(*this, "palette"),
8987      m_vram(*this, "vram"),
9088      m_cram(*this, "cram"),
9189      m_obj1_ram(*this, "obj1_ram"),
9290      m_obj2_ram(*this, "obj2_ram"),
93      m_obj3_ram(*this, "obj3_ram")
91      m_obj3_ram(*this, "obj3_ram"),
92      m_gfxdecode(*this, "gfxdecode"),
93      m_palette(*this, "palette")
9494   { }
9595
9696   required_device<cpu_device> m_maincpu;
9797   required_device<cpu_device> m_audiocpu;
98   required_device<gfxdecode_device> m_gfxdecode;
99   required_device<palette_device> m_palette;
100   
10198   required_shared_ptr<UINT8> m_vram;
10299   required_shared_ptr<UINT8> m_cram;
103100   required_shared_ptr<UINT8> m_obj1_ram;
104101   required_shared_ptr<UINT8> m_obj2_ram;
105102   required_shared_ptr<UINT8> m_obj3_ram;
103   required_device<gfxdecode_device> m_gfxdecode;
104   required_device<palette_device> m_palette;
106105
107106   struct
108107   {
r243483r243484
121120   DECLARE_WRITE8_MEMBER(cyclemb_flip_w);
122121   DECLARE_READ8_MEMBER(skydest_i8741_0_r);
123122   DECLARE_WRITE8_MEMBER(skydest_i8741_0_w);
124   
125123   DECLARE_DRIVER_INIT(skydest);
126124   DECLARE_DRIVER_INIT(cyclemb);
127   virtual void machine_start();
128125   virtual void machine_reset();
126   virtual void video_start();
129127   DECLARE_PALETTE_INIT(cyclemb);
130   
131128   UINT32 screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
132129   UINT32 screen_update_skydest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
133130   void cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
r243483r243484
167164}
168165
169166
167void cyclemb_state::video_start()
168{
169}
170
170171void cyclemb_state::cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
171172{
172173   gfx_element *gfx = m_gfxdecode->gfx(0);
r243483r243484
592593   AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITE(soundlatch2_byte_w)
593594ADDRESS_MAP_END
594595
595
596void cyclemb_state::machine_start()
597{
598   for (int i = 0; i < 2; i++)
599   {
600      save_item(NAME(m_mcu[i].rxd), i);
601      save_item(NAME(m_mcu[i].txd), i);
602      save_item(NAME(m_mcu[i].rst), i);
603      save_item(NAME(m_mcu[i].state), i);
604      save_item(NAME(m_mcu[i].packet_type), i);
605   }
606}
607
608596void cyclemb_state::machine_reset()
609597{
610598   skydest_i8741_reset();
r243483r243484
10421030   m_dsw_pc_hack = 0x554;
10431031}
10441032
1045GAME( 1984, cyclemb,  0,   cyclemb,  cyclemb, cyclemb_state,  cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
1046GAME( 1985, skydest,  0,   skydest,  skydest, cyclemb_state,  skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
1033GAME( 1984, cyclemb,  0,   cyclemb,  cyclemb, cyclemb_state,  cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
1034GAME( 1985, skydest,  0,   skydest,  skydest, cyclemb_state,  skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", GAME_NO_COCKTAIL | GAME_NO_SOUND )
trunk/src/mame/drivers/dlair2.c
r243483r243484
205205ROM_START( dlair2 )
206206   ROM_REGION( 0x10000, "ipl", 0 )
207207   ROM_LOAD( "dl2_319.bin",     0x00000, 0x10000, CRC(e9453a1b) SHA1(eb1201abd0124f6edbabd49bec81af827369cb2c) )
208   
209   DISK_REGION( "laserdisc" )
210   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
211208ROM_END
212209
213210ROM_START( dlair2_319e )
214211   ROM_REGION( 0x10000, "ipl", 0 )
215212   ROM_LOAD( "dl2euro3.19.bin", 0x00000, 0x10000, CRC(cc23ad9f) SHA1(24add8f03749dcc27b1b166dc2e5d346534a0088) )
216   
217   DISK_REGION( "laserdisc" )
218   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
219213ROM_END
220214
221215ROM_START( dlair2_319s )
222216   ROM_REGION( 0x10000, "ipl", 0 )
223217   ROM_LOAD( "dl2-span.bin",    0x00000, 0x10000, CRC(4b9a811d) SHA1(6fe580f541305422f89edbbf475f7c5f17153738) )
224
225   DISK_REGION( "laserdisc" )
226   DISK_IMAGE_READONLY( "dlair2_span", 0, NO_DUMP )
227218ROM_END
228219
229220ROM_START( dlair2_318 )
230221   ROM_REGION( 0x10000, "ipl", 0 )
231222   ROM_LOAD( "dl2_318.bin",     0x00000, 0x10000, CRC(64706492) SHA1(99c92572c59ce1206847a5363d3791196fccd742) )
232
233   DISK_REGION( "laserdisc" )
234   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
235223ROM_END
236224
237225ROM_START( dlair2_317e )
238226   ROM_REGION( 0x10000, "ipl", 0 )
239227   ROM_LOAD( "dl2euro3.17.bin", 0x00000, 0x10000, CRC(743f65a5) SHA1(45199983156c561b8e88c69bef454fd4042579bb) )
240
241   DISK_REGION( "laserdisc" )
242   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
243228ROM_END
244229
245230ROM_START( dlair2_316e )
246231   ROM_REGION( 0x10000, "ipl", 0 )
247232   ROM_LOAD( "dl2euro.bin",     0x00000, 0x10000, CRC(d68f1b13) SHA1(cc9ee307b4d3caba049be6226163c810cf89ab44) )
248
249   DISK_REGION( "laserdisc" )
250   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
251233ROM_END
252234
253235ROM_START( dlair2_315 )
254236   ROM_REGION( 0x10000, "ipl", 0 )
255237   ROM_LOAD( "dl2_315.rom",     0x00000, 0x10000, CRC(13ec0600) SHA1(9366dfac4508c4a723d688016b8cddb57aa6f5f1) )
256
257   DISK_REGION( "laserdisc" )
258   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
259238ROM_END
260239
261240ROM_START( dlair2_315s )
262241   ROM_REGION( 0x10000, "ipl", 0 )
263242   ROM_LOAD( "315pi.bin",       0x00000, 0x10000, CRC(75d8861a) SHA1(56ab31a760f43f98fa40396ee7d7af7ce982d28d) )
264
265   DISK_REGION( "laserdisc" )
266   DISK_IMAGE_READONLY( "dlair2_span", 0, NO_DUMP )
267243ROM_END
268244
269245ROM_START( dlair2_314 )
270246   ROM_REGION( 0x10000, "ipl", 0 )
271247   ROM_LOAD( "dl2_314.bin",     0x00000, 0x10000, CRC(af92b612) SHA1(a0b986fa8a0f2206beedf1dcaed4d108599947ff) )
272
273   DISK_REGION( "laserdisc" )
274   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
275248ROM_END
276249
277250ROM_START( dlair2_312 )
278251   ROM_REGION( 0x10000, "ipl", 0 )
279252   ROM_LOAD( "312.bin",         0x00000, 0x10000, CRC(c842be6b) SHA1(bf548ea3c6e98cd93f79408c3b9f0e1e22cc8bd1) )
280
281   DISK_REGION( "laserdisc" )
282   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
283253ROM_END
284254
285255ROM_START( dlair2_300 )
286256   ROM_REGION( 0x10000, "ipl", 0 )
287257   ROM_LOAD( "dl2_300.bin",     0x00000, 0x10000, CRC(dec4f2e3) SHA1(fd96378c78df4aacd4b2190823ec5c1591199d44) )
288
289   DISK_REGION( "laserdisc" )
290   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
291258ROM_END
292259
293260ROM_START( dlair2_211 )
294261   ROM_REGION( 0x10000, "ipl", 0 )
295262   ROM_LOAD( "dl2_211.bin",     0x00000, 0x10000, CRC(9f2660a3) SHA1(bf35356aab0138f86e6ea18c7bcf4f3f3c428d98) )
296
297   DISK_REGION( "laserdisc" )
298   DISK_IMAGE_READONLY( "C-910-00001-00", 0, NO_DUMP )
299263ROM_END
300264
301265ROM_START( dlair2_200 )
r243483r243484
305269   ROM_REGION( 0x2000, "bios", 0 ) /* BIOS for proto board */
306270   ROM_LOAD( "dl2_amoa_proto_bios_mod_56ee.bin",0x00000, 0x2000, CRC(1fc21576) SHA1(dc5443f6a8d80ec8148314244f05ac0290e380ea) )
307271
308   DISK_REGION( "laserdisc" )
309   DISK_IMAGE_READONLY( "dl2-sa91_proto", 0, NO_DUMP )
310272ROM_END
311273
312274ROM_START( spacea91 )
313275   ROM_REGION( 0x10000, "ipl", 0 )
314276   ROM_LOAD( "ace.dat",         0x00000, 0x10000, CRC(de93a213) SHA1(1c95d5f45292f08149d749e1f7b5d9409d3a266e) )
315
316   DISK_REGION( "laserdisc" )
317   DISK_IMAGE_READONLY( "spaceace91", 0, NO_DUMP )
318277ROM_END
319278
320279ROM_START( spacea91_13e )
321280   ROM_REGION( 0x10000, "ipl", 0 )
322281   ROM_LOAD( "sa91euro1.3.bin", 0x00000, 0x10000, CRC(27dd0486) SHA1(8a57510b466381d9962e5397d89a7a3e73d757b0) )
323
324   DISK_REGION( "laserdisc" )
325   DISK_IMAGE_READONLY( "spaceace91", 0, NO_DUMP )
326282ROM_END
327283
328284
trunk/src/mame/drivers/equites.c
r243483r243484
33Equites           (c) 1984 Alpha Denshi Co./Sega   8303
44Bull Fighter      (c) 1984 Alpha Denshi Co./Sega   8303
55Gekisou           (c) 1985 Eastern Corp.           8304
6Violent Run       (c) 1985 Eastern Corp.           8304? (probably on Equites HW)
76The Koukouyakyuh  (c) 1985 Alpha Denshi Co.        8304
87Splendor Blast    (c) 1985 Alpha Denshi Co.        8303
98High Voltage      (c) 1985 Alpha Denshi Co.        8304 (POST says 8404)
trunk/src/mame/drivers/galpanic.c
r243483r243484
354354   AM_RANGE(0xf80000, 0xf80001) AM_READ8(comad_okim6295_r, 0xff00) AM_DEVWRITE8("oki", okim6295_device, write, 0xff00) /* fantasia, missw96 */
355355ADDRESS_MAP_END
356356
357static ADDRESS_MAP_START( smissw_map, AS_PROGRAM, 16, galpanic_state )
358   AM_RANGE(0x000000, 0x4fffff) AM_ROM
359   AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram")
360    AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram")
361    AM_RANGE(0x580000, 0x583fff) AM_RAM //_WRITE(galpanic_bgvideoram_mirror_w) // can't be right, causes half the display to vanish at times!
362   AM_RANGE(0x600000, 0x600fff) AM_RAM_WRITE(galpanic_paletteram_w) AM_SHARE("paletteram")  /* 1024 colors, but only 512 seem to be used */
363   AM_RANGE(0x680000, 0x68001f) AM_RAM
364   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_SHARE("spriteram")
365   AM_RANGE(0x780000, 0x78001f) AM_RAM
366   AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1")
367   AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2")
368   AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM")
369   AM_RANGE(0x800006, 0x800007) AM_READ(comad_timer_r)
370   AM_RANGE(0x80000e, 0x80000f) AM_READ(comad_timer_r)
371   AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanica_6295_bankswitch_w)  /* not sure */
372   AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP
373   AM_RANGE(0xc00000, 0xc0ffff) AM_RAM
374   AM_RANGE(0xd80000, 0xd80001) AM_WRITENOP
375   AM_RANGE(0xe00012, 0xe00013) AM_WRITENOP
376   AM_RANGE(0xe80000, 0xe80001) AM_WRITENOP
377   AM_RANGE(0xf00000, 0xf00001) AM_READ8(comad_okim6295_r, 0xff00) AM_DEVWRITE8("oki", okim6295_device, write, 0xff00) /* fantasia, missw96 */
378ADDRESS_MAP_END
379357
380
381358static INPUT_PORTS_START( galpanic )
382359   PORT_START("DSW1")
383360   PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" )
r243483r243484
638615   MCFG_CPU_PROGRAM_MAP(supmodel_map)
639616   //MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1)
640617
618   /* video hardware */
619   MCFG_SCREEN_MODIFY("screen")
620   MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update_comad)
621   MCFG_SCREEN_VBLANK_NONE()
622
641623   /* sound hardware */
642624   MCFG_OKIM6295_REPLACE("oki", 1584000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
643625   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
644626MACHINE_CONFIG_END
645627
646static MACHINE_CONFIG_DERIVED( smissw, comad ) // 951127 PCB, 12 & 16 clocks
647628
648   /* basic machine hardware */
649   MCFG_CPU_MODIFY("maincpu")
650   MCFG_CPU_CLOCK(12000000)
651   MCFG_CPU_PROGRAM_MAP(smissw_map)
652   MCFG_TIMER_MODIFY("scantimer")
653   MCFG_TIMER_DRIVER_CALLBACK(galpanic_state, galhustl_scanline)
654
655MACHINE_CONFIG_END
656
657
658
659629static MACHINE_CONFIG_DERIVED( fantsia2, comad )
660630
661631   /* basic machine hardware */
r243483r243484
963933   ROM_LOAD( "mw96_02.bin",  0xc0000, 0x80000, CRC(60fa0c00) SHA1(391aa31e61663cc083a8a2320ba48a9859f3fd4e) )
964934ROM_END
965935
966ROM_START( smissw )
967   ROM_REGION( 0x500000, "maincpu", 0 )    /* 68000 code */
968   ROM_LOAD16_BYTE( "10_PROG2.UE17",  0x000000, 0x80000, CRC(e99e520f) SHA1(edd06a3b0f8d30a4020e6ea452abb0afd79d426a) )
969   ROM_LOAD16_BYTE( "6_PROG1.UD17",   0x000001, 0x80000, CRC(22831657) SHA1(eeabcdef543048ccceabc4c3b4b288aec959a14f) )
970   ROM_LOAD16_BYTE( "9_IM1-B.UE16B",  0x100000, 0x80000, CRC(fff1eee4) SHA1(1b88d45b5cc0b5a03296d4dc950e570fa4dc19c2) )
971   ROM_LOAD16_BYTE( "5_IM1-A.UE16A",  0x100001, 0x80000, CRC(2134a72d) SHA1(f907ec8a1d6e5755a821e69564074ff05e426bb1) )
972   ROM_LOAD16_BYTE( "8_IM2-B.UE15B",  0x200000, 0x80000, CRC(cf44b638) SHA1(0fe5bdb62492c31c3efffa6d85f5d6a3b4ddb2e0) )
973   ROM_LOAD16_BYTE( "4_IM2-A.UE15A",  0x200001, 0x80000, CRC(d22b270f) SHA1(21bd2ced1b5fb3c08687addaa890ee621a56fff0) )
974   ROM_LOAD16_BYTE( "7_IM3-B.UE14B",  0x300000, 0x80000, CRC(12a9441d) SHA1(d9cd51e0c3ffac5fc561e0927c419bce0157337e) )
975   ROM_LOAD16_BYTE( "3_IM3-A.UE14A",  0x300001, 0x80000, CRC(8c656fc9) SHA1(c3fe5de7cd6cd520bbd205ec62ac0dda51f71eeb) )
976
977   ROM_REGION( 0x80000, "gfx1", 0 )    /* sprites */
978   ROM_LOAD( "15_OBJ11.U5",  0x00000, 0x80000, CRC(3983152f) SHA1(6308e936ba54e88b34253f1d4fbd44725e9d88ae) )
979
980   ROM_REGION( 0x140000, "oki", 0 )    /* OKIM6295 samples */
981   /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
982   ROM_LOAD( "1_MUSIC1.UB6",  0x00000, 0x80000, CRC(e78a659e) SHA1(d209184c70e0d7e6d17034c6f536535cda782d42) )
983   ROM_RELOAD(               0x40000, 0x80000 )
984   ROM_LOAD( "2_MUSIC2.UC6",  0xc0000, 0x80000, CRC(60fa0c00) SHA1(391aa31e61663cc083a8a2320ba48a9859f3fd4e) )
985ROM_END
986
987
988936ROM_START( fantsia2 )
989937   ROM_REGION( 0x500000, "maincpu", 0 )    /* 68000 code */
990938   ROM_LOAD16_BYTE( "prog2.g17",    0x000000, 0x80000, CRC(57c59972) SHA1(4b1da928b537cf340a67026d07bc3dfc078b0d0f) )
r243483r243484
11861134GAME( 1996, missw96b, missw96,  comad,    missw96,   driver_device, 0, ROT0,  "Comad",                    "Miss World '96 (Nude) (set 3)", GAME_NO_COCKTAIL )
11871135GAME( 1996, missmw96, missw96,  comad,    missw96,   driver_device, 0, ROT0,  "Comad",                    "Miss Mister World '96 (Nude)", GAME_NO_COCKTAIL )
11881136
1189GAME( 1996, smissw,   0,        smissw,   missw96,   driver_device, 0, ROT0,  "Comad",                    "Super Miss World", GAME_NO_COCKTAIL ) // 951127 PCB
1190
11911137GAME( 1997, fantsia2, 0,        fantsia2, missw96,   driver_device, 0, ROT0,  "Comad",                    "Fantasia II (Explicit)", GAME_NO_COCKTAIL )
11921138GAME( 1997, fantsia2a,fantsia2, fantsia2, missw96,   driver_device, 0, ROT0,  "Comad",                    "Fantasia II (Less Explicit)", GAME_NO_COCKTAIL )
11931139
trunk/src/mame/drivers/gladiatr.c
r243483r243484
99          input port patches, panning fix, sprite banking,
1010          Golden Castle Rom Set Support
1111- Phil Stroffolino: palette, sprites, misc video driver fixes
12- Tatsuyuki Satoh: YM2203 sound improvements, NEC 8741 simulation, ADPCM with MC6809
12- Tatsuyuki Satoh: YM2203 sound improvements, NEC 8741 simulation,ADPCM with MC6809
1313- Tomasz Slanina   preliminary Ping Pong King driver
1414- Nicola Salmoria  clean up
1515
r243483r243484
1717- Camilty for precious hardware information and screenshots
1818- Jason Richmond for hardware information and misc. notes
1919- Joe Rounceville for schematics
20- and everyone else who's offered support along the way!
20- and everyone else who'se offered support along the way!
2121
2222
2323***************************************************************************
r243483r243484
268268}
269269
270270/*Sound Functions*/
271WRITE8_MEMBER(gladiatr_state::gladiator_adpcm_w)
271WRITE8_MEMBER(gladiatr_state::glad_adpcm_w)
272272{
273273   UINT8 *rom = memregion("audiocpu")->base() + 0x10000;
274274
r243483r243484
280280   m_msm->vclk_w (BIT(data, 4)); /* bit4     */
281281}
282282
283WRITE8_MEMBER(gladiatr_state::gladiator_cpu_sound_command_w)
283WRITE8_MEMBER(gladiatr_state::glad_cpu_sound_command_w)
284284{
285285   soundlatch_byte_w(space,0,data);
286286   m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
287287}
288288
289READ8_MEMBER(gladiatr_state::gladiator_cpu_sound_command_r)
289READ8_MEMBER(gladiatr_state::glad_cpu_sound_command_r)
290290{
291291   m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
292292   return soundlatch_byte_r(space,0);
r243483r243484
299299
300300
301301#if 1
302/* !!!!! patch to IRQ timing for 2nd CPU !!!!! */
302/* !!!!! patch to IRQ timming for 2nd CPU !!!!! */
303303WRITE8_MEMBER(gladiatr_state::gladiatr_irq_patch_w)
304304{
305305   m_subcpu->set_input_line(0, HOLD_LINE);
r243483r243484
312312
313313
314314
315WRITE8_MEMBER(gladiatr_state::ppking_qx0_w)
315WRITE8_MEMBER(gladiatr_state::qx0_w)
316316{
317317   if(!offset)
318318   {
r243483r243484
321321   }
322322}
323323
324WRITE8_MEMBER(gladiatr_state::ppking_qx1_w)
324WRITE8_MEMBER(gladiatr_state::qx1_w)
325325{
326326   if(!offset)
327327   {
r243483r243484
330330   }
331331}
332332
333WRITE8_MEMBER(gladiatr_state::ppking_qx2_w){ }
333WRITE8_MEMBER(gladiatr_state::qx2_w){ }
334334
335WRITE8_MEMBER(gladiatr_state::ppking_qx3_w){ }
335WRITE8_MEMBER(gladiatr_state::qx3_w){ }
336336
337READ8_MEMBER(gladiatr_state::ppking_qx2_r){ return machine().rand(); }
337READ8_MEMBER(gladiatr_state::qx2_r){ return machine().rand(); }
338338
339READ8_MEMBER(gladiatr_state::ppking_qx3_r){ return machine().rand()&0xf; }
339READ8_MEMBER(gladiatr_state::qx3_r){ return machine().rand()&0xf; }
340340
341READ8_MEMBER(gladiatr_state::ppking_qx0_r)
341READ8_MEMBER(gladiatr_state::qx0_r)
342342{
343343   if(!offset)
344344         return m_data1;
r243483r243484
346346      return m_flag2;
347347}
348348
349READ8_MEMBER(gladiatr_state::ppking_qx1_r)
349READ8_MEMBER(gladiatr_state::qx1_r)
350350{
351351   if(!offset)
352352      return m_data2;
r243483r243484
364364   AM_RANGE(0x0000, 0xbfff) AM_ROM
365365   AM_RANGE(0xc000, 0xcbff) AM_RAM AM_SHARE("spriteram")
366366   AM_RANGE(0xcc00, 0xcfff) AM_WRITE(ppking_video_registers_w)
367   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
368   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
369   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
370   AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(textram_w) AM_SHARE("textram")
367   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(gladiatr_paletteram_w) AM_SHARE("paletteram")
368   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(gladiatr_videoram_w) AM_SHARE("videoram")
369   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(gladiatr_colorram_w) AM_SHARE("colorram")
370   AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(gladiatr_textram_w) AM_SHARE("textram")
371371   AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
372372ADDRESS_MAP_END
373373
r243483r243484
379379
380380static ADDRESS_MAP_START( ppking_cpu1_io, AS_IO, 8, gladiatr_state )
381381//  ADDRESS_MAP_GLOBAL_MASK(0xff)
382   AM_RANGE(0xc000, 0xc000) AM_WRITE(spritebuffer_w)
382   AM_RANGE(0xc000, 0xc000) AM_WRITE(gladiatr_spritebuffer_w)
383383   AM_RANGE(0xc004, 0xc004) AM_NOP // WRITE(ppking_irq_patch_w)
384   AM_RANGE(0xc09e, 0xc09f) AM_READ(ppking_qx0_r) AM_WRITE(ppking_qx0_w)
384   AM_RANGE(0xc09e, 0xc09f) AM_READ(qx0_r) AM_WRITE(qx0_w)
385385   AM_RANGE(0xc0bf, 0xc0bf) AM_NOP
386386ADDRESS_MAP_END
387387
388388static ADDRESS_MAP_START( ppking_cpu2_io, AS_IO, 8, gladiatr_state )
389389   ADDRESS_MAP_GLOBAL_MASK(0xff)
390390   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
391   AM_RANGE(0x20, 0x21) AM_READ(ppking_qx1_r) AM_WRITE(ppking_qx1_w)
391   AM_RANGE(0x20, 0x21) AM_READ(qx1_r) AM_WRITE(qx1_w)
392392   AM_RANGE(0x40, 0x40) AM_READNOP
393   AM_RANGE(0x60, 0x61) AM_READWRITE(ppking_qx2_r,ppking_qx2_w)
394   AM_RANGE(0x80, 0x81) AM_READWRITE(ppking_qx3_r,ppking_qx3_w)
393   AM_RANGE(0x60, 0x61) AM_READWRITE(qx2_r,qx2_w)
394   AM_RANGE(0x80, 0x81) AM_READWRITE(qx3_r,qx3_w)
395395ADDRESS_MAP_END
396396
397397
r243483r243484
402402   AM_RANGE(0x6000, 0xbfff) AM_ROMBANK("bank1")
403403   AM_RANGE(0xc000, 0xcbff) AM_RAM AM_SHARE("spriteram")
404404   AM_RANGE(0xcc00, 0xcfff) AM_WRITE(gladiatr_video_registers_w)
405   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
406   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
407   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
408   AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(textram_w) AM_SHARE("textram")
405   AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(gladiatr_paletteram_w) AM_SHARE("paletteram")
406   AM_RANGE(0xd800, 0xdfff) AM_RAM_WRITE(gladiatr_videoram_w) AM_SHARE("videoram")
407   AM_RANGE(0xe000, 0xe7ff) AM_RAM_WRITE(gladiatr_colorram_w) AM_SHARE("colorram")
408   AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(gladiatr_textram_w) AM_SHARE("textram")
409409   AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram") /* battery backed RAM */
410410ADDRESS_MAP_END
411411
r243483r243484
415415ADDRESS_MAP_END
416416
417417static ADDRESS_MAP_START( gladiatr_cpu3_map, AS_PROGRAM, 8, gladiatr_state )
418   AM_RANGE(0x1000, 0x1fff) AM_WRITE(gladiator_adpcm_w)
419   AM_RANGE(0x2000, 0x2fff) AM_READ(gladiator_cpu_sound_command_r)
418   AM_RANGE(0x1000, 0x1fff) AM_WRITE(glad_adpcm_w)
419   AM_RANGE(0x2000, 0x2fff) AM_READ(glad_cpu_sound_command_r)
420420   AM_RANGE(0x4000, 0xffff) AM_ROMBANK("bank2")
421421ADDRESS_MAP_END
422422
423423
424424static ADDRESS_MAP_START( gladiatr_cpu1_io, AS_IO, 8, gladiatr_state )
425425//  ADDRESS_MAP_GLOBAL_MASK(0xff)
426   AM_RANGE(0xc000, 0xc000) AM_WRITE(spritebuffer_w)
426   AM_RANGE(0xc000, 0xc000) AM_WRITE(gladiatr_spritebuffer_w)
427427   AM_RANGE(0xc001, 0xc001) AM_WRITE(gladiatr_spritebank_w)
428428   AM_RANGE(0xc002, 0xc002) AM_WRITE(gladiatr_bankswitch_w)
429429   AM_RANGE(0xc004, 0xc004) AM_WRITE(gladiatr_irq_patch_w) /* !!! patch to 2nd CPU IRQ !!! */
r243483r243484
440440   AM_RANGE(0x60, 0x61) AM_DEVREADWRITE("taito8741", taito8741_4pack_device, read_2, write_2)
441441   AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("taito8741", taito8741_4pack_device, read_3, write_3)
442442   AM_RANGE(0xa0, 0xa7) AM_NOP // filters on sound output
443   AM_RANGE(0xe0, 0xe0) AM_WRITE(gladiator_cpu_sound_command_w)
443   AM_RANGE(0xe0, 0xe0) AM_WRITE(glad_cpu_sound_command_w)
444444ADDRESS_MAP_END
445445
446446
r243483r243484
611611
612612
613613
614READ8_MEMBER(gladiatr_state::ppking_f1_r)
614READ8_MEMBER(gladiatr_state::f1_r)
615615{
616616   return machine().rand();
617617}
r243483r243484
655655   MCFG_SPEAKER_STANDARD_MONO("mono")
656656
657657   MCFG_SOUND_ADD("ymsnd", YM2203, XTAL_12MHz/8) /* verified on pcb */
658   MCFG_AY8910_PORT_A_READ_CB(READ8(gladiatr_state, ppking_f1_r))
659   MCFG_AY8910_PORT_B_READ_CB(READ8(gladiatr_state, ppking_f1_r))
658   MCFG_AY8910_PORT_A_READ_CB(READ8(gladiatr_state, f1_r))
659   MCFG_AY8910_PORT_B_READ_CB(READ8(gladiatr_state, f1_r))
660660   MCFG_SOUND_ROUTE(0, "mono", 0.60)
661661   MCFG_SOUND_ROUTE(1, "mono", 0.60)
662662   MCFG_SOUND_ROUTE(2, "mono", 0.60)
r243483r243484
10011001}
10021002
10031003
1004READ8_MEMBER(gladiatr_state::ppking_f6a3_r)
1004READ8_MEMBER(gladiatr_state::f6a3_r)
10051005{
10061006   if(space.device().safe_pcbase()==0x8e)
10071007      m_nvram[0x6a3]=1;
r243483r243484
10311031         rom[i+2*j*0x2000] = rom[i+j*0x2000];
10321032      }
10331033   }
1034   m_maincpu->space(AS_PROGRAM).install_read_handler(0xf6a3,0xf6a3,read8_delegate(FUNC(gladiatr_state::ppking_f6a3_r),this));
1035   
1036   save_item(NAME(m_data1));
1037   save_item(NAME(m_data2));
1034   m_maincpu->space(AS_PROGRAM).install_read_handler(0xf6a3,0xf6a3,read8_delegate(FUNC(gladiatr_state::f6a3_r),this));
10381035}
10391036
10401037
10411038
1042GAME( 1985, ppking,   0,        ppking,   0,        gladiatr_state, ppking,   ROT90, "Taito America Corporation", "Ping-Pong King", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
1043GAME( 1986, gladiatr, 0,        gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito America Corporation", "Gladiator (US)", GAME_SUPPORTS_SAVE )
1044GAME( 1986, ogonsiro, gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Ougon no Shiro (Japan)", GAME_SUPPORTS_SAVE )
1045GAME( 1986, greatgur, gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Great Gurianos (Japan?)", GAME_SUPPORTS_SAVE )
1046GAME( 1986, gcastle,  gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Golden Castle (prototype?)", GAME_SUPPORTS_SAVE ) // incomplete dump
1039GAME( 1985, ppking,   0,        ppking,   0,        gladiatr_state, ppking,   ROT90, "Taito America Corporation", "Ping-Pong King", GAME_NOT_WORKING)
1040GAME( 1986, gladiatr, 0,        gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito America Corporation", "Gladiator (US)", 0 )
1041GAME( 1986, ogonsiro, gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Ougon no Shiro (Japan)", 0 )
1042GAME( 1986, greatgur, gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Great Gurianos (Japan?)", 0 )
1043GAME( 1986, gcastle,  gladiatr, gladiatr, gladiatr, gladiatr_state, gladiatr, ROT0,  "Allumer / Taito Corporation", "Golden Castle (prototype?)", 0 ) // incomplete dump
trunk/src/mame/drivers/gsword.c
r243483r243484
44
55TODO:
66
7-joshi volleyball
7-joshi vollyball
88   -The incomplete graphic
99   -The implementation of DAC sound ?
1010   -MCU code DUMP and emulation
r243483r243484
1414Credits:
1515- Steve Ellenoff: Original emulation and Mame driver
1616- Jarek Parchanski: Dip Switch Fixes, Color improvements, ADPCM Interface code
17- Tatsuyuki Satoh: sound improvements, NEC 8741 emulation, adpcm improvements,
17- Tatsuyuki Satoh: sound improvements, NEC 8741 emulation,adpcm improvements,
1818            josvollyvall 8741 emulation
1919- Charlie Miltenberger: sprite colors improvements & precious hardware
2020            information and screenshots
r243483r243484
144144#include "emu.h"
145145#include "cpu/z80/z80.h"
146146#include "machine/tait8741.h"
147#include "sound/ay8910.h"
147148#include "sound/msm5205.h"
148149#include "includes/gsword.h"
149150
150151
151152#if 0
152int gsword_state::coins_in(void)
153int gsword_state::gsword_coins_in(void)
153154{
154155   /* emulate 8741 coin slot */
155156   if (ioport("IN4")->read() & 0xc0)
r243483r243484
164165
165166#include "cpu/z80/z80.h"
166167
167
168168/* CPU 2 memory hack */
169169/* (402E) timeout upcount must be under 0AH                         */
170170/* (4004,4005) clear down counter , if (4004,4005)==0 then (402E)=0 */
r243483r243484
174174
175175   /*if(offset==1)osd_printf_debug("CNT %02X%02X\n",m_cpu2_ram[5],m_cpu2_ram[4]); */
176176
177   /* speedup timeout count down */
177   /* speedup timeout cound down */
178178   if(m_protect_hack)
179179   {
180180      switch(offset)
r243483r243484
219219   return 0;
220220}
221221
222void gsword_state::machine_start()
222MACHINE_RESET_MEMBER(gsword_state,gsword)
223223{
224   save_item(NAME(m_fake8910_0));
225   save_item(NAME(m_fake8910_1));
226   save_item(NAME(m_nmi_enable));
227   save_item(NAME(m_protect_hack));
228}
229
230void gsword_state::machine_reset()
231{
232224   m_coins = 0;
233225
234226   /* snd CPU mask NMI during reset phase */
r243483r243484
236228   m_protect_hack = 0;
237229}
238230
231MACHINE_RESET_MEMBER(gsword_state,josvolly)
232{
233}
234
239235INTERRUPT_GEN_MEMBER(gsword_state::gsword_snd_interrupt)
240236{
241237   if(m_nmi_enable)
242238      device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
243239}
244240
245WRITE8_MEMBER(gsword_state::nmi_set_w)
241WRITE8_MEMBER(gsword_state::gsword_nmi_set_w)
246242{
247243/*  osd_printf_debug("AY write %02X\n",data);*/
248244
r243483r243484
257253   switch(data)
258254   {
259255   case 0xff:
260      m_nmi_enable = 0; /* NMI must be disabled */
256      m_nmi_enable = 0; /* NMI must be disable */
261257      break;
262258   case 0x02:
263259      m_nmi_enable = 0; /* ANY */
r243483r243484
266262      m_nmi_enable = 1;
267263      break;
268264   case 0x0f:
269      m_nmi_enable = 1; /* NMI must be enabled */
265      m_nmi_enable = 1; /* NMI must be enable */
270266      break;
271267   case 0xfe:
272      m_nmi_enable = 1; /* NMI must be enabled */
268      m_nmi_enable = 1; /* NMI must be enable */
273269      break;
274270   }
275271   /* bit1= nmi disable , for ram check */
r243483r243484
277273#endif
278274}
279275
280WRITE8_MEMBER(gsword_state::ay8910_control_port_0_w)
276WRITE8_MEMBER(gsword_state::gsword_AY8910_control_port_0_w)
281277{
282   m_ay0->address_w(space,offset,data);
278   ay8910_device *ay8910 = machine().device<ay8910_device>("ay1");
279   ay8910->address_w(space,offset,data);
283280   m_fake8910_0 = data;
284281}
285WRITE8_MEMBER(gsword_state::ay8910_control_port_1_w)
282WRITE8_MEMBER(gsword_state::gsword_AY8910_control_port_1_w)
286283{
287   m_ay1->address_w(space,offset,data);
284   ay8910_device *ay8910 = machine().device<ay8910_device>("ay2");
285   ay8910->address_w(space,offset,data);
288286   m_fake8910_1 = data;
289287}
290288
291READ8_MEMBER(gsword_state::fake_0_r)
289READ8_MEMBER(gsword_state::gsword_fake_0_r)
292290{
293291   return m_fake8910_0+1;
294292}
295READ8_MEMBER(gsword_state::fake_1_r)
293READ8_MEMBER(gsword_state::gsword_fake_1_r)
296294{
297295   return m_fake8910_1+1;
298296}
r243483r243484
310308   m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
311309}
312310
313
314311static ADDRESS_MAP_START( cpu1_map, AS_PROGRAM , 8, gsword_state )
315312   AM_RANGE(0x0000, 0x8fff) AM_ROM
316313   AM_RANGE(0x9000, 0x9fff) AM_RAM
r243483r243484
318315   AM_RANGE(0xa380, 0xa3ff) AM_RAM AM_SHARE("spritetile_ram")
319316   AM_RANGE(0xa400, 0xa77f) AM_RAM
320317   AM_RANGE(0xa780, 0xa7ff) AM_RAM AM_SHARE("spritexy_ram")
321   AM_RANGE(0xa980, 0xa980) AM_WRITE(charbank_w)
322   AM_RANGE(0xaa80, 0xaa80) AM_WRITE(videoctrl_w)   /* flip screen, char palette bank */
323   AM_RANGE(0xab00, 0xab00) AM_WRITE(scroll_w)
318   AM_RANGE(0xa980, 0xa980) AM_WRITE(gsword_charbank_w)
319   AM_RANGE(0xaa80, 0xaa80) AM_WRITE(gsword_videoctrl_w)   /* flip screen, char palette bank */
320   AM_RANGE(0xab00, 0xab00) AM_WRITE(gsword_scroll_w)
324321   AM_RANGE(0xab80, 0xabff) AM_WRITEONLY AM_SHARE("spriteattram")
325   AM_RANGE(0xb000, 0xb7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
322   AM_RANGE(0xb000, 0xb7ff) AM_RAM_WRITE(gsword_videoram_w) AM_SHARE("videoram")
326323ADDRESS_MAP_END
327324
328325static ADDRESS_MAP_START( cpu1_io_map, AS_IO, 8, gsword_state )
r243483r243484
347344   AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("taito8741", taito8741_4pack_device, read_2, write_2)
348345   AM_RANGE(0x20, 0x21) AM_DEVREADWRITE("taito8741", taito8741_4pack_device, read_3, write_3)
349346   AM_RANGE(0x40, 0x41) AM_DEVREADWRITE("taito8741", taito8741_4pack_device, read_1, write_1)
350   AM_RANGE(0x60, 0x60) AM_READWRITE(fake_0_r, ay8910_control_port_0_w)
347   AM_RANGE(0x60, 0x60) AM_READWRITE(gsword_fake_0_r, gsword_AY8910_control_port_0_w)
351348   AM_RANGE(0x61, 0x61) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
352   AM_RANGE(0x80, 0x80) AM_READWRITE(fake_1_r, ay8910_control_port_1_w)
349   AM_RANGE(0x80, 0x80) AM_READWRITE(gsword_fake_1_r, gsword_AY8910_control_port_1_w)
353350   AM_RANGE(0x81, 0x81) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
354351//
355352   AM_RANGE(0xe0, 0xe0) AM_READNOP /* ?? */
r243483r243484
381378
382379static ADDRESS_MAP_START( josvolly_cpu2_io_map, AS_IO, 8, gsword_state )
383380   ADDRESS_MAP_GLOBAL_MASK(0xff)
384   AM_RANGE(0x00, 0x00) AM_READWRITE(fake_0_r, ay8910_control_port_0_w)
381   AM_RANGE(0x00, 0x00) AM_READWRITE(gsword_fake_0_r, gsword_AY8910_control_port_0_w)
385382   AM_RANGE(0x01, 0x01) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_w)
386   AM_RANGE(0x40, 0x40) AM_READWRITE(fake_1_r, ay8910_control_port_1_w)
383   AM_RANGE(0x40, 0x40) AM_READWRITE(gsword_fake_1_r, gsword_AY8910_control_port_1_w)
387384   AM_RANGE(0x41, 0x41) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_w)
388385
389386   AM_RANGE(0x81, 0x81) AM_DEVWRITE("josvolly_8741", josvolly8741_4pack_device, nmi_enable_w)
r243483r243484
641638
642639   MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* Allow time for 2nd cpu to interleave*/
643640
641   MCFG_MACHINE_RESET_OVERRIDE(gsword_state,gsword)
642
644643   MCFG_TAITO8741_ADD("taito8741")
645644   MCFG_TAITO8741_MODES(TAITO8741_MASTER,TAITO8741_SLAVE,TAITO8741_PORT,TAITO8741_PORT)
646645   MCFG_TAITO8741_CONNECT(1,0,0,0)
r243483r243484
671670   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
672671
673672   MCFG_SOUND_ADD("ay2", AY8910, 1500000)
674   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, nmi_set_w)) /* portA write */
673   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, gsword_nmi_set_w)) /* portA write */
675674   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
676675
677676   MCFG_SOUND_ADD("msm", MSM5205, XTAL_400kHz) /* verified on pcb */
r243483r243484
692691   MCFG_CPU_IO_MAP(josvolly_cpu2_io_map)
693692   MCFG_CPU_VBLANK_INT_DRIVER("screen", gsword_state,  irq0_line_hold)
694693
694   MCFG_MACHINE_RESET_OVERRIDE(gsword_state,josvolly)
695
695696   MCFG_JOSVOLLY8741_ADD("josvolly_8741")
696697   MCFG_JOSVOLLY8741_CONNECT(1,0,0,0)
697698   MCFG_JOSVOLLY8741_PORT_HANDLERS(IOPORT("DSW1"),IOPORT("DSW2"),IOPORT("DSW1"),IOPORT("DSW2"))
r243483r243484
718719   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
719720
720721   MCFG_SOUND_ADD("ay2", AY8910, 1500000)
721   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, nmi_set_w)) /* portA write */
722   MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(gsword_state, gsword_nmi_set_w)) /* portA write */
722723   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
723724
724725#if 0
r243483r243484
900901}
901902
902903
903GAME( 1983, josvolly, 0,      josvolly, josvolly, driver_device,  0,       ROT90, "Allumer / Taito Corporation", "Joshi Volleyball", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
904GAME( 1984, gsword,   0,      gsword,   gsword,   gsword_state,   gsword,  ROT0,  "Allumer / Taito Corporation", "Great Swordsman (World?)", GAME_SUPPORTS_SAVE )
905GAME( 1984, gsword2,  gsword, gsword,   gsword,   gsword_state,   gsword2, ROT0,  "Allumer / Taito Corporation", "Great Swordsman (Japan?)", GAME_SUPPORTS_SAVE )
904GAME( 1983, josvolly, 0,      josvolly, josvolly, driver_device,  0,       ROT90, "Allumer / Taito Corporation", "Joshi Volleyball", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
905GAME( 1984, gsword,   0,      gsword,   gsword,   gsword_state,   gsword,  ROT0,  "Allumer / Taito Corporation", "Great Swordsman (World?)", 0 )
906GAME( 1984, gsword2,  gsword, gsword,   gsword,   gsword_state,   gsword2, ROT0,  "Allumer / Taito Corporation", "Great Swordsman (Japan?)", 0 )
trunk/src/mame/drivers/hornet.c
r243483r243484
338338      m_gn680(*this, "gn680"),
339339      m_dsp(*this, "dsp"),
340340      m_dsp2(*this, "dsp2"),
341      m_eeprom(*this, "eeprom"),
341342      m_k037122_1(*this, "k037122_1"),
342343      m_k037122_2(*this, "k037122_2" ),
343344      m_adc12138(*this, "adc12138"),
344      m_konppc(*this, "konppc"),
345      m_lan_eeprom(*this, "lan_eeprom"),
346345      m_in0(*this, "IN0"),
347346      m_in1(*this, "IN1"),
348347      m_in2(*this, "IN2"),
349348      m_dsw(*this, "DSW"),
350349      m_eepromout(*this, "EEPROMOUT"),
351350      m_analog1(*this, "ANALOG1"),
352      m_analog2(*this, "ANALOG2")
353   { }
351      m_analog2(*this, "ANALOG2"),
352      m_konppc(*this, "konppc"){ }
354353
355354   // TODO: Needs verification on real hardware
356355   static const int m_sound_timer_usec = 2800;
r243483r243484
364363   optional_device<cpu_device> m_gn680;
365364   required_device<cpu_device> m_dsp;
366365   optional_device<cpu_device> m_dsp2;
366   required_device<eeprom_serial_93cxx_device> m_eeprom;
367367   optional_device<k037122_device> m_k037122_1;
368368   optional_device<k037122_device> m_k037122_2;
369369   required_device<adc12138_device> m_adc12138;
370   required_ioport m_in0, m_in1, m_in2, m_dsw, m_eepromout;
371   optional_ioport m_analog1, m_analog2;
370372   required_device<konppc_device> m_konppc;
371   optional_device<eeprom_serial_93cxx_device> m_lan_eeprom;
372   required_ioport m_in0, m_in1, m_in2, m_dsw;
373   optional_ioport m_eepromout, m_analog1, m_analog2;
374373
375374   emu_timer *m_sound_irq_timer;
376375   UINT8 m_led_reg0;
r243483r243484
535534             0x02 = ADDOR (ADC DOR)
536535             0x01 = ADDO (ADC DO)
537536         */
538         r = 0xf0;
539         if (m_lan_eeprom)
540            r |= m_lan_eeprom->do_read() << 3;
537         r = 0xf0 | (m_eeprom->do_read() << 3);
541538         r |= m_adc12138->do_r(space, 0) | (m_adc12138->eoc_r(space, 0) << 2);
542539         break;
543540
r243483r243484
575572             0x02 = LAMP1
576573             0x01 = LAMP0
577574         */
578         if (m_eepromout)
579            m_eepromout->write(data, 0xff);
575         m_eepromout->write(data, 0xff);
580576         osd_printf_debug("System register 0 = %02X\n", data);
581577         break;
582578
r243483r243484
881877   PORT_DIPNAME( 0x01, 0x01, "Monitor Type" ) PORT_DIPLOCATION("SW:8")
882878   PORT_DIPSETTING( 0x01, "24KHz" )
883879   PORT_DIPSETTING( 0x00, "15KHz" )
880
881   PORT_START( "EEPROMOUT" )
882   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, di_write)
883   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, clk_write)
884   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, cs_write)
884885INPUT_PORTS_END
885886
886887static INPUT_PORTS_START( sscope )
r243483r243484
901902   PORT_BIT( 0x7ff, 0x3ff, IPT_AD_STICK_Y ) PORT_MINMAX(0x000, 0x7ff) PORT_SENSITIVITY(35) PORT_KEYDELTA(5) PORT_INVERT
902903INPUT_PORTS_END
903904
904static INPUT_PORTS_START( sscope2 )
905   PORT_INCLUDE( sscope )
906905
907   // LAN board EEPROM
908   PORT_START( "EEPROMOUT" )
909   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, di_write)
910   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, clk_write)
911   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("lan_eeprom", eeprom_serial_93cxx_device, cs_write)
912INPUT_PORTS_END
913
914
915906/* PowerPC interrupts
916907
917908    IRQ0:   Vblank CG Board 0
r243483r243484
986977
987978   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
988979
989//  PCB description at top doesn't mention any EEPROM on the base board...
990//   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
991980
981   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
982
992983   MCFG_DEVICE_ADD("voodoo0", VOODOO_1, STD_VOODOO_1_CLOCK)
993984   MCFG_VOODOO_FBMEM(2)
994985   MCFG_VOODOO_TMUMEM(4,0)
r243483r243484
15371528
15381529/*************************************************************************/
15391530
1540GAME(  1998, gradius4,  0,        hornet,           hornet,  hornet_state, hornet,        ROT0, "Konami", "Gradius 4: Fukkatsu", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1541GAME(  1998, nbapbp,    0,        hornet,           hornet,  hornet_state, hornet,        ROT0, "Konami", "NBA Play By Play", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1542GAMEL( 1998, terabrst,  0,        terabrst,         hornet,  hornet_state, hornet_2board, ROT0, "Konami", "Teraburst (1998/07/17 ver UEL)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1543GAMEL( 1998, terabrsta, terabrst, terabrst,         hornet,  hornet_state, hornet_2board, ROT0, "Konami", "Teraburst (1998/02/25 ver AAA)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1531GAME(  1998, gradius4,  0,        hornet,           hornet, hornet_state, hornet,        ROT0, "Konami", "Gradius 4: Fukkatsu", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1532GAME(  1998, nbapbp,    0,        hornet,           hornet, hornet_state, hornet,        ROT0, "Konami", "NBA Play By Play", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
1533GAMEL( 1998, terabrst,  0,        terabrst,         hornet, hornet_state, hornet_2board, ROT0, "Konami", "Teraburst (1998/07/17 ver UEL)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1534GAMEL( 1998, terabrsta, terabrst, terabrst,         hornet, hornet_state, hornet_2board, ROT0, "Konami", "Teraburst (1998/02/25 ver AAA)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE, layout_dualhsxs )
15441535
15451536// The region comes from the Timekeeper NVRAM, without a valid default all sets except 'xxD, Ver 1.33' will init their NVRAM to UAx versions, the xxD set seems to incorrectly init it to JXD, which isn't a valid
15461537// version, and thus can't be booted.  If you copy the NVRAM from another already initialized set, it will boot as UAD.
15471538// to get the actual game to boot you must calibrate the guns etc.
1548GAMEL( 2000, sscope,    0,        hornet_2board,    sscope,  hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxD, Ver 1.33)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1549GAMEL( 2000, sscopec,   sscope,   hornet_2board,    sscope,  hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxC, Ver 1.30)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1550GAMEL( 2000, sscopeb,   sscope,   hornet_2board,    sscope,  hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxB, Ver 1.20)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1551GAMEL( 2000, sscopea,   sscope,   hornet_2board,    sscope,  hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxA, Ver 1.00)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1539GAMEL( 2000, sscope,    0,        hornet_2board,    sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxD, Ver 1.33)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1540GAMEL( 2000, sscopec,   sscope,   hornet_2board,    sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxC, Ver 1.30)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1541GAMEL( 2000, sscopeb,   sscope,   hornet_2board,    sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxB, Ver 1.20)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1542GAMEL( 2000, sscopea,   sscope,   hornet_2board,    sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope (ver xxA, Ver 1.00)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
15521543
1553GAMEL( 2000, sscope2,   0,        sscope2,          sscope2, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
1544GAMEL( 2000, sscope2,   0,        sscope2,          sscope, hornet_state, hornet_2board, ROT0, "Konami", "Silent Scope 2", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_dualhsxs )
trunk/src/mame/drivers/igs011.c
r243483r243484
233233   void ryukobou_decrypt();
234234   void lhb2_decrypt_gfx();
235235   void drgnwrld_gfx_decrypt();
236   void prot_mem_range_set();
237236};
238237
239238
r243483r243484
11031102   sp.install_rom(m_prot1_addr + 0, m_prot1_addr + 9, rom + m_prot1_addr);
11041103
11051104   m_prot1_addr = (data << 4) ^ 0x8340;
1106   
1107   prot_mem_range_set();
1108}
11091105
1110void igs011_state::prot_mem_range_set()
1111{   
1112   address_space &sp = m_maincpu->space(AS_PROGRAM);
1113   
11141106   // Add protection memory range
11151107   sp.install_write_handler(m_prot1_addr + 0, m_prot1_addr + 7, write16_delegate(FUNC(igs011_state::igs011_prot1_w), this));
11161108   sp.install_read_handler (m_prot1_addr + 8, m_prot1_addr + 9, read16_delegate(FUNC(igs011_state::igs011_prot1_r), this));
r243483r243484
22922284    rom[0x1e6e6/2] = 0x600c;    // 01E6E6: 670C      beq     $1e6f4
22932285    rom[0x1f7ce/2] = 0x600c;    // 01F7CE: 670C      beq     $1f7dc
22942286*/
2295   machine().save().register_postload(save_prepost_delegate(FUNC(igs011_state::prot_mem_range_set), this));
22962287}
22972288
22982289
r243483r243484
23162307    rom[0x1e6e6/2] = 0x600c;    // 01E6E6: 670C      beq     $1e6f4
23172308    rom[0x1f7c8/2] = 0x600c;    // 01F7C8: 670C      beq     1f7d6
23182309*/
2319   machine().save().register_postload(save_prepost_delegate(FUNC(igs011_state::prot_mem_range_set), this));
23202310}
23212311
23222312
trunk/src/mame/drivers/jpmsys5.c
r243483r243484
295295
296296static ADDRESS_MAP_START( 68000_awp_map_saa, AS_PROGRAM, 16, jpmsys5_state )
297297   JPM_SYS5_COMMON_MAP
298   AM_RANGE(0x0460a0, 0x0460a1) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
299   AM_RANGE(0x0460a2, 0x0460a3) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
298   AM_RANGE(0x0460a0, 0x0460a1) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
299   AM_RANGE(0x0460a2, 0x0460a3) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
300300   AM_RANGE(0x04c100, 0x04c105) AM_READWRITE(jpm_upd7759_r, jpm_upd7759_w) // do the SAA boards have the UPD?
301301ADDRESS_MAP_END
302302
trunk/src/mame/drivers/liberate.c
r243483r243484
128128
129129WRITE8_MEMBER(liberate_state::prosoccr_charram_w)
130130{
131   UINT8 *FG_GFX = memregion("fg_gfx")->base();
132
131133   if (m_bank)
132134   {
133135      prosoccr_io_w(space, offset & 0x0f, data);
r243483r243484
140142      switch (offset & 0x1800)
141143      {
142144         case 0x0000:
143            m_fg_gfx[(offset & 0x7ff) + (0x0000) + 0x0000] = data;
144            //m_fg_gfx[(offset & 0x7ff) + (0x1800) + 0x0000] = data;
145            FG_GFX[(offset & 0x7ff) + (0x0000) + 0x0000] = data;
146            //FG_GFX[(offset & 0x7ff) + (0x1800) + 0x0000] = data;
145147            break;
146148         case 0x0800:
147            m_fg_gfx[(offset & 0x7ff) + (0x0000) + 0x2000] = data;
148            //m_fg_gfx[(offset & 0x7ff) + (0x1800) + 0x2000] = data;
149            FG_GFX[(offset & 0x7ff) + (0x0000) + 0x2000] = data;
150            //FG_GFX[(offset & 0x7ff) + (0x1800) + 0x2000] = data;
149151            break;
150152         case 0x1000:
151            m_fg_gfx[(offset & 0x7ff) + (0x0000) + 0x4000] = data;
152            //m_fg_gfx[(offset & 0x7ff) + (0x1800) + 0x4000] = data;
153            FG_GFX[(offset & 0x7ff) + (0x0000) + 0x4000] = data;
154            //FG_GFX[(offset & 0x7ff) + (0x1800) + 0x4000] = data;
153155            break;
154156      }
155157   }
trunk/src/mame/drivers/manohman.c
r243483r243484
155155static ADDRESS_MAP_START( manohman_map, AS_PROGRAM, 16, _manohman_state )
156156   AM_RANGE(0x000000, 0x01ffff) AM_ROM
157157   AM_RANGE(0x100000, 0x100001) AM_NOP     // smell to MAX696 watchdog...
158   AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
159   AM_RANGE(0x300002, 0x300003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
158   AM_RANGE(0x300000, 0x300001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
159   AM_RANGE(0x300002, 0x300003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
160160   AM_RANGE(0x500000, 0x503fff) AM_RAM
161161   AM_RANGE(0x600006, 0x600007) AM_RAM     // write bitpatterns to compare with the 500000-503ff8 RAM testing.
162162//  AM_RANGE(0xYYYYYY, 0xYYYYYY) AM_RAM
trunk/src/mame/drivers/mastboy.c
r243483r243484
445445public:
446446   mastboy_state(const machine_config &mconfig, device_type type, const char *tag)
447447      : driver_device(mconfig, type, tag),
448         m_nvram(*this, "nvram") ,
449      m_workram(*this, "workram"),
450      m_tileram(*this, "tileram"),
451      m_colram(*this, "colram"),
448452      m_maincpu(*this, "maincpu"),
449453      m_msm(*this, "msm"),
450454      m_gfxdecode(*this, "gfxdecode"),
451      m_palette(*this, "palette"),
452      m_nvram(*this, "nvram") ,
453      m_workram(*this, "workram"),
454      m_tileram(*this, "tileram"),
455      m_colram(*this, "colram") { }
455      m_palette(*this, "palette") { }
456456
457   required_device<cpu_device> m_maincpu;
458   required_device<msm5205_device> m_msm;
459   required_device<gfxdecode_device> m_gfxdecode;
460   required_device<palette_device> m_palette;
461   
462   required_shared_ptr<UINT8> m_nvram;
457   required_shared_ptr<UINT8>  m_nvram;
463458   required_shared_ptr<UINT8> m_workram;
464459   required_shared_ptr<UINT8> m_tileram;
465460   required_shared_ptr<UINT8> m_colram;
466   
467461   UINT8* m_vram;
468462   UINT8 m_bank;
469463   int m_irq0_ack;
r243483r243484
472466   int m_m5205_part;
473467   int m_m5205_sambit0;
474468   int m_m5205_sambit1;
475
476469   DECLARE_READ8_MEMBER(banked_ram_r);
477470   DECLARE_WRITE8_MEMBER(banked_ram_w);
478   DECLARE_WRITE8_MEMBER(bank_w);
479   DECLARE_READ8_MEMBER(backupram_r);
480   DECLARE_WRITE8_MEMBER(backupram_w);
471   DECLARE_WRITE8_MEMBER(mastboy_bank_w);
472   DECLARE_READ8_MEMBER(mastboy_backupram_r);
473   DECLARE_WRITE8_MEMBER(mastboy_backupram_w);
481474   DECLARE_WRITE8_MEMBER(backupram_enable_w);
482   DECLARE_WRITE8_MEMBER(msm5205_sambit0_w);
483   DECLARE_WRITE8_MEMBER(msm5205_sambit1_w);
484   DECLARE_WRITE8_MEMBER(msm5205_data_w);
485   DECLARE_WRITE8_MEMBER(irq0_ack_w);
486   DECLARE_READ8_MEMBER(port_38_read);
487   DECLARE_READ8_MEMBER(nmi_read);
488   DECLARE_WRITE8_MEMBER(msm5205_reset_w);
489   DECLARE_WRITE_LINE_MEMBER(adpcm_int);
490
491   virtual void machine_start();
475   DECLARE_WRITE8_MEMBER(msm5205_mastboy_m5205_sambit0_w);
476   DECLARE_WRITE8_MEMBER(msm5205_mastboy_m5205_sambit1_w);
477   DECLARE_WRITE8_MEMBER(mastboy_msm5205_data_w);
478   DECLARE_WRITE8_MEMBER(mastboy_irq0_ack_w);
479   DECLARE_READ8_MEMBER(mastboy_port_38_read);
480   DECLARE_READ8_MEMBER(mastboy_nmi_read);
481   DECLARE_WRITE8_MEMBER(mastboy_msm5205_reset_w);
482   DECLARE_DRIVER_INIT(mastboy);
492483   virtual void machine_reset();
493484   virtual void video_start();
494
495   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
496
497   INTERRUPT_GEN_MEMBER(interrupt);
485   UINT32 screen_update_mastboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
486   INTERRUPT_GEN_MEMBER(mastboy_interrupt);
487   DECLARE_WRITE_LINE_MEMBER(mastboy_adpcm_int);
488   required_device<cpu_device> m_maincpu;
489   required_device<msm5205_device> m_msm;
490   required_device<gfxdecode_device> m_gfxdecode;
491   required_device<palette_device> m_palette;
498492};
499493
500494
r243483r243484
503497void mastboy_state::video_start()
504498{
505499   m_gfxdecode->gfx(0)->set_source(m_vram);
506   
507   save_pointer(NAME(m_vram), 0x10000);
508500}
509501
510UINT32 mastboy_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
502UINT32 mastboy_state::screen_update_mastboy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
511503{
512504   int y,x,i;
513505   int count = 0x000;
r243483r243484
617609   }
618610}
619611
620WRITE8_MEMBER(mastboy_state::bank_w)
612WRITE8_MEMBER(mastboy_state::mastboy_bank_w)
621613{
622614   // controls access to banked ram / rom
623615   m_bank = data;
r243483r243484
625617
626618/* Backup RAM access */
627619
628READ8_MEMBER(mastboy_state::backupram_r)
620READ8_MEMBER(mastboy_state::mastboy_backupram_r)
629621{
630622   return m_nvram[offset];
631623}
632624
633WRITE8_MEMBER(mastboy_state::backupram_w)
625WRITE8_MEMBER(mastboy_state::mastboy_backupram_w)
634626{
635627//  if (m_backupram_enabled)
636628//  {
r243483r243484
651643
652644/* MSM5205 Related */
653645
654WRITE8_MEMBER(mastboy_state::msm5205_sambit0_w)
646WRITE8_MEMBER(mastboy_state::msm5205_mastboy_m5205_sambit0_w)
655647{
656648   m_m5205_sambit0 = data & 1;
657649   m_msm->playmode_w((1 << 2) | (m_m5205_sambit1 << 1) | (m_m5205_sambit0) );
r243483r243484
659651   logerror("msm5205 samplerate bit 0, set to %02x\n",data);
660652}
661653
662WRITE8_MEMBER(mastboy_state::msm5205_sambit1_w)
654WRITE8_MEMBER(mastboy_state::msm5205_mastboy_m5205_sambit1_w)
663655{
664656   m_m5205_sambit1 = data & 1;
665657
r243483r243484
668660   logerror("msm5205 samplerate bit 0, set to %02x\n",data);
669661}
670662
671WRITE8_MEMBER(mastboy_state::msm5205_reset_w)
663WRITE8_MEMBER(mastboy_state::mastboy_msm5205_reset_w)
672664{
673665   m_m5205_part = 0;
674666   m_msm->reset_w(data & 1);
675667}
676668
677WRITE8_MEMBER(mastboy_state::msm5205_data_w)
669WRITE8_MEMBER(mastboy_state::mastboy_msm5205_data_w)
678670{
679671   m_m5205_next = data;
680672}
681673
682WRITE_LINE_MEMBER(mastboy_state::adpcm_int)
674WRITE_LINE_MEMBER(mastboy_state::mastboy_adpcm_int)
683675{
684676   m_msm->data_w(m_m5205_next);
685677   m_m5205_next >>= 4;
r243483r243484
692684
693685/* Interrupt Handling */
694686
695WRITE8_MEMBER(mastboy_state::irq0_ack_w)
687WRITE8_MEMBER(mastboy_state::mastboy_irq0_ack_w)
696688{
697689   m_irq0_ack = data;
698690   if ((data & 1) == 1)
699691      m_maincpu->set_input_line(0, CLEAR_LINE);
700692}
701693
702INTERRUPT_GEN_MEMBER(mastboy_state::interrupt)
694INTERRUPT_GEN_MEMBER(mastboy_state::mastboy_interrupt)
703695{
704696   if ((m_irq0_ack & 1) == 1)
705697   {
r243483r243484
719711
720712   AM_RANGE(0xc000, 0xffff) AM_READWRITE(banked_ram_r,banked_ram_w) // mastboy bank area read / write
721713
722   AM_RANGE(0xff000, 0xff7ff) AM_READWRITE(backupram_r,backupram_w) AM_SHARE("nvram")
714   AM_RANGE(0xff000, 0xff7ff) AM_READWRITE(mastboy_backupram_r,mastboy_backupram_w) AM_SHARE("nvram")
723715
724716   AM_RANGE(0xff800, 0xff807) AM_READ_PORT("P1")
725717   AM_RANGE(0xff808, 0xff80f) AM_READ_PORT("P2")
726718   AM_RANGE(0xff810, 0xff817) AM_READ_PORT("DSW1")
727719   AM_RANGE(0xff818, 0xff81f) AM_READ_PORT("DSW2")
728720
729   AM_RANGE(0xff820, 0xff827) AM_WRITE(bank_w)
730   AM_RANGE(0xff828, 0xff828) AM_DEVWRITE("saa", saa1099_device, data_w)
731   AM_RANGE(0xff829, 0xff829) AM_DEVWRITE("saa", saa1099_device, control_w)
732   AM_RANGE(0xff830, 0xff830) AM_WRITE(msm5205_data_w)
733   AM_RANGE(0xff838, 0xff838) AM_WRITE(irq0_ack_w)
734   AM_RANGE(0xff839, 0xff839) AM_WRITE(msm5205_sambit0_w)
735   AM_RANGE(0xff83a, 0xff83a) AM_WRITE(msm5205_sambit1_w)
736   AM_RANGE(0xff83b, 0xff83b) AM_WRITE(msm5205_reset_w)
721   AM_RANGE(0xff820, 0xff827) AM_WRITE(mastboy_bank_w)
722   AM_RANGE(0xff828, 0xff828) AM_DEVWRITE("saa", saa1099_device, saa1099_data_w)
723   AM_RANGE(0xff829, 0xff829) AM_DEVWRITE("saa", saa1099_device, saa1099_control_w)
724   AM_RANGE(0xff830, 0xff830) AM_WRITE(mastboy_msm5205_data_w)
725   AM_RANGE(0xff838, 0xff838) AM_WRITE(mastboy_irq0_ack_w)
726   AM_RANGE(0xff839, 0xff839) AM_WRITE(msm5205_mastboy_m5205_sambit0_w)
727   AM_RANGE(0xff83a, 0xff83a) AM_WRITE(msm5205_mastboy_m5205_sambit1_w)
728   AM_RANGE(0xff83b, 0xff83b) AM_WRITE(mastboy_msm5205_reset_w)
737729   AM_RANGE(0xff83c, 0xff83c) AM_WRITE(backupram_enable_w)
738730
739731   AM_RANGE(0xffc00, 0xfffff) AM_RAM // Internal RAM
r243483r243484
741733
742734/* Ports */
743735
744READ8_MEMBER(mastboy_state::port_38_read)
736READ8_MEMBER(mastboy_state::mastboy_port_38_read)
745737{
746738   return 0x00;
747739}
748740
749READ8_MEMBER(mastboy_state::nmi_read)
741READ8_MEMBER(mastboy_state::mastboy_nmi_read)
750742{
751743   // this is read in the NMI, it's related to the Z180 MMU I think, must return right value or game jumps to 0000
752744   return 0x00;
753745}
754746
755747static ADDRESS_MAP_START( mastboy_io_map, AS_IO, 8, mastboy_state )
756   AM_RANGE(0x38, 0x38) AM_READ(port_38_read)
757   AM_RANGE(0x39, 0x39) AM_READ(nmi_read)
748   AM_RANGE(0x38, 0x38) AM_READ(mastboy_port_38_read)
749   AM_RANGE(0x39, 0x39) AM_READ(mastboy_nmi_read)
758750ADDRESS_MAP_END
759751
760752/* Input Ports */
r243483r243484
874866
875867/* Machine Functions / Driver */
876868
877void mastboy_state::machine_start()
878{
879   m_vram = memregion( "gfx1" )->base(); // makes decoding the RAM based tiles easier this way
880   
881   save_item(NAME(m_bank));
882   save_item(NAME(m_irq0_ack));
883   save_item(NAME(m_backupram_enabled));
884   save_item(NAME(m_m5205_next));
885   save_item(NAME(m_m5205_part));
886   save_item(NAME(m_m5205_sambit0));
887   save_item(NAME(m_m5205_sambit1));
888}
889
890869void mastboy_state::machine_reset()
891870{
892871   /* clear some ram */
r243483r243484
906885   MCFG_CPU_ADD("maincpu", Z180, 12000000/2)   /* HD647180X0CP6-1M1R */
907886   MCFG_CPU_PROGRAM_MAP(mastboy_map)
908887   MCFG_CPU_IO_MAP(mastboy_io_map)
909   MCFG_CPU_VBLANK_INT_DRIVER("screen", mastboy_state,  interrupt)
888   MCFG_CPU_VBLANK_INT_DRIVER("screen", mastboy_state,  mastboy_interrupt)
910889
911890   MCFG_NVRAM_ADD_1FILL("nvram")
912891
r243483r243484
917896   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
918897   MCFG_SCREEN_SIZE(256, 256)
919898   MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 256-16-1)
920   MCFG_SCREEN_UPDATE_DRIVER(mastboy_state, screen_update)
899   MCFG_SCREEN_UPDATE_DRIVER(mastboy_state, screen_update_mastboy)
921900   MCFG_SCREEN_PALETTE("palette")
922901
923902   MCFG_GFXDECODE_ADD("gfxdecode", "palette", mastboy)
r243483r243484
930909   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
931910
932911   MCFG_SOUND_ADD("msm", MSM5205, 384000)
933   MCFG_MSM5205_VCLK_CB(WRITELINE(mastboy_state, adpcm_int))  /* interrupt function */
912   MCFG_MSM5205_VCLK_CB(WRITELINE(mastboy_state, mastboy_adpcm_int))  /* interrupt function */
934913   MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_SEX_4B)      /* 4KHz 4-bit */
935914   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
936915MACHINE_CONFIG_END
r243483r243484
1014993   /*                  0x1c0000 to 0x1fffff EMPTY */
1015994ROM_END
1016995
996DRIVER_INIT_MEMBER(mastboy_state,mastboy)
997{
998   m_vram = memregion( "gfx1" )->base(); // makes decoding the RAM based tiles easier this way
999}
10171000
1018GAME( 1991, mastboy,  0,          mastboy, mastboy, driver_device, 0, ROT0, "Gaelco", "Master Boy (Spanish, PCB Rev A)", GAME_SUPPORTS_SAVE )
1019GAME( 1991, mastboyi, mastboy,    mastboy, mastboy, driver_device, 0, ROT0, "Gaelco", "Master Boy (Italian, PCB Rev A)", GAME_SUPPORTS_SAVE )
1001GAME( 1991, mastboy,  0,          mastboy, mastboy, mastboy_state, mastboy, ROT0, "Gaelco", "Master Boy (Spanish, PCB Rev A)", 0 )
1002GAME( 1991, mastboyi, mastboy,    mastboy, mastboy, mastboy_state, mastboy, ROT0, "Gaelco", "Master Boy (Italian, PCB Rev A)", 0 )
trunk/src/mame/drivers/mcr.c
r243483r243484
26992699   ROM_LOAD( "nflvidfg.cp7", 0x0a000, 0x2000, CRC(73f62392) SHA1(18f28be7264f8edff38f8a6aa067eeb1970f544c) )
27002700   ROM_LOAD( "nflvidfg.c10", 0x0c000, 0x2000, CRC(1766dcc7) SHA1(df499e3c66ae702d2d56e6cd095a754665569fcd) )
27012701   ROM_LOAD( "nflvidfg.cp9", 0x0e000, 0x2000, CRC(46558146) SHA1(4bedfae8cf0fcb9d837706ee13fbe3944ab47216) )
2702   
2703   DISK_REGION( "ced_videodisc" )
2704        DISK_IMAGE_READONLY( "nflfoot", 0, NO_DUMP )
27052702ROM_END
27062703
27072704
trunk/src/mame/drivers/mitchell.c
r243483r243484
14591459   ROM_LOAD( "pko-voi2.3d",  0x20000, 0x20000, CRC(18398bf6) SHA1(9e9ab85383350d01ba597951a48f18ecee1f46c6) )
14601460ROM_END
14611461
1462
14621463ROM_START( pkladiesbl )
14631464   ROM_REGION( 0x50000*2, "maincpu", 0 )
14641465   // you would expect one half of this to be decrypted code, and the other half to be decrypted data
r243483r243484
15181519
15191520ROM_START( pang )
15201521   ROM_REGION( 0x50000, "maincpu", 0 )
1521   ROM_LOAD( "pwe_06.11h", 0x00000, 0x08000, CRC(68be52cd) SHA1(67b9ac15f4cbd3959c417f979beae36ae17334c1) )
1522   ROM_LOAD( "pwe_07.13h", 0x10000, 0x20000, CRC(4a2e70f6) SHA1(039db1b51374e5637b5c2ba8e18ccd08816613a7) )
1522   ROM_LOAD( "pang6.bin",    0x00000, 0x08000, CRC(68be52cd) SHA1(67b9ac15f4cbd3959c417f979beae36ae17334c1) )
1523   ROM_LOAD( "pang7.bin",    0x10000, 0x20000, CRC(4a2e70f6) SHA1(039db1b51374e5637b5c2ba8e18ccd08816613a7) )
15231524
15241525   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1525   ROM_LOAD( "pwe_02.1e", 0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
1526   ROM_LOAD( "pw_03.2e",  0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) ) /* also found as PWJ 03 */
1526   ROM_LOAD( "pang_09.bin",  0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
1527   ROM_LOAD( "bb3.bin",      0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
15271528   /* 40000-7ffff empty */
1528   ROM_LOAD( "pwe_04.1g", 0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
1529   ROM_LOAD( "pw_05.2g",  0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) ) /* also found as PWJ 05 */
1529   ROM_LOAD( "pang_11.bin",  0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
1530   ROM_LOAD( "bb5.bin",      0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
15301531   /* c0000-fffff empty */
15311532
15321533   ROM_REGION( 0x040000, "gfx2", 0 )
1533   ROM_LOAD( "pw_10.2k", 0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1534   ROM_LOAD( "pw_9.1k",  0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
1534   ROM_LOAD( "bb10.bin",     0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1535   ROM_LOAD( "bb9.bin",      0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
15351536
15361537   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1537   ROM_LOAD( "pw_01.1d", 0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
1538   ROM_LOAD( "bb1.bin",      0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
15381539ROM_END
15391540
1540ROM_START( bbros )
1541   ROM_REGION( 0x50000, "maincpu", 0 )
1542   ROM_LOAD( "pwu_06.11h", 0x00000, 0x08000, CRC(a3041ca4) SHA1(2accb2151f621e4802211efe986969ebd3acb6d4) )
1543   ROM_LOAD( "pwu_07.13h", 0x10000, 0x20000, CRC(09231c68) SHA1(9e735487a99a5eb89a6abb81d5d9a20414ad75bf) )
15441541
1545   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1546   ROM_LOAD( "pwu_02.1e", 0x000000, 0x20000, CRC(62f29992) SHA1(af4d43f76228e9908fbfbf83af2f577b84cc5e1d) ) /* chars */
1547   ROM_LOAD( "pw_03.2e",  0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
1548   /* 40000-7ffff empty */
1549   ROM_LOAD( "pwu_04.1g", 0x080000, 0x20000, CRC(f705aa89) SHA1(cce2d90f7b767044e84bc22a16474a2f6496292e) )
1550   ROM_LOAD( "pw_05.2g",  0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
1551   /* c0000-fffff empty */
15521542
1553   ROM_REGION( 0x040000, "gfx2", 0 )
1554   ROM_LOAD( "pw_10.2k", 0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1555   ROM_LOAD( "pw_9.1k",  0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
1556
1557   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1558   ROM_LOAD( "pw_01.1d", 0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
1559ROM_END
1560
1561ROM_START( pompingw )
1562   ROM_REGION( 0x50000, "maincpu", 0 )
1563   ROM_LOAD( "pwj_06.11h", 0x00000, 0x08000, CRC(4a0a6426) SHA1(c61346c5f80507bdf543e9ea32ee3f814be8e27f) )
1564   ROM_LOAD( "pwj_07.13h", 0x10000, 0x20000, CRC(a9402420) SHA1(2ca3aa59d561826477e3509fcaeeec753d64d419) )
1565
1566   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1567   ROM_LOAD( "pw_02.1e", 0x000000, 0x20000, CRC(4b5992e4) SHA1(2071a1fcfc739d7ca837c03133909101b462d5a6) ) /* chars */
1568   ROM_LOAD( "pw_03.2e", 0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
1569   /* 40000-7ffff empty */
1570   ROM_LOAD( "pwj_04.1g", 0x080000, 0x20000, CRC(01e49081) SHA1(a29ffec199f196a2b3731e4863e863bdd04e2c58) )
1571   ROM_LOAD( "pw_05.2g",  0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
1572   /* c0000-fffff empty */
1573
1574   ROM_REGION( 0x040000, "gfx2", 0 )
1575   ROM_LOAD( "pw_10.2k", 0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1576   ROM_LOAD( "pw_9.1k",  0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
1577
1578   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1579   ROM_LOAD( "pw_01.1d", 0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
1580ROM_END
1581
15821543ROM_START( pangb )
15831544   ROM_REGION( 2*0x50000, "maincpu", 0 )
15841545   ROM_LOAD( "pang_04.bin",  0x50000, 0x08000, CRC(f68f88a5) SHA1(6f57891d399a46d8d5a531771129552ed420d10a) )   /* Decrypted opcode + data */
r243483r243484
15871548   ROM_LOAD( "pang_03.bin",  0x10000, 0x20000, CRC(0c8477ae) SHA1(a31a8c00407dfc3017d56e29fac6114b73248030) )   /* Decrypted data */
15881549
15891550   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1590   ROM_LOAD( "bb9.bin",      0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
1551   ROM_LOAD( "pang_09.bin",  0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
15911552   ROM_LOAD( "bb3.bin",      0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
15921553   /* 40000-7ffff empty */
1593   ROM_LOAD( "bb11.bin",     0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
1554   ROM_LOAD( "pang_11.bin",  0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
15941555   ROM_LOAD( "bb5.bin",      0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
15951556   /* c0000-fffff empty */
15961557
r243483r243484
16101571   ROM_CONTINUE(0x10000, 0x20000 )   /* Decrypted data */
16111572
16121573   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1613   ROM_LOAD( "bb9.bin",      0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
1574   ROM_LOAD( "pang_09.bin",  0x000000, 0x20000, CRC(3a5883f5) SHA1(a8a33071e10f5992e80afdb782c334829f9ae27f) ) /* chars */
16141575   ROM_LOAD( "bb3.bin",      0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
16151576   /* 40000-7ffff empty */
1616   ROM_LOAD( "bb11.bin",     0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
1577   ROM_LOAD( "pang_11.bin",  0x080000, 0x20000, CRC(166a16ae) SHA1(7f907c78b7ac8c99e3d79761a6ae689c77e3a1f5) )
16171578   ROM_LOAD( "bb5.bin",      0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
16181579   /* c0000-fffff empty */
16191580
r243483r243484
16931654   ROM_LOAD( "pang.10",    0x010000, 0x10000, CRC(082151ee) SHA1(0857b9f7430e0fc6217eafbaf008ff9da8e7a493) )
16941655ROM_END
16951656
1657
1658ROM_START( bbros )
1659   ROM_REGION( 0x50000, "maincpu", 0 )
1660   ROM_LOAD( "bb6.bin",      0x00000, 0x08000, CRC(a3041ca4) SHA1(2accb2151f621e4802211efe986969ebd3acb6d4) )
1661   ROM_LOAD( "bb7.bin",      0x10000, 0x20000, CRC(09231c68) SHA1(9e735487a99a5eb89a6abb81d5d9a20414ad75bf) )
1662
1663   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1664   ROM_LOAD( "bb2.bin",      0x000000, 0x20000, CRC(62f29992) SHA1(af4d43f76228e9908fbfbf83af2f577b84cc5e1d) ) /* chars */
1665   ROM_LOAD( "bb3.bin",      0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
1666   /* 40000-7ffff empty */
1667   ROM_LOAD( "bb4.bin",      0x080000, 0x20000, CRC(f705aa89) SHA1(cce2d90f7b767044e84bc22a16474a2f6496292e) )
1668   ROM_LOAD( "bb5.bin",      0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
1669   /* c0000-fffff empty */
1670
1671   ROM_REGION( 0x040000, "gfx2", 0 )
1672   ROM_LOAD( "bb10.bin",     0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1673   ROM_LOAD( "bb9.bin",      0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
1674
1675   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1676   ROM_LOAD( "bb1.bin",      0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
1677ROM_END
1678
1679ROM_START( pompingw )
1680   ROM_REGION( 0x50000, "maincpu", 0 )
1681   ROM_LOAD( "pwj_06.11h",   0x00000, 0x08000, CRC(4a0a6426) SHA1(c61346c5f80507bdf543e9ea32ee3f814be8e27f) )
1682   ROM_LOAD( "pwj_07.13h",   0x10000, 0x20000, CRC(a9402420) SHA1(2ca3aa59d561826477e3509fcaeeec753d64d419) )
1683
1684   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1685   ROM_LOAD( "pw_02.1e",     0x000000, 0x20000, CRC(4b5992e4) SHA1(2071a1fcfc739d7ca837c03133909101b462d5a6) ) /* chars */
1686   ROM_LOAD( "bb3.bin",      0x020000, 0x20000, CRC(79a8ed08) SHA1(c1e43889e29b80c7fe2c09b11eecde24450a1ff5) )
1687   /* 40000-7ffff empty */
1688   ROM_LOAD( "pwj_04.1g",    0x080000, 0x20000, CRC(01e49081) SHA1(a29ffec199f196a2b3731e4863e863bdd04e2c58) )
1689   ROM_LOAD( "bb5.bin",      0x0a0000, 0x20000, CRC(2fb3db6c) SHA1(328814d28569fec763975a8ae4c2767517a680af) )
1690   /* c0000-fffff empty */
1691
1692   ROM_REGION( 0x040000, "gfx2", 0 )
1693   ROM_LOAD( "bb10.bin",     0x000000, 0x20000, CRC(fdba4f6e) SHA1(9a2412a97682bbd25b8942520a0c02616bd59353) ) /* sprites */
1694   ROM_LOAD( "bb9.bin",      0x020000, 0x20000, CRC(39f47a63) SHA1(05675ad45909a7d723acaf4d53b4e588d4e048b9) )
1695
1696   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1697   ROM_LOAD( "bb1.bin",      0x00000, 0x20000, CRC(c52e5b8e) SHA1(933b954bfdd2d67e28b032ffabde192531249c1f) )
1698ROM_END
1699
16961700ROM_START( cworld )
16971701   ROM_REGION( 0x50000, "maincpu", 0 )
16981702   ROM_LOAD( "cw05.bin",     0x00000, 0x08000, CRC(d3c1723d) SHA1(b67f63e39f4301909c967555222820b54e98a205) )
r243483r243484
17411745   ROM_LOAD( "q2-01.rom",    0x00000, 0x20000, CRC(149e7a89) SHA1(103ab075b92c895e9991e7ef23df2b38d6a792c6) )
17421746ROM_END
17431747
1744ROM_START( spang )
1745   ROM_REGION( 0x50000, "maincpu", 0 )
1746   ROM_LOAD( "spe_06.11h", 0x00000, 0x08000, CRC(1af106fb) SHA1(476ba5c95e090663a47d3f98451bf3b79bac7748) )
1747   ROM_LOAD( "spe_07.13h", 0x10000, 0x20000, CRC(208b5f54) SHA1(9d44f7240b56756dcb69d110036b1cb13b1bbc02) )
1748   ROM_LOAD( "spe_08.14h", 0x30000, 0x20000, CRC(2bc03ade) SHA1(3a8ee342b0556a8f6d5a417c98e5c3c43422713d) )
17491748
1750   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1751   ROM_LOAD( "spe_02.1e", 0x000000, 0x20000, CRC(63c9dfd2) SHA1(ddc8ddee336855e857fb3124c8b64af33c2d0080) ) /* chars */
1752   ROM_LOAD( "spj_03.3e", 0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )
1753   /* 40000-7ffff empty */
1754   ROM_LOAD( "spe_04.1g", 0x080000, 0x20000, CRC(9d7b225b) SHA1(d949c91da6ba6b82df0b3445499761a98c7e2703) )
1755   ROM_LOAD( "spj_05.2g", 0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )
1756   /* c0000-fffff empty */
17571749
1758   ROM_REGION( 0x040000, "gfx2", 0 )
1759   ROM_LOAD( "spj_10.2k", 0x000000, 0x20000, CRC(eedd0ade) SHA1(f2da2eb743c68c5c9a56a94709527110cef5d91d) )   /* sprites */
1760   ROM_LOAD( "spj_09.1k", 0x020000, 0x20000, CRC(04b41b75) SHA1(946ed04a17f1f71085143d43905aa310ce1e05f4) )
1750/* seems to be the same basic hardware, but the memory map and io map are different at least.. */
1751ROM_START( mstworld )
1752   ROM_REGION( 0x50000*2, "maincpu", 0 )   /* CPU1 code */
1753   ROM_LOAD( "mw-1.rom", 0x00000, 0x080000, CRC(c4e51fb4) SHA1(60ad4ff2cec3a4d13b4aa0319dfcdab941404b1a) ) /* fixed code */
17611754
1762   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1763   ROM_LOAD( "spe_01.1d",   0x00000, 0x20000, CRC(2d19c133) SHA1(b3ec226f35494dfc259e910895cec8a49dd2f846) )
1755   ROM_REGION( 0x10000, "audiocpu", 0 )    /* CPU2 code */
1756   ROM_LOAD( "mw-2.rom", 0x00000, 0x08000, CRC(12c4fea9) SHA1(4616f2d70022abcf89f244f3f365b39b96973368) )
17641757
1765   ROM_REGION16_BE( 0x80, "eeprom", 0 )
1766   ROM_LOAD( "eeprom-spang.bin", 0x0000, 0x0080, CRC(deae1291) SHA1(f62f2ad99852903f1cea3f8c1f69fc11e4e7b48b) )
1767ROM_END
1758   ROM_REGION( 0x080000, "user2", 0 )  /* Samples */
1759   ROM_LOAD( "mw-3.rom", 0x00000, 0x080000, CRC(110c6a68) SHA1(915758cd467fbcdfa18ca99df036dca40dfc4649) )
17681760
1769ROM_START( sbbros )
1770   ROM_REGION( 0x50000, "maincpu", 0 )
1771   ROM_LOAD( "spu_06.11h", 0x00000, 0x08000, CRC(292eee6a) SHA1(d33368d2373a1ee9e24ada6aa045e0675c8e8160) )
1772   ROM_LOAD( "spu_07.13h", 0x10000, 0x20000, CRC(f46b698d) SHA1(6a1867f591aa0fb9e02dd472699df93f9d018793) )
1773   ROM_LOAD( "spu_08.14h", 0x30000, 0x20000, CRC(a75e7fbe) SHA1(0331d1a3e888678909f3e6d21f97896a5350e585) )
1761   /* $00000-$20000 stays the same in all sound banks, */
1762   /* the second half of the bank is what gets switched */
1763   ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
1764   ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
1765   ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
1766   ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
1767   ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
1768   ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
1769   ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
1770   ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
1771   ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
17741772
1775   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1776   ROM_LOAD( "spu_02.1e", 0x000000, 0x20000, CRC(0c22ffc6) SHA1(f95b50617ef5cd8cffffacab0b96b4bfe8dd3a1e) ) /* chars */
1777   ROM_LOAD( "spj_03.3e", 0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )
1778   /* 40000-7ffff empty */
1779   ROM_LOAD( "spu_04.1g", 0x080000, 0x20000, CRC(bb3dee5b) SHA1(e81875b9d9a56e91daa66375b22a4fa6dcd14faa) )
1780   ROM_LOAD( "spj_05.2g", 0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )
1781   /* c0000-fffff empty */
1773   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) /* GFX */
1774   ROM_LOAD( "mw-4.rom", 0x00000, 0x020000, CRC(28a3af15) SHA1(99547966b2b5e06e097c55bbbb86a1c2809fa98c) )
1775   ROM_LOAD( "mw-5.rom", 0x20000, 0x020000, CRC(ffdf7e9f) SHA1(b7732837cc5606d4a868eeaaff438b1a86bd72d7) )
1776   ROM_LOAD( "mw-6.rom", 0x40000, 0x020000, CRC(1ed773a3) SHA1(0e8517a5c9bed57ecf3bb850152b8c1e1bd3faaa) )
1777   ROM_LOAD( "mw-7.rom", 0x60000, 0x020000, CRC(8eb7525c) SHA1(9c3fa9373803e9534c1ad7063d660abe130f7b49) )
17821778
1783   ROM_REGION( 0x040000, "gfx2", 0 )
1784   ROM_LOAD( "spu_10.2k", 0x000000, 0x20000, CRC(d6675d8f) SHA1(1c65803fcce2305841e74772ae6ffb6e39edf5c6) ) /* sprites */
1785   ROM_LOAD( "spu_09.1k", 0x020000, 0x20000, CRC(8f678bc8) SHA1(66dc7c14cc012ffa9320cd63bc84977fa76ad738) )
1779   ROM_REGION( 0x40000, "gfx2", ROMREGION_INVERT ) /* GFX */
1780   ROM_LOAD( "mw-8.rom", 0x00000, 0x020000, CRC(b9b92a3c) SHA1(97191958a539c6f2eacb3956e8371acbaaa43795) )
1781   ROM_LOAD( "mw-9.rom", 0x20000, 0x020000, CRC(75fc3375) SHA1(b2e7551bdbe2b0f1c28f6e912a8efaa5645b2ff5))
1782ROM_END
17861783
1787   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1788   ROM_LOAD( "spj_01.1d", 0x00000, 0x20000, CRC(b96ea126) SHA1(83fa71994518d40b8938520faa8701c63b7f579e) )
17891784
1790   ROM_REGION16_BE( 0x80, "eeprom", 0 )
1791   ROM_LOAD( "eeprom-sbbros.bin", 0x0000, 0x0080, CRC(ed69d3cd) SHA1(89eb0ca65ffe30f5cbe6427f767f1f0870c8a990) )
1792ROM_END
17931785
1794ROM_START( spangj )
1786ROM_START( spang )
17951787   ROM_REGION( 0x50000, "maincpu", 0 )
1796   ROM_LOAD( "spj_06.11h", 0x00000, 0x08000, CRC(1a548b0b) SHA1(3aa65028876ab6e176f5b227366e65212c944888) )
1797   ROM_LOAD( "spj_07.13h", 0x10000, 0x20000, CRC(14c2b765) SHA1(af0f965dd13d878bae7850cf8419b26511090579) )
1798   ROM_LOAD( "spj_08.14h", 0x30000, 0x20000, CRC(4be4e5b7) SHA1(6273e8bf5d9f5b100ecda20001808dcf86411d83) )
1788   ROM_LOAD( "spe_06.rom",   0x00000, 0x08000, CRC(1af106fb) SHA1(476ba5c95e090663a47d3f98451bf3b79bac7748) )
1789   ROM_LOAD( "spe_07.rom",   0x10000, 0x20000, CRC(208b5f54) SHA1(9d44f7240b56756dcb69d110036b1cb13b1bbc02) )
1790   ROM_LOAD( "spe_08.rom",   0x30000, 0x20000, CRC(2bc03ade) SHA1(3a8ee342b0556a8f6d5a417c98e5c3c43422713d) )
17991791
18001792   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1801   ROM_LOAD( "spj_02.1e", 0x000000, 0x20000, CRC(419f69d7) SHA1(e3431b5ce3e687ba9a45cb6e0e0a2dfa3a9e5b29) )  /* chars */
1802   ROM_LOAD( "spj_03.3e", 0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )
1793   ROM_LOAD( "spe_02.rom",   0x000000, 0x20000, CRC(63c9dfd2) SHA1(ddc8ddee336855e857fb3124c8b64af33c2d0080) ) /* chars */
1794   ROM_LOAD( "03.f2",        0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )
18031795   /* 40000-7ffff empty */
1804   ROM_LOAD( "spj_04.1g", 0x080000, 0x20000, CRC(6870506f) SHA1(13a12c012ea2efb0c8cd9dcfb4b5757ac08ee912) )
1805   ROM_LOAD( "spj_05.2g", 0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )
1796   ROM_LOAD( "spe_04.rom",   0x080000, 0x20000, CRC(9d7b225b) SHA1(d949c91da6ba6b82df0b3445499761a98c7e2703) )
1797   ROM_LOAD( "05.g2",        0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )
18061798   /* c0000-fffff empty */
18071799
18081800   ROM_REGION( 0x040000, "gfx2", 0 )
1809   ROM_LOAD( "spj_10.2k", 0x000000, 0x20000, CRC(eedd0ade) SHA1(f2da2eb743c68c5c9a56a94709527110cef5d91d) )   /* sprites */
1810   ROM_LOAD( "spj_09.1k", 0x020000, 0x20000, CRC(04b41b75) SHA1(946ed04a17f1f71085143d43905aa310ce1e05f4) )
1801   ROM_LOAD( "spj10_2k.bin",   0x000000, 0x20000, CRC(eedd0ade) SHA1(f2da2eb743c68c5c9a56a94709527110cef5d91d) )   /* sprites */
1802   ROM_LOAD( "spj09_1k.bin",   0x020000, 0x20000, CRC(04b41b75) SHA1(946ed04a17f1f71085143d43905aa310ce1e05f4) )
18111803
18121804   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1813   ROM_LOAD( "spj_01.1d", 0x00000, 0x20000, CRC(b96ea126) SHA1(83fa71994518d40b8938520faa8701c63b7f579e) )
1805   ROM_LOAD( "spe_01.rom",   0x00000, 0x20000, CRC(2d19c133) SHA1(b3ec226f35494dfc259e910895cec8a49dd2f846) )
18141806
18151807   ROM_REGION16_BE( 0x80, "eeprom", 0 )
1816   ROM_LOAD( "eeprom-spangj.bin", 0x0000, 0x0080, CRC(237c00eb) SHA1(35a7fe793186e148c163adb04433b6a55ee21502) )
1808   ROM_LOAD( "eeprom-spang.bin", 0x0000, 0x0080, CRC(deae1291) SHA1(f62f2ad99852903f1cea3f8c1f69fc11e4e7b48b) )
18171809ROM_END
18181810
18191811/*
r243483r243484
18781870   ROM_LOAD( "ic125.14",  0x030000, 0x10000, CRC(bd5c2f4b) SHA1(3c71d63637633a98ab513e4336e2954af3f964f4) )
18791871ROM_END
18801872
1881/* seems to be the same basic hardware, but the memory map and io map are different at least.. */
1882ROM_START( mstworld )
1883   ROM_REGION( 0x50000*2, "maincpu", 0 )   /* CPU1 code */
1884   ROM_LOAD( "mw-1.rom", 0x00000, 0x080000, CRC(c4e51fb4) SHA1(60ad4ff2cec3a4d13b4aa0319dfcdab941404b1a) ) /* fixed code */
18851873
1886   ROM_REGION( 0x10000, "audiocpu", 0 )    /* CPU2 code */
1887   ROM_LOAD( "mw-2.rom", 0x00000, 0x08000, CRC(12c4fea9) SHA1(4616f2d70022abcf89f244f3f365b39b96973368) )
1874ROM_START( spangj )
1875   ROM_REGION( 0x50000, "maincpu", 0 )
1876   ROM_LOAD( "spj_11h.bin",    0x00000, 0x08000, CRC(1a548b0b) SHA1(3aa65028876ab6e176f5b227366e65212c944888) )
1877   ROM_LOAD( "spj7_13h.bin",   0x10000, 0x20000, CRC(14c2b765) SHA1(af0f965dd13d878bae7850cf8419b26511090579) )
1878   ROM_LOAD( "spj8_14h.bin",   0x30000, 0x20000, CRC(4be4e5b7) SHA1(6273e8bf5d9f5b100ecda20001808dcf86411d83) )
18881879
1889   ROM_REGION( 0x080000, "user2", 0 )  /* Samples */
1890   ROM_LOAD( "mw-3.rom", 0x00000, 0x080000, CRC(110c6a68) SHA1(915758cd467fbcdfa18ca99df036dca40dfc4649) )
1880   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1881   ROM_LOAD( "spj02_1e.bin",   0x000000, 0x20000,  CRC(419f69d7) SHA1(e3431b5ce3e687ba9a45cb6e0e0a2dfa3a9e5b29) )  /* chars */
1882   ROM_LOAD( "03.f2",          0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )   // spj03_3e.bin
1883   /* 40000-7ffff empty */
1884   ROM_LOAD( "spj04_1g.bin",   0x080000, 0x20000, CRC(6870506f) SHA1(13a12c012ea2efb0c8cd9dcfb4b5757ac08ee912) )
1885   ROM_LOAD( "05.g2",          0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )   // spj05_2g.bin
1886   /* c0000-fffff empty */
18911887
1892   /* $00000-$20000 stays the same in all sound banks, */
1893   /* the second half of the bank is what gets switched */
1894   ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
1895   ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
1896   ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
1897   ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
1898   ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
1899   ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
1900   ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
1901   ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
1902   ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
1888   ROM_REGION( 0x040000, "gfx2", 0 )
1889   ROM_LOAD( "spj10_2k.bin",   0x000000, 0x20000, CRC(eedd0ade) SHA1(f2da2eb743c68c5c9a56a94709527110cef5d91d) )   /* sprites */
1890   ROM_LOAD( "spj09_1k.bin",   0x020000, 0x20000, CRC(04b41b75) SHA1(946ed04a17f1f71085143d43905aa310ce1e05f4) )
19031891
1904   ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) /* GFX */
1905   ROM_LOAD( "mw-4.rom", 0x00000, 0x020000, CRC(28a3af15) SHA1(99547966b2b5e06e097c55bbbb86a1c2809fa98c) )
1906   ROM_LOAD( "mw-5.rom", 0x20000, 0x020000, CRC(ffdf7e9f) SHA1(b7732837cc5606d4a868eeaaff438b1a86bd72d7) )
1907   ROM_LOAD( "mw-6.rom", 0x40000, 0x020000, CRC(1ed773a3) SHA1(0e8517a5c9bed57ecf3bb850152b8c1e1bd3faaa) )
1908   ROM_LOAD( "mw-7.rom", 0x60000, 0x020000, CRC(8eb7525c) SHA1(9c3fa9373803e9534c1ad7063d660abe130f7b49) )
1892   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1893   ROM_LOAD( "01.d1",          0x00000, 0x20000, CRC(b96ea126) SHA1(83fa71994518d40b8938520faa8701c63b7f579e) )    // spj01_1d.bin
19091894
1910   ROM_REGION( 0x40000, "gfx2", ROMREGION_INVERT ) /* GFX */
1911   ROM_LOAD( "mw-8.rom", 0x00000, 0x020000, CRC(b9b92a3c) SHA1(97191958a539c6f2eacb3956e8371acbaaa43795) )
1912   ROM_LOAD( "mw-9.rom", 0x20000, 0x020000, CRC(75fc3375) SHA1(b2e7551bdbe2b0f1c28f6e912a8efaa5645b2ff5))
1895   ROM_REGION16_BE( 0x80, "eeprom", 0 )
1896   ROM_LOAD( "eeprom-spangj.bin", 0x0000, 0x0080, CRC(237c00eb) SHA1(35a7fe793186e148c163adb04433b6a55ee21502) )
19131897ROM_END
19141898
1899ROM_START( sbbros )
1900   ROM_REGION( 0x50000, "maincpu", 0 )
1901   ROM_LOAD( "06.j12",       0x00000, 0x08000, CRC(292eee6a) SHA1(d33368d2373a1ee9e24ada6aa045e0675c8e8160) )
1902   ROM_LOAD( "07.j13",       0x10000, 0x20000, CRC(f46b698d) SHA1(6a1867f591aa0fb9e02dd472699df93f9d018793) )
1903   ROM_LOAD( "08.j14",       0x30000, 0x20000, CRC(a75e7fbe) SHA1(0331d1a3e888678909f3e6d21f97896a5350e585) )
1904
1905   ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF )
1906   ROM_LOAD( "02.f1",        0x000000, 0x20000, CRC(0c22ffc6) SHA1(f95b50617ef5cd8cffffacab0b96b4bfe8dd3a1e) ) /* chars */
1907   ROM_LOAD( "03.f2",        0x020000, 0x20000, CRC(3ae28bc1) SHA1(4f6d9a86f624598ebc0825b50941adfb7436e98a) )
1908   /* 40000-7ffff empty */
1909   ROM_LOAD( "04.g2",        0x080000, 0x20000, CRC(bb3dee5b) SHA1(e81875b9d9a56e91daa66375b22a4fa6dcd14faa) )
1910   ROM_LOAD( "05.g2",        0x0a0000, 0x20000, CRC(4a060884) SHA1(f83d713aee4230fc04a1d5f1d4d79c64a5bf2753) )
1911   /* c0000-fffff empty */
1912
1913   ROM_REGION( 0x040000, "gfx2", 0 )
1914   ROM_LOAD( "10.l2",        0x000000, 0x20000, CRC(d6675d8f) SHA1(1c65803fcce2305841e74772ae6ffb6e39edf5c6) ) /* sprites */
1915   ROM_LOAD( "09.l1",        0x020000, 0x20000, CRC(8f678bc8) SHA1(66dc7c14cc012ffa9320cd63bc84977fa76ad738) )
1916
1917   ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */
1918   ROM_LOAD( "01.d1",        0x00000, 0x20000, CRC(b96ea126) SHA1(83fa71994518d40b8938520faa8701c63b7f579e) )
1919
1920   ROM_REGION16_BE( 0x80, "eeprom", 0 )
1921   ROM_LOAD( "eeprom-sbbros.bin", 0x0000, 0x0080, CRC(ed69d3cd) SHA1(89eb0ca65ffe30f5cbe6427f767f1f0870c8a990) )
1922ROM_END
1923
19151924ROM_START( marukin )
19161925   ROM_REGION( 0x50000, "maincpu", 0 )
19171926   ROM_LOAD( "mg3-01.9d",    0x00000, 0x08000, CRC(04357973) SHA1(61b0b347479126213c90ef6833c09537fab03093) )
r243483r243484
19791988   ROM_LOAD( "q4-01.rom",    0x00000, 0x20000, CRC(5d0d07d8) SHA1(d36e42852dd1ec0955d19b16e7dfe157b3d48522) )
19801989ROM_END
19811990
1991
19821992ROM_START( block )
19831993   ROM_REGION( 0x50000, "maincpu", 0 )
19841994   ROM_LOAD( "ble_05.rom",   0x00000, 0x08000, CRC(c12e7f4c) SHA1(335f4eab2323b942d5feeb3bab6f7286fabfffb4) )
r243483r243484
22792289GAME( 1989, pkladiesbl,pkladies, pkladiesbl,pkladies, mitchell_state,pkladiesbl,ROT0, "bootleg", "Poker Ladies (Censored bootleg)", GAME_NOT_WORKING ) // by Playmark? need to figure out CPU 'decryption' / ordering
22802290GAME( 1989, dokaben,   0,        pang,    pang, mitchell_state,     dokaben,  ROT0,   "Capcom", "Dokaben (Japan)", GAME_SUPPORTS_SAVE )
22812291GAME( 1989, pang,      0,        pang,    pang, mitchell_state,     pang,     ROT0,   "Mitchell", "Pang (World)", GAME_SUPPORTS_SAVE )
2282GAME( 1989, bbros,     pang,     pang,    pang, mitchell_state,     pang,     ROT0,   "Mitchell (Capcom license)", "Buster Bros. (USA)", GAME_SUPPORTS_SAVE )
2283GAME( 1989, pompingw,  pang,     pang,    pang, mitchell_state,     pang,     ROT0,   "Mitchell", "Pomping World (Japan)", GAME_SUPPORTS_SAVE )
22842292GAME( 1989, pangb,     pang,     pang,    pang, mitchell_state,     pangb,    ROT0,   "bootleg", "Pang (bootleg, set 1)", GAME_SUPPORTS_SAVE )
22852293GAME( 1989, pangbold,  pang,     pang,    pang, mitchell_state,     pangb,    ROT0,   "bootleg", "Pang (bootleg, set 2)", GAME_SUPPORTS_SAVE )
22862294GAME( 1989, pangba,    pang,     spangbl, pang, mitchell_state,     pangb,    ROT0,   "bootleg", "Pang (bootleg, set 3)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
22872295GAME( 1989, pangb2,    pang,     pang,    pang, mitchell_state,     pangb,    ROT0,   "bootleg", "Pang (bootleg, set 4)", GAME_SUPPORTS_SAVE )
2296GAME( 1989, bbros,     pang,     pang,    pang, mitchell_state,     pang,     ROT0,   "Mitchell (Capcom license)", "Buster Bros. (USA)", GAME_SUPPORTS_SAVE )
2297GAME( 1989, pompingw,  pang,     pang,    pang, mitchell_state,     pang,     ROT0,   "Mitchell", "Pomping World (Japan)", GAME_SUPPORTS_SAVE )
22882298GAME( 1989, cworld,    0,        pang,    qtono1, mitchell_state,   cworld,   ROT0,   "Capcom", "Capcom World (Japan)", GAME_SUPPORTS_SAVE )
22892299GAME( 1990, hatena,    0,        pang,    qtono1, mitchell_state,   hatena,   ROT0,   "Capcom", "Adventure Quiz 2 - Hatena? no Daibouken (Japan 900228)", GAME_SUPPORTS_SAVE )
22902300GAME( 1990, spang,     0,        pangnv,  pang, mitchell_state,     spang,    ROT0,   "Mitchell", "Super Pang (World 900914)", GAME_SUPPORTS_SAVE )
2291GAME( 1990, sbbros,    spang,    pangnv,  pang, mitchell_state,     sbbros,   ROT0,   "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", GAME_SUPPORTS_SAVE )
22922301GAME( 1990, spangj,    spang,    pangnv,  pang, mitchell_state,     spangj,   ROT0,   "Mitchell", "Super Pang (Japan 901023)", GAME_SUPPORTS_SAVE )
22932302GAME( 1990, spangbl,   spang,    spangbl, spangbl, mitchell_state,  spangbl,  ROT0,   "bootleg", "Super Pang (World 900914, bootleg)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) // different sound hardware
22942303GAME( 1994, mstworld,  0,        mstworld,mstworld, mitchell_state, mstworld, ROT0,   "bootleg (TCH)", "Monsters World (bootleg of Super Pang)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
2304GAME( 1990, sbbros,    spang,    pangnv,  pang, mitchell_state,     sbbros,   ROT0,   "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", GAME_SUPPORTS_SAVE )
22952305GAME( 1990, marukin,   0,        marukin, marukin, mitchell_state,  marukin,  ROT0,   "Yuga", "Super Marukin-Ban (Japan 901017)", GAME_SUPPORTS_SAVE )
22962306GAME( 1991, qtono1,    0,        pang,    qtono1, mitchell_state,   qtono1,   ROT0,   "Capcom", "Quiz Tonosama no Yabou (Japan)", GAME_SUPPORTS_SAVE )
22972307GAME( 1991, qsangoku,  0,        pang,    qtono1, mitchell_state,   qsangoku, ROT0,   "Capcom", "Quiz Sangokushi (Japan)", GAME_SUPPORTS_SAVE )
trunk/src/mame/drivers/mpu4vid.c
r243483r243484
12831283   AM_RANGE(0x000000, 0x7fffff) AM_ROM
12841284   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("vid_mainram")
12851285//  AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */
1286   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
1287   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
1286   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
1287   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
12881288   AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff)
12891289/*  AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
12901290
r243483r243484
13031303   AM_RANGE(0x600000, 0x63ffff) AM_RAM /* The Mating Game has an extra 256kB RAM on the program card */
13041304//  AM_RANGE(0x640000, 0x7fffff) AM_NOP /* Possible bug, reads and writes here */
13051305   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("vid_mainram")
1306   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
1307   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
1306   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
1307   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
13081308   AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff)
13091309
13101310   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE8("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w,0x00ff)
r243483r243484
13251325   AM_RANGE(0x000000, 0x7fffff) AM_ROM
13261326   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("vid_mainram")
13271327   AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */
1328   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
1329   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
1328   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
1329   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
13301330   AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff)
13311331//  AM_RANGE(0xa00000, 0xa0000f) AM_READWRITE(bt471_r,bt471_w) //Some games use this
13321332/*  AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
r243483r243484
13431343   AM_RANGE(0x000000, 0x7fffff) AM_ROM
13441344   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("vid_mainram")
13451345   AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */
1346   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
1347   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
1346   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
1347   AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
13481348   AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff)
13491349   //AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(bt471_r,bt471_w,0x00ff) Some games use this
13501350/*  AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */
trunk/src/mame/drivers/namcops2.c
r243483r243484
563563   DISK_IMAGE_READONLY( "wmn1", 0, SHA1(4254e987e71d0d4038a87f11dc1a304396b3dffc) )
564564ROM_END
565565
566ROM_START( vnight )
567   ROM_REGION(0x200000, "bios", 0)
568   SYSTEM246_BIOS
569
570   ROM_REGION(0x840000, "key", ROMREGION_ERASE00)
571   ROM_LOAD( "vpn3verb.ic002", 0x000000, 0x800000, CRC(d0011dc6) SHA1(d01a418b4b83057708e8f0ac4b271112b4a24d15) )
572   ROM_LOAD( "vpn3verb_spr.ic002", 0x800000, 0x040000, CRC(41169c24) SHA1(40bffbe93da65fe5512be9f80254b034a071c38b) )
573
574   DISK_REGION("dvd")   // actually single-track CD-ROM
575   DISK_IMAGE_READONLY( "vpn1cd0", 0, SHA1(714bd19eee3b31a060223003e4567e405ce04cd7) )
576ROM_END
577
578566ROM_START( bldyr3b )
579567   ROM_REGION(0x200000, "bios", 0)
580568   SYSTEM246_BIOS
r243483r243484
670658
671659// System 246
672660GAME(2001, sys246,          0, system246, system246, driver_device, 0, ROT0, "Namco", "System 246 BIOS", GAME_IS_SKELETON|GAME_IS_BIOS_ROOT)
673GAME(2001, vnight,     sys246, system246, system246, driver_device, 0, ROT0, "Sega / Namco", "Vampire Night (VPN3 Ver. B)", GAME_IS_SKELETON)
674661GAME(2001, bldyr3b,    sys246, system246, system246, driver_device, 0, ROT0, "bootleg", "Bloody Roar 3 (bootleg)", GAME_IS_SKELETON)
675662GAME(2001, rrvac,      sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Ridge Racer V Arcade Battle (RRV3 Ver. A)", GAME_IS_SKELETON)
676663GAME(2001, rrvac2,      rrvac, system246, system246, driver_device, 0, ROT0, "Namco", "Ridge Racer V Arcade Battle (RRV2 Ver. A)", GAME_IS_SKELETON)
trunk/src/mame/drivers/nwk-tr.c
r243483r243484
4848SOIC8 chip (a secured PIC?) is not populated (the solder pads are there though).
4949There's an extra sound IC AN7395S (it's not populated on Hornet).
5050The PALs/PLDs are the same on NWK-TR and Hornet.
51Both Racing JAM/Chapter 2 and Thrill Drive use two video boards.
52The top video board is set to MASTER/TWIN, lower video board is set to SLAVE
53They are otherwise identical.
5451
5552
56Top Board (CPU PCB)
53Top Board
5754GN676 PWB(A)B
5855Konami 1997
5956|--------------------------------------------------------------|
r243483r243484
9188     DRM1M4SJ8 - Fujitsu 81C4256 256kx4 DRAM (SOJ24)
9289      SRAM256K - Cypress CY7C199 32kx8 SRAM (SOJ28)
9390     DRAM16X16 - Fujitsu 8118160A-60 16megx16 DRAM (SOJ42)
94      M48T58Y-70PC1 - ST Timekeeper RAM
91   M48T58Y-70PC1 - ST Timekeeper RAM
9592       RF5C400 - Ricoh RF5C400 PCM 32Ch, 44.1 kHz Stereo, 3D Effect Spatializer, clock input 16.9344MHz
9693        056800 - Konami Custom (QFP80)
9794        058232 - Konami Custom Ceramic Package (SIL14)
r243483r243484
130127           CN6 - DIN96 joining connector to lower PCB
131128           CN7 - Multi-pin connector (pads only, not used)
132129   CN9 to CN13 - Power Connectors
133       CN14 to CN17 - RCA Stereo Audio OUT
130   CN14 to CN17 - RCA Stereo Audio OUT
134131          CN18 - RCA Mono Audio OUT
135132          CN19 - USB Connector
136133
137134
138135ROM Usage
139136---------
140         |------------------------------- ROM Locations -------------------------------------|
137            |------------------------------- ROM Locations -------------------------------------|
141138Game         27P     25P  22P   16P     14P     12P     9P      16T     14T     12T     9T  7S
142139--------------------------------------------------------------------------------------------------
143140Racing Jam   676NC01 -    -     676A09  676A10  -       -       676A04  676A05  -       -   676A08
r243483r243484
145142Thrill Drive 713BE01 -    -     713A09  713A10  -       -       713A04  713A05  -       -   713A08
146143
147144
148Network PCB
149-----------
150GN676-PWB(H)B
151MADE IN JAPAN
152(C)1998 KONAMI
153sticker - GC713AC
154|------------------------|
155|  CY7C199       N676H1  |
156|                      2G|
157|CN3                     |
158|  HYC2485S              |
159|   XC5204        XC5210 |
160|CN2                     |
161|         CN1            |
162|------------------------|
163Notes:
164      CN1      - Connector joining to CPU board CN4
165      CN2/3    - RCA jacks for network cable
166      2G       - Small SOIC8 chip with number 0038323 at location 2G. An identical chip is present on
167                 *some* Hornet games on the GN715 CPU board at location 30C. It may be a PIC or EEPROM.
168                 On Hornet, the chip seems to refresh the data in the Timekeeper RAM when the battery
169                 dies and keeps the game working. It's purpose on the network board is unknown but it may
170                 'upgrade' the data in the NVRAM to the network version of the game for a twin cabinet set-up.
171      HYC2485S - Hybrid ceramic module for RS485
172      CY7C199  - 32k x8 SRAM
173      XC5204   - Xilinx XC5204 FPGA
174      XC5210   - Xilink XC5210 FPGA
175      N676H1   - PALCE16V8Q-15 stamped 'N676H1'
176
177     
178Bottom Board (VIDEO PCB)
145Bottom Board
179146GN676 PWB(B)B
180147|-------------------------------------------------------------------------------------------|
181148|CN4          CN2      CN8               CN6                                             CN5|
r243483r243484
215182    TEXELFX - 3DFX 500-0004-02 BD0665.1 TMU (QFP208)
216183    PIXELFX - 3DFX 500-0003-03 F001701.1 FBI (QFP240)
217184     001604 - Konami Custom (QFP208)
218       MC44200FT - Motorola MC44200FT 3 Channel Video D/A Converter (QFP44)
185   MC44200FT - Motorola MC44200FT 3 Channel Video D/A Converter (QFP44)
219186    MACH111 - AMD MACH111 CPLD (Stamped '03161A', PLCC44)
220   PLCC44_SOCKET - empty PLCC44 socket
187PLCC44_SOCKET- empty PLCC44 socket
221188     AV9170 - Integrated Circuit Systems Inc. Clock Multiplier (SOIC8)
222189     AM7201 - AMD AM7201 FIFO (PLCC32)
223190       PAL1 - AMD PALCE16V8 (stamped 'N676B4', DIP20)
224191       PAL2 - AMD PALCE16V8 (stamped 'N676B5', DIP20)
225192       PAL3 - AMD PALCE16V8 (stamped 'N676B2', DIP20)
226        JP1 - SLV O O-O MST,TWN (sets board to MASTER TWIN or SLAVE)
227        JP2 - SLV O O-O MST (sets board to MASTER or SLAVE)
193        JP1 - SLV O O-O MST,TWN
194        JP2 - SLV O O-O MST
228195        CN1 - 96 Pin joining connector to upper PCB
229196        CN2 - 8-Pin 24kHz RGB OUT
230197        CN3 - 15-Pin DSUB VGA Video MAIN OUT
r243483r243484
236203
237204ROM Usage
238205---------
239         |------ ROM Locations -------|
206            |------ ROM Locations -------|
240207Game         8X      8Y      16X     16Y
241208-------------------------------------------
242209Racing Jam   676A13  -       676A14  -
trunk/src/mame/drivers/pokechmp.c
r243483r243484
286286   ROM_LOAD( "pokechamp_10_27c040.bin",       0x00000, 0x80000, CRC(b54806ed) SHA1(c6e1485c263ebd9102ff1e8c09b4c4ca5f63c3da) )
287287ROM_END
288288
289// only the 'maincpu' and 'bgs' regions were dumped for this set, others assumed to be the same
290ROM_START( pokechmpa )
291   ROM_REGION( 0x20000, "maincpu", 0 )
292   ROM_LOAD( "1", 0x00000, 0x20000, CRC(7d051c36) SHA1(8c2329f863ad677f4398a7dab7476c9492ad4f24) )
293289
294   ROM_REGION( 0x18000, "audiocpu", 0 )     /* 96k for code + 96k for decrypted opcodes */
295   ROM_LOAD("pokechamp_09_27c512.bin", 0x10000, 0x8000, CRC(c78f6483) SHA1(a0d063effd8d1850f674edccb6e7a285b2311d21))
296   ROM_CONTINUE(              0x08000, 0x8000 )
297
298   ROM_REGION( 0x100000, "bgs", 0 )
299   ROM_LOAD( "6",       0x00000, 0x40000, CRC(1aec1de2) SHA1(f42db2445dcf1fb0957bf8a4414c3266ae47fae1) )
300   ROM_LOAD( "5",       0x40000, 0x40000, CRC(79823f7a) SHA1(1059b4baf4d4d3c49d4de4194f29f8601e75972b) )
301   ROM_LOAD( "4",       0x80000, 0x40000, CRC(e76f7596) SHA1(bb4c55bad2693da3f76d33fdf0f7f32c44dfd3e0) )
302   ROM_LOAD( "3",       0xc0000, 0x40000, CRC(a22946b8) SHA1(d77fb5bfe00349753a9e6ea9de82c1eefca090f7) )
303
304   ROM_REGION( 0x20000, "sprites", 0 )
305   /* the first half of all these roms is identical.  For rom 3 both halves match.  Correct decode is to ignore the first half */
306   ROM_LOAD( "pokechamp_02_27c512.bin",       0x00000, 0x08000, CRC(1ff44545) SHA1(2eee44484accce7b0ba21babf6e8344b234a4e87) ) ROM_CONTINUE( 0x00000, 0x8000 )
307   ROM_LOAD( "pokechamp_01_27c512.bin",       0x08000, 0x08000, CRC(338fc412) SHA1(bb8ae99ee6a399a8c67bedb88d0837fd0a4a426c) ) ROM_CONTINUE( 0x08000, 0x8000 )
308   ROM_LOAD( "pokechamp_04_27c512.bin",       0x10000, 0x08000, CRC(ee6991af) SHA1(8eca3cdfd2eb74257253957a87b245b7f85bd038) ) ROM_CONTINUE( 0x10000, 0x8000 )
309   ROM_LOAD( "pokechamp_03_27c512.bin",       0x18000, 0x08000, CRC(99f9884a) SHA1(096d6ce70dc51fb9142e80e1ec45d6d7225481f5) ) ROM_CONTINUE( 0x18000, 0x8000 )
310
311   ROM_REGION( 0x80000, "oki", 0 )
312   ROM_LOAD( "pokechamp_10_27c040.bin",       0x00000, 0x80000, CRC(b54806ed) SHA1(c6e1485c263ebd9102ff1e8c09b4c4ca5f63c3da) )
313ROM_END
314
315// only the 'maincpu' and 'bgs' and 'oki' regions were dumped for this set, others assumed to be the same
316290ROM_START(billlist)
317291   ROM_REGION(0x20000, "maincpu", 0)
318292   ROM_LOAD("billiard_list.1", 0x00000, 0x20000, CRC(4ef416f7) SHA1(e995410e2c79a3fbd2ac76a80dc6c412eb454e52) )
319293
320294   ROM_REGION(0x18000, "audiocpu", 0)     /* 96k for code + 96k for decrypted opcodes */
321   ROM_LOAD("pokechamp_09_27c512.bin", 0x10000, 0x8000, CRC(c78f6483) SHA1(a0d063effd8d1850f674edccb6e7a285b2311d21))
295   ROM_LOAD("pokechamp_09_27c512.bin", 0x10000, 0x8000, BAD_DUMP CRC(c78f6483) SHA1(a0d063effd8d1850f674edccb6e7a285b2311d21)) // wasn't dumped from this set
322296   ROM_CONTINUE(0x08000, 0x8000)
323297
324298   ROM_REGION(0x100000, "bgs", 0)
r243483r243484
329303
330304   ROM_REGION(0x20000, "sprites", 0)
331305   /* the first half of all these roms is identical.  For rom 3 both halves match.  Correct decode is to ignore the first half */
332   ROM_LOAD("pokechamp_02_27c512.bin", 0x00000, 0x08000, CRC(1ff44545) SHA1(2eee44484accce7b0ba21babf6e8344b234a4e87)) ROM_CONTINUE(0x00000, 0x8000)
333   ROM_LOAD("pokechamp_01_27c512.bin", 0x08000, 0x08000, CRC(338fc412) SHA1(bb8ae99ee6a399a8c67bedb88d0837fd0a4a426c)) ROM_CONTINUE(0x08000, 0x8000)
334   ROM_LOAD("pokechamp_04_27c512.bin", 0x10000, 0x08000, CRC(ee6991af) SHA1(8eca3cdfd2eb74257253957a87b245b7f85bd038)) ROM_CONTINUE(0x10000, 0x8000)
335   ROM_LOAD("pokechamp_03_27c512.bin", 0x18000, 0x08000, CRC(99f9884a) SHA1(096d6ce70dc51fb9142e80e1ec45d6d7225481f5)) ROM_CONTINUE(0x18000, 0x8000)
306   ROM_LOAD("pokechamp_02_27c512.bin", 0x00000, 0x08000, BAD_DUMP CRC(1ff44545) SHA1(2eee44484accce7b0ba21babf6e8344b234a4e87)) ROM_CONTINUE(0x00000, 0x8000) // wasn't dumped from this set
307   ROM_LOAD("pokechamp_01_27c512.bin", 0x08000, 0x08000, BAD_DUMP CRC(338fc412) SHA1(bb8ae99ee6a399a8c67bedb88d0837fd0a4a426c)) ROM_CONTINUE(0x08000, 0x8000) // ""
308   ROM_LOAD("pokechamp_04_27c512.bin", 0x10000, 0x08000, BAD_DUMP CRC(ee6991af) SHA1(8eca3cdfd2eb74257253957a87b245b7f85bd038)) ROM_CONTINUE(0x10000, 0x8000) // ""
309   ROM_LOAD("pokechamp_03_27c512.bin", 0x18000, 0x08000, BAD_DUMP CRC(99f9884a) SHA1(096d6ce70dc51fb9142e80e1ec45d6d7225481f5)) ROM_CONTINUE(0x18000, 0x8000) // ""
336310
337311   ROM_REGION(0x80000, "oki", 0)
338312   ROM_LOAD("billiard_list.x", 0x00000, 0x80000, CRC(b54806ed) SHA1(c6e1485c263ebd9102ff1e8c09b4c4ca5f63c3da) )
339313ROM_END
340314
341GAME( 1995, pokechmp, 0,        pokechmp, pokechmp, pokechmp_state, pokechmp, ROT0, "D.G.R.M.", "Poke Champ (set 1)", 0 )
342GAME( 1995, pokechmpa,pokechmp, pokechmp, pokechmp, pokechmp_state, pokechmp, ROT0, "D.G.R.M.", "Poke Champ (set 2)", 0 )
315GAME( 1995, pokechmp, 0,        pokechmp, pokechmp, pokechmp_state, pokechmp, ROT0, "D.G.R.M.", "Poke Champ", 0 )
343316GAME( 1995, billlist, pokechmp, pokechmp, pokechmp, pokechmp_state, pokechmp, ROT0, "D.G.R.M.", "Billard List", 0)
trunk/src/mame/drivers/quizpani.c
r243483r243484
5858   AM_RANGE(0x10000a, 0x10000b) AM_READ_PORT("DSW2")
5959   AM_RANGE(0x100014, 0x100015) AM_WRITENOP /* screen flipping? */
6060   AM_RANGE(0x100016, 0x100017) AM_WRITENOP /* IRQ enable? */
61   AM_RANGE(0x100018, 0x100019) AM_WRITE(tilesbank_w)
61   AM_RANGE(0x100018, 0x100019) AM_WRITE(quizpani_tilesbank_w)
6262   AM_RANGE(0x104000, 0x104001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)
6363   AM_RANGE(0x104020, 0x104027) AM_DEVWRITE8("nmk112", nmk112_device, okibank_w, 0x00ff)
6464   AM_RANGE(0x108000, 0x1083ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
6565   AM_RANGE(0x108400, 0x1085ff) AM_WRITENOP
6666   AM_RANGE(0x10c000, 0x10c007) AM_RAM AM_SHARE("scrollreg")
6767   AM_RANGE(0x10c008, 0x10c403) AM_WRITENOP
68   AM_RANGE(0x110000, 0x113fff) AM_RAM_WRITE(bg_videoram_w) AM_SHARE("bg_videoram")
69   AM_RANGE(0x11c000, 0x11ffff) AM_RAM_WRITE(txt_videoram_w) AM_SHARE("txt_videoram")
68   AM_RANGE(0x110000, 0x113fff) AM_RAM_WRITE(quizpani_bg_videoram_w) AM_SHARE("bg_videoram")
69   AM_RANGE(0x11c000, 0x11ffff) AM_RAM_WRITE(quizpani_txt_videoram_w) AM_SHARE("txt_videoram")
7070   AM_RANGE(0x180000, 0x18ffff) AM_RAM
7171   AM_RANGE(0x200000, 0x33ffff) AM_ROM
7272ADDRESS_MAP_END
r243483r243484
202202   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
203203   MCFG_SCREEN_SIZE(64*8, 32*8)
204204   MCFG_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 0*8, 28*8-1)
205   MCFG_SCREEN_UPDATE_DRIVER(quizpani_state, screen_update)
205   MCFG_SCREEN_UPDATE_DRIVER(quizpani_state, screen_update_quizpani)
206206   MCFG_SCREEN_PALETTE("palette")
207207
208208
r243483r243484
242242   ROM_LOAD( "qz8.121", 0x200, 0x100, CRC(b4c19741) SHA1(a6d3686bad6ef2336463b89bc2d249003d9b4bcc) ) /* unknown */
243243ROM_END
244244
245GAME( 1993, quizpani, 0, quizpani, quizpani, driver_device, 0, ROT0, "NMK", "Quiz Panicuru Fantasy", GAME_SUPPORTS_SAVE )
245GAME( 1993, quizpani, 0, quizpani, quizpani, driver_device, 0, ROT0, "NMK", "Quiz Panicuru Fantasy", 0 )
trunk/src/mame/drivers/rabbit.c
r243483r243484
9696
9797   rabbit_state(const machine_config &mconfig, device_type type, const char *tag)
9898      : driver_device(mconfig, type, tag),
99      m_maincpu(*this, "maincpu"),
100      m_eeprom(*this, "eeprom"),
101      m_gfxdecode(*this, "gfxdecode"),
102      m_palette(*this, "palette"),
10399      m_viewregs0(*this, "viewregs0"),
104100      m_viewregs6(*this, "viewregs6"),
105101      m_viewregs7(*this, "viewregs7"),
r243483r243484
108104      m_tilemap_regs(*this, "tilemap_regs"),
109105      m_spriteregs(*this, "spriteregs"),
110106      m_blitterregs(*this, "blitterregs"),
111      m_spriteram(*this, "spriteram") { }
107      m_spriteram(*this, "spriteram"),
108      m_maincpu(*this, "maincpu"),
109      m_eeprom(*this, "eeprom"),
110      m_gfxdecode(*this, "gfxdecode"),
111      m_palette(*this, "palette") { }
112112
113   required_device<cpu_device> m_maincpu;
114   required_device<eeprom_serial_93cxx_device> m_eeprom;
115   required_device<gfxdecode_device> m_gfxdecode;
116   required_device<palette_device> m_palette;
117   
118113   required_shared_ptr<UINT32> m_viewregs0;
119114   required_shared_ptr<UINT32> m_viewregs6;
120115   required_shared_ptr<UINT32> m_viewregs7;
r243483r243484
123118   required_shared_ptr_array<UINT32, 4> m_tilemap_regs;
124119   required_shared_ptr<UINT32> m_spriteregs;
125120   required_shared_ptr<UINT32> m_blitterregs;
126   required_shared_ptr<UINT32> m_spriteram;
127   
128121   bitmap_ind16 *m_sprite_bitmap;
129122   rectangle m_sprite_clip;
130123   int m_vblirqlevel;
131124   int m_bltirqlevel;
132125   int m_banking;
133126   UINT32 *m_tilemap_ram[4];
127   required_shared_ptr<UINT32> m_spriteram;
134128   tilemap_t *m_tilemap[4];
135   
136   DECLARE_WRITE32_MEMBER(tilemap0_w);
137   DECLARE_WRITE32_MEMBER(tilemap1_w);
138   DECLARE_WRITE32_MEMBER(tilemap2_w);
139   DECLARE_WRITE32_MEMBER(tilemap3_w);
140   DECLARE_READ32_MEMBER(tilemap0_r);
141   DECLARE_READ32_MEMBER(tilemap1_r);
142   DECLARE_READ32_MEMBER(tilemap2_r);
143   DECLARE_READ32_MEMBER(tilemap3_r);
129   DECLARE_WRITE32_MEMBER(rabbit_tilemap0_w);
130   DECLARE_WRITE32_MEMBER(rabbit_tilemap1_w);
131   DECLARE_WRITE32_MEMBER(rabbit_tilemap2_w);
132   DECLARE_WRITE32_MEMBER(rabbit_tilemap3_w);
133   DECLARE_READ32_MEMBER(rabbit_tilemap0_r);
134   DECLARE_READ32_MEMBER(rabbit_tilemap1_r);
135   DECLARE_READ32_MEMBER(rabbit_tilemap2_r);
136   DECLARE_READ32_MEMBER(rabbit_tilemap3_r);
144137   DECLARE_READ32_MEMBER(randomrabbits);
145   DECLARE_WRITE32_MEMBER(rombank_w);
146   DECLARE_WRITE32_MEMBER(blitter_w);
147   DECLARE_WRITE32_MEMBER(eeprom_write);
148   
138   DECLARE_WRITE32_MEMBER(rabbit_rombank_w);
139   DECLARE_WRITE32_MEMBER(rabbit_blitter_w);
140   DECLARE_WRITE32_MEMBER(rabbit_eeprom_write);
149141   DECLARE_DRIVER_INIT(rabbit);
150   
151   TILE_GET_INFO_MEMBER(get_tilemap0_tile_info);
152   TILE_GET_INFO_MEMBER(get_tilemap1_tile_info);
153   TILE_GET_INFO_MEMBER(get_tilemap2_tile_info);
154   TILE_GET_INFO_MEMBER(get_tilemap3_tile_info);
155   
156   INTERRUPT_GEN_MEMBER(vblank_interrupt);
157   
142   TILE_GET_INFO_MEMBER(get_rabbit_tilemap0_tile_info);
143   TILE_GET_INFO_MEMBER(get_rabbit_tilemap1_tile_info);
144   TILE_GET_INFO_MEMBER(get_rabbit_tilemap2_tile_info);
145   TILE_GET_INFO_MEMBER(get_rabbit_tilemap3_tile_info);
158146   virtual void video_start();
159   
160   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
161   inline void get_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize);
147   UINT32 screen_update_rabbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
148   INTERRUPT_GEN_MEMBER(rabbit_vblank_interrupt);
149   inline void get_rabbit_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize);
162150   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
163   void clearspritebitmap( bitmap_ind16 &bitmap, const rectangle &cliprect );
151   void rabbit_clearspritebitmap( bitmap_ind16 &bitmap, const rectangle &cliprect );
164152   void draw_sprite_bitmap( bitmap_ind16 &bitmap, const rectangle &cliprect );
165   void drawtilemap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int whichtilemap );
166   void do_blit();
167
153   void rabbit_drawtilemap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int whichtilemap );
154   void rabbit_do_blit();
155   required_device<cpu_device> m_maincpu;
156   required_device<eeprom_serial_93cxx_device> m_eeprom;
157   required_device<gfxdecode_device> m_gfxdecode;
158   required_device<palette_device> m_palette;
168159protected:
169160   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
170161};
171162
172163
173164/* call with tilesize = 0 for 8x8 or 1 for 16x16 */
174void rabbit_state::get_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize)
165void rabbit_state::get_rabbit_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize)
175166{
176167   /* fedcba98 76543210 fedcba98 76543210
177168      x                                    color mask? how exactly does it relate to color bits?
r243483r243484
231222   }
232223}
233224
234TILE_GET_INFO_MEMBER(rabbit_state::get_tilemap0_tile_info)
225TILE_GET_INFO_MEMBER(rabbit_state::get_rabbit_tilemap0_tile_info)
235226{
236   get_tilemap_info(tileinfo,tile_index,0,1);
227   get_rabbit_tilemap_info(tileinfo,tile_index,0,1);
237228}
238229
239TILE_GET_INFO_MEMBER(rabbit_state::get_tilemap1_tile_info)
230TILE_GET_INFO_MEMBER(rabbit_state::get_rabbit_tilemap1_tile_info)
240231{
241   get_tilemap_info(tileinfo,tile_index,1,1);
232   get_rabbit_tilemap_info(tileinfo,tile_index,1,1);
242233}
243234
244TILE_GET_INFO_MEMBER(rabbit_state::get_tilemap2_tile_info)
235TILE_GET_INFO_MEMBER(rabbit_state::get_rabbit_tilemap2_tile_info)
245236{
246   get_tilemap_info(tileinfo,tile_index,2,1);
237   get_rabbit_tilemap_info(tileinfo,tile_index,2,1);
247238}
248239
249TILE_GET_INFO_MEMBER(rabbit_state::get_tilemap3_tile_info)
240TILE_GET_INFO_MEMBER(rabbit_state::get_rabbit_tilemap3_tile_info)
250241{
251   get_tilemap_info(tileinfo,tile_index,3,0);
242   get_rabbit_tilemap_info(tileinfo,tile_index,3,0);
252243}
253244
254WRITE32_MEMBER(rabbit_state::tilemap0_w)
245WRITE32_MEMBER(rabbit_state::rabbit_tilemap0_w)
255246{
256247   COMBINE_DATA(&m_tilemap_ram[0][offset]);
257248   m_tilemap[0]->mark_tile_dirty(offset);
258249}
259250
260WRITE32_MEMBER(rabbit_state::tilemap1_w)
251WRITE32_MEMBER(rabbit_state::rabbit_tilemap1_w)
261252{
262253   COMBINE_DATA(&m_tilemap_ram[1][offset]);
263254   m_tilemap[1]->mark_tile_dirty(offset);
264255}
265256
266WRITE32_MEMBER(rabbit_state::tilemap2_w)
257WRITE32_MEMBER(rabbit_state::rabbit_tilemap2_w)
267258{
268259   COMBINE_DATA(&m_tilemap_ram[2][offset]);
269260   m_tilemap[2]->mark_tile_dirty(offset);
270261}
271262
272263
273WRITE32_MEMBER(rabbit_state::tilemap3_w)
264WRITE32_MEMBER(rabbit_state::rabbit_tilemap3_w)
274265{
275266   COMBINE_DATA(&m_tilemap_ram[3][offset]);
276267   m_tilemap[3]->mark_tile_dirty(offset);
r243483r243484
332323}
333324
334325/* the sprite bitmap can probably be handled better than this ... */
335void rabbit_state::clearspritebitmap( bitmap_ind16 &bitmap, const rectangle &cliprect )
326void rabbit_state::rabbit_clearspritebitmap( bitmap_ind16 &bitmap, const rectangle &cliprect )
336327{
337328   int startx, starty;
338329   int y;
r243483r243484
420411   m_tilemap_ram[2] = auto_alloc_array_clear(machine(), UINT32, 0x20000/4);
421412   m_tilemap_ram[3] = auto_alloc_array_clear(machine(), UINT32, 0x20000/4);
422413
423   m_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_tilemap0_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
424   m_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_tilemap1_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
425   m_tilemap[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_tilemap2_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
426   m_tilemap[3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_tilemap3_tile_info),this),TILEMAP_SCAN_ROWS, 8,  8, 128,32);
414   m_tilemap[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_rabbit_tilemap0_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
415   m_tilemap[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_rabbit_tilemap1_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
416   m_tilemap[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_rabbit_tilemap2_tile_info),this),TILEMAP_SCAN_ROWS,16, 16, 128,32);
417   m_tilemap[3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rabbit_state::get_rabbit_tilemap3_tile_info),this),TILEMAP_SCAN_ROWS, 8,  8, 128,32);
427418
428419   /* the tilemaps mix 4bpp and 8bbp tiles, we split these into 2 groups, and set a different transpen for each group */
429420   m_tilemap[0]->map_pen_to_layer(0, 15,  TILEMAP_PIXEL_TRANSPARENT);
r243483r243484
437428
438429   m_sprite_bitmap = auto_bitmap_ind16_alloc(machine(),0x1000,0x1000);
439430   m_sprite_clip.set(0, 0x1000-1, 0, 0x1000-1);
440   
441   save_pointer(NAME(m_tilemap_ram[0]), 0x20000/4);
442   save_pointer(NAME(m_tilemap_ram[1]), 0x20000/4);
443   save_pointer(NAME(m_tilemap_ram[2]), 0x20000/4);
444   save_pointer(NAME(m_tilemap_ram[3]), 0x20000/4);
445431}
446432
447433/*
r243483r243484
466452
467453*/
468454
469void rabbit_state::drawtilemap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int whichtilemap )
455void rabbit_state::rabbit_drawtilemap( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int whichtilemap )
470456{
471457   INT32 startx, starty, incxx, incxy, incyx, incyy, tran;
472458
r243483r243484
489475         tran ? 0 : TILEMAP_DRAW_OPAQUE,0);
490476}
491477
492UINT32 rabbit_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
478UINT32 rabbit_state::screen_update_rabbit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
493479{
494480   int prilevel;
495481
r243483r243484
511497   /* prio isnt certain but seems to work.. */
512498   for (prilevel = 0xf; prilevel >0; prilevel--)
513499   {
514      if (prilevel == ((m_tilemap_regs[3][0]&0x0f000000)>>24)) drawtilemap(screen,bitmap,cliprect, 3);
515      if (prilevel == ((m_tilemap_regs[2][0]&0x0f000000)>>24)) drawtilemap(screen,bitmap,cliprect, 2);
516      if (prilevel == ((m_tilemap_regs[1][0]&0x0f000000)>>24)) drawtilemap(screen,bitmap,cliprect, 1);
517      if (prilevel == ((m_tilemap_regs[0][0]&0x0f000000)>>24)) drawtilemap(screen,bitmap,cliprect, 0);
500      if (prilevel == ((m_tilemap_regs[3][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen,bitmap,cliprect, 3);
501      if (prilevel == ((m_tilemap_regs[2][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen,bitmap,cliprect, 2);
502      if (prilevel == ((m_tilemap_regs[1][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen,bitmap,cliprect, 1);
503      if (prilevel == ((m_tilemap_regs[0][0]&0x0f000000)>>24)) rabbit_drawtilemap(screen,bitmap,cliprect, 0);
518504
519505      if (prilevel == 0x09) // should it be selectable?
520506      {
521         clearspritebitmap(bitmap,cliprect);
507         rabbit_clearspritebitmap(bitmap,cliprect);
522508         draw_sprites(bitmap,cliprect);  // render to bitmap
523509         draw_sprite_bitmap(bitmap,cliprect); // copy bitmap to screen
524510      }
r243483r243484
529515
530516
531517
532READ32_MEMBER(rabbit_state::tilemap0_r)
518READ32_MEMBER(rabbit_state::rabbit_tilemap0_r)
533519{
534520   return m_tilemap_ram[0][offset];
535521}
536522
537READ32_MEMBER(rabbit_state::tilemap1_r)
523READ32_MEMBER(rabbit_state::rabbit_tilemap1_r)
538524{
539525   return m_tilemap_ram[1][offset];
540526}
541527
542READ32_MEMBER(rabbit_state::tilemap2_r)
528READ32_MEMBER(rabbit_state::rabbit_tilemap2_r)
543529{
544530   return m_tilemap_ram[2][offset];
545531}
546532
547READ32_MEMBER(rabbit_state::tilemap3_r)
533READ32_MEMBER(rabbit_state::rabbit_tilemap3_r)
548534{
549535   return m_tilemap_ram[3][offset];
550536}
r243483r243484
555541}
556542
557543/* rom bank is used when testing roms, not currently hooked up */
558WRITE32_MEMBER(rabbit_state::rombank_w)
544WRITE32_MEMBER(rabbit_state::rabbit_rombank_w)
559545{
560546   UINT8 *dataroms = memregion("gfx1")->base();
561547#if 0
r243483r243484
586572   }
587573}
588574
589void rabbit_state::do_blit()
575void rabbit_state::rabbit_do_blit()
590576{
591577   UINT8 *blt_data = memregion("gfx1")->base();
592578   int blt_source = (m_blitterregs[0]&0x000fffff)>>0;
r243483r243484
681667
682668
683669
684WRITE32_MEMBER(rabbit_state::blitter_w)
670WRITE32_MEMBER(rabbit_state::rabbit_blitter_w)
685671{
686672   COMBINE_DATA(&m_blitterregs[offset]);
687673
688674   if (offset == 0x0c/4)
689675   {
690      do_blit();
676      rabbit_do_blit();
691677   }
692678}
693679
694WRITE32_MEMBER(rabbit_state::eeprom_write)
680WRITE32_MEMBER(rabbit_state::rabbit_eeprom_write)
695681{
696682   // don't disturb the EEPROM if we're not actually writing to it
697683   // (in particular, data & 0x100 here with mask = ffff00ff looks to be the watchdog)
r243483r243484
714700   AM_RANGE(0x000010, 0x000013) AM_WRITENOP // bug in code / emulation?
715701   AM_RANGE(0x000024, 0x000027) AM_WRITENOP // bug in code / emulation?
716702   AM_RANGE(0x00719c, 0x00719f) AM_WRITENOP // bug in code / emulation?
717   AM_RANGE(0x200000, 0x200003) AM_READ_PORT("INPUTS") AM_WRITE(eeprom_write)
703   AM_RANGE(0x200000, 0x200003) AM_READ_PORT("INPUTS") AM_WRITE(rabbit_eeprom_write)
718704   AM_RANGE(0x400010, 0x400013) AM_READ(randomrabbits) // gfx chip status?
719705   /* this lot are probably gfxchip/blitter etc. related */
720706   AM_RANGE(0x400010, 0x400013) AM_WRITEONLY AM_SHARE("viewregs0" )
r243483r243484
723709   AM_RANGE(0x400140, 0x400157) AM_WRITEONLY AM_SHARE("tilemap_regs.2" ) // tilemap regs3
724710   AM_RANGE(0x400160, 0x400177) AM_WRITEONLY AM_SHARE("tilemap_regs.3" ) // tilemap regs4
725711   AM_RANGE(0x400200, 0x40021b) AM_WRITEONLY AM_SHARE("spriteregs" ) // sprregs?
726   AM_RANGE(0x400300, 0x400303) AM_WRITE(rombank_w) // used during rom testing, rombank/area select + something else?
712   AM_RANGE(0x400300, 0x400303) AM_WRITE(rabbit_rombank_w) // used during rom testing, rombank/area select + something else?
727713   AM_RANGE(0x400400, 0x400413) AM_WRITEONLY AM_SHARE("viewregs6" ) // some global controls? (brightness etc.?)
728714   AM_RANGE(0x400500, 0x400503) AM_WRITEONLY AM_SHARE("viewregs7" )
729   AM_RANGE(0x400700, 0x40070f) AM_WRITE(blitter_w) AM_SHARE("blitterregs" )
715   AM_RANGE(0x400700, 0x40070f) AM_WRITE(rabbit_blitter_w) AM_SHARE("blitterregs" )
730716   AM_RANGE(0x400800, 0x40080f) AM_WRITEONLY AM_SHARE("viewregs9" ) // never changes?
731717   AM_RANGE(0x400900, 0x4009ff) AM_DEVREADWRITE16("i5000snd", i5000snd_device, read, write, 0xffffffff)
732718   /* hmm */
r243483r243484
734720
735721   AM_RANGE(0x440000, 0x47ffff) AM_ROMBANK("bank1") // data (gfx / sound) rom readback for ROM testing
736722   /* tilemaps */
737   AM_RANGE(0x480000, 0x483fff) AM_READWRITE(tilemap0_r,tilemap0_w)
738   AM_RANGE(0x484000, 0x487fff) AM_READWRITE(tilemap1_r,tilemap1_w)
739   AM_RANGE(0x488000, 0x48bfff) AM_READWRITE(tilemap2_r,tilemap2_w)
740   AM_RANGE(0x48c000, 0x48ffff) AM_READWRITE(tilemap3_r,tilemap3_w)
723   AM_RANGE(0x480000, 0x483fff) AM_READWRITE(rabbit_tilemap0_r,rabbit_tilemap0_w)
724   AM_RANGE(0x484000, 0x487fff) AM_READWRITE(rabbit_tilemap1_r,rabbit_tilemap1_w)
725   AM_RANGE(0x488000, 0x48bfff) AM_READWRITE(rabbit_tilemap2_r,rabbit_tilemap2_w)
726   AM_RANGE(0x48c000, 0x48ffff) AM_READWRITE(rabbit_tilemap3_r,rabbit_tilemap3_w)
741727   AM_RANGE(0x494000, 0x497fff) AM_RAM AM_SHARE("spriteram") // sprites?
742728   AM_RANGE(0x4a0000, 0x4affff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
743729   AM_RANGE(0xff0000, 0xffffff) AM_RAM
r243483r243484
775761INPUT_PORTS_END
776762
777763
778static const gfx_layout sprite_8x8x4_layout =
764static const gfx_layout rabbit_sprite_8x8x4_layout =
779765{
780766   8,8,
781767   RGN_FRAC(1,1),
r243483r243484
786772   8*32
787773};
788774
789static const gfx_layout sprite_8x8x8_layout =
775static const gfx_layout rabbit_sprite_8x8x8_layout =
790776{
791777   8,8,
792778   RGN_FRAC(1,1),
r243483r243484
799785
800786
801787
802static const gfx_layout sprite_16x16x4_layout =
788static const gfx_layout rabbit_sprite_16x16x4_layout =
803789{
804790   16,16,
805791   RGN_FRAC(1,2),
r243483r243484
810796   16*32
811797};
812798
813static const gfx_layout sprite_16x16x8_layout =
799static const gfx_layout rabbit_sprite_16x16x8_layout =
814800{
815801   16,16,
816802   RGN_FRAC(1,2),
r243483r243484
821807   16*64
822808};
823809
824static const gfx_layout _8x8x4_layout =
810static const gfx_layout rabbit_8x8x4_layout =
825811{
826812   8,8,
827813   RGN_FRAC(1,1),
r243483r243484
832818   8*32
833819};
834820
835static const gfx_layout _16x16x4_layout =
821static const gfx_layout rabbit_16x16x4_layout =
836822{
837823   16,16,
838824   RGN_FRAC(1,1),
r243483r243484
843829   16*64
844830};
845831
846static const gfx_layout _8x8x8_layout =
832static const gfx_layout rabbit_8x8x8_layout =
847833{
848834   8,8,
849835   RGN_FRAC(1,1),
r243483r243484
854840   8*64
855841};
856842
857static const gfx_layout _16x16x8_layout =
843static const gfx_layout rabbit_16x16x8_layout =
858844{
859845   16,16,
860846   RGN_FRAC(1,1),
r243483r243484
869855
870856static GFXDECODE_START( rabbit )
871857   /* this seems to be sprites */
872   GFXDECODE_ENTRY( "gfx1", 0, sprite_8x8x4_layout,   0x0, 0x1000  )
873   GFXDECODE_ENTRY( "gfx1", 0, sprite_16x16x4_layout, 0x0, 0x1000  )
874   GFXDECODE_ENTRY( "gfx1", 0, sprite_8x8x8_layout,   0x0, 0x1000  ) // wrong
875   GFXDECODE_ENTRY( "gfx1", 0, sprite_16x16x8_layout, 0x0, 0x1000  ) // wrong
858   GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_8x8x4_layout,   0x0, 0x1000  )
859   GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_16x16x4_layout, 0x0, 0x1000  )
860   GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_8x8x8_layout,   0x0, 0x1000  ) // wrong
861   GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_16x16x8_layout, 0x0, 0x1000  ) // wrong
876862
877863   /* this seems to be backgrounds and tilemap gfx */
878   GFXDECODE_ENTRY( "gfx2", 0, _8x8x4_layout,   0x0, 0x1000  )
879   GFXDECODE_ENTRY( "gfx2", 0, _16x16x4_layout, 0x0, 0x1000  )
880   GFXDECODE_ENTRY( "gfx2", 0, _8x8x8_layout,   0x0, 0x1000  )
881   GFXDECODE_ENTRY( "gfx2", 0, _16x16x8_layout, 0x0, 0x1000  )
864   GFXDECODE_ENTRY( "gfx2", 0, rabbit_8x8x4_layout,   0x0, 0x1000  )
865   GFXDECODE_ENTRY( "gfx2", 0, rabbit_16x16x4_layout, 0x0, 0x1000  )
866   GFXDECODE_ENTRY( "gfx2", 0, rabbit_8x8x8_layout,   0x0, 0x1000  )
867   GFXDECODE_ENTRY( "gfx2", 0, rabbit_16x16x8_layout, 0x0, 0x1000  )
882868
883869GFXDECODE_END
884870
r243483r243484
889875
890876  */
891877
892INTERRUPT_GEN_MEMBER(rabbit_state::vblank_interrupt)
878INTERRUPT_GEN_MEMBER(rabbit_state::rabbit_vblank_interrupt)
893879{
894880   m_maincpu->set_input_line(m_vblirqlevel, HOLD_LINE);
895881}
r243483r243484
897883static MACHINE_CONFIG_START( rabbit, rabbit_state )
898884   MCFG_CPU_ADD("maincpu", M68EC020, XTAL_24MHz)
899885   MCFG_CPU_PROGRAM_MAP(rabbit_map)
900   MCFG_CPU_VBLANK_INT_DRIVER("screen", rabbit_state,  vblank_interrupt)
886   MCFG_CPU_VBLANK_INT_DRIVER("screen", rabbit_state,  rabbit_vblank_interrupt)
901887
902888   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
903889
r243483r243484
910896   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
911897//  MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*16, 64*16-1)
912898//  MCFG_SCREEN_VISIBLE_AREA(0*8, 20*16-1, 32*16, 48*16-1)
913   MCFG_SCREEN_UPDATE_DRIVER(rabbit_state, screen_update)
899   MCFG_SCREEN_UPDATE_DRIVER(rabbit_state, screen_update_rabbit)
914900   MCFG_SCREEN_PALETTE("palette")
915901
916902   MCFG_PALETTE_ADD_INIT_BLACK("palette", 0x4000)
r243483r243484
980966ROM_END
981967
982968
983GAME( 1997, rabbit,        0, rabbit,  rabbit, rabbit_state,  rabbit,  ROT0, "Aorn / Electronic Arts", "Rabbit (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // somewhat playable
969GAME( 1997, rabbit,        0, rabbit,  rabbit, rabbit_state,  rabbit,  ROT0, "Aorn / Electronic Arts", "Rabbit (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) // somewhat playable
trunk/src/mame/drivers/segas32.c
r243483r243484
32783278*/
32793279ROM_START( harddunk )
32803280   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
3281   ROM_LOAD32_WORD_x2( "epr-16512.ic37", 0x000000, 0x40000, CRC(1a7de085) SHA1(2e0dac1f7715089b7f6b1035c859ffe2d674932f) )
3282   /* the following is the same as 16509.ic40 but with a different name, unusual for Sega */
3283   ROM_LOAD32_WORD_x2( "epr-16513.ic40", 0x000002, 0x40000, CRC(603dee75) SHA1(32ae964a4b57d470b4900cca6e06329f1a75a6e6) )
3281   ROM_LOAD32_WORD_x2( "epr-16512.37", 0x000000, 0x40000, CRC(1a7de085) SHA1(2e0dac1f7715089b7f6b1035c859ffe2d674932f) )
3282   /* the following is the same as 16509.40 but with a different name, unusual for Sega */
3283   ROM_LOAD32_WORD_x2( "epr-16513.40", 0x000002, 0x40000, CRC(603dee75) SHA1(32ae964a4b57d470b4900cca6e06329f1a75a6e6) )
32843284
32853285   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
3286   ROM_LOAD_x4( "epr-16505.ic31", 0x100000, 0x20000, CRC(eeb90a07) SHA1(d1c2132897994b2e85fd5a97222b9fcd61bc421e) )
3286   ROM_LOAD_x4( "epr-16505", 0x100000, 0x20000, CRC(eeb90a07) SHA1(d1c2132897994b2e85fd5a97222b9fcd61bc421e) )
32873287
32883288   ROM_REGION( 0x100000, "gfx1", 0 ) /* tiles */
3289   ROM_LOAD16_BYTE( "mpr-16503.ic3", 0x000000, 0x080000, CRC(ac1b6f1a) SHA1(56482931adf7fe551acf796b74cd8af3773d4fef) )
3290   ROM_LOAD16_BYTE( "mpr-16504.ic11", 0x000001, 0x080000, CRC(7c61fcd8) SHA1(ca4354f90fada752bf11ee22a7798a8aa22b1c61) )
3289   ROM_LOAD16_BYTE( "mpr-16503", 0x000000, 0x080000, CRC(ac1b6f1a) SHA1(56482931adf7fe551acf796b74cd8af3773d4fef) )
3290   ROM_LOAD16_BYTE( "mpr-16504", 0x000001, 0x080000, CRC(7c61fcd8) SHA1(ca4354f90fada752bf11ee22a7798a8aa22b1c61) )
32913291
32923292   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
3293   ROMX_LOAD( "mpr-16495.ic14", 0x000000, 0x200000, CRC(6e5f26be) SHA1(146761072bbed08f4a9df8a474b34fab61afaa4f) , ROM_SKIP(6)|ROM_GROUPWORD )
3294   ROMX_LOAD( "mpr-16497.ic15", 0x000002, 0x200000, CRC(42ab5859) SHA1(f50c51eb81186aec5f747ecab4c5c928f8701afc) , ROM_SKIP(6)|ROM_GROUPWORD )
3295   ROMX_LOAD( "mpr-16499.ic10", 0x000004, 0x200000, CRC(a290ea36) SHA1(2503b44174f23a9d323caab86553977d1d6d9c94) , ROM_SKIP(6)|ROM_GROUPWORD )
3296   ROMX_LOAD( "mpr-16501.ic38", 0x000006, 0x200000, CRC(f1566620) SHA1(bcf31d11ee669d5afc7dc22c42fa59f4e48c1f50) , ROM_SKIP(6)|ROM_GROUPWORD )
3297   ROMX_LOAD( "mpr-16496.ic22", 0x800000, 0x200000, CRC(d9d27247) SHA1(d211623478516ed1b89ab16a7fc7969954c5e353) , ROM_SKIP(6)|ROM_GROUPWORD )
3298   ROMX_LOAD( "mpr-16498.ic23", 0x800002, 0x200000, CRC(c022a991) SHA1(a660a20692f4d9ba7be73577328f69f109be5e47) , ROM_SKIP(6)|ROM_GROUPWORD )
3299   ROMX_LOAD( "mpr-16500.ic18", 0x800004, 0x200000, CRC(452c0be3) SHA1(af87ce4618bae2d791c1baed34ba7f853af664ff) , ROM_SKIP(6)|ROM_GROUPWORD )
3300   ROMX_LOAD( "mpr-16502.ic41", 0x800006, 0x200000, CRC(ffc3147e) SHA1(12d882dec3098674d27058a8009e8778555f477a) , ROM_SKIP(6)|ROM_GROUPWORD )
3293   ROMX_LOAD( "mpr-16495", 0x000000, 0x200000, CRC(6e5f26be) SHA1(146761072bbed08f4a9df8a474b34fab61afaa4f) , ROM_SKIP(6)|ROM_GROUPWORD )
3294   ROMX_LOAD( "mpr-16497", 0x000002, 0x200000, CRC(42ab5859) SHA1(f50c51eb81186aec5f747ecab4c5c928f8701afc) , ROM_SKIP(6)|ROM_GROUPWORD )
3295   ROMX_LOAD( "mpr-16499", 0x000004, 0x200000, CRC(a290ea36) SHA1(2503b44174f23a9d323caab86553977d1d6d9c94) , ROM_SKIP(6)|ROM_GROUPWORD )
3296   ROMX_LOAD( "mpr-16501", 0x000006, 0x200000, CRC(f1566620) SHA1(bcf31d11ee669d5afc7dc22c42fa59f4e48c1f50) , ROM_SKIP(6)|ROM_GROUPWORD )
3297   ROMX_LOAD( "mpr-16496", 0x800000, 0x200000, CRC(d9d27247) SHA1(d211623478516ed1b89ab16a7fc7969954c5e353) , ROM_SKIP(6)|ROM_GROUPWORD )
3298   ROMX_LOAD( "mpr-16498", 0x800002, 0x200000, CRC(c022a991) SHA1(a660a20692f4d9ba7be73577328f69f109be5e47) , ROM_SKIP(6)|ROM_GROUPWORD )
3299   ROMX_LOAD( "mpr-16500", 0x800004, 0x200000, CRC(452c0be3) SHA1(af87ce4618bae2d791c1baed34ba7f853af664ff) , ROM_SKIP(6)|ROM_GROUPWORD )
3300   ROMX_LOAD( "mpr-16502", 0x800006, 0x200000, CRC(ffc3147e) SHA1(12d882dec3098674d27058a8009e8778555f477a) , ROM_SKIP(6)|ROM_GROUPWORD )
33013301
33023302   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
33033303   ROM_LOAD( "mpr-16506.1", 0x000000, 0x200000, CRC(e779f5ed) SHA1(462d1bbe8bb12a0c5a6d6c613c720b26ec21cb25) )
r243483r243484
33103310*/
33113311ROM_START( harddunkj )
33123312   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
3313   ROM_LOAD32_WORD_x2( "epr-16508.ic37", 0x000000, 0x40000, CRC(b3713be5) SHA1(8123638a838e41fcc0d32e14382421b521eff94f) )
3314   ROM_LOAD32_WORD_x2( "epr-16509.ic40", 0x000002, 0x40000, CRC(603dee75) SHA1(32ae964a4b57d470b4900cca6e06329f1a75a6e6) )
3313   ROM_LOAD32_WORD_x2( "epr-16508.37", 0x000000, 0x40000, CRC(b3713be5) SHA1(8123638a838e41fcc0d32e14382421b521eff94f) )
3314   ROM_LOAD32_WORD_x2( "epr-16509.40", 0x000002, 0x40000, CRC(603dee75) SHA1(32ae964a4b57d470b4900cca6e06329f1a75a6e6) )
33153315
33163316   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
3317   ROM_LOAD_x4( "epr-16505.ic31", 0x100000, 0x20000, CRC(eeb90a07) SHA1(d1c2132897994b2e85fd5a97222b9fcd61bc421e) )
3317   ROM_LOAD_x4( "epr-16505", 0x100000, 0x20000, CRC(eeb90a07) SHA1(d1c2132897994b2e85fd5a97222b9fcd61bc421e) )
33183318
33193319   ROM_REGION( 0x100000, "gfx1", 0 ) /* tiles */
3320   ROM_LOAD16_BYTE( "mpr-16503.ic3", 0x000000, 0x080000, CRC(ac1b6f1a) SHA1(56482931adf7fe551acf796b74cd8af3773d4fef) )
3321   ROM_LOAD16_BYTE( "mpr-16504.ic11", 0x000001, 0x080000, CRC(7c61fcd8) SHA1(ca4354f90fada752bf11ee22a7798a8aa22b1c61) )
3320   ROM_LOAD16_BYTE( "mpr-16503", 0x000000, 0x080000, CRC(ac1b6f1a) SHA1(56482931adf7fe551acf796b74cd8af3773d4fef) )
3321   ROM_LOAD16_BYTE( "mpr-16504", 0x000001, 0x080000, CRC(7c61fcd8) SHA1(ca4354f90fada752bf11ee22a7798a8aa22b1c61) )
33223322
33233323   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
3324   ROMX_LOAD( "mpr-16495.ic14", 0x000000, 0x200000, CRC(6e5f26be) SHA1(146761072bbed08f4a9df8a474b34fab61afaa4f) , ROM_SKIP(6)|ROM_GROUPWORD )
3325   ROMX_LOAD( "mpr-16497.ic15", 0x000002, 0x200000, CRC(42ab5859) SHA1(f50c51eb81186aec5f747ecab4c5c928f8701afc) , ROM_SKIP(6)|ROM_GROUPWORD )
3326   ROMX_LOAD( "mpr-16499.ic10", 0x000004, 0x200000, CRC(a290ea36) SHA1(2503b44174f23a9d323caab86553977d1d6d9c94) , ROM_SKIP(6)|ROM_GROUPWORD )
3327   ROMX_LOAD( "mpr-16501.ic38", 0x000006, 0x200000, CRC(f1566620) SHA1(bcf31d11ee669d5afc7dc22c42fa59f4e48c1f50) , ROM_SKIP(6)|ROM_GROUPWORD )
3328   ROMX_LOAD( "mpr-16496.ic22", 0x800000, 0x200000, CRC(d9d27247) SHA1(d211623478516ed1b89ab16a7fc7969954c5e353) , ROM_SKIP(6)|ROM_GROUPWORD )
3329   ROMX_LOAD( "mpr-16498.ic23", 0x800002, 0x200000, CRC(c022a991) SHA1(a660a20692f4d9ba7be73577328f69f109be5e47) , ROM_SKIP(6)|ROM_GROUPWORD )
3330   ROMX_LOAD( "mpr-16500.ic18", 0x800004, 0x200000, CRC(452c0be3) SHA1(af87ce4618bae2d791c1baed34ba7f853af664ff) , ROM_SKIP(6)|ROM_GROUPWORD )
3331   ROMX_LOAD( "mpr-16502.ic41", 0x800006, 0x200000, CRC(ffc3147e) SHA1(12d882dec3098674d27058a8009e8778555f477a) , ROM_SKIP(6)|ROM_GROUPWORD )
3324   ROMX_LOAD( "mpr-16495", 0x000000, 0x200000, CRC(6e5f26be) SHA1(146761072bbed08f4a9df8a474b34fab61afaa4f) , ROM_SKIP(6)|ROM_GROUPWORD )
3325   ROMX_LOAD( "mpr-16497", 0x000002, 0x200000, CRC(42ab5859) SHA1(f50c51eb81186aec5f747ecab4c5c928f8701afc) , ROM_SKIP(6)|ROM_GROUPWORD )
3326   ROMX_LOAD( "mpr-16499", 0x000004, 0x200000, CRC(a290ea36) SHA1(2503b44174f23a9d323caab86553977d1d6d9c94) , ROM_SKIP(6)|ROM_GROUPWORD )
3327   ROMX_LOAD( "mpr-16501", 0x000006, 0x200000, CRC(f1566620) SHA1(bcf31d11ee669d5afc7dc22c42fa59f4e48c1f50) , ROM_SKIP(6)|ROM_GROUPWORD )
3328   ROMX_LOAD( "mpr-16496", 0x800000, 0x200000, CRC(d9d27247) SHA1(d211623478516ed1b89ab16a7fc7969954c5e353) , ROM_SKIP(6)|ROM_GROUPWORD )
3329   ROMX_LOAD( "mpr-16498", 0x800002, 0x200000, CRC(c022a991) SHA1(a660a20692f4d9ba7be73577328f69f109be5e47) , ROM_SKIP(6)|ROM_GROUPWORD )
3330   ROMX_LOAD( "mpr-16500", 0x800004, 0x200000, CRC(452c0be3) SHA1(af87ce4618bae2d791c1baed34ba7f853af664ff) , ROM_SKIP(6)|ROM_GROUPWORD )
3331   ROMX_LOAD( "mpr-16502", 0x800006, 0x200000, CRC(ffc3147e) SHA1(12d882dec3098674d27058a8009e8778555f477a) , ROM_SKIP(6)|ROM_GROUPWORD )
33323332
33333333   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
3334   ROM_LOAD( "mpr-16506.ic1", 0x000000, 0x200000, CRC(e779f5ed) SHA1(462d1bbe8bb12a0c5a6d6c613c720b26ec21cb25) )
3335   ROM_LOAD( "mpr-16507.ic2", 0x200000, 0x200000, CRC(31e068d3) SHA1(9ac88b15af441fb3b31ce759c565b60a09039571) )
3334   ROM_LOAD( "mpr-16506.1", 0x000000, 0x200000, CRC(e779f5ed) SHA1(462d1bbe8bb12a0c5a6d6c613c720b26ec21cb25) )
3335   ROM_LOAD( "mpr-16507.2", 0x200000, 0x200000, CRC(31e068d3) SHA1(9ac88b15af441fb3b31ce759c565b60a09039571) )
33363336ROM_END
33373337
33383338
r243483r243484
35733573*/
35743574ROM_START( orunners )
35753575   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
3576   ROM_LOAD32_WORD_x4( "epr15620.ic37", 0x000000, 0x020000, CRC(84f5ad92) SHA1(1f9cb04b42b2d450be93400d9979a7910eaf05d1) )
3577   ROM_LOAD32_WORD_x4( "epr15621.ic40", 0x000002, 0x020000, CRC(d98b765a) SHA1(b58567e976228267a86af53de2135bc0b247a44a) )
3578   ROM_LOAD32_WORD( "mpr15538.ic36",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3579   ROM_LOAD32_WORD( "mpr15539.ic39",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
3576   ROM_LOAD32_WORD_x4( "epr15620.37", 0x000000, 0x020000, CRC(84f5ad92) SHA1(1f9cb04b42b2d450be93400d9979a7910eaf05d1) )
3577   ROM_LOAD32_WORD_x4( "epr15621.40", 0x000002, 0x020000, CRC(d98b765a) SHA1(b58567e976228267a86af53de2135bc0b247a44a) )
3578   ROM_LOAD32_WORD( "mpr15538.bin",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3579   ROM_LOAD32_WORD( "mpr15539.bin",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
35803580
35813581   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
3582   ROM_LOAD( "epr15550.ic31", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
3582   ROM_LOAD( "epr15550.bin", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
35833583
35843584   ROM_REGION( 0x400000, "gfx1", 0 ) /* tiles */
3585   ROM_LOAD16_BYTE( "mpr15548.ic3", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3586   ROM_LOAD16_BYTE( "mpr15549.ic11", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
3585   ROM_LOAD16_BYTE( "mpr15548.bin", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3586   ROM_LOAD16_BYTE( "mpr15549.bin", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
35873587
35883588   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
3589   ROMX_LOAD( "mpr15540.ic14", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3590   ROMX_LOAD( "mpr15542.ic15", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3591   ROMX_LOAD( "mpr15544.ic10", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3592   ROMX_LOAD( "mpr15546.ic38", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3593   ROMX_LOAD( "mpr15541.ic22", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3594   ROMX_LOAD( "mpr15543.ic23", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3595   ROMX_LOAD( "mpr15545.ic18", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3596   ROMX_LOAD( "mpr15547.ic41", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
3589   ROMX_LOAD( "mpr15540.bin", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3590   ROMX_LOAD( "mpr15542.bin", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3591   ROMX_LOAD( "mpr15544.bin", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3592   ROMX_LOAD( "mpr15546.bin", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3593   ROMX_LOAD( "mpr15541.bin", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3594   ROMX_LOAD( "mpr15543.bin", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3595   ROMX_LOAD( "mpr15545.bin", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3596   ROMX_LOAD( "mpr15547.bin", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
35973597
35983598   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
3599   ROM_LOAD( "mpr15551.ic1", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3600   ROM_LOAD( "mpr15552.ic2", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
3599   ROM_LOAD( "mpr15551.bin", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3600   ROM_LOAD( "mpr15552.bin", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
36013601ROM_END
36023602
36033603/**************************************************************************************************************************
r243483r243484
36113611*/
36123612ROM_START( orunnersu )
36133613   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
3614   ROM_LOAD32_WORD_x4( "epr15618.ic37", 0x000000, 0x020000, CRC(25647f76) SHA1(9f882921ebb2f078350295c322b263f75812c053) )
3615   ROM_LOAD32_WORD_x4( "epr15619.ic40", 0x000002, 0x020000, CRC(2a558f95) SHA1(616ec0a7b251da61a49b933c58895b1a4d39417a) )
3616   ROM_LOAD32_WORD( "mpr15538.ic36",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3617   ROM_LOAD32_WORD( "mpr15539.ic39",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
3614   ROM_LOAD32_WORD_x4( "epr15618.37", 0x000000, 0x020000, CRC(25647f76) SHA1(9f882921ebb2f078350295c322b263f75812c053) )
3615   ROM_LOAD32_WORD_x4( "epr15619.40", 0x000002, 0x020000, CRC(2a558f95) SHA1(616ec0a7b251da61a49b933c58895b1a4d39417a) )
3616   ROM_LOAD32_WORD( "mpr15538.bin",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3617   ROM_LOAD32_WORD( "mpr15539.bin",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
36183618
36193619   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
3620   ROM_LOAD( "epr15550.ic31", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
3620   ROM_LOAD( "epr15550.bin", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
36213621
36223622   ROM_REGION( 0x400000, "gfx1", 0 ) /* tiles */
3623   ROM_LOAD16_BYTE( "mpr15548.ic3", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3624   ROM_LOAD16_BYTE( "mpr15549.ic11", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
3623   ROM_LOAD16_BYTE( "mpr15548.bin", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3624   ROM_LOAD16_BYTE( "mpr15549.bin", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
36253625
36263626   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
3627   ROMX_LOAD( "mpr15540.ic14", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3628   ROMX_LOAD( "mpr15542.ic15", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3629   ROMX_LOAD( "mpr15544.ic10", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3630   ROMX_LOAD( "mpr15546.ic38", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3631   ROMX_LOAD( "mpr15541.ic22", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3632   ROMX_LOAD( "mpr15543.ic23", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3633   ROMX_LOAD( "mpr15545.ic18", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3634   ROMX_LOAD( "mpr15547.ic41", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
3627   ROMX_LOAD( "mpr15540.bin", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3628   ROMX_LOAD( "mpr15542.bin", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3629   ROMX_LOAD( "mpr15544.bin", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3630   ROMX_LOAD( "mpr15546.bin", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3631   ROMX_LOAD( "mpr15541.bin", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3632   ROMX_LOAD( "mpr15543.bin", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3633   ROMX_LOAD( "mpr15545.bin", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3634   ROMX_LOAD( "mpr15547.bin", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
36353635
36363636   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
3637   ROM_LOAD( "mpr15551.ic1", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3638   ROM_LOAD( "mpr15552.ic2", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
3637   ROM_LOAD( "mpr15551.bin", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3638   ROM_LOAD( "mpr15552.bin", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
36393639ROM_END
36403640
36413641/**************************************************************************************************************************
r243483r243484
36493649*/
36503650ROM_START( orunnersj )
36513651   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
3652   ROM_LOAD32_WORD_x4( "epr15616.ic37", 0x000000, 0x020000, CRC(fb550545) SHA1(2f2c36843b115f5417e1f2ccd4a34ebf91265190) ) /* Need to verify the EPR numbers */
3653   ROM_LOAD32_WORD_x4( "epr15617.ic40", 0x000002, 0x020000, CRC(6bb741e0) SHA1(d92087a2c0b6de4287e569eecf9758615a85d1eb) ) /* Need to verify the EPR numbers */
3654   ROM_LOAD32_WORD( "mpr15538.ic36",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3655   ROM_LOAD32_WORD( "mpr15539.ic39",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
3652   ROM_LOAD32_WORD_x4( "epr15616.37", 0x000000, 0x020000, CRC(fb550545) SHA1(2f2c36843b115f5417e1f2ccd4a34ebf91265190) ) /* Need to verify the EPR numbers */
3653   ROM_LOAD32_WORD_x4( "epr15617.40", 0x000002, 0x020000, CRC(6bb741e0) SHA1(d92087a2c0b6de4287e569eecf9758615a85d1eb) ) /* Need to verify the EPR numbers */
3654   ROM_LOAD32_WORD( "mpr15538.bin",   0x100000, 0x080000, CRC(93958820) SHA1(e19b6f18a5707dbb64ae009d63c05eac5bac4a81) )
3655   ROM_LOAD32_WORD( "mpr15539.bin",   0x100002, 0x080000, CRC(219760fa) SHA1(bd62a83de9c9542f6da454a87dc4947492f65c52) )
36563656
36573657   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
3658   ROM_LOAD( "epr15550.ic31", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
3658   ROM_LOAD( "epr15550.bin", 0x100000, 0x80000, CRC(0205d2ed) SHA1(3475479e1a45fe96eefbe53842758898db7accbf) )
36593659
36603660   ROM_REGION( 0x400000, "gfx1", 0 ) /* tiles */
3661   ROM_LOAD16_BYTE( "mpr15548.ic3", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3662   ROM_LOAD16_BYTE( "mpr15549.ic11", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
3661   ROM_LOAD16_BYTE( "mpr15548.bin", 0x000000, 0x200000, CRC(b6470a66) SHA1(e1544590c02d41f62f82a4d771b893fb0f2734c7) )
3662   ROM_LOAD16_BYTE( "mpr15549.bin", 0x000001, 0x200000, CRC(81d12520) SHA1(1555893941e832f00ad3d0b3ad0c34a0d3a1c58a) )
36633663
36643664   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
3665   ROMX_LOAD( "mpr15540.ic14", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3666   ROMX_LOAD( "mpr15542.ic15", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3667   ROMX_LOAD( "mpr15544.ic10", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3668   ROMX_LOAD( "mpr15546.ic38", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3669   ROMX_LOAD( "mpr15541.ic22", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3670   ROMX_LOAD( "mpr15543.ic23", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3671   ROMX_LOAD( "mpr15545.ic18", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3672   ROMX_LOAD( "mpr15547.ic41", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
3665   ROMX_LOAD( "mpr15540.bin", 0x000000, 0x200000, CRC(a10d72b4) SHA1(6d9d5e20be6721b53ce49df4d5a1bbd91f5b3aed) , ROM_SKIP(6)|ROM_GROUPWORD )
3666   ROMX_LOAD( "mpr15542.bin", 0x000002, 0x200000, CRC(40952374) SHA1(c669ef52508bc2f49cf812dc86ac98fb535471fa) , ROM_SKIP(6)|ROM_GROUPWORD )
3667   ROMX_LOAD( "mpr15544.bin", 0x000004, 0x200000, CRC(39e3df45) SHA1(38a7b21617b45613b05509dda388f8f7770b186c) , ROM_SKIP(6)|ROM_GROUPWORD )
3668   ROMX_LOAD( "mpr15546.bin", 0x000006, 0x200000, CRC(e3fcc12c) SHA1(1cf7e05c7873f68789a27a91cddf471df40d7907) , ROM_SKIP(6)|ROM_GROUPWORD )
3669   ROMX_LOAD( "mpr15541.bin", 0x800000, 0x200000, CRC(a2003c2d) SHA1(200a2c7d78d3f5f28909267fdcdbddd58c5f5fa2) , ROM_SKIP(6)|ROM_GROUPWORD )
3670   ROMX_LOAD( "mpr15543.bin", 0x800002, 0x200000, CRC(933e8e7b) SHA1(0d53286f524f47851a483569dc37e9f6d34cc5f4) , ROM_SKIP(6)|ROM_GROUPWORD )
3671   ROMX_LOAD( "mpr15545.bin", 0x800004, 0x200000, CRC(53dd0235) SHA1(4aee5ae1820ff933b6bd8a54bdbf989c0bc95c1a) , ROM_SKIP(6)|ROM_GROUPWORD )
3672   ROMX_LOAD( "mpr15547.bin", 0x800006, 0x200000, CRC(edcb2a43) SHA1(f0bcfcc749ca0267f85bf9838164869912944d00) , ROM_SKIP(6)|ROM_GROUPWORD )
36733673
36743674   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
3675   ROM_LOAD( "mpr15551.ic1", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3676   ROM_LOAD( "mpr15552.ic2", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
3675   ROM_LOAD( "mpr15551.bin", 0x000000, 0x200000, CRC(4894bc73) SHA1(351f5c03fb430fd87df915dfe3a377b5ada622c4) )
3676   ROM_LOAD( "mpr15552.bin", 0x200000, 0x200000, CRC(1c4b5e73) SHA1(50a8e9a200575a3522a51bf094aa0e87b90bb0a3) )
36773677ROM_END
36783678
36793679
r243483r243484
41864186*/
41874187ROM_START( scross )
41884188   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
4189   ROM_LOAD32_WORD_x2( "epr-15093.ic37", 0x000000, 0x040000, CRC(2adc7a4b) SHA1(dca71f00d94898c0758394704d819e13482bf120) )
4190   ROM_LOAD32_WORD_x2( "epr-15094.ic40", 0x000002, 0x040000, CRC(bbb0ae73) SHA1(0d8837706405f301adf8fa85c8d4813d7600af98) )
4191   ROM_LOAD32_WORD( "epr-15018.ic36",    0x100000, 0x080000, CRC(3a98385e) SHA1(8088d337655030c28e290da4bbf44cb647dab66c) )
4192   ROM_LOAD32_WORD( "epr-15019.ic39",    0x100002, 0x080000, CRC(8bf4ac83) SHA1(e594d9d9b42d0765ed8a20a40b7dd92b75124d34) )
4189   ROM_LOAD32_WORD_x2( "epr-15093.bin", 0x000000, 0x040000, CRC(2adc7a4b) SHA1(dca71f00d94898c0758394704d819e13482bf120) )
4190   ROM_LOAD32_WORD_x2( "epr-15094.bin", 0x000002, 0x040000, CRC(bbb0ae73) SHA1(0d8837706405f301adf8fa85c8d4813d7600af98) )
4191   ROM_LOAD32_WORD( "epr-15018.bin",    0x100000, 0x080000, CRC(3a98385e) SHA1(8088d337655030c28e290da4bbf44cb647dab66c) )
4192   ROM_LOAD32_WORD( "epr-15019.bin",    0x100002, 0x080000, CRC(8bf4ac83) SHA1(e594d9d9b42d0765ed8a20a40b7dd92b75124d34) )
41934193
41944194   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
4195   ROM_LOAD_x4( "epr-15192.ic31", 0x100000, 0x20000, CRC(7524290b) SHA1(ee58be2c0c4293ee19622b96ca493f4ce4da0038) )
4195   ROM_LOAD_x4( "epr-15192.bin", 0x100000, 0x20000, CRC(7524290b) SHA1(ee58be2c0c4293ee19622b96ca493f4ce4da0038) )
41964196
41974197   ROM_REGION( 0x400000, "gfx1", 0 ) /* tiles */
41984198   /* 1ST AND 2ND HALF IDENTICAL (all roms) */
4199   ROM_LOAD16_BYTE( "epr-15020.ic3", 0x000000, 0x200000, CRC(65afea2f) SHA1(ad573727398bfac8e94f321be84b60e5690bfba6) )
4200   ROM_LOAD16_BYTE( "epr-15021.ic11", 0x000001, 0x200000, CRC(27bc6969) SHA1(d6bb446becb2d36b73bca5055357a43b837afc0a) )
4199   ROM_LOAD16_BYTE( "epr-15020.bin", 0x000000, 0x200000, CRC(65afea2f) SHA1(ad573727398bfac8e94f321be84b60e5690bfba6) )
4200   ROM_LOAD16_BYTE( "epr-15021.bin", 0x000001, 0x200000, CRC(27bc6969) SHA1(d6bb446becb2d36b73bca5055357a43b837afc0a) )
42014201
42024202   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
42034203   /* 1ST AND 2ND HALF IDENTICAL (all roms) */
4204   ROMX_LOAD( "epr-15022.ic14", 0x000000, 0x200000, CRC(09ca9608) SHA1(cbd0138c1c7811d42b051fed6a7e3526cc4e457f) , ROM_SKIP(6)|ROM_GROUPWORD )
4205   ROMX_LOAD( "epr-15024.ic15", 0x000002, 0x200000, CRC(0dc920eb) SHA1(d24d637aa0dcd3bae779ef7e12663df81667dbf7) , ROM_SKIP(6)|ROM_GROUPWORD )
4206   ROMX_LOAD( "epr-15026.ic10", 0x000004, 0x200000, CRC(67637c37) SHA1(7c250e7e9dd5c07da4fa35bacdfcecd5e8fa4ec7) , ROM_SKIP(6)|ROM_GROUPWORD )
4207   ROMX_LOAD( "epr-15028.ic38", 0x000006, 0x200000, CRC(9929abdc) SHA1(34b6624ddd3a0aedec0a2b433643a37f745ec66d) , ROM_SKIP(6)|ROM_GROUPWORD )
4208   ROMX_LOAD( "epr-15023.ic22", 0x800000, 0x200000, CRC(0e42a2bb) SHA1(503214caf5fa9a2324b61e04f378fd1a790322df) , ROM_SKIP(6)|ROM_GROUPWORD )
4209   ROMX_LOAD( "epr-15025.ic23", 0x800002, 0x200000, CRC(0c677fc6) SHA1(fc2207008417072e7ee91f722797d827e150ce2d) , ROM_SKIP(6)|ROM_GROUPWORD )
4210   ROMX_LOAD( "epr-15027.ic18", 0x800004, 0x200000, CRC(d6d077f9) SHA1(928cefae9ae58239fbffb1dcee282c6ac1e661fe) , ROM_SKIP(6)|ROM_GROUPWORD )
4211   ROMX_LOAD( "epr-15029.ic41", 0x800006, 0x200000, CRC(707af749) SHA1(fae5325c983df3cf198878220ad88d47339ac512) , ROM_SKIP(6)|ROM_GROUPWORD )
4204   ROMX_LOAD( "epr-15022.bin", 0x000000, 0x200000, CRC(09ca9608) SHA1(cbd0138c1c7811d42b051fed6a7e3526cc4e457f) , ROM_SKIP(6)|ROM_GROUPWORD )
4205   ROMX_LOAD( "epr-15024.bin", 0x000002, 0x200000, CRC(0dc920eb) SHA1(d24d637aa0dcd3bae779ef7e12663df81667dbf7) , ROM_SKIP(6)|ROM_GROUPWORD )
4206   ROMX_LOAD( "epr-15026.bin", 0x000004, 0x200000, CRC(67637c37) SHA1(7c250e7e9dd5c07da4fa35bacdfcecd5e8fa4ec7) , ROM_SKIP(6)|ROM_GROUPWORD )
4207   ROMX_LOAD( "epr-15028.bin", 0x000006, 0x200000, CRC(9929abdc) SHA1(34b6624ddd3a0aedec0a2b433643a37f745ec66d) , ROM_SKIP(6)|ROM_GROUPWORD )
4208   ROMX_LOAD( "epr-15023.bin", 0x800000, 0x200000, CRC(0e42a2bb) SHA1(503214caf5fa9a2324b61e04f378fd1a790322df) , ROM_SKIP(6)|ROM_GROUPWORD )
4209   ROMX_LOAD( "epr-15025.bin", 0x800002, 0x200000, CRC(0c677fc6) SHA1(fc2207008417072e7ee91f722797d827e150ce2d) , ROM_SKIP(6)|ROM_GROUPWORD )
4210   ROMX_LOAD( "epr-15027.bin", 0x800004, 0x200000, CRC(d6d077f9) SHA1(928cefae9ae58239fbffb1dcee282c6ac1e661fe) , ROM_SKIP(6)|ROM_GROUPWORD )
4211   ROMX_LOAD( "epr-15029.bin", 0x800006, 0x200000, CRC(707af749) SHA1(fae5325c983df3cf198878220ad88d47339ac512) , ROM_SKIP(6)|ROM_GROUPWORD )
42124212
42134213   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
42144214   /* 1ST AND 2ND HALF IDENTICAL (all roms, are these OK?) */
4215   ROM_LOAD("epr-15031.ic1", 0x000000, 0x200000, CRC(663a7fd2) SHA1(b4393a687225b075db21960d19a6ddd7a9d7d086) )
4216   ROM_LOAD("epr-15032.ic2", 0x200000, 0x200000, CRC(cb709f3d) SHA1(3962c8b5907d1f8f611f58ddac693cc47364a79c) )
4215   ROM_LOAD("epr-15031.bin", 0x000000, 0x200000, CRC(663a7fd2) SHA1(b4393a687225b075db21960d19a6ddd7a9d7d086) )
4216   ROM_LOAD("epr-15032.bin", 0x200000, 0x200000, CRC(cb709f3d) SHA1(3962c8b5907d1f8f611f58ddac693cc47364a79c) )
42174217
42184218   ROM_REGION( 0x20000, "user2", 0 ) /*  comms board? - might not belong to this game, just going based on epr number  */
42194219   ROM_LOAD( "epr-15033.ic17", 0x00000, 0x20000, CRC(dc19ac00) SHA1(16bbb5af034e5419673e637be30283b73ab7b290) )
r243483r243484
42264226
42274227ROM_START( scrossu )
42284228   ROM_REGION( 0x200000, "maincpu", 0 ) /* v60 code */
4229   ROM_LOAD32_WORD_x2( "epr-15091.ic37", 0x000000, 0x040000, CRC(2c572293) SHA1(6377a6eb6084f7332ce6eeaaf0c37200da792d0c) )
4230   ROM_LOAD32_WORD_x2( "epr-15092.ic40", 0x000002, 0x040000, CRC(6e3e175a) SHA1(feaca0720646e2a4b78b376e99dc86788adb98e7) )
4231   ROM_LOAD32_WORD( "epr-15018.ic36",    0x100000, 0x080000, CRC(3a98385e) SHA1(8088d337655030c28e290da4bbf44cb647dab66c) )
4232   ROM_LOAD32_WORD( "epr-15019.ic39",    0x100002, 0x080000, CRC(8bf4ac83) SHA1(e594d9d9b42d0765ed8a20a40b7dd92b75124d34) )
4229   ROM_LOAD32_WORD_x2( "epr-15091.bin", 0x000000, 0x040000, CRC(2c572293) SHA1(6377a6eb6084f7332ce6eeaaf0c37200da792d0c) )
4230   ROM_LOAD32_WORD_x2( "epr-15092.bin", 0x000002, 0x040000, CRC(6e3e175a) SHA1(feaca0720646e2a4b78b376e99dc86788adb98e7) )
4231   ROM_LOAD32_WORD( "epr-15018.bin",    0x100000, 0x080000, CRC(3a98385e) SHA1(8088d337655030c28e290da4bbf44cb647dab66c) )
4232   ROM_LOAD32_WORD( "epr-15019.bin",    0x100002, 0x080000, CRC(8bf4ac83) SHA1(e594d9d9b42d0765ed8a20a40b7dd92b75124d34) )
42334233
42344234   ROM_REGION( 0x180000, "soundcpu", 0 ) /* sound CPU */
4235   ROM_LOAD_x4( "epr-15192.ic31", 0x100000, 0x20000, CRC(7524290b) SHA1(ee58be2c0c4293ee19622b96ca493f4ce4da0038) )
4235   ROM_LOAD_x4( "epr-15192.bin", 0x100000, 0x20000, CRC(7524290b) SHA1(ee58be2c0c4293ee19622b96ca493f4ce4da0038) )
42364236
42374237   ROM_REGION( 0x400000, "gfx1", 0 ) /* tiles */
42384238   /* 1ST AND 2ND HALF IDENTICAL (all roms) */
4239   ROM_LOAD16_BYTE( "epr-15020.ic3", 0x000000, 0x200000, CRC(65afea2f) SHA1(ad573727398bfac8e94f321be84b60e5690bfba6) )
4240   ROM_LOAD16_BYTE( "epr-15021.ic11", 0x000001, 0x200000, CRC(27bc6969) SHA1(d6bb446becb2d36b73bca5055357a43b837afc0a) )
4239   ROM_LOAD16_BYTE( "epr-15020.bin", 0x000000, 0x200000, CRC(65afea2f) SHA1(ad573727398bfac8e94f321be84b60e5690bfba6) )
4240   ROM_LOAD16_BYTE( "epr-15021.bin", 0x000001, 0x200000, CRC(27bc6969) SHA1(d6bb446becb2d36b73bca5055357a43b837afc0a) )
42414241
42424242   ROM_REGION32_BE( 0x1000000, "gfx2", 0 ) /* sprites */
42434243   /* 1ST AND 2ND HALF IDENTICAL (all roms) */
4244   ROMX_LOAD( "epr-15022.ic14", 0x000000, 0x200000, CRC(09ca9608) SHA1(cbd0138c1c7811d42b051fed6a7e3526cc4e457f) , ROM_SKIP(6)|ROM_GROUPWORD )
4245   ROMX_LOAD( "epr-15024.ic15", 0x000002, 0x200000, CRC(0dc920eb) SHA1(d24d637aa0dcd3bae779ef7e12663df81667dbf7) , ROM_SKIP(6)|ROM_GROUPWORD )
4246   ROMX_LOAD( "epr-15026.ic10", 0x000004, 0x200000, CRC(67637c37) SHA1(7c250e7e9dd5c07da4fa35bacdfcecd5e8fa4ec7) , ROM_SKIP(6)|ROM_GROUPWORD )
4247   ROMX_LOAD( "epr-15028.ic38", 0x000006, 0x200000, CRC(9929abdc) SHA1(34b6624ddd3a0aedec0a2b433643a37f745ec66d) , ROM_SKIP(6)|ROM_GROUPWORD )
4248   ROMX_LOAD( "epr-15023.ic22", 0x800000, 0x200000, CRC(0e42a2bb) SHA1(503214caf5fa9a2324b61e04f378fd1a790322df) , ROM_SKIP(6)|ROM_GROUPWORD )
4249   ROMX_LOAD( "epr-15025.ic23", 0x800002, 0x200000, CRC(0c677fc6) SHA1(fc2207008417072e7ee91f722797d827e150ce2d) , ROM_SKIP(6)|ROM_GROUPWORD )
4250   ROMX_LOAD( "epr-15027.ic18", 0x800004, 0x200000, CRC(d6d077f9) SHA1(928cefae9ae58239fbffb1dcee282c6ac1e661fe) , ROM_SKIP(6)|ROM_GROUPWORD )
4251   ROMX_LOAD( "epr-15029.ic41", 0x800006, 0x200000, CRC(707af749) SHA1(fae5325c983df3cf198878220ad88d47339ac512) , ROM_SKIP(6)|ROM_GROUPWORD )
4244   ROMX_LOAD( "epr-15022.bin", 0x000000, 0x200000, CRC(09ca9608) SHA1(cbd0138c1c7811d42b051fed6a7e3526cc4e457f) , ROM_SKIP(6)|ROM_GROUPWORD )
4245   ROMX_LOAD( "epr-15024.bin", 0x000002, 0x200000, CRC(0dc920eb) SHA1(d24d637aa0dcd3bae779ef7e12663df81667dbf7) , ROM_SKIP(6)|ROM_GROUPWORD )
4246   ROMX_LOAD( "epr-15026.bin", 0x000004, 0x200000, CRC(67637c37) SHA1(7c250e7e9dd5c07da4fa35bacdfcecd5e8fa4ec7) , ROM_SKIP(6)|ROM_GROUPWORD )
4247   ROMX_LOAD( "epr-15028.bin", 0x000006, 0x200000, CRC(9929abdc) SHA1(34b6624ddd3a0aedec0a2b433643a37f745ec66d) , ROM_SKIP(6)|ROM_GROUPWORD )
4248   ROMX_LOAD( "epr-15023.bin", 0x800000, 0x200000, CRC(0e42a2bb) SHA1(503214caf5fa9a2324b61e04f378fd1a790322df) , ROM_SKIP(6)|ROM_GROUPWORD )
4249   ROMX_LOAD( "epr-15025.bin", 0x800002, 0x200000, CRC(0c677fc6) SHA1(fc2207008417072e7ee91f722797d827e150ce2d) , ROM_SKIP(6)|ROM_GROUPWORD )
4250   ROMX_LOAD( "epr-15027.bin", 0x800004, 0x200000, CRC(d6d077f9) SHA1(928cefae9ae58239fbffb1dcee282c6ac1e661fe) , ROM_SKIP(6)|ROM_GROUPWORD )
4251   ROMX_LOAD( "epr-15029.bin", 0x800006, 0x200000, CRC(707af749) SHA1(fae5325c983df3cf198878220ad88d47339ac512) , ROM_SKIP(6)|ROM_GROUPWORD )
42524252
42534253   ROM_REGION( 0x400000, "sega", 0 ) /* Sega PCM sound data */
42544254   /* 1ST AND 2ND HALF IDENTICAL (all roms, are these OK?) */
4255   ROM_LOAD("epr-15031.ic1", 0x000000, 0x200000, CRC(663a7fd2) SHA1(b4393a687225b075db21960d19a6ddd7a9d7d086) )
4256   ROM_LOAD("epr-15032.ic2", 0x200000, 0x200000, CRC(cb709f3d) SHA1(3962c8b5907d1f8f611f58ddac693cc47364a79c) )
4255   ROM_LOAD("epr-15031.bin", 0x000000, 0x200000, CRC(663a7fd2) SHA1(b4393a687225b075db21960d19a6ddd7a9d7d086) )
4256   ROM_LOAD("epr-15032.bin", 0x200000, 0x200000, CRC(cb709f3d) SHA1(3962c8b5907d1f8f611f58ddac693cc47364a79c) )
42574257ROM_END
42584258
42594259
trunk/src/mame/drivers/statriv2.c
r243483r243484
977977   ROM_LOAD( "prom.u17", 0x0000, 0x0020, NO_DUMP ) /* Socketted */
978978   ROM_LOAD( "prom.u21", 0x0020, 0x0020, NO_DUMP ) /* Soldered in (Color?) */
979979   ROM_LOAD( "prom.u22", 0x0040, 0x0100, NO_DUMP ) /* Soldered in */
980   
981   DISK_REGION( "laserdisc")
982   DISK_IMAGE_READONLY("cstripxi", 0, NO_DUMP )
983980ROM_END
984981
985982
trunk/src/mame/drivers/taxidriv.c
r243483r243484
1616#include "sound/ay8910.h"
1717
1818
19void taxidriv_state::machine_start()
20{
21   save_item(NAME(m_s1));
22   save_item(NAME(m_s2));
23   save_item(NAME(m_s3));
24   save_item(NAME(m_s4));
25   save_item(NAME(m_latchA));
26   save_item(NAME(m_latchB));
27   save_item(NAME(m_bghide));
28   save_item(NAME(m_spritectrl));
29}
3019
31WRITE8_MEMBER(taxidriv_state::p2a_w){ spritectrl_w(space,0,data); }
32WRITE8_MEMBER(taxidriv_state::p2b_w){ spritectrl_w(space,1,data); }
33WRITE8_MEMBER(taxidriv_state::p2c_w){ spritectrl_w(space,2,data); }
34WRITE8_MEMBER(taxidriv_state::p3a_w){ spritectrl_w(space,3,data); }
35WRITE8_MEMBER(taxidriv_state::p3b_w){ spritectrl_w(space,4,data); }
36WRITE8_MEMBER(taxidriv_state::p3c_w){ spritectrl_w(space,5,data); }
37WRITE8_MEMBER(taxidriv_state::p4a_w){ spritectrl_w(space,6,data); }
38WRITE8_MEMBER(taxidriv_state::p4b_w){ spritectrl_w(space,7,data); }
39WRITE8_MEMBER(taxidriv_state::p4c_w){ spritectrl_w(space,8,data); }
20WRITE8_MEMBER(taxidriv_state::p2a_w){ taxidriv_spritectrl_w(space,0,data); }
21WRITE8_MEMBER(taxidriv_state::p2b_w){ taxidriv_spritectrl_w(space,1,data); }
22WRITE8_MEMBER(taxidriv_state::p2c_w){ taxidriv_spritectrl_w(space,2,data); }
23WRITE8_MEMBER(taxidriv_state::p3a_w){ taxidriv_spritectrl_w(space,3,data); }
24WRITE8_MEMBER(taxidriv_state::p3b_w){ taxidriv_spritectrl_w(space,4,data); }
25WRITE8_MEMBER(taxidriv_state::p3c_w){ taxidriv_spritectrl_w(space,5,data); }
26WRITE8_MEMBER(taxidriv_state::p4a_w){ taxidriv_spritectrl_w(space,6,data); }
27WRITE8_MEMBER(taxidriv_state::p4b_w){ taxidriv_spritectrl_w(space,7,data); }
28WRITE8_MEMBER(taxidriv_state::p4c_w){ taxidriv_spritectrl_w(space,8,data); }
4029
4130
4231READ8_MEMBER(taxidriv_state::p0a_r)
r243483r243484
377366   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
378367   MCFG_SCREEN_SIZE(32*8, 32*8)
379368   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 27*8-1)
380   MCFG_SCREEN_UPDATE_DRIVER(taxidriv_state, screen_update)
369   MCFG_SCREEN_UPDATE_DRIVER(taxidriv_state, screen_update_taxidriv)
381370   MCFG_SCREEN_PALETTE("palette")
382371
383372   MCFG_GFXDECODE_ADD("gfxdecode", "palette", taxidriv)
r243483r243484
443432ROM_END
444433
445434
446GAME( 1984, taxidriv,  0,        taxidriv, taxidriv, driver_device, 0, ROT90, "Graphic Techno", "Taxi Driver", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
435GAME( 1984, taxidriv,  0,        taxidriv, taxidriv, driver_device, 0, ROT90, "Graphic Techno", "Taxi Driver", GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL )
trunk/src/mame/drivers/tmmjprd.c
r243483r243484
3939public:
4040   tmmjprd_state(const machine_config &mconfig, device_type type, const char *tag)
4141      : driver_device(mconfig, type, tag),
42         m_tilemap_regs(*this, "tilemap_regs"),
43         m_spriteregs(*this, "spriteregs"),
44         m_spriteram(*this, "spriteram") ,
4245      m_maincpu(*this, "maincpu"),
4346      m_eeprom(*this, "eeprom"),
4447      m_gfxdecode(*this, "gfxdecode"),
45      m_palette(*this, "palette"),
46      m_tilemap_regs(*this, "tilemap_regs"),
47      m_spriteregs(*this, "spriteregs"),
48      m_spriteram(*this, "spriteram") { }
48      m_palette(*this, "palette") { }
4949
50   required_device<cpu_device> m_maincpu;
51   required_device<eeprom_serial_93cxx_device> m_eeprom;
52   required_device<gfxdecode_device> m_gfxdecode;
53   required_device<palette_device> m_palette;
54
5550   required_shared_ptr_array<UINT32, 4> m_tilemap_regs;
5651   required_shared_ptr<UINT32> m_spriteregs;
57   required_shared_ptr<UINT32> m_spriteram;
58
5952   UINT32 *m_tilemap_ram[4];
53   required_shared_ptr<UINT32> m_spriteram;
6054   UINT8 m_mux_data;
6155   UINT8 m_system_in;
6256   double m_old_brt1;
6357   double m_old_brt2;
64
65   DECLARE_WRITE32_MEMBER(tilemap0_w);
66   DECLARE_WRITE32_MEMBER(tilemap1_w);
67   DECLARE_WRITE32_MEMBER(tilemap2_w);
68   DECLARE_WRITE32_MEMBER(tilemap3_w);
69   DECLARE_READ32_MEMBER(tilemap0_r);
70   DECLARE_READ32_MEMBER(tilemap1_r);
71   DECLARE_READ32_MEMBER(tilemap2_r);
72   DECLARE_READ32_MEMBER(tilemap3_r);
58   DECLARE_WRITE32_MEMBER(tmmjprd_tilemap0_w);
59   DECLARE_WRITE32_MEMBER(tmmjprd_tilemap1_w);
60   DECLARE_WRITE32_MEMBER(tmmjprd_tilemap2_w);
61   DECLARE_WRITE32_MEMBER(tmmjprd_tilemap3_w);
62   DECLARE_READ32_MEMBER(tmmjprd_tilemap0_r);
63   DECLARE_READ32_MEMBER(tmmjprd_tilemap1_r);
64   DECLARE_READ32_MEMBER(tmmjprd_tilemap2_r);
65   DECLARE_READ32_MEMBER(tmmjprd_tilemap3_r);
7366   DECLARE_READ32_MEMBER(randomtmmjprds);
74   DECLARE_WRITE32_MEMBER(blitter_w);
75   DECLARE_READ32_MEMBER(mux_r);
76   DECLARE_WRITE32_MEMBER(brt_1_w);
77   DECLARE_WRITE32_MEMBER(brt_2_w);
78   DECLARE_WRITE32_MEMBER(eeprom_write);
79
80   virtual void machine_start();
67   DECLARE_WRITE32_MEMBER(tmmjprd_blitter_w);
68   DECLARE_READ32_MEMBER(tmmjprd_mux_r);
69   DECLARE_WRITE32_MEMBER(tmmjprd_brt_1_w);
70   DECLARE_WRITE32_MEMBER(tmmjprd_brt_2_w);
71   DECLARE_WRITE32_MEMBER(tmmjprd_eeprom_write);
8172   virtual void video_start();
82
83   UINT32 screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
84   UINT32 screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
85
86   TIMER_CALLBACK_MEMBER(blit_done);
87   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
88
73   UINT32 screen_update_tmmjprd_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
74   UINT32 screen_update_tmmjprd_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
75   TIMER_CALLBACK_MEMBER(tmmjprd_blit_done);
76   TIMER_DEVICE_CALLBACK_MEMBER(tmmjprd_scanline);
8977   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int screen);
90   void draw_tile(bitmap_ind16 &bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom);
91   void draw_tilemap(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom );
92   void do_blit();
78   void ttmjprd_draw_tile(bitmap_ind16 &bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom);
79   void ttmjprd_draw_tilemap(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom );
80   void tmmjprd_do_blit();
81   required_device<cpu_device> m_maincpu;
82   required_device<eeprom_serial_93cxx_device> m_eeprom;
83   required_device<gfxdecode_device> m_gfxdecode;
84   required_device<palette_device> m_palette;
9385};
9486
9587
96WRITE32_MEMBER(tmmjprd_state::tilemap0_w)
88WRITE32_MEMBER(tmmjprd_state::tmmjprd_tilemap0_w)
9789{
9890   COMBINE_DATA(&m_tilemap_ram[0][offset]);
9991}
10092
10193
10294
103WRITE32_MEMBER(tmmjprd_state::tilemap1_w)
95WRITE32_MEMBER(tmmjprd_state::tmmjprd_tilemap1_w)
10496{
10597   COMBINE_DATA(&m_tilemap_ram[1][offset]);
10698}
10799
108WRITE32_MEMBER(tmmjprd_state::tilemap2_w)
100WRITE32_MEMBER(tmmjprd_state::tmmjprd_tilemap2_w)
109101{
110102   COMBINE_DATA(&m_tilemap_ram[2][offset]);
111103}
112104
113WRITE32_MEMBER(tmmjprd_state::tilemap3_w)
105WRITE32_MEMBER(tmmjprd_state::tmmjprd_tilemap3_w)
114106{
115107   COMBINE_DATA(&m_tilemap_ram[3][offset]);
116108}
r243483r243484
191183   }
192184}
193185
194void tmmjprd_state::draw_tile(bitmap_ind16 &bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom)
186void tmmjprd_state::ttmjprd_draw_tile(bitmap_ind16 &bitmap, const rectangle &cliprect, int x,int y,int sizex,int sizey, UINT32 tiledata, UINT8* rom)
195187{
196188   /* note, it's tile address _NOT_ tile number, 'sub-tile' access is possible, hence using the custom rendering */
197189   int tileaddr = (tiledata&0x000fffff)>>0;
r243483r243484
270262   }
271263}
272264
273void tmmjprd_state::draw_tilemap(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom )
265void tmmjprd_state::ttmjprd_draw_tilemap(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32*tileram, UINT32*tileregs, UINT8*rom )
274266{
275267   int y,x;
276268   int count;
r243483r243484
304296      {
305297         UINT32 tiledata = tileram[count];
306298         // todo: handle wraparound
307         draw_tile(bitmap,cliprect,(x*tile_sizex)-scrollx,(y*tile_sizey)-scrolly,tile_sizex,tile_sizey, tiledata, rom);
299         ttmjprd_draw_tile(bitmap,cliprect,(x*tile_sizex)-scrollx,(y*tile_sizey)-scrolly,tile_sizex,tile_sizey, tiledata, rom);
308300         count++;
309301      }
310302   }
311303
312304}
313305
314UINT32 tmmjprd_state::screen_update_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
306UINT32 tmmjprd_state::screen_update_tmmjprd_left(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
315307{
316308   UINT8* gfxroms = memregion("gfx2")->base();
317309
318310   bitmap.fill(m_palette->black_pen(), cliprect);
319311
320   draw_tilemap(bitmap, cliprect, m_tilemap_ram[3], m_tilemap_regs[3], gfxroms );
312   ttmjprd_draw_tilemap(bitmap, cliprect, m_tilemap_ram[3], m_tilemap_regs[3], gfxroms );
321313   draw_sprites(bitmap,cliprect, 1);
322   draw_tilemap(bitmap, cliprect, m_tilemap_ram[2], m_tilemap_regs[2], gfxroms );
314   ttmjprd_draw_tilemap(bitmap, cliprect, m_tilemap_ram[2], m_tilemap_regs[2], gfxroms );
323315
324316   /*
325317   popmessage("%08x %08x %08x %08x %08x %08x",
r243483r243484
345337   return 0;
346338}
347339
348UINT32 tmmjprd_state::screen_update_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
340UINT32 tmmjprd_state::screen_update_tmmjprd_right(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
349341{
350342   UINT8* gfxroms = memregion("gfx2")->base();
351343
352344   bitmap.fill(m_palette->black_pen(), cliprect);
353345
354   draw_tilemap(bitmap, cliprect, m_tilemap_ram[1], m_tilemap_regs[1], gfxroms );
346   ttmjprd_draw_tilemap(bitmap, cliprect, m_tilemap_ram[1], m_tilemap_regs[1], gfxroms );
355347   draw_sprites(bitmap,cliprect, 0);
356   draw_tilemap(bitmap, cliprect, m_tilemap_ram[0], m_tilemap_regs[0], gfxroms );
348   ttmjprd_draw_tilemap(bitmap, cliprect, m_tilemap_ram[0], m_tilemap_regs[0], gfxroms );
357349
358350   return 0;
359351}
r243483r243484
366358   m_tilemap_ram[1] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
367359   m_tilemap_ram[2] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
368360   m_tilemap_ram[3] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
369   
370   
371   save_pointer(NAME(m_tilemap_ram[0]), 0x8000);
372   save_pointer(NAME(m_tilemap_ram[1]), 0x8000);
373   save_pointer(NAME(m_tilemap_ram[2]), 0x8000);
374   save_pointer(NAME(m_tilemap_ram[3]), 0x8000);
375   
376   save_item(NAME(m_old_brt1));
377   save_item(NAME(m_old_brt2));
378361}
379362
380READ32_MEMBER(tmmjprd_state::tilemap0_r)
363READ32_MEMBER(tmmjprd_state::tmmjprd_tilemap0_r)
381364{
382365   return m_tilemap_ram[0][offset];
383366}
384367
385READ32_MEMBER(tmmjprd_state::tilemap1_r)
368READ32_MEMBER(tmmjprd_state::tmmjprd_tilemap1_r)
386369{
387370   return m_tilemap_ram[1][offset];
388371}
389372
390READ32_MEMBER(tmmjprd_state::tilemap2_r)
373READ32_MEMBER(tmmjprd_state::tmmjprd_tilemap2_r)
391374{
392375   return m_tilemap_ram[2][offset];
393376}
394377
395READ32_MEMBER(tmmjprd_state::tilemap3_r)
378READ32_MEMBER(tmmjprd_state::tmmjprd_tilemap3_r)
396379{
397380   return m_tilemap_ram[3][offset];
398381}
r243483r243484
407390#define BLITLOG 0
408391
409392#if 0
410TIMER_CALLBACK_MEMBER(tmmjprd_state::blit_done)
393TIMER_CALLBACK_MEMBER(tmmjprd_state::tmmjprd_blit_done)
411394{
412395   m_maincpu->set_input_line(3, HOLD_LINE);
413396}
414397
415void tmmjprd_state::do_blit()
398void tmmjprd_state::tmmjprd_do_blit()
416399{
417400   UINT8 *blt_data = memregion("gfx1")->base();
418   int blt_source = (m_blitterregs[0]&0x000fffff)>>0;
419   int blt_column = (m_blitterregs[1]&0x00ff0000)>>16;
420   int blt_line   = (m_blitterregs[1]&0x000000ff);
421   int blt_tilemp = (m_blitterregs[2]&0x0000e000)>>13;
422   int blt_oddflg = (m_blitterregs[2]&0x00000001)>>0;
401   int blt_source = (tmmjprd_blitterregs[0]&0x000fffff)>>0;
402   int blt_column = (tmmjprd_blitterregs[1]&0x00ff0000)>>16;
403   int blt_line   = (tmmjprd_blitterregs[1]&0x000000ff);
404   int blt_tilemp = (tmmjprd_blitterregs[2]&0x0000e000)>>13;
405   int blt_oddflg = (tmmjprd_blitterregs[2]&0x00000001)>>0;
423406   int mask,shift;
424407
425408
426   if(BLITCMDLOG) osd_printf_debug("BLIT command %08x %08x %08x\n", m_blitterregs[0], m_blitterregs[1], m_blitterregs[2]);
409   if(BLITCMDLOG) osd_printf_debug("BLIT command %08x %08x %08x\n", tmmjprd_blitterregs[0], tmmjprd_blitterregs[1], tmmjprd_blitterregs[2]);
427410
428411   if (blt_oddflg&1)
429412   {
r243483r243484
456439            if (!blt_amount)
457440            {
458441               if(BLITLOG) osd_printf_debug("end of blit list\n");
459               machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(tmmjprd_state::blit_done),this));
442               machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(tmmjprd_state::tmmjprd_blit_done),this));
460443               return;
461444            }
462445
r243483r243484
467450               blt_source+=2;
468451               writeoffs=blt_oddflg+blt_column;
469452               m_tilemap_ram[blt_tilemp][writeoffs]=(m_tilemap_ram[blt_tilemp][writeoffs]&mask)|(blt_value<<shift);
470               m_tilemap[blt_tilemp]->mark_tile_dirty(writeoffs);
453               tmmjprd_tilemap[blt_tilemp]->mark_tile_dirty(writeoffs);
471454
472455               blt_column++;
473456               blt_column&=0x7f;
r243483r243484
484467            {
485468               writeoffs=blt_oddflg+blt_column;
486469               m_tilemap_ram[blt_tilemp][writeoffs]=(m_tilemap_ram[blt_tilemp][writeoffs]&mask)|(blt_value<<shift);
487               m_tilemap[blt_tilemp]->mark_tile_dirty(writeoffs);
470               tmmjprd_tilemap[blt_tilemp]->mark_tile_dirty(writeoffs);
488471               blt_column++;
489472               blt_column&=0x7f;
490473            }
r243483r243484
493476
494477         case 0x03: /* next line */
495478            if(BLITLOG) osd_printf_debug("blit: move to next line\n");
496            blt_column = (m_blitterregs[1]&0x00ff0000)>>16; /* --CC---- */
479            blt_column = (tmmjprd_blitterregs[1]&0x00ff0000)>>16; /* --CC---- */
497480            blt_oddflg+=128;
498481            break;
499482
r243483r243484
507490
508491
509492
510WRITE32_MEMBER(tmmjprd_state::blitter_w)
493WRITE32_MEMBER(tmmjprd_state::tmmjprd_blitter_w)
511494{
512   COMBINE_DATA(&m_blitterregs[offset]);
495   COMBINE_DATA(&tmmjprd_blitterregs[offset]);
513496
514497   if (offset == 0x0c/4)
515498   {
516      do_blit();
499      tmmjprd_do_blit(machine());
517500   }
518501}
519502#endif
520503
521void tmmjprd_state::machine_start()
522{
523   save_item(NAME(m_mux_data));
524   save_item(NAME(m_system_in));
525}
526504
527WRITE32_MEMBER(tmmjprd_state::eeprom_write)
505WRITE32_MEMBER(tmmjprd_state::tmmjprd_eeprom_write)
528506{
529507   // don't disturb the EEPROM if we're not actually writing to it
530508   // (in particular, data & 0x100 here with mask = ffff00ff looks to be the watchdog)
r243483r243484
544522   }
545523}
546524
547READ32_MEMBER(tmmjprd_state::mux_r)
525READ32_MEMBER(tmmjprd_state::tmmjprd_mux_r)
548526{
549527   m_system_in = ioport("SYSTEM")->read();
550528
r243483r243484
651629
652630/* notice that data & 0x4 is always cleared on brt_1 and set on brt_2.        *
653631 * My wild guess is that bits 0,1 and 2 controls what palette entries to dim. */
654WRITE32_MEMBER(tmmjprd_state::brt_1_w)
632WRITE32_MEMBER(tmmjprd_state::tmmjprd_brt_1_w)
655633{
656634   int i;
657635   double brt;
r243483r243484
669647   }
670648}
671649
672WRITE32_MEMBER(tmmjprd_state::brt_2_w)
650WRITE32_MEMBER(tmmjprd_state::tmmjprd_brt_2_w)
673651{
674652   int i;
675653   double brt;
r243483r243484
691669   AM_RANGE(0x000000, 0x1fffff) AM_ROM
692670   AM_RANGE(0x200010, 0x200013) AM_READ(randomtmmjprds) // gfx chip status?
693671   /* check these are used .. */
694//  AM_RANGE(0x200010, 0x200013) AM_WRITEONLY AM_SHARE("viewregs0")
672//  AM_RANGE(0x200010, 0x200013) AM_WRITEONLY AM_SHARE("tmmjprd_viewregs0")
695673   AM_RANGE(0x200100, 0x200117) AM_WRITEONLY AM_SHARE("tilemap_regs.0" ) // tilemap regs1
696674   AM_RANGE(0x200120, 0x200137) AM_WRITEONLY AM_SHARE("tilemap_regs.1" ) // tilemap regs2
697675   AM_RANGE(0x200140, 0x200157) AM_WRITEONLY AM_SHARE("tilemap_regs.2" ) // tilemap regs3
698676   AM_RANGE(0x200160, 0x200177) AM_WRITEONLY AM_SHARE("tilemap_regs.3" ) // tilemap regs4
699677   AM_RANGE(0x200200, 0x20021b) AM_WRITEONLY AM_SHARE("spriteregs" ) // sprregs?
700//  AM_RANGE(0x200300, 0x200303) AM_WRITE(rombank_w) // used during rom testing, rombank/area select + something else?
701   AM_RANGE(0x20040c, 0x20040f) AM_WRITE(brt_1_w)
702   AM_RANGE(0x200410, 0x200413) AM_WRITE(brt_2_w)
703//  AM_RANGE(0x200500, 0x200503) AM_WRITEONLY AM_SHARE("viewregs7")
704//  AM_RANGE(0x200700, 0x20070f) AM_WRITE(blitter_w) AM_SHARE("blitterregs")
705//  AM_RANGE(0x200800, 0x20080f) AM_WRITEONLY AM_SHARE("viewregs9") // never changes?
678//  AM_RANGE(0x200300, 0x200303) AM_WRITE(tmmjprd_rombank_w) // used during rom testing, rombank/area select + something else?
679   AM_RANGE(0x20040c, 0x20040f) AM_WRITE(tmmjprd_brt_1_w)
680   AM_RANGE(0x200410, 0x200413) AM_WRITE(tmmjprd_brt_2_w)
681//  AM_RANGE(0x200500, 0x200503) AM_WRITEONLY AM_SHARE("tmmjprd_viewregs7")
682//  AM_RANGE(0x200700, 0x20070f) AM_WRITE(tmmjprd_blitter_w) AM_SHARE("tmmjprd_blitterregs")
683//  AM_RANGE(0x200800, 0x20080f) AM_WRITEONLY AM_SHARE("tmmjprd_viewregs9") // never changes?
706684   AM_RANGE(0x200900, 0x2009ff) AM_DEVREADWRITE16("i5000snd", i5000snd_device, read, write, 0xffffffff)
707685   /* hmm */
708//  AM_RANGE(0x279700, 0x279713) AM_WRITEONLY AM_SHARE("viewregs10")
686//  AM_RANGE(0x279700, 0x279713) AM_WRITEONLY AM_SHARE("tmmjprd_viewregs10")
709687   /* tilemaps */
710   AM_RANGE(0x280000, 0x283fff) AM_READWRITE(tilemap0_r,tilemap0_w)
711   AM_RANGE(0x284000, 0x287fff) AM_READWRITE(tilemap1_r,tilemap1_w)
712   AM_RANGE(0x288000, 0x28bfff) AM_READWRITE(tilemap2_r,tilemap2_w)
713   AM_RANGE(0x28c000, 0x28ffff) AM_READWRITE(tilemap3_r,tilemap3_w)
688   AM_RANGE(0x280000, 0x283fff) AM_READWRITE(tmmjprd_tilemap0_r,tmmjprd_tilemap0_w)
689   AM_RANGE(0x284000, 0x287fff) AM_READWRITE(tmmjprd_tilemap1_r,tmmjprd_tilemap1_w)
690   AM_RANGE(0x288000, 0x28bfff) AM_READWRITE(tmmjprd_tilemap2_r,tmmjprd_tilemap2_w)
691   AM_RANGE(0x28c000, 0x28ffff) AM_READWRITE(tmmjprd_tilemap3_r,tmmjprd_tilemap3_w)
714692   /* ?? is palette ram shared with sprites in this case or just a different map */
715693   AM_RANGE(0x290000, 0x29bfff) AM_RAM AM_SHARE("spriteram")
716694   AM_RANGE(0x29c000, 0x29ffff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
717695
718   AM_RANGE(0x400000, 0x400003) AM_READ(mux_r) AM_WRITE(eeprom_write)
696   AM_RANGE(0x400000, 0x400003) AM_READ(tmmjprd_mux_r) AM_WRITE(tmmjprd_eeprom_write)
719697   AM_RANGE(0xf00000, 0xffffff) AM_RAM
720698ADDRESS_MAP_END
721699
722700
723701
724static const gfx_layout sprite_16x16x8_layout =
702static const gfx_layout rabbit_sprite_16x16x8_layout =
725703{
726704   16,16,
727705   RGN_FRAC(1,2),
r243483r243484
743721// gfx decoding is ugly.. 16*16 tiles can start at varying different offsets..
744722static GFXDECODE_START( tmmjprd )
745723   /* this seems to be sprites */
746//  GFXDECODE_ENTRY( "gfx1", 0, sprite_8x8x4_layout,   0x0, 0x1000  )
747//  GFXDECODE_ENTRY( "gfx1", 0, sprite_16x16x4_layout, 0x0, 0x1000  )
748//  GFXDECODE_ENTRY( "gfx1", 0, sprite_8x8x8_layout,   0x0, 0x1000  )
749   GFXDECODE_ENTRY( "gfx1", 0, sprite_16x16x8_layout, 0x0, 0x10  )
724//  GFXDECODE_ENTRY( "gfx1", 0, tmmjprd_sprite_8x8x4_layout,   0x0, 0x1000  )
725//  GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_16x16x4_layout, 0x0, 0x1000  )
726//  GFXDECODE_ENTRY( "gfx1", 0, tmmjprd_sprite_8x8x8_layout,   0x0, 0x1000  )
727   GFXDECODE_ENTRY( "gfx1", 0, rabbit_sprite_16x16x8_layout, 0x0, 0x10  )
750728GFXDECODE_END
751729
752730
753TIMER_DEVICE_CALLBACK_MEMBER(tmmjprd_state::scanline)
731TIMER_DEVICE_CALLBACK_MEMBER(tmmjprd_state::tmmjprd_scanline)
754732{
755733   int scanline = param;
756734
r243483r243484
765743static MACHINE_CONFIG_START( tmmjprd, tmmjprd_state )
766744   MCFG_CPU_ADD("maincpu",M68EC020,24000000) /* 24 MHz */
767745   MCFG_CPU_PROGRAM_MAP(tmmjprd_map)
768   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", tmmjprd_state, scanline, "lscreen", 0, 1)
746   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", tmmjprd_state, tmmjprd_scanline, "lscreen", 0, 1)
769747
770748   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
771749   MCFG_EEPROM_SERIAL_ENABLE_STREAMING()
r243483r243484
790768   MCFG_SCREEN_SIZE(64*16, 64*16)
791769   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
792770   //MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*8, 64*16-1)
793   MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_left)
771   MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_tmmjprd_left)
794772   MCFG_SCREEN_PALETTE("palette")
795773
796774   MCFG_SCREEN_ADD("rscreen", RASTER)
r243483r243484
799777   MCFG_SCREEN_SIZE(64*16, 64*16)
800778   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
801779   //MCFG_SCREEN_VISIBLE_AREA(0*8, 64*16-1, 0*8, 64*16-1)
802   MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_right)
780   MCFG_SCREEN_UPDATE_DRIVER(tmmjprd_state, screen_update_tmmjprd_right)
803781   MCFG_SCREEN_PALETTE("palette")
804782
805783
r243483r243484
885863ROM_END
886864
887865
888GAME( 1997, tmmjprd,       0, tmmjprd, tmmjprd, driver_device, 0, ROT0, "Media / Sonnet", "Tokimeki Mahjong Paradise - Dear My Love", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
889GAME( 1998, tmpdoki, tmmjprd, tmpdoki, tmmjprd, driver_device, 0, ROT0, "Media / Sonnet", "Tokimeki Mahjong Paradise - Doki Doki Hen", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // missing gfx due to wrong roms?
866GAME( 1997, tmmjprd,       0, tmmjprd, tmmjprd, driver_device, 0, ROT0, "Media / Sonnet", "Tokimeki Mahjong Paradise - Dear My Love", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
867GAME( 1998, tmpdoki, tmmjprd, tmpdoki, tmmjprd, driver_device, 0, ROT0, "Media / Sonnet", "Tokimeki Mahjong Paradise - Doki Doki Hen", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) // missing gfx due to wrong roms?
trunk/src/mame/drivers/vamphalf.c
r243483r243484
163163   DECLARE_WRITE32_MEMBER(wyvernwg_snd_w);
164164   DECLARE_WRITE16_MEMBER(misncrft_snd_w);
165165
166   DECLARE_READ32_MEMBER(yorijori_1c_r);
167   DECLARE_WRITE32_MEMBER(yorijori_1c_w);
168   DECLARE_READ32_MEMBER(yorijori_10_r);
166   DECLARE_READ32_MEMBER(yorizori_1c_r);
167   DECLARE_WRITE32_MEMBER(yorizori_1c_w);
168   DECLARE_READ32_MEMBER(yorizori_10_r);
169169
170170   DECLARE_READ8_MEMBER(qs1000_p1_r);
171171   DECLARE_WRITE8_MEMBER(qs1000_p3_w);
r243483r243484
187187   DECLARE_DRIVER_INIT(misncrft);
188188   DECLARE_DRIVER_INIT(boonggab);
189189   DECLARE_DRIVER_INIT(wyvernwg);
190   DECLARE_DRIVER_INIT(yorijori);
190   DECLARE_DRIVER_INIT(yorizori);
191191   UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
192192   UINT32 screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
193193   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap);
r243483r243484
377377   }
378378}
379379
380READ32_MEMBER(vamphalf_state::yorijori_10_r)
380READ32_MEMBER(vamphalf_state::yorizori_10_r)
381381{
382   printf("yorijori_10_r %08x\n", space.device().safe_pc());
382   printf("yorizori_10_r %08x\n", space.device().safe_pc());
383383   return 0xffffffff;
384384}
385READ32_MEMBER(vamphalf_state::yorijori_1c_r)
385READ32_MEMBER(vamphalf_state::yorizori_1c_r)
386386{
387//  printf("yorijori_1c_r %08x\n", space.device().safe_pc());
387//  printf("yorizori_1c_r %08x\n", space.device().safe_pc());
388388   return 0x00;// 0xaa;
389389}
390WRITE32_MEMBER(vamphalf_state::yorijori_1c_w)
390WRITE32_MEMBER(vamphalf_state::yorizori_1c_w)
391391{
392//  printf("yorijori_1c_w %08x %08x\n", space.device().safe_pc(), data);
392//  printf("yorizori_1c_w %08x %08x\n", space.device().safe_pc(), data);
393393}
394394
395395WRITE32_MEMBER( vamphalf_state::wyvernwg_snd_w )
r243483r243484
434434   AM_RANGE(0xfff00000, 0xffffffff) AM_ROM AM_REGION("user1",0)
435435ADDRESS_MAP_END
436436
437static ADDRESS_MAP_START( yorijori_32bit_map, AS_PROGRAM, 32, vamphalf_state )
437static ADDRESS_MAP_START( yorizori_32bit_map, AS_PROGRAM, 32, vamphalf_state )
438438   AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_SHARE("wram32")
439439   AM_RANGE(0x40000000, 0x4003ffff) AM_RAM AM_SHARE("tiles32")
440440   AM_RANGE(0x80000000, 0x8000ffff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
r243483r243484
584584ADDRESS_MAP_END
585585
586586
587static ADDRESS_MAP_START( yorijori_io, AS_IO, 32, vamphalf_state )
588   AM_RANGE(0x010, 0x013) AM_READ(yorijori_10_r)
589   AM_RANGE(0x01c, 0x01f) AM_READWRITE(yorijori_1c_r,yorijori_1c_w)
587static ADDRESS_MAP_START( yorizori_io, AS_IO, 32, vamphalf_state )
588   AM_RANGE(0x010, 0x013) AM_READ(yorizori_10_r)
589   AM_RANGE(0x01c, 0x01f) AM_READWRITE(yorizori_1c_r,yorizori_1c_w)
590590ADDRESS_MAP_END
591591
592592/*
r243483r243484
11601160   MCFG_FRAGMENT_ADD(sound_ym_oki)
11611161MACHINE_CONFIG_END
11621162
1163static MACHINE_CONFIG_DERIVED( yorijori, common )
1163static MACHINE_CONFIG_DERIVED( yorizori, common )
11641164   MCFG_CPU_REPLACE("maincpu", E132T, XTAL_50MHz)    /* 50 MHz */
1165   MCFG_CPU_PROGRAM_MAP(yorijori_32bit_map)
1166   MCFG_CPU_IO_MAP(yorijori_io)
1165   MCFG_CPU_PROGRAM_MAP(yorizori_32bit_map)
1166   MCFG_CPU_IO_MAP(yorizori_io)
11671167   MCFG_CPU_VBLANK_INT_DRIVER("screen", vamphalf_state,  irq1_line_hold)
11681168
11691169   MCFG_FRAGMENT_ADD(sound_qs1000)
r243483r243484
20012001
20022002/*
20032003
2004Yori Jori Kuk Kuk
2004Yori Zori Kuk Kuk
20052005
20062006
20072007PCB Layout
r243483r243484
20732073
20742074*/
20752075
2076ROM_START( yorijori )
2076ROM_START( yorizori )
20772077   ROM_REGION32_BE( 0x200000, "user1", ROMREGION_ERASE00 ) /* Hyperstone CPU Code */
20782078   ROM_LOAD( "prg1", 0x000000, 0x200000, CRC(0e04eb40) SHA1(0cec9dc91aaf9cf7c459c7baac200cf0fcfddc18) )
20792079
r243483r243484
27622762   membank("qs1000:data")->configure_entries(0, 16, memregion("qs1000:cpu")->base()+0x100, 0x8000-0x100);
27632763}
27642764
2765DRIVER_INIT_MEMBER(vamphalf_state,yorijori)
2765DRIVER_INIT_MEMBER(vamphalf_state,yorizori)
27662766{
27672767   // seesm close to Final Godori in terms of port mappings, possibly a SemiCom game?
27682768
r243483r243484
28952895GAME( 2001, wyvernwga, wivernwg, wyvernwg, common,   vamphalf_state, wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings (set 2)", GAME_IMPERFECT_SOUND )
28962896GAME( 2001, aoh,       0,        aoh,      aoh,      vamphalf_state, aoh,      ROT0,   "Unico",             "Age Of Heroes - Silkroad 2 (v0.63 - 2001/02/07)", 0 )
28972897GAME( 2001, boonggab,  0,        boonggab, boonggab, vamphalf_state, boonggab, ROT270, "Taff System",       "Boong-Ga Boong-Ga (Spank'em!)", 0 )
2898GAME( 199?, yorijori,  0,        yorijori, common,   vamphalf_state, yorijori, ROT0,   "Golden Bell Entertainment",         "Yori Jori Kuk Kuk", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
2898GAME( 199?, yorizori,  0,        yorizori, common,   vamphalf_state, yorizori, ROT0,   "<unknown>",         "Yori Zori Kuk Kuk", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
trunk/src/mame/drivers/wrally.c
r243483r243484
103103
104104static ADDRESS_MAP_START( wrally_map, AS_PROGRAM, 16, wrally_state )
105105   AM_RANGE(0x000000, 0x0fffff) AM_ROM                                                         /* ROM */
106   AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(vram_w) AM_SHARE("videoram")   /* encrypted Video RAM */
106   AM_RANGE(0x100000, 0x103fff) AM_RAM_WRITE(wrally_vram_w) AM_SHARE("videoram")   /* encrypted Video RAM */
107107   AM_RANGE(0x108000, 0x108007) AM_RAM AM_SHARE("vregs")                                   /* Video Registers */
108108   AM_RANGE(0x10800c, 0x10800d) AM_WRITENOP                                                /* CLR INT Video */
109109   AM_RANGE(0x200000, 0x203fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")    /* Palette */
r243483r243484
112112   AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2")
113113   AM_RANGE(0x700004, 0x700005) AM_READ_PORT("WHEEL")
114114   AM_RANGE(0x700008, 0x700009) AM_READ_PORT("SYSTEM")
115   AM_RANGE(0x70000c, 0x70000d) AM_WRITE(okim6295_bankswitch_w)                                /* OKI6295 bankswitch */
115   AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w)                                /* OKI6295 bankswitch */
116116   AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff)  /* OKI6295 status/data register */
117117   AM_RANGE(0x70000a, 0x70001b) AM_WRITE(wrally_coin_lockout_w)                                /* Coin lockouts */
118118   AM_RANGE(0x70002a, 0x70003b) AM_WRITE(wrally_coin_counter_w)                                /* Coin counters */
119119   AM_RANGE(0x70004a, 0x70004b) AM_WRITENOP                                                /* Sound muting */
120   AM_RANGE(0x70005a, 0x70005b) AM_WRITE(flipscreen_w)                                  /* Flip screen */
120   AM_RANGE(0x70005a, 0x70005b) AM_WRITE(wrally_flipscreen_w)                                  /* Flip screen */
121121   AM_RANGE(0x70006a, 0x70007b) AM_WRITENOP                                                /* ??? */
122122   AM_RANGE(0xfec000, 0xfeffff) AM_RAM AM_SHARE("shareram")                                        /* Work RAM (shared with DS5002FP) */
123123ADDRESS_MAP_END
r243483r243484
255255   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
256256   MCFG_SCREEN_SIZE(64*16, 32*16)
257257   MCFG_SCREEN_VISIBLE_AREA(8, 24*16-8-1, 16, 16*16-8-1)
258   MCFG_SCREEN_UPDATE_DRIVER(wrally_state, screen_update)
258   MCFG_SCREEN_UPDATE_DRIVER(wrally_state, screen_update_wrally)
259259   MCFG_SCREEN_PALETTE("palette")
260260
261261   MCFG_GFXDECODE_ADD("gfxdecode", "palette", wrally)
r243483r243484
352352ROM_END
353353
354354
355GAME( 1993, wrally,  0,      wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", GAME_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension  baja " */
356GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", GAME_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power  Failure" */
357GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", GAME_SUPPORTS_SAVE )
355GAME( 1993, wrally,  0,      wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", 0 ) /* Dallas DS5002FP power failure shows as: "Tension  baja " */
356GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", 0 ) /* Dallas DS5002FP power failure shows as: "Power  Failure" */
357GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", 0 )
trunk/src/mame/drivers/xorworld.c
r243483r243484
6262   m_eeprom->di_write(data & 0x01);
6363}
6464
65WRITE16_MEMBER(xorworld_state::irq2_ack_w)
65WRITE16_MEMBER(xorworld_state::xorworld_irq2_ack_w)
6666{
6767   m_maincpu->set_input_line(2, CLEAR_LINE);
6868}
6969
70WRITE16_MEMBER(xorworld_state::irq6_ack_w)
70WRITE16_MEMBER(xorworld_state::xorworld_irq6_ack_w)
7171{
7272   m_maincpu->set_input_line(6, CLEAR_LINE);
7373}
r243483r243484
7777   AM_RANGE(0x200000, 0x200001) AM_READ_PORT("P1")
7878   AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P2")
7979   AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW")
80   AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8("saa", saa1099_device, data_w, 0x00ff)
81   AM_RANGE(0x800002, 0x800003) AM_DEVWRITE8("saa", saa1099_device, control_w, 0x00ff)
80   AM_RANGE(0x800000, 0x800001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff)
81   AM_RANGE(0x800002, 0x800003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff)
8282   AM_RANGE(0xa00008, 0xa00009) AM_WRITE(eeprom_chip_select_w)
8383   AM_RANGE(0xa0000a, 0xa0000b) AM_WRITE(eeprom_serial_clock_w)
8484   AM_RANGE(0xa0000c, 0xa0000d) AM_WRITE(eeprom_data_w)
85   AM_RANGE(0xffc000, 0xffc7ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
85   AM_RANGE(0xffc000, 0xffc7ff) AM_RAM_WRITE(xorworld_videoram16_w) AM_SHARE("videoram")
8686   AM_RANGE(0xffc800, 0xffc87f) AM_RAM AM_SHARE("spriteram")
87   AM_RANGE(0xffc880, 0xffc881) AM_WRITE(irq2_ack_w)
88   AM_RANGE(0xffc882, 0xffc883) AM_WRITE(irq6_ack_w)
87   AM_RANGE(0xffc880, 0xffc881) AM_WRITE(xorworld_irq2_ack_w)
88   AM_RANGE(0xffc882, 0xffc883) AM_WRITE(xorworld_irq6_ack_w)
8989   AM_RANGE(0xffc884, 0xffffff) AM_RAM
9090ADDRESS_MAP_END
9191
r243483r243484
182182   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
183183   MCFG_SCREEN_SIZE(32*8, 32*8)
184184   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
185   MCFG_SCREEN_UPDATE_DRIVER(xorworld_state, screen_update)
185   MCFG_SCREEN_UPDATE_DRIVER(xorworld_state, screen_update_xorworld)
186186   MCFG_SCREEN_PALETTE("palette")
187187
188188   MCFG_GFXDECODE_ADD("gfxdecode", "palette", xorworld)
r243483r243484
235235}
236236
237237
238GAME( 1990, xorworld, 0, xorworld, xorworld, xorworld_state, xorworld, ROT0, "Gaelco", "Xor World (prototype)", GAME_SUPPORTS_SAVE )
238GAME( 1990, xorworld, 0, xorworld, xorworld, xorworld_state, xorworld, ROT0, "Gaelco", "Xor World (prototype)", 0 )
trunk/src/mame/includes/gladiatr.h
r243483r243484
55public:
66   gladiatr_state(const machine_config &mconfig, device_type type, const char *tag)
77      : driver_device(mconfig, type, tag),
8         m_nvram(*this, "nvram") ,
9      m_spriteram(*this, "spriteram"),
10      m_videoram(*this, "videoram"),
11      m_colorram(*this, "colorram"),
12      m_textram(*this, "textram"),
813      m_maincpu(*this, "maincpu"),
914      m_audiocpu(*this, "audiocpu"),
1015      m_subcpu(*this, "sub"),
1116      m_msm(*this, "msm"),
1217      m_gfxdecode(*this, "gfxdecode"),
1318      m_palette(*this, "palette"),
14      m_nvram(*this, "nvram") ,
15      m_spriteram(*this, "spriteram"),
16      m_videoram(*this, "videoram"),
17      m_colorram(*this, "colorram"),
18      m_textram(*this, "textram"),
19      m_generic_paletteram_8(*this, "paletteram")   { }
20   
21   required_device<cpu_device> m_maincpu;
22   required_device<cpu_device> m_audiocpu;
23   required_device<cpu_device> m_subcpu;
24   required_device<msm5205_device> m_msm;
25   required_device<gfxdecode_device> m_gfxdecode;
26   required_device<palette_device> m_palette;
19      m_generic_paletteram_8(*this, "paletteram") { }
2720
28   required_shared_ptr<UINT8> m_nvram;
21   required_shared_ptr<UINT8> m_nvram;
2922   required_shared_ptr<UINT8> m_spriteram;
3023   required_shared_ptr<UINT8> m_videoram;
3124   required_shared_ptr<UINT8> m_colorram;
3225   required_shared_ptr<UINT8> m_textram;
33   required_shared_ptr<UINT8> m_generic_paletteram_8;
3426
3527   int m_data1;
3628   int m_data2;
r243483r243484
4840   int m_fg_tile_bank;
4941   int m_bg_tile_bank;
5042
51   // common
52   DECLARE_WRITE8_MEMBER(videoram_w);
53   DECLARE_WRITE8_MEMBER(colorram_w);
54   DECLARE_WRITE8_MEMBER(textram_w);
55   DECLARE_WRITE8_MEMBER(paletteram_w);
56   DECLARE_WRITE8_MEMBER(spritebuffer_w);
5743
58   // gladiator specific
59   DECLARE_READ8_MEMBER(gladiator_dsw1_r);
60   DECLARE_READ8_MEMBER(gladiator_dsw2_r);
61   DECLARE_READ8_MEMBER(gladiator_controls_r);
62   DECLARE_READ8_MEMBER(gladiator_button3_r);
44   DECLARE_READ8_MEMBER( gladiator_dsw1_r );
45   DECLARE_READ8_MEMBER( gladiator_dsw2_r );
46   DECLARE_READ8_MEMBER( gladiator_controls_r );
47   DECLARE_READ8_MEMBER( gladiator_button3_r );
48   DECLARE_WRITE8_MEMBER(gladiatr_videoram_w);
49   DECLARE_WRITE8_MEMBER(gladiatr_colorram_w);
50   DECLARE_WRITE8_MEMBER(gladiatr_textram_w);
51   DECLARE_WRITE8_MEMBER(gladiatr_paletteram_w);
52   DECLARE_WRITE8_MEMBER(gladiatr_spritebuffer_w);
6353   DECLARE_WRITE8_MEMBER(gladiatr_spritebank_w);
54   DECLARE_WRITE8_MEMBER(ppking_video_registers_w);
6455   DECLARE_WRITE8_MEMBER(gladiatr_video_registers_w);
6556   DECLARE_WRITE8_MEMBER(gladiatr_bankswitch_w);
66   DECLARE_WRITE8_MEMBER(gladiator_cpu_sound_command_w);
67   DECLARE_READ8_MEMBER(gladiator_cpu_sound_command_r);
57   DECLARE_WRITE8_MEMBER(glad_cpu_sound_command_w);
58   DECLARE_READ8_MEMBER(glad_cpu_sound_command_r);
6859   DECLARE_WRITE8_MEMBER(gladiatr_flipscreen_w);
6960   DECLARE_WRITE8_MEMBER(gladiatr_irq_patch_w);
61   DECLARE_WRITE8_MEMBER(qx0_w);
62   DECLARE_WRITE8_MEMBER(qx1_w);
63   DECLARE_WRITE8_MEMBER(qx2_w);
64   DECLARE_WRITE8_MEMBER(qx3_w);
65   DECLARE_READ8_MEMBER(qx2_r);
66   DECLARE_READ8_MEMBER(qx3_r);
67   DECLARE_READ8_MEMBER(qx0_r);
68   DECLARE_READ8_MEMBER(qx1_r);
69   DECLARE_READ8_MEMBER(f6a3_r);
7070   DECLARE_WRITE8_MEMBER(gladiator_int_control_w);
71   DECLARE_WRITE8_MEMBER(gladiator_adpcm_w);
72   DECLARE_WRITE_LINE_MEMBER(gladiator_ym_irq);
73   
74   // ppking specific
75   DECLARE_READ8_MEMBER(ppking_f1_r);
76   DECLARE_READ8_MEMBER(ppking_f6a3_r);
77   DECLARE_WRITE8_MEMBER(ppking_qx0_w);
78   DECLARE_WRITE8_MEMBER(ppking_qx1_w);
79   DECLARE_WRITE8_MEMBER(ppking_qx2_w);
80   DECLARE_WRITE8_MEMBER(ppking_qx3_w);
81   DECLARE_READ8_MEMBER(ppking_qx2_r);
82   DECLARE_READ8_MEMBER(ppking_qx3_r);
83   DECLARE_READ8_MEMBER(ppking_qx0_r);
84   DECLARE_READ8_MEMBER(ppking_qx1_r);
85   DECLARE_WRITE8_MEMBER(ppking_video_registers_w);
86   
71   DECLARE_WRITE8_MEMBER(glad_adpcm_w);
72   DECLARE_READ8_MEMBER(f1_r);
8773   DECLARE_DRIVER_INIT(gladiatr);
8874   DECLARE_DRIVER_INIT(ppking);
89   
9075   TILE_GET_INFO_MEMBER(bg_get_tile_info);
9176   TILE_GET_INFO_MEMBER(fg_get_tile_info);
92
9377   DECLARE_MACHINE_RESET(ppking);
9478   DECLARE_VIDEO_START(ppking);
9579   DECLARE_MACHINE_RESET(gladiator);
9680   DECLARE_VIDEO_START(gladiatr);
97   
9881   UINT32 screen_update_ppking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9982   UINT32 screen_update_gladiatr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
10083   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
10184   void swap_block(UINT8 *src1,UINT8 *src2,int len);
85   DECLARE_WRITE_LINE_MEMBER(gladiator_ym_irq);
86   required_device<cpu_device> m_maincpu;
87   required_device<cpu_device> m_audiocpu;
88   required_device<cpu_device> m_subcpu;
89   required_device<msm5205_device> m_msm;
90   required_device<gfxdecode_device> m_gfxdecode;
91   required_device<palette_device> m_palette;
92   required_shared_ptr<UINT8> m_generic_paletteram_8;
10293};
trunk/src/mame/includes/gsword.h
r243483r243484
1#include "sound/ay8910.h"
21#include "sound/msm5205.h"
32
43class gsword_state : public driver_device
r243483r243484
65public:
76   gsword_state(const machine_config &mconfig, device_type type, const char *tag)
87      : driver_device(mconfig, type, tag),
8      m_spritetile_ram(*this, "spritetile_ram"),
9      m_spritexy_ram(*this, "spritexy_ram"),
10      m_spriteattrib_ram(*this, "spriteattram"),
11      m_videoram(*this, "videoram"),
12      m_cpu2_ram(*this, "cpu2_ram"),
913      m_maincpu(*this, "maincpu"),
1014      m_audiocpu(*this, "audiocpu"),
1115      m_subcpu(*this, "sub"),
12      m_ay0(*this, "ay1"),
13      m_ay1(*this, "ay2"),
1416      m_msm(*this, "msm"),
1517      m_gfxdecode(*this, "gfxdecode"),
16      m_palette(*this, "palette"),
17      m_spritetile_ram(*this, "spritetile_ram"),
18      m_spritexy_ram(*this, "spritexy_ram"),
19      m_spriteattrib_ram(*this, "spriteattram"),
20      m_videoram(*this, "videoram"),
21      m_cpu2_ram(*this, "cpu2_ram") { }
18      m_palette(*this, "palette") { }
2219
23   required_device<cpu_device> m_maincpu;
24   required_device<cpu_device> m_audiocpu;
25   optional_device<cpu_device> m_subcpu;
26   required_device<ay8910_device> m_ay0;
27   required_device<ay8910_device> m_ay1;
28   optional_device<msm5205_device> m_msm;
29   required_device<gfxdecode_device> m_gfxdecode;
30   required_device<palette_device> m_palette;
31
3220   required_shared_ptr<UINT8> m_spritetile_ram;
3321   required_shared_ptr<UINT8> m_spritexy_ram;
3422   required_shared_ptr<UINT8> m_spriteattrib_ram;
3523   required_shared_ptr<UINT8> m_videoram;
3624   required_shared_ptr<UINT8> m_cpu2_ram;
3725
38   int m_coins; //currently initialized but not used
26   int m_coins;
3927   int m_fake8910_0;
4028   int m_fake8910_1;
4129   int m_nmi_enable;
r243483r243484
4533   int m_flipscreen;
4634   tilemap_t *m_bg_tilemap;
4735
48   // common
49   DECLARE_WRITE8_MEMBER(videoram_w);
50   DECLARE_WRITE8_MEMBER(charbank_w);
51   DECLARE_WRITE8_MEMBER(videoctrl_w);
52   DECLARE_WRITE8_MEMBER(scroll_w);
53   DECLARE_WRITE8_MEMBER(adpcm_soundcommand_w);
54   DECLARE_WRITE8_MEMBER(nmi_set_w);
55   DECLARE_WRITE8_MEMBER(ay8910_control_port_0_w);
56   DECLARE_WRITE8_MEMBER(ay8910_control_port_1_w);
57   DECLARE_READ8_MEMBER(fake_0_r);
58   DECLARE_READ8_MEMBER(fake_1_r);
59   
60   // gsword specific
36   DECLARE_WRITE8_MEMBER(gsword_videoram_w);
37   DECLARE_WRITE8_MEMBER(gsword_charbank_w);
38   DECLARE_WRITE8_MEMBER(gsword_videoctrl_w);
39   DECLARE_WRITE8_MEMBER(gsword_scroll_w);
6140   DECLARE_READ8_MEMBER(gsword_hack_r);
41   DECLARE_WRITE8_MEMBER(adpcm_soundcommand_w);
42   DECLARE_WRITE8_MEMBER(gsword_nmi_set_w);
43   DECLARE_WRITE8_MEMBER(gsword_AY8910_control_port_0_w);
44   DECLARE_WRITE8_MEMBER(gsword_AY8910_control_port_1_w);
45   DECLARE_READ8_MEMBER(gsword_fake_0_r);
46   DECLARE_READ8_MEMBER(gsword_fake_1_r);
47   DECLARE_READ8_MEMBER( gsword_8741_2_r );
48   DECLARE_READ8_MEMBER( gsword_8741_3_r );
6249   DECLARE_WRITE8_MEMBER(gsword_adpcm_data_w);
63   DECLARE_READ8_MEMBER(gsword_8741_2_r);
64   DECLARE_READ8_MEMBER(gsword_8741_3_r);
65
66   TILE_GET_INFO_MEMBER(get_bg_tile_info);
67
6850   DECLARE_DRIVER_INIT(gsword);
6951   DECLARE_DRIVER_INIT(gsword2);
70   virtual void machine_start();
71   virtual void machine_reset();
52   TILE_GET_INFO_MEMBER(get_bg_tile_info);
7253   virtual void video_start();
54   DECLARE_MACHINE_RESET(gsword);
7355   DECLARE_PALETTE_INIT(gsword);
56   DECLARE_MACHINE_RESET(josvolly);
7457   DECLARE_PALETTE_INIT(josvolly);
75
7658   UINT32 screen_update_gsword(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7759   INTERRUPT_GEN_MEMBER(gsword_snd_interrupt);
7860   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
79   int coins_in(void); //if 0'd
61   int gsword_coins_in(void);
62   required_device<cpu_device> m_maincpu;
63   required_device<cpu_device> m_audiocpu;
64   optional_device<cpu_device> m_subcpu;
65   optional_device<msm5205_device> m_msm;
66   required_device<gfxdecode_device> m_gfxdecode;
67   required_device<palette_device> m_palette;
8068};
trunk/src/mame/includes/liberate.h
r243483r243484
2020   required_shared_ptr<UINT8> m_videoram;
2121   required_shared_ptr<UINT8> m_spriteram;
2222   optional_shared_ptr<UINT8> m_scratchram;
23     
24   UINT8 *m_fg_gfx;   /* prosoccr */
2523   UINT8 *m_charram;   /* prosoccr */
24
2625   UINT8 m_io_ram[16];
2726
2827   int m_bank;
trunk/src/mame/includes/quizpani.h
r243483r243484
66   quizpani_state(const machine_config &mconfig, device_type type, const char *tag)
77      : driver_device(mconfig, type, tag),
88      m_maincpu(*this, "maincpu"),
9      m_gfxdecode(*this, "gfxdecode"),
109      m_scrollreg(*this, "scrollreg"),
1110      m_bg_videoram(*this, "bg_videoram"),
12      m_txt_videoram(*this, "txt_videoram") { }
11      m_txt_videoram(*this, "txt_videoram"),
12      m_gfxdecode(*this, "gfxdecode") { }
1313
1414   required_device<cpu_device> m_maincpu;
15   required_device<gfxdecode_device> m_gfxdecode;
16   
1715   required_shared_ptr<UINT16> m_scrollreg;
1816   required_shared_ptr<UINT16> m_bg_videoram;
1917   required_shared_ptr<UINT16> m_txt_videoram;
20   
18   required_device<gfxdecode_device> m_gfxdecode;
2119   tilemap_t *m_bg_tilemap;
2220   tilemap_t *m_txt_tilemap;
2321   int m_bgbank;
2422   int m_txtbank;
25   
26   DECLARE_WRITE16_MEMBER(bg_videoram_w);
27   DECLARE_WRITE16_MEMBER(txt_videoram_w);
28   DECLARE_WRITE16_MEMBER(tilesbank_w);
29   
23   DECLARE_WRITE16_MEMBER(quizpani_bg_videoram_w);
24   DECLARE_WRITE16_MEMBER(quizpani_txt_videoram_w);
25   DECLARE_WRITE16_MEMBER(quizpani_tilesbank_w);
3026   TILEMAP_MAPPER_MEMBER(bg_scan);
3127   TILE_GET_INFO_MEMBER(bg_tile_info);
3228   TILE_GET_INFO_MEMBER(txt_tile_info);
33   
3429   virtual void video_start();
35   
36   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
30   UINT32 screen_update_quizpani(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3731};
trunk/src/mame/includes/taxidriv.h
r243483r243484
33public:
44   taxidriv_state(const machine_config &mconfig, device_type type, const char *tag)
55      : driver_device(mconfig, type, tag),
6      m_maincpu(*this, "maincpu"),
7      m_gfxdecode(*this, "gfxdecode"),
8      m_palette(*this, "palette"),
96      m_vram0(*this, "vram0"),
107      m_vram1(*this, "vram1"),
118      m_vram2(*this, "vram2"),
r243483r243484
1411      m_vram5(*this, "vram5"),
1512      m_vram6(*this, "vram6"),
1613      m_vram7(*this, "vram7"),
17      m_scroll(*this, "scroll")  { }
14      m_scroll(*this, "scroll"),
15      m_maincpu(*this, "maincpu"),
16      m_gfxdecode(*this, "gfxdecode"),
17      m_palette(*this, "palette")  { }
1818
19   required_device<cpu_device> m_maincpu;
20   required_device<gfxdecode_device> m_gfxdecode;
21   required_device<palette_device> m_palette;
22
19   int m_s1;
20   int m_s2;
21   int m_s3;
22   int m_s4;
23   int m_latchA;
24   int m_latchB;
2325   required_shared_ptr<UINT8> m_vram0;
2426   required_shared_ptr<UINT8> m_vram1;
2527   required_shared_ptr<UINT8> m_vram2;
r243483r243484
2931   required_shared_ptr<UINT8> m_vram6;
3032   required_shared_ptr<UINT8> m_vram7;
3133   required_shared_ptr<UINT8> m_scroll;
32
33   int m_s1;
34   int m_s2;
35   int m_s3;
36   int m_s4;
37   int m_latchA;
38   int m_latchB;
3934   int m_bghide;
4035   int m_spritectrl[9];
41
4236   DECLARE_WRITE8_MEMBER(p2a_w);
4337   DECLARE_WRITE8_MEMBER(p2b_w);
4438   DECLARE_WRITE8_MEMBER(p2c_w);
r243483r243484
5953   DECLARE_READ8_MEMBER(p8910_0a_r);
6054   DECLARE_READ8_MEMBER(p8910_1a_r);
6155   DECLARE_WRITE8_MEMBER(p8910_0b_w);
62   DECLARE_WRITE8_MEMBER(spritectrl_w);
63
64   virtual void machine_start();
56   DECLARE_WRITE8_MEMBER(taxidriv_spritectrl_w);
6557   DECLARE_PALETTE_INIT(taxidriv);
66
67   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
58   UINT32 screen_update_taxidriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
59   required_device<cpu_device> m_maincpu;
60   required_device<gfxdecode_device> m_gfxdecode;
61   required_device<palette_device> m_palette;
6862};
trunk/src/mame/includes/wrally.h
r243483r243484
33public:
44   wrally_state(const machine_config &mconfig, device_type type, const char *tag)
55      : driver_device(mconfig, type, tag),
6      m_maincpu(*this, "maincpu"),
7      m_gfxdecode(*this, "gfxdecode"),
8      m_palette(*this, "palette"),
96      m_videoram(*this, "videoram"),
107      m_vregs(*this, "vregs"),
118      m_spriteram(*this, "spriteram"),
12      m_shareram(*this, "shareram") { }
9      m_shareram(*this, "shareram"),
10      m_maincpu(*this, "maincpu"),
11      m_gfxdecode(*this, "gfxdecode"),
12      m_palette(*this, "palette") { }
1313
14   required_device<cpu_device> m_maincpu;
15   required_device<gfxdecode_device> m_gfxdecode;
16   required_device<palette_device> m_palette;
17
14   tilemap_t *m_pant[2];
1815   required_shared_ptr<UINT16> m_videoram;
1916   required_shared_ptr<UINT16> m_vregs;
2017   required_shared_ptr<UINT16> m_spriteram;
2118   required_shared_ptr<UINT16> m_shareram;
22   
23   tilemap_t *m_pant[2];
2419
2520   DECLARE_READ8_MEMBER(dallas_share_r);
2621   DECLARE_WRITE8_MEMBER(dallas_share_w);
27   DECLARE_WRITE16_MEMBER(vram_w);
28   DECLARE_WRITE16_MEMBER(flipscreen_w);
29   DECLARE_WRITE16_MEMBER(okim6295_bankswitch_w);
22   DECLARE_WRITE16_MEMBER(wrally_vram_w);
23   DECLARE_WRITE16_MEMBER(wrally_flipscreen_w);
24   DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w);
3025   DECLARE_WRITE16_MEMBER(wrally_coin_counter_w);
3126   DECLARE_WRITE16_MEMBER(wrally_coin_lockout_w);
32   
33   TILE_GET_INFO_MEMBER(get_tile_info_screen0);
34   TILE_GET_INFO_MEMBER(get_tile_info_screen1);
35   
27   TILE_GET_INFO_MEMBER(get_tile_info_wrally_screen0);
28   TILE_GET_INFO_MEMBER(get_tile_info_wrally_screen1);
3629   virtual void video_start();
37   
38   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
30   UINT32 screen_update_wrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3931   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
32   required_device<cpu_device> m_maincpu;
33   required_device<gfxdecode_device> m_gfxdecode;
34   required_device<palette_device> m_palette;
4035};
trunk/src/mame/includes/xorworld.h
r243483r243484
55public:
66   xorworld_state(const machine_config &mconfig, device_type type, const char *tag)
77      : driver_device(mconfig, type, tag),
8      m_videoram(*this, "videoram"),
9      m_spriteram(*this, "spriteram"),
810      m_maincpu(*this, "maincpu"),
911      m_eeprom(*this, "eeprom"),
1012      m_gfxdecode(*this, "gfxdecode"),
11      m_palette(*this, "palette"),
12      m_videoram(*this, "videoram"),
13      m_spriteram(*this, "spriteram") { }
13      m_palette(*this, "palette") { }
1414
15   required_device<cpu_device> m_maincpu;
16   required_device<eeprom_serial_93cxx_device> m_eeprom;
17   required_device<gfxdecode_device> m_gfxdecode;
18   required_device<palette_device> m_palette;
19   
2015   required_shared_ptr<UINT16> m_videoram;
21   required_shared_ptr<UINT16> m_spriteram;
22   
2316   tilemap_t *m_bg_tilemap;
24   
25   DECLARE_WRITE16_MEMBER(irq2_ack_w);
26   DECLARE_WRITE16_MEMBER(irq6_ack_w);
27   DECLARE_WRITE16_MEMBER(videoram_w);
17   required_shared_ptr<UINT16> m_spriteram;
18   DECLARE_WRITE16_MEMBER(xorworld_irq2_ack_w);
19   DECLARE_WRITE16_MEMBER(xorworld_irq6_ack_w);
20   DECLARE_WRITE16_MEMBER(xorworld_videoram16_w);
2821   DECLARE_WRITE16_MEMBER(eeprom_chip_select_w);
2922   DECLARE_WRITE16_MEMBER(eeprom_serial_clock_w);
3023   DECLARE_WRITE16_MEMBER(eeprom_data_w);
31   
32   TILE_GET_INFO_MEMBER(get_bg_tile_info);
33   
3424   DECLARE_DRIVER_INIT(xorworld);
25   TILE_GET_INFO_MEMBER(get_bg_tile_info);
3526   virtual void video_start();
3627   DECLARE_PALETTE_INIT(xorworld);
37   
38   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
28   UINT32 screen_update_xorworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3929   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
30   required_device<cpu_device> m_maincpu;
31   required_device<eeprom_serial_93cxx_device> m_eeprom;
32   required_device<gfxdecode_device> m_gfxdecode;
33   required_device<palette_device> m_palette;
4034};
trunk/src/mame/layout/superbug.lay
r243483r243484
33
44<!-- NOTE: highlight should be a bit star-shaped, not doable in MAME internal layout -->
55
6   <element name="highlight_explosion"><disk><color red="0.875" green="1.0" blue="0.125" /></disk></element>
7   <element name="static_green"><rect><color red="0.125" green="0.875" blue="0" /></rect></element>
6   <element name="highlight">
7      <disk>
8         <color red="1.0" green="1.0" blue="0.125" />
9      </disk>
10   </element>
811
9
1012   <view name="Color Overlay">
1113      <screen index="0">
1214         <bounds left="0" top="0" right="300" bottom="400" />
1315      </screen>
14
15      <overlay element="highlight_explosion"><bounds x="117" y="167" width="66" height="66" /></overlay>
16
17      <overlay element="static_green"><bounds left="0" top="0" right="300" bottom="33" /></overlay>
18      <overlay element="static_green"><bounds left="0" top="367" right="300" bottom="400" /></overlay>
19
16      <overlay element="highlight">
17         <bounds x="117" y="167" width="66" height="66" />
18      </overlay>
2019   </view>
2120</mamelayout>
trunk/src/mame/machine/tait8741.c
r243483r243484
250250   m_port_handler_1_r.resolve_safe(0);
251251   m_port_handler_2_r.resolve_safe(0);
252252   m_port_handler_3_r.resolve_safe(0);
253   
254   for (int i = 0; i < 4; i++)
255   {
256      save_item(NAME(m_taito8741[i].toData), i);
257      save_item(NAME(m_taito8741[i].fromData), i);
258      save_item(NAME(m_taito8741[i].fromCmd), i);
259      save_item(NAME(m_taito8741[i].status), i);
260      save_item(NAME(m_taito8741[i].phase), i);
261      save_item(NAME(m_taito8741[i].txd), i);
262      save_item(NAME(m_taito8741[i].rxd), i);
263      save_item(NAME(m_taito8741[i].parallelselect), i);
264      save_item(NAME(m_taito8741[i].txpoint), i);
265      //save_item(NAME(m_taito8741[i].pending4a), i); //currently initialized to 0, never changes
266      save_item(NAME(m_taito8741[i].serial_out), i);
267      //save_item(NAME(m_taito8741[i].coins), i); // currently initialized but otherwise unused
268   };
269253}
270254
271255/* read status port */
r243483r243484
360344   m_port_handler_1_r.resolve_safe(0);
361345   m_port_handler_2_r.resolve_safe(0);
362346   m_port_handler_3_r.resolve_safe(0);
363   
364   for (int i = 0; i < 4; i++)
365   {
366      save_item(NAME(m_i8741[i].cmd), i);
367      save_item(NAME(m_i8741[i].sts), i);
368      save_item(NAME(m_i8741[i].txd), i);
369      //save_item(NAME(m_i8741[i].outport), i); //currently initialized to 0xff, never changed
370      save_item(NAME(m_i8741[i].rxd), i);
371      save_item(NAME(m_i8741[i].rst), i);
372   };
373   
374   save_item(NAME(m_nmi_enable));
375347}
376348
377349
trunk/src/mame/machine/wrally.c
r243483r243484
1818
1919***************************************************************************/
2020
21WRITE16_MEMBER(wrally_state::vram_w)
21WRITE16_MEMBER(wrally_state::wrally_vram_w)
2222{
2323   data = gaelco_decrypt(space, offset, data, 0x1f, 0x522a);
2424   COMBINE_DATA(&m_videoram[offset]);
r243483r243484
2626   m_pant[(offset & 0x1fff) >> 12]->mark_tile_dirty(((offset << 1) & 0x1fff) >> 2);
2727}
2828
29WRITE16_MEMBER(wrally_state::flipscreen_w)
29WRITE16_MEMBER(wrally_state::wrally_flipscreen_w)
3030{
3131   flip_screen_set(data & 0x01);
3232}
3333
34WRITE16_MEMBER(wrally_state::okim6295_bankswitch_w)
34WRITE16_MEMBER(wrally_state::OKIM6295_bankswitch_w)
3535{
3636   UINT8 *RAM = memregion("oki")->base();
3737
trunk/src/mame/mame.lst
r243483r243484
10971097
10981098// Namco System 246
10991099sys246
1100vnight
11011100bldyr3b
11021101rrvac
11031102rrvac2
r243483r243484
58995898pcktgal2        // (c) 1989 Data East Corporation (World?)
59005899pcktgal2j       // (c) 1989 Data East Corporation (World?)
59015900pokechmp        // Korean hack of Pocket Gal
5902pokechmpa      //
59035901billlist        //
59045902spool3          // (c) 1989 Data East Corporation (World?)
59055903spool3i         // (c) 1990 Data East Corporation + I-Vics license
r243483r243484
93129310missw96a        // (c) 1996 Comad
93139311missw96b        // (c) 1996 Comad
93149312missmw96        // (c) 1996 Comad
9315smissw         //
93169313fantsia2        // (c) 1997 Comad
93179314fantsia2a       // (c) 1997 Comad
93189315wownfant        // (c) 2002 Comad
r243483r243484
1043210429misncrft        // (c) 2000 Sun
1043310430misncrfta       // (c) 2000 Sun
1043410431mrdig           // (c) 2000 Sun
10435yorijori        // (c)
10432yorizori        // (c)
1043610433
1043710434hidnctch        // (c) 1998 Eolith
1043810435linkypip        // (c) 1998 Eolith
trunk/src/mame/video/gladiatr.c
r243483r243484
5050   m_bg_tilemap->set_scroll_cols(0x10);
5151
5252   m_sprite_bank = 1;
53   
54   save_item(NAME(m_video_attributes));
55   save_item(NAME(m_fg_scrolly));
56   save_item(NAME(m_sprite_buffer));
57   save_item(NAME(m_fg_tile_bank));
5853}
5954
6055VIDEO_START_MEMBER(gladiatr_state,gladiatr)
r243483r243484
6863   m_fg_tilemap->set_scrolldx(-0x30, 0x12f);
6964
7065   m_sprite_bank = 2;
71   
72   save_item(NAME(m_video_attributes));
73   save_item(NAME(m_fg_scrollx));
74   save_item(NAME(m_fg_scrolly));
75   save_item(NAME(m_bg_scrollx));
76   save_item(NAME(m_bg_scrolly));
77   save_item(NAME(m_sprite_bank));
78   save_item(NAME(m_sprite_buffer));
79   save_item(NAME(m_fg_tile_bank));
80   save_item(NAME(m_bg_tile_bank));
8166}
8267
8368
r243483r243484
8873
8974***************************************************************************/
9075
91WRITE8_MEMBER(gladiatr_state::videoram_w)
76WRITE8_MEMBER(gladiatr_state::gladiatr_videoram_w)
9277{
9378   m_videoram[offset] = data;
9479   m_bg_tilemap->mark_tile_dirty(offset);
9580}
9681
97WRITE8_MEMBER(gladiatr_state::colorram_w)
82WRITE8_MEMBER(gladiatr_state::gladiatr_colorram_w)
9883{
9984   m_colorram[offset] = data;
10085   m_bg_tilemap->mark_tile_dirty(offset);
10186}
10287
103WRITE8_MEMBER(gladiatr_state::textram_w)
88WRITE8_MEMBER(gladiatr_state::gladiatr_textram_w)
10489{
10590   m_textram[offset] = data;
10691   m_fg_tilemap->mark_tile_dirty(offset);
10792}
10893
109WRITE8_MEMBER(gladiatr_state::paletteram_w)
94WRITE8_MEMBER(gladiatr_state::gladiatr_paletteram_w)
11095{
11196   int r,g,b;
11297
r243483r243484
125110}
126111
127112
128WRITE8_MEMBER(gladiatr_state::spritebuffer_w)
113WRITE8_MEMBER(gladiatr_state::gladiatr_spritebuffer_w)
129114{
130115   m_sprite_buffer = data & 1;
131116}
trunk/src/mame/video/gsword.c
r243483r243484
8787   }
8888}
8989
90WRITE8_MEMBER(gsword_state::videoram_w)
90WRITE8_MEMBER(gsword_state::gsword_videoram_w)
9191{
92   m_videoram[offset] = data;
92   UINT8 *videoram = m_videoram;
93   videoram[offset] = data;
9394   m_bg_tilemap->mark_tile_dirty(offset);
9495}
9596
96WRITE8_MEMBER(gsword_state::charbank_w)
97WRITE8_MEMBER(gsword_state::gsword_charbank_w)
9798{
9899   if (m_charbank != data)
99100   {
r243483r243484
102103   }
103104}
104105
105WRITE8_MEMBER(gsword_state::videoctrl_w)
106WRITE8_MEMBER(gsword_state::gsword_videoctrl_w)
106107{
107108   if (data & 0x8f)
108109   {
r243483r243484
130131   /* other bits unused */
131132}
132133
133WRITE8_MEMBER(gsword_state::scroll_w)
134WRITE8_MEMBER(gsword_state::gsword_scroll_w)
134135{
135136   m_bg_tilemap->set_scrolly(0, data);
136137}
137138
138139TILE_GET_INFO_MEMBER(gsword_state::get_bg_tile_info)
139140{
140   int code = m_videoram[tile_index] + ((m_charbank & 0x03) << 8);
141   UINT8 *videoram = m_videoram;
142   int code = videoram[tile_index] + ((m_charbank & 0x03) << 8);
141143   int color = ((code & 0x3c0) >> 6) + 16 * m_charpalbank;
142144   int flags = m_flipscreen ? (TILE_FLIPX | TILE_FLIPY) : 0;
143145
r243483r243484
148150{
149151   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(gsword_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,
150152         8, 8, 32, 64);
151   
152   save_item(NAME(m_charbank));
153   save_item(NAME(m_charpalbank));
154   save_item(NAME(m_flipscreen));
155153}
156154
157155void gsword_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
158156{
159   for (int offs = 0; offs < m_spritexy_ram.bytes() - 1; offs+=2)
157   int offs;
158
159   for (offs = 0; offs < m_spritexy_ram.bytes() - 1; offs+=2)
160160   {
161161      int sx,sy,flipx,flipy,spritebank,tile,color;
162162
trunk/src/mame/video/liberate.c
r243483r243484
207207
208208   m_fix_tilemap->set_transparent_pen(0);
209209
210   m_fg_gfx = memregion("fg_gfx")->base();
211210   m_charram = auto_alloc_array(machine(), UINT8, 0x1800 * 2);
212   
213   save_pointer(NAME(m_charram), 0x1800 * 2);
214   save_pointer(NAME(m_fg_gfx), 0x6000);
215211}
216212
217213VIDEO_START_MEMBER(liberate_state,boomrang)
trunk/src/mame/video/quizpani.c
r243483r243484
3434         0);
3535}
3636
37WRITE16_MEMBER(quizpani_state::bg_videoram_w)
37WRITE16_MEMBER(quizpani_state::quizpani_bg_videoram_w)
3838{
3939   m_bg_videoram[offset] = data;
4040   m_bg_tilemap->mark_tile_dirty(offset);
4141}
4242
43WRITE16_MEMBER(quizpani_state::txt_videoram_w)
43WRITE16_MEMBER(quizpani_state::quizpani_txt_videoram_w)
4444{
4545   m_txt_videoram[offset] = data;
4646   m_txt_tilemap->mark_tile_dirty(offset);
4747}
4848
49WRITE16_MEMBER(quizpani_state::tilesbank_w)
49WRITE16_MEMBER(quizpani_state::quizpani_tilesbank_w)
5050{
5151   if (ACCESSING_BITS_0_7)
5252   {
r243483r243484
6969   m_bg_tilemap  = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(quizpani_state::bg_tile_info),this), tilemap_mapper_delegate(FUNC(quizpani_state::bg_scan),this),16,16,256,32);
7070   m_txt_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(quizpani_state::txt_tile_info),this),tilemap_mapper_delegate(FUNC(quizpani_state::bg_scan),this),16,16,256,32);
7171   m_txt_tilemap->set_transparent_pen(15);
72   
73   save_item(NAME(m_bgbank));
74   save_item(NAME(m_txtbank));
7572}
7673
77UINT32 quizpani_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
74UINT32 quizpani_state::screen_update_quizpani(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
7875{
7976   m_bg_tilemap->set_scrollx(0, m_scrollreg[0] - 64);
8077   m_bg_tilemap->set_scrolly(0, m_scrollreg[1] + 16);
trunk/src/mame/video/taxidriv.c
r243483r243484
22#include "includes/taxidriv.h"
33
44
5WRITE8_MEMBER(taxidriv_state::spritectrl_w)
5WRITE8_MEMBER(taxidriv_state::taxidriv_spritectrl_w)
66{
77   m_spritectrl[offset] = data;
88}
99
1010
1111
12UINT32 taxidriv_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
12UINT32 taxidriv_state::screen_update_taxidriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
1313{
1414   int offs;
1515   int sx,sy;
trunk/src/mame/video/wrally.c
r243483r243484
3434      1  | xxx----- -------- | not used?
3535*/
3636
37TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_screen0)
37TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_wrally_screen0)
3838{
3939   int data = m_videoram[tile_index << 1];
4040   int data2 = m_videoram[(tile_index << 1) + 1];
r243483r243484
4545   SET_TILE_INFO_MEMBER(0, code, data2 & 0x1f, TILE_FLIPYX((data2 >> 6) & 0x03));
4646}
4747
48TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_screen1)
48TILE_GET_INFO_MEMBER(wrally_state::get_tile_info_wrally_screen1)
4949{
5050   int data = m_videoram[(0x2000/2) + (tile_index << 1)];
5151   int data2 = m_videoram[(0x2000/2) + (tile_index << 1) + 1];
r243483r243484
6464
6565void wrally_state::video_start()
6666{
67   m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32);
68   m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32);
67   m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_wrally_screen0),this),TILEMAP_SCAN_ROWS,16,16,64,32);
68   m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wrally_state::get_tile_info_wrally_screen1),this),TILEMAP_SCAN_ROWS,16,16,64,32);
6969
7070   m_pant[0]->set_transmask(0,0xff01,0x00ff); /* this layer is split in two (pens 1..7, pens 8-15) */
7171   m_pant[1]->set_transparent_pen(0);
r243483r243484
172172
173173***************************************************************************/
174174
175UINT32 wrally_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
175UINT32 wrally_state::screen_update_wrally(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
176176{
177177   /* set scroll registers */
178178   if (!flip_screen()) {
trunk/src/mame/video/xorworld.c
r243483r243484
4949   }
5050}
5151
52WRITE16_MEMBER(xorworld_state::videoram_w)
52WRITE16_MEMBER(xorworld_state::xorworld_videoram16_w)
5353{
54   COMBINE_DATA(&m_videoram[offset]);
54   UINT16 *videoram = m_videoram;
55   COMBINE_DATA(&videoram[offset]);
5556   m_bg_tilemap->mark_tile_dirty(offset);
5657}
5758
r243483r243484
6768
6869TILE_GET_INFO_MEMBER(xorworld_state::get_bg_tile_info)
6970{
70   int data = m_videoram[tile_index];
71   UINT16 *videoram = m_videoram;
72   int data = videoram[tile_index];
7173   int code = data & 0x0fff;
7274
7375   SET_TILE_INFO_MEMBER(0, code, data >> 12, 0);
r243483r243484
9496
9597void xorworld_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect )
9698{
97   for (int i = 0; i < 0x40; i += 2)
99   UINT16 *spriteram16 = m_spriteram;
100   int i;
101
102   for (i = 0; i < 0x40; i += 2)
98103   {
99      int sx = m_spriteram[i] & 0x00ff;
100      int sy = 240 - (((m_spriteram[i] & 0xff00) >> 8) & 0xff);
101      int code = (m_spriteram[i+1] & 0x0ffc) >> 2;
102      int color = (m_spriteram[i+1] & 0xf000) >> 12;
104      int sx = spriteram16[i] & 0x00ff;
105      int sy = 240 - (((spriteram16[i] & 0xff00) >> 8) & 0xff);
106      int code = (spriteram16[i+1] & 0x0ffc) >> 2;
107      int color = (spriteram16[i+1] & 0xf000) >> 12;
103108
104109      m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, code, color, 0, 0, sx, sy, 0);
105110   }
106111}
107112
108UINT32 xorworld_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
113UINT32 xorworld_state::screen_update_xorworld(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
109114{
110115   m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
111116   draw_sprites(bitmap, cliprect);
trunk/src/mess/drivers/alesis.c
r243483r243484
88
99    http://www.vintagesynth.com/misc/hr16.php
1010    http://www.vintagesynth.com/misc/sr16.php
11    http://www.vintagesynth.com/misc/mmt8.php
1211
1312****************************************************************************/
1413
r243483r243484
7473   m_lcdc->write(space, BIT(m_kb_matrix,7), data);
7574}
7675
77WRITE8_MEMBER( alesis_state::mmt8_led_w )
78{
79   output_set_value("play_led", data & 0x01 ? 0 : 1);
80   output_set_value("record_led" , data & 0x02 ? 0 : 1);
81   output_set_value("part_led", data & 0x04 ? 0 : 1);
82   output_set_value("edit_led", data & 0x08 ? 0 : 1);
83   output_set_value("song_led", data & 0x10 ? 0 : 1);
84   output_set_value("echo_led", data & 0x20 ? 0 : 1);
85   output_set_value("loop_led", data & 0x40 ? 0 : 1);
86
87   m_leds = data;
88}
89
90READ8_MEMBER( alesis_state::mmt8_led_r )
91{
92   return m_leds;
93}
94
95WRITE8_MEMBER( alesis_state::track_led_w )
96{
97   for (int i=0; i<8; i++)
98      output_set_indexed_value("track_led", i + 1, BIT(data, i));
99}
100
101READ8_MEMBER( alesis_state::mmt8_p3_r )
102{
103   // ---- -x--   Tape in
104   // ---- x---   Start/Stop input
105   UINT8 data = 0xff;
106
107   data &= ~(m_cassette->input() > 0.01 ? 0x00 : 0x04);
108
109   return data;
110}
111
112WRITE8_MEMBER( alesis_state::mmt8_p3_w )
113{
114   // ---x ----   Tape out
115   // --x- ----   Click out
116
117   m_cassette->output(data & 0x10 ? -1.0 : +1.0);
118}
119
12076static ADDRESS_MAP_START(hr16_mem, AS_PROGRAM, 8, alesis_state)
12177   ADDRESS_MAP_UNMAP_HIGH
12278   AM_RANGE(0x0000, 0x7fff) AM_MIRROR(0x8000) AM_ROM
r243483r243484
152108   AM_RANGE(0x8000, 0xffff) AM_RAM     AM_SHARE("nvram")   // 32Kx8 SRAM, (battery-backed)
153109ADDRESS_MAP_END
154110
155static ADDRESS_MAP_START(mmt8_io, AS_IO, 8, alesis_state)
156   ADDRESS_MAP_UNMAP_HIGH
157   AM_RANGE(0xff02, 0xff02) AM_WRITE(track_led_w)
158   AM_RANGE(0xff04, 0xff04) AM_READWRITE(mmt8_led_r, mmt8_led_w)
159   AM_RANGE(0xff06, 0xff06) AM_WRITE(kb_matrix_w)
160   AM_RANGE(0xff08, 0xff09) AM_DEVREADWRITE("hd44780", hd44780_device, read, write)
161   AM_RANGE(0xff0e, 0xff0e) AM_READNOP
162   AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READ(kb_r)
163   AM_RANGE(MCS51_PORT_P2, MCS51_PORT_P2) AM_WRITENOP
164   AM_RANGE(MCS51_PORT_P3, MCS51_PORT_P3) AM_READWRITE(mmt8_p3_r, mmt8_p3_w)
165   AM_RANGE(0x0000, 0xffff) AM_RAM     AM_SHARE("nvram")   // 2x32Kx8 SRAM, (battery-backed)
166ADDRESS_MAP_END
167
168111/* Input ports */
169112static INPUT_PORTS_START( hr16 )
170113   PORT_START("COL1")
r243483r243484
226169   PORT_BIT(0xff, 0x00, IPT_DIAL) PORT_NAME("SELECT Slider") PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_DOWN) PORT_CODE_INC(KEYCODE_UP)
227170INPUT_PORTS_END
228171
229static INPUT_PORTS_START( mmt8 )
230   PORT_START("COL1")
231   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<<")     PORT_CODE(KEYCODE_LEFT)
232   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">>")     PORT_CODE(KEYCODE_RIGHT)
233   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ERASE")  PORT_CODE(KEYCODE_DEL)
234   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRANS")  PORT_CODE(KEYCODE_R)
235   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PLAY")   PORT_CODE(KEYCODE_ENTER)
236   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STOP/CONTINUE") PORT_CODE(KEYCODE_END)
237   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("COPY")   PORT_CODE(KEYCODE_C)
238   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RECORD")  PORT_CODE(KEYCODE_HOME)
239   PORT_START("COL2")
240   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 1") PORT_CODE(KEYCODE_F1)
241   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 2") PORT_CODE(KEYCODE_F2)
242   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 3") PORT_CODE(KEYCODE_F3)
243   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 4") PORT_CODE(KEYCODE_F4)
244   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 5") PORT_CODE(KEYCODE_F5)
245   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 6") PORT_CODE(KEYCODE_F6)
246   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 7") PORT_CODE(KEYCODE_F7)
247   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TRACK 8") PORT_CODE(KEYCODE_F8)
248   PORT_START("COL3")
249   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TEMPO")  PORT_CODE(KEYCODE_T)
250   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-")      PORT_CODE(KEYCODE_MINUS)
251   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+")      PORT_CODE(KEYCODE_PLUS_PAD)
252   PORT_BIT(0x38, IP_ACTIVE_LOW, IPT_UNUSED)
253   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAGE DOWN")  PORT_CODE(KEYCODE_DOWN)
254   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PAGE UP")    PORT_CODE(KEYCODE_UP)
255   PORT_START("COL4")
256   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLICK")  PORT_CODE(KEYCODE_G)
257   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6")      PORT_CODE(KEYCODE_6)
258   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7")      PORT_CODE(KEYCODE_7)
259   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8")      PORT_CODE(KEYCODE_8)
260   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9")      PORT_CODE(KEYCODE_9)
261   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0")      PORT_CODE(KEYCODE_0)
262   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI CHAN") PORT_CODE(KEYCODE_I)
263   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAPE")   PORT_CODE(KEYCODE_Y)
264   PORT_START("COL5")
265   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLOCK")  PORT_CODE(KEYCODE_K)
266   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1")      PORT_CODE(KEYCODE_1)
267   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2")      PORT_CODE(KEYCODE_2)
268   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3")      PORT_CODE(KEYCODE_3)
269   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4")      PORT_CODE(KEYCODE_4)
270   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5")      PORT_CODE(KEYCODE_5)
271   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SONG")   PORT_CODE(KEYCODE_S)
272   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MERGE")  PORT_CODE(KEYCODE_M)
273   PORT_START("COL6")
274   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI FILTER") PORT_CODE(KEYCODE_F)
275   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MIDI ECHO")   PORT_CODE(KEYCODE_H)
276   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LOOP")   PORT_CODE(KEYCODE_J)
277   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("QUANT")  PORT_CODE(KEYCODE_Q)
278   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LENGTH") PORT_CODE(KEYCODE_L)
279   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PART")   PORT_CODE(KEYCODE_P)
280   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("EDIT")   PORT_CODE(KEYCODE_E)
281   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NAME")   PORT_CODE(KEYCODE_N)
282INPUT_PORTS_END
283
284172static INPUT_PORTS_START( sr16 )
285173   PORT_START("COL1")
286174   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRESET/USER")  PORT_CODE(KEYCODE_U)
r243483r243484
341229void alesis_state::machine_reset()
342230{
343231   m_kb_matrix = 0xff;
344   m_leds = 0;
345232   memset(m_lcd_digits, 0, sizeof(m_lcd_digits));
346233}
347234
r243483r243484
405292   MCFG_HD44780_PIXEL_UPDATE_CB(sr16_pixel_update)
406293MACHINE_CONFIG_END
407294
408static MACHINE_CONFIG_DERIVED( mmt8, hr16 )
409   /* basic machine hardware */
410   MCFG_CPU_MODIFY("maincpu")
411   MCFG_CPU_IO_MAP(mmt8_io)
412
413   MCFG_DEVICE_REMOVE("dm3ag")
414MACHINE_CONFIG_END
415
416295/* ROM definition */
417296ROM_START( hr16 )
418297   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
r243483r243484
445324   ROM_LOAD( "2-27-0007.u15", 0x80000, 0x80000, CRC(319746db) SHA1(46b32a3ab2fbad67fb4566f607f578a2e9defd63))
446325ROM_END
447326
448ROM_START( mmt8 )
449   ROM_REGION( 0x8000, "maincpu", ROMREGION_ERASEFF )
450   ROM_SYSTEM_BIOS(0, "v111", "ver 1.11")
451   ROMX_LOAD( "mt8v1-11.bin", 0x00000, 0x08000, CRC(c9951946) SHA1(149bc5ea46466537de4074820c66a2296ea43bc1), ROM_BIOS(1))
452   ROM_SYSTEM_BIOS(1, "v109", "ver 1.09")
453   ROMX_LOAD( "mt8v1-09.bin", 0x00000, 0x08000, CRC(0ec41dec) SHA1(2c283965e510b586a08f0290df4dd357e6b19b62), ROM_BIOS(2))
454   ROM_SYSTEM_BIOS(2, "v108", "ver 1.08")
455   ROMX_LOAD( "mt8v1-08.bin", 0x00000, 0x08000, CRC(a0615455) SHA1(77395c837b356b34d6b96f6f46eca8c89b57434e), ROM_BIOS(3))
456ROM_END
457
458327ROM_START( sr16 )
459328   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
460329   ROM_SYSTEM_BIOS(0, "v104", "ver 1.04")
r243483r243484
480349/* Driver */
481350/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY    FULLNAME       FLAGS */
482351SYST( 1987, hr16,  0,       0,       hr16,      hr16, alesis_state,  hr16,   "Alesis",  "HR-16",       GAME_NOT_WORKING | GAME_NO_SOUND)
483SYST( 1987, mmt8,  0,       0,       mmt8,      mmt8, driver_device,    0,   "Alesis",  "MMT-8",       GAME_NOT_WORKING | GAME_NO_SOUND)
484352SYST( 1989, hr16b, hr16,    0,       hr16,      hr16, alesis_state,  hr16,   "Alesis",  "HR-16B",      GAME_NOT_WORKING | GAME_NO_SOUND)
485353SYST( 1990, sr16,  0,       0,       sr16,      sr16, driver_device,    0,   "Alesis",  "SR-16",       GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/alnchase.c
r243483r243484
1// license:BSD-3-Clause
2// copyright-holders:hap
3/***************************************************************************
4
5  Tomy Alien Chase (manufactured in Japan)
6  * boards are labeled TN-16
7  * NEC uCOM-43 MCU, labeled D553C 258
8  * red/green VFD display with color overlay, 2-sided (opposing player sees a mirrored image)
9
10
11***************************************************************************/
12
13#include "emu.h"
14#include "cpu/ucom4/ucom4.h"
15#include "sound/speaker.h"
16
17#include "alnchase.lh" // this is a test layout, external artwork is necessary
18
19
20class alnchase_state : public driver_device
21{
22public:
23   alnchase_state(const machine_config &mconfig, device_type type, const char *tag)
24      : driver_device(mconfig, type, tag),
25      m_maincpu(*this, "maincpu"),
26      m_speaker(*this, "speaker")
27   { }
28
29   required_device<cpu_device> m_maincpu;
30   required_device<speaker_sound_device> m_speaker;
31   
32   virtual void machine_start();
33};
34
35
36
37static INPUT_PORTS_START( alnchase )
38INPUT_PORTS_END
39
40
41
42/***************************************************************************
43
44  Machine Config
45
46***************************************************************************/
47
48void alnchase_state::machine_start()
49{
50}
51
52
53static MACHINE_CONFIG_START( alnchase, alnchase_state )
54
55   /* basic machine hardware */
56   MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
57
58   MCFG_DEFAULT_LAYOUT(layout_alnchase)
59
60   /* no video! */
61
62   /* sound hardware */
63   MCFG_SPEAKER_STANDARD_MONO("mono")
64   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
65   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
66MACHINE_CONFIG_END
67
68
69
70/***************************************************************************
71
72  Game driver(s)
73
74***************************************************************************/
75
76ROM_START( alnchase )
77   ROM_REGION( 0x0800, "maincpu", 0 )
78   ROM_LOAD( "d553c-258", 0x0000, 0x0800, CRC(c5284ff5) SHA1(6a20aaacc9748f0e0335958f3cea482e36153704) )
79ROM_END
80
81
82CONS( 1984, alnchase, 0, 0, alnchase, alnchase, driver_device, 0, "Tomy", "Alien Chase", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/amaztron.c
r243483r243484
22// copyright-holders:hap
33/***************************************************************************
44
5  Coleco Amaze-A-Tron, by Ralph Baer
5  Coleco Amaze-A-Tron
66  * TMS1100 MCU, labeled MP3405(die label too)
77
88  This is an electronic board game with a selection of 8 maze games,
trunk/src/mess/drivers/cnsector.c
r243483r243484
22// copyright-holders:hap
33/***************************************************************************
44
5  Parker Brothers Code Name: Sector, by Bob Doyle
5  Parker Brothers Code Name: Sector
66  * MP0905BNL ZA0379 (die labeled 0970F-05B)
77
88  This is a tabletop submarine pursuit game. A grid board and small toy
trunk/src/mess/drivers/edracula.c
r243483r243484
1// license:BSD-3-Clause
2// copyright-holders:hap
3/***************************************************************************
4
5  Epoch Dracula (manufactured in Japan)
6  * NEC uCOM-43 MCU, labeled D553C 206
7  * cyan/red/green VFD display NEC FIP8BM20T
8
9
10***************************************************************************/
11
12#include "emu.h"
13#include "cpu/ucom4/ucom4.h"
14#include "sound/speaker.h"
15
16#include "edracula.lh" // this is a test layout, external artwork is necessary
17
18
19class edracula_state : public driver_device
20{
21public:
22   edracula_state(const machine_config &mconfig, device_type type, const char *tag)
23      : driver_device(mconfig, type, tag),
24      m_maincpu(*this, "maincpu"),
25      m_speaker(*this, "speaker")
26   { }
27
28   required_device<cpu_device> m_maincpu;
29   required_device<speaker_sound_device> m_speaker;
30   
31   virtual void machine_start();
32};
33
34
35
36static INPUT_PORTS_START( edracula )
37INPUT_PORTS_END
38
39
40
41/***************************************************************************
42
43  Machine Config
44
45***************************************************************************/
46
47void edracula_state::machine_start()
48{
49}
50
51
52static MACHINE_CONFIG_START( edracula, edracula_state )
53
54   /* basic machine hardware */
55   MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz)
56
57   MCFG_DEFAULT_LAYOUT(layout_edracula)
58
59   /* no video! */
60
61   /* sound hardware */
62   MCFG_SPEAKER_STANDARD_MONO("mono")
63   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
64   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
65MACHINE_CONFIG_END
66
67
68
69/***************************************************************************
70
71  Game driver(s)
72
73***************************************************************************/
74
75ROM_START( edracula )
76   ROM_REGION( 0x0800, "maincpu", 0 )
77   ROM_LOAD( "d553c-206", 0x0000, 0x0800, CRC(b524857b) SHA1(c1c89ed5dd4bb1e6e98462dc8fa5af2aa48d8ede) )
78ROM_END
79
80
81CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/kaypro.c
r243483r243484
99    telephone cord, complete with modular plug on each end. The keyboard carries
1010    its own Intel 87C51 processor and is an intelligent device.
1111
12    Kaypro 10 notes:
13    - This machine comes with a 10MB hard drive, split into 2 5MB partitions. It also
14      has one floppy drive. The drive letters change depending on what drive it was booted
15      from. The boot drive is always A:.
16      If booted from floppy:
17      A: floppy
18      B: HD partition 1
19      C: HD partition 2
20      If booted from HD (presumably partition 1)
21      A: HD partition 1
22      B: HD partition 2
23      C: floppy
24
2512    ToDo:
2613
2714    - See about getting keyboard to work as a serial device.
2815    - Need dump of 87C51 cpu in the keyboard.
2916
3017    - Kaypro 2x, 4a: floppy not working "No operating system present on this disk"
31    - Kaypro 10: Boots from floppy, but needs hard drive added.
18    - Kaypro 10: Boots from floppy, but B drive not working "Bdos Err on B: Bad Sector"
3219    - Kaypro 4p88: works as a normal Kaypro 4, extra hardware not done
3320    - Kaypro Robie: has twin 2.6MB 5.25 floppy drives which we don't support, no software available
3421
r243483r243484
312299   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "drive1", kaypro_state::kaypro2x_floppy_formats)
313300MACHINE_CONFIG_END
314301
315static MACHINE_CONFIG_DERIVED( kaypro10, kaypro2x )
316   MCFG_DEVICE_REMOVE("fdc:1")  // only has 1 floppy drive
317   // need to add hard drive & controller
318MACHINE_CONFIG_END
319
320302static MACHINE_CONFIG_DERIVED( omni2, kaypro4 )
321303   MCFG_SCREEN_MODIFY("screen")
322304   MCFG_SCREEN_UPDATE_DRIVER(kaypro_state, screen_update_omni2)
r243483r243484
453435COMP( 1984, kaypro2x,   0,        0,    kaypro2x, kay_kbd, kaypro_state, kaypro, "Non Linear Systems",  "Kaypro 2x" , GAME_NOT_WORKING ) // model 81-025
454436COMP( 1984, kaypro4a,   kaypro2x, 0,    kaypro2x, kay_kbd, kaypro_state, kaypro, "Non Linear Systems",  "Kaypro 4 - 4/84" , GAME_NOT_WORKING ) // model 81-015
455437// Kaypro 4/84 plus 88 goes here, model 81-015 with an added 8088 daughterboard and rom
456COMP( 1983, kaypro10,   0,        0,    kaypro10, kay_kbd, kaypro_state, kaypro, "Non Linear Systems",  "Kaypro 10" , GAME_NOT_WORKING ) // model 81-005
438COMP( 1983, kaypro10,   0,        0,    kaypro2x, kay_kbd, kaypro_state, kaypro, "Non Linear Systems",  "Kaypro 10" , GAME_NOT_WORKING ) // model 81-005
457439COMP( 1984, robie,      0,        0,    kaypro2x, kay_kbd, kaypro_state, kaypro, "Non Linear Systems",  "Kaypro Robie" , GAME_NOT_WORKING ) // model 81-005
trunk/src/mess/drivers/mbee.c
r243483r243484
5555        F000-F7FF Video RAM
5656        F800-FFFF PCG RAM (graphics), Colour RAM (banked)
5757
58    Early machines have 'standard' video (128 hires characters).
59    Later machines had the option of 'premium' video which
60    provides thousands of hires characters, enough to simulate
61    bit-mapped graphics.
62
6358    Commands to call up built-in roms (depends on the model):
6459    NET - Jump to E000, usually the Telcom communications program.
6560          This rom can be replaced with the Dreamdisk Chip-8 rom.
6661        Note that Telcom 3.21 is 8k, it uses a rombank switch
6762        (by reading port 0A) to swap between the two halves.
68   See Telcom notes below.
6963
70    EDASM - Jump to C000, usually the Editor/Assembler package.
64    EDASM - Jump to C000, usually the editor/Assembler package.
7165
7266    MENU - Do a rombank switch to bank 5 and jump to C000 to start the Shell
7367
r243483r243484
8175    - Change it to parallel by entering OUTL#1
8276    - After you mount/create a printfile, you can LPRINT and LLIST.
8377
84    Notes about Telcom:
85    - On the older models, Telcom is called up by entering NET from within Basic. Models
86      from the pc85 onwards have it as a menu option.
87    - To exit, press Enter without any input. Disk versions, enter CPM or press ^C.
88    - After being used, version 3 and up will enable the use of OUT#7 in Basic, which
89      changes the screen to 80x24. Enter OUT#0 to revert to normal.
90    - Most versions of Telcom can have their parameters adjusted directly from Basic,
91      without needing to enter the Telcom program.
92    - Most versions of Telcom have an optional clock. In older models firstly select VS
93      from the MESS config menu, then enter NET CLOCK to enable it. NET TIME hhmm to set
94      the time (24hour format). NET CLOCKD is supposed to remove the status line, but it
95      doesn't, although the clock stops updating. NET CLOCK and NET CLOCKD are toggles.
96    - Telcom 1.2 (used in mbeeic) has a bug. If you enter NET CLOCK, the status line is
97      filled with inverse K. You can fix this from Basic by doing NET CLOCK 3 times.
9878
9979***************************************************************************
10080
10181    TODO/not working:
10282
10383    - Printer needs to be understood and fixed.
104    - Keyboard loses characters if you type at a normal rate.
84
10585    - Fix Paste (it loses most of the characters)
10686
87    - all except 256tc: RTC is optional, but it is being totally ignored.
88
89    - Most early models have a clock in Telcom, and in the menu. It doesn't
90      work.
91
10792    - various fdc issues:
10893        - B drive doesn't work.
10994        - some disks cause MESS to freeze.
r243483r243484
115100      crashes due to a bug in z80pio emulation.
116101   
117102    - 256tc: Keyboard ROM U60 needs to be dumped.
118    - 128k: GOLD PAL needs to be dumped for the bankswitching.
119    - 64k: RED PAL needs to be dumped for the bankswitching.
103    - 128k: PROM PAL needs to be dumped for the bankswitching.
120104
121    - Teleterm: keyboard has multiple severe problems. Also, the schematic shows
122                it using the old-style keyboard, however this must be wrong since
123                the computer has function keys, which are only available on the
124                new keyboard.
105    - Teleterm: keyboard is problematic, and cursor doesn't show.
125106
126    - Mouse: a few programs support the use of a serial mouse which interfaced
127             directly to the Z80PIO. However there's little info to be found.
128107
129108***************************************************************************
130109
r243483r243484
211190   AM_RANGE(0xf800, 0xffff) AM_READWRITE(mbeeic_high_r, mbeeic_high_w)
212191ADDRESS_MAP_END
213192
193static ADDRESS_MAP_START(mbee64_mem, AS_PROGRAM, 8, mbee_state)
194   AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("boot")
195   AM_RANGE(0x1000, 0x7fff) AM_RAMBANK("bankl")
196   AM_RANGE(0x8000, 0xefff) AM_RAMBANK("bankh")
197   AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(mbee_low_r, mbee_low_w)
198   AM_RANGE(0xf800, 0xffff) AM_READWRITE(mbeeic_high_r, mbeeic_high_w)
199ADDRESS_MAP_END
200
214201static ADDRESS_MAP_START(mbee256_mem, AS_PROGRAM, 8, mbee_state)
215202   AM_RANGE(0x0000, 0x0fff) AM_READ_BANK("bankr0") AM_WRITE_BANK("bankw0")
216203   AM_RANGE(0x1000, 0x1fff) AM_READ_BANK("bankr1") AM_WRITE_BANK("bankw1")
r243483r243484
292279   AM_RANGE(0x000b, 0x000b) AM_MIRROR(0xff10) AM_READWRITE(mbee_0b_r, mbee_0b_w)
293280   AM_RANGE(0x000c, 0x000c) AM_MIRROR(0xff00) AM_READWRITE(m6545_status_r, m6545_index_w)
294281   AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff10) AM_READWRITE(m6545_data_r, m6545_data_w)
295   AM_RANGE(0x001c, 0x001c) AM_MIRROR(0xff00) AM_READWRITE(mbeeppc_1c_r, mbeeppc_1c_w)
282   AM_RANGE(0x001c, 0x001c) AM_MIRROR(0xff00) AM_READWRITE(mbeeppc_1c_r,mbeeppc_1c_w)
296283   AM_RANGE(0x010a, 0x010a) AM_MIRROR(0xfe10) AM_READWRITE(mbeepc_telcom_high_r, mbeeic_0a_w)
297284ADDRESS_MAP_END
298285
r243483r243484
308295   AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w)
309296ADDRESS_MAP_END
310297
298static ADDRESS_MAP_START(mbee64_io, AS_IO, 8, mbee_state)
299   ADDRESS_MAP_GLOBAL_MASK(0xff)
300   ADDRESS_MAP_UNMAP_HIGH
301   AM_RANGE(0x00, 0x03) AM_MIRROR(0x10) AM_DEVREADWRITE("z80pio", z80pio_device, read_alt, write_alt)
302   AM_RANGE(0x08, 0x08) AM_MIRROR(0x10) AM_READWRITE(mbeeic_08_r, mbeeic_08_w)
303   AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_READWRITE(mbee_0b_r, mbee_0b_w)
304   AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w)
305   AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w)
306   AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
307   AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w)
308   AM_RANGE(0x50, 0x57) AM_WRITE(mbee64_50_w)
309ADDRESS_MAP_END
310
311311static ADDRESS_MAP_START(mbee128_io, AS_IO, 8, mbee_state)
312312   ADDRESS_MAP_GLOBAL_MASK(0xff)
313313   ADDRESS_MAP_UNMAP_HIGH
r243483r243484
316316   AM_RANGE(0x0b, 0x0b) AM_READWRITE(mbee_0b_r, mbee_0b_w)
317317   AM_RANGE(0x0c, 0x0c) AM_READWRITE(m6545_status_r, m6545_index_w)
318318   AM_RANGE(0x0d, 0x0d) AM_READWRITE(m6545_data_r, m6545_data_w)
319   AM_RANGE(0x1c, 0x1f) AM_READWRITE(mbeeppc_1c_r, mbee256_1c_w)
319   AM_RANGE(0x1c, 0x1f) AM_READWRITE(mbeeppc_1c_r,mbee256_1c_w)
320320   AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
321321   AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w)
322322   AM_RANGE(0x50, 0x57) AM_WRITE(mbee128_50_w)
r243483r243484
336336   AM_RANGE(0x000d, 0x000d) AM_MIRROR(0xff00) AM_READWRITE(m6545_data_r, m6545_data_w)
337337   // AM_RANGE(0x0010, 0x0013) AM_MIRROR(0xff00) Optional SN76489AN audio chip
338338   AM_RANGE(0x0018, 0x001b) AM_MIRROR(0xff00) AM_READ(mbee256_18_r)
339   AM_RANGE(0x001c, 0x001f) AM_MIRROR(0xff00) AM_READWRITE(mbeeppc_1c_r, mbee256_1c_w)
339   AM_RANGE(0x001c, 0x001f) AM_MIRROR(0xff00) AM_READWRITE(mbeeppc_1c_r,mbee256_1c_w)
340340   AM_RANGE(0x0044, 0x0047) AM_MIRROR(0xff00) AM_DEVREADWRITE("fdc", wd2793_t, read, write)
341341   AM_RANGE(0x0048, 0x004f) AM_MIRROR(0xff00) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w)
342342   AM_RANGE(0x0050, 0x0057) AM_MIRROR(0xff00) AM_WRITE(mbee256_50_w)
r243483r243484
451451   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("(Insert)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
452452   PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
453453
454   // Autorun on quickload
454   /* Enhanced options not available on real hardware */
455455   PORT_START("CONFIG")
456456   PORT_CONFNAME( 0x01, 0x01, "Autorun on Quickload")
457457   PORT_CONFSETTING(    0x00, DEF_STR(No))
458458   PORT_CONFSETTING(    0x01, DEF_STR(Yes))
459   // Wire links on motherboard
460   PORT_CONFNAME( 0xc0, 0x80, "PIO B7")
461   PORT_CONFSETTING(    0x00, "VS") // sync pulse to enable telcom clock
462   PORT_CONFSETTING(    0x40, "RTC") // optional board usually not fitted
463   PORT_CONFSETTING(    0x80, "Not used") // default resistor to vcc
464   PORT_CONFSETTING(    0xc0, "Centronics") // busy line
465459INPUT_PORTS_END
466460
467461static INPUT_PORTS_START( mbee256 )
r243483r243484
585579
586580   PORT_START("X14") /* IN6 KEY ROW 6 [+70] */
587581   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Alt") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
588
589   // Autorun on quickload
590   PORT_START("CONFIG")
591   PORT_CONFNAME( 0x01, 0x01, "Autorun on Quickload")
592   PORT_CONFSETTING(    0x00, DEF_STR(No))
593   PORT_CONFSETTING(    0x01, DEF_STR(Yes))
594   // Wire links on motherboard
595   PORT_CONFNAME( 0xc0, 0x80, "PIO B7") // default - do nothing
596   PORT_CONFSETTING(    0x00, "VS") // sync pulse to enable telcom clock
597   PORT_CONFSETTING(    0x40, "RTC") // optional board usually not fitted
598   PORT_CONFSETTING(    0x80, "Not used") // default resistor to vcc
599   PORT_CONFSETTING(    0xc0, "Centronics") // busy line
600582INPUT_PORTS_END
601583
602584static const z80_daisy_config mbee_daisy_chain[] =
r243483r243484
680662   MCFG_MC6845_CHAR_WIDTH(8)
681663   MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbee_update_row)
682664   MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr)
683   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs))
684665
685666   MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 2)
686667   MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
r243483r243484
701682   MCFG_CPU_PROGRAM_MAP(mbeeic_mem)
702683   MCFG_CPU_IO_MAP(mbeeic_io)
703684   MCFG_CPU_CONFIG(mbee_daisy_chain)
685   //MCFG_CPU_VBLANK_INT_DRIVER("screen", mbee_state,  mbee_interrupt)
704686
705687   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee)
706688
r243483r243484
721703   MCFG_GFXDECODE_ADD("gfxdecode", "palette", mbeeic)
722704
723705   MCFG_PALETTE_ADD("palette", 96)
724   MCFG_PALETTE_INIT_OWNER(mbee_state, mbeeic)
706   MCFG_PALETTE_INIT_OWNER(mbee_state,mbeeic)
725707
726   MCFG_VIDEO_START_OVERRIDE(mbee_state, mbeeic)
708   MCFG_VIDEO_START_OVERRIDE(mbee_state,mbeeic)
727709
728710   /* sound hardware */
729711   MCFG_SPEAKER_STANDARD_MONO("mono")
r243483r243484
738720   MCFG_MC6845_CHAR_WIDTH(8)
739721   MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeic_update_row)
740722   MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr)
741   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs))
742723
743724   MCFG_QUICKLOAD_ADD("quickload", mbee_state, mbee, "mwb,com,bee", 2)
744725   MCFG_QUICKLOAD_ADD("quickload2", mbee_state, mbee_z80bin, "bin", 2)
r243483r243484
766747
767748static MACHINE_CONFIG_DERIVED( mbeepc85b, mbeepc85 )
768749   MCFG_PALETTE_MODIFY("palette")
769   MCFG_PALETTE_INIT_OWNER(mbee_state, mbeepc85b)
750   MCFG_PALETTE_INIT_OWNER(mbee_state,mbeepc85b)
770751MACHINE_CONFIG_END
771752
772753static MACHINE_CONFIG_DERIVED( mbeeppc, mbeeic )
773754   MCFG_CPU_MODIFY( "maincpu" )
774755   MCFG_CPU_PROGRAM_MAP(mbeeppc_mem)
775756   MCFG_CPU_IO_MAP(mbeeppc_io)
776   MCFG_VIDEO_START_OVERRIDE(mbee_state, mbeeppc)
757   MCFG_VIDEO_START_OVERRIDE(mbee_state,mbeeppc)
777758   MCFG_GFXDECODE_MODIFY("gfxdecode", mbeeppc)
778759   MCFG_PALETTE_MODIFY("palette")
779760   MCFG_PALETTE_ENTRIES(16)
780   MCFG_PALETTE_INIT_OWNER(mbee_state, mbeeppc)
761   MCFG_PALETTE_INIT_OWNER(mbee_state,mbeeppc)
781762
782763   MCFG_DEVICE_REMOVE("crtc")
783764   MCFG_MC6845_ADD("crtc", SY6545_1, "screen", XTAL_13_5MHz / 8)
r243483r243484
785766   MCFG_MC6845_CHAR_WIDTH(8)
786767   MCFG_MC6845_UPDATE_ROW_CB(mbee_state, mbeeppc_update_row)
787768   MCFG_MC6845_ADDR_CHANGED_CB(mbee_state, mbee_update_addr)
788   MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(mbee_state, crtc_vs))
789769MACHINE_CONFIG_END
790770
791771static MACHINE_CONFIG_DERIVED( mbee56, mbeeic )
r243483r243484
800780   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "drive5b", floppy_image_device::default_floppy_formats)
801781MACHINE_CONFIG_END
802782
803static MACHINE_CONFIG_DERIVED( mbee128, mbee56 )
783static MACHINE_CONFIG_DERIVED( mbee64, mbee56 )
804784   MCFG_CPU_MODIFY( "maincpu" )
805   MCFG_CPU_PROGRAM_MAP(mbee256_mem)
806   MCFG_CPU_IO_MAP(mbee128_io)
807   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee128)
785   MCFG_CPU_PROGRAM_MAP(mbee64_mem)
786   MCFG_CPU_IO_MAP(mbee64_io)
787   MCFG_MACHINE_RESET_OVERRIDE(mbee_state, mbee64)
808788MACHINE_CONFIG_END
809789
810static MACHINE_CONFIG_DERIVED( mbee128p, mbeeppc )
790static MACHINE_CONFIG_DERIVED( mbee128, mbeeppc )
811791   MCFG_CPU_MODIFY( "maincpu" )
812792   MCFG_CPU_PROGRAM_MAP(mbee256_mem)
813793   MCFG_CPU_IO_MAP(mbee128_io)
r243483r243484
819799   MCFG_FLOPPY_DRIVE_ADD("fdc:1", mbee_floppies, "drive5b", floppy_image_device::default_floppy_formats)
820800MACHINE_CONFIG_END
821801
822static MACHINE_CONFIG_DERIVED( mbee256, mbee128p )
802static MACHINE_CONFIG_DERIVED( mbee256, mbee128 )
823803   MCFG_CPU_MODIFY( "maincpu" )
824804   MCFG_CPU_PROGRAM_MAP(mbee256_mem)
825805   MCFG_CPU_IO_MAP(mbee256_io)
r243483r243484
11041084   ROM_REGION( 0x0800, "colorram", ROMREGION_ERASE00 )
11051085ROM_END
11061086
1107ROM_START( mbee128 ) // Standard 128k (CIAB is the same thing with half the ram)
1108   ROM_REGION(0x20000, "rams", ROMREGION_ERASEFF)
1087ROM_START( mbee64 ) // CIAB (Computer-In-A-Book)
1088   ROM_REGION(0x10000,"maincpu", ROMREGION_ERASEFF)
11091089
1110   ROM_REGION(0x8000, "roms", 0)
1090   ROM_REGION(0x7000,"bootrom", ROMREGION_ERASEFF)
11111091   ROM_LOAD("bn54.bin",              0x0000,  0x2000, CRC(995c53db) SHA1(46e1a5cfd5795b8cf528bacf9dc79398ff7d64af) )
11121092
11131093   ROM_REGION(0x2000, "gfx", 0)
11141094   ROM_LOAD("charrom.bin",           0x1000,  0x1000, CRC(1f9fcee4) SHA1(e57ac94e03638075dde68a0a8c834a4f84ba47b0) )
11151095   ROM_RELOAD( 0x0000, 0x1000 )
11161096
1117   ROM_REGION(0x4000, "pals", 0) // undumped; using prom from 256tc for now
1118   ROM_LOAD( "silver.u39", 0x0000, 0x4000, BAD_DUMP CRC(c34aab64) SHA1(781fe648488dec90185760f8e081e488b73b68bf) )
1119
11201097   ROM_REGION( 0x0040, "proms", 0 )
11211098   ROM_LOAD( "82s123.ic7",           0x0000,  0x0020, CRC(61b9c16c) SHA1(0ee72377831c21339360c376f7248861d476dc20) )
11221099   ROM_LOAD_OPTIONAL( "82s123.ic16", 0x0020,  0x0020, CRC(4e779985) SHA1(cd2579cf65032c30b3fe7d6d07b89d4633687481) )   /* video switching prom, not needed for emulation purposes */
r243483r243484
11251102   ROM_REGION( 0x0800, "colorram", ROMREGION_ERASE00 )
11261103ROM_END
11271104
1128ROM_START( mbee128p ) // Premium 128K
1105ROM_START( mbee128 ) // 128K
11291106   ROM_REGION(0x20000, "rams", ROMREGION_ERASEFF)
11301107
11311108   ROM_REGION(0x8000, "roms", 0) // rom plus optional undumped roms plus dummy area
1132   ROM_SYSTEM_BIOS( 0, "bn56", "bn56" )
1133   ROMX_LOAD("bn56.rom",     0x0000, 0x2000, CRC(3f76769d) SHA1(cfae2069d739c26fe39f734d9f705a3c965d1e6f), ROM_BIOS(1) )
1109   ROM_SYSTEM_BIOS( 0, "bn60", "Version 2.03" )
1110   ROMX_LOAD("bn60.rom",     0x0000, 0x2000, CRC(ed15d4ee) SHA1(3ea42b63d42b9a4c5402676dee8912ad1f906bda), ROM_BIOS(1) )
11341111   ROM_SYSTEM_BIOS( 1, "bn59", "Version 2.02" )
11351112   ROMX_LOAD("bn59.rom",     0x0000, 0x2000, CRC(97384116) SHA1(87f2c4ab1a1f2964ba4f2bb60e62dc9c163831ba), ROM_BIOS(2) )
1136   ROM_SYSTEM_BIOS( 2, "bn60", "Version 2.03" )
1137   ROMX_LOAD("bn60.rom",     0x0000, 0x2000, CRC(ed15d4ee) SHA1(3ea42b63d42b9a4c5402676dee8912ad1f906bda), ROM_BIOS(3) )
1113   ROM_SYSTEM_BIOS( 2, "bn56", "bn56" )
1114   ROMX_LOAD("bn56.rom",     0x0000, 0x2000, CRC(3f76769d) SHA1(cfae2069d739c26fe39f734d9f705a3c965d1e6f), ROM_BIOS(3) )
11381115   ROM_SYSTEM_BIOS( 3, "bn55", "bn55" )
11391116   ROMX_LOAD("bn55.rom",     0x0000, 0x2000, CRC(ca2c1073) SHA1(355d90d181de899cc7af892df96305fead9c81b4), ROM_BIOS(4) )
11401117   ROM_SYSTEM_BIOS( 4, "bn54", "bn54" )
r243483r243484
11421119   ROM_SYSTEM_BIOS( 5, "hd18", "Hard Disk System" )
11431120   ROMX_LOAD("hd18.rom",     0x0000, 0x2000, CRC(ed53ace7) SHA1(534e2e00cc527197c76b3c106b3c9ff7f1328487), ROM_BIOS(6) )
11441121
1145   ROM_REGION(0x4000, "pals", 0) // undumped; using prom from 256tc for now
1122   ROM_REGION(0x4000, "proms", 0) // undumped; using prom from 256tc for now
11461123   ROM_LOAD( "silver.u39", 0x0000, 0x4000, BAD_DUMP CRC(c34aab64) SHA1(781fe648488dec90185760f8e081e488b73b68bf) )
11471124
11481125   ROM_REGION(0x9800, "gfx", 0)
r243483r243484
11631140   ROM_SYSTEM_BIOS( 1, "1.15", "Version 1.15" )
11641141   ROMX_LOAD("256tc_boot_1.15.u38", 0x0000, 0x4000, CRC(1902062d) SHA1(e4a1c0b3f4996e313da0bac0edb6d34e3270723e), ROM_BIOS(2) )
11651142
1166   ROM_REGION(0x4000, "pals", 0)
1143   ROM_REGION(0x4000, "proms", 0)
11671144   ROM_LOAD( "silver.u39", 0x0000, 0x4000, CRC(c34aab64) SHA1(781fe648488dec90185760f8e081e488b73b68bf) )
11681145
11691146   ROM_REGION(0x9800, "gfx", 0)
r243483r243484
11921169COMP( 1986, mbeeppc,  mbee,     0,      mbeeppc,  mbee,     mbee_state,  mbeeppc,    "Applied Technology",  "Microbee Premium PC85" , 0 )
11931170COMP( 1986, mbeett,   mbee,     0,      mbeett,   mbee256,  mbee_state,  mbeett,     "Applied Technology",  "Microbee Teleterm" , GAME_NOT_WORKING )
11941171COMP( 1986, mbee56,   mbee,     0,      mbee56,   mbee,     mbee_state,  mbee56,     "Applied Technology",  "Microbee 56k" , GAME_NOT_WORKING )
1195COMP( 1986, mbee128,  mbee,     0,      mbee128,  mbee,     mbee_state,  mbee128,    "Applied Technology",  "Microbee 128k Standard" , GAME_NOT_WORKING )
1196COMP( 1986, mbee128p, mbee,     0,      mbee128p, mbee,     mbee_state,  mbee128,    "Applied Technology",  "Microbee 128k Premium" , GAME_NOT_WORKING )
1172COMP( 1986, mbee64,   mbee,     0,      mbee64,   mbee,     mbee_state,  mbee64,     "Applied Technology",  "Microbee 64k" , GAME_NOT_WORKING )
1173COMP( 1986, mbee128,  mbee,     0,      mbee128,  mbee,     mbee_state,  mbee128,    "Applied Technology",  "Microbee 128k" , GAME_NOT_WORKING )
11971174COMP( 1987, mbee256,  mbee,     0,      mbee256,  mbee256,  mbee_state,  mbee256,    "Applied Technology",  "Microbee 256TC" , GAME_NOT_WORKING )
trunk/src/mess/drivers/merlin.c
r243483r243484
22// copyright-holders:Wilbert Pol, hap
33/***************************************************************************
44
5  Parker Bros Merlin handheld computer game, by Bob Doyle
5  Parker Bros Merlin handheld computer game
66  * TMS1100NLL MP3404A-N2 (has internal ROM)
77
88  To start a game, press NEW GAME, followed by a number:
trunk/src/mess/drivers/pc9801.c
r243483r243484
496496
497497   virtual void video_start();
498498   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
499   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
500499
501   enum
502   {
503      TIMER_VBIRQ
504   };
505
506   emu_timer *m_vbirq;
507500   UINT8 *m_ipl_rom;
508501   UINT8 *m_char_rom;
509502   UINT8 *m_kanji_rom;
r243483r243484
511504   UINT8 m_dma_offset[4];
512505   int m_dack;
513506
507   UINT8 m_vrtc_irq_mask;
514508   UINT8 m_video_ff[8],m_gfx_ff;
515509   UINT8 m_txt_scroll_reg[8];
516510   UINT8 m_pal_clut[4];
r243483r243484
568562   DECLARE_WRITE_LINE_MEMBER( write_uart_clock );
569563   DECLARE_WRITE8_MEMBER(rtc_dmapg_w);
570564   DECLARE_WRITE8_MEMBER(nmi_ctrl_w);
571   DECLARE_WRITE8_MEMBER(vrtc_clear_w);
565   DECLARE_WRITE8_MEMBER(vrtc_mask_w);
572566   DECLARE_WRITE8_MEMBER(pc9801_video_ff_w);
573567   DECLARE_READ8_MEMBER(txt_scrl_r);
574568   DECLARE_WRITE8_MEMBER(txt_scrl_w);
r243483r243484
737731#define ANALOG_16_MODE 0
738732#define ANALOG_256_MODE 0x10
739733
740void pc9801_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
741{
742   switch(id)
743   {
744      case TIMER_VBIRQ:
745         m_pic1->ir2_w(0);
746   }
747}
748
749734void pc9801_state::video_start()
750735{
751736   m_tvram = auto_alloc_array(machine(), UINT16, 0x2000);
r243483r243484
1003988   m_nmi_ff = (offset & 2) >> 1;
1004989}
1005990
1006WRITE8_MEMBER(pc9801_state::vrtc_clear_w)
991WRITE8_MEMBER(pc9801_state::vrtc_mask_w)
1007992{
1008   m_pic1->ir2_w(0);
993   m_vrtc_irq_mask = 1;
1009994}
1010995
1011996WRITE8_MEMBER(pc9801_state::pc9801_video_ff_w)
r243483r243484
17381723   AM_RANGE(0x0050, 0x0057) AM_DEVREADWRITE8("ppi8255_fdd", i8255_device, read, write, 0xff00)
17391724   AM_RANGE(0x0050, 0x0053) AM_WRITE8(nmi_ctrl_w,0x00ff) // NMI FF / i8255 floppy port (2d?)
17401725   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("upd7220_chr", upd7220_device, read, write, 0x00ff) //upd7220 character ports / <undefined>
1741   AM_RANGE(0x0064, 0x0065) AM_WRITE8(vrtc_clear_w,0x00ff)
1726   AM_RANGE(0x0064, 0x0065) AM_WRITE8(vrtc_mask_w,0x00ff)
17421727   AM_RANGE(0x0068, 0x0069) AM_WRITE8(pc9801_video_ff_w,0x00ff) //mode FF / <undefined>
17431728//  AM_RANGE(0x006c, 0x006f) border color / <undefined>
17441729   AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00)
r243483r243484
24322417   AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff)
24332418   AM_RANGE(0x005c, 0x005f) AM_READ16(pc9821_timestamp_r,0xffffffff) AM_WRITENOP // artic
24342419   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("upd7220_chr", upd7220_device, read, write, 0x00ff00ff) //upd7220 character ports / <undefined>
2435   AM_RANGE(0x0064, 0x0067) AM_WRITE8(vrtc_clear_w, 0x000000ff)
2420   AM_RANGE(0x0064, 0x0067) AM_WRITE8(vrtc_mask_w, 0x000000ff)
24362421   AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9821_video_ff_w,  0x00ff00ff) //mode FF / <undefined>
24372422   AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00)
24382423   AM_RANGE(0x0070, 0x007f) AM_READWRITE8(grcg_r,      grcg_w,      0x00ff00ff) //display registers "GRCG" / i8253 pit
r243483r243484
29972982   m_rtc->oe_w(1);
29982983
29992984   m_ipl_rom = memregion("ipl")->base();
3000   m_vbirq = timer_alloc(TIMER_VBIRQ);
30012985
30022986   save_item(NAME(m_sasi_data));
30032987   save_item(NAME(m_sasi_data_enable));
30042988   save_item(NAME(m_sasi_ctrl));
2989   save_item(NAME(m_vrtc_irq_mask));
30052990}
30062991
30072992MACHINE_START_MEMBER(pc9801_state,pc9801f)
r243483r243484
31313116
31323117INTERRUPT_GEN_MEMBER(pc9801_state::pc9801_vrtc_irq)
31333118{
3134   m_pic1->ir2_w(1);
3135   m_vbirq->adjust(m_screen->time_until_vblank_end());
3119   if(m_vrtc_irq_mask)
3120   {
3121      m_pic1->ir2_w(0);
3122      m_pic1->ir2_w(1);
3123      m_vrtc_irq_mask = 0; // TODO: this irq auto-masks?
3124   }
3125//  else
3126//      pic8259_ir2_w(machine().device("pic8259_master"), 0);
31363127}
31373128
31383129
trunk/src/mess/drivers/pcd.c
r243483r243484
1919#include "machine/wd_fdc.h"
2020#include "machine/mc146818.h"
2121#include "sound/speaker.h"
22#include "video/scn2674.h"
2322
23
2424//**************************************************************************
2525//  TYPE DEFINITIONS
2626//**************************************************************************
r243483r243484
3636   m_speaker(*this, "speaker"),
3737   m_sasi(*this, "sasi"),
3838   m_fdc(*this, "fdc"),
39   m_rtc(*this, "rtc"),
40   m_crtc(*this, "crtc"),
41   m_vram(*this, "vram"),
42   m_charram(8*1024)
39   m_rtc(*this, "rtc")
4340   { }
4441
45   DECLARE_READ8_MEMBER( irq_callback );
42   DECLARE_WRITE_LINE_MEMBER( pic1_irq );
43   DECLARE_READ8_MEMBER( pic1_slave_ack_r );
4644   TIMER_DEVICE_CALLBACK_MEMBER( timer0_tick );
4745   DECLARE_WRITE_LINE_MEMBER( i186_timer1_w );
4846
49   DECLARE_READ8_MEMBER( charram_r );
50   DECLARE_WRITE8_MEMBER( charram_w );
51   DECLARE_READ16_MEMBER( nmi_io_r );
52   DECLARE_WRITE16_MEMBER( nmi_io_w );
53   DECLARE_READ8_MEMBER( rtc_r );
54   DECLARE_WRITE8_MEMBER( rtc_w );
55   DECLARE_READ8_MEMBER( stat_r );
56   DECLARE_WRITE8_MEMBER( stat_w );
57   DECLARE_READ8_MEMBER( led_r );
58   DECLARE_WRITE8_MEMBER( led_w );
59   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
47   DECLARE_READ8_MEMBER( crt_data_r );
48   DECLARE_WRITE8_MEMBER( crt_data_w );
49   DECLARE_READ8_MEMBER( crt_status_r );
6050
6151protected:
6252   // driver_device overrides
6353   virtual void machine_start();
64   virtual void machine_reset();
6554
6655private:
6756   required_device<i80186_cpu_device> m_maincpu;
r243483r243484
7160   required_device<omti5100_device> m_sasi;
7261   required_device<wd2793_t> m_fdc;
7362   required_device<mc146818_device> m_rtc;
74   required_device<scn2674_device> m_crtc;
75   required_shared_ptr<UINT16> m_vram;
76   dynamic_buffer m_charram;
77   UINT8 m_stat, m_led;
7863};
7964
8065
r243483r243484
8267//  MACHINE EMULATION
8368//**************************************************************************
8469
85static const gfx_layout pcd_charlayout =
86{
87   8, 14,                   /* 8 x 14 characters */
88   512,                    /* 512 characters */
89   1,                  /* 1 bits per pixel */
90   { 0 },                  /* no bitplanes */
91   /* x offsets */
92   { 0, 1, 2, 3, 4, 5, 6, 7 },
93   /* y offsets */
94   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8 },
95   8*16
96};
9770void pcd_state::machine_start()
9871{
99   machine().device<gfxdecode_device>("gfxdecode")->set_gfx(0, global_alloc(gfx_element(machine().device<palette_device>("palette"), pcd_charlayout, m_charram, 0, 2, 0)));
10072}
10173
102void pcd_state::machine_reset()
74WRITE_LINE_MEMBER( pcd_state::pic1_irq )
10375{
104   m_stat = 0;
105   m_led = 0;
76   logerror("pic1 irq: %d\n", state);
77   m_maincpu->int0_w(state); // ?
10678}
10779
108READ8_MEMBER( pcd_state::irq_callback )
80READ8_MEMBER( pcd_state::pic1_slave_ack_r )
10981{
110   return (offset ? m_pic2 : m_pic1)->acknowledge();
82   if (offset == 0) // irq 0
83      return m_pic2->acknowledge();
84
85   return 0x00;
11186}
11287
11388TIMER_DEVICE_CALLBACK_MEMBER( pcd_state::timer0_tick )
r243483r243484
12196   m_speaker->level_w(state);
12297}
12398
124READ8_MEMBER( pcd_state::charram_r )
99READ8_MEMBER( pcd_state::crt_data_r )
125100{
126   return m_charram[offset >> 1];
101   logerror("crt_data_r @ %02x\n", offset);
102   return 0xff;
127103}
128104
129WRITE8_MEMBER( pcd_state::charram_w )
105WRITE8_MEMBER( pcd_state::crt_data_w )
130106{
131   m_charram[offset >> 1] = data;
107   logerror("crt_data_w %02x @ %02x\n", data, offset);
132108}
133109
134READ16_MEMBER( pcd_state::nmi_io_r )
110READ8_MEMBER( pcd_state::crt_status_r )
135111{
136   if(space.debugger_access())
137      return 0;
138   logerror("%s: unmapped %s %04x\n", machine().describe_context(), space.name(), offset << 1);
139   m_stat |= 8;
140   m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
141   return 0;
112   logerror("crt_status_r @ %02x\n", offset);
113   return 0xff;
142114}
143115
144WRITE16_MEMBER( pcd_state::nmi_io_w )
145{
146   if(space.debugger_access())
147      return;
148   logerror("%s: unmapped %s %04x\n", machine().describe_context(), space.name(), offset << 1);
149   m_stat |= 8;
150   m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
151}
152116
153READ8_MEMBER( pcd_state::rtc_r )
154{
155   m_rtc->write(space, 0, offset);
156   return m_rtc->read(space, 1);
157}
158
159WRITE8_MEMBER( pcd_state::rtc_w )
160{
161   m_rtc->write(space, 0, offset);
162   m_rtc->write(space, 1, data);
163}
164
165READ8_MEMBER( pcd_state::stat_r )
166{
167   return m_stat;
168}
169
170WRITE8_MEMBER( pcd_state::stat_w )
171{
172   m_stat = data;
173}
174
175READ8_MEMBER( pcd_state::led_r )
176{
177   return m_led;
178}
179
180WRITE8_MEMBER( pcd_state::led_w )
181{
182   for(int i = 0; i < 6; i++)
183      logerror("%c", (data & (1 << i)) ? '-' : '*');
184   logerror("\n");
185   m_led = data;
186}
187
188UINT32 pcd_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
189{
190   //bitmap.fill(0, cliprect);
191   m_crtc->scn2574_draw(machine(), bitmap, cliprect, m_vram);
192   return 0;
193}
194
195117//**************************************************************************
196118//  ADDRESS MAPS
197119//**************************************************************************
198120
199121static ADDRESS_MAP_START( pcd_map, AS_PROGRAM, 16, pcd_state )
200122   AM_RANGE(0x00000, 0x3ffff) AM_RAM // fixed 256k for now
201   AM_RANGE(0xf0000, 0xf7fff) AM_RAM AM_SHARE("vram")
202   //AM_RANGE(0xf7000, 0xfbfff) AM_READWRITE8(charram_r, charram_w, 0xffff)
203123   AM_RANGE(0xfc000, 0xfffff) AM_ROM AM_REGION("bios", 0)
204   AM_RANGE(0x00000, 0xfffff) AM_READWRITE(nmi_io_r, nmi_io_w)
205124ADDRESS_MAP_END
206125
207126static ADDRESS_MAP_START( pcd_io, AS_IO, 16, pcd_state )
208127   ADDRESS_MAP_UNMAP_HIGH
209128   AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("nvram")
210   AM_RANGE(0xf800, 0xf801) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xffff)
211   AM_RANGE(0xf820, 0xf821) AM_DEVREADWRITE8("pic2", pic8259_device, read, write, 0xffff)
212   AM_RANGE(0xf840, 0xf841) AM_READWRITE8(stat_r, stat_w, 0x00ff)
213   AM_RANGE(0xf840, 0xf841) AM_READWRITE8(led_r, led_w, 0xff00)
214   AM_RANGE(0xf880, 0xf8bf) AM_READWRITE8(rtc_r, rtc_w, 0xffff)
215   AM_RANGE(0xf900, 0xf907) AM_DEVREADWRITE8("fdc", wd2793_t, read, write, 0xffff)
216   //AM_RANGE(0xf940, 0xf943) scsi
217   AM_RANGE(0xf9c0, 0xf9c3) AM_DEVREADWRITE8("usart1",mc2661_device,read,write,0xffff)  // UARTs
218   AM_RANGE(0xf9d0, 0xf9d3) AM_DEVREADWRITE8("usart2",mc2661_device,read,write,0xffff)
219   AM_RANGE(0xf9e0, 0xf9e3) AM_DEVREADWRITE8("usart3",mc2661_device,read,write,0xffff)
220   AM_RANGE(0xf980, 0xf987) AM_DEVWRITE8("crtc", scn2674_device, mpu4_vid_scn2674_w, 0x00ff)
221   AM_RANGE(0xf980, 0xf987) AM_DEVREAD8("crtc", scn2674_device, mpu4_vid_scn2674_r, 0xff00)
222//   AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
223   AM_RANGE(0x0000, 0xffff) AM_READWRITE(nmi_io_r, nmi_io_w)
129   AM_RANGE(0xf840, 0xf841) AM_DEVREADWRITE8("pic1", pic8259_device, read, write, 0xff00)
130   AM_RANGE(0xf900, 0xf907) AM_DEVREADWRITE8("fdc", wd2793_t, read, write, 0x00ff)
131//  AM_RANGE(0xf940, 0xf941) // sasi controller here?
132   AM_RANGE(0xf980, 0xf981) AM_READWRITE8(crt_data_r, crt_data_w, 0x00ff) AM_READ8(crt_status_r, 0xff00)
133//  AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
224134ADDRESS_MAP_END
225135
226136
r243483r243484
234144SLOT_INTERFACE_END
235145
236146static MACHINE_CONFIG_START( pcd, pcd_state )
237   MCFG_CPU_ADD("maincpu", I80186, XTAL_16MHz)
147   MCFG_CPU_ADD("maincpu", I80186, XTAL_16MHz / 2)
238148   MCFG_CPU_PROGRAM_MAP(pcd_map)
239149   MCFG_CPU_IO_MAP(pcd_io)
240150   MCFG_80186_TMROUT1_HANDLER(WRITELINE(pcd_state, i186_timer1_w))
241   MCFG_80186_IRQ_SLAVE_ACK(READ8(pcd_state, irq_callback))
242151
243   MCFG_TIMER_DRIVER_ADD_PERIODIC("timer0_tick", pcd_state, timer0_tick, attotime::from_hz(XTAL_16MHz / 24)) // adjusted to pass post
152   MCFG_TIMER_DRIVER_ADD_PERIODIC("timer0_tick", pcd_state, timer0_tick, attotime::from_hz(XTAL_16MHz / 2 / 16))
244153
245   MCFG_PIC8259_ADD("pic1", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL)
246   MCFG_PIC8259_ADD("pic2", DEVWRITELINE("maincpu", i80186_cpu_device, int1_w), VCC, NULL)
154   MCFG_PIC8259_ADD("pic1", WRITELINE(pcd_state, pic1_irq), VCC, READ8(pcd_state, pic1_slave_ack_r))
155   MCFG_PIC8259_ADD("pic2", DEVWRITELINE("pic1", pic8259_device, ir0_w), GND, NULL)
247156
248157#if 0
249158   MCFG_RAM_ADD(RAM_TAG)
r243483r243484
258167   MCFG_OMTI5100_ADD("sasi")
259168
260169   // floppy disk controller
261   MCFG_WD2793x_ADD("fdc", XTAL_16MHz/8)
170   MCFG_WD2793x_ADD("fdc", XTAL_16MHz/2/8)
262171   MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("pic1", pic8259_device, ir6_w))
263172   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq1_w))
264173
r243483r243484
279188   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
280189   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
281190
282   // video hardware
283   MCFG_SCREEN_ADD("screen", RASTER)
284   MCFG_SCREEN_SIZE(640, 350)
285   MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 349)
286   MCFG_SCREEN_REFRESH_RATE(50)
287   MCFG_SCREEN_UPDATE_DRIVER(pcd_state, screen_update)
288
289   MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty)
290   MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
291
292   MCFG_SCN2674_VIDEO_ADD("crtc", 0, NULL);
293   MCFG_SCN2674_GFXDECODE("gfxdecode")
294   MCFG_SCN2674_PALETTE("palette")
295
296191   // rtc
297192   MCFG_MC146818_ADD("rtc", XTAL_32_768kHz)
298193   MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic1", pic8259_device, ir7_w))
r243483r243484
307202   ROM_REGION(0x4000, "bios", 0)
308203   ROM_LOAD16_BYTE("s26361-d359.d42", 0x0001, 0x2000, CRC(e20244dd) SHA1(0ebc5ddb93baacd9106f1917380de58aac64fe73))
309204   ROM_LOAD16_BYTE("s26361-d359.d43", 0x0000, 0x2000, CRC(e03db2ec) SHA1(fcae8b0c9e7543706817b0a53872826633361fda))
310   ROM_FILL(0xb64, 1, 0xe2)  // post expects 0xd0 fdc command to be instant, give it a delay
311   ROM_FILL(0xb65, 1, 0xfe)
312   ROM_FILL(0x3ffe, 1, 0xb4)  // fix csum
313   ROM_FILL(0x3fff, 1, 0x22)
314205
315206   // gfx card (scn2674 with 8741), to be moved
316207   ROM_REGION(0x400, "graphics", 0)
trunk/src/mess/drivers/prestige.c
r243483r243484
874874COMP( 1996, gjrstar2,  gjrstar, 0,  prestige,   prestige, driver_device,     0,  "VTech",   "Genius Junior Redstar 2 (Germany)", GAME_IS_SKELETON)
875875COMP( 1998, gjrstar3,  0,       0,  prestige,   prestige, driver_device,     0,  "VTech",   "Genius Junior Redstar 3 (Germany)", GAME_IS_SKELETON)
876876COMP( 1998, gj5000,    0,       0,  prestige,   prestige, driver_device,     0,  "VTech",   "Genius Junior 5000 (Germany)", GAME_IS_SKELETON)
877
878
879// gl6600cx use a NSC1028 system-on-a-chip designed by National Semiconductor specifically for VTech
880// http://web.archive.org/web/19991127134657/http://www.national.com/news/item/0,1735,425,00.html
881877COMP( 1999, gl6600cx,  0,       0,  prestige,   prestige, driver_device,     0,  "VTech",   "Genius Leader 6600CX (Germany)", GAME_IS_SKELETON)
trunk/src/mess/drivers/samcoupe.c
r243483r243484
334334   AM_RANGE(0x00fd, 0x00fd) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_midi_r, samcoupe_midi_w)
335335   AM_RANGE(0x00fe, 0x00fe) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(samcoupe_keyboard_r, samcoupe_border_w)
336336   AM_RANGE(0x00ff, 0x00ff) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READ(samcoupe_attributes_r)
337   AM_RANGE(0x00ff, 0x00ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, data_w)
338   AM_RANGE(0x01ff, 0x01ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, control_w)
337   AM_RANGE(0x00ff, 0x00ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, saa1099_data_w)
338   AM_RANGE(0x01ff, 0x01ff) AM_MIRROR(0xfe00) AM_MASK(0xffff) AM_DEVWRITE("saa1099", saa1099_device, saa1099_control_w)
339339ADDRESS_MAP_END
340340
341341
trunk/src/mess/drivers/simon.c
r243483r243484
22// copyright-holders:hap
33/***************************************************************************
44
5  Milton Bradley Simon, created by Ralph Baer
5  Milton Bradley Simon
66
77  Revision A hardware:
88  * TMS1000 (has internal ROM), DS75494 lamp driver
trunk/src/mess/drivers/slicer.c
r243483r243484
137137   ROM_LOAD("epbios.bin", 0x0000, 0x8001, CRC(96fe9dd4) SHA1(5fc43454fe7d51f2ae97aef822155dcd28eb7f23))
138138ROM_END
139139
140COMP( 1983, slicer, 0, 0, slicer, 0, driver_device, 0, "Slicer Computers", "Slicer", GAME_NO_SOUND)
140COMP( 1983, slicer, 0, 0, slicer, 0, driver_device, 0, "Slicer Computers", "Slicer", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/drivers/splitsec.c
r243483r243484
1616  *: higher number indicates higher difficulty
1717
1818
19----------------------------------------------------------------------------
20
21  Parker Brothers Bank Shot (known as Cue Ball in the UK), by Garry Kitchen
22  * TMS1400NLL MP7313-N2 (die labeled MP7313)
23
24  Bank Shot is an electronic pool game. To select a game, repeatedly press
25  the [SELECT] button, then press [CUE UP] to start. Refer to the official
26  manual for more information. The game selections are:
27  1: Straight Pool (1 player)
28  2: Straight Pool (2 players)
29  3: Poison Pool
30  4: Trick Shots
31
32
3319  TODO:
34  - bankshot: the cue ball led is strobed more often than other leds,
35    making it look brighter. We need more accurate led decay simulation
36    for this to work.
3720  - MCU clock is unknown
3821
3922***************************************************************************/
r243483r243484
4326#include "sound/speaker.h"
4427
4528#include "splitsec.lh"
46#include "bankshot.lh"
4729
4830// The master clock is a single stage RC oscillator: R=24K, C=100pf,
4931// according to the TMS 1000 series data manual this is around 375kHz.
r243483r243484
5133// to recordings, maybe the RC osc curve is different for TMS1400?
5234
5335// so for now, the value below is an approximation
54#define MASTER_CLOCK (475000)
36#define MASTER_CLOCK (485000)
5537
5638
5739class splitsec_state : public driver_device
r243483r243484
6850   required_ioport_array<2> m_button_matrix;
6951   required_device<speaker_sound_device> m_speaker;
7052
71   UINT8 m_input_mux;
7253   UINT16 m_r;
7354   UINT16 m_o;
7455
r243483r243484
7859
7960   DECLARE_READ8_MEMBER(read_k);
8061   DECLARE_WRITE16_MEMBER(write_o);
81   DECLARE_WRITE16_MEMBER(splitsec_write_r);
82   DECLARE_WRITE16_MEMBER(bankshot_write_r);
62   DECLARE_WRITE16_MEMBER(write_r);
8363
8464   TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
8565   void leds_update();
r243483r243484
10383
10484/* display layout, where number xy is lamp R(x),O(y)
10585
106  Split Second:
107
10886       00    02    04
10987    10 01 12 03 14 05 16
11088       11    13    15
r243483r243484
11694       71    73    75
11795    50 60 52 62 54 64 56
11896       70    72    74
119
120
121  Bank Shot: pretty much linear, see bankshot.lay
122
12397*/
12498
12599void splitsec_state::leds_update()
r243483r243484
182156
183157   // read selected button rows
184158   for (int i = 0; i < 2; i++)
185      if (m_input_mux >> i & 1)
159      if (m_r >> (i+9) & 1)
186160         k |= m_button_matrix[i]->read();
187161
188162   return k;
189163}
190164
191WRITE16_MEMBER(splitsec_state::write_o)
165WRITE16_MEMBER(splitsec_state::write_r)
192166{
193   // O0-O6: led rows
194   // O7: N/C
195   m_o = data;
196   leds_update();
197}
198
199WRITE16_MEMBER(splitsec_state::splitsec_write_r)
200{
201167   // R8: speaker out
202168   m_speaker->level_w(data >> 8 & 1);
203169
204170   // R9,R10: input mux
205   m_input_mux = data >> 9 & 3;
206   
207171   // R0-R7: led columns
208   m_r = data & 0xff;
172   m_r = data;
209173   leds_update();
210174}
211175
212WRITE16_MEMBER(splitsec_state::bankshot_write_r)
176WRITE16_MEMBER(splitsec_state::write_o)
213177{
214   // R0: speaker out
215   m_speaker->level_w(data & 1);
216
217   // R2,R3: input mux
218   m_input_mux = data >> 2 & 3;
219   
220   // R2-R10: led columns
221   m_r = data & ~3;
178   // O0-O6: led rows
179   // O7: N/C
180   m_o = data;
222181   leds_update();
223182}
224183
r243483r243484
245204INPUT_PORTS_END
246205
247206
248/* bankshot physical button layout and labels is like this:
249207
250    [SELECT  [BALL UP] [BALL OVER]
251     SCORE]
252
253    ------  led display  ------
254   
255    [ANGLE]  [AIM]     [CUE UP
256                        SHOOT]
257*/
258
259static INPUT_PORTS_START( bankshot )
260   PORT_START("IN.0") // R2
261   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Angle")
262   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Aim")
263   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cue Up / Shoot")
264   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
265
266   PORT_START("IN.1") // R3
267   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Select / Score")
268   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Ball Up")
269   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Ball Over")
270   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
271INPUT_PORTS_END
272
273
274
275208/***************************************************************************
276209
277210  Machine Config
r243483r243484
285218   memset(m_leds_cache, 0, sizeof(m_leds_cache));
286219   memset(m_leds_decay, 0, sizeof(m_leds_decay));
287220
288   m_input_mux = 0;
289221   m_r = 0;
290222   m_o = 0;
291223
r243483r243484
294226   save_item(NAME(m_leds_cache));
295227   save_item(NAME(m_leds_decay));
296228
297   save_item(NAME(m_input_mux));
298229   save_item(NAME(m_r));
299230   save_item(NAME(m_o));
300231}
r243483r243484
306237   MCFG_CPU_ADD("maincpu", TMS1400, MASTER_CLOCK)
307238   MCFG_TMS1XXX_READ_K_CB(READ8(splitsec_state, read_k))
308239   MCFG_TMS1XXX_WRITE_O_CB(WRITE16(splitsec_state, write_o))
309   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, splitsec_write_r))
240   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, write_r))
310241
311242   MCFG_TIMER_DRIVER_ADD_PERIODIC("leds_decay", splitsec_state, leds_decay_tick, attotime::from_msec(10))
312243
r243483r243484
320251   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
321252MACHINE_CONFIG_END
322253
323static MACHINE_CONFIG_DERIVED( bankshot, splitsec )
324254
325   /* basic machine hardware */
326   MCFG_CPU_MODIFY("maincpu")
327   MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, bankshot_write_r))
328255
329   MCFG_DEFAULT_LAYOUT(layout_bankshot)
330MACHINE_CONFIG_END
331
332
333
334256/***************************************************************************
335257
336258  Game driver(s)
r243483r243484
347269   ROM_LOAD( "tms1400_splitsec_opla.pla", 0, 557, CRC(7539283b) SHA1(f791fa98259fc10c393ff1961d4c93040f1a2932) )
348270ROM_END
349271
350ROM_START( bankshot )
351   ROM_REGION( 0x1000, "maincpu", 0 )
352   ROM_LOAD( "tms1400nll_mp7313", 0x0000, 0x1000, CRC(7a5016a9) SHA1(a8730dc8a282ffaa3d89e675f371d43eb39f39b4) )
353272
354   ROM_REGION( 867, "maincpu:mpla", 0 )
355   ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) )
356   ROM_REGION( 557, "maincpu:opla", 0 )
357   ROM_LOAD( "tms1400_bankshot_opla.pla", 0, 557, CRC(7539283b) SHA1(f791fa98259fc10c393ff1961d4c93040f1a2932) )
358ROM_END
359
360
361273CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", GAME_SUPPORTS_SAVE )
362CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/stopthie.c
r243483r243484
22// copyright-holders:hap
33/***************************************************************************
44
5  Parker Brothers Stop Thief, by Bob Doyle
5  Parker Brothers Stop Thief
66  * TMS0980NLL MP6101B (die labeled 0980B-01A)
77
88  Stop Thief is actually a board game, the electronic device emulated here
trunk/src/mess/drivers/tmtennis.c
r243483r243484
66  * board labeled TOMY TN-04 TENNIS
77  * NEC uCOM-44 MCU, labeled D552C 048
88  * VFD display NEC FIP11AM15T (FIP=fluorescent indicator panel)
9 
10  The initial release of this game was in 1979, known as Pro-Tennis,
11  it is unknown if the hardware and/or ROM contents differ.
12 
139
14  TODO:
15  - 2-player mode doesn't work: the guys auto-serve and the left player
16    always hits the net, mcu emulation bug?
17  - difficulty switch changes mcu freq
1810
1911***************************************************************************/
2012
r243483r243484
2214#include "cpu/ucom4/ucom4.h"
2315#include "sound/speaker.h"
2416
25#include "tmtennis.lh" // this is a test layout, external artwork is necessary
17#include "tmtennis.lh"
2618
2719// master clock is from an LC circuit oscillating by default at 360kHz,
2820// the difficulty switch puts a capacitor across it to slow it down to 260kHz
r243483r243484
3628   tmtennis_state(const machine_config &mconfig, device_type type, const char *tag)
3729      : driver_device(mconfig, type, tag),
3830      m_maincpu(*this, "maincpu"),
39      m_button_matrix(*this, "IN"),
4031      m_speaker(*this, "speaker")
4132   { }
4233
4334   required_device<cpu_device> m_maincpu;
44   required_ioport_array<2> m_button_matrix;
4535   required_device<speaker_sound_device> m_speaker;
46   
47   UINT8 m_input_mux;
48   UINT16 m_plate;
49   UINT16 m_grid;
5036
51   DECLARE_READ8_MEMBER(input_r);
52   DECLARE_WRITE8_MEMBER(port_e_w);
53   DECLARE_WRITE8_MEMBER(plate_w);
54   DECLARE_WRITE8_MEMBER(grid_w);
55
56   UINT16 m_vfd_state[0x10];
57   void update_vfd();
58
5937   virtual void machine_start();
6038};
6139
r243483r243484
6341
6442/***************************************************************************
6543
66  Display
67
68***************************************************************************/
69
70void tmtennis_state::update_vfd()
71{
72   for (int i = 0; i < 12; i++)
73      if (m_grid & (1 << i) && m_vfd_state[i] != m_plate)
74      {
75         // on difference, send to output
76         for (int j = 0; j < 12; j++)
77            output_set_lamp_value(i*100 + j, m_plate >> j & 1);
78         
79         m_vfd_state[i] = m_plate;
80      }
81}
82
83
84
85/***************************************************************************
86
8744  I/O
8845
8946***************************************************************************/
9047
91READ8_MEMBER(tmtennis_state::input_r)
92{
93   // port A/B: buttons
94   UINT8 inp = 0xff;
9548
96   // read selected button rows
97   for (int i = 0; i < 2; i++)
98      if (~m_input_mux >> i & 1)
99         inp &= m_button_matrix[i]->read();
10049
101   return inp >> (offset*4);
102}
103
104WRITE8_MEMBER(tmtennis_state::port_e_w)
105{
106   // E0/E1: input mux
107   // E2: speaker out
108   // E3: N/C
109   m_input_mux = data & 3;
110   m_speaker->level_w(data >> 2 & 1);
111}
112
113WRITE8_MEMBER(tmtennis_state::plate_w)
114{
115   // port C/D/F: vfd matrix plate
116   if (offset == NEC_UCOM4_PORTF) offset--;
117   int shift = (offset - NEC_UCOM4_PORTC) * 4;
118   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
119   
120   update_vfd();
121}
122
123WRITE8_MEMBER(tmtennis_state::grid_w)
124{
125   // port G/H/I: vfd matrix grid
126   int shift = (offset - NEC_UCOM4_PORTG) * 4;
127   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
128   
129   update_vfd();
130}
131
132
133
13450/***************************************************************************
13551
13652  Inputs
13753
13854***************************************************************************/
13955
140/* Pro-Tennis physical button layout and labels is like this:
141
142    [SERVE] [1] [2] [3]       [3] [2] [1] [SERVE]
143            [4] [5] [6]       [6] [5] [4]
144
145    PRACTICE<--PRO1-->PRO2    1PLAYER<--OFF-->2PLAYER
146*/
147
14856static INPUT_PORTS_START( tmtennis )
149   PORT_START("IN.0") // E0 port A/B (left side)
150   PORT_CONFNAME( 0x101, 0x001, DEF_STR( Difficulty ) )
151   PORT_CONFSETTING(     0x000, "Practice" )
152   PORT_CONFSETTING(     0x001, "Pro 1" )
153   PORT_CONFSETTING(     0x101, "Pro 2" )
154   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) // P2 serve
155   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
156   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
157   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
158   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
159   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
160   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
161
162   PORT_START("IN.1") // E1 port A/B (right side)
163   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // P1 serve
164   PORT_CONFNAME( 0x02, 0x02, "Players" )
165   PORT_CONFSETTING(    0x02, "1" )
166   PORT_CONFSETTING(    0x00, "2" )
167   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 )
168   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
169   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
170   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 )
171   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
172   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 )
17357INPUT_PORTS_END
17458
17559
r243483r243484
18266
18367void tmtennis_state::machine_start()
18468{
185   // zerofill
186   memset(m_vfd_state, 0, sizeof(m_vfd_state));
187   m_input_mux = 0;
188   m_plate = 0;
189   m_grid = 0;
190
191   // register for savestates
192   save_item(NAME(m_vfd_state));
193   save_item(NAME(m_input_mux));
194   save_item(NAME(m_plate));
195   save_item(NAME(m_grid));
19669}
19770
19871
r243483r243484
20073
20174   /* basic machine hardware */
20275   MCFG_CPU_ADD("maincpu", NEC_D552, MASTER_CLOCK_PRO2)
203   MCFG_UCOM4_READ_A_CB(READ8(tmtennis_state, input_r))
204   MCFG_UCOM4_READ_B_CB(READ8(tmtennis_state, input_r))
205   MCFG_UCOM4_WRITE_C_CB(WRITE8(tmtennis_state, plate_w))
206   MCFG_UCOM4_WRITE_D_CB(WRITE8(tmtennis_state, plate_w))
207   MCFG_UCOM4_WRITE_E_CB(WRITE8(tmtennis_state, port_e_w))
208   MCFG_UCOM4_WRITE_F_CB(WRITE8(tmtennis_state, plate_w))
209   MCFG_UCOM4_WRITE_G_CB(WRITE8(tmtennis_state, grid_w))
210   MCFG_UCOM4_WRITE_H_CB(WRITE8(tmtennis_state, grid_w))
211   MCFG_UCOM4_WRITE_I_CB(WRITE8(tmtennis_state, grid_w))
21276
21377   MCFG_DEFAULT_LAYOUT(layout_tmtennis)
21478
r243483r243484
23498ROM_END
23599
236100
237CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomytronic)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
101CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tomytronic Tennis", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/wildfire.c
r243483r243484
22// copyright-holders:hap
33/***************************************************************************
44
5  Parker Brothers Wildfire, by Bob and Holly Doyle (prototype), and Garry Kitchen
5  Parker Brothers Wildfire
66  * AMI S2150, labeled C10641
77
8  x
98
10
11  TODO:
12  - no sound
13  - flipper buttons aren't working correctly
14  - some 7segs digits are wrong (mcu on-die decoder is customizable?)
15  - MCU clock is unknown
16
179***************************************************************************/
1810
1911#include "emu.h"
2012#include "cpu/amis2000/amis2000.h"
2113#include "sound/speaker.h"
2214
23#include "wildfire.lh" // this is a test layout, external artwork is necessary
15#include "wildfire.lh"
2416
2517// master clock is a single stage RC oscillator: R=?K, C=?pf,
2618// S2150 default frequency is 850kHz
27#define MASTER_CLOCK (850000)
19#define MASTER_CLOCK (850000/4)
2820
2921
3022class wildfire_state : public driver_device
r243483r243484
5244
5345   TIMER_DEVICE_CALLBACK_MEMBER(leds_decay_tick);
5446   void leds_update();
55   bool index_is_7segled(int index);
47   bool index_is_7segled(int i);
5648
5749   virtual void machine_start();
5850};
r243483r243484
7163// decay time, in steps of 10ms
7264#define LEDS_DECAY_TIME 4
7365
74inline bool wildfire_state::index_is_7segled(int index)
66bool wildfire_state::index_is_7segled(int i)
7567{
7668   // first 3 A are 7segleds
77   return (index < 3);
69   return (i < 3);
7870}
7971
8072void wildfire_state::leds_update()
r243483r243484
8577   {
8678      // update current state
8779      m_leds_state[i] = (~m_a >> i & 1) ? m_d : 0;
80      if (index_is_7segled(i))
81         m_leds_state[i] = BITSWAP8(m_leds_state[i],7,0,1,2,3,4,5,6);
8882
8983      active_state[i] = 0;
9084
r243483r243484
107101      if (m_leds_cache[i] != active_state[i])
108102      {
109103         if (index_is_7segled(i))
110            output_set_digit_value(i, BITSWAP8(active_state[i],7,0,1,2,3,4,5,6) & 0x7f);
104            output_set_digit_value(i, active_state[i] & 0x7f);
111105
112106         for (int j = 0; j < 8; j++)
113107            output_set_lamp_value(i*10 + j, active_state[i] >> j & 1);
r243483r243484
232226ROM_END
233227
234228
235CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
229CONS( 1979, wildfire, 0, 0, wildfire, wildfire, driver_device, 0, "Parker Brothers", "Wildfire (prototype)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
trunk/src/mess/includes/alesis.h
r243483r243484
7676   void update_lcd_symbols(bitmap_ind16 &bitmap, UINT8 pos, UINT8 y, UINT8 x, int state);
7777   DECLARE_DRIVER_INIT(hr16);
7878   DECLARE_WRITE8_MEMBER( led_w );
79   DECLARE_WRITE8_MEMBER( mmt8_led_w );
80   DECLARE_READ8_MEMBER( mmt8_led_r );
81   DECLARE_WRITE8_MEMBER( track_led_w );
8279   DECLARE_WRITE8_MEMBER( kb_matrix_w );
8380   DECLARE_READ8_MEMBER( kb_r );
8481   DECLARE_READ8_MEMBER( p3_r );
8582   DECLARE_WRITE8_MEMBER( p3_w );
86   DECLARE_READ8_MEMBER( mmt8_p3_r );
87   DECLARE_WRITE8_MEMBER( mmt8_p3_w );
8883   DECLARE_WRITE8_MEMBER( sr16_lcd_w );
8984
9085private:
9186   UINT8       m_kb_matrix;
92   UINT8       m_leds;
9387   UINT8       m_lcd_digits[5];
9488   required_device<cpu_device> m_maincpu;
9589};
trunk/src/mess/includes/kaypro.h
r243483r243484
9696   required_device<centronics_device> m_centronics;
9797   required_device<fd1793_t> m_fdc;
9898   required_device<floppy_connector> m_floppy0;
99   optional_device<floppy_connector> m_floppy1;
99   required_device<floppy_connector> m_floppy1;
100100   optional_device<mc6845_device> m_crtc;
101101   required_device<beep_device> m_beep;
102102};
trunk/src/mess/includes/mbee.h
r243483r243484
5252      , m_pak(*this, "pak")
5353      , m_telcom(*this, "telcom")
5454      , m_basic(*this, "basic")
55      , m_bankl(*this, "bankl")
56      , m_bankh(*this, "bankh")
57      , m_bank1(*this, "bank1")
58      , m_bank8l(*this, "bank8l")
59      , m_bank8h(*this, "bank8h")
60      , m_bank9(*this, "bank9")
61      , m_bankfl(*this, "bankfl")
62      , m_bankfh(*this, "bankfh")
5563      , m_io_x0(*this, "X0")
5664      , m_io_x1(*this, "X1")
5765      , m_io_x2(*this, "X2")
r243483r243484
7280      , m_screen(*this, "screen")
7381   { }
7482
75   DECLARE_WRITE8_MEMBER(mbee_04_w);
76   DECLARE_WRITE8_MEMBER(mbee_06_w);
77   DECLARE_READ8_MEMBER(mbee_07_r);
78   DECLARE_READ8_MEMBER(mbeeic_0a_r);
79   DECLARE_WRITE8_MEMBER(mbeeic_0a_w);
80   DECLARE_READ8_MEMBER(mbeepc_telcom_low_r);
81   DECLARE_READ8_MEMBER(mbeepc_telcom_high_r);
82   DECLARE_READ8_MEMBER(mbee256_speed_low_r);
83   DECLARE_READ8_MEMBER(mbee256_speed_high_r);
84   DECLARE_READ8_MEMBER(mbee256_18_r);
85   DECLARE_WRITE8_MEMBER(mbee64_50_w);
86   DECLARE_WRITE8_MEMBER(mbee128_50_w);
87   DECLARE_WRITE8_MEMBER(mbee256_50_w);
88   DECLARE_READ8_MEMBER(m6545_status_r);
89   DECLARE_WRITE8_MEMBER(m6545_index_w);
90   DECLARE_READ8_MEMBER(m6545_data_r);
91   DECLARE_WRITE8_MEMBER(m6545_data_w);
92   DECLARE_READ8_MEMBER(mbee_low_r);
93   DECLARE_READ8_MEMBER(mbee_high_r);
94   DECLARE_READ8_MEMBER(mbeeic_high_r);
95   DECLARE_WRITE8_MEMBER(mbeeic_high_w);
96   DECLARE_WRITE8_MEMBER(mbee_low_w);
97   DECLARE_WRITE8_MEMBER(mbee_high_w);
98   DECLARE_READ8_MEMBER(mbeeic_08_r);
99   DECLARE_WRITE8_MEMBER(mbeeic_08_w);
100   DECLARE_READ8_MEMBER(mbee_0b_r);
101   DECLARE_WRITE8_MEMBER(mbee_0b_w);
102   DECLARE_READ8_MEMBER(mbeeppc_1c_r);
103   DECLARE_WRITE8_MEMBER(mbeeppc_1c_w);
104   DECLARE_WRITE8_MEMBER(mbee256_1c_w);
105   DECLARE_READ8_MEMBER(mbeeppc_low_r);
106   DECLARE_READ8_MEMBER(mbeeppc_high_r);
107   DECLARE_WRITE8_MEMBER(mbeeppc_high_w);
108   DECLARE_WRITE8_MEMBER(mbeeppc_low_w);
109   DECLARE_WRITE8_MEMBER(pio_port_a_w);
110   DECLARE_WRITE8_MEMBER(pio_port_b_w);
111   DECLARE_READ8_MEMBER(pio_port_b_r);
112   DECLARE_WRITE_LINE_MEMBER(pio_ardy);
113   DECLARE_WRITE_LINE_MEMBER(crtc_vs);
83   DECLARE_WRITE8_MEMBER( mbee_04_w );
84   DECLARE_WRITE8_MEMBER( mbee_06_w );
85   DECLARE_READ8_MEMBER( mbee_07_r );
86   DECLARE_READ8_MEMBER( mbeeic_0a_r );
87   DECLARE_WRITE8_MEMBER( mbeeic_0a_w );
88   DECLARE_READ8_MEMBER( mbeepc_telcom_low_r );
89   DECLARE_READ8_MEMBER( mbeepc_telcom_high_r );
90   DECLARE_READ8_MEMBER( mbee256_speed_low_r );
91   DECLARE_READ8_MEMBER( mbee256_speed_high_r );
92   DECLARE_READ8_MEMBER( mbee256_18_r );
93   DECLARE_WRITE8_MEMBER( mbee64_50_w );
94   DECLARE_WRITE8_MEMBER( mbee128_50_w );
95   DECLARE_WRITE8_MEMBER( mbee256_50_w );
96   DECLARE_READ8_MEMBER( m6545_status_r );
97   DECLARE_WRITE8_MEMBER( m6545_index_w );
98   DECLARE_READ8_MEMBER( m6545_data_r );
99   DECLARE_WRITE8_MEMBER( m6545_data_w );
100   DECLARE_READ8_MEMBER( mbee_low_r );
101   DECLARE_READ8_MEMBER( mbee_high_r );
102   DECLARE_READ8_MEMBER( mbeeic_high_r );
103   DECLARE_WRITE8_MEMBER( mbeeic_high_w );
104   DECLARE_WRITE8_MEMBER( mbee_low_w );
105   DECLARE_WRITE8_MEMBER( mbee_high_w );
106   DECLARE_READ8_MEMBER( mbeeic_08_r );
107   DECLARE_WRITE8_MEMBER( mbeeic_08_w );
108   DECLARE_READ8_MEMBER( mbee_0b_r );
109   DECLARE_WRITE8_MEMBER( mbee_0b_w );
110   DECLARE_READ8_MEMBER( mbeeppc_1c_r );
111   DECLARE_WRITE8_MEMBER( mbeeppc_1c_w );
112   DECLARE_WRITE8_MEMBER( mbee256_1c_w );
113   DECLARE_READ8_MEMBER( mbeeppc_low_r );
114   DECLARE_READ8_MEMBER( mbeeppc_high_r );
115   DECLARE_WRITE8_MEMBER( mbeeppc_high_w );
116   DECLARE_WRITE8_MEMBER( mbeeppc_low_w );
117   DECLARE_WRITE8_MEMBER( pio_port_a_w );
118   DECLARE_WRITE8_MEMBER( pio_port_b_w );
119   DECLARE_READ8_MEMBER( pio_port_b_r );
120   DECLARE_WRITE_LINE_MEMBER( pio_ardy );
114121   DECLARE_READ8_MEMBER(mbee_fdc_status_r);
115122   DECLARE_WRITE8_MEMBER(mbee_fdc_motor_w);
116123   DECLARE_DRIVER_INIT(mbeepc85);
r243483r243484
122129   DECLARE_DRIVER_INIT(mbeepc);
123130   DECLARE_DRIVER_INIT(mbeeic);
124131   DECLARE_DRIVER_INIT(mbee128);
132   DECLARE_DRIVER_INIT(mbee64);
125133   DECLARE_MACHINE_RESET(mbee);
126134   DECLARE_VIDEO_START(mbee);
127135   DECLARE_VIDEO_START(mbeeic);
r243483r243484
130138   DECLARE_VIDEO_START(mbeeppc);
131139   DECLARE_PALETTE_INIT(mbeeppc);
132140   DECLARE_MACHINE_RESET(mbee56);
141   DECLARE_MACHINE_RESET(mbee64);
133142   DECLARE_MACHINE_RESET(mbee128);
134143   DECLARE_MACHINE_RESET(mbee256);
135144   DECLARE_MACHINE_RESET(mbeett);
r243483r243484
138147   TIMER_CALLBACK_MEMBER(mbee256_kbd);
139148   TIMER_CALLBACK_MEMBER(mbee_rtc_irq);
140149   TIMER_CALLBACK_MEMBER(mbee_reset);
141   DECLARE_QUICKLOAD_LOAD_MEMBER(mbee);
142   DECLARE_QUICKLOAD_LOAD_MEMBER(mbee_z80bin);
150   DECLARE_QUICKLOAD_LOAD_MEMBER( mbee );
151   DECLARE_QUICKLOAD_LOAD_MEMBER( mbee_z80bin );
143152   WRITE_LINE_MEMBER(fdc_intrq_w);
144153   WRITE_LINE_MEMBER(fdc_drq_w);
145154   UINT8 *m_p_videoram;
r243483r243484
160169
161170   required_device<palette_device> m_palette;
162171private:
163   bool m_is_premium;
164172   size_t m_size;
165   bool m_b7_rtc;
166   bool m_b7_vs;
173   UINT8 m_clock_pulse;
167174   UINT8 m_mbee256_key_available;
168175   UINT8 m_mbee256_was_pressed[15];
169176   UINT8 m_mbee256_q[20];
170177   UINT8 m_mbee256_q_pos;
171178   UINT8 m_0a;
172179   UINT8 m_0b;
180   UINT8 m_is_premium;
173181   UINT8 m_sy6545_status;
174182   UINT8 m_sy6545_reg[32];
175183   UINT8 m_sy6545_ind;
176184   UINT8 m_fdc_rq;
177185   UINT8 m_bank_array[33];
178   void setup_banks(UINT8 data, bool first_time, UINT8 b_mask);
186   void mbee256_setup_banks(UINT8 data, bool first_time);
179187   void sy6545_cursor_configure();
180188   void keyboard_matrix_r(int offs);
181189   void machine_reset_common_disk();
r243483r243484
196204   optional_memory_bank m_pak;
197205   optional_memory_bank m_telcom;
198206   optional_memory_bank m_basic;
207   optional_memory_bank m_bankl;
208   optional_memory_bank m_bankh;
209   optional_memory_bank m_bank1;
210   optional_memory_bank m_bank8l;
211   optional_memory_bank m_bank8h;
212   optional_memory_bank m_bank9;
213   optional_memory_bank m_bankfl;
214   optional_memory_bank m_bankfh;
199215   required_ioport m_io_x0;
200216   required_ioport m_io_x1;
201217   required_ioport m_io_x2;
trunk/src/mess/layout/alnchase.lay
r243483r243484
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
7
8   <element name="green" defstate="0">
9      <disk state="0"><color red="0.0" green="0.1" blue="0.0" /></disk>
10      <disk state="1"><color red="0.2" green="1.0" blue="0.2" /></disk>
11   </element>
12   <element name="red" defstate="0">
13      <disk state="0"><color red="0.1" green="0.0" blue="0.0" /></disk>
14      <disk state="1"><color red="1.0" green="0.2" blue="0.2" /></disk>
15   </element>
16
17
18<!-- build screen -->
19
20   <view name="Test Layout">
21      <bounds left="0" right="100" top="0" bottom="100" />
22      <bezel element="static_black">
23         <bounds left="0" right="100" top="0" bottom="100" />
24      </bezel>
25
26   <!-- matrix -->
27
28      <bezel name="lamp0" element="green"><bounds x="0" y="0" width="1" height="1" /></bezel>
29
30
31   </view>
32</mamelayout>
trunk/src/mess/layout/bankshot.lay
r243483r243484
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element>
7   <element name="static_bg"><rect><color red="0.16" green="0.04" blue="0.05" /></rect></element>
8   <element name="disk_bg"><disk><color red="0.16" green="0.04" blue="0.05" /></disk></element>
9   <element name="static_white"><rect><color red="0.9" green="0.9" blue="0.9" /></rect></element>
10   <element name="disk_white"><disk><color red="0.9" green="0.9" blue="0.9" /></disk></element>
11
12   <element name="led" defstate="0">
13      <text string=""></text>
14      <disk state="0">
15         <color red="0.16" green="0.04" blue="0.05" />
16         <bounds x="0.05" y="0.05" width="0.9" height="0.9" />
17      </disk>
18      <disk state="1">
19         <color red="1.0" green="0.24" blue="0.27" />
20         <bounds x="0.05" y="0.05" width="0.9" height="0.9" />
21      </disk>
22   </element>
23
24
25
26<!-- build screen -->
27
28   <view name="Internal Layout">
29      <bounds left="0" right="17" top="0" bottom="11" />
30
31   <!-- note: background is dark-red to hide turned-off leds -->
32
33      <bezel element="static_white"><bounds left="0" right="17" top="0" bottom="11" /></bezel>
34      <bezel element="static_bg"><bounds left="1" right="16" top="1" bottom="10" /></bezel>
35
36   <!-- markings -->
37
38      <bezel element="static_black"><bounds x="3.4" y="0.2" width="0.2" height="0.6" /></bezel>
39      <bezel element="static_black"><bounds x="5.4" y="0.2" width="0.2" height="0.6" /></bezel>
40      <bezel element="static_black"><bounds x="11.4" y="0.2" width="0.2" height="0.6" /></bezel>
41      <bezel element="static_black"><bounds x="13.4" y="0.2" width="0.2" height="0.6" /></bezel>
42
43      <bezel element="static_black"><bounds x="3.4" y="10.2" width="0.2" height="0.6" /></bezel>
44      <bezel element="static_black"><bounds x="5.4" y="10.2" width="0.2" height="0.6" /></bezel>
45      <bezel element="static_black"><bounds x="11.4" y="10.2" width="0.2" height="0.6" /></bezel>
46      <bezel element="static_black"><bounds x="13.4" y="10.2" width="0.2" height="0.6" /></bezel>
47
48      <bezel element="static_black"><bounds x="0.2" y="3.4" width="0.6" height="0.2" /></bezel>
49      <bezel element="static_black"><bounds x="0.2" y="5.4" width="0.6" height="0.2" /></bezel>
50      <bezel element="static_black"><bounds x="0.2" y="7.4" width="0.6" height="0.2" /></bezel>
51
52      <bezel element="static_black"><bounds x="16.2" y="3.4" width="0.6" height="0.2" /></bezel>
53      <bezel element="static_black"><bounds x="16.2" y="5.4" width="0.6" height="0.2" /></bezel>
54      <bezel element="static_black"><bounds x="16.2" y="7.4" width="0.6" height="0.2" /></bezel>
55
56
57   <!-- top hole -->
58
59      <bezel element="disk_bg"><bounds x="7.9" y="-0.1" width="1.2" height="1.2" /></bezel>
60      <bezel element="static_bg"><bounds x="7.9" y="0.5" width="1.2" height="1" /></bezel>
61
62      <bezel element="static_bg"><bounds x="7.3" y="0.4" width="0.7" height="0.7" /></bezel>
63      <bezel element="disk_white"><bounds x="6.7" y="-0.2" width="1.2" height="1.2" /></bezel>
64      <bezel element="static_bg"><bounds x="9.0" y="0.4" width="0.7" height="0.7" /></bezel>
65      <bezel element="disk_white"><bounds x="9.1" y="-0.2" width="1.2" height="1.2" /></bezel>
66
67   <!-- bottom hole -->
68
69      <bezel element="disk_bg"><bounds x="7.9" y="9.9" width="1.2" height="1.2" /></bezel>
70      <bezel element="static_bg"><bounds x="7.9" y="9.6" width="1.2" height="1" /></bezel>
71
72      <bezel element="static_bg"><bounds x="7.3" y="9.9" width="0.7" height="0.7" /></bezel>
73      <bezel element="disk_white"><bounds x="6.7" y="10" width="1.2" height="1.2" /></bezel>
74      <bezel element="static_bg"><bounds x="9.0" y="9.9" width="0.7" height="0.7" /></bezel>
75      <bezel element="disk_white"><bounds x="9.1" y="10" width="1.2" height="1.2" /></bezel>
76
77   <!-- top-left hole -->
78
79      <bezel element="disk_bg"><bounds x="0.10" y="0.10" width="1.2" height="1.2" /></bezel>
80      <bezel element="disk_bg"><bounds x="0.15" y="0.15" width="1.2" height="1.2" /></bezel>
81      <bezel element="disk_bg"><bounds x="0.20" y="0.20" width="1.2" height="1.2" /></bezel>
82      <bezel element="disk_bg"><bounds x="0.25" y="0.25" width="1.2" height="1.2" /></bezel>
83      <bezel element="disk_bg"><bounds x="0.30" y="0.30" width="1.2" height="1.2" /></bezel>
84      <bezel element="disk_bg"><bounds x="0.35" y="0.35" width="1.2" height="1.2" /></bezel>
85      <bezel element="disk_bg"><bounds x="0.40" y="0.40" width="1.2" height="1.2" /></bezel>
86      <bezel element="disk_bg"><bounds x="0.45" y="0.45" width="1.2" height="1.2" /></bezel>
87      <bezel element="disk_bg"><bounds x="0.50" y="0.50" width="1.2" height="1.2" /></bezel>
88      <bezel element="disk_bg"><bounds x="0.55" y="0.55" width="1.2" height="1.2" /></bezel>
89      <bezel element="disk_bg"><bounds x="0.60" y="0.60" width="1.2" height="1.2" /></bezel>
90      <bezel element="disk_bg"><bounds x="0.65" y="0.65" width="1.2" height="1.2" /></bezel>
91      <bezel element="disk_bg"><bounds x="0.70" y="0.70" width="1.2" height="1.2" /></bezel>
92      <bezel element="disk_bg"><bounds x="0.75" y="0.75" width="1.2" height="1.2" /></bezel>
93      <bezel element="disk_bg"><bounds x="0.80" y="0.80" width="1.2" height="1.2" /></bezel>
94      <bezel element="disk_bg"><bounds x="0.85" y="0.85" width="1.2" height="1.2" /></bezel>
95      <bezel element="disk_bg"><bounds x="0.90" y="0.90" width="1.2" height="1.2" /></bezel>
96      <bezel element="disk_bg"><bounds x="0.95" y="0.95" width="1.2" height="1.2" /></bezel>
97      <bezel element="disk_bg"><bounds x="1.00" y="1.00" width="1.2" height="1.2" /></bezel>
98
99   <!-- bottom-left hole -->
100
101      <bezel element="disk_bg"><bounds x="0.10" y="9.70" width="1.2" height="1.2" /></bezel>
102      <bezel element="disk_bg"><bounds x="0.15" y="9.65" width="1.2" height="1.2" /></bezel>
103      <bezel element="disk_bg"><bounds x="0.20" y="9.60" width="1.2" height="1.2" /></bezel>
104      <bezel element="disk_bg"><bounds x="0.25" y="9.55" width="1.2" height="1.2" /></bezel>
105      <bezel element="disk_bg"><bounds x="0.30" y="9.50" width="1.2" height="1.2" /></bezel>
106      <bezel element="disk_bg"><bounds x="0.35" y="9.45" width="1.2" height="1.2" /></bezel>
107      <bezel element="disk_bg"><bounds x="0.40" y="9.40" width="1.2" height="1.2" /></bezel>
108      <bezel element="disk_bg"><bounds x="0.45" y="9.35" width="1.2" height="1.2" /></bezel>
109      <bezel element="disk_bg"><bounds x="0.50" y="9.30" width="1.2" height="1.2" /></bezel>
110      <bezel element="disk_bg"><bounds x="0.55" y="9.25" width="1.2" height="1.2" /></bezel>
111      <bezel element="disk_bg"><bounds x="0.60" y="9.20" width="1.2" height="1.2" /></bezel>
112      <bezel element="disk_bg"><bounds x="0.65" y="9.15" width="1.2" height="1.2" /></bezel>
113      <bezel element="disk_bg"><bounds x="0.70" y="9.10" width="1.2" height="1.2" /></bezel>
114      <bezel element="disk_bg"><bounds x="0.75" y="9.05" width="1.2" height="1.2" /></bezel>
115      <bezel element="disk_bg"><bounds x="0.80" y="9.00" width="1.2" height="1.2" /></bezel>
116      <bezel element="disk_bg"><bounds x="0.85" y="8.95" width="1.2" height="1.2" /></bezel>
117      <bezel element="disk_bg"><bounds x="0.90" y="8.90" width="1.2" height="1.2" /></bezel>
118      <bezel element="disk_bg"><bounds x="0.95" y="8.85" width="1.2" height="1.2" /></bezel>
119      <bezel element="disk_bg"><bounds x="1.00" y="8.80" width="1.2" height="1.2" /></bezel>
120
121   <!-- top-right hole -->
122
123      <bezel element="disk_bg"><bounds x="15.70" y="0.10" width="1.2" height="1.2" /></bezel>
124      <bezel element="disk_bg"><bounds x="15.65" y="0.15" width="1.2" height="1.2" /></bezel>
125      <bezel element="disk_bg"><bounds x="15.60" y="0.20" width="1.2" height="1.2" /></bezel>
126      <bezel element="disk_bg"><bounds x="15.55" y="0.25" width="1.2" height="1.2" /></bezel>
127      <bezel element="disk_bg"><bounds x="15.50" y="0.30" width="1.2" height="1.2" /></bezel>
128      <bezel element="disk_bg"><bounds x="15.45" y="0.35" width="1.2" height="1.2" /></bezel>
129      <bezel element="disk_bg"><bounds x="15.40" y="0.40" width="1.2" height="1.2" /></bezel>
130      <bezel element="disk_bg"><bounds x="15.35" y="0.45" width="1.2" height="1.2" /></bezel>
131      <bezel element="disk_bg"><bounds x="15.30" y="0.50" width="1.2" height="1.2" /></bezel>
132      <bezel element="disk_bg"><bounds x="15.25" y="0.55" width="1.2" height="1.2" /></bezel>
133      <bezel element="disk_bg"><bounds x="15.20" y="0.60" width="1.2" height="1.2" /></bezel>
134      <bezel element="disk_bg"><bounds x="15.15" y="0.65" width="1.2" height="1.2" /></bezel>
135      <bezel element="disk_bg"><bounds x="15.10" y="0.70" width="1.2" height="1.2" /></bezel>
136      <bezel element="disk_bg"><bounds x="15.05" y="0.75" width="1.2" height="1.2" /></bezel>
137      <bezel element="disk_bg"><bounds x="15.00" y="0.80" width="1.2" height="1.2" /></bezel>
138      <bezel element="disk_bg"><bounds x="14.95" y="0.85" width="1.2" height="1.2" /></bezel>
139      <bezel element="disk_bg"><bounds x="14.90" y="0.90" width="1.2" height="1.2" /></bezel>
140      <bezel element="disk_bg"><bounds x="14.85" y="0.95" width="1.2" height="1.2" /></bezel>
141      <bezel element="disk_bg"><bounds x="14.80" y="1.00" width="1.2" height="1.2" /></bezel>
142
143   <!-- bottom-right hole -->
144
145      <bezel element="disk_bg"><bounds x="15.70" y="9.70" width="1.2" height="1.2" /></bezel>
146      <bezel element="disk_bg"><bounds x="15.65" y="9.65" width="1.2" height="1.2" /></bezel>
147      <bezel element="disk_bg"><bounds x="15.60" y="9.60" width="1.2" height="1.2" /></bezel>
148      <bezel element="disk_bg"><bounds x="15.55" y="9.55" width="1.2" height="1.2" /></bezel>
149      <bezel element="disk_bg"><bounds x="15.50" y="9.50" width="1.2" height="1.2" /></bezel>
150      <bezel element="disk_bg"><bounds x="15.45" y="9.45" width="1.2" height="1.2" /></bezel>
151      <bezel element="disk_bg"><bounds x="15.40" y="9.40" width="1.2" height="1.2" /></bezel>
152      <bezel element="disk_bg"><bounds x="15.35" y="9.35" width="1.2" height="1.2" /></bezel>
153      <bezel element="disk_bg"><bounds x="15.30" y="9.30" width="1.2" height="1.2" /></bezel>
154      <bezel element="disk_bg"><bounds x="15.25" y="9.25" width="1.2" height="1.2" /></bezel>
155      <bezel element="disk_bg"><bounds x="15.20" y="9.20" width="1.2" height="1.2" /></bezel>
156      <bezel element="disk_bg"><bounds x="15.15" y="9.15" width="1.2" height="1.2" /></bezel>
157      <bezel element="disk_bg"><bounds x="15.10" y="9.10" width="1.2" height="1.2" /></bezel>
158      <bezel element="disk_bg"><bounds x="15.05" y="9.05" width="1.2" height="1.2" /></bezel>
159      <bezel element="disk_bg"><bounds x="15.00" y="9.00" width="1.2" height="1.2" /></bezel>
160      <bezel element="disk_bg"><bounds x="14.95" y="8.95" width="1.2" height="1.2" /></bezel>
161      <bezel element="disk_bg"><bounds x="14.90" y="8.90" width="1.2" height="1.2" /></bezel>
162      <bezel element="disk_bg"><bounds x="14.85" y="8.85" width="1.2" height="1.2" /></bezel>
163      <bezel element="disk_bg"><bounds x="14.80" y="8.80" width="1.2" height="1.2" /></bezel>
164
165
166   <!-- led matrix -->
167
168      <bezel name="lamp97" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel>
169
170      <bezel name="lamp107" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel>
171      <bezel name="lamp106" element="led"><bounds x="3" y="1" width="1" height="1" /></bezel>
172      <bezel name="lamp105" element="led"><bounds x="5" y="1" width="1" height="1" /></bezel>
173      <bezel name="lamp104" element="led"><bounds x="7" y="1" width="1" height="1" /></bezel>
174      <bezel name="lamp103" element="led"><bounds x="9" y="1" width="1" height="1" /></bezel>
175      <bezel name="lamp102" element="led"><bounds x="11" y="1" width="1" height="1" /></bezel>
176      <bezel name="lamp101" element="led"><bounds x="13" y="1" width="1" height="1" /></bezel>
177      <bezel name="lamp100" element="led"><bounds x="15" y="1" width="1" height="1" /></bezel>
178
179      <bezel name="lamp96" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel>
180      <bezel name="lamp95" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel>
181      <bezel name="lamp94" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel>
182      <bezel name="lamp93" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel>
183      <bezel name="lamp92" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel>
184      <bezel name="lamp91" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel>
185      <bezel name="lamp90" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel>
186
187      <bezel name="lamp87" element="led"><bounds x="1" y="3" width="1" height="1" /></bezel>
188      <bezel name="lamp86" element="led"><bounds x="3" y="3" width="1" height="1" /></bezel>
189      <bezel name="lamp85" element="led"><bounds x="5" y="3" width="1" height="1" /></bezel>
190      <bezel name="lamp84" element="led"><bounds x="7" y="3" width="1" height="1" /></bezel>
191      <bezel name="lamp83" element="led"><bounds x="9" y="3" width="1" height="1" /></bezel>
192      <bezel name="lamp82" element="led"><bounds x="11" y="3" width="1" height="1" /></bezel>
193      <bezel name="lamp81" element="led"><bounds x="13" y="3" width="1" height="1" /></bezel>
194      <bezel name="lamp80" element="led"><bounds x="15" y="3" width="1" height="1" /></bezel>
195
196      <bezel name="lamp76" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel>
197      <bezel name="lamp75" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel>
198      <bezel name="lamp74" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel>
199      <bezel name="lamp73" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel>
200      <bezel name="lamp72" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel>
201      <bezel name="lamp71" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel>
202      <bezel name="lamp70" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel>
203
204      <bezel name="lamp67" element="led"><bounds x="1" y="5" width="1" height="1" /></bezel>
205      <bezel name="lamp66" element="led"><bounds x="3" y="5" width="1" height="1" /></bezel>
206      <bezel name="lamp65" element="led"><bounds x="5" y="5" width="1" height="1" /></bezel>
207      <bezel name="lamp64" element="led"><bounds x="7" y="5" width="1" height="1" /></bezel>
208      <bezel name="lamp63" element="led"><bounds x="9" y="5" width="1" height="1" /></bezel>
209      <bezel name="lamp62" element="led"><bounds x="11" y="5" width="1" height="1" /></bezel>
210      <bezel name="lamp61" element="led"><bounds x="13" y="5" width="1" height="1" /></bezel>
211      <bezel name="lamp60" element="led"><bounds x="15" y="5" width="1" height="1" /></bezel>
212
213      <bezel name="lamp56" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel>
214      <bezel name="lamp55" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel>
215      <bezel name="lamp54" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel>
216      <bezel name="lamp53" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel>
217      <bezel name="lamp52" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel>
218      <bezel name="lamp51" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel>
219      <bezel name="lamp50" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel>
220
221      <bezel name="lamp47" element="led"><bounds x="1" y="7" width="1" height="1" /></bezel>
222      <bezel name="lamp46" element="led"><bounds x="3" y="7" width="1" height="1" /></bezel>
223      <bezel name="lamp45" element="led"><bounds x="5" y="7" width="1" height="1" /></bezel>
224      <bezel name="lamp44" element="led"><bounds x="7" y="7" width="1" height="1" /></bezel>
225      <bezel name="lamp43" element="led"><bounds x="9" y="7" width="1" height="1" /></bezel>
226      <bezel name="lamp42" element="led"><bounds x="11" y="7" width="1" height="1" /></bezel>
227      <bezel name="lamp41" element="led"><bounds x="13" y="7" width="1" height="1" /></bezel>
228      <bezel name="lamp40" element="led"><bounds x="15" y="7" width="1" height="1" /></bezel>
229
230      <bezel name="lamp36" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel>
231      <bezel name="lamp35" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel>
232      <bezel name="lamp34" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel>
233      <bezel name="lamp33" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel>
234      <bezel name="lamp32" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel>
235      <bezel name="lamp31" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel>
236      <bezel name="lamp30" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel>
237
238      <bezel name="lamp27" element="led"><bounds x="1" y="9" width="1" height="1" /></bezel>
239      <bezel name="lamp26" element="led"><bounds x="3" y="9" width="1" height="1" /></bezel>
240      <bezel name="lamp25" element="led"><bounds x="5" y="9" width="1" height="1" /></bezel>
241      <bezel name="lamp24" element="led"><bounds x="7" y="9" width="1" height="1" /></bezel>
242      <bezel name="lamp23" element="led"><bounds x="9" y="9" width="1" height="1" /></bezel>
243      <bezel name="lamp22" element="led"><bounds x="11" y="9" width="1" height="1" /></bezel>
244      <bezel name="lamp21" element="led"><bounds x="13" y="9" width="1" height="1" /></bezel>
245      <bezel name="lamp20" element="led"><bounds x="15" y="9" width="1" height="1" /></bezel>
246
247      <bezel name="lamp37" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel>
248
249
250   </view>
251</mamelayout>
trunk/src/mess/layout/edracula.lay
r243483r243484
1<?xml version="1.0"?>
2<mamelayout version="2">
3
4<!-- define elements -->
5
6   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
7
8   <element name="cyan" defstate="0">
9      <disk state="0"><color red="0.0" green="0.1" blue="0.1" /></disk>
10      <disk state="1"><color red="0.2" green="1.0" blue="1.0" /></disk>
11   </element>
12   <element name="green" defstate="0">
13      <disk state="0"><color red="0.0" green="0.1" blue="0.0" /></disk>
14      <disk state="1"><color red="0.2" green="1.0" blue="0.2" /></disk>
15   </element>
16   <element name="red" defstate="0">
17      <disk state="0"><color red="0.1" green="0.0" blue="0.0" /></disk>
18      <disk state="1"><color red="1.0" green="0.2" blue="0.2" /></disk>
19   </element>
20
21
22<!-- build screen -->
23
24   <view name="Test Layout">
25      <bounds left="0" right="100" top="0" bottom="100" />
26      <bezel element="static_black">
27         <bounds left="0" right="100" top="0" bottom="100" />
28      </bezel>
29
30   <!-- matrix -->
31
32      <bezel name="lamp0" element="green"><bounds x="0" y="0" width="1" height="1" /></bezel>
33
34
35   </view>
36</mamelayout>
trunk/src/mess/layout/tmtennis.lay
r243483r243484
55
66   <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
77
8   <element name="green" defstate="0">
9      <disk state="0"><color red="0.0" green="0.1" blue="0.0" /></disk>
10      <disk state="1"><color red="0.2" green="1.0" blue="0.2" /></disk>
11   </element>
128
13
149<!-- build screen -->
1510
16   <view name="Test Layout">
11   <view name="Internal Layout">
1712      <bounds left="0" right="100" top="0" bottom="100" />
1813      <bezel element="static_black">
1914         <bounds left="0" right="100" top="0" bottom="100" />
2015      </bezel>
2116
22   <!-- matrix -->
2317
24      <bezel name="lamp0" element="green"><bounds x="0" y="0" width="1" height="1" /></bezel>
25      <bezel name="lamp1" element="green"><bounds x="0" y="2" width="1" height="1" /></bezel>
26      <bezel name="lamp2" element="green"><bounds x="0" y="4" width="1" height="1" /></bezel>
27      <bezel name="lamp3" element="green"><bounds x="0" y="6" width="1" height="1" /></bezel>
28      <bezel name="lamp4" element="green"><bounds x="0" y="8" width="1" height="1" /></bezel>
29      <bezel name="lamp5" element="green"><bounds x="0" y="10" width="1" height="1" /></bezel>
30      <bezel name="lamp6" element="green"><bounds x="0" y="12" width="1" height="1" /></bezel>
31      <bezel name="lamp7" element="green"><bounds x="0" y="14" width="1" height="1" /></bezel>
32      <bezel name="lamp8" element="green"><bounds x="0" y="16" width="1" height="1" /></bezel>
33      <bezel name="lamp9" element="green"><bounds x="0" y="18" width="1" height="1" /></bezel>
34      <bezel name="lamp10" element="green"><bounds x="0" y="20" width="1" height="1" /></bezel>
35      <bezel name="lamp11" element="green"><bounds x="0" y="22" width="1" height="1" /></bezel>
36
37      <bezel name="lamp100" element="green"><bounds x="2" y="0" width="1" height="1" /></bezel>
38      <bezel name="lamp101" element="green"><bounds x="2" y="2" width="1" height="1" /></bezel>
39      <bezel name="lamp102" element="green"><bounds x="2" y="4" width="1" height="1" /></bezel>
40      <bezel name="lamp103" element="green"><bounds x="2" y="6" width="1" height="1" /></bezel>
41      <bezel name="lamp104" element="green"><bounds x="2" y="8" width="1" height="1" /></bezel>
42      <bezel name="lamp105" element="green"><bounds x="2" y="10" width="1" height="1" /></bezel>
43      <bezel name="lamp106" element="green"><bounds x="2" y="12" width="1" height="1" /></bezel>
44      <bezel name="lamp107" element="green"><bounds x="2" y="14" width="1" height="1" /></bezel>
45      <bezel name="lamp108" element="green"><bounds x="2" y="16" width="1" height="1" /></bezel>
46      <bezel name="lamp109" element="green"><bounds x="2" y="18" width="1" height="1" /></bezel>
47      <bezel name="lamp110" element="green"><bounds x="2" y="20" width="1" height="1" /></bezel>
48      <bezel name="lamp111" element="green"><bounds x="2" y="22" width="1" height="1" /></bezel>
49
50      <bezel name="lamp200" element="green"><bounds x="4" y="0" width="1" height="1" /></bezel>
51      <bezel name="lamp201" element="green"><bounds x="4" y="2" width="1" height="1" /></bezel>
52      <bezel name="lamp202" element="green"><bounds x="4" y="4" width="1" height="1" /></bezel>
53      <bezel name="lamp203" element="green"><bounds x="4" y="6" width="1" height="1" /></bezel>
54      <bezel name="lamp204" element="green"><bounds x="4" y="8" width="1" height="1" /></bezel>
55      <bezel name="lamp205" element="green"><bounds x="4" y="10" width="1" height="1" /></bezel>
56      <bezel name="lamp206" element="green"><bounds x="4" y="12" width="1" height="1" /></bezel>
57      <bezel name="lamp207" element="green"><bounds x="4" y="14" width="1" height="1" /></bezel>
58      <bezel name="lamp208" element="green"><bounds x="4" y="16" width="1" height="1" /></bezel>
59      <bezel name="lamp209" element="green"><bounds x="4" y="18" width="1" height="1" /></bezel>
60      <bezel name="lamp210" element="green"><bounds x="4" y="20" width="1" height="1" /></bezel>
61      <bezel name="lamp211" element="green"><bounds x="4" y="22" width="1" height="1" /></bezel>
62
63      <bezel name="lamp300" element="green"><bounds x="6" y="0" width="1" height="1" /></bezel>
64      <bezel name="lamp301" element="green"><bounds x="6" y="2" width="1" height="1" /></bezel>
65      <bezel name="lamp302" element="green"><bounds x="6" y="4" width="1" height="1" /></bezel>
66      <bezel name="lamp303" element="green"><bounds x="6" y="6" width="1" height="1" /></bezel>
67      <bezel name="lamp304" element="green"><bounds x="6" y="8" width="1" height="1" /></bezel>
68      <bezel name="lamp305" element="green"><bounds x="6" y="10" width="1" height="1" /></bezel>
69      <bezel name="lamp306" element="green"><bounds x="6" y="12" width="1" height="1" /></bezel>
70      <bezel name="lamp307" element="green"><bounds x="6" y="14" width="1" height="1" /></bezel>
71      <bezel name="lamp308" element="green"><bounds x="6" y="16" width="1" height="1" /></bezel>
72      <bezel name="lamp309" element="green"><bounds x="6" y="18" width="1" height="1" /></bezel>
73      <bezel name="lamp310" element="green"><bounds x="6" y="20" width="1" height="1" /></bezel>
74      <bezel name="lamp311" element="green"><bounds x="6" y="22" width="1" height="1" /></bezel>
75
76      <bezel name="lamp400" element="green"><bounds x="8" y="0" width="1" height="1" /></bezel>
77      <bezel name="lamp401" element="green"><bounds x="8" y="2" width="1" height="1" /></bezel>
78      <bezel name="lamp402" element="green"><bounds x="8" y="4" width="1" height="1" /></bezel>
79      <bezel name="lamp403" element="green"><bounds x="8" y="6" width="1" height="1" /></bezel>
80      <bezel name="lamp404" element="green"><bounds x="8" y="8" width="1" height="1" /></bezel>
81      <bezel name="lamp405" element="green"><bounds x="8" y="10" width="1" height="1" /></bezel>
82      <bezel name="lamp406" element="green"><bounds x="8" y="12" width="1" height="1" /></bezel>
83      <bezel name="lamp407" element="green"><bounds x="8" y="14" width="1" height="1" /></bezel>
84      <bezel name="lamp408" element="green"><bounds x="8" y="16" width="1" height="1" /></bezel>
85      <bezel name="lamp409" element="green"><bounds x="8" y="18" width="1" height="1" /></bezel>
86      <bezel name="lamp410" element="green"><bounds x="8" y="20" width="1" height="1" /></bezel>
87      <bezel name="lamp411" element="green"><bounds x="8" y="22" width="1" height="1" /></bezel>
88
89      <bezel name="lamp500" element="green"><bounds x="10" y="0" width="1" height="1" /></bezel>
90      <bezel name="lamp501" element="green"><bounds x="10" y="2" width="1" height="1" /></bezel>
91      <bezel name="lamp502" element="green"><bounds x="10" y="4" width="1" height="1" /></bezel>
92      <bezel name="lamp503" element="green"><bounds x="10" y="6" width="1" height="1" /></bezel>
93      <bezel name="lamp504" element="green"><bounds x="10" y="8" width="1" height="1" /></bezel>
94      <bezel name="lamp505" element="green"><bounds x="10" y="10" width="1" height="1" /></bezel>
95      <bezel name="lamp506" element="green"><bounds x="10" y="12" width="1" height="1" /></bezel>
96      <bezel name="lamp507" element="green"><bounds x="10" y="14" width="1" height="1" /></bezel>
97      <bezel name="lamp508" element="green"><bounds x="10" y="16" width="1" height="1" /></bezel>
98      <bezel name="lamp509" element="green"><bounds x="10" y="18" width="1" height="1" /></bezel>
99      <bezel name="lamp510" element="green"><bounds x="10" y="20" width="1" height="1" /></bezel>
100      <bezel name="lamp511" element="green"><bounds x="10" y="22" width="1" height="1" /></bezel>
101
102      <bezel name="lamp600" element="green"><bounds x="12" y="0" width="1" height="1" /></bezel>
103      <bezel name="lamp601" element="green"><bounds x="12" y="2" width="1" height="1" /></bezel>
104      <bezel name="lamp602" element="green"><bounds x="12" y="4" width="1" height="1" /></bezel>
105      <bezel name="lamp603" element="green"><bounds x="12" y="6" width="1" height="1" /></bezel>
106      <bezel name="lamp604" element="green"><bounds x="12" y="8" width="1" height="1" /></bezel>
107      <bezel name="lamp605" element="green"><bounds x="12" y="10" width="1" height="1" /></bezel>
108      <bezel name="lamp606" element="green"><bounds x="12" y="12" width="1" height="1" /></bezel>
109      <bezel name="lamp607" element="green"><bounds x="12" y="14" width="1" height="1" /></bezel>
110      <bezel name="lamp608" element="green"><bounds x="12" y="16" width="1" height="1" /></bezel>
111      <bezel name="lamp609" element="green"><bounds x="12" y="18" width="1" height="1" /></bezel>
112      <bezel name="lamp610" element="green"><bounds x="12" y="20" width="1" height="1" /></bezel>
113      <bezel name="lamp611" element="green"><bounds x="12" y="22" width="1" height="1" /></bezel>
114
115      <bezel name="lamp700" element="green"><bounds x="14" y="0" width="1" height="1" /></bezel>
116      <bezel name="lamp701" element="green"><bounds x="14" y="2" width="1" height="1" /></bezel>
117      <bezel name="lamp702" element="green"><bounds x="14" y="4" width="1" height="1" /></bezel>
118      <bezel name="lamp703" element="green"><bounds x="14" y="6" width="1" height="1" /></bezel>
119      <bezel name="lamp704" element="green"><bounds x="14" y="8" width="1" height="1" /></bezel>
120      <bezel name="lamp705" element="green"><bounds x="14" y="10" width="1" height="1" /></bezel>
121      <bezel name="lamp706" element="green"><bounds x="14" y="12" width="1" height="1" /></bezel>
122      <bezel name="lamp707" element="green"><bounds x="14" y="14" width="1" height="1" /></bezel>
123      <bezel name="lamp708" element="green"><bounds x="14" y="16" width="1" height="1" /></bezel>
124      <bezel name="lamp709" element="green"><bounds x="14" y="18" width="1" height="1" /></bezel>
125      <bezel name="lamp710" element="green"><bounds x="14" y="20" width="1" height="1" /></bezel>
126      <bezel name="lamp711" element="green"><bounds x="14" y="22" width="1" height="1" /></bezel>
127
128      <bezel name="lamp800" element="green"><bounds x="16" y="0" width="1" height="1" /></bezel>
129      <bezel name="lamp801" element="green"><bounds x="16" y="2" width="1" height="1" /></bezel>
130      <bezel name="lamp802" element="green"><bounds x="16" y="4" width="1" height="1" /></bezel>
131      <bezel name="lamp803" element="green"><bounds x="16" y="6" width="1" height="1" /></bezel>
132      <bezel name="lamp804" element="green"><bounds x="16" y="8" width="1" height="1" /></bezel>
133      <bezel name="lamp805" element="green"><bounds x="16" y="10" width="1" height="1" /></bezel>
134      <bezel name="lamp806" element="green"><bounds x="16" y="12" width="1" height="1" /></bezel>
135      <bezel name="lamp807" element="green"><bounds x="16" y="14" width="1" height="1" /></bezel>
136      <bezel name="lamp808" element="green"><bounds x="16" y="16" width="1" height="1" /></bezel>
137      <bezel name="lamp809" element="green"><bounds x="16" y="18" width="1" height="1" /></bezel>
138      <bezel name="lamp810" element="green"><bounds x="16" y="20" width="1" height="1" /></bezel>
139      <bezel name="lamp811" element="green"><bounds x="16" y="22" width="1" height="1" /></bezel>
140
141      <bezel name="lamp900" element="green"><bounds x="18" y="0" width="1" height="1" /></bezel>
142      <bezel name="lamp901" element="green"><bounds x="18" y="2" width="1" height="1" /></bezel>
143      <bezel name="lamp902" element="green"><bounds x="18" y="4" width="1" height="1" /></bezel>
144      <bezel name="lamp903" element="green"><bounds x="18" y="6" width="1" height="1" /></bezel>
145      <bezel name="lamp904" element="green"><bounds x="18" y="8" width="1" height="1" /></bezel>
146      <bezel name="lamp905" element="green"><bounds x="18" y="10" width="1" height="1" /></bezel>
147      <bezel name="lamp906" element="green"><bounds x="18" y="12" width="1" height="1" /></bezel>
148      <bezel name="lamp907" element="green"><bounds x="18" y="14" width="1" height="1" /></bezel>
149      <bezel name="lamp908" element="green"><bounds x="18" y="16" width="1" height="1" /></bezel>
150      <bezel name="lamp909" element="green"><bounds x="18" y="18" width="1" height="1" /></bezel>
151      <bezel name="lamp910" element="green"><bounds x="18" y="20" width="1" height="1" /></bezel>
152      <bezel name="lamp911" element="green"><bounds x="18" y="22" width="1" height="1" /></bezel>
153
154      <bezel name="lamp1000" element="green"><bounds x="20" y="0" width="1" height="1" /></bezel>
155      <bezel name="lamp1001" element="green"><bounds x="20" y="2" width="1" height="1" /></bezel>
156      <bezel name="lamp1002" element="green"><bounds x="20" y="4" width="1" height="1" /></bezel>
157      <bezel name="lamp1003" element="green"><bounds x="20" y="6" width="1" height="1" /></bezel>
158      <bezel name="lamp1004" element="green"><bounds x="20" y="8" width="1" height="1" /></bezel>
159      <bezel name="lamp1005" element="green"><bounds x="20" y="10" width="1" height="1" /></bezel>
160      <bezel name="lamp1006" element="green"><bounds x="20" y="12" width="1" height="1" /></bezel>
161      <bezel name="lamp1007" element="green"><bounds x="20" y="14" width="1" height="1" /></bezel>
162      <bezel name="lamp1008" element="green"><bounds x="20" y="16" width="1" height="1" /></bezel>
163      <bezel name="lamp1009" element="green"><bounds x="20" y="18" width="1" height="1" /></bezel>
164      <bezel name="lamp1010" element="green"><bounds x="20" y="20" width="1" height="1" /></bezel>
165      <bezel name="lamp1011" element="green"><bounds x="20" y="22" width="1" height="1" /></bezel>
166
167      <bezel name="lamp1100" element="green"><bounds x="22" y="0" width="1" height="1" /></bezel>
168      <bezel name="lamp1101" element="green"><bounds x="22" y="2" width="1" height="1" /></bezel>
169      <bezel name="lamp1102" element="green"><bounds x="22" y="4" width="1" height="1" /></bezel>
170      <bezel name="lamp1103" element="green"><bounds x="22" y="6" width="1" height="1" /></bezel>
171      <bezel name="lamp1104" element="green"><bounds x="22" y="8" width="1" height="1" /></bezel>
172      <bezel name="lamp1105" element="green"><bounds x="22" y="10" width="1" height="1" /></bezel>
173      <bezel name="lamp1106" element="green"><bounds x="22" y="12" width="1" height="1" /></bezel>
174      <bezel name="lamp1107" element="green"><bounds x="22" y="14" width="1" height="1" /></bezel>
175      <bezel name="lamp1108" element="green"><bounds x="22" y="16" width="1" height="1" /></bezel>
176      <bezel name="lamp1109" element="green"><bounds x="22" y="18" width="1" height="1" /></bezel>
177      <bezel name="lamp1110" element="green"><bounds x="22" y="20" width="1" height="1" /></bezel>
178      <bezel name="lamp1111" element="green"><bounds x="22" y="22" width="1" height="1" /></bezel>
179
180
18118   </view>
18219</mamelayout>
trunk/src/mess/layout/wildfire.lay
r243483r243484
1616
1717<!-- build screen -->
1818
19   <view name="Test Layout">
19   <view name="Internal Layout">
2020      <bounds left="0" right="100" top="0" bottom="100" />
2121      <bezel element="static_black">
2222         <bounds left="0" right="100" top="0" bottom="100" />
r243483r243484
2626      <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel>
2727      <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel>
2828
29      <bezel name="lamp0" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel>
30      <bezel name="lamp1" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel>
31      <bezel name="lamp2" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel>
32      <bezel name="lamp3" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel>
33      <bezel name="lamp4" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel>
34      <bezel name="lamp5" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel>
35      <bezel name="lamp6" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel>
36      <bezel name="lamp7" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel>
29      <bezel name="lamp30" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel>
30      <bezel name="lamp31" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel>
31      <bezel name="lamp32" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel>
32      <bezel name="lamp33" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel>
33      <bezel name="lamp34" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel>
34      <bezel name="lamp35" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel>
35      <bezel name="lamp36" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel>
36      <bezel name="lamp37" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel>
3737
38      <bezel name="lamp10" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel>
39      <bezel name="lamp11" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel>
40      <bezel name="lamp12" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel>
41      <bezel name="lamp13" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel>
42      <bezel name="lamp14" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel>
43      <bezel name="lamp15" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel>
44      <bezel name="lamp16" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel>
45      <bezel name="lamp17" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel>
38      <bezel name="lamp40" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel>
39      <bezel name="lamp41" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel>
40      <bezel name="lamp42" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel>
41      <bezel name="lamp43" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel>
42      <bezel name="lamp44" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel>
43      <bezel name="lamp45" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel>
44      <bezel name="lamp46" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel>
45      <bezel name="lamp47" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel>
4646
47      <bezel name="lamp20" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel>
48      <bezel name="lamp21" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel>
49      <bezel name="lamp22" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel>
50      <bezel name="lamp23" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel>
51      <bezel name="lamp24" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel>
52      <bezel name="lamp25" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel>
53      <bezel name="lamp26" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel>
54      <bezel name="lamp27" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel>
47      <bezel name="lamp50" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel>
48      <bezel name="lamp51" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel>
49      <bezel name="lamp52" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel>
50      <bezel name="lamp53" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel>
51      <bezel name="lamp54" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel>
52      <bezel name="lamp55" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel>
53      <bezel name="lamp56" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel>
54      <bezel name="lamp57" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel>
5555
56      <bezel name="lamp30" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel>
57      <bezel name="lamp31" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel>
58      <bezel name="lamp32" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel>
59      <bezel name="lamp33" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel>
60      <bezel name="lamp34" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel>
61      <bezel name="lamp35" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel>
62      <bezel name="lamp36" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel>
63      <bezel name="lamp37" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel>
56      <bezel name="lamp60" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel>
57      <bezel name="lamp61" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel>
58      <bezel name="lamp62" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel>
59      <bezel name="lamp63" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel>
60      <bezel name="lamp64" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel>
61      <bezel name="lamp65" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel>
62      <bezel name="lamp66" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel>
63      <bezel name="lamp67" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel>
6464
65      <bezel name="lamp40" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel>
66      <bezel name="lamp41" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel>
67      <bezel name="lamp42" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel>
68      <bezel name="lamp43" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel>
69      <bezel name="lamp44" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel>
70      <bezel name="lamp45" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel>
71      <bezel name="lamp46" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel>
72      <bezel name="lamp47" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel>
65      <bezel name="lamp70" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel>
66      <bezel name="lamp71" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel>
67      <bezel name="lamp72" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel>
68      <bezel name="lamp73" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel>
69      <bezel name="lamp74" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel>
70      <bezel name="lamp75" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel>
71      <bezel name="lamp76" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel>
72      <bezel name="lamp77" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel>
7373
74      <bezel name="lamp50" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel>
75      <bezel name="lamp51" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel>
76      <bezel name="lamp52" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel>
77      <bezel name="lamp53" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel>
78      <bezel name="lamp54" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel>
79      <bezel name="lamp55" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel>
80      <bezel name="lamp56" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel>
81      <bezel name="lamp57" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel>
74      <bezel name="lamp80" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel>
75      <bezel name="lamp81" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel>
76      <bezel name="lamp82" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel>
77      <bezel name="lamp83" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel>
78      <bezel name="lamp84" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel>
79      <bezel name="lamp85" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel>
80      <bezel name="lamp86" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel>
81      <bezel name="lamp87" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel>
8282
83      <bezel name="lamp60" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel>
84      <bezel name="lamp61" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel>
85      <bezel name="lamp62" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel>
86      <bezel name="lamp63" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel>
87      <bezel name="lamp64" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel>
88      <bezel name="lamp65" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel>
89      <bezel name="lamp66" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel>
90      <bezel name="lamp67" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel>
83      <bezel name="lamp90" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel>
84      <bezel name="lamp91" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel>
85      <bezel name="lamp92" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel>
86      <bezel name="lamp93" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel>
87      <bezel name="lamp94" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel>
88      <bezel name="lamp95" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel>
89      <bezel name="lamp96" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel>
90      <bezel name="lamp97" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel>
9191
92      <bezel name="lamp70" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel>
93      <bezel name="lamp71" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel>
94      <bezel name="lamp72" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel>
95      <bezel name="lamp73" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel>
96      <bezel name="lamp74" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel>
97      <bezel name="lamp75" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel>
98      <bezel name="lamp76" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel>
99      <bezel name="lamp77" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel>
92      <bezel name="lamp100" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel>
93      <bezel name="lamp101" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel>
94      <bezel name="lamp102" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel>
95      <bezel name="lamp103" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel>
96      <bezel name="lamp104" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel>
97      <bezel name="lamp105" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel>
98      <bezel name="lamp106" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel>
99      <bezel name="lamp107" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel>
100100
101      <bezel name="lamp80" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel>
102      <bezel name="lamp81" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel>
103      <bezel name="lamp82" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel>
104      <bezel name="lamp83" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel>
105      <bezel name="lamp84" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel>
106      <bezel name="lamp85" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel>
107      <bezel name="lamp86" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel>
108      <bezel name="lamp87" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel>
101      <bezel name="lamp110" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel>
102      <bezel name="lamp111" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel>
103      <bezel name="lamp112" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel>
104      <bezel name="lamp113" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel>
105      <bezel name="lamp114" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel>
106      <bezel name="lamp115" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel>
107      <bezel name="lamp116" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel>
108      <bezel name="lamp117" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel>
109109
110      <bezel name="lamp90" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel>
111      <bezel name="lamp91" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel>
112      <bezel name="lamp92" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel>
113      <bezel name="lamp93" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel>
114      <bezel name="lamp94" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel>
115      <bezel name="lamp95" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel>
116      <bezel name="lamp96" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel>
117      <bezel name="lamp97" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel>
110      <bezel name="lamp120" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel>
111      <bezel name="lamp121" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel>
112      <bezel name="lamp122" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel>
113      <bezel name="lamp123" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel>
114      <bezel name="lamp124" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel>
115      <bezel name="lamp125" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel>
116      <bezel name="lamp126" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel>
117      <bezel name="lamp127" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel>
118118
119      <bezel name="lamp100" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel>
120      <bezel name="lamp101" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel>
121      <bezel name="lamp102" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel>
122      <bezel name="lamp103" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel>
123      <bezel name="lamp104" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel>
124      <bezel name="lamp105" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel>
125      <bezel name="lamp106" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel>
126      <bezel name="lamp107" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel>
119      <bezel name="lamp7" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel>
120      <bezel name="lamp17" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel>
121      <bezel name="lamp27" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel>
127122
128      <bezel name="lamp110" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel>
129      <bezel name="lamp111" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel>
130      <bezel name="lamp112" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel>
131      <bezel name="lamp113" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel>
132      <bezel name="lamp114" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel>
133      <bezel name="lamp115" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel>
134      <bezel name="lamp116" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel>
135      <bezel name="lamp117" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel>
136
137      <bezel name="lamp120" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel>
138      <bezel name="lamp121" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel>
139      <bezel name="lamp122" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel>
140      <bezel name="lamp123" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel>
141      <bezel name="lamp124" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel>
142      <bezel name="lamp125" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel>
143      <bezel name="lamp126" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel>
144      <bezel name="lamp127" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel>
145
146123   </view>
147124</mamelayout>
trunk/src/mess/machine/kaypro.c
r243483r243484
110110   if (!BIT(data, 0))
111111      m_floppy = m_floppy0->get_device();
112112   else
113   if (m_floppy1 && (!BIT(data, 1)))
113   if (!BIT(data, 1))
114114      m_floppy = m_floppy1->get_device();
115115
116116   m_fdc->set_floppy(m_floppy);
trunk/src/mess/machine/mbee.c
r243483r243484
7272
7373   if (m_cassette->input() > 0.03) data |= 1;
7474
75   switch (m_io_config->read() & 0xc0)
76   {
77      case 0x00:
78         data |= (UINT8)m_b7_vs << 7;
79         break;
80      case 0x40:
81         data |= (UINT8)m_b7_rtc << 7;
82         break;
83      case 0x80:
84         data |= 0x80;
85         break;
86      case 0xc0:
87         data |= 0x80; // centronics busy line - FIXME
88         break;
89   }
90
75   data |= m_clock_pulse;
9176   data |= m_mbee256_key_available;
9277
78   m_clock_pulse = 0;
79
9380   return data;
9481};
9582
r243483r243484
267254   return m_rtc->read(space, 1);
268255}
269256
270// This doesn't seem to do anything; the time works without it.
271TIMER_CALLBACK_MEMBER( mbee_state::mbee_rtc_irq )
257TIMER_CALLBACK_MEMBER(mbee_state::mbee_rtc_irq)
272258{
273   UINT8 data = m_rtc->read(m_maincpu->space(AS_IO), 12);
274   m_b7_rtc = (data) ? 1 : 0;
275
276   if ((m_io_config->read() & 0xc0) == 0x40) // RTC selected in config menu
277      m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
278
279   timer_set(attotime::from_hz(10), TIMER_MBEE_RTC_IRQ);
259   UINT8 data = m_rtc->read(m_maincpu->space(AS_PROGRAM), 12);
260   if (data) m_clock_pulse = 0x80;
261   timer_set(attotime::from_hz(1), TIMER_MBEE_RTC_IRQ);
280262}
281263
282264
r243483r243484
290272    and (output = 22,21,20,19,18,17,16,15). The prom is also used to control
291273    the refresh required by the dynamic rams, however we ignore this function.
292274
293    b_mask = total dynamic ram (1=64k; 3=128k; 7=256k)
294
295275************************************************************/
296276
297void mbee_state::setup_banks(UINT8 data, bool first_time, UINT8 b_mask)
277void mbee_state::mbee256_setup_banks(UINT8 data, bool first_time)
298278{
299   data &= 0x3f; // (bits 0-5 are referred to as S0-S5)
279   // (bits 0-5 are referred to as S0-S5)
300280   address_space &mem = m_maincpu->space(AS_PROGRAM);
301   UINT8 *prom = memregion("pals")->base();
281   UINT8 *prom = memregion("proms")->base();
302282   UINT8 b_data = BITSWAP8(data, 7,5,3,2,4,6,1,0) & 0x3b; // arrange data bits to S0,S1,-,S4,S2,S3
303283   UINT8 b_bank, b_byte, b_byte_t, b_addr, p_bank = 1;
304284   UINT16 b_vid;
r243483r243484
329309            if (!BIT(b_byte, 4))
330310            {
331311               // select video
332               if (m_is_premium)
333               {
334                  mem.install_read_handler (b_vid, b_vid + 0x7ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this));
335                  mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this));
336               }
337               else
338               {
339                  mem.install_read_handler (b_vid, b_vid + 0x7ff, read8_delegate(FUNC(mbee_state::mbee_low_r), this));
340                  mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8_delegate(FUNC(mbee_state::mbeeic_high_r), this));
341               }
312               mem.install_read_handler (b_vid, b_vid + 0x7ff, read8_delegate(FUNC(mbee_state::mbeeppc_low_r), this));
313               mem.install_read_handler (b_vid + 0x800, b_vid + 0xfff, read8_delegate(FUNC(mbee_state::mbeeppc_high_r), this));
342314            }
343315            else
344316            {
r243483r243484
348320               if (!BIT(b_byte, 3))
349321                  membank(banktag)->set_entry(64 + (b_bank & 3)); // read from rom
350322               else
351                  membank(banktag)->set_entry((b_bank & 7) | ((b_byte & b_mask) << 3)); // ram
323                  membank(banktag)->set_entry((b_bank & 7) | ((b_byte & 7) << 3)); // ram
352324            }
353325         }
354326         p_bank++;
r243483r243484
369341            if (!BIT(b_byte, 4))
370342            {
371343               // select video
372               if (m_is_premium)
373               {
374                  mem.install_write_handler (b_vid, b_vid + 0x7ff, write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
375                  mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
376               }
377               else
378               {
379                  mem.install_write_handler (b_vid, b_vid + 0x7ff, write8_delegate(FUNC(mbee_state::mbee_low_w), this));
380                  mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8_delegate(FUNC(mbee_state::mbeeic_high_w), this));
381               }
344               mem.install_write_handler (b_vid, b_vid + 0x7ff, write8_delegate(FUNC(mbee_state::mbeeppc_low_w), this));
345               mem.install_write_handler (b_vid + 0x800, b_vid + 0xfff, write8_delegate(FUNC(mbee_state::mbeeppc_high_w), this));
382346            }
383347            else
384348            {
r243483r243484
388352               if (!BIT(b_byte, 3))
389353                  membank(banktag)->set_entry(64); // write to rom dummy area
390354               else
391                  membank(banktag)->set_entry((b_bank & 7) | ((b_byte & b_mask) << 3)); // ram
355                  membank(banktag)->set_entry((b_bank & 7) | ((b_byte & 7) << 3)); // ram
392356            }
393357         }
394358         p_bank++;
r243483r243484
398362
399363WRITE8_MEMBER( mbee_state::mbee256_50_w )
400364{
401   setup_banks(data, 0, 7);
365   mbee256_setup_banks(data & 0x3f, 0);
402366}
403367
404368/***********************************************************
r243483r243484
416380
417381WRITE8_MEMBER( mbee_state::mbee128_50_w )
418382{
419   setup_banks(data, 0, 3);
383   mbee256_setup_banks(data & 0x1f, 0); // S5 not used
420384}
421385
386
422387/***********************************************************
423388
389    64k Memory Banking
390
391    Bit 2 disables ROM, replacing it with RAM.
392
393    Due to lack of documentation, it is not possible to know
394    if other bits are used.
395
396************************************************************/
397
398WRITE8_MEMBER( mbee_state::mbee64_50_w )
399{
400   if BIT(data, 2)
401   {
402      m_boot->set_entry(0);
403      m_bankl->set_entry(0);
404      m_bankh->set_entry(0);
405   }
406   else
407   {
408      m_bankl->set_entry(1);
409      m_bankh->set_entry(1);
410   }
411}
412
413
414/***********************************************************
415
424416    ROM Banking on older models
425417
426418    Set A to 0 or 1 then read the port to switch between the
r243483r243484
497489   timer_set(attotime::from_usec(4), TIMER_MBEE_RESET);
498490}
499491
492MACHINE_RESET_MEMBER( mbee_state, mbee64 )
493{
494   machine_reset_common_disk();
495   m_boot->set_entry(1);
496   m_bankl->set_entry(1);
497   m_bankh->set_entry(1);
498}
499
500500MACHINE_RESET_MEMBER( mbee_state, mbee128 )
501501{
502502   machine_reset_common_disk();
503   setup_banks(0, 1, 3); // set banks to default
503   mbee256_setup_banks(0, 1); // set banks to default
504504   m_maincpu->set_pc(0x8000);
505505}
506506
r243483r243484
510510   for (i = 0; i < 15; i++) m_mbee256_was_pressed[i] = 0;
511511   m_mbee256_q_pos = 0;
512512   machine_reset_common_disk();
513   setup_banks(0, 1, 7); // set banks to default
513   mbee256_setup_banks(0, 1); // set banks to default
514514   m_maincpu->set_pc(0x8000);
515515}
516516
r243483r243484
540540
541541   /* once per frame, pulse the PIO B bit 7 - it is in the schematic as an option,
542542   but need to find out what it does */
543   m_b7_busy = 0x80;
543   m_clock_pulse = 0x80;
544544   irq0_line_hold(device);
545545
546546#endif
r243483r243484
625625   m_size = 0xe000;
626626}
627627
628DRIVER_INIT_MEMBER( mbee_state, mbee64 )
629{
630   UINT8 *RAM = memregion("maincpu")->base();
631   m_boot->configure_entry(0, &RAM[0x0000]);
632   m_bankl->configure_entry(0, &RAM[0x1000]);
633   m_bankl->configure_entry(1, &RAM[0x9000]);
634   m_bankh->configure_entry(0, &RAM[0x8000]);
635
636   RAM = memregion("bootrom")->base();
637   m_bankh->configure_entry(1, &RAM[0x0000]);
638   m_boot->configure_entry(1, &RAM[0x0000]);
639
640   m_size = 0xf000;
641}
642
628643DRIVER_INIT_MEMBER( mbee_state, mbee128 )
629644{
630645   UINT8 *RAM = memregion("rams")->base();
r243483r243484
641656      membank(banktag)->configure_entries(0, 32, &RAM[0x0000], 0x1000); // RAM banks
642657      membank(banktag)->configure_entries(64, 1, &ROM[0x4000], 0x1000); // dummy rom
643658   }
659
644660   m_size = 0x8000;
645661}
646662
r243483r243484
701717{
702718   address_space &space = m_maincpu->space(AS_PROGRAM);
703719   UINT16 i, j;
704   UINT8 data, sw = m_io_config->read() & 1;   /* reading the config switch: 1 = autorun */
720   UINT8 data, sw = ioport("CONFIG")->read() & 1;   /* reading the dipswitch: 1 = autorun */
705721
706722   if (!core_stricmp(image.filetype(), "mwb"))
707723   {
r243483r243484
802818   /* is this file executable? */
803819   if (execute_address != 0xffff)
804820   {
805      /* check to see if autorun is on */
806      autorun = m_io_config->read_safe(0xFF) & 1;
821      /* check to see if autorun is on (I hate how this works) */
822      autorun = ioport("CONFIG")->read_safe(0xFF) & 1;
807823
808824      address_space &space = m_maincpu->space(AS_PROGRAM);
809825
trunk/src/mess/mess.lst
r243483r243484
12161216mbeeppc // Microbee 32 PPC85
12171217mbeett  // Microbee Teleterm
12181218mbee56  // Microbee 56K (CP/M)
1219mbee128 // Microbee 128K standard (CP/M)
1220mbee128p // Microbee 128K premium (CP/M)
1219mbee64  // Microbee 64K (CP/M)
1220mbee128 // Microbee 128K (CP/M)
12211221mbee256 // Microbee 256TC (CP/M)
12221222
12231223// Tandy / Radio Shack
r243483r243484
22762276stopthie
22772277stopthiep
22782278splitsec
2279bankshot
22802279amico2k
22812280jtc
22822281jtces88
r243483r243484
23902389cgc7900
23912390hr16
23922391hr16b
2393mmt8
23942392sr16
23952393vidbrain
23962394cd2650
r243483r243484
26122610elecdet
26132611wildfire
26142612tmtennis
2615alnchase
2616edracula
trunk/src/mess/mess.mak
r243483r243484
940940   $(MAME_VIDEO)/vectrex.o     \
941941   $(MAME_DRIVERS)/cps1.o      \
942942   $(MAME_VIDEO)/cps1.o        \
943   $(MAME_VIDEO)/scn2674.o     \
944943
945944
946945#-------------------------------------------------
r243483r243484
12301229   $(MESS_DRIVERS)/advision.o $(MESS_MACHINE)/advision.o $(MESS_VIDEO)/advision.o \
12311230
12321231$(MESSOBJ)/epoch.a:             \
1233   $(MESS_DRIVERS)/edracula.o  \
12341232   $(MESS_DRIVERS)/gamepock.o $(MESS_MACHINE)/gamepock.o \
12351233   $(MESS_DRIVERS)/scv.o $(MESS_AUDIO)/upd1771.o \
12361234
r243483r243484
17901788   $(MESS_DRIVERS)/tiki100.o   \
17911789
17921790$(MESSOBJ)/tomy.a:              \
1793   $(MESS_DRIVERS)/alnchase.o  \
17941791   $(MESS_DRIVERS)/tmtennis.o  \
17951792   $(MESS_DRIVERS)/tutor.o     \
17961793
r243483r243484
20982095$(MESS_DRIVERS)/aim65.o:    $(MESS_LAYOUT)/aim65.lh
20992096$(MESS_DRIVERS)/aim65_40.o: $(MESS_LAYOUT)/aim65_40.lh
21002097$(MESS_DRIVERS)/alesis.o:   $(MESS_LAYOUT)/sr16.lh
2101$(MESS_DRIVERS)/alnchase.o: $(MESS_LAYOUT)/alnchase.lh
21022098$(MESS_DRIVERS)/amaztron.o: $(MESS_LAYOUT)/amaztron.lh
21032099$(MESS_DRIVERS)/amico2k.o:  $(MESS_LAYOUT)/amico2k.lh
21042100$(MESS_DRIVERS)/amiga.o:    $(MESS_LAYOUT)/amiga.lh
r243483r243484
21282124$(MESS_DRIVERS)/dmv.o:      $(MESS_LAYOUT)/dmv.lh
21292125$(MESS_DRIVERS)/dolphunk.o: $(MESS_LAYOUT)/dolphunk.lh
21302126$(MESS_DRIVERS)/eacc.o:     $(MESS_LAYOUT)/eacc.lh
2131$(MESS_DRIVERS)/edracula.o: $(MESS_LAYOUT)/edracula.lh
21322127$(MESS_DRIVERS)/elecdet.o:  $(MESS_LAYOUT)/elecdet.lh
21332128$(MESS_DRIVERS)/elekscmp.o: $(MESS_LAYOUT)/elekscmp.lh
21342129$(MESS_DRIVERS)/elf.o:      $(MESS_LAYOUT)/elf2.lh
r243483r243484
21912186$(MESS_DRIVERS)/sitcom.o:   $(MESS_LAYOUT)/sitcom.lh
21922187$(MESS_DRIVERS)/slc1.o:     $(MESS_LAYOUT)/slc1.lh
21932188$(MESS_DRIVERS)/sms.o:      $(MESS_LAYOUT)/sms1.lh
2194$(MESS_DRIVERS)/splitsec.o: $(MESS_LAYOUT)/bankshot.lh \
2195                     $(MESS_LAYOUT)/splitsec.lh
2189$(MESS_DRIVERS)/splitsec.o: $(MESS_LAYOUT)/splitsec.lh
21962190$(MESS_DRIVERS)/starwbc.o:  $(MESS_LAYOUT)/starwbc.lh
21972191$(MESS_DRIVERS)/stopthie.o: $(MESS_LAYOUT)/stopthie.lh
21982192$(MESS_DRIVERS)/super80.o:  $(MESS_LAYOUT)/super80.lh
trunk/src/mess/video/mbee.c
r243483r243484
2828
2929#include "includes/mbee.h"
3030
31WRITE_LINE_MEMBER( mbee_state::crtc_vs )
32{
33   m_b7_vs = state;
34   if ((m_io_config->read() & 0xc0) == 0) // VS selected in config menu
35      m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
36}
3731
3832/***********************************************************
3933
r243483r243484
320314      m_sy6545_status &= 0x80; // turn off lpen_strobe
321315      break;
322316   case 31:
323      // This firstly pushes the contents of the transparent registers onto the MA lines,
324      // then increments the address, then sets update strobe on.
317            /* This firstly pushes the contents of the transparent registers onto the MA lines,
318            then increments the address, then sets update strobe on. */
325319      addr = (m_sy6545_reg[18] << 8) | m_sy6545_reg[19];
326320      keyboard_matrix_r(addr);
327321      m_sy6545_reg[19]++;
r243483r243484
352346         memcpy(m_p_gfxram, memregion("gfx")->base() + (((data & 0x30) == 0x20) << 11), 0x800);
353347      break;
354348   case 31:
355      // This firstly pushes the contents of the transparent registers onto the MA lines,
356      // then increments the address, then sets update strobe on.
349            /* This firstly pushes the contents of the transparent registers onto the MA lines,
350            then increments the address, then sets update strobe on. */
357351      addr = (m_sy6545_reg[18] << 8) | m_sy6545_reg[19];
358352      keyboard_matrix_r(addr);
359353      m_sy6545_reg[19]++;
r243483r243484
375369
376370************************************************************/
377371
378VIDEO_START_MEMBER( mbee_state, mbee )
372VIDEO_START_MEMBER(mbee_state,mbee)
379373{
380374   m_p_videoram = memregion("videoram")->base();
381375   m_p_gfxram = memregion("gfx")->base()+0x1000;
382376   m_is_premium = 0;
383377}
384378
385VIDEO_START_MEMBER( mbee_state, mbeeic )
379VIDEO_START_MEMBER(mbee_state,mbeeic)
386380{
387381   m_p_videoram = memregion("videoram")->base();
388382   m_p_colorram = memregion("colorram")->base();
r243483r243484
390384   m_is_premium = 0;
391385}
392386
393VIDEO_START_MEMBER( mbee_state, mbeeppc )
387VIDEO_START_MEMBER(mbee_state,mbeeppc)
394388{
395389   m_p_videoram = memregion("videoram")->base();
396390   m_p_colorram = memregion("colorram")->base();
r243483r243484
552546
553547************************************************************/
554548
555PALETTE_INIT_MEMBER( mbee_state, mbeeic )
549PALETTE_INIT_MEMBER(mbee_state,mbeeic)
556550{
557551   const UINT8 *color_prom = memregion("proms")->base();
558552   UINT16 i;
r243483r243484
580574}
581575
582576
583PALETTE_INIT_MEMBER( mbee_state, mbeepc85b )
577PALETTE_INIT_MEMBER(mbee_state,mbeepc85b)
584578{
585579   const UINT8 *color_prom = memregion("proms")->base();
586580   UINT16 i;
r243483r243484
610604}
611605
612606
613PALETTE_INIT_MEMBER( mbee_state, mbeeppc )
607PALETTE_INIT_MEMBER(mbee_state,mbeeppc)
614608{
615609   UINT16 i;
616610   UINT8 r, b, g;
trunk/src/osd/sdl/draw13.c
r243483r243484
145145    sdl_info13(sdl_window_info *w)
146146    : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL),
147147      m_last_hofs(0), m_last_vofs(0),
148      m_last_width(0), m_last_height(0),
148      m_width(0), m_height(0),
149      m_blitwidth(0), m_blitheight(0),
149150      m_last_blit_time(0), m_last_blit_pixels(0)
150151    {}
151152
152153   /* virtual */ int create();
153154   /* virtual */ int draw(const UINT32 dc, const int update);
154155   /* virtual */ int xy_to_render_target(const int x, const int y, int *xt, int *yt);
155   /* virtual */ void destroy_all_textures();
156156   /* virtual */ void destroy();
157   /* virtual */ void clear();
157   /* virtual */ render_primitive_list *get_primitives()
158   {
159      int nw = 0; int nh = 0;
160      window().blit_surface_size(nw, nh);
161      if (nw != m_blitwidth || nh != m_blitheight)
162      {
163         m_blitwidth = nw; m_blitheight = nh;
164         notify_changed();
165      }
166      window().target()->set_bounds(m_blitwidth, m_blitheight, window().monitor()->aspect());
167      return &window().target()->get_primitives();
168   }
158169
170private:
159171    void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
160172
161173    texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
162174    texture_info *texture_update(const render_primitive &prim);
163175
176    void destroy_all_textures();
177
164178   INT32           m_blittimer;
165179
166180#if (SDLMAME_SDL2)
r243483r243484
176190   float           m_last_hofs;
177191   float           m_last_vofs;
178192
179   int            m_last_width;
180   int            m_last_height;
193   int            m_width;
194   int            m_height;
181195
196   int            m_blitwidth;
197   int            m_blitheight;
198
182199   // Stats
183200   INT64           m_last_blit_time;
184201   INT64           m_last_blit_pixels;
r243483r243484
490507}
491508
492509// FIXME: machine only used to access options.
493int drawsdl2_init(running_machine &machine, sdl_draw_info *callbacks)
510int drawsdl2_init(running_machine &machine, osd_draw_callbacks *callbacks)
494511{
495512   const char *stemp;
496513
r243483r243484
623640   destroy_all_textures();
624641}
625642
626//============================================================
627//  sdl_info::clear
628//============================================================
629643
630void sdl_info13::clear()
631{
632   m_blittimer = 2;
633}
634
635
636644//============================================================
637645//  drawsdl_xy_to_render_target
638646//============================================================
r243483r243484
642650
643651   *xt = x - m_last_hofs;
644652   *yt = y - m_last_vofs;
645   if (*xt<0 || *xt >= window().blitwidth())
653   if (*xt<0 || *xt >= m_blitwidth)
646654      return 0;
647   if (*yt<0 || *yt >= window().blitheight())
655   if (*yt<0 || *yt >= m_blitheight)
648656      return 0;
649657   return 1;
650658}
r243483r243484
681689      return 0;
682690   }
683691
684   if ((window().width() != m_last_width) || (window().height() != m_last_height))
692   int width = 0; int height = 0;
693   window().get_size(width,height);
694
695   if (has_flags(FI_CHANGED) || (width != m_width) || (height != m_height))
685696   {
686      m_last_width = window().width();
687      m_last_height = window().height();
697      destroy_all_textures();
698      m_width = width;
699      m_height = height;
688700      SDL_RenderSetViewport(m_sdl_renderer, NULL);
689701      m_blittimer = 3;
702      clear_flags(FI_CHANGED);
690703   }
704
691705   //SDL_SelectRenderer(window().sdl_window);
692706
693707   if (m_blittimer > 0)
r243483r243484
714728      }
715729      else
716730      {
717         ch = window().height();
718         cw = window().width();
731         ch = height;
732         cw = width;
719733      }
720734
721735      if (video_config.centerv)
722736      {
723         vofs = (ch - window().blitheight()) / 2.0f;
737         vofs = (ch - m_blitheight) / 2.0f;
724738      }
725739      if (video_config.centerh)
726740      {
727         hofs = (cw - window().blitwidth()) / 2.0f;
741         hofs = (cw - m_blitwidth) / 2.0f;
728742      }
729743   }
730744
trunk/src/osd/sdl/drawbgfx.c
r243483r243484
7575public:
7676    sdl_info_bgfx(sdl_window_info *w)
7777    : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL),
78      m_blitwidth(0), m_blitheight(0),
7879      m_last_hofs(0), m_last_vofs(0),
7980      m_last_blit_time(0), m_last_blit_pixels(0)
8081    {}
r243483r243484
8283   /* virtual */ int create();
8384   /* virtual */ int draw(const UINT32 dc, const int update);
8485   /* virtual */ int xy_to_render_target(const int x, const int y, int *xt, int *yt);
85   /* virtual */ void destroy_all_textures();
8686   /* virtual */ void destroy();
87   /* virtual */ void clear();
87   /* virtual */ render_primitive_list *get_primitives()
88   {
89      int nw = 0; int nh = 0;
90      window().blit_surface_size(nw, nh);
91      if (nw != m_blitwidth || nh != m_blitheight)
92      {
93         m_blitwidth = nw; m_blitheight = nh;
94         notify_changed();
95      }
96      window().target()->set_bounds(m_blitwidth, m_blitheight, window().monitor()->aspect());
97      return &window().target()->get_primitives();
98   }
8899
89100   // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
90101
r243483r243484
96107   SDL_Renderer *  m_renderer;
97108   //simple_list<texture_info>  m_texlist;                // list of active textures
98109
110   int            m_blitwidth;
111   int            m_blitheight;
99112   float           m_last_hofs;
100113   float           m_last_vofs;
101114
r243483r243484
121134}
122135
123136
124int drawbgfx_init(running_machine &machine, sdl_draw_info *callbacks)
137int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks)
125138{
126139   // fill in the callbacks
127140   callbacks->exit = drawbgfx_exit;
r243483r243484
138151{
139152   // create renderer
140153
154   int width = 0; int height = 0;
155
156   window().get_size(width, height);
141157   m_blittimer = 3;
142158
143159   bgfx::sdlSetWindow(window().sdl_window());
144160   bgfx::init();
145   bgfx::reset(window().width(), window().height(), BGFX_RESET_VSYNC);
161   bgfx::reset(width, height, BGFX_RESET_VSYNC);
146162   
147163   // Enable debug text.
148164   bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT);
r243483r243484
158174{
159175   *xt = x - m_last_hofs;
160176   *yt = y - m_last_vofs;
161   if (*xt<0 || *xt >= window().blitwidth())
177   if (*xt<0 || *xt >= m_blitwidth)
162178      return 0;
163   if (*yt<0 || *yt >= window().blitheight())
179   if (*yt<0 || *yt >= m_blitheight)
164180      return 0;
165181   return 1;
166182}
r243483r243484
171187
172188int sdl_info_bgfx::draw(UINT32 dc, int update)
173189{
190
191   //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height))
192      // do something
193   //clear_flags(FI_CHANGED);
194
174195   bgfx::setViewClear(0
175196      , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
176197      , 0x000000ff
r243483r243484
178199      , 0
179200      );
180201   // Set view 0 default viewport.
181   bgfx::setViewRect(0, 0, 0, window().blitwidth(), window().blitheight());
202   bgfx::setViewRect(0, 0, 0, m_blitwidth, m_blitheight);
182203
183204   // This dummy draw call is here to make sure that view 0 is cleared
184205   // if no other draw calls are submitted to view 0.
r243483r243484
209230{
210231   // free the memory in the window
211232
212   destroy_all_textures();
233   // destroy_all_textures();
213234
214235   // Shutdown bgfx.
215236   bgfx::shutdown();
216237}
217
218void sdl_info_bgfx::destroy_all_textures()
219{
220}
221
222//============================================================
223//  TEXCOPY FUNCS
224//============================================================
225
226void sdl_info_bgfx::clear()
227{
228   m_blittimer = 2;
229}
trunk/src/osd/sdl/drawogl.c
r243483r243484
224224   sdl_info_ogl(sdl_window_info *window)
225225   : osd_renderer(window, FLAG_NEEDS_OPENGL), m_blittimer(0),
226226      m_screen_width(0), m_screen_height(0),
227      m_last_width(0), m_last_height(0),
227      m_width(0), m_height(0),
228      m_blitwidth(0), m_blitheight(0),
228229#if (SDLMAME_SDL2)
229230      m_gl_context_id(0),
230231#else
r243483r243484
255256   /* virtual */ int create();
256257   /* virtual */ int draw(const UINT32 dc, const int update);
257258   /* virtual */ int xy_to_render_target(const int x, const int y, int *xt, int *yt);
258   /* virtual */ void destroy_all_textures();
259259   /* virtual */ void destroy();
260   /* virtual */ void clear();
260   /* virtual */ render_primitive_list *get_primitives()
261   {
262      int nw = 0; int nh = 0;
263      window().blit_surface_size(nw, nh);
264      if (nw != m_blitwidth || nh != m_blitheight)
265      {
266         m_blitwidth = nw; m_blitheight = nh;
267         notify_changed();
268      }
269      window().target()->set_bounds(m_blitwidth, m_blitheight, window().monitor()->aspect());
270      return &window().target()->get_primitives();
271   }
261272
273private:
274   void destroy_all_textures();
275
262276   void loadGLExtensions();
263277   void initialize_gl();
264278   void set_blendmode(int blendmode);
r243483r243484
280294   INT32           m_blittimer;
281295   int             m_screen_width;
282296   int             m_screen_height;
283   int            m_last_width;
284   int            m_last_height;
297   int            m_width;
298   int            m_height;
299   int            m_blitwidth;
300   int            m_blitheight;
285301
286302#if (SDLMAME_SDL2)
287303   SDL_GLContext   m_gl_context_id;
r243483r243484
451467   return global_alloc(sdl_info_ogl(window));
452468}
453469
454int drawogl_init(running_machine &machine, sdl_draw_info *callbacks)
470int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks)
455471{
456472   // fill in the callbacks
457473   callbacks->exit = drawogl_exit;
r243483r243484
774790
775791}
776792
777//============================================================
778//  sdl_info::clear
779//============================================================
780793
781void sdl_info_ogl::clear()
782{
783   //FIXME: Handled in sdl_info::draw as well
784   m_blittimer = 3;
785}
786
787794//============================================================
788795//  drawsdl_xy_to_render_target
789796//============================================================
r243483r243484
793800
794801   *xt = x - m_last_hofs;
795802   *yt = y - m_last_vofs;
796   if (*xt<0 || *xt >= window().blitwidth())
803   if (*xt<0 || *xt >= m_blitwidth)
797804      return 0;
798   if (*yt<0 || *yt >= window().blitheight())
805   if (*yt<0 || *yt >= m_blitheight)
799806      return 0;
800807   return 1;
801808}
r243483r243484
12051212   float vofs, hofs;
12061213   int  pendingPrimitive=GL_NO_PRIMITIVE, curPrimitive=GL_NO_PRIMITIVE, scrnum, is_vector;
12071214   const screen_device *screen;
1215   int width = 0; int height = 0;
12081216
12091217   if (video_config.novideo)
12101218   {
12111219      return 0;
12121220   }
12131221
1214   if ((window().width() != m_last_width) || (window().height() != m_last_height))
1222   window().get_size(width, height);
1223
1224   if (has_flags(FI_CHANGED) || (width != m_width) || (height != m_height))
12151225   {
1216      m_last_width = window().width();
1217      m_last_height = window().height();
1218#if (SDLMAME_SDL2)
1226      destroy_all_textures();
1227      m_width = width;
1228      m_height = height;
12191229      m_blittimer = 3;
1220#endif
12211230      m_init_context = 1;
1231      clear_flags(FI_CHANGED);
12221232   }
12231233
12241234#if (SDLMAME_SDL2)
r243483r243484
12841294      m_blittimer--;
12851295   }
12861296
1297   // FIXME: remove m_surf_w and m_surf_h
12871298   if ( !m_initialized ||
1288         window().width()!= m_surf_w || window().height()!= m_surf_h )
1299         m_width != m_surf_w || m_height != m_surf_h )
12891300   {
1301      // FIXME:: this can be done in create!
12901302      if ( !m_initialized )
12911303      {
12921304         loadGLExtensions();
12931305      }
12941306
1295      m_surf_w=window().width();
1296      m_surf_h=window().height();
1307      m_surf_w = m_width;
1308      m_surf_h = m_height;
12971309
12981310      // we're doing nothing 3d, so the Z-buffer is currently not interesting
12991311      glDisable(GL_DEPTH_TEST);
r243483r243484
13341346      //   |_________|
13351347      // (0,h)     (w,h)
13361348
1337      glViewport(0.0, 0.0, (GLsizei)window().width(), (GLsizei)window().height());
1349      glViewport(0.0, 0.0, (GLsizei) m_width, (GLsizei) m_height);
13381350      glMatrixMode(GL_PROJECTION);
13391351      glLoadIdentity();
1340      glOrtho(0.0, (GLdouble)window().width(), (GLdouble)window().height(), 0.0, 0.0, -1.0);
1352      glOrtho(0.0, (GLdouble) m_width, (GLdouble) m_height, 0.0, 0.0, -1.0);
13411353      glMatrixMode(GL_MODELVIEW);
13421354      glLoadIdentity();
13431355
r243483r243484
13641376      }
13651377      else
13661378      {
1367         ch = window().height();
1368         cw = window().width();
1379         ch = m_height;
1380         cw = m_width;
13691381      }
13701382
13711383      if (video_config.centerv)
13721384      {
1373         vofs = (ch - window().blitheight()) / 2.0f;
1385         vofs = (ch - m_blitheight) / 2.0f;
13741386      }
13751387      if (video_config.centerh)
13761388      {
1377         hofs = (cw - window().blitwidth()) / 2.0f;
1389         hofs = (cw - m_blitwidth) / 2.0f;
13781390      }
13791391   }
13801392
r243483r243484
15551567                     // 1:1 tex coord CCW (0/0) (1/0) (1/1) (0/1) on texture dimensions
15561568                     m_texVerticex[0]=(GLfloat)0.0;
15571569                     m_texVerticex[1]=(GLfloat)0.0;
1558                     m_texVerticex[2]=(GLfloat)window().width();
1570                     m_texVerticex[2]=(GLfloat)m_width;
15591571                     m_texVerticex[3]=(GLfloat)0.0;
1560                     m_texVerticex[4]=(GLfloat)window().width();
1561                     m_texVerticex[5]=(GLfloat)window().height();
1572                     m_texVerticex[4]=(GLfloat)m_width;
1573                     m_texVerticex[5]=(GLfloat)m_height;
15621574                     m_texVerticex[6]=(GLfloat)0.0;
1563                     m_texVerticex[7]=(GLfloat)window().height();
1575                     m_texVerticex[7]=(GLfloat)m_height;
15641576                  }
15651577
15661578                  if(i>0) // first fetch already done
r243483r243484
19441956{
19451957   int uniform_location;
19461958   int i;
1947   int surf_w_pow2  = get_valid_pow2_value (window().blitwidth(), texture->texpow2);
1948   int surf_h_pow2  = get_valid_pow2_value (window().blitheight(), texture->texpow2);
1959   int surf_w_pow2  = get_valid_pow2_value (m_blitwidth, texture->texpow2);
1960   int surf_h_pow2  = get_valid_pow2_value (m_blitheight, texture->texpow2);
19491961
19501962   assert ( texture->type==TEXTURE_TYPE_SHADER );
19511963
r243483r243484
19922004      pfn_glUniform2fvARB(uniform_location, 1, &(color_texture_pow2_sz[0]));
19932005      GL_CHECK_ERROR_NORMAL();
19942006
1995      GLfloat screen_texture_sz[2] = { (GLfloat)window().blitwidth(), (GLfloat)window().blitheight() };
2007      GLfloat screen_texture_sz[2] = { (GLfloat) m_blitwidth, (GLfloat) m_blitheight };
19962008      uniform_location = pfn_glGetUniformLocationARB(m_glsl_program[i], "screen_texture_sz");
19972009      pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_sz[0]));
19982010      GL_CHECK_ERROR_NORMAL();
r243483r243484
20482060      }
20492061
20502062      osd_printf_verbose("GL texture: mpass screen-bmp 2x %dx%d (pow2 %dx%d)\n",
2051         window().width(), window().height(), surf_w_pow2, surf_h_pow2);
2063         m_width, m_height, surf_w_pow2, surf_h_pow2);
20522064   }
20532065
20542066   // GL_TEXTURE0
r243483r243484
27582770   }
27592771   else if ( texture->type == TEXTURE_TYPE_SHADER && shaderIdx>m_glsl_program_mb2sc )
27602772   {
2761      int surf_w_pow2  = get_valid_pow2_value (window().width(), texture->texpow2);
2762      int surf_h_pow2  = get_valid_pow2_value (window().height(), texture->texpow2);
2773      int surf_w_pow2  = get_valid_pow2_value (m_width, texture->texpow2);
2774      int surf_h_pow2  = get_valid_pow2_value (m_height, texture->texpow2);
27632775
2764      ustop  = (float)(window().width()) / (float)surf_w_pow2;
2765      vstop  = (float)(window().height()) / (float)surf_h_pow2;
2776      ustop  = (float)(m_width) / (float)surf_w_pow2;
2777      vstop  = (float)(m_height) / (float)surf_h_pow2;
27662778   }
27672779   else
27682780   {
trunk/src/osd/sdl/drawsdl.c
r243483r243484
6464   //m_hw_scale_height(0),
6565   m_last_hofs(0),
6666   m_last_vofs(0),
67   m_old_blitwidth(0),
68   m_old_blitheight(0),
67   m_blitwidth(0),
68   m_blitheight(0),
6969   m_last_width(0),
7070   m_last_height(0)
7171   { }
r243483r243484
7373   /* virtual */ int create();
7474   /* virtual */ int draw(const UINT32 dc, const int update);
7575   /* virtual */ int xy_to_render_target(const int x, const int y, int *xt, int *yt);
76   /* virtual */ void destroy_all_textures();
7776   /* virtual */ void destroy();
78   /* virtual */ void clear();
77   /* virtual */ render_primitive_list *get_primitives()
78   {
79      int nw = 0; int nh = 0;
80      window().blit_surface_size(nw, nh);
81      if (nw != m_blitwidth || nh != m_blitheight)
82      {
83         m_blitwidth = nw; m_blitheight = nh;
84         notify_changed();
85      }
86      window().target()->set_bounds(m_blitwidth, m_blitheight, window().monitor()->aspect());
87      return &window().target()->get_primitives();
88   }
7989
90private:
91   void destroy_all_textures();
8092   void yuv_init();
8193#if (SDLMAME_SDL2)
8294   void setup_texture(int tempwidth, int tempheight);
r243483r243484
106118
107119   int                 m_last_hofs;
108120   int                 m_last_vofs;
109   int                 m_old_blitwidth;
110   int                 m_old_blitheight;
121   int                 m_blitwidth;
122   int                 m_blitheight;
111123   int                 m_last_width;
112124   int                 m_last_height;
113125};
r243483r243484
230242//  drawsdl_init
231243//============================================================
232244
233int drawsdl_init(sdl_draw_info *callbacks)
245int drawsdl_init(osd_draw_callbacks *callbacks)
234246{
235247   // fill in the callbacks
236248   callbacks->create = drawsdl_create;
r243483r243484
419431// a
420432//============================================================
421433
434
422435int sdl_info::create()
423436{
424437
r243483r243484
465478      }
466479   }
467480
468   setup_texture(window().width(), window().height());
481#if 0
482   int w = 0, h = 0;
483   window().get_size(w, h);
484   setup_texture(w, h);
485#endif
469486#else
470487#endif
471488
r243483r243484
501518}
502519
503520//============================================================
504//  sdl_info::clear
505//============================================================
506
507void sdl_info::clear()
508{
509   //FIXME: Handled in sdl_info::draw as well
510   m_blittimer = 3;
511}
512
513//============================================================
514521//  drawsdl_xy_to_render_target
515522//============================================================
516523
r243483r243484
518525{
519526   *xt = x - m_last_hofs;
520527   *yt = y - m_last_vofs;
521   if (*xt<0 || *xt >= window().blitwidth())
528   if (*xt<0 || *xt >= m_blitwidth)
522529      return 0;
523   if (*yt<0 || *yt >= window().blitheight())
530   if (*yt<0 || *yt >= m_blitheight)
524531      return 0;
525532   return 1;
526533}
r243483r243484
554561   UINT8 *surfptr;
555562   INT32 pitch;
556563   Uint32 rmask, gmask, bmask;
564   int width = 0; int height = 0;
557565#if (SDLMAME_SDL2)
558566   Uint32 amask;
559567#endif
r243483r243484
565573      return 0;
566574   }
567575
568   if ((window().width() != m_last_width) || (window().height() != m_last_height))
576   window().get_size(width, height);
577   if (has_flags(FI_CHANGED) || (width != m_last_width) || (height != m_last_height))
569578   {
570      m_last_width = window().width();
571      m_last_height = window().height();
579      destroy_all_textures();
580      clear_flags(FI_CHANGED);
581      m_blittimer = 3;
582      m_last_width = width;
583      m_last_height = height;
572584#if (SDLMAME_SDL2)
573585      SDL_RenderSetViewport(m_sdl_renderer, NULL);
586      if (m_texture_id != NULL)
587         SDL_DestroyTexture(m_texture_id);
588      setup_texture(m_blitwidth, m_blitheight);
589      m_blittimer = 3;
574590#else
575591      const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode];
576592      if (sdl_sm->is_yuv)
r243483r243484
589605   gmask = window().sdl_surface()->format->Gmask;
590606   bmask = window().sdl_surface()->format->Bmask;
591607//  amask = sdlsurf->format->Amask;
592
608#if 0
593609   if (window().blitwidth() != m_old_blitwidth || window().blitheight() != m_old_blitheight)
594610   {
595611      if (sm->is_yuv)
r243483r243484
598614      m_old_blitheight = window().blitheight();
599615      m_blittimer = 3;
600616   }
601
617#endif
602618   if (SDL_MUSTLOCK(window().sdl_surface()))
603619      SDL_LockSurface(window().sdl_surface());
604620
605621   // Clear if necessary
606622   if (m_blittimer > 0)
607623   {
608      memset(window().sdl_surface()->pixels, 0, window().height() * window().sdl_surface()->pitch);
624      memset(window().sdl_surface()->pixels, 0, height * window().sdl_surface()->pitch);
609625      m_blittimer--;
610626   }
611627
r243483r243484
627643#else
628644   //SDL_SelectRenderer(window().sdl_window);
629645
630   if (window().blitwidth() != m_old_blitwidth || window().blitheight() != m_old_blitheight)
631   {
632      //SDL_RenderSetViewport(m_sdl_renderer, NULL);
633646
634      if (m_texture_id != NULL)
635         SDL_DestroyTexture(m_texture_id);
636      setup_texture(window().blitwidth(), window().blitheight());
637      m_old_blitwidth = window().blitwidth();
638      m_old_blitheight = window().blitheight();
639      m_blittimer = 3;
640   }
641
642647   {
643648      Uint32 format;
644649      int access, w, h;
r243483r243484
663668#endif
664669   // get ready to center the image
665670   vofs = hofs = 0;
666   blitwidth = window().blitwidth();
667   blitheight = window().blitheight();
671   blitwidth = m_blitwidth;
672   blitheight = m_blitheight;
668673
669674   // figure out what coordinate system to use for centering - in window mode it's always the
670675   // SDL surface size.  in fullscreen the surface covers all monitors, so center according to
r243483r243484
676681   }
677682   else
678683   {
679      ch = window().height();
680      cw = window().width();
684      ch = height;
685      cw = width;
681686   }
682687
683688   // do not crash if the window's smaller than the blit area
r243483r243484
687692   }
688693   else if (video_config.centerv)
689694   {
690      vofs = (ch - window().blitheight()) / 2;
695      vofs = (ch - m_blitheight) / 2;
691696   }
692697
693698   if (blitwidth > cw)
r243483r243484
696701   }
697702   else if (video_config.centerh)
698703   {
699      hofs = (cw - window().blitwidth()) / 2;
704      hofs = (cw - m_blitwidth) / 2;
700705   }
701706
702707   m_last_hofs = hofs;
trunk/src/osd/sdl/input.c
r243483r243484
19381938         if (*event.text.text)
19391939         {
19401940            sdl_window_info *window = GET_FOCUS_WINDOW(&event.text);
1941            //printf("Focus window is %p - wl %p\n", window, sdl_window_list);
19411942            unicode_char result;
19421943            if (window != NULL )
19431944            {
r243483r243484
19631964            app_has_mouse_focus = 0;
19641965            break;
19651966         case SDL_WINDOWEVENT_MOVED:
1966            window->clear();
1967            window->notify_changed();
19671968            focus_window = window;
19681969            break;
19691970         case SDL_WINDOWEVENT_RESIZED:
r243483r243484
19831984#endif
19841985               {
19851986                  //printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event));
1986                  if (event.window.data1 != window->width() || event.window.data2 != window->height())
1987                     window->resize(event.window.data1, event.window.data2);
1987                  window->resize(event.window.data1, event.window.data2);
19881988               }
19891989            }
19901990            focus_window = window;
trunk/src/osd/sdl/window.c
r243483r243484
9696// debugger
9797//static int in_background;
9898
99static sdl_draw_info draw;
99static osd_draw_callbacks draw;
100100
101101struct worker_param {
102102   worker_param()
r243483r243484
382382   return (fabs(desired_aspect - aspect0) < fabs(desired_aspect - aspect1)) ? 0 : 1;
383383}
384384
385void sdl_window_info::blit_surface_size(int window_width, int window_height)
385void sdl_window_info::blit_surface_size(int &blitwidth, int &blitheight)
386386{
387   int window_width, window_height;
388   if ((!fullscreen()) || (video_config.switchres))
389   {
390      get_size(window_width, window_height);
391   }
392   else
393   {
394      window_width = monitor()->center_width();
395      window_height = monitor()->center_height();
396   }
397
398
387399   INT32 newwidth, newheight;
388400   int xscale = 1, yscale = 1;
389401   float desired_aspect = 1.0f;
r243483r243484
453465      && (video_config.scale_mode == VIDEO_SCALE_MODE_NONE ))
454466      newwidth = window_width;
455467
456   if ((m_blitwidth != newwidth) || (m_blitheight != newheight))
457      clear();
458
459   m_blitwidth = newwidth;
460   m_blitheight = newheight;
468#if 0
469   // Fixme: notify_changed really necessary ?
470   if ((blitwidth != newwidth) || (blitheight != newheight))
471      notify_changed();
472#endif
473   blitwidth = newwidth;
474   blitheight = newheight;
461475}
462476
463477
r243483r243484
475489
476490   ASSERT_WINDOW_THREAD();
477491
478   window->renderer().destroy_all_textures();
479
480492#if (SDLMAME_SDL2)
481493   SDL_SetWindowSize(window->sdl_window(), width, height);
482   SDL_GetWindowSize(window->sdl_window(), &window->m_width, &window->m_height);
483494#else
484495   SDL_FreeSurface(window->m_sdlsurf);
485496
486497   window->m_sdlsurf = SDL_SetVideoMode(width, height, 0,
487498         SDL_SWSURFACE | SDL_ANYFORMAT | window->m_extra_flags);
488
489   window->m_width = window->m_sdlsurf->w;
490   window->m_height = window->m_sdlsurf->h;
491499#endif
500   window->renderer().notify_changed();
492501
493   window->blit_surface_size(window->m_width, window->m_height);
494
495   window->clear();
496
497502   osd_free(wp);
498503   return NULL;
499504}
r243483r243484
502507{
503508   ASSERT_MAIN_THREAD();
504509
505   if (width == this->width() && height == this->height())
506      return;
510   int cw=0; int ch=0;
511   get_size(cw, ch);
507512
508   execute_async_wait(&sdlwindow_resize_wt, worker_param(this, width, height));
513   if (width != cw || height != ch)
514      execute_async_wait(&sdlwindow_resize_wt, worker_param(this, width, height));
509515}
510516
511517
r243483r243484
514520//  (window thread)
515521//============================================================
516522
517OSDWORK_CALLBACK( sdl_window_info::sdlwindow_clear_surface_wt )
523OSDWORK_CALLBACK( sdl_window_info::notify_changed_wt )
518524{
519525   worker_param *wp = (worker_param *) param;
520526   sdl_window_info *window = wp->window();
521527
522528   ASSERT_WINDOW_THREAD();
523529
524   window->renderer().clear();
530   window->renderer().notify_changed();
525531   osd_free(wp);
526532   return NULL;
527533}
528534
529void sdl_window_info::clear()
535void sdl_window_info::notify_changed()
530536{
531537   worker_param wp;
532538
533539   if (SDL_ThreadID() == main_threadid)
534540   {
535      execute_async_wait(&sdlwindow_clear_surface_wt, worker_param(this));
541      execute_async_wait(&notify_changed_wt, worker_param(this));
536542   }
537543   else
538      execute_sync(&sdlwindow_clear_surface_wt, worker_param(this));
544      execute_sync(&notify_changed_wt, worker_param(this));
539545}
540546
541547
r243483r243484
558564   // If we are going fullscreen (leaving windowed) remember our windowed size
559565   if (!window->fullscreen())
560566   {
561      window->m_windowed_width = window->width();
562      window->m_windowed_height = window->height();
567      window->get_size(window->m_windowed_width, window->m_windowed_height);
563568   }
564569
565570   window->renderer().destroy();
r243483r243484
598603   execute_async_wait(&sdlwindow_toggle_full_screen_wt, worker_param(this));
599604}
600605
601OSDWORK_CALLBACK( sdl_window_info::destroy_all_textures_wt )
602{
603   worker_param *wp = (worker_param *) param;
604
605   sdl_window_info *window = wp->window();
606
607   window->renderer().destroy_all_textures();
608
609   osd_free(wp);
610   return NULL;
611}
612
613606void sdl_window_info::modify_prescale(int dir)
614607{
615608   worker_param wp = worker_param(this);
r243483r243484
633626      }
634627      else
635628      {
636         execute_async_wait(destroy_all_textures_wt, wp);
629         notify_changed();
637630         m_prescale = new_prescale;
638631      }
639632      machine().ui().popup_time(1, "Prescale %d", prescale());
r243483r243484
10351028
10361029         if (!this->m_fullscreen)
10371030         {
1038            blit_surface_size(width(), height());
10391031            //Don't resize window without user interaction;
10401032            //window_resize(blitwidth, blitheight);
10411033         }
r243483r243484
10531045
10541046      if (osd_event_wait(m_rendered_event, event_wait_ticks))
10551047      {
1056         if ((!fullscreen()) || (video_config.switchres))
1057         {
1058            blit_surface_size(m_width, m_height);
1059         }
1060         else
1061         {
1062            blit_surface_size(monitor()->center_width(), monitor()->center_height());
1063         }
10641048
10651049         // ensure the target bounds are up-to-date, and then get the primitives
10661050
1067         m_target->set_bounds(m_blitwidth, m_blitheight, monitor()->aspect());
1051         render_primitive_list &primlist = *m_renderer->get_primitives();
10681052
1069         render_primitive_list &primlist = m_target->get_primitives();
1070
10711053         // and redraw now
10721054
10731055         execute_async(&draw_video_contents_wt, worker_param(this, primlist));
r243483r243484
11651147
11661148#if (SDLMAME_SDL2)
11671149
1168   if (window->renderer().check_flag(osd_renderer::FLAG_NEEDS_OPENGL))
1150   if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL))
11691151   {
11701152      SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
11711153
r243483r243484
11971179
11981180   if  ( window->m_sdl_window == NULL )
11991181   {
1200      if (window->renderer().check_flag(osd_renderer::FLAG_NEEDS_OPENGL))
1182      if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL))
12011183         osd_printf_error("OpenGL not supported on this driver: %s\n", SDL_GetError());
12021184      else
12031185         osd_printf_error("Window creation failed: %s\n", SDL_GetError());
r243483r243484
12351217   //SDL_SetWindowFullscreen(window().sdl_window(), window().fullscreen);
12361218   SDL_RaiseWindow(window->sdl_window());
12371219
1238   SDL_GetWindowSize(window->sdl_window(), &window->m_width, &window->m_height);
1220#ifdef SDLMAME_WIN32
1221   if (window->fullscreen())
1222      SDL_SetWindowGrab(window->sdl_window(), SDL_TRUE);
1223#endif
12391224
12401225#else
12411226   window->m_extra_flags = (window->fullscreen() ?  SDL_FULLSCREEN : SDL_RESIZABLE);
12421227
1243   if (window->renderer().check_flag(osd_renderer::FLAG_NEEDS_DOUBLEBUF))
1228   if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_DOUBLEBUF))
12441229      window->m_extra_flags |= SDL_DOUBLEBUF;
1245   if (window->renderer().check_flag(osd_renderer::FLAG_NEEDS_ASYNCBLIT))
1230   if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_ASYNCBLIT))
12461231      window->m_extra_flags |= SDL_ASYNCBLIT;
12471232
1248   if (window->renderer().check_flag(osd_renderer::FLAG_NEEDS_OPENGL))
1233   if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL))
12491234 {
12501235      window->m_extra_flags |= SDL_DOUBLEBUF | SDL_OPENGL;
12511236      SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
r243483r243484
12671252      return (void *) &result[1];
12681253   }
12691254
1270   window->m_width = window->m_sdlsurf->w;
1271   window->m_height = window->m_sdlsurf->h;
1272
12731255   // set the window title
12741256   SDL_WM_SetCaption(window->m_title, "SDLMAME");
12751257#endif
trunk/src/osd/sdl/window.h
r243483r243484
5555
5656   sdl_window_info &window() { return *m_window; }
5757   int flags() const { return m_flags; }
58   bool check_flag(const int flag) { return ((m_flags & flag)) == flag; }
58   bool has_flags(const int flag) { return ((m_flags & flag)) == flag; }
5959
60   void notify_changed() { set_flags(FI_CHANGED); }
61
62   /* Interface to be implemented by render code */
63
6064   virtual int create() = 0;
6165   virtual int draw(const UINT32 dc, const int update) = 0;
66   virtual render_primitive_list *get_primitives() = 0;
6267   virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) = 0;
63   virtual void destroy_all_textures() = 0;
6468   virtual void destroy() = 0;
65   virtual void clear() = 0;
6669
70protected:
71   /* Internal flags */
72   static const int FI_CHANGED                = 0x010000;
73
74   void set_flags(int aflag) { m_flags |= aflag; }
75   void clear_flags(int aflag) { m_flags &= ~aflag; }
76
6777private:
78
6879   sdl_window_info *m_window;
6980   int m_flags;
7081};
r243483r243484
8697#endif
8798       m_minwidth(0), m_minheight(0),
8899      m_rendered_event(0), m_target(0),
89      m_width(0), m_height(0), m_blitwidth(0), m_blitheight(0),
90100#if (SDLMAME_SDL2)
91101      m_sdl_window(NULL),
92102
r243483r243484
121131   void modify_prescale(int dir);
122132   void resize(INT32 width, INT32 height);
123133   void destroy();
124   void clear();
134
135   void notify_changed();
136
137   void get_size(int &w, int &h)
138   {
139#if (SDLMAME_SDL2)
140      SDL_GetWindowSize(m_sdl_window, &w, &h);
141#else
142      w = m_sdlsurf->w; h = m_sdlsurf->h;
143#endif
144   }
145
125146   int xy_to_render_target(int x, int y, int *xt, int *yt);
126147
127148   running_machine &machine() const { return m_machine; }
r243483r243484
136157#else
137158   SDL_Surface *sdl_surface() { return m_sdlsurf; }
138159#endif
139   int   width() const { return m_width; }
140   int height() const { return m_height; }
141160
142   int   blitwidth() const { return m_blitwidth; }
143   int blitheight() const { return m_blitheight; }
161   void blit_surface_size(int &blitwidth, int &blitheight);
144162   int prescale() const { return m_prescale; }
145163
146164   // Pointer to next window
r243483r243484
173191   osd_event *         m_rendered_event;
174192   render_target *     m_target;
175193
176   // cache of physical width() and height()
177   int                 m_width;
178   int                 m_height;
179
180   // current m_blitwidth and height()
181   int                 m_blitwidth;
182   int                 m_blitheight;
183
184
185194   int                 m_prescale;
186195
187196#if (SDLMAME_SDL2)
r243483r243484
207216private:
208217   void constrain_to_aspect_ratio(int *window_width, int *window_height, int adjustment);
209218   void update_cursor_state();
210   void blit_surface_size(int window_width, int window_height);
211219   void pick_best_mode(int *fswidth, int *fsheight);
212220   void set_starting_view(running_machine &machine, int index, const char *defview, const char *view);
213221   void get_min_bounds(int *window_width, int *window_height, int constrain);
214222   void get_max_bounds(int *window_width, int *window_height, int constrain);
215223   void set_fullscreen(int afullscreen) { m_fullscreen = afullscreen; }
216224
217
218
219
220225   // Pointer to machine
221226   running_machine &   m_machine;
222227   // monitor info
r243483r243484
231236   static OSDWORK_CALLBACK( draw_video_contents_wt );
232237   static OSDWORK_CALLBACK( sdlwindow_video_window_destroy_wt );
233238   static OSDWORK_CALLBACK( sdlwindow_toggle_full_screen_wt );
234   static OSDWORK_CALLBACK( sdlwindow_clear_surface_wt );
235   static OSDWORK_CALLBACK( destroy_all_textures_wt );
239   static OSDWORK_CALLBACK( notify_changed_wt );
236240   static OSDWORK_CALLBACK( update_cursor_state_wt );
237241
238242   void measure_fps(UINT32 dc, int update);
239243
240244};
241245
242struct sdl_draw_info
246struct osd_draw_callbacks
243247{
244248   osd_renderer *(*create)(sdl_window_info *window);
245249   void (*exit)(void);
r243483r243484
260264// PROTOTYPES - drawsdl.c
261265//============================================================
262266
263int drawsdl_init(sdl_draw_info *callbacks);
267int drawsdl_init(osd_draw_callbacks *callbacks);
264268const char *drawsdl_scale_mode_str(int index);
265269int drawsdl_scale_mode(const char *s);
266270
r243483r243484
268272// PROTOTYPES - drawogl.c
269273//============================================================
270274
271int drawogl_init(running_machine &machine, sdl_draw_info *callbacks);
275int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks);
272276
273277//============================================================
274278// PROTOTYPES - draw13.c
275279//============================================================
276280
277int drawsdl2_init(running_machine &machine, sdl_draw_info *callbacks);
281int drawsdl2_init(running_machine &machine, osd_draw_callbacks *callbacks);
278282
279283//============================================================
280284// PROTOTYPES - drawbgfx.c
281285//============================================================
282286
283int drawbgfx_init(running_machine &machine, sdl_draw_info *callbacks);
287int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks);
284288
285289#endif /* __SDLWINDOW__ */


Previous 199869 Revisions Next


© 1997-2024 The MAME Team