Previous 199869 Revisions Next

r36103 Wednesday 25th February, 2015 at 07:09:13 UTC by Miodrag Milanović
Cleanups and version bump
[/branches/kale/src]version.c
[/branches/kale/src/emu]fileio.h render.h video.c
[/branches/kale/src/emu/bus/a2bus]a2bus.h
[/branches/kale/src/emu/bus/cpc]smartwatch.c smartwatch.h
[/branches/kale/src/emu/bus/nes_ctrl]bcbattle.c miracle.c
[/branches/kale/src/emu/bus/snes_ctrl]bcbattle.c bcbattle.h ctrl.h joypad.c joypad.h miracle.c mouse.c mouse.h multitap.c pachinko.c sscope.c sscope.h twintap.c
[/branches/kale/src/emu/cpu/amis2000]amis2000.c amis2000.h amis2000d.c amis2000op.inc
[/branches/kale/src/emu/cpu/i386]i386ops.h
[/branches/kale/src/emu/cpu/m6502]m4510.c
[/branches/kale/src/emu/cpu/m68000]m68000.h m68kcpu.h
[/branches/kale/src/emu/cpu/ucom4]ucom4.c ucom4.h ucom4d.c ucom4op.inc
[/branches/kale/src/emu/debug]dvbpoints.c dvwpoints.c
[/branches/kale/src/emu/drivers]xtal.h
[/branches/kale/src/emu/machine]jvshost.c
[/branches/kale/src/emu/sound]saa1099.c
[/branches/kale/src/emu/video]scn2674.c scn2674.h
[/branches/kale/src/lib]lib.mak
[/branches/kale/src/lib/formats]ap2_dsk.c
[/branches/kale/src/mame]mame.lst
[/branches/kale/src/mame/audio]seibu.c t5182.c t5182.h
[/branches/kale/src/mame/drivers]armedf.c bnstars.c comebaby.c cops.c cps2.c cyclemb.c d9final.c darkmist.c dlair2.c dreambal.c exidyttl.c expro02.c fuukifg3.c galivan.c galpani2.c galpani3.c galpanic.c gladiatr.c gluck2.c goodejan.c gunsmoke.c hornet.c igs011.c limenko.c lordgun.c mastboy.c mcr.c namcops2.c naomi.c nbmj9195.c nwk-tr.c panicr.c peplus.c pipeline.c progolf.c quizo.c rabbit.c raiden2.c ramtek.c retofinv.c segaorun.c sengokmj.c sidepckt.c silvmil.c skeetsht.c skyarmy.c snowbros.c statriv2.c taitottl.c tecmosys.c tmmjprd.c welltris.c wink.c xxmissio.c
[/branches/kale/src/mame/includes]bloodbro.h chaknpop.h darkmist.h dcon.h exzisus.h fastfred.h fuukifg2.h fuukifg3.h galpani2.h gladiatr.h gsword.h iqblock.h kaneko16.h liberate.h lordgun.h mustache.h nb1414m4.h pirates.h quizpani.h raiden.h retofinv.h rollrace.h scotrsht.h seicross.h shadfrce.h shootout.h sidepckt.h silkroad.h skydiver.h snowbros.h speedatk.h tecmo.h tecmo16.h tecmosys.h tehkanwc.h thedeep.h tnzs.h vball.h wc90.h welltris.h wrally.h wwfsstar.h xorworld.h xxmissio.h
[/branches/kale/src/mame/machine]mie.c nb1414m4.c tait8741.c tnzs.c
[/branches/kale/src/mame/video]bloodbro.c chaknpop.c darkmist.c dcon.c decospr.c fastfred.c gladiatr.c gsword.c iqblock.c kaneko_spr.c liberate.c mustache.c quizpani.c retofinv.c scotrsht.c shadfrce.c shootout.c skydiver.c tecmo.c tecmo16.c tecmosys.c tehkanwc.c vball.c welltris.c wwfsstar.c xxmissio.c
[/branches/kale/src/mess/audio]gamate.c
[/branches/kale/src/mess/drivers]alnchase.c c65.c c65_old.c edracula.c gamate.c ngen.c pc9801.c pcd.c snes.c splitsec.c tb303.c tc4.c tispeak.c tmtennis.c wildfire.c
[/branches/kale/src/mess/includes]gamate.h
[/branches/kale/src/mess/machine]amstrad.c apple3.c beta.c c65_old.c
[/branches/kale/src/mess/osd/windows]windows.mak
[/branches/kale/src/mess/video]apple3.c
[/branches/kale/src/osd/modules/debugger]debugwin.c
[/branches/kale/src/osd/modules/debugger/osx]debugcommandhistory.h debugconsole.h debugview.h debugwindowhandler.h deviceinfoviewer.h devicesviewer.h disassemblyviewer.h errorlogviewer.h memoryviewer.h pointsviewer.h
[/branches/kale/src/osd/modules/debugger/win]consolewininfo.c consolewininfo.h debugbaseinfo.c debugbaseinfo.h debugviewinfo.c debugviewinfo.h debugwin.h debugwininfo.c debugwininfo.h disasmbasewininfo.c disasmbasewininfo.h disasmviewinfo.c disasmviewinfo.h disasmwininfo.c disasmwininfo.h editwininfo.c editwininfo.h logwininfo.c logwininfo.h memoryviewinfo.c memoryviewinfo.h memorywininfo.c memorywininfo.h pointswininfo.c pointswininfo.h uimetrics.c uimetrics.h
[/branches/kale/src/osd/modules/netdev]pcap.c
[/branches/kale/src/osd/sdl]blit13.h draw13.c drawbgfx.c drawogl.c drawsdl.c sdl.mak video.h window.c window.h
[/branches/kale/src/osd/windows]d3dhlsl.h drawbgfx.c drawdd.c drawgdi.c video.h window.h windows.mak

branches/kale/src/emu/bus/a2bus/a2bus.h
r244614r244615
176176   void recalc_slot_inh() { m_a2bus->recalc_inh(m_slot); }
177177   void set_maincpu_halt(int state) { m_a2bus->set_maincpu_halt(state); }
178178
179   // pass through the original address space if any for debugger protection
179   // pass through the original address space if any for debugger protection
180180   // when debugging e.g. coprocessor cards (Z80 SoftCard etc).
181181   UINT8 slot_dma_read(address_space &space, UINT16 offset) { return m_a2bus->dma_r(space, offset); }
182182   void slot_dma_write(address_space &space, UINT16 offset, UINT8 data) { m_a2bus->dma_w(space, offset, data); }
branches/kale/src/emu/bus/cpc/smartwatch.c
r244614r244615
11/*
2   Dobbertin Smartwatch
3   
4   Created: 23/2/2015
5   
6   TODO: setting the time (requires the DS1315 core to be able to do this,
7         at the moment it just reads the current time)
2    Dobbertin Smartwatch
3
4    Created: 23/2/2015
5
6    TODO: setting the time (requires the DS1315 core to be able to do this,
7          at the moment it just reads the current time)
88*/
99
1010#include "emu.h"
branches/kale/src/emu/bus/cpc/smartwatch.h
r244614r244615
11/*
2   Dobbertin Smartwatch
3   
4   Dallas DS1216 Smartwatch + DS1315 Phantom Time chip
5   
6   Further info at: http://www.cpcwiki.eu/index.php/Dobbertin_Smart_Watch
7   
2    Dobbertin Smartwatch
3
4    Dallas DS1216 Smartwatch + DS1315 Phantom Time chip
5
6    Further info at: http://www.cpcwiki.eu/index.php/Dobbertin_Smart_Watch
7
88*/
99
1010#ifndef SMARTWATCH_H_
branches/kale/src/emu/bus/nes_ctrl/bcbattle.c
r244614r244615
3535//-------------------------------------------------
3636
3737// This part is the hacky replacement for the real Barcode unit [shared with SNES implementation]:
38// code periodically checks whether a new code has been scanned and it moves it to the
38// code periodically checks whether a new code has been scanned and it moves it to the
3939// m_current_barcode array
4040void nes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
4141{
branches/kale/src/emu/bus/nes_ctrl/miracle.c
r244614r244615
1212#include "miracle.h"
1313
1414#define MIRACLE_MIDI_WAITING 0
15#define MIRACLE_MIDI_RECEIVE 1      // receive byte from piano
16#define MIRACLE_MIDI_SEND 2         // send byte to piano
15#define MIRACLE_MIDI_RECEIVE 1      // receive byte from piano
16#define MIRACLE_MIDI_SEND 2         // send byte to piano
1717
1818//**************************************************************************
1919//  DEVICE DEFINITIONS
r244614r244615
141141
142142void nes_miracle_device::write(UINT8 data)
143143{
144//   printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode);
144//  printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode);
145145
146146   if (m_midi_mode == MIRACLE_MIDI_SEND)
147147   {
r244614r244615
154154      // then we go back to waiting
155155      if (m_sent_bits == 8)
156156      {
157//         printf("xmit MIDI byte %02x\n", m_data_sent);
157//          printf("xmit MIDI byte %02x\n", m_data_sent);
158158         xmit_char(m_data_sent);
159159         m_midi_mode = MIRACLE_MIDI_WAITING;
160160         m_sent_bits = 0;
r244614r244615
175175      // was timer running?
176176      if (m_strobe_clock > 0)
177177      {
178//         printf("got strobe at %d clocks\n", m_strobe_clock);
178//          printf("got strobe at %d clocks\n", m_strobe_clock);
179179
180180         if (m_strobe_clock < 66 && data == 0)
181181         {
r244614r244615
188188            m_status_bit = true;
189189            if (m_recv_read != m_recv_write)
190190            {
191//               printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read);
191//                  printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read);
192192               m_data_sent = m_recvring[m_recv_read++];
193193               if (m_recv_read >= RECV_RING_SIZE)
194194               {
r244614r244615
199199            else
200200            {
201201               m_read_status = false;
202//               printf("Miracle has no data\n");
202//                  printf("Miracle has no data\n");
203203            }
204204            return;
205205         }
r244614r244615
230230   receive_register_extract();
231231   UINT8 rcv = get_received_char();
232232
233//   printf("Got %02x -> [%d]\n", rcv, m_recv_write);
233//  printf("Got %02x -> [%d]\n", rcv, m_recv_write);
234234   m_recvring[m_recv_write++] = rcv;
235235   if (m_recv_write >= RECV_RING_SIZE)
236236   {
r244614r244615
282282      }
283283   }
284284}
285
branches/kale/src/emu/bus/snes_ctrl/bcbattle.c
r244614r244615
3535//-------------------------------------------------
3636
3737// This part is the hacky replacement for the real Barcode unit [shared with NES implementation]:
38// code periodically checks whether a new code has been scanned and it moves it to the
38// code periodically checks whether a new code has been scanned and it moves it to the
3939// m_current_barcode array
4040void snes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
4141{
r244614r244615
140140         m_cur_bit++;
141141         return bit;
142142      }
143      if (m_cur_bit == 4)   // only the low nibble is transmitted (this is the main action of the BBII interface for SNES)
143      if (m_cur_bit == 4) // only the low nibble is transmitted (this is the main action of the BBII interface for SNES)
144144      {
145145         m_cur_bit = 0;
146146         //printf("%X ", m_current_barcode[m_cur_byte]);
r244614r244615
175175UINT8 snes_bcbattle_device::read_pin4()
176176{
177177   UINT8 ret = 0;
178   
178
179179   if (m_idx >= 80)
180180      ret |= 0x00;
181   else if (m_idx >= 28)   // scan actual barcode
181   else if (m_idx >= 28)   // scan actual barcode
182182   {
183      ret |= read_current_bit();   // if no code is pending transmission, the function returns 0
183      ret |= read_current_bit();  // if no code is pending transmission, the function returns 0
184184      m_idx++;
185185   }
186   else if (m_idx >= 25)   // unknown flags?
186   else if (m_idx >= 25)   // unknown flags?
187187      m_idx++;
188   else if (m_idx == 24)   // barcode present
188   else if (m_idx == 24)   // barcode present
189189   {
190190      ret |= m_pending_code;
191191      m_idx++;
192192   }
193   else if (m_idx >= 12)   // controller ID
193   else if (m_idx >= 12)   // controller ID
194194      ret |= BIT(0x7000, m_idx++);
195   else   // first 12 bytes are unknown and probably always 0
195   else    // first 12 bytes are unknown and probably always 0
196196      m_idx++;
197   
197
198198   return ret;
199199}
200200
r244614r244615
207207{
208208   int old = m_strobe;
209209   m_strobe = data & 0x01;
210   
211   if (m_strobe < old)   // 1 -> 0 transition
210
211   if (m_strobe < old) // 1 -> 0 transition
212212      port_poll();
213213}
branches/kale/src/emu/bus/snes_ctrl/bcbattle.h
r244614r244615
4545   int read_current_bit();
4646
4747private:
48   
48
4949   static const device_timer_id TIMER_BATTLER = 1;
5050   required_device<barcode_reader_device> m_reader;
5151   UINT8 m_current_barcode[20];
branches/kale/src/emu/bus/snes_ctrl/ctrl.h
r244614r244615
2929   // construction/destruction
3030   device_snes_control_port_interface(const machine_config &mconfig, device_t &device);
3131   virtual ~device_snes_control_port_interface();
32   
32
3333   virtual UINT8 read_pin4() { return 0; };
3434   virtual UINT8 read_pin5() { return 0; };
3535   virtual void write_pin6(UINT8 data) { };
3636   virtual void write_strobe(UINT8 data) { };
3737   virtual void port_poll() { };
38   
38
3939protected:
4040   snes_control_port_device *m_port;
4141};
branches/kale/src/emu/bus/snes_ctrl/joypad.c
r244614r244615
9797   // if up, no down
9898   if (temp & 0x10)
9999      temp &= ~0x20;
100   
100
101101   m_latch = temp | 0xffff0000;
102102}
103103
r244614r244615
121121   int old = m_strobe;
122122   m_strobe = data & 0x01;
123123
124   if (m_strobe < old)   // 1 -> 0 transition
124   if (m_strobe < old) // 1 -> 0 transition
125125      port_poll();
126126}
127
branches/kale/src/emu/bus/snes_ctrl/joypad.h
r244614r244615
4141   virtual UINT8 read_pin4();
4242   virtual void write_strobe(UINT8 data);
4343   virtual void port_poll();
44   
44
4545private:
4646   required_ioport m_joypad;
4747   int m_strobe;
branches/kale/src/emu/bus/snes_ctrl/miracle.c
r244614r244615
44
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
7
7
88    recv at PC = 008a4a
99    xmit at PC = 008adb
10
10
1111**********************************************************************/
1212
1313#include "miracle.h"
1414
1515#define MIRACLE_MIDI_WAITING 0
16#define MIRACLE_MIDI_RECEIVE 1      // receive byte from piano
17#define MIRACLE_MIDI_SEND 2         // send byte to piano
16#define MIRACLE_MIDI_RECEIVE 1      // receive byte from piano
17#define MIRACLE_MIDI_SEND 2         // send byte to piano
1818
1919//**************************************************************************
2020//  DEVICE DEFINITIONS
r244614r244615
130130
131131void snes_miracle_device::write_pin6(UINT8 data)
132132{
133//   printf("%02x to pin6\n", data);
133//  printf("%02x to pin6\n", data);
134134}
135135
136136void snes_miracle_device::write_strobe(UINT8 data)
137137{
138//   printf("%02x to strobe\n", data);
138//  printf("%02x to strobe\n", data);
139139
140140   if (m_midi_mode == MIRACLE_MIDI_SEND)
141141   {
r244614r244615
148148      // then we go back to waiting
149149      if (m_sent_bits == 8)
150150      {
151//         printf("xmit MIDI byte %02x\n", m_data_sent);
151//          printf("xmit MIDI byte %02x\n", m_data_sent);
152152         xmit_char(m_data_sent);
153153         m_midi_mode = MIRACLE_MIDI_WAITING;
154154         m_sent_bits = 0;
r244614r244615
169169      // was timer running?
170170      if (m_strobe_clock > 0)
171171      {
172//         printf("got strobe at %d clocks\n", m_strobe_clock);
172//          printf("got strobe at %d clocks\n", m_strobe_clock);
173173
174174         if (m_strobe_clock < 500 && data == 0)
175175         {
r244614r244615
182182            m_status_bit = true;
183183            if (m_recv_read != m_recv_write)
184184            {
185//               printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read);
185//                  printf("Getting %02x from Miracle[%d]\n", m_recvring[m_recv_read], m_recv_read);
186186               m_data_sent = m_recvring[m_recv_read++];
187187               if (m_recv_read >= RECV_RING_SIZE)
188188               {
r244614r244615
193193            else
194194            {
195195               m_read_status = false;
196//               printf("Miracle has no data\n");
196//                  printf("Miracle has no data\n");
197197            }
198198            return;
199199         }
r244614r244615
225225   receive_register_extract();
226226   UINT8 rcv = get_received_char();
227227
228//   printf("Got %02x -> [%d]\n", rcv, m_recv_write);
228//  printf("Got %02x -> [%d]\n", rcv, m_recv_write);
229229   m_recvring[m_recv_write++] = rcv;
230230   if (m_recv_write >= RECV_RING_SIZE)
231231   {
r244614r244615
277277      }
278278   }
279279}
280
branches/kale/src/emu/bus/snes_ctrl/mouse.c
r244614r244615
11/**********************************************************************
22
33    Nintendo Super Famicom & SNES Mouse
4
4
55    Copyright MESS Team.
66    Visit http://mamedev.org for licensing and usage restrictions.
77
r244614r244615
3232   // detect a sudden jump in the wrong direction, making the usage unfriendly...
3333   PORT_START("MOUSE_X")
3434   PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_X ) PORT_NAME("Superscope X Axis") PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
35//   PORT_BIT( 0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
35//  PORT_BIT( 0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
3636
3737   PORT_START("MOUSE_Y")
3838   PORT_BIT( 0x1ff, 0x100, IPT_LIGHTGUN_Y) PORT_NAME("Superscope Y Axis") PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
39//   PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
39//  PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(30) PORT_KEYDELTA(5)
4040INPUT_PORTS_END
4141
4242
r244614r244615
155155      m_deltax = var;
156156      m_oldx = m_x;
157157   }
158   
158
159159   var = m_y - m_oldy;
160160   if (var)
161161   {
r244614r244615
163163      if (m_diry != new_dir)
164164         m_diry = new_dir;
165165   }
166   
166
167167   if (var < -127)
168168   {
169169      m_deltay = 0x7f;
r244614r244615
196196UINT8 snes_mouse_device::read_pin4()
197197{
198198   UINT8 res = 0;
199   
199
200200   if (m_strobe == 1)
201201   {
202202      // reading with strobe 1, changes mouse speed
203203      m_speed = (m_speed + 1) % 3;
204204      return res;
205205   }
206   
206
207207   if (m_idx >= 32)
208208      res |= 0x01;
209209   else if (m_idx >= 24)
r244614r244615
222222   }
223223   else
224224      res |= BIT(m_latch, m_idx++);
225   
225
226226   return res;
227227}
228228
r244614r244615
235235   int old = m_strobe;
236236   m_strobe = data & 0x01;
237237
238   if (m_strobe < old)   // 1 -> 0 transition
238   if (m_strobe < old) // 1 -> 0 transition
239239      port_poll();
240240}
241
branches/kale/src/emu/bus/snes_ctrl/mouse.h
r244614r244615
4141   virtual UINT8 read_pin4();
4242   virtual void write_strobe(UINT8 data);
4343   virtual void port_poll();
44   
44
4545private:
4646   required_ioport m_buttons;
4747   required_ioport m_xaxis;
branches/kale/src/emu/bus/snes_ctrl/multitap.c
r244614r244615
121121      ret |= m_select ? m_port1->read_pin4() : m_port3->read_pin4();
122122   else    // 1P
123123      ret |= m_select ? m_port1->read_pin4() : 0;
124   
124
125125   return ret;
126126}
127127
128128UINT8 snes_multitap_device::read_pin5()
129129{
130130   UINT8 ret = 0;
131   
131
132132   if (m_cfg->read() == 0) // 4P
133133      ret |= m_select ? m_port2->read_pin4() : m_port4->read_pin4();
134134   return ret;
branches/kale/src/emu/bus/snes_ctrl/pachinko.c
r244614r244615
8383void snes_pachinko_device::port_poll()
8484{
8585   UINT8 dial = BITSWAP8(m_dial->read() ^ 0xff,7,6,5,4,3,2,1,0);
86   m_latch = m_button->read() | (dial << 25) | 0xee7000;   // add ID
86   m_latch = m_button->read() | (dial << 25) | 0xee7000;   // add ID
8787}
8888
8989//-------------------------------------------------
r244614r244615
105105{
106106   int old = m_strobe;
107107   m_strobe = data & 0x01;
108   
109   if (m_strobe < old)   // 1 -> 0 transition
108
109   if (m_strobe < old) // 1 -> 0 transition
110110      port_poll();
111111}
branches/kale/src/emu/bus/snes_ctrl/sscope.c
r244614r244615
112112   // then start elaborating input bits
113113   // 1. only keep old turbo value
114114   m_latch &= 0x04;
115   
115
116116   // 2. set onscreen/offscreen
117117   if (!m_port->m_onscreen_cb.isnull())
118118      m_latch |= (m_port->m_onscreen_cb(m_x, m_y) ? 0x00 : 0x40);
119   
119
120120   // 3. pause is a button that is always edge sensitive
121121   if (BIT(input, 3) && !m_pause_lock)
122122   {
r244614r244615
134134   }
135135   else if (!BIT(input, 2))
136136      m_turbo_lock = 0;
137   
137
138138   // 5. cursor is a button that is always level sensitive
139139   m_latch |= BIT(input, 1);
140   
141   // 6. fire is a button with two behaviors: if turbo is active, trigger is level sensitive;
140
141   // 6. fire is a button with two behaviors: if turbo is active, trigger is level sensitive;
142142   //    otherwise it is edge sensitive
143143   if (BIT(input, 0) && (BIT(m_latch, 2) || !m_fire_lock))
144144   {
r244614r244615
147147   }
148148   else if (!BIT(input, 0))
149149      m_fire_lock = 0;
150   
150
151151   // If we have pressed fire or cursor and we are on-screen and SuperScope is in Port2, then latch video signal.
152152   // Notice that this only works in Port2 because its IOBit pin is connected to bit7 of the IO Port, while Port1
153153   // has IOBit pin connected to bit6 of the IO Port, and the latter is not detected by the H/V Counters. In other
r244614r244615
163163UINT8 snes_sscope_device::read_pin4()
164164{
165165   UINT8 res = 0;
166   
167   if (m_idx >= 8)   // bits 8-15 = ID = all 1s; bits >= 16 all 1s
166
167   if (m_idx >= 8) // bits 8-15 = ID = all 1s; bits >= 16 all 1s
168168      res |= 0x01;
169169   else
170170      res |= BIT(m_latch, m_idx++);
171   
171
172172   return res;
173173}
174174
r244614r244615
181181   int old = m_strobe;
182182   m_strobe = data & 0x01;
183183
184   if (m_strobe < old)   // 1 -> 0 transition
184   if (m_strobe < old) // 1 -> 0 transition
185185      port_poll();
186186}
187
branches/kale/src/emu/bus/snes_ctrl/sscope.h
r244614r244615
4141   virtual UINT8 read_pin4();
4242   virtual void write_strobe(UINT8 data);
4343   virtual void port_poll();
44   
44
4545private:
4646   required_ioport m_buttons;
4747   required_ioport m_xaxis;
branches/kale/src/emu/bus/snes_ctrl/twintap.c
r244614r244615
33    Nintendo Super Famicom - Yonezawa / PartyRoom 21 Twin Tap Controller
44
55    This controller consists of two 1-button small units attached to a
6    single 7pin connector. You plug the connector to Port2 and two
6    single 7pin connector. You plug the connector to Port2 and two
77    players can compete on the quiz game (Port1 should have a joypad
88    plugged in, to start the game and browse the menus). By plugging
99    a multitap adapter to Port2, up to 4 Twin Tap controllers can be
1010    attached at the same time, allowing for 8 players quiz sessions.
11
11
1212    Copyright MESS Team.
1313    Visit http://mamedev.org for licensing and usage restrictions.
1414
r244614r244615
2828   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Button 2")
2929   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Button 1")
3030   PORT_BIT( 0x8ffc, IP_ACTIVE_HIGH, IPT_UNUSED )
31   PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED )   // controller ID unknown
31   PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED )   // controller ID unknown
3232INPUT_PORTS_END
3333
3434
r244614r244615
108108{
109109   int old = m_strobe;
110110   m_strobe = data & 0x01;
111   
112   if (m_strobe < old)   // 1 -> 0 transition
111
112   if (m_strobe < old) // 1 -> 0 transition
113113      port_poll();
114114}
branches/kale/src/emu/cpu/amis2000/amis2000.c
r244614r244615
184184   amis2000_base_device::device_start();
185185
186186   m_d2f_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(amis2152_cpu_device::d2f_timer_cb), this));
187   
187
188188   // zerofill
189189   m_d2f_latch = 0;
190190   m_fout_state = 0;
r244614r244615
205205   m_pc = 0;
206206   m_op = 0;
207207   m_skip = false;
208   
208
209209   // clear i/o
210210   m_a = 0x1fff;
211211   m_write_a(0, m_a, 0xffff);
r244614r244615
235235   while (m_icount > 0)
236236   {
237237      m_icount--;
238     
238
239239      // remember previous opcode
240240      m_prev_op = m_op;
241241
242242      debugger_instruction_hook(this, m_pc);
243243      m_op = m_program->read_byte(m_pc);
244244      m_pc = (m_pc + 1) & 0x1fff;
245     
245
246246      if (m_skip)
247247      {
248248         // always skip over PP prefix
r244614r244615
299299         case 0x2d: op_sf2(); break;
300300         case 0x2e: op_tf1(); break;
301301         case 0x2f: op_tf2(); break;
302         
302
303303         default:
304304            switch (m_op & 0xfc)
305305            {
branches/kale/src/emu/cpu/amis2000/amis2000.h
r244614r244615
9595   address_space_config m_data_config;
9696   address_space *m_program;
9797   address_space *m_data;
98   
98
9999   UINT8 m_bu_bits;
100100   UINT16 m_bu_mask;
101101   UINT8 m_callstack_bits;     // number of program counter bits held in callstack
r244614r244615
129129   devcb_write8 m_write_d;
130130   devcb_write16 m_write_a;
131131   devcb_write_line m_write_f;
132   
132
133133   // misc internal helpers
134134   UINT8 ram_r();
135135   void ram_w(UINT8 data);
136136   void pop_callstack();
137137   void push_callstack();
138138   void d_latch_out(bool active);
139   
139
140140   // opcode handlers
141141   virtual void op_lai();
142142   virtual void op_lab();
r244614r244615
221221   // device-level overrides
222222   virtual void device_start();
223223   virtual void device_reset();
224   
224
225225   // digital-to-frequency converter
226226   UINT8 m_d2f_latch;
227227   emu_timer *m_d2f_timer;
r244614r244615
229229
230230   void d2f_timer_clock();
231231   TIMER_CALLBACK_MEMBER(d2f_timer_cb);
232   
232
233233   // opcode handlers
234234   virtual void op_szk();
235235};
branches/kale/src/emu/cpu/amis2000/amis2000d.c
r244614r244615
108108
109109   char *dst = buffer;
110110   dst += sprintf(dst, "%-5s ", s_mnemonics[instr]);
111   
111
112112   // opcode parameter
113113   int mask = s_bits[instr];
114114   bool complement = (mask < 0);
115115   if (mask < 0)
116116      mask = -mask;
117117   mask = (1 << mask) - 1;
118   
118
119119   if (mask != 0)
120120   {
121121      UINT8 param = op;
122122      if (complement)
123123         param = ~param;
124124      param &= mask;
125     
125
126126      if (mask < 0x10)
127127         dst += sprintf(dst, "%d", param);
128128      else
branches/kale/src/emu/cpu/amis2000/amis2000op.inc
r244614r244615
307307   // JMP X: jump to X(+PP)
308308   UINT16 mask = 0x3f;
309309   UINT16 param = m_op & mask;
310   
310
311311   // if previous opcode was PP, change PC high bits too
312312   if ((m_prev_op & 0xf0) == 0x60)
313313   {
r244614r244615
507507{
508508   m_write_f(m_fout_state);
509509   m_fout_state ^= 1;
510   
510
511511   d2f_timer_clock();
512512}
513513
branches/kale/src/emu/cpu/i386/i386ops.h
r244614r244615
329329   { 0x32,     OP_2BYTE|OP_PENTIUM,        &i386_device::pentium_rdmsr,               &i386_device::pentium_rdmsr,           false},
330330   { 0x38,     OP_2BYTE|OP_PENTIUM,        &i386_device::i386_decode_three_byte38,    &i386_device::i386_decode_three_byte38,false},
331331   { 0x3A,     OP_2BYTE|OP_PENTIUM,        &i386_device::i386_decode_three_byte3a,    &i386_device::i386_decode_three_byte3a,false},
332   { 0x40,       OP_2BYTE|OP_PENTIUM,   &i386_device::pentium_cmovo_r16_rm16,      &i386_device::pentium_cmovo_r32_rm32,  false},
332   { 0x40,    OP_2BYTE|OP_PENTIUM,    &i386_device::pentium_cmovo_r16_rm16,      &i386_device::pentium_cmovo_r32_rm32,  false},
333333   { 0x41,     OP_2BYTE|OP_PENTIUM,        &i386_device::pentium_cmovno_r16_rm16,     &i386_device::pentium_cmovno_r32_rm32, false},
334334   { 0x42,     OP_2BYTE|OP_PENTIUM,        &i386_device::pentium_cmovb_r16_rm16,      &i386_device::pentium_cmovb_r32_rm32,  false},
335335   { 0x43,     OP_2BYTE|OP_PENTIUM,        &i386_device::pentium_cmovae_r16_rm16,     &i386_device::pentium_cmovae_r32_rm32, false},
branches/kale/src/emu/cpu/m6502/m4510.c
r244614r244615
8686   {
8787      address = map(address);
8888   }
89   
89
9090   return true;
9191}
9292
branches/kale/src/emu/cpu/m68000/m68000.h
r244614r244615
357357
358358   UINT32 ic_address[M68K_IC_SIZE];   /* instruction cache address data */
359359   UINT32 ic_data[M68K_IC_SIZE];      /* instruction cache content data */
360   bool   ic_valid[M68K_IC_SIZE];      /* instruction cache valid flags */
360   bool   ic_valid[M68K_IC_SIZE];     /* instruction cache valid flags */
361361
362362
363363
branches/kale/src/emu/cpu/m68000/m68kcpu.h
r244614r244615
689689      if (m68k->cpu_type & (CPU_TYPE_EC020 | CPU_TYPE_020))
690690      {
691691         UINT32 tag = (address >> 8) | (m68k->s_flag ? 0x1000000 : 0);
692         int idx = (address >> 2) & 0x3f;   // 1-of-64 select
692         int idx = (address >> 2) & 0x3f;    // 1-of-64 select
693693
694694         // do a cache fill if the line is invalid or the tags don't match
695695         if ((!m68k->ic_valid[idx]) || (m68k->ic_address[idx] != tag))
696696         {
697697            m68k->ic_data[idx] = m68k->read32(address & ~3);
698698
699//            printf("m68k: doing cache fill at %08x (tag %08x idx %d)\n", address, tag, idx);
699//              printf("m68k: doing cache fill at %08x (tag %08x idx %d)\n", address, tag, idx);
700700
701701            // if no buserror occured, validate the tag
702702            if (!m68k->mmu_tmp_buserror_occurred)
branches/kale/src/emu/cpu/ucom4/ucom4.c
r244614r244615
33/*
44
55  NEC uCOM-4 MCU family cores
6 
6
77  References:
88  - 1981 NEC Microcomputers Catalog (later editions may have errors!)
99  - Supplement to uCOM-43 Single Chip Microcomputer Users' Manual
r244614r244615
2020   NEC_UCOM43 = 0,
2121   NEC_UCOM44,
2222   NEC_UCOM45
23};   
23};
2424
2525#include "ucom4.h"
2626#include "debugger.h"
r244614r244615
115115void ucom4_cpu_device::device_start()
116116{
117117   assert(NEC_UCOM4_PORTA == 0);
118   
118
119119   m_program = &space(AS_PROGRAM);
120120   m_data = &space(AS_DATA);
121121   m_prgmask = (1 << m_prgwidth) - 1;
r244614r244615
195195   m_skip = false;
196196
197197   m_timer->adjust(attotime::never);
198   
198
199199   // clear interrupt
200200   m_int_line = CLEAR_LINE;
201201   m_int_f = 0;
202202   m_inte_f = (m_family == NEC_UCOM43) ? 0 : 1;
203   
203
204204   // clear i/o
205205   for (int i = NEC_UCOM4_PORTC; i <= NEC_UCOM4_PORTI; i++)
206206      output_w(i, 0xf);
r244614r244615
221221         if (m_int_line == CLEAR_LINE && state)
222222            m_int_f = 1;
223223         m_int_line = state;
224         
224
225225         break;
226     
226
227227      default:
228228         break;
229229   }
r244614r244615
273273      m_bitmask = 1 << (m_op & 0x03);
274274      increment_pc();
275275      fetch_arg();
276     
276
277277      if (m_skip)
278278      {
279279         m_skip = false;
280280         m_op = 0; // nop
281281      }
282     
282
283283      // handle opcode
284284      switch (m_op & 0xf0)
285285      {
r244614r244615
287287         case 0x90: op_li(); break;
288288         case 0xa0: op_jmpcal(); break;
289289         case 0xb0: op_czp(); break;
290         
290
291291         case 0xc0: case 0xd0: case 0xe0: case 0xf0: op_jcp(); break;
292         
292
293293         default:
294294            switch (m_op)
295295            {
r244614r244615
374374         case 0x7c: op_sfb(); break;
375375            }
376376            break; // 0xfc
377           
377
378378            }
379379            break; // 0xff
380380
branches/kale/src/emu/cpu/ucom4/ucom4.h
r244614r244615
143143   bool m_skip;            // skip next opcode
144144   int m_icount;
145145   emu_timer *m_timer;
146   
146
147147   UINT16 m_pc;            // program counter
148148   UINT8 m_acc;            // 4-bit accumulator
149149   UINT8 m_dpl;            // 4-bit data pointer low (RAM x)
r244614r244615
169169   devcb_write8 m_write_g;
170170   devcb_write8 m_write_h;
171171   devcb_write8 m_write_i;
172   
172
173173   // misc internal helpers
174174   void increment_pc();
175175   void fetch_arg();
branches/kale/src/emu/cpu/ucom4/ucom4d.c
r244614r244615
121121
122122   char *dst = buffer;
123123   dst += sprintf(dst, "%-4s ", s_mnemonics[instr]);
124   
124
125125   // opcode parameter
126126   int bits = s_bits[instr];
127127   if (bits)
r244614r244615
133133         param = (param << (bits / 10)) | (op2 & ((1 << (bits / 10)) - 1));
134134         bits = (bits % 10) + (bits / 10);
135135      }
136     
136
137137      // special case for CZP
138138      if (instr == mCZP)
139139      {
branches/kale/src/emu/cpu/ucom4/ucom4op.inc
r244614r244615
3232{
3333   index &= 0xf;
3434   UINT8 inp = 0xf;
35   
35
3636   switch (index)
3737   {
3838      case NEC_UCOM4_PORTA: inp = m_read_a(index, 0xff); break;
r244614r244615
6262      case NEC_UCOM4_PORTG: m_write_g(index, data, 0xff); break;
6363      case NEC_UCOM4_PORTH: m_write_h(index, data, 0xff); break;
6464      case NEC_UCOM4_PORTI: m_write_i(index, data & 7, 0xff); break;
65     
65
6666      default:
6767         logerror("%s write to unknown port %c = $%X at $%03X\n", tag(), 'A' + index, data & 0xf, m_pc);
6868         break;
r244614r244615
370370{
371371   // CI X: skip next on ACC equals X
372372   m_skip = (m_acc == (m_arg & 0x0f));
373   
373
374374   if ((m_arg & 0xf0) != 0xc0)
375375      logerror("%s CI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc);
376376}
r244614r244615
397397{
398398   // CLI X: skip next on DPl equals X
399399   m_skip = (m_dpl == (m_arg & 0x0f));
400   
400
401401   if ((m_arg & 0xf0) != 0xe0)
402402      logerror("%s CLI opcode unexpected upper arg $%02X at $%03X\n", tag(), m_arg & 0xf0, m_pc);
403403}
r244614r244615
530530void ucom4_cpu_device::op_taz()
531531{
532532   if (!check_op_43()) return;
533   
533
534534   // TAZ: Transfer ACC to Z
535535   m_icount--;
536536   ucom43_reg_w(UCOM43_Z, m_acc);
r244614r244615
539539void ucom4_cpu_device::op_thx()
540540{
541541   if (!check_op_43()) return;
542   
542
543543   // THX: Transfer DPh to X
544544   m_icount--;
545545   ucom43_reg_w(UCOM43_X, m_dph);
r244614r244615
548548void ucom4_cpu_device::op_tly()
549549{
550550   if (!check_op_43()) return;
551   
551
552552   // TLY: Transfer DPl to Y
553553   m_icount--;
554554   ucom43_reg_w(UCOM43_Y, m_dpl);
r244614r244615
560560void ucom4_cpu_device::op_xaw()
561561{
562562   if (!check_op_43()) return;
563   
563
564564   // XAW: Exchange ACC with W
565565   m_icount--;
566566   UINT8 old_acc = m_acc;
r244614r244615
571571void ucom4_cpu_device::op_xaz()
572572{
573573   if (!check_op_43()) return;
574   
574
575575   // XAZ: Exchange ACC with Z
576576   m_icount--;
577577   UINT8 old_acc = m_acc;
r244614r244615
582582void ucom4_cpu_device::op_xhr()
583583{
584584   if (!check_op_43()) return;
585   
585
586586   // XHR: Exchange DPh with R
587587   m_icount--;
588588   UINT8 old_dph = m_dph;
r244614r244615
593593void ucom4_cpu_device::op_xhx()
594594{
595595   if (!check_op_43()) return;
596   
596
597597   // XHX: Exchange DPh with X
598598   m_icount--;
599599   UINT8 old_dph = m_dph;
r244614r244615
604604void ucom4_cpu_device::op_xls()
605605{
606606   if (!check_op_43()) return;
607   
607
608608   // XLS: Exchange DPl with S
609609   m_icount--;
610610   UINT8 old_dpl = m_dpl;
r244614r244615
615615void ucom4_cpu_device::op_xly()
616616{
617617   if (!check_op_43()) return;
618   
618
619619   // XLY: Exchange DPl with Y
620620   m_icount--;
621621   UINT8 old_dpl = m_dpl;
r244614r244615
626626void ucom4_cpu_device::op_xc()
627627{
628628   if (!check_op_43()) return;
629   
629
630630   // XC: Exchange Carry F/F with Carry Save F/F
631631   UINT8 c = m_carry_f;
632632   m_carry_f = m_carry_s_f;
r244614r244615
639639void ucom4_cpu_device::op_sfb()
640640{
641641   if (!check_op_43()) return;
642   
642
643643   // SFB B: Set a single bit of FLAG
644644   m_icount--;
645645   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) | m_bitmask);
r244614r244615
648648void ucom4_cpu_device::op_rfb()
649649{
650650   if (!check_op_43()) return;
651   
651
652652   // RFB B: Reset a single bit of FLAG
653653   m_icount--;
654654   ucom43_reg_w(UCOM43_F, ucom43_reg_r(UCOM43_F) & ~m_bitmask);
r244614r244615
657657void ucom4_cpu_device::op_fbt()
658658{
659659   if (!check_op_43()) return;
660   
660
661661   // FBT B: skip next on bit(FLAG)
662662   m_icount--;
663663   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) != 0);
r244614r244615
666666void ucom4_cpu_device::op_fbf()
667667{
668668   if (!check_op_43()) return;
669   
669
670670   // FBF B: skip next on not bit(FLAG)
671671   m_icount--;
672672   m_skip = ((ucom43_reg_r(UCOM43_F) & m_bitmask) == 0);
r244614r244615
678678void ucom4_cpu_device::op_rar()
679679{
680680   if (!check_op_43()) return;
681   
681
682682   // RAR: Rotate ACC Right through Carry F/F
683683   UINT8 c = m_acc & 1;
684684   m_acc = m_acc >> 1 | m_carry_f << 3;
r244614r244615
691691void ucom4_cpu_device::op_inm()
692692{
693693   if (!check_op_43()) return;
694   
694
695695   // INM: Increment RAM, skip next on carry
696696   UINT8 val = (ram_r() + 1) & 0xf;
697697   ram_w(val);
r244614r244615
701701void ucom4_cpu_device::op_dem()
702702{
703703   if (!check_op_43()) return;
704   
704
705705   // DEM: Decrement RAM, skip next on carry
706706   UINT8 val = (ram_r() - 1) & 0xf;
707707   ram_w(val);
r244614r244615
714714void ucom4_cpu_device::op_stm()
715715{
716716   if (!check_op_43()) return;
717   
717
718718   // STM X: Reset Timer F/F, Start Timer with X
719719   m_timer_f = 0;
720720
r244614r244615
730730void ucom4_cpu_device::op_ttm()
731731{
732732   if (!check_op_43()) return;
733   
733
734734   // TTM: skip next on Timer F/F
735735   m_skip = (m_timer_f != 0);
736736}
r244614r244615
741741void ucom4_cpu_device::op_ei()
742742{
743743   if (!check_op_43()) return;
744   
744
745745   // EI: Set Interrupt Enable F/F
746746   m_inte_f = 1;
747747}
r244614r244615
749749void ucom4_cpu_device::op_di()
750750{
751751   if (!check_op_43()) return;
752   
752
753753   // DI: Reset Interrupt Enable F/F
754754   m_inte_f = 0;
755755}
branches/kale/src/emu/debug/dvbpoints.c
r244614r244615
234234      m_total.y = 10;
235235
236236   // Draw
237   debug_view_char   *dest = m_viewdata;
238   astring         linebuf;
237   debug_view_char *dest = m_viewdata;
238   astring         linebuf;
239239
240240   // Header
241241   if (m_visible.y > 0)
branches/kale/src/emu/debug/dvwpoints.c
r244614r244615
261261      m_total.y = 10;
262262
263263   // Draw
264   debug_view_char   *dest = m_viewdata;
265   astring         linebuf;
264   debug_view_char *dest = m_viewdata;
265   astring         linebuf;
266266
267267   // Header
268268   if (m_visible.y > 0)
branches/kale/src/emu/drivers/xtal.h
r244614r244615
5757   XTAL_2_5MHz         = 2500000,      /* Janken Man units */
5858   XTAL_3MHz           = 3000000,      /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */
5959   XTAL_3_12MHz        = 3120000,      /* SP0250 clock on Gottlieb games */
60   XTAL_3_5MHz         = 3500000,      /* Reported by Commodore 65 document, true xtal unchecked on PCB */
60   XTAL_3_5MHz         = 3500000,      /* Reported by Commodore 65 document, true xtal unchecked on PCB */
6161   XTAL_3_52128MHz     = 3521280,      /* RCA COSMAC VIP */
6262   XTAL_3_579545MHz    = 3579545,      /* NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */
6363   XTAL_3_6864MHz      = 3686400,      /* CPS3 */
branches/kale/src/emu/fileio.h
r244614r244615
154154   astring         m_fullpath;                     // full filename
155155   core_file *     m_file;                         // core file pointer
156156   path_iterator   m_iterator;                     // iterator for paths
157   path_iterator   m_mediapaths;         // media-path iterator
157   path_iterator   m_mediapaths;           // media-path iterator
158158   UINT32          m_crc;                          // file's CRC
159159   UINT32          m_openflags;                    // flags we used for the open
160160   hash_collection m_hashes;                       // collection of hashes
r244614r244615
168168   UINT64          m__7zlength;                    // 7Z file length
169169
170170   bool            m_remove_on_close;              // flag: remove the file when closing
171   bool      m_restrict_to_mediapath;   // flag: restrict to paths inside the media-path
171   bool        m_restrict_to_mediapath;    // flag: restrict to paths inside the media-path
172172};
173173
174174
branches/kale/src/emu/machine/jvshost.c
r244614r244615
4848   // - have the message length without the two header bytes but with the checksum byte in the second byte
4949   // - have at least one command byte
5050   if(send_size < 3 || send_buffer[0] == 0x00 || send_buffer[1] != send_size-1) {
51                logerror("JVS checksum error\n");
52                // "This message is crap" doesn't exist so call it checksum error
53                recv_buffer[0] = 0x00;
54                recv_buffer[1] = 0x02;
55                recv_buffer[2] = 0x03;
56                recv_size = 3;
57        } else {
51            logerror("JVS checksum error\n");
52            // "This message is crap" doesn't exist so call it checksum error
53            recv_buffer[0] = 0x00;
54            recv_buffer[1] = 0x02;
55            recv_buffer[2] = 0x03;
56            recv_size = 3;
57      } else {
5858      if(first_device) {
5959         first_device->message(send_buffer[0], send_buffer+2, send_size-2, recv_buffer+2, recv_size);
6060         recv_is_encoded = false;
branches/kale/src/emu/render.h
r244614r244615
338338   float               width;              // width (for line primitives)
339339   render_texinfo      texture;            // texture info (for quad primitives)
340340   render_quad_texuv   texcoords;          // texture coordinates (for quad primitives)
341   render_container *   container;         // the render container we belong to
341   render_container *  container;          // the render container we belong to
342342
343343private:
344344   // internal state
branches/kale/src/emu/sound/saa1099.c
r244614r244615
161161
162162   /* for each chip allocate one stream */
163163   m_stream = stream_alloc(0, 2, m_sample_rate);
164   
164
165165   save_item(NAME(m_noise_params));
166166   save_item(NAME(m_env_enable));
167167   save_item(NAME(m_env_reverse_right));
r244614r244615
172172   save_item(NAME(m_all_ch_enable));
173173   save_item(NAME(m_sync_state));
174174   save_item(NAME(m_selected_reg));
175   
175
176176   for (int i = 0; i < 6; i++)
177177   {
178178      save_item(NAME(m_channels[i].frequency), i);
r244614r244615
185185      save_item(NAME(m_channels[i].freq), i);
186186      save_item(NAME(m_channels[i].level), i);
187187   }
188   
188
189189   for (int i = 0; i < 2; i++)
190190   {
191191      save_item(NAME(m_noise[i].counter), i);
branches/kale/src/emu/video.c
r244614r244615
10481048         if (filerr == FILERR_NONE)
10491049            save_snapshot(machine().first_screen(), file);
10501050      }
1051        //printf("Scheduled exit at %f\n", emutime.as_double());
1051      //printf("Scheduled exit at %f\n", emutime.as_double());
10521052      // schedule our demise
10531053      machine().schedule_exit();
10541054   }
branches/kale/src/emu/video/scn2674.c
r244614r244615
699699
700700            if (!m_display_cb.isnull())
701701               m_display_cb(m_bitmap,
702                            i * m_hpixels_per_column,
703                            m_linecounter,
704                            tilerow,
705                            space().read_byte(address),
706                            address,
707                            (charrow >= m_IR6_cursor_first_scanline) && m_cursor_on,
708                            dw != 0,
709                            m_gfx_enabled != 0,
710                            charrow == m_IR7_cursor_underline_position,
711                            m_IR7_cursor_blink && (m_screen->frame_number() & (m_IR7_cursor_rate_divisor ? 0x40 : 0x20)));
702                           i * m_hpixels_per_column,
703                           m_linecounter,
704                           tilerow,
705                           space().read_byte(address),
706                           address,
707                           (charrow >= m_IR6_cursor_first_scanline) && m_cursor_on,
708                           dw != 0,
709                           m_gfx_enabled != 0,
710                           charrow == m_IR7_cursor_underline_position,
711                           m_IR7_cursor_blink && (m_screen->frame_number() & (m_IR7_cursor_rate_divisor ? 0x40 : 0x20)));
712712            address = (address + 1) & 0xffff;
713713
714714            if(address > ((m_IR9_display_buffer_last_address << 10) | 0x3ff))
branches/kale/src/emu/video/scn2674.h
r244614r244615
1919#define SCN2674_DRAW_CHARACTER_MEMBER(_name) void _name(bitmap_rgb32 &bitmap, int x, int y, UINT8 linecount, UINT8 charcode, UINT16 address, UINT8 cursor, UINT8 dw, UINT8 lg, UINT8 ul, UINT8 blink)
2020
2121class scn2674_device : public device_t,
22                  public device_video_interface,
23                  public device_memory_interface
22                  public device_video_interface,
23                  public device_memory_interface
2424{
2525public:
2626   scn2674_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
branches/kale/src/lib/formats/ap2_dsk.c
r244614r244615
659659         else if (!memcmp(pascal2_block1, &sector_data[0x100], 4))
660660         {
661661            m_prodos_order = true;
662         }   // check for CP/M disks in ProDOS order
662         }   // check for CP/M disks in ProDOS order
663663         else if (!memcmp(cpm22_block1, &sector_data[0x100], 8))
664664         {
665665            m_prodos_order = true;
branches/kale/src/lib/lib.mak
r244614r244615
629629   $(LIBOBJ)/bgfx/common/imgui/imgui.o \
630630   $(LIBOBJ)/bgfx/common/nanovg/nanovg.o \
631631   $(LIBOBJ)/bgfx/common/nanovg/nanovg_bgfx.o \
632#   $(LIBOBJ)/bgfx/common/entry/cmd.o \
633#   $(LIBOBJ)/bgfx/common/entry/dbg.o \
634#   $(LIBOBJ)/bgfx/common/entry/entry.o \
635#   $(LIBOBJ)/bgfx/common/entry/entry_android.o \
636#   $(LIBOBJ)/bgfx/common/entry/entry_asmjs.o \
637#   $(LIBOBJ)/bgfx/common/entry/entry_linux.o \
638#   $(LIBOBJ)/bgfx/common/entry/entry_nacl.o \
639#   $(LIBOBJ)/bgfx/common/entry/entry_qnx.o \
640#   $(LIBOBJ)/bgfx/common/entry/entry_sdl.o \
641#   $(LIBOBJ)/bgfx/common/entry/entry_windows.o \
642#   $(LIBOBJ)/bgfx/common/entry/input.o \
632#   $(LIBOBJ)/bgfx/common/entry/cmd.o \
633#   $(LIBOBJ)/bgfx/common/entry/dbg.o \
634#   $(LIBOBJ)/bgfx/common/entry/entry.o \
635#   $(LIBOBJ)/bgfx/common/entry/entry_android.o \
636#   $(LIBOBJ)/bgfx/common/entry/entry_asmjs.o \
637#   $(LIBOBJ)/bgfx/common/entry/entry_linux.o \
638#   $(LIBOBJ)/bgfx/common/entry/entry_nacl.o \
639#   $(LIBOBJ)/bgfx/common/entry/entry_qnx.o \
640#   $(LIBOBJ)/bgfx/common/entry/entry_sdl.o \
641#   $(LIBOBJ)/bgfx/common/entry/entry_windows.o \
642#   $(LIBOBJ)/bgfx/common/entry/input.o \
643643
644644ifeq ($(TARGETOS),macosx)
645645   BGFXOBJS += $(LIBOBJ)/bgfx/glcontext_eagl.o
branches/kale/src/mame/audio/seibu.c
r244614r244615
489489   m_stream = machine().sound().stream_alloc(*this, 0, 1, clock());
490490   m_base = machine().root_device().memregion(m_rom_tag)->base();
491491   m_adpcm.reset();
492   
492
493493   save_item(NAME(m_current));
494494   save_item(NAME(m_end));
495495   save_item(NAME(m_nibble));
branches/kale/src/mame/audio/t5182.c
r244614r244615
169169void t5182_device::device_start()
170170{
171171   m_setirq_cb = timer_alloc(SETIRQ_CB);
172   
172
173173   save_item(NAME(m_irqstate));
174174   save_item(NAME(m_semaphore_main));
175175   save_item(NAME(m_semaphore_snd));
r244614r244615
314314{
315315   return INPUT_PORTS_NAME(t5182);
316316}
317   
318317
318
319319   // 4000-407F    RAM shared with main CPU
320320   // 4000 output queue length
321321   // 4001-4020 output queue
branches/kale/src/mame/audio/t5182.h
r244614r244615
2222   {
2323      SETIRQ_CB
2424   };
25   
25
2626   DECLARE_WRITE8_MEMBER(sound_irq_w );
2727   DECLARE_READ8_MEMBER(sharedram_semaphore_snd_r);
2828   DECLARE_WRITE8_MEMBER(sharedram_semaphore_main_acquire_w);
branches/kale/src/mame/drivers/armedf.c
r244614r244615
4949      01016E: btst    #$7, $60621.l ;check dsw2 ram copy bit 15 (debug feature?)
5050      010176: bne     $1017e
5151      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
52  btanb perhaps? Currently patched to work, might also be that DSW2 bit 7 is actually a MCU bit ready flag, so it
5353  definitely needs PCB tests.
5454
5555
r244614r244615
11781178
11791179   MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
11801180   MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
1181   
1181
11821182   MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0)
11831183
11841184   /* video hardware */
r244614r244615
12771277
12781278   MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
12791279   MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
1280   
1280
12811281   MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0)
12821282
12831283   /* video hardware */
r244614r244615
13711371
13721372   MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
13731373   MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
1374   
1374
13751375   MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0)
13761376
13771377   /* video hardware */
r244614r244615
14191419
14201420   MCFG_MACHINE_START_OVERRIDE(armedf_state,armedf)
14211421   MCFG_MACHINE_RESET_OVERRIDE(armedf_state,armedf)
1422   
1422
14231423   MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0)
14241424
14251425   /* video hardware */
r244614r244615
21282128   m_maincpu->space(AS_PROGRAM).install_write_handler(0x07c000, 0x07c001, write16_delegate(FUNC(armedf_state::bootleg_io_w),this));
21292129
21302130   m_scroll_type = 2;
2131   
2131
21322132   save_item(NAME(m_legion_cmd));
21332133}
21342134
branches/kale/src/mame/drivers/bnstars.c
r244614r244615
707707CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
708708{
709709   required_ioport_array<4> &keys = (param == 0) ? m_p1_keys : m_p2_keys;
710   
710
711711   switch (m_bnstars1_mahjong_select & 0x2080)
712712   {
713713      default:
branches/kale/src/mame/drivers/comebaby.c
r244614r244615
66
77  There also appears to be a sequel which may be running on the same hardware, but which does not seem to have been released.
88  Come On Baby - Ballympic Heroes!  (c) 2001
9 
9
1010  Other games in this series include:
1111  Come On Baby 2 (c) 2002
1212  Come On Baby Jr (c) 2003 (which seems to be otherwise identical to Come On Baby but in a smaller cabinet)
r244614r244615
2020  BIOS String: 07/03/2000-440BX-ITE8671-2A69KV3IC-00
2121  aka. BIOS-I-2M
2222  Award BIOS
23  B1120IAG.BIN   For Super IO = ITE 8671
24        Clock Gen IC : Winbond-39A
25        (Nov/2000 built)
26       
23  B1120IAG.BIN  For Super IO = ITE 8671
24        Clock Gen IC : Winbond-39A
25        (Nov/2000 built)
26
2727  CPU - Slot 1 Celeron 633MHz (66x9.5)
2828  Memory - 65536k SDRAM PC100
2929
3030  Brief motherboard overview (from PC Partner BXAS1-928 motherboard manual)
3131  --
32 
32
3333  HARDWARE CONFIGURATION
34  This motherboard is based on Intel 82440BX chipset. The chipset is a
35  highly integrated solution for a cost-effective and compact motherboard.
36  The motherboard supports standard DIMM module, PC-100 DIMM module or
37  Registered DIMM Module.
38 
34  This motherboard is based on Intel 82440BX chipset. The chipset is a
35  highly integrated solution for a cost-effective and compact motherboard.
36  The motherboard supports standard DIMM module, PC-100 DIMM module or
37  Registered DIMM Module.
38
3939  Features on-board include....
4040  super-I/O, Ultra DMA33 (Ultra DMA66 optional for VIA chipset), PCI bus master IDE, AGP Ver 1.0, PCI Ver 2.1 compliance,
4141  USB, VRM 8.4 compliance, ECC, ATX specification 2.01 compliance, hardware monitoring (optional), On-board PCI Sound
4242  Sub-system(optional, not populated). Supports PC-100 DIMM Module.
4343
4444  Key Features:
45 
45
4646  Processor
4747  - Full support for the Intel Pentium II & Intel Pentium III, Intel Celeron and Deschutes processors using Slot 1 connector.
4848  - Slot 1 connector for Intel Pentium II & Intel Pentium III microprocessors.
r244614r244615
5050
5151  CPU Speed Setting
5252  - Jumper setting or no jumper is needed to set for various speed of CPU (Factory optional).
53 
53
5454  VRM (Voltage Regulator Modules) on Board
5555  - Flexible motherboard design with on-board VRM 8.4, easy to upgrade with
5656  Future Intel Pentium II & Pentium III processors.
57 
57
5858  Cache
5959  - Pentium II & Pentium III Processor built-in L2 cache.
60 
60
6161  System Memory
6262  - Up to 384MB (SDRAM) or 768MB (Registered SDRAM) - for 440BX.
6363  - A total of three 168-pin DIMM sockets for 440BX.
6464  - Supports SDRAM (only for 66MHz bus speed).
6565  - Supports PC-100.
66 
66
6767  Memory Organization
6868  - Supports single-density DIMMs of 1MB, 2MB, 4MB, 8MB and 16MB depth (x64 or 72).
6969  - Supports double-density DIMMs of 2MB, 4MB, 8MB, 16MB and 32MB depth
7070  (x64 or 72).
7171  - Supports error checking correction (ECC) using parity DRAM modules (for 440BX).
7272  - Banks of different DRAM types depths can be mixed.
73 
73
7474  Expansion Slots
7575  - Supports SB-LINK Port for Creative Sound PCI Card.
7676  - 1 AGP slot (ver. 1.0, 1x/2x mode supported).
7777  - 5 PCI bus master slots (rev. 2.1 compliant, with 1 PCI slot sharing with 1 ISA slot)
7878  - 2 ISA slots (1 ISA slot sharing with 1 PCI slot).
79 
79
8080  On-Board I/O
8181  - Two PCI fast IDE ports supporting up to 4 ATA2, Ultra DMA33 IDE HDDs, Ultra DMA66 (optional only for VIA Chipset)
8282  IDE HDDs, CD-Roms, ZIP devices and LS-120 drives as boot drive.
r244614r244615
9191  - PS/2 mouse port.
9292  - Infrared (IrDA) support (via a header).
9393  - One Line / Speaker out, one Mic in, one Line in and MIDI / Gameport
94 
94
9595  System BIOS
9696  - 2MB flash BIOS supporting PnP, APM, ATAPI, ACPI and DMI;
9797  - Jumper selection for 5V or 12V flash memory voltage.
9898  - Auto detects and supports LBA hard disks with formatted capacities over
9999  8.4GB.
100100  - Easily upgradable by end-user.
101 
101
102102  Plug-and-Play
103103  - Supports Plug-and-Play Specification 1.1.
104104  - Plug-and-play for DOS, Windows 3.X, Windows 95 as well as Windows 98.
105105  - Fully steerable PCI interrupts.
106 
106
107107  Power Management
108108  - Supports SMM, APM and ACPI.
109109  - Break switch for instant suspend/resume on system operation.
r244614r244615
111111  - Supports WAKE-ON-LAN (WOL).
112112  - Supports Wake on Ring for External Modem.
113113  - Supports ATX specification 2.01.
114 
114
115115  Creative PCI Sound (optional, not populated)
116116  - Full DOS game support (DDMA, PC/PCI, CLS).
117117  - PCI 2.1 Bus Master, hardware sound acceleration.
r244614r244615
119119  - Full Duplex, 3D Enhancement, Software wavetable.
120120  - PNP and APM 1.2 support.
121121  - Win95/98, NT drivers ready.
122 
122
123123  Keyboard Password Turn ON
124124  - Special feature for system security.
125 
125
126126  System monitoring (optional)
127127  - Hardware monitoring circuitry is supported, provides voltages, temperature, fan speeds etc. monitoring.
128 
128
129129  --
130130
131131  The donor PC looks like a standard Windows 98 setup.
r244614r244615
140140  It uses DirectSound and the Microsoft MCI interfaces and 3dfx Glide for video.
141141  The PC that the game was dumped from has Sound Blaster and Ensoniq drivers,
142142  but it works fine with some other sound configurations.
143  The sound chip on the motherboard is not populated. There is a cheap Korean
144  sound card "CS-6500P Made In Korea OJU CTN CO LTD." plugged into one of the
143  The sound chip on the motherboard is not populated. There is a cheap Korean
144  sound card "CS-6500P Made In Korea OJU CTN CO LTD." plugged into one of the
145145  slots containing a CRYSTAL CS4281-CM chip.
146146  The donor PC has a "3dfxvoodoo3" driver installation directory, but it works
147147  fine with a Voodoo4 4500.
branches/kale/src/mame/drivers/cops.c
r244614r244615
889889
890890   ROM_REGION( 0x8000, "system", 0 )
891891   ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) )
892   
892
893893   DISK_REGION( "audiocd" )
894        DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP )
894      DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP )
895895
896896   DISK_REGION( "laserdisc" )
897        DISK_IMAGE_READONLY( "cops", 0, NO_DUMP )
897      DISK_IMAGE_READONLY( "cops", 0, NO_DUMP )
898898ROM_END
899899
900900ROM_START( copsuk )
r244614r244615
905905   ROM_LOAD( "cops_sys.dat", 0x0000, 0x8000, CRC(0060e5d0) SHA1(b8c9f6fde6a315e33fa7946e5d3bb4ea2fbe76a8) )
906906
907907   DISK_REGION( "audiocd" )
908        DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP )
908      DISK_IMAGE_READONLY( "copscd", 0, NO_DUMP )
909909
910910   DISK_REGION( "laserdisc" )
911        DISK_IMAGE_READONLY( "cops", 0, NO_DUMP )
911      DISK_IMAGE_READONLY( "cops", 0, NO_DUMP )
912912ROM_END
913913
914914ROM_START( revlatns )
r244614r244615
919919   ROM_LOAD( "revelations_sys.bin", 0x0000, 0x8000, CRC(43e5e3ec) SHA1(fa44b102b5aa7ad2421c575abdc67f1c29f23bc1) )
920920
921921   DISK_REGION( "laserdisc" )
922        DISK_IMAGE_READONLY( "revlatns", 0, NO_DUMP )
922      DISK_IMAGE_READONLY( "revlatns", 0, NO_DUMP )
923923ROM_END
924924
925925
branches/kale/src/mame/drivers/cps2.c
r244614r244615
494494      2 RCA cables from A-board CN L/R go in at the top. The audio goes through
495495      Mitsumi MM1326 series "Q Expander" ICs responsible for creating the 3D stereo
496496      effect. The 4-pin connector at the bottom goes to the cabinet speakers.
497     
497
498498      IC1 - don't know yet which chip is which
499499      IC2 - "
500500      IC3 - "
branches/kale/src/mame/drivers/cyclemb.c
r244614r244615
9797   required_device<cpu_device> m_audiocpu;
9898   required_device<gfxdecode_device> m_gfxdecode;
9999   required_device<palette_device> m_palette;
100   
100
101101   required_shared_ptr<UINT8> m_vram;
102102   required_shared_ptr<UINT8> m_cram;
103103   required_shared_ptr<UINT8> m_obj1_ram;
r244614r244615
121121   DECLARE_WRITE8_MEMBER(cyclemb_flip_w);
122122   DECLARE_READ8_MEMBER(skydest_i8741_0_r);
123123   DECLARE_WRITE8_MEMBER(skydest_i8741_0_w);
124   
124
125125   DECLARE_DRIVER_INIT(skydest);
126126   DECLARE_DRIVER_INIT(cyclemb);
127127   virtual void machine_start();
128128   virtual void machine_reset();
129129   DECLARE_PALETTE_INIT(cyclemb);
130   
130
131131   UINT32 screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
132132   UINT32 screen_update_skydest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
133133   void cyclemb_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/drivers/d9final.c
r244614r244615
3939
4040   required_device<cpu_device> m_maincpu;
4141   required_device<gfxdecode_device> m_gfxdecode;
42   
42
4343   required_shared_ptr<UINT8> m_lo_vram;
4444   required_shared_ptr<UINT8> m_hi_vram;
4545   required_shared_ptr<UINT8> m_cram;
46   
46
4747   tilemap_t *m_sc0_tilemap;
48   
48
4949   DECLARE_WRITE8_MEMBER(sc0_lovram);
5050   DECLARE_WRITE8_MEMBER(sc0_hivram);
5151   DECLARE_WRITE8_MEMBER(sc0_cram);
5252   DECLARE_WRITE8_MEMBER(bank_w);
5353   DECLARE_READ8_MEMBER(prot_latch_r);
54   
54
5555   TILE_GET_INFO_MEMBER(get_sc0_tile_info);
56   
56
5757   virtual void machine_start();
5858   virtual void video_start();
59   
59
6060   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6161};
6262
branches/kale/src/mame/drivers/darkmist.c
r244614r244615
229229   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", darkmist_state, scanline, "screen", 0, 1)
230230
231231   MCFG_DEVICE_ADD("t5182", T5182, 0)
232   
233232
233
234234   /* video hardware */
235235   MCFG_SCREEN_ADD("screen", RASTER)
236236   MCFG_SCREEN_REFRESH_RATE(60)
branches/kale/src/mame/drivers/dlair2.c
r244614r244615
205205ROM_START( dlair2 )
206206   ROM_REGION( 0x10000, "ipl", 0 )
207207   ROM_LOAD( "dl2_319.bin",     0x00000, 0x10000, CRC(e9453a1b) SHA1(eb1201abd0124f6edbabd49bec81af827369cb2c) )
208   
208
209209   DISK_REGION( "laserdisc" )
210210   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
211211ROM_END
r244614r244615
213213ROM_START( dlair2_319e )
214214   ROM_REGION( 0x10000, "ipl", 0 )
215215   ROM_LOAD( "dl2euro3.19.bin", 0x00000, 0x10000, CRC(cc23ad9f) SHA1(24add8f03749dcc27b1b166dc2e5d346534a0088) )
216   
216
217217   DISK_REGION( "laserdisc" )
218218   DISK_IMAGE_READONLY( "C-910-00002-00", 0, NO_DUMP )
219219ROM_END
branches/kale/src/mame/drivers/dreambal.c
r244614r244615
4848   DECLARE_DRIVER_INIT(dreambal);
4949   virtual void machine_start();
5050   virtual void machine_reset();
51   
51
5252   UINT32 screen_update_dreambal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5353   DECO16IC_BANK_CB_MEMBER(bank_callback);
5454
branches/kale/src/mame/drivers/exidyttl.c
r244614r244615
141141   ROM_LOAD( "attack.k6",     0x0000, 0x0100, CRC(e120839f) SHA1(74dc19a732238d35e467d814ead581a60463aaa2) )
142142ROM_END
143143
144ROM_START( attckexd2 )   //  These are likely an overdump, but we are waiting for confirmation before removing the files
144ROM_START( attckexd2 )  //  These are likely an overdump, but we are waiting for confirmation before removing the files
145145   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
146146
147147   ROM_REGION( 0x0400, "roms", ROMREGION_ERASE00 )
branches/kale/src/mame/drivers/expro02.c
r244614r244615
55  Used by the newer (or possibly older/original) revisions of Gals Panic
66  also the basis of the various Comad clones
77
8   Fantasia         1994 Comad
9   Super Model      1994 Comad
10   New Fantasia     1994 Comad
11   New Fantasia     1995 Comad (set 2)
12   Fantasy '95      1995 Hi-max Technology Inc. (Running on a Comad PCB)
13   Miss World '96   1996 Comad
14   Ms/Mr World '96  1996 Comad
15   Fantasia II      1997 Comad
16   
8    Fantasia         1994 Comad
9    Super Model      1994 Comad
10    New Fantasia     1994 Comad
11    New Fantasia     1995 Comad (set 2)
12    Fantasy '95      1995 Hi-max Technology Inc. (Running on a Comad PCB)
13    Miss World '96   1996 Comad
14    Ms/Mr World '96  1996 Comad
15    Fantasia II      1997 Comad
16
1717  The following seem similar but could have other changes
1818
19   Pocket Gal VIP /
20   Gals Hustler     1997 Ace International
21   Zip & Zap        1995 Barko Corp
22   
19    Pocket Gal VIP /
20    Gals Hustler     1997 Ace International
21    Zip & Zap        1995 Barko Corp
22
2323 Notes:
2424  - In gfx data banking function, some strange gfx are shown. Timing issue?
2525
r244614r244615
294294         /*
295295         else
296296         {
297            dest[x] = 0x0000;
297             dest[x] = 0x0000;
298298         }
299299         */
300300
r244614r244615
967967
968968static MACHINE_CONFIG_DERIVED( comad_noview2, comad )
969969   MCFG_DEVICE_REMOVE("view2_0")
970   
970
971971   MCFG_GFXDECODE_MODIFY("gfxdecode", expro02_noview2)
972972MACHINE_CONFIG_END
973973
r244614r244615
10011001   MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
10021002   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10031003
1004    MCFG_SCREEN_MODIFY("screen")
1005    MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap)
1004   MCFG_SCREEN_MODIFY("screen")
1005   MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap)
10061006MACHINE_CONFIG_END
10071007
10081008static MACHINE_CONFIG_DERIVED( zipzap, comad_noview2 )
r244614r244615
10121012   MCFG_OKIM6295_REPLACE("oki", 1056000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
10131013   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10141014
1015    MCFG_SCREEN_MODIFY("screen") // doesn't work with original kaneko_spr implementation
1016    MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap)
1015   MCFG_SCREEN_MODIFY("screen") // doesn't work with original kaneko_spr implementation
1016   MCFG_SCREEN_UPDATE_DRIVER(expro02_state, screen_update_zipzap)
10171017MACHINE_CONFIG_END
10181018
10191019/*************************************
r244614r244615
17641764 *************************************/
17651765
17661766DRIVER_INIT_MEMBER(expro02_state,expro02)
1767{   
1767{
17681768   UINT32 *src = (UINT32 *)memregion("gfx3" )->base();
17691769   UINT32 *dst = (UINT32 *)memregion("gfx2" )->base();
17701770   int x, offset;
branches/kale/src/mame/drivers/fuukifg3.c
r244614r244615
432432
433433static INPUT_PORTS_START( asurabusa )
434434   PORT_INCLUDE(asurabld)
435   
435
436436   PORT_MODIFY("INPUTS")
437437   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
438438   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
branches/kale/src/mame/drivers/galivan.c
r244614r244615
471471
472472   MCFG_MACHINE_START_OVERRIDE(galivan_state,ninjemak)
473473   MCFG_MACHINE_RESET_OVERRIDE(galivan_state,ninjemak)
474   
474
475475   MCFG_DEVICE_ADD("nb1414m4", NB1414M4, 0)
476476
477477   /* video hardware */
r244614r244615
507507
508508
509509MACHINE_CONFIG_DERIVED(youmab, ninjemak)
510   
510
511511   MCFG_DEVICE_REMOVE("nb1414m4")
512512MACHINE_CONFIG_END
513513/***************************************************************************
branches/kale/src/mame/drivers/galpani2.c
r244614r244615
125125   UINT8 *ROM = memregion("subdata")->base();
126126   membank("subdatabank")->configure_entries(0, 0x2000000/0x0800000, ROM, 0x0800000);
127127   membank("subdatabank")->set_entry(0);
128   
128
129129   save_item(NAME(m_eeprom_word));
130130   save_item(NAME(m_old_mcu_nmi1));
131131   save_item(NAME(m_old_mcu_nmi2));
branches/kale/src/mame/drivers/galpani3.c
r244614r244615
113113
114114
115115   virtual void video_start();
116   
116
117117   UINT32 screen_update_galpani3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
118118   TIMER_DEVICE_CALLBACK_MEMBER(galpani3_vblank);
119119   int gp3_is_alpha_pen(int pen);
r244614r244615
147147{
148148   /* so we can use video/sknsspr.c */
149149   m_spritegen->skns_sprite_kludge(0,0);
150   
150
151151   save_item(NAME(m_priority_buffer_scrollx));
152152   save_item(NAME(m_priority_buffer_scrolly));
153153   save_item(NAME(m_spriteram32));
branches/kale/src/mame/drivers/galpanic.c
r244614r244615
314314
315315GAME( 1990, galpanic, 0,        galpanic, galpanic,  driver_device, 0, ROT90, "Kaneko",                   "Gals Panic (Unprotected)", GAME_NO_COCKTAIL )
316316GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko",                   "Gals Panic (MCU Protected)", GAME_NO_COCKTAIL )
317
branches/kale/src/mame/drivers/gladiatr.c
r244614r244615
10321032      }
10331033   }
10341034   m_maincpu->space(AS_PROGRAM).install_read_handler(0xf6a3,0xf6a3,read8_delegate(FUNC(gladiatr_state::ppking_f6a3_r),this));
1035   
1035
10361036   save_item(NAME(m_data1));
10371037   save_item(NAME(m_data2));
10381038}
branches/kale/src/mame/drivers/gluck2.c
r244614r244615
211211
212212   required_device<cpu_device> m_maincpu;
213213   required_device<gfxdecode_device> m_gfxdecode;
214   
214
215215   required_shared_ptr<UINT8> m_videoram;
216216   required_shared_ptr<UINT8> m_colorram;
217   
217
218218   tilemap_t *m_bg_tilemap;
219   
219
220220   DECLARE_WRITE8_MEMBER(videoram_w);
221221   DECLARE_WRITE8_MEMBER(colorram_w);
222222   DECLARE_WRITE8_MEMBER(counters_w);
223223   TILE_GET_INFO_MEMBER(get_tile_info);
224   
224
225225   virtual void video_start();
226226   DECLARE_PALETTE_INIT(gluck2);
227   
227
228228   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
229229};
230230
branches/kale/src/mame/drivers/goodejan.c
r244614r244615
101101   tilemap_t *m_sc1_tilemap;
102102   tilemap_t *m_sc2_tilemap;
103103   tilemap_t *m_sc3_tilemap;
104   
104
105105   UINT16 m_mux_data;
106106   UINT16 m_seibucrtc_sc0bank;
107107   UINT16 m_layer_en;
108108   UINT16 m_scrollram[6];
109   
109
110110   DECLARE_WRITE16_MEMBER(gfxbank_w);
111111   DECLARE_READ16_MEMBER(mahjong_panel_r);
112112   DECLARE_WRITE16_MEMBER(mahjong_panel_w);
r244614r244615
116116   DECLARE_WRITE16_MEMBER(seibucrtc_sc3vram_w);
117117   DECLARE_WRITE16_MEMBER(layer_en_w);
118118   DECLARE_WRITE16_MEMBER(layer_scroll_w);
119   
119
120120   TILE_GET_INFO_MEMBER(seibucrtc_sc0_tile_info);
121121   TILE_GET_INFO_MEMBER(seibucrtc_sc1_tile_info);
122122   TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info);
123123   TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info);
124   
124
125125   INTERRUPT_GEN_MEMBER(irq);
126   
126
127127   void seibucrtc_sc0bank_w(UINT16 data);
128128   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int pri);
129129   virtual void video_start();
r244614r244615
355355   m_sc3_tilemap->set_transparent_pen(15);
356356
357357   m_seibucrtc_sc0bank = 0;
358   
358
359359   save_item(NAME(m_mux_data));
360360   save_item(NAME(m_seibucrtc_sc0bank));
361361   save_item(NAME(m_layer_en));
branches/kale/src/mame/drivers/gunsmoke.c
r244614r244615
587587GAME( 1985, gunsmoke,   0,        gunsmoke, gunsmoke,   driver_device, 0, ROT270, "Capcom",                   "Gun.Smoke (World, 851115)", GAME_SUPPORTS_SAVE ) // GSE_03
588588GAME( 1985, gunsmokeb,  gunsmoke, gunsmoke, gunsmoke,   driver_device, 0, ROT270, "bootleg",                  "Gun.Smoke (World, 851115) (bootleg)", GAME_SUPPORTS_SAVE ) // based  on above version, warning message patched out
589589GAME( 1985, gunsmokej,  gunsmoke, gunsmoke, gunsmoke,   driver_device, 0, ROT270, "Capcom",                   "Gun.Smoke (Japan, 851115)", GAME_SUPPORTS_SAVE ) // GSJ_03
590GAME( 1985, gunsmokeu,  gunsmoke, gunsmoke, gunsmoke,   driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 851115)", GAME_SUPPORTS_SAVE ) // GSR_03
590GAME( 1985, gunsmokeu,  gunsmoke, gunsmoke, gunsmoke,   driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 851115)", GAME_SUPPORTS_SAVE ) // GSR_03
591591GAME( 1986, gunsmokeua, gunsmoke, gunsmoke, gunsmokeua, driver_device, 0, ROT270, "Capcom (Romstar license)", "Gun.Smoke (US, 860408)", GAME_SUPPORTS_SAVE ) // GSA_03
branches/kale/src/mame/drivers/hornet.c
r244614r244615
535535             0x02 = ADDOR (ADC DOR)
536536             0x01 = ADDO (ADC DO)
537537         */
538         r = 0xf0;
538         r = 0xf0;
539539         if (m_lan_eeprom)
540540            r |= m_lan_eeprom->do_read() << 3;
541541         r |= m_adc12138->do_r(space, 0) | (m_adc12138->eoc_r(space, 0) << 2);
r244614r244615
987987   MCFG_QUANTUM_TIME(attotime::from_hz(6000))
988988
989989//  PCB description at top doesn't mention any EEPROM on the base board...
990//   MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
990//  MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
991991
992992   MCFG_DEVICE_ADD("voodoo0", VOODOO_1, STD_VOODOO_1_CLOCK)
993993   MCFG_VOODOO_FBMEM(2)
branches/kale/src/mame/drivers/igs011.c
r244614r244615
11031103   sp.install_rom(m_prot1_addr + 0, m_prot1_addr + 9, rom + m_prot1_addr);
11041104
11051105   m_prot1_addr = (data << 4) ^ 0x8340;
1106   
1106
11071107   prot_mem_range_set();
11081108}
11091109
11101110void igs011_state::prot_mem_range_set()
1111{   
1111{
11121112   address_space &sp = m_maincpu->space(AS_PROGRAM);
1113   
1113
11141114   // Add protection memory range
11151115   sp.install_write_handler(m_prot1_addr + 0, m_prot1_addr + 7, write16_delegate(FUNC(igs011_state::igs011_prot1_w), this));
11161116   sp.install_read_handler (m_prot1_addr + 8, m_prot1_addr + 9, read16_delegate(FUNC(igs011_state::igs011_prot1_r), this));
branches/kale/src/mame/drivers/limenko.c
r244614r244615
5252   optional_device<qs1000_device> m_qs1000;
5353   required_device<gfxdecode_device> m_gfxdecode;
5454   required_device<palette_device> m_palette;
55   
55
5656   required_shared_ptr<UINT32> m_mainram;
5757   required_shared_ptr<UINT32> m_fg_videoram;
5858   required_shared_ptr<UINT32> m_md_videoram;
r244614r244615
6060   required_shared_ptr<UINT32> m_spriteram;
6161   required_shared_ptr<UINT32> m_spriteram2;
6262   required_shared_ptr<UINT32> m_videoreg;
63   
63
6464   tilemap_t *m_bg_tilemap;
6565   tilemap_t *m_md_tilemap;
6666   tilemap_t *m_fg_tilemap;
67   
67
6868   int m_spriteram_bit;
6969   bitmap_ind16 m_sprites_bitmap;
7070   bitmap_ind8 m_sprites_bitmap_pri;
7171   int m_prev_sprites_count;
7272   UINT8 m_spotty_sound_cmd;
73   
73
7474   DECLARE_WRITE32_MEMBER(limenko_coincounter_w);
7575   DECLARE_WRITE32_MEMBER(bg_videoram_w);
7676   DECLARE_WRITE32_MEMBER(md_videoram_w);
r244614r244615
8989   DECLARE_WRITE8_MEMBER(qs1000_p1_w);
9090   DECLARE_WRITE8_MEMBER(qs1000_p2_w);
9191   DECLARE_WRITE8_MEMBER(qs1000_p3_w);
92   
92
9393   DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r);
9494
9595   DECLARE_DRIVER_INIT(common);
r244614r244615
9797   DECLARE_DRIVER_INIT(dynabomb);
9898   DECLARE_DRIVER_INIT(legendoh);
9999   DECLARE_DRIVER_INIT(spotty);
100   
100
101101   TILE_GET_INFO_MEMBER(get_bg_tile_info);
102102   TILE_GET_INFO_MEMBER(get_md_tile_info);
103103   TILE_GET_INFO_MEMBER(get_fg_tile_info);
104   
104
105105   virtual void video_start();
106106   UINT32 screen_update_limenko(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
107107   void draw_single_sprite(bitmap_ind16 &dest_bmp,const rectangle &clip,gfx_element *gfx,UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,int priority);
r244614r244615
505505
506506   m_sprites_bitmap.allocate(384,240);
507507   m_sprites_bitmap_pri.allocate(384,240);
508   
508
509509   save_item(NAME(m_spriteram_bit));
510510   save_item(NAME(m_prev_sprites_count));
511511}
r244614r244615
11461146   m_maincpu->space(AS_PROGRAM).install_read_handler(0x6626c, 0x6626f, read32_delegate(FUNC(limenko_state::spotty_speedup_r), this));
11471147
11481148   m_spriteram_bit = 1;
1149   
1149
11501150   save_item(NAME(m_spotty_sound_cmd));
11511151}
11521152
branches/kale/src/mame/drivers/lordgun.c
r244614r244615
10491049
10501050      rom[i] = x;
10511051   }
1052   
1052
10531053   save_item(NAME(m_old));
1054   
1054
10551055   for (int i = 0; i < 2; i++)
10561056   {
10571057      save_item(NAME(m_gun[i].scr_x), i);
branches/kale/src/mame/drivers/mastboy.c
r244614r244615
458458   required_device<msm5205_device> m_msm;
459459   required_device<gfxdecode_device> m_gfxdecode;
460460   required_device<palette_device> m_palette;
461   
461
462462   required_shared_ptr<UINT8> m_nvram;
463463   required_shared_ptr<UINT8> m_workram;
464464   required_shared_ptr<UINT8> m_tileram;
465465   required_shared_ptr<UINT8> m_colram;
466   
466
467467   UINT8* m_vram;
468468   UINT8 m_bank;
469469   int m_irq0_ack;
r244614r244615
503503void mastboy_state::video_start()
504504{
505505   m_gfxdecode->gfx(0)->set_source(m_vram);
506   
506
507507   save_pointer(NAME(m_vram), 0x10000);
508508}
509509
r244614r244615
877877void mastboy_state::machine_start()
878878{
879879   m_vram = memregion( "gfx1" )->base(); // makes decoding the RAM based tiles easier this way
880   
880
881881   save_item(NAME(m_bank));
882882   save_item(NAME(m_irq0_ack));
883883   save_item(NAME(m_backupram_enabled));
branches/kale/src/mame/drivers/mcr.c
r244614r244615
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   
2702
27032703   DISK_REGION( "ced_videodisc" )
2704        DISK_IMAGE_READONLY( "nflfoot", 0, NO_DUMP )
2704      DISK_IMAGE_READONLY( "nflfoot", 0, NO_DUMP )
27052705ROM_END
27062706
27072707
branches/kale/src/mame/drivers/namcops2.c
r244614r244615
571571   ROM_LOAD( "vpn3verb.ic002", 0x000000, 0x800000, CRC(d0011dc6) SHA1(d01a418b4b83057708e8f0ac4b271112b4a24d15) )
572572   ROM_LOAD( "vpn3verb_spr.ic002", 0x800000, 0x040000, CRC(41169c24) SHA1(40bffbe93da65fe5512be9f80254b034a071c38b) )
573573
574   DISK_REGION("dvd")   // actually single-track CD-ROM
574   DISK_REGION("dvd")  // actually single-track CD-ROM
575575   DISK_IMAGE_READONLY( "vpn1cd0", 0, SHA1(714bd19eee3b31a060223003e4567e405ce04cd7) )
576576ROM_END
577577
branches/kale/src/mame/drivers/naomi.c
r244614r244615
26702670 */
26712671/*
26722672static MACHINE_CONFIG_DERIVED( naomi2, naomi )
2673   MCFG_CPU_MODIFY("maincpu")
2674   MCFG_CPU_PROGRAM_MAP(naomi2_map)
2673    MCFG_CPU_MODIFY("maincpu")
2674    MCFG_CPU_PROGRAM_MAP(naomi2_map)
26752675MACHINE_CONFIG_END
26762676*/
26772677/*
r244614r244615
34673467   // 840-0016    1999     317-0262-JPN   Naomi
34683468   ROM_PARAMETER( ":rom_board:segam2crypt:key", "280fee35" )
34693469/*
3470   838-13661 RS422/RS232C BD DOC
3471   IC1 - Toshiba TMPZ84C015BF-10 Z80-based MCU
3472   IC6 - Toshiba TC551001CF-70L 128k x8 SRAM
3473   IC8 - Sega 315-5338A
3474   OSC1 - 19.680MHz OSC2 - 32.000MHz
3470    838-13661 RS422/RS232C BD DOC
3471    IC1 - Toshiba TMPZ84C015BF-10 Z80-based MCU
3472    IC6 - Toshiba TC551001CF-70L 128k x8 SRAM
3473    IC8 - Sega 315-5338A
3474    OSC1 - 19.680MHz OSC2 - 32.000MHz
34753475
3476   connected between Naomi motherboard and card reader/printer, accessed via MIE MCU ports 0x09-0x0d
3476    connected between Naomi motherboard and card reader/printer, accessed via MIE MCU ports 0x09-0x0d
34773477*/
34783478   ROM_REGION( 0x10000, "rs422_io", 0 )
34793479   ROM_LOAD( "epr-22083.ic7",  0x0000, 0x10000, CRC(c70b0de9) SHA1(329c924b4d29017482b1ecca839fb610ca20b2af) )
branches/kale/src/mame/drivers/nbmj9195.c
r244614r244615
37203720   ROM_LOAD( "6.bin",        0x020000, 0x010000, CRC(0fece809) SHA1(1fe8436af8ead02a3b517b6306f9824cd64b2d26) )
37213721   ROM_LOAD( "5.bin",        0x010000, 0x010000, CRC(0706386a) SHA1(29eee363775869dcc9c46285632e8bf745c9110b) )
37223722   ROM_LOAD( "4.bin",        0x000000, 0x010000, CRC(199e2127) SHA1(2514d51cb06438b312d1f328c72baa739280416a) )
3723   
3723
37243724   DISK_REGION( "laserdisc" )
3725        DISK_IMAGE_READONLY( "shabdama", 0, NO_DUMP )
3725      DISK_IMAGE_READONLY( "shabdama", 0, NO_DUMP )
37263726ROM_END
37273727
37283728//    YEAR, NAME,     PARENT,   MACHINE,  INPUT,    INIT,     MONITOR, COMPANY, FULLNAME, FLAGS
branches/kale/src/mame/drivers/nwk-tr.c
r244614r244615
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.
51Both Racing JAM/Chapter 2 and Thrill Drive use two video boards.
5252The top video board is set to MASTER/TWIN, lower video board is set to SLAVE
5353They are otherwise identical.
5454
r244614r244615
9191     DRM1M4SJ8 - Fujitsu 81C4256 256kx4 DRAM (SOJ24)
9292      SRAM256K - Cypress CY7C199 32kx8 SRAM (SOJ28)
9393     DRAM16X16 - Fujitsu 8118160A-60 16megx16 DRAM (SOJ42)
94      M48T58Y-70PC1 - ST Timekeeper RAM
94     M48T58Y-70PC1 - ST Timekeeper RAM
9595       RF5C400 - Ricoh RF5C400 PCM 32Ch, 44.1 kHz Stereo, 3D Effect Spatializer, clock input 16.9344MHz
9696        056800 - Konami Custom (QFP80)
9797        058232 - Konami Custom Ceramic Package (SIL14)
r244614r244615
130130           CN6 - DIN96 joining connector to lower PCB
131131           CN7 - Multi-pin connector (pads only, not used)
132132   CN9 to CN13 - Power Connectors
133       CN14 to CN17 - RCA Stereo Audio OUT
133      CN14 to CN17 - RCA Stereo Audio OUT
134134          CN18 - RCA Mono Audio OUT
135135          CN19 - USB Connector
136136
r244614r244615
161161|         CN1            |
162162|------------------------|
163163Notes:
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'
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'
176176
177     
177
178178Bottom Board (VIDEO PCB)
179179GN676 PWB(B)B
180180|-------------------------------------------------------------------------------------------|
r244614r244615
215215    TEXELFX - 3DFX 500-0004-02 BD0665.1 TMU (QFP208)
216216    PIXELFX - 3DFX 500-0003-03 F001701.1 FBI (QFP240)
217217     001604 - Konami Custom (QFP208)
218       MC44200FT - Motorola MC44200FT 3 Channel Video D/A Converter (QFP44)
218      MC44200FT - Motorola MC44200FT 3 Channel Video D/A Converter (QFP44)
219219    MACH111 - AMD MACH111 CPLD (Stamped '03161A', PLCC44)
220   PLCC44_SOCKET - empty PLCC44 socket
220   PLCC44_SOCKET - empty PLCC44 socket
221221     AV9170 - Integrated Circuit Systems Inc. Clock Multiplier (SOIC8)
222222     AM7201 - AMD AM7201 FIFO (PLCC32)
223223       PAL1 - AMD PALCE16V8 (stamped 'N676B4', DIP20)
branches/kale/src/mame/drivers/panicr.c
r244614r244615
8484   required_device<gfxdecode_device> m_gfxdecode;
8585   required_device<screen_device> m_screen;
8686   required_device<palette_device> m_palette;
87   
87
8888   required_shared_ptr<UINT8> m_mainram;
8989   required_shared_ptr<UINT8> m_spriteram;
9090   required_shared_ptr<UINT8> m_textram;
r244614r244615
112112   TILE_GET_INFO_MEMBER(get_infotile_info_3);
113113   TILE_GET_INFO_MEMBER(get_infotile_info_4);
114114   TILE_GET_INFO_MEMBER(get_txttile_info);
115   
115
116116   DECLARE_DRIVER_INIT(panicr);
117117   virtual void video_start();
118118   DECLARE_PALETTE_INIT(panicr);
119   
119
120120   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
121121   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect );
122   
122
123123   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
124124};
125125
r244614r244615
243243
244244   m_txttilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(panicr_state::get_txttile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 );
245245   m_txttilemap->configure_groups(*m_gfxdecode->gfx(0), 0);
246   
246
247247   save_item(NAME(m_scrollx));
248248}
249249
r244614r244615
609609   MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", panicr_state, scanline, "screen", 0, 1)
610610
611611   MCFG_DEVICE_ADD("t5182", T5182, 0)
612   
613612
613
614614   MCFG_SCREEN_ADD("screen", RASTER)
615615   MCFG_SCREEN_REFRESH_RATE(60)
616616   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
branches/kale/src/mame/drivers/peplus.c
r244614r244615
50175017ROM_START( peps0090 ) /* Normal board : Gold, Silver & Bronze (PS0090) - Payout 90.19% */
50185018   ROM_REGION( 0x10000, "maincpu", 0 )
50195019   ROM_LOAD( "ps0090_569-a2c.u68",   0x00000, 0x10000, CRC(5a727ff0) SHA1(6eed9d85620eff751c598d56807470f8753e8dd5) ) /* 3 Coins Max / 1 Line */
5020   
5020
50215021   ROM_REGION( 0x020000, "gfx1", 0 )
50225022   ROM_LOAD( "mro-cg1059.u72",   0x00000, 0x8000, CRC(96210de3) SHA1(10daa358f1fc507e9f4c788265c0acc57678fa40) ) /* Also contains graphics for Double Diamonds, use CAP1003 */
50235023   ROM_LOAD( "mgo-cg1059.u73",   0x08000, 0x8000, CRC(cfb9a357) SHA1(a390bed240960efd8da6e7815a0b0d272133f20f) )
branches/kale/src/mame/drivers/pipeline.c
r244614r244615
9898   UINT8 m_toMCU;
9999   UINT8 m_fromMCU;
100100   UINT8 m_ddrA;
101   
101
102102   DECLARE_WRITE8_MEMBER(vram2_w);
103103   DECLARE_WRITE8_MEMBER(vram1_w);
104104   DECLARE_WRITE8_MEMBER(mcu_portA_w);
r244614r244615
107107   DECLARE_WRITE8_MEMBER(vidctrl_w);
108108   DECLARE_READ8_MEMBER(protection_r);
109109   DECLARE_WRITE8_MEMBER(protection_w);
110   
110
111111   TILE_GET_INFO_MEMBER(get_tile_info);
112112   TILE_GET_INFO_MEMBER(get_tile_info2);
113   
113
114114   virtual void machine_start();
115115   virtual void video_start();
116116   DECLARE_PALETTE_INIT(pipeline);
117   
117
118118   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
119   
119
120120   TIMER_CALLBACK_MEMBER(protection_deferred_w);
121121};
122122
r244614r244615
153153   m_tilemap1 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
154154   m_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info2),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
155155   m_tilemap2->set_transparent_pen(0);
156   
156
157157   save_item(NAME(m_vidctrl));
158158   save_pointer(NAME(m_palram), 0x1000);
159159}
branches/kale/src/mame/drivers/progolf.c
r244614r244615
7878
7979   required_shared_ptr<UINT8> m_videoram;
8080   required_shared_ptr<UINT8> m_fbram;
81   
81
8282   UINT8 m_char_pen;
8383   UINT8 m_char_pen_vreg;
8484   UINT8 *m_fg_fb;
r244614r244615
8686   UINT8 m_scrollx_lo;
8787   UINT8 m_gfx_switch;
8888   UINT8 m_sound_cmd;
89   
89
9090   DECLARE_WRITE8_MEMBER(charram_w);
9191   DECLARE_WRITE8_MEMBER(char_vregs_w);
9292   DECLARE_WRITE8_MEMBER(scrollx_lo_w);
r244614r244615
9696   DECLARE_READ8_MEMBER(audio_command_r);
9797   DECLARE_READ8_MEMBER(videoram_r);
9898   DECLARE_WRITE8_MEMBER(videoram_w);
99   
99
100100   DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
101   
101
102102   virtual void machine_start();
103103   virtual void video_start();
104104   DECLARE_PALETTE_INIT(progolf);
105   
105
106106   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
107107};
108108
r244614r244615
118118   m_scrollx_lo = 0;
119119
120120   m_fg_fb = auto_alloc_array(machine(), UINT8, 0x2000*8);
121   
121
122122   save_item(NAME(m_char_pen));
123123   save_item(NAME(m_char_pen_vreg));
124124   save_pointer(NAME(m_fg_fb), 0x2000*8);
branches/kale/src/mame/drivers/quizo.c
r244614r244615
268268{
269269   m_videoram=auto_alloc_array(machine(), UINT8, 0x4000*2);
270270   membank("bank1")->configure_entries(0, 6, memregion("user1")->base(), 0x4000);
271   
271
272272   save_pointer(NAME(m_videoram), 0x4000*2);
273273   //save_item(NAME(m_port60));
274274   save_item(NAME(m_port70));
branches/kale/src/mame/drivers/rabbit.c
r244614r244615
114114   required_device<eeprom_serial_93cxx_device> m_eeprom;
115115   required_device<gfxdecode_device> m_gfxdecode;
116116   required_device<palette_device> m_palette;
117   
117
118118   required_shared_ptr<UINT32> m_viewregs0;
119119   required_shared_ptr<UINT32> m_viewregs6;
120120   required_shared_ptr<UINT32> m_viewregs7;
r244614r244615
124124   required_shared_ptr<UINT32> m_spriteregs;
125125   required_shared_ptr<UINT32> m_blitterregs;
126126   required_shared_ptr<UINT32> m_spriteram;
127   
127
128128   bitmap_ind16 *m_sprite_bitmap;
129129   rectangle m_sprite_clip;
130130   int m_vblirqlevel;
r244614r244615
132132   int m_banking;
133133   UINT32 *m_tilemap_ram[4];
134134   tilemap_t *m_tilemap[4];
135   
135
136136   DECLARE_WRITE32_MEMBER(tilemap0_w);
137137   DECLARE_WRITE32_MEMBER(tilemap1_w);
138138   DECLARE_WRITE32_MEMBER(tilemap2_w);
r244614r244615
145145   DECLARE_WRITE32_MEMBER(rombank_w);
146146   DECLARE_WRITE32_MEMBER(blitter_w);
147147   DECLARE_WRITE32_MEMBER(eeprom_write);
148   
148
149149   DECLARE_DRIVER_INIT(rabbit);
150   
150
151151   TILE_GET_INFO_MEMBER(get_tilemap0_tile_info);
152152   TILE_GET_INFO_MEMBER(get_tilemap1_tile_info);
153153   TILE_GET_INFO_MEMBER(get_tilemap2_tile_info);
154154   TILE_GET_INFO_MEMBER(get_tilemap3_tile_info);
155   
155
156156   INTERRUPT_GEN_MEMBER(vblank_interrupt);
157   
157
158158   virtual void video_start();
159   
159
160160   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
161161   inline void get_tilemap_info(tile_data &tileinfo, int tile_index, int whichtilemap, int tilesize);
162162   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
r244614r244615
437437
438438   m_sprite_bitmap = auto_bitmap_ind16_alloc(machine(),0x1000,0x1000);
439439   m_sprite_clip.set(0, 0x1000-1, 0, 0x1000-1);
440   
440
441441   save_pointer(NAME(m_tilemap_ram[0]), 0x20000/4);
442442   save_pointer(NAME(m_tilemap_ram[1]), 0x20000/4);
443443   save_pointer(NAME(m_tilemap_ram[2]), 0x20000/4);
branches/kale/src/mame/drivers/raiden2.c
r244614r244615
44
55    Seibu Protected 1993-94 era hardware, V30 based (sequel to the 68k based hardware)
66
7   TODO:
8   * zeroteam - sort-DMA doesn't seem to work too well, sprite-sprite priorities are broken as per now
7    TODO:
8    * zeroteam - sort-DMA doesn't seem to work too well, sprite-sprite priorities are broken as per now
99
10   * xsedae - it does an "8-liner"-style scroll during attract, doesn't work too well.
10    * xsedae - it does an "8-liner"-style scroll during attract, doesn't work too well.
1111
12   * sprite chip is the same as seibuspi.c and feversoc.c, needs device-ification and merging.
12    * sprite chip is the same as seibuspi.c and feversoc.c, needs device-ification and merging.
1313
14   * sprite chip also uses first entry for "something" that isn't sprite, some of them looks clipping
15     regions (150 - ff in zeroteam, 150 - 0 and 150 - 80 in raiden2). Latter probably do double buffering
16     on odd/even frames, by updating only top or bottom part of screen.
14    * sprite chip also uses first entry for "something" that isn't sprite, some of them looks clipping
15      regions (150 - ff in zeroteam, 150 - 0 and 150 - 80 in raiden2). Latter probably do double buffering
16      on odd/even frames, by updating only top or bottom part of screen.
1717
1818===========================================================================================================
1919
branches/kale/src/mame/drivers/ramtek.c
r244614r244615
1616 Trivia (1975/11)           YES
1717 Volly (1973/03?)           YES       500378A        500322A
1818 Wipe Out (1974/01)         YES       500986B/C      500963B/?
19
19
2020 Volly Industries Discrete Games List
2121 (Volly was Ramtek's Canada-based affiliate and distributor.)
2222
23 Game Name                                       Clone Of                         
23 Game Name                                       Clone Of
2424 ---------------------------------------------------------------------------------
2525 Batter Up (1974/??)                             Deluxe Baseball (Ramtek, 1975/06)
2626 Crossfire (1974/01) (registered trademark?)     Knock Out (Ramtek, 1974/09)?
r244614r244615
3131 Hockey (Cocktail) (1973/??)                     Soccer (Ramtek, 1973/11)
3232 Scoring (1973/11?)                              Soccer (Ramtek, 1973/11)?
3333 Tennis (1973/??)                                Volly (Ramtek, 1973/03?)
34
34
3535 *********************************************************************************/
3636
3737
branches/kale/src/mame/drivers/retofinv.c
r244614r244615
4040   save_item(NAME(m_main_irq_mask));
4141   save_item(NAME(m_sub_irq_mask));
4242   save_item(NAME(m_cpu2_m6000));
43   
43
4444   if (m_68705 != NULL) // only for the parent (with MCU)
4545   {
4646      save_item(NAME(m_from_main));
branches/kale/src/mame/drivers/segaorun.c
r244614r244615
23732373//   VIDEO BD 837-6906
23742374//
23752375// NOTE: This PCB set used EPROMs instead of the OPR (One time PRogram) used by other sets.
2376//       Same data so the rom numbers are the same, just labeled EPR-xxxxx versus OPR-xxxxx
2376//       Same data so the rom numbers are the same, just labeled EPR-xxxxx versus OPR-xxxxx
23772377//
23782378ROM_START( toutrunj1 )
23792379   ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code
branches/kale/src/mame/drivers/sengokmj.c
r244614r244615
8989   tilemap_t *m_sc1_tilemap;
9090   tilemap_t *m_sc2_tilemap;
9191   tilemap_t *m_sc3_tilemap;
92   
92
9393   UINT16 m_mux_data;
9494   UINT8 m_hopper_io;
9595   UINT16 m_layer_en;
9696   UINT16 m_scrollram[6];
97   
97
9898   DECLARE_READ16_MEMBER(mahjong_panel_r);
9999   DECLARE_WRITE16_MEMBER(mahjong_panel_w);
100100   DECLARE_WRITE16_MEMBER(out_w);
r244614r244615
105105   DECLARE_WRITE16_MEMBER(seibucrtc_sc3vram_w);
106106   DECLARE_WRITE16_MEMBER(layer_en_w);
107107   DECLARE_WRITE16_MEMBER(layer_scroll_w);
108   
108
109109   TILE_GET_INFO_MEMBER(seibucrtc_sc0_tile_info);
110110   TILE_GET_INFO_MEMBER(seibucrtc_sc1_tile_info);
111111   TILE_GET_INFO_MEMBER(seibucrtc_sc2_tile_info);
112112   TILE_GET_INFO_MEMBER(seibucrtc_sc3_tile_info);
113   
113
114114   INTERRUPT_GEN_MEMBER(interrupt);
115115
116116   virtual void machine_start();
branches/kale/src/mame/drivers/sidepckt.c
r244614r244615
488488   m_prot_table[0] = sidepckt_prot_table_1;
489489   m_prot_table[1] = sidepckt_prot_table_2;
490490   m_prot_table[2] = sidepckt_prot_table_3;
491   
491
492492   save_item(NAME(m_i8751_return));
493493   save_item(NAME(m_current_ptr));
494494   save_item(NAME(m_current_table));
r244614r244615
501501   m_prot_table[0] = sidepcktj_prot_table_1;
502502   m_prot_table[1] = sidepcktj_prot_table_2;
503503   m_prot_table[2] = sidepcktj_prot_table_3;
504   
504
505505   save_item(NAME(m_i8751_return));
506506   save_item(NAME(m_current_ptr));
507507   save_item(NAME(m_current_table));
branches/kale/src/mame/drivers/silvmil.c
r244614r244615
296296   PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6" ) /* Listed as "Unused" */
297297   PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7" ) /* Listed as "Unused" */
298298   PORT_DIPUNUSED_DIPLOC( 0x0080, 0x0080, "SW1:8" ) /* Listed as "Unused" */
299   PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
299   PORT_DIPNAME( 0x0300, 0x0100, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
300300   PORT_DIPSETTING(      0x0300, DEF_STR( Very_Easy ) )       /* Initial start time 40 secs */
301301   PORT_DIPSETTING(      0x0200, DEF_STR( Easy ) )            /* Initial start time 30 secs - Other in game effects?? */
302302   PORT_DIPSETTING(      0x0100, DEF_STR( Hard ) )            /* Initial start time 30 secs - Other in game effects?? */
303303   PORT_DIPSETTING(      0x0000, DEF_STR( Very_Hard ) )       /* Initial start time 30 secs - Other in game effects?? */
304   PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coinage ) )   PORT_DIPLOCATION("SW2:3,4,5")
304   PORT_DIPNAME( 0x1c00, 0x1c00, DEF_STR( Coinage ) )  PORT_DIPLOCATION("SW2:3,4,5")
305305   PORT_DIPSETTING(      0x1000, DEF_STR( 4C_1C ) )
306306   PORT_DIPSETTING(      0x1400, DEF_STR( 3C_1C ) )
307307   PORT_DIPSETTING(      0x0000, DEF_STR( 4C_2C ) ) /* Works the same as 2C/1C */
branches/kale/src/mame/drivers/skeetsht.c
r244614r244615
44
55    Notes:
66        Pop Shot is a prototype sequel (or upgrade) to Skeet Shot
7       
7
88        Supposedly Skeet Shot used a laserdisc to supply video for eight
99        different background "scenes". Pop Shot probably did too, in that case.
1010
r244614r244615
266266   ROM_REGION16_LE( 0x200000, "tms", 0 )
267267   ROM_LOAD16_BYTE( "even_v1.2.u14", 0x000000, 0x40000, CRC(c7c9515e) SHA1(ce3e813c15085790d5335d9fc751b3cc5b617b20) )
268268   ROM_LOAD16_BYTE( "odd_v1.2.u13",  0x000001, 0x40000, CRC(ea4402fb) SHA1(b0b6b191a8b48bead660a385c638363943a6ffe2) )
269   
269
270270   DISK_REGION( "laserdisc" )
271        DISK_IMAGE_READONLY( "skeetsht", 0, NO_DUMP ) // unknown disc label?
271      DISK_IMAGE_READONLY( "skeetsht", 0, NO_DUMP ) // unknown disc label?
272272ROM_END
273273
274274ROM_START( popshot )
r244614r244615
281281   ROM_LOAD16_BYTE( "popshot_tms34_odd.u13",  0x000001, 0x80000, CRC(82d616d8) SHA1(83ab33727ebab882b79c9ebd3557e2c319b3387a) )
282282
283283   DISK_REGION( "laserdisc" )
284        DISK_IMAGE_READONLY( "popshot", 0, NO_DUMP ) // unknown disc label?
284      DISK_IMAGE_READONLY( "popshot", 0, NO_DUMP ) // unknown disc label?
285285ROM_END
286286
287287
branches/kale/src/mame/drivers/skyarmy.c
r244614r244615
5050   required_shared_ptr<UINT8> m_colorram;
5151   required_shared_ptr<UINT8> m_spriteram;
5252   required_shared_ptr<UINT8> m_scrollram;
53   
53
5454   tilemap_t* m_tilemap;
5555   int m_nmi;
56   
56
5757   DECLARE_WRITE8_MEMBER(flip_screen_x_w);
5858   DECLARE_WRITE8_MEMBER(flip_screen_y_w);
5959   DECLARE_WRITE8_MEMBER(videoram_w);
6060   DECLARE_WRITE8_MEMBER(colorram_w);
6161   DECLARE_WRITE8_MEMBER(nmi_enable_w);
62   
62
6363   TILE_GET_INFO_MEMBER(get_tile_info);
64   
64
6565   virtual void machine_start();
6666   virtual void video_start();
6767   DECLARE_PALETTE_INIT(skyarmy);
68   
68
6969   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
70   
70
7171   INTERRUPT_GEN_MEMBER(nmi_source);
7272};
7373
branches/kale/src/mame/drivers/snowbros.c
r244614r244615
28532853         buffer[i] = src[BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,3,4,1,2,0)];
28542854      memcpy(src,buffer,len);
28552855   }
2856   
2856
28572857   save_item(NAME(m_sb3_music_is_playing));
28582858   save_item(NAME(m_sb3_music));
28592859}
branches/kale/src/mame/drivers/statriv2.c
r244614r244615
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   
980
981981   DISK_REGION( "laserdisc")
982982   DISK_IMAGE_READONLY("cstripxi", 0, NO_DUMP )
983983ROM_END
branches/kale/src/mame/drivers/taitottl.c
r244614r244615
156156/*
157157
158158 Gunman
159
159
160160 label  loc. Part #
161161 ==========================================================
162162 CR11   N5  74s287      yes, it says CRxx not GNxx
branches/kale/src/mame/drivers/tecmosys.c
r244614r244615
441441void tecmosys_state::machine_start()
442442{
443443   membank("bank1")->configure_entries(0, 16, memregion("audiocpu")->base(), 0x4000);
444   
444
445445   save_item(NAME(m_device_read_ptr));
446446   save_item(NAME(m_device_status));
447447   save_item(NAME(m_device_value));
branches/kale/src/mame/drivers/tmmjprd.c
r244614r244615
366366   m_tilemap_ram[1] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
367367   m_tilemap_ram[2] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
368368   m_tilemap_ram[3] = auto_alloc_array_clear(machine(), UINT32, 0x8000);
369   
370   
369
370
371371   save_pointer(NAME(m_tilemap_ram[0]), 0x8000);
372372   save_pointer(NAME(m_tilemap_ram[1]), 0x8000);
373373   save_pointer(NAME(m_tilemap_ram[2]), 0x8000);
374374   save_pointer(NAME(m_tilemap_ram[3]), 0x8000);
375   
375
376376   save_item(NAME(m_old_brt1));
377377   save_item(NAME(m_old_brt2));
378378}
branches/kale/src/mame/drivers/welltris.c
r244614r244615
689689void welltris_state::machine_start()
690690{
691691   membank("soundbank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x8000);
692   
692
693693   save_item(NAME(m_pending_command));
694694}
695695
branches/kale/src/mame/drivers/wink.c
r244614r244615
3030   required_device<cpu_device> m_maincpu;
3131   required_device<cpu_device> m_audiocpu;
3232   required_device<gfxdecode_device> m_gfxdecode;
33   
33
3434   required_shared_ptr<UINT8> m_videoram;
35   
35
3636   tilemap_t *m_bg_tilemap;
3737   UINT8 m_sound_flag;
3838   UINT8 m_tile_bank;
39   
39
4040   DECLARE_WRITE8_MEMBER(bgram_w);
4141   DECLARE_WRITE8_MEMBER(player_mux_w);
4242   DECLARE_WRITE8_MEMBER(tile_banking_w);
r244614r244615
4747   DECLARE_READ8_MEMBER(prot_r);
4848   DECLARE_WRITE8_MEMBER(prot_w);
4949   DECLARE_READ8_MEMBER(sound_r);
50   
50
5151   TILE_GET_INFO_MEMBER(get_bg_tile_info);
52   
52
5353   DECLARE_DRIVER_INIT(wink);
5454   virtual void machine_start();
5555   virtual void machine_reset();
5656   virtual void video_start();
57   
57
5858   UINT32 screen_update_wink(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
59   
59
6060   INTERRUPT_GEN_MEMBER(wink_sound);
6161};
6262
branches/kale/src/mame/drivers/xxmissio.c
r244614r244615
7979{
8080   membank("bank1")->configure_entries(0, 8, memregion("user1")->base(), 0x4000);
8181   membank("bank1")->set_entry(0);
82   
82
8383   save_item(NAME(m_status));
8484}
8585
branches/kale/src/mame/includes/bloodbro.h
r244614r244615
1414   required_device<cpu_device> m_maincpu;
1515   required_device<gfxdecode_device> m_gfxdecode;
1616   required_device<palette_device> m_palette;
17   
17
1818   required_shared_ptr<UINT16> m_spriteram;
1919   required_shared_ptr<UINT16> m_bgvideoram;
2020   required_shared_ptr<UINT16> m_fgvideoram;
r244614r244615
2222
2323   UINT16 m_scrollram[6];
2424   UINT16 m_layer_en;
25   
25
2626   tilemap_t *m_bg_tilemap;
2727   tilemap_t *m_fg_tilemap;
2828   tilemap_t *m_tx_tilemap;
r244614r244615
3232   DECLARE_WRITE16_MEMBER(txvideoram_w);
3333   DECLARE_WRITE16_MEMBER(layer_en_w);
3434   DECLARE_WRITE16_MEMBER(layer_scroll_w);
35   
35
3636   TILE_GET_INFO_MEMBER(get_bg_tile_info);
3737   TILE_GET_INFO_MEMBER(get_fg_tile_info);
3838   TILE_GET_INFO_MEMBER(get_tx_tile_info);
39   
39
4040   virtual void video_start();
41   
41
4242   UINT32 screen_update_bloodbro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4343   UINT32 screen_update_weststry(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4444   UINT32 screen_update_skysmash(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/includes/chaknpop.h
r244614r244615
4242   UINT8    m_gfxmode;
4343   UINT8    m_flip_x;
4444   UINT8    m_flip_y;
45   
45
4646   DECLARE_WRITE8_MEMBER(coinlock_w);
4747   DECLARE_READ8_MEMBER(mcu_port_a_r);
4848   DECLARE_READ8_MEMBER(mcu_port_b_r);
r244614r244615
5757   DECLARE_WRITE8_MEMBER(unknown_port_1_w);
5858   DECLARE_WRITE8_MEMBER(unknown_port_2_w);
5959   TILE_GET_INFO_MEMBER(get_tx_tile_info);
60   
60
6161   virtual void machine_start();
6262   virtual void machine_reset();
6363   virtual void video_start();
6464   DECLARE_PALETTE_INIT(chaknpop);
65   
65
6666   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6767   void tx_tilemap_mark_all_dirty();
6868   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
6969   void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect);
70   
70
7171   void mcu_update_seed(UINT8 data);
7272};
branches/kale/src/mame/includes/darkmist.h
r244614r244615
4444   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4545   void decrypt_gfx();
4646   void decrypt_snd();
47   
47
4848   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
4949};
branches/kale/src/mame/includes/dcon.h
r244614r244615
4444   TILE_GET_INFO_MEMBER(get_fore_tile_info);
4545   TILE_GET_INFO_MEMBER(get_mid_tile_info);
4646   TILE_GET_INFO_MEMBER(get_text_tile_info);
47   
47
4848   DECLARE_DRIVER_INIT(sdgndmps);
4949   virtual void video_start();
50   
50
5151   UINT32 screen_update_dcon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5252   UINT32 screen_update_sdgndmps(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5353   void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
branches/kale/src/mame/includes/exzisus.h
r244614r244615
1616   required_device<cpu_device> m_cpuc;
1717   required_device<gfxdecode_device> m_gfxdecode;
1818   required_device<palette_device> m_palette;
19   
19
2020   required_shared_ptr<UINT8> m_objectram1;
2121   required_shared_ptr<UINT8> m_videoram1;
2222   required_shared_ptr<UINT8> m_sharedram_ac;
r244614r244615
2828   DECLARE_WRITE8_MEMBER(cpub_bankswitch_w);
2929   DECLARE_WRITE8_MEMBER(coincounter_w);
3030   DECLARE_WRITE8_MEMBER(cpub_reset_w);
31   
31
3232   virtual void machine_start();
33   
33
3434   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3535};
branches/kale/src/mame/includes/fastfred.h
r244614r244615
2222
2323   required_device<gfxdecode_device> m_gfxdecode;
2424   required_device<palette_device> m_palette;
25   
25
2626   required_shared_ptr<UINT8> m_videoram;
2727   required_shared_ptr<UINT8> m_spriteram;
2828   required_shared_ptr<UINT8> m_attributesram;
r244614r244615
3737   UINT8 m_imago_sprites[0x800*3];
3838   UINT16 m_imago_sprites_address;
3939   UINT8 m_imago_sprites_bank;
40   
40
4141   tilemap_t *m_bg_tilemap;
4242   tilemap_t *m_fg_tilemap;
4343   tilemap_t *m_web_tilemap;
r244614r244615
7676   TILE_GET_INFO_MEMBER(imago_get_tile_info_bg);
7777   TILE_GET_INFO_MEMBER(imago_get_tile_info_fg);
7878   TILE_GET_INFO_MEMBER(imago_get_tile_info_web);
79   
79
8080   INTERRUPT_GEN_MEMBER(vblank_irq);
8181   INTERRUPT_GEN_MEMBER(sound_timer_irq);
8282
branches/kale/src/mame/includes/fuukifg2.h
r244614r244615
3434   required_device<screen_device> m_screen;
3535   required_device<palette_device> m_palette;
3636   required_device<fuukivid_device> m_fuukivid;
37   
37
3838   /* memory pointers */
3939   required_shared_ptr_array<UINT16,4> m_vram;
4040   required_shared_ptr<UINT16> m_vregs;
r244614r244615
5757   DECLARE_WRITE16_MEMBER(vram_2_w);
5858   DECLARE_WRITE16_MEMBER(vram_3_w);
5959   DECLARE_WRITE8_MEMBER(oki_banking_w);
60   
60
6161   TILE_GET_INFO_MEMBER(get_tile_info_0);
6262   TILE_GET_INFO_MEMBER(get_tile_info_1);
6363   TILE_GET_INFO_MEMBER(get_tile_info_2);
6464   TILE_GET_INFO_MEMBER(get_tile_info_3);
65   
65
6666   virtual void machine_start();
6767   virtual void machine_reset();
6868   virtual void video_start();
69   
69
7070   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7171   inline void get_tile_info(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
7272   inline void vram_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _N_);
branches/kale/src/mame/includes/fuukifg3.h
r244614r244615
3838   required_device<screen_device> m_screen;
3939   required_device<palette_device> m_palette;
4040   required_device<fuukivid_device> m_fuukivid;
41   
41
4242   /* memory pointers */
4343   required_shared_ptr_array<UINT32,4> m_vram;
4444   required_shared_ptr<UINT32> m_vregs;
r244614r244615
6868   DECLARE_WRITE32_MEMBER(vram_1_w);
6969   DECLARE_WRITE32_MEMBER(vram_2_w);
7070   DECLARE_WRITE32_MEMBER(vram_3_w);
71   
71
7272   TILE_GET_INFO_MEMBER(get_tile_info_0);
7373   TILE_GET_INFO_MEMBER(get_tile_info_1);
7474   TILE_GET_INFO_MEMBER(get_tile_info_2);
7575   TILE_GET_INFO_MEMBER(get_tile_info_3);
76   
76
7777   virtual void machine_start();
7878   virtual void machine_reset();
7979   virtual void video_start();
80   
80
8181   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8282   void screen_eof(screen_device &screen, bool state);
8383   inline void get_tile_info8bpp(tile_data &tileinfo, tilemap_memory_index tile_index, int _N_);
branches/kale/src/mame/includes/galpani2.h
r244614r244615
2424      m_ram2(*this, "ram2"),
2525      m_spriteram(*this, "spriteram")
2626   { }
27   
27
2828   required_device<cpu_device> m_maincpu;
2929   required_device<cpu_device> m_subcpu;
3030   optional_device<kaneko16_sprite_device> m_kaneko_spr;
r244614r244615
4242   required_shared_ptr<UINT16> m_ram;
4343   required_shared_ptr<UINT16> m_ram2;
4444   optional_shared_ptr<UINT16> m_spriteram;
45   
45
4646   UINT16 m_eeprom_word;
4747   UINT16 m_old_mcu_nmi1;
4848   UINT16 m_old_mcu_nmi2;
branches/kale/src/mame/includes/gladiatr.h
r244614r244615
1616      m_videoram(*this, "videoram"),
1717      m_colorram(*this, "colorram"),
1818      m_textram(*this, "textram"),
19      m_generic_paletteram_8(*this, "paletteram")   { }
20   
19      m_generic_paletteram_8(*this, "paletteram") { }
20
2121   required_device<cpu_device> m_maincpu;
2222   required_device<cpu_device> m_audiocpu;
2323   required_device<cpu_device> m_subcpu;
r244614r244615
7070   DECLARE_WRITE8_MEMBER(gladiator_int_control_w);
7171   DECLARE_WRITE8_MEMBER(gladiator_adpcm_w);
7272   DECLARE_WRITE_LINE_MEMBER(gladiator_ym_irq);
73   
73
7474   // ppking specific
7575   DECLARE_READ8_MEMBER(ppking_f1_r);
7676   DECLARE_READ8_MEMBER(ppking_f6a3_r);
r244614r244615
8383   DECLARE_READ8_MEMBER(ppking_qx0_r);
8484   DECLARE_READ8_MEMBER(ppking_qx1_r);
8585   DECLARE_WRITE8_MEMBER(ppking_video_registers_w);
86   
86
8787   DECLARE_DRIVER_INIT(gladiatr);
8888   DECLARE_DRIVER_INIT(ppking);
89   
89
9090   TILE_GET_INFO_MEMBER(bg_get_tile_info);
9191   TILE_GET_INFO_MEMBER(fg_get_tile_info);
9292
r244614r244615
9494   DECLARE_VIDEO_START(ppking);
9595   DECLARE_MACHINE_RESET(gladiator);
9696   DECLARE_VIDEO_START(gladiatr);
97   
97
9898   UINT32 screen_update_ppking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9999   UINT32 screen_update_gladiatr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
100100   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/includes/gsword.h
r244614r244615
5656   DECLARE_WRITE8_MEMBER(ay8910_control_port_1_w);
5757   DECLARE_READ8_MEMBER(fake_0_r);
5858   DECLARE_READ8_MEMBER(fake_1_r);
59   
59
6060   // gsword specific
6161   DECLARE_READ8_MEMBER(gsword_hack_r);
6262   DECLARE_WRITE8_MEMBER(gsword_adpcm_data_w);
r244614r244615
7676   UINT32 screen_update_gsword(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7777   INTERRUPT_GEN_MEMBER(gsword_snd_interrupt);
7878   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
79   int coins_in(void); //if 0'd
79   int coins_in(void); //if 0'd
8080};
branches/kale/src/mame/includes/iqblock.h
r244614r244615
3737
3838   TILE_GET_INFO_MEMBER(get_bg_tile_info);
3939   TILE_GET_INFO_MEMBER(get_fg_tile_info);
40   
40
4141   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4242};
branches/kale/src/mame/includes/kaneko16.h
r244614r244615
5656
5757   optional_shared_ptr<UINT16> m_spriteram;
5858   optional_shared_ptr<UINT16> m_mainram;
59   
59
6060   UINT16 m_disp_enable;
6161
6262   int m_VIEW2_2_pri;
branches/kale/src/mame/includes/liberate.h
r244614r244615
2020   required_shared_ptr<UINT8> m_videoram;
2121   required_shared_ptr<UINT8> m_spriteram;
2222   optional_shared_ptr<UINT8> m_scratchram;
23     
23
2424   UINT8 *m_fg_gfx;   /* prosoccr */
2525   UINT8 *m_charram;   /* prosoccr */
2626   UINT8 m_io_ram[16];
branches/kale/src/mame/includes/lordgun.h
r244614r244615
3939   required_device<gfxdecode_device> m_gfxdecode;
4040   required_device<screen_device> m_screen;
4141   required_device<palette_device> m_palette;
42   
42
4343   required_shared_ptr<UINT16> m_generic_paletteram_16;
4444   required_shared_ptr<UINT16> m_priority_ram;
4545   required_shared_ptr<UINT16> m_scrollram;
branches/kale/src/mame/includes/mustache.h
r244614r244615
2424
2525   tilemap_t *m_bg_tilemap;
2626   int m_control_byte;
27   
27
2828   DECLARE_WRITE8_MEMBER(videoram_w);
2929   DECLARE_WRITE8_MEMBER(video_control_w);
3030   DECLARE_WRITE8_MEMBER(scroll_w);
31   
31
3232   TILE_GET_INFO_MEMBER(get_bg_tile_info);
33   
33
3434   DECLARE_DRIVER_INIT(mustache);
3535   virtual void video_start();
3636   DECLARE_PALETTE_INIT(mustache);
37   
37
3838   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3939   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
40   
40
4141   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
4242};
branches/kale/src/mame/includes/nb1414m4.h
r244614r244615
44public:
55   nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
66   ~nb1414m4_device() {}
7   
7
88   void exec(UINT16 mcu_cmd, UINT8 *vram, UINT16 &scrollx, UINT16 &scrolly, tilemap_t *tilemap);
99
1010protected:
r244614r244615
2121   void _0200(UINT16 mcu_cmd, UINT8 *vram);
2222   void _0600(UINT8 is2p, UINT8 *vram);
2323   void _0e00(UINT16 mcu_cmd, UINT8 *vram);
24   
24
2525   UINT8 *m_data;
2626
2727};
branches/kale/src/mame/includes/pirates.h
r244614r244615
3838   DECLARE_WRITE16_MEMBER(fg_tileram_w);
3939   DECLARE_WRITE16_MEMBER(bg_tileram_w);
4040   DECLARE_READ16_MEMBER(genix_prot_r);
41   
41
4242   DECLARE_CUSTOM_INPUT_MEMBER(prot_r);
4343
4444   DECLARE_DRIVER_INIT(pirates);
branches/kale/src/mame/includes/quizpani.h
r244614r244615
1313
1414   required_device<cpu_device> m_maincpu;
1515   required_device<gfxdecode_device> m_gfxdecode;
16   
16
1717   required_shared_ptr<UINT16> m_scrollreg;
1818   required_shared_ptr<UINT16> m_bg_videoram;
1919   required_shared_ptr<UINT16> m_txt_videoram;
20   
20
2121   tilemap_t *m_bg_tilemap;
2222   tilemap_t *m_txt_tilemap;
2323   int m_bgbank;
2424   int m_txtbank;
25   
25
2626   DECLARE_WRITE16_MEMBER(bg_videoram_w);
2727   DECLARE_WRITE16_MEMBER(txt_videoram_w);
2828   DECLARE_WRITE16_MEMBER(tilesbank_w);
29   
29
3030   TILEMAP_MAPPER_MEMBER(bg_scan);
3131   TILE_GET_INFO_MEMBER(bg_tile_info);
3232   TILE_GET_INFO_MEMBER(txt_tile_info);
33   
33
3434   virtual void video_start();
35   
35
3636   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3737};
branches/kale/src/mame/includes/raiden.h
r244614r244615
2929   required_device<gfxdecode_device> m_gfxdecode;
3030   required_device<palette_device> m_palette;
3131   required_device<buffered_spriteram16_device> m_spriteram;
32   
32
3333   required_shared_ptr<UINT16> m_shared_ram;
3434   required_shared_ptr<UINT16> m_videoram;
3535   optional_shared_ptr<UINT16> m_scroll_ram;
r244614r244615
5656   DECLARE_DRIVER_INIT(raidenu);
5757   DECLARE_DRIVER_INIT(raidenk);
5858   DECLARE_DRIVER_INIT(raiden);
59   
59
6060   TILE_GET_INFO_MEMBER(get_back_tile_info);
6161   TILE_GET_INFO_MEMBER(get_fore_tile_info);
6262   TILE_GET_INFO_MEMBER(get_text_tile_info);
63   
63
6464   virtual void video_start();
6565   DECLARE_VIDEO_START(raidenb);
66   
66
6767   UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 *scrollregs);
6868   UINT32 screen_update_raiden(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6969   UINT32 screen_update_raidenb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
70   
70
7171   INTERRUPT_GEN_MEMBER(raiden_interrupt);
72   
72
7373   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri_mask);
7474   void common_decrypt();
7575};
branches/kale/src/mame/includes/retofinv.h
r244614r244615
1919   optional_device<cpu_device> m_68705;
2020   required_device<gfxdecode_device> m_gfxdecode;
2121   required_device<palette_device> m_palette;
22   
22
2323   required_shared_ptr<UINT8> m_fg_videoram;
2424   required_shared_ptr<UINT8> m_sharedram;
2525   required_shared_ptr<UINT8> m_bg_videoram;
26   
26
2727   UINT8 m_main_irq_mask;
2828   UINT8 m_sub_irq_mask;
2929   UINT8 m_cpu2_m6000;
r244614r244615
7878   virtual void machine_start();
7979   virtual void video_start();
8080   DECLARE_PALETTE_INIT(retofinv);
81   
81
8282   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8383   void draw_sprites(bitmap_ind16 &bitmap);
84   
84
8585   INTERRUPT_GEN_MEMBER(main_vblank_irq);
8686   INTERRUPT_GEN_MEMBER(sub_vblank_irq);
8787};
branches/kale/src/mame/includes/rollrace.h
r244614r244615
1616   required_shared_ptr<UINT8> m_videoram;
1717   required_shared_ptr<UINT8> m_colorram;
1818   required_shared_ptr<UINT8> m_spriteram;
19   
19
2020   int m_charbank[2];
2121   int m_bkgpage;
2222   int m_bkgflip;
r244614r244615
2929
3030   UINT8 m_nmi_mask;
3131   UINT8 m_sound_nmi_mask;
32   
32
3333   DECLARE_READ8_MEMBER(fake_d800_r);
3434   DECLARE_WRITE8_MEMBER(fake_d800_w);
3535   DECLARE_WRITE8_MEMBER(nmi_mask_w);
r244614r244615
4141   DECLARE_WRITE8_MEMBER(backgroundcolor_w);
4242   DECLARE_WRITE8_MEMBER(flipy_w);
4343   DECLARE_WRITE8_MEMBER(flipx_w);
44   
44
4545   DECLARE_PALETTE_INIT(rollrace);
4646   virtual void machine_start();
47   
47
4848   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
49   
49
5050   INTERRUPT_GEN_MEMBER(vblank_irq);
5151   INTERRUPT_GEN_MEMBER(sound_timer_irq);
5252};
branches/kale/src/mame/includes/scotrsht.h
r244614r244615
3636   DECLARE_WRITE8_MEMBER(palettebank_w);
3737
3838   TILE_GET_INFO_MEMBER(get_bg_tile_info);
39   
39
4040   INTERRUPT_GEN_MEMBER(interrupt);
4141
4242   virtual void video_start();
branches/kale/src/mame/includes/seicross.h
r244614r244615
3838   DECLARE_WRITE8_MEMBER(portB_w);
3939
4040   TILE_GET_INFO_MEMBER(get_bg_tile_info);
41   
41
4242   INTERRUPT_GEN_MEMBER(vblank_irq);
4343
4444   virtual void machine_start();
r244614r244615
4646   virtual void video_start();
4747   DECLARE_PALETTE_INIT(seicross);
4848   DECLARE_DRIVER_INIT(friskytb);
49   
49
5050   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5151   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
52   
52
5353   void nvram_init(nvram_device &nvram, void *data, size_t size);
5454};
branches/kale/src/mame/includes/shadfrce.h
r244614r244615
5959   TILE_GET_INFO_MEMBER(get_bg1tile_info);
6060
6161   virtual void video_start();
62   
62
6363   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
6464
6565   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/includes/shootout.h
r244614r244615
2323   tilemap_t *m_background;
2424   tilemap_t *m_foreground;
2525   int m_bFlicker;
26   
26
2727   DECLARE_WRITE8_MEMBER(bankswitch_w);
2828   DECLARE_WRITE8_MEMBER(sound_cpu_command_w);
2929   DECLARE_WRITE8_MEMBER(flipscreen_w);
r244614r244615
3232   DECLARE_WRITE8_MEMBER(textram_w);
3333
3434   DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
35   
35
3636   DECLARE_DRIVER_INIT(shootout);
3737   virtual void video_start();
3838   DECLARE_PALETTE_INIT(shootout);
39   
39
4040   TILE_GET_INFO_MEMBER(get_bg_tile_info);
4141   TILE_GET_INFO_MEMBER(get_fg_tile_info);
42   
42
4343   UINT32 screen_update_shootout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4444   UINT32 screen_update_shootouj(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4545   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int bank_bits );
branches/kale/src/mame/includes/sidepckt.h
r244614r244615
2626   required_shared_ptr<UINT8> m_videoram;
2727   required_shared_ptr<UINT8> m_colorram;
2828   required_shared_ptr<UINT8> m_spriteram;
29   
29
3030   tilemap_t *m_bg_tilemap;
3131   const UINT8* m_prot_table[3];
3232   UINT8 m_i8751_return;
r244614r244615
4141   DECLARE_WRITE8_MEMBER(videoram_w);
4242   DECLARE_WRITE8_MEMBER(colorram_w);
4343   DECLARE_WRITE8_MEMBER(flipscreen_w);
44   
44
4545   DECLARE_DRIVER_INIT(sidepckt);
4646   DECLARE_DRIVER_INIT(sidepcktj);
47   
47
4848   TILE_GET_INFO_MEMBER(get_tile_info);
49   
49
5050   virtual void machine_reset();
5151   virtual void video_start();
5252   DECLARE_PALETTE_INIT(sidepckt);
53   
53
5454   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5555   void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect);
5656};
branches/kale/src/mame/includes/silkroad.h
r244614r244615
2020   required_device<okim6295_device> m_oki1;
2121   required_device<gfxdecode_device> m_gfxdecode;
2222   required_device<palette_device> m_palette;
23   
23
2424   required_shared_ptr<UINT32> m_generic_paletteram_32;
2525   required_shared_ptr<UINT32> m_vidram;
2626   required_shared_ptr<UINT32> m_vidram2;
2727   required_shared_ptr<UINT32> m_vidram3;
2828   required_shared_ptr<UINT32> m_sprram;
2929   required_shared_ptr<UINT32> m_regs;
30   
30
3131   tilemap_t *m_fg_tilemap;
3232   tilemap_t *m_fg2_tilemap;
3333   tilemap_t *m_fg3_tilemap;
34   
34
3535   DECLARE_WRITE32_MEMBER(paletteram32_xRRRRRGGGGGBBBBB_dword_w);
3636   DECLARE_WRITE32_MEMBER(silk_coin_counter_w);
3737   DECLARE_WRITE32_MEMBER(silkroad_fgram_w);
3838   DECLARE_WRITE32_MEMBER(silkroad_fgram2_w);
3939   DECLARE_WRITE32_MEMBER(silkroad_fgram3_w);
4040   DECLARE_WRITE32_MEMBER(silk_6295_bank_w);
41   
41
4242   TILE_GET_INFO_MEMBER(get_fg_tile_info);
4343   TILE_GET_INFO_MEMBER(get_fg2_tile_info);
4444   TILE_GET_INFO_MEMBER(get_fg3_tile_info);
45   
45
4646   virtual void video_start();
47   
47
4848   UINT32 screen_update_silkroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4949   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5050};
branches/kale/src/mame/includes/skydiver.h
r244614r244615
3636   required_device<palette_device> m_palette;
3737
3838   required_shared_ptr<UINT8> m_videoram;
39   
39
4040   int m_nmion;
4141   tilemap_t *m_bg_tilemap;
4242   int m_width;
r244614r244615
5656   DECLARE_WRITE8_MEMBER(_2000_201F_w);
5757   DECLARE_WRITE8_MEMBER(sound_enable_w);
5858   DECLARE_WRITE8_MEMBER(whistle_w);
59   
59
6060   TILE_GET_INFO_MEMBER(get_tile_info);
61   
61
6262   virtual void machine_reset();
6363   virtual void video_start();
6464   DECLARE_PALETTE_INIT(skydiver);
65   
65
6666   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6767   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
68   
68
6969   INTERRUPT_GEN_MEMBER(interrupt);
7070};
7171
branches/kale/src/mame/includes/snowbros.h
r244614r244615
2626   optional_device<kaneko_pandora_device> m_pandora;
2727   optional_shared_ptr<UINT16> m_hyperpac_ram;
2828   optional_shared_ptr<UINT16> m_bootleg_spriteram16;
29   
29
3030   int m_sb3_music_is_playing;
3131   int m_sb3_music;
3232   UINT8 m_semicom_prot_offset;
r244614r244615
4949   DECLARE_WRITE8_MEMBER(twinadv_oki_bank_w);
5050   DECLARE_WRITE16_MEMBER(sb3_sound_w);
5151   DECLARE_READ16_MEMBER(toto_read);
52   
52
5353   DECLARE_DRIVER_INIT(pzlbreak);
5454   DECLARE_DRIVER_INIT(moremorp);
5555   DECLARE_DRIVER_INIT(snowbro3);
r244614r244615
6161   DECLARE_DRIVER_INIT(hyperpac);
6262   DECLARE_MACHINE_RESET(semiprot);
6363   DECLARE_MACHINE_RESET(finalttr);
64   
64
6565   UINT32 screen_update_snowbros(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6666   UINT32 screen_update_honeydol(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6767   UINT32 screen_update_twinadv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6868   UINT32 screen_update_snowbro3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6969   UINT32 screen_update_wintbob(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7070   void screen_eof_snowbros(screen_device &screen, bool state);
71   
71
7272   TIMER_DEVICE_CALLBACK_MEMBER(snowbros_irq);
7373   TIMER_DEVICE_CALLBACK_MEMBER(snowbros3_irq);
74   
74
7575   void sb3_play_music(int data);
7676   void sb3_play_sound(int data);
7777};
branches/kale/src/mame/includes/speedatk.h
r244614r244615
1919
2020   required_shared_ptr<UINT8> m_videoram;
2121   required_shared_ptr<UINT8> m_colorram;
22   
22
2323   UINT8 m_crtc_vreg[0x100];
2424   UINT8 m_crtc_index;
2525   UINT8 m_flip_scr;
r244614r244615
2727   UINT8 m_km_status;
2828   UINT8 m_coin_settings;
2929   UINT8 m_coin_impulse;
30   
30
3131   DECLARE_READ8_MEMBER(key_matrix_r);
3232   DECLARE_WRITE8_MEMBER(key_matrix_w);
3333   DECLARE_READ8_MEMBER(key_matrix_status_r);
r244614r244615
4040   virtual void machine_start();
4141   virtual void video_start();
4242   DECLARE_PALETTE_INIT(speedatk);
43   
43
4444   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
45   
45
4646   UINT8 iox_key_matrix_calc(UINT8 p_side);
4747};
branches/kale/src/mame/includes/tecmo.h
r244614r244615
1515      m_txvideoram(*this, "txvideoram"),
1616      m_fgvideoram(*this, "fgvideoram"),
1717      m_bgvideoram(*this, "bgvideoram"),
18      m_spriteram(*this, "spriteram")   { }
18      m_spriteram(*this, "spriteram") { }
1919
2020   required_device<cpu_device> m_maincpu;
2121   required_device<cpu_device> m_soundcpu;
r244614r244615
5656   DECLARE_WRITE8_MEMBER(adpcm_start_w);
5757   DECLARE_WRITE8_MEMBER(adpcm_vol_w);
5858   DECLARE_WRITE_LINE_MEMBER(adpcm_int);
59   
59
6060   DECLARE_DRIVER_INIT(silkworm);
6161   DECLARE_DRIVER_INIT(rygar);
6262   DECLARE_DRIVER_INIT(backfirt);
6363   DECLARE_DRIVER_INIT(gemini);
64   
64
6565   TILE_GET_INFO_MEMBER(get_bg_tile_info);
6666   TILE_GET_INFO_MEMBER(get_fg_tile_info);
6767   TILE_GET_INFO_MEMBER(gemini_get_bg_tile_info);
6868   TILE_GET_INFO_MEMBER(gemini_get_fg_tile_info);
6969   TILE_GET_INFO_MEMBER(get_tx_tile_info);
70   
70
7171   virtual void machine_start();
7272   virtual void machine_reset();
7373   virtual void video_start();
74   
74
7575   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7676   void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap,const rectangle &cliprect);
7777};
branches/kale/src/mame/includes/tecmo16.h
r244614r244615
7474   DECLARE_VIDEO_START(riot);
7575
7676   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
77   
77
7878   void save_state();
7979};
branches/kale/src/mame/includes/tecmosys.h
r244614r244615
5252   required_shared_ptr<UINT16> m_c00000regs;
5353   required_shared_ptr<UINT16> m_c80000regs;
5454   required_shared_ptr<UINT16> m_880000regs;
55   
55
5656   int m_spritelist;
5757   bitmap_ind16 m_sprite_bitmap;
5858   bitmap_ind16 m_tmp_tilemap_composebitmap;
r244614r244615
6565   UINT8 m_device_status;
6666   const struct prot_data* m_device_data;
6767   UINT8 m_device_value;
68   
68
6969   DECLARE_READ16_MEMBER(sound_r);
7070   DECLARE_WRITE16_MEMBER(sound_w);
7171   DECLARE_WRITE16_MEMBER(unk880000_w);
r244614r244615
8787   DECLARE_READ16_MEMBER(eeprom_r);
8888   DECLARE_WRITE16_MEMBER(eeprom_w);
8989   DECLARE_WRITE_LINE_MEMBER(sound_irq);
90   
90
9191   DECLARE_DRIVER_INIT(tkdensha);
9292   DECLARE_DRIVER_INIT(deroon);
9393   DECLARE_DRIVER_INIT(tkdensho);
9494   virtual void machine_start();
9595   virtual void video_start();
96   
96
9797   TILE_GET_INFO_MEMBER(get_bg0tile_info);
9898   TILE_GET_INFO_MEMBER(get_bg1tile_info);
9999   TILE_GET_INFO_MEMBER(get_bg2tile_info);
branches/kale/src/mame/includes/tehkanwc.h
r244614r244615
3232   required_shared_ptr<UINT8> m_colorram;
3333   required_shared_ptr<UINT8> m_videoram2;
3434   required_shared_ptr<UINT8> m_spriteram;
35   
35
3636   int m_track0[2];
3737   int m_track1[2];
3838   int m_msm_data_offs;
r244614r244615
4242   UINT8 m_led1;
4343   tilemap_t *m_bg_tilemap;
4444   tilemap_t *m_fg_tilemap;
45   
45
4646   DECLARE_WRITE8_MEMBER(sub_cpu_halt_w);
4747   DECLARE_READ8_MEMBER(track_0_r);
4848   DECLARE_READ8_MEMBER(track_1_r);
r244614r244615
7272   DECLARE_DRIVER_INIT(teedoff);
7373   virtual void machine_start();
7474   virtual void video_start();
75   
75
7676   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7777   void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player);
7878   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/includes/thedeep.h
r244614r244615
2525   required_shared_ptr<UINT8> m_vram_1;
2626   required_shared_ptr<UINT8> m_scroll;
2727   required_shared_ptr<UINT8> m_scroll2;
28   
28
2929   int m_nmi_enable;
3030   UINT8 m_protection_command;
3131   UINT8 m_protection_data;
r244614r244615
4848   DECLARE_READ8_MEMBER(p0_r);
4949   DECLARE_WRITE8_MEMBER(vram_0_w);
5050   DECLARE_WRITE8_MEMBER(vram_1_w);
51   
51
5252   TILEMAP_MAPPER_MEMBER(tilemap_scan_rows_back);
5353   TILE_GET_INFO_MEMBER(get_tile_info_0);
5454   TILE_GET_INFO_MEMBER(get_tile_info_1);
r244614r244615
6060
6161   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6262   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
63   
63
6464   INTERRUPT_GEN_MEMBER(mcu_irq);
6565   TIMER_DEVICE_CALLBACK_MEMBER(interrupt);
6666};
branches/kale/src/mame/includes/tnzs.h
r244614r244615
3535      m_palette(*this, "palette"),
3636      m_mainbank(*this, "mainbank")
3737      { }
38   
38
3939   /* devices */
4040   required_device<cpu_device> m_maincpu;
4141   optional_device<cpu_device> m_audiocpu;
r244614r244615
107107   DECLARE_PALETTE_INIT(arknoid2);
108108   DECLARE_MACHINE_START(tnzs_common);
109109   DECLARE_MACHINE_RESET(jpopnics);
110   
110
111111   UINT32 screen_update_tnzs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
112112   void screen_eof_tnzs(screen_device &screen, bool state);
113   
113
114114   INTERRUPT_GEN_MEMBER(arknoid2_interrupt);
115115   TIMER_CALLBACK_MEMBER(kludge_callback);
116   
116
117117   void tnzs_postload();
118118   void mcu_reset();
119119   void mcu_handle_coins(int coin);
branches/kale/src/mame/includes/vball.h
r244614r244615
2323   required_shared_ptr<UINT8> m_videoram;
2424   required_shared_ptr<UINT8> m_scrolly_lo;
2525   required_shared_ptr<UINT8> m_spriteram;
26   
26
2727   int m_scrollx_hi;
2828   int m_scrolly_hi;
2929   int m_scrollx_lo;
r244614r244615
3232   int m_bgprombank;
3333   int m_spprombank;
3434   tilemap_t *m_bg_tilemap;
35   
35
3636   DECLARE_WRITE8_MEMBER(irq_ack_w);
3737   DECLARE_WRITE8_MEMBER(bankswitch_w);
3838   DECLARE_WRITE8_MEMBER(cpu_sound_command_w);
r244614r244615
4040   DECLARE_WRITE8_MEMBER(scrollx_lo_w);
4141   DECLARE_WRITE8_MEMBER(videoram_w);
4242   DECLARE_WRITE8_MEMBER(attrib_w);
43   
43
4444   TILEMAP_MAPPER_MEMBER(background_scan);
4545   TILE_GET_INFO_MEMBER(get_bg_tile_info);
46   
46
4747   virtual void machine_start();
4848   virtual void video_start();
49   
49
5050   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5151   TIMER_DEVICE_CALLBACK_MEMBER(vball_scanline);
5252   void bgprombank_w(int bank);
branches/kale/src/mame/includes/wc90.h
r244614r244615
2828      m_spriteram(*this, "spriteram")
2929   { }
3030
31   
31
3232   required_device<cpu_device> m_maincpu;
3333   required_device<cpu_device> m_audiocpu;
3434   required_device<gfxdecode_device> m_gfxdecode;
r244614r244615
5151   required_shared_ptr<UINT8> m_scroll2ylo;
5252   required_shared_ptr<UINT8> m_scroll2yhi;
5353   required_shared_ptr<UINT8> m_spriteram;
54   
54
5555   tilemap_t *m_tx_tilemap;
5656   tilemap_t *m_fg_tilemap;
5757   tilemap_t *m_bg_tilemap;
r244614r244615
6363   DECLARE_WRITE8_MEMBER(fgvideoram_w);
6464   DECLARE_WRITE8_MEMBER(txvideoram_w);
6565   DECLARE_WRITE_LINE_MEMBER(irqhandler);
66   
66
6767   TILE_GET_INFO_MEMBER(get_bg_tile_info);
6868   TILE_GET_INFO_MEMBER(get_fg_tile_info);
6969   TILE_GET_INFO_MEMBER(get_tx_tile_info);
7070   TILE_GET_INFO_MEMBER(track_get_bg_tile_info);
7171   TILE_GET_INFO_MEMBER(track_get_fg_tile_info);
72   
72
7373   virtual void video_start();
7474   DECLARE_VIDEO_START(wc90t);
75   
75
7676   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7777};
branches/kale/src/mame/includes/welltris.h
r244614r244615
3131   UINT16 m_pixelpalettebank;
3232   int m_scrollx;
3333   int m_scrolly;
34   
34
3535   DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
3636   DECLARE_WRITE16_MEMBER(sound_command_w);
3737   DECLARE_WRITE8_MEMBER(pending_command_clear_w);
r244614r244615
4040   DECLARE_WRITE16_MEMBER(scrollreg_w);
4141   DECLARE_WRITE16_MEMBER(charvideoram_w);
4242   DECLARE_WRITE_LINE_MEMBER(irqhandler);
43   
43
4444   DECLARE_CUSTOM_INPUT_MEMBER(pending_sound_r);
45   
45
4646   DECLARE_DRIVER_INIT(quiz18k);
4747   DECLARE_DRIVER_INIT(welltris);
4848   virtual void machine_start();
4949   virtual void video_start();
50   
50
5151   TILE_GET_INFO_MEMBER(get_tile_info);
5252   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5353   void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect);
branches/kale/src/mame/includes/wrally.h
r244614r244615
1919   required_shared_ptr<UINT16> m_vregs;
2020   required_shared_ptr<UINT16> m_spriteram;
2121   required_shared_ptr<UINT16> m_shareram;
22   
22
2323   tilemap_t *m_pant[2];
2424
2525   DECLARE_READ8_MEMBER(dallas_share_r);
r244614r244615
2929   DECLARE_WRITE16_MEMBER(okim6295_bankswitch_w);
3030   DECLARE_WRITE16_MEMBER(wrally_coin_counter_w);
3131   DECLARE_WRITE16_MEMBER(wrally_coin_lockout_w);
32   
32
3333   TILE_GET_INFO_MEMBER(get_tile_info_screen0);
3434   TILE_GET_INFO_MEMBER(get_tile_info_screen1);
35   
35
3636   virtual void video_start();
37   
37
3838   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3939   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority);
4040};
branches/kale/src/mame/includes/wwfsstar.h
r244614r244615
2121   required_shared_ptr<UINT16> m_spriteram;
2222   required_shared_ptr<UINT16> m_fg0_videoram;
2323   required_shared_ptr<UINT16> m_bg0_videoram;
24   
24
2525   int m_vblank;
2626   int m_scrollx;
2727   int m_scrolly;
2828   tilemap_t *m_fg0_tilemap;
2929   tilemap_t *m_bg0_tilemap;
30   
30
3131   DECLARE_WRITE16_MEMBER(scroll_w);
3232   DECLARE_WRITE16_MEMBER(sound_w);
3333   DECLARE_WRITE16_MEMBER(flipscreen_w);
3434   DECLARE_WRITE16_MEMBER(irqack_w);
3535   DECLARE_WRITE16_MEMBER(fg0_videoram_w);
3636   DECLARE_WRITE16_MEMBER(bg0_videoram_w);
37   
37
3838   DECLARE_CUSTOM_INPUT_MEMBER(vblank_r);
39   
39
4040   TIMER_DEVICE_CALLBACK_MEMBER(scanline);
41   
41
4242   TILE_GET_INFO_MEMBER(get_fg0_tile_info);
4343   TILEMAP_MAPPER_MEMBER(bg0_scan);
4444   TILE_GET_INFO_MEMBER(get_bg0_tile_info);
branches/kale/src/mame/includes/xorworld.h
r244614r244615
1616   required_device<eeprom_serial_93cxx_device> m_eeprom;
1717   required_device<gfxdecode_device> m_gfxdecode;
1818   required_device<palette_device> m_palette;
19   
19
2020   required_shared_ptr<UINT16> m_videoram;
2121   required_shared_ptr<UINT16> m_spriteram;
22   
22
2323   tilemap_t *m_bg_tilemap;
24   
24
2525   DECLARE_WRITE16_MEMBER(irq2_ack_w);
2626   DECLARE_WRITE16_MEMBER(irq6_ack_w);
2727   DECLARE_WRITE16_MEMBER(videoram_w);
2828   DECLARE_WRITE16_MEMBER(eeprom_chip_select_w);
2929   DECLARE_WRITE16_MEMBER(eeprom_serial_clock_w);
3030   DECLARE_WRITE16_MEMBER(eeprom_data_w);
31   
31
3232   TILE_GET_INFO_MEMBER(get_bg_tile_info);
33   
33
3434   DECLARE_DRIVER_INIT(xorworld);
3535   virtual void video_start();
3636   DECLARE_PALETTE_INIT(xorworld);
37   
37
3838   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3939   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
4040};
branches/kale/src/mame/includes/xxmissio.h
r244614r244615
2626   UINT8 m_xscroll;
2727   UINT8 m_yscroll;
2828   UINT8 m_flipscreen;
29   
29
3030   DECLARE_WRITE8_MEMBER(bank_sel_w);
3131   DECLARE_WRITE8_MEMBER(status_m_w);
3232   DECLARE_WRITE8_MEMBER(status_s_w);
r244614r244615
3535   DECLARE_READ8_MEMBER(bgram_r);
3636   DECLARE_WRITE8_MEMBER(scroll_x_w);
3737   DECLARE_WRITE8_MEMBER(scroll_y_w);
38   
38
3939   DECLARE_CUSTOM_INPUT_MEMBER(status_r);
40   
40
4141   INTERRUPT_GEN_MEMBER(interrupt_m);
4242   INTERRUPT_GEN_MEMBER(interrupt_s);
43   
43
4444   TILE_GET_INFO_MEMBER(get_bg_tile_info);
4545   TILE_GET_INFO_MEMBER(get_fg_tile_info);
46   
46
4747   virtual void machine_start();
4848   virtual void video_start();
49   
49
5050   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5151   void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx);
5252};
branches/kale/src/mame/machine/mie.c
r244614r244615
3333   AM_RANGE(0x00, 0x07) AM_READWRITE(gpio_r, gpio_w)
3434   AM_RANGE(0x08, 0x08) AM_READWRITE(gpiodir_r, gpiodir_w)
3535   AM_RANGE(0x0f, 0x0f) AM_READWRITE(adc_r, adc_w)
36   AM_RANGE(0x10, 0x10) AM_READWRITE(jvs_r, jvs_w)      // ports 1x and 2x is standard UARTs, TODO handle it properly
36   AM_RANGE(0x10, 0x10) AM_READWRITE(jvs_r, jvs_w)     // ports 1x and 2x is standard UARTs, TODO handle it properly
3737   AM_RANGE(0x12, 0x12) AM_WRITE(jvs_dest_w)
3838   AM_RANGE(0x13, 0x13) AM_WRITE(jvs_lcr_w)
3939   AM_RANGE(0x15, 0x15) AM_READ(jvs_status_r)
branches/kale/src/mame/machine/nb1414m4.c
r244614r244615
5555
5656void nb1414m4_device::device_reset()
5757{
58
5958}
6059
6160/*****************************************************************************
r244614r244615
142141   int i;
143142   UINT8 first_digit;
144143   UINT8 res;
145   
144
146145   first_digit = 0;
147146
148147   for(i=0;i<6;i++)
branches/kale/src/mame/machine/tait8741.c
r244614r244615
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   
253
254254   for (int i = 0; i < 4; i++)
255255   {
256256      save_item(NAME(m_taito8741[i].toData), i);
r244614r244615
360360   m_port_handler_1_r.resolve_safe(0);
361361   m_port_handler_2_r.resolve_safe(0);
362362   m_port_handler_3_r.resolve_safe(0);
363   
363
364364   for (int i = 0; i < 4; i++)
365365   {
366366      save_item(NAME(m_i8741[i].cmd), i);
r244614r244615
370370      save_item(NAME(m_i8741[i].rxd), i);
371371      save_item(NAME(m_i8741[i].rst), i);
372372   };
373   
373
374374   save_item(NAME(m_nmi_enable));
375375}
376376
branches/kale/src/mame/machine/tnzs.c
r244614r244615
639639MACHINE_START_MEMBER(tnzs_state,tnzs_common)
640640{
641641   UINT8 *SUB = memregion("sub")->base();
642   
642
643643   membank("subbank")->configure_entries(0, 4, &SUB[0x08000], 0x2000);
644644   membank("subbank")->set_entry(m_bank2);
645645
branches/kale/src/mame/mame.lst
r244614r244615
47134713desertbr        // 1993.?? Desert Breaker (World, FD1094)
47144714desertbrj       // 1992.10 Desert Breaker (Japan, FD1094)
47154715pontoon
4716hamaway         // prototype
4716hamaway         // prototype
47174717
47184718// System18 Bootlegs
47194719astormbl        // BOOTLEG
r244614r244615
47474747toutrun3        // 1987 (FD1094)
47484748toutrun2        // 1987 (FD1094)
47494749toutrun1        // 1987 (FD1094)
4750toutrunj1      // 1987 (FD1094)
4750toutrunj1       // 1987 (FD1094)
47514751
47524752// X Board
47534753aburner         // 1987.07 After Burner (Japan)
r244614r244615
59105910pcktgal2        // (c) 1989 Data East Corporation (World?)
59115911pcktgal2j       // (c) 1989 Data East Corporation (World?)
59125912pokechmp        // Korean hack of Pocket Gal
5913pokechmpa      //
5913pokechmpa       //
59145914billlist        //
59155915spool3          // (c) 1989 Data East Corporation (World?)
59165916spool3i         // (c) 1990 Data East Corporation + I-Vics license
r244614r244615
93259325missw96a        // (c) 1996 Comad
93269326missw96b        // (c) 1996 Comad
93279327missmw96        // (c) 1996 Comad
9328smissw         //
9328smissw          //
93299329fantsia2        // (c) 1997 Comad
93309330fantsia2a       // (c) 1997 Comad
93319331wownfant        // (c) 2002 Comad
r244614r244615
1050010500heuksun         // (c) 1998 Oksan / F2 System
1050110501bestri          // (c) F2 System
1050210502silvmil         // (c) 1995 Para
10503puzzlove      // (c) 1994 Para
10503puzzlove        // (c) 1994 Para
1050410504funybubl        // (c) 1999 In Chang Electronic Co
1050510505funybublc       // (c) 1999 Comad Industries
1050610506dcheese         // (c) 1993 HAR
branches/kale/src/mame/video/bloodbro.c
r244614r244615
6161
6262   m_fg_tilemap->set_transparent_pen(15);
6363   m_tx_tilemap->set_transparent_pen(15);
64   
64
6565   save_item(NAME(m_scrollram));
6666   save_item(NAME(m_layer_en));
6767}
branches/kale/src/mame/video/chaknpop.c
r244614r244615
2525PALETTE_INIT_MEMBER(chaknpop_state, chaknpop)
2626{
2727   const UINT8 *color_prom = memregion("proms")->base();
28   
28
2929   for (int i = 0; i < 1024; i++)
3030   {
3131      int col, r, g, b;
branches/kale/src/mame/video/darkmist.c
r244614r244615
101101   m_txtilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(darkmist_state::get_txttile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32 );
102102   m_fgtilemap->set_transparent_pen(0);
103103   m_txtilemap->set_transparent_pen(0);
104   
104
105105   save_item(NAME(m_hw));
106106}
107107
108108UINT32 darkmist_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
109109{
110   
111110#define DM_GETSCROLL(n) (((m_scroll[(n)]<<1)&0xff) + ((m_scroll[(n)]&0x80)?1:0) +( ((m_scroll[(n)-1]<<4) | (m_scroll[(n)-1]<<12) )&0xff00))
112111
113112   m_bgtilemap->set_scrollx(0, DM_GETSCROLL(0x2));
branches/kale/src/mame/video/dcon.c
r244614r244615
106106   m_text_layer->set_transparent_pen(15);
107107
108108   m_gfx_bank_select = 0;
109   
109
110110   save_item(NAME(m_gfx_bank_select));
111111   save_item(NAME(m_last_gfx_bank));
112112   save_item(NAME(m_scroll_ram));
branches/kale/src/mame/video/decospr.c
r244614r244615
233233      {
234234         sprite = spriteram[offs + 1];
235235         y = spriteram[offs];
236         
237         if (m_is_bootleg && (m_bootleg_type == 1))
236
237         if (m_is_bootleg && (m_bootleg_type == 1))
238238         {
239239            flash = y & 0x0400;
240240         }
branches/kale/src/mame/video/fastfred.c
r244614r244615
345345   /* web colors */
346346   m_palette->set_pen_color(256+64+0,rgb_t(0x50,0x00,0x00));
347347   m_palette->set_pen_color(256+64+1,rgb_t(0x00,0x00,0x00));
348   
348
349349   save_item(NAME(m_imago_sprites));
350350   save_item(NAME(m_imago_sprites_address));
351351   save_item(NAME(m_imago_sprites_bank));
r244614r244615
356356   save_item(NAME(m_timer_adjusted));
357357   save_item(NAME(m_stars_colors_start));
358358   save_item(NAME(m_stars_scrollpos));
359   
359
360360   for (int i = 0; i < STAR_COUNT; i++)
361361   {
362362      save_item(NAME(m_stars[i].x), i);
branches/kale/src/mame/video/gladiatr.c
r244614r244615
5050   m_bg_tilemap->set_scroll_cols(0x10);
5151
5252   m_sprite_bank = 1;
53   
53
5454   save_item(NAME(m_video_attributes));
5555   save_item(NAME(m_fg_scrolly));
5656   save_item(NAME(m_sprite_buffer));
r244614r244615
6868   m_fg_tilemap->set_scrolldx(-0x30, 0x12f);
6969
7070   m_sprite_bank = 2;
71   
71
7272   save_item(NAME(m_video_attributes));
7373   save_item(NAME(m_fg_scrollx));
7474   save_item(NAME(m_fg_scrolly));
branches/kale/src/mame/video/gsword.c
r244614r244615
148148{
149149   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(gsword_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,
150150         8, 8, 32, 64);
151   
151
152152   save_item(NAME(m_charbank));
153153   save_item(NAME(m_charpalbank));
154154   save_item(NAME(m_flipscreen));
branches/kale/src/mame/video/iqblock.c
r244614r244615
4141
4242   m_bg_tilemap->set_transparent_pen(0);
4343   m_fg_tilemap->set_scroll_cols(64);
44   
44
4545   save_item(NAME(m_videoenable));
4646}
4747
branches/kale/src/mame/video/kaneko_spr.c
r244614r244615
7171   m_first_sprite = auto_alloc_array(machine(), struct tempsprite, 0x400);
7272   m_sprites_regs = auto_alloc_array_clear(machine(), UINT16, 0x20/2);
7373   m_screen->register_screen_bitmap(m_sprites_bitmap);
74   
74
7575   save_item(NAME(m_sprite_flipx));
7676   save_item(NAME(m_sprite_flipy));
7777   save_pointer(NAME(m_sprites_regs), 0x20/2);
r244614r244615
629629// link features (assuming the bad program roms aren't the cause)  it's clearly derived from this sprite system tho.
630630void kaneko16_sprite_device::bootleg_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16* spriteram16, int spriteram16_bytes)
631631{
632//   UINT16 *spriteram16 = m_spriteram;
632//  UINT16 *spriteram16 = m_spriteram;
633633   int offs;
634634   int sx=0, sy=0;
635635
r244614r244615
662662            flipx,flipy,
663663            sx,sy,0);
664664   }
665}
No newline at end of file
665}
branches/kale/src/mame/video/liberate.c
r244614r244615
209209
210210   m_fg_gfx = memregion("fg_gfx")->base();
211211   m_charram = auto_alloc_array(machine(), UINT8, 0x1800 * 2);
212   
212
213213   save_pointer(NAME(m_charram), 0x1800 * 2);
214214   save_pointer(NAME(m_fg_gfx), 0x6000);
215215}
branches/kale/src/mame/video/mustache.c
r244614r244615
9292         8, 8, 64, 32);
9393
9494   m_bg_tilemap->set_scroll_rows(4);
95   
95
9696   save_item(NAME(m_control_byte));
9797}
9898
branches/kale/src/mame/video/quizpani.c
r244614r244615
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   
72
7373   save_item(NAME(m_bgbank));
7474   save_item(NAME(m_txtbank));
7575}
branches/kale/src/mame/video/retofinv.c
r244614r244615
103103   m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(retofinv_state::fg_get_tile_info),this),tilemap_mapper_delegate(FUNC(retofinv_state::tilemap_scan),this),8,8,36,28);
104104
105105   m_fg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0);
106   
106
107107   save_item(NAME(m_fg_bank));
108108   save_item(NAME(m_bg_bank));
109109}
branches/kale/src/mame/video/scotrsht.c
r244614r244615
119119   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(scotrsht_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
120120
121121   m_bg_tilemap->set_scroll_cols(64);
122   
122
123123   save_item(NAME(m_irq_enable));
124124   save_item(NAME(m_charbank));
125125   save_item(NAME(m_palette_bank));
branches/kale/src/mame/video/shadfrce.c
r244614r244615
6767   m_bg1tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shadfrce_state::get_bg1tile_info),this),TILEMAP_SCAN_ROWS, 16, 16,32,32);
6868
6969   m_spvideoram_old = auto_alloc_array(machine(), UINT16, m_spvideoram.bytes()/2);
70   
70
7171   save_item(NAME(m_video_enable));
7272   save_item(NAME(m_irqs_enable));
7373   save_item(NAME(m_raster_scanline));
branches/kale/src/mame/video/shootout.c
r244614r244615
8080   m_background = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shootout_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
8181   m_foreground = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(shootout_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
8282   m_foreground->set_transparent_pen(0 );
83   
83
8484   save_item(NAME(m_bFlicker));
8585}
8686
branches/kale/src/mame/video/skydiver.c
r244614r244615
5252void skydiver_state::video_start()
5353{
5454   m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(skydiver_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
55   
55
5656   save_item(NAME(m_nmion));
5757   save_item(NAME(m_width));
5858}
branches/kale/src/mame/video/tecmo.c
r244614r244615
9494
9595   m_bg_tilemap->set_scrolldx(-48,256+48);
9696   m_fg_tilemap->set_scrolldx(-48,256+48);
97   
97
9898   save_item(NAME(m_fgscroll));
9999   save_item(NAME(m_bgscroll));
100100}
branches/kale/src/mame/video/tecmo16.c
r244614r244615
8282   m_tx_tilemap->set_scrolly(0,-16);
8383   m_flipscreen = 0;
8484   m_game_is_riot = 0;
85   
85
8686   save_state();
8787}
8888
r244614r244615
104104   m_tx_tilemap->set_transparent_pen(0);
105105   m_flipscreen = 0;
106106   m_game_is_riot = 0;
107   
107
108108   save_state();
109109}
110110
r244614r244615
127127   m_tx_tilemap->set_scrolldy(-16,-16);
128128   m_flipscreen = 0;
129129   m_game_is_riot = 1;
130   
130
131131   save_state();
132132}
133133
branches/kale/src/mame/video/tecmosys.c
r244614r244615
339339
340340   m_bg2tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(tecmosys_state::get_bg2tile_info),this),TILEMAP_SCAN_ROWS,16,16,32,32);
341341   m_bg2tilemap->set_transparent_pen(0);
342   
342
343343   save_item(NAME(m_spritelist));
344344}
branches/kale/src/mame/video/tehkanwc.c
r244614r244615
9494         8, 8, 32, 32);
9595
9696   m_fg_tilemap->set_transparent_pen(0);
97   
97
9898   save_item(NAME(m_scroll_x));
9999   save_item(NAME(m_led0));
100100   save_item(NAME(m_led1));
branches/kale/src/mame/video/vball.c
r244614r244615
4444   m_gfxset=0;
4545   m_bgprombank=0xff;
4646   m_spprombank=0xff;
47   
47
4848   save_item(NAME(m_scrollx_hi));
4949   save_item(NAME(m_scrolly_hi));
5050   save_item(NAME(m_scrollx_lo));
branches/kale/src/mame/video/welltris.c
r244614r244615
7171   m_char_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(welltris_state::get_tile_info),this), TILEMAP_SCAN_ROWS,  8, 8, 64, 32);
7272
7373   m_char_tilemap->set_transparent_pen(15);
74   
74
7575   save_item(NAME(m_gfxbank));
7676   save_item(NAME(m_charpalettebank));
7777   save_item(NAME(m_spritepalettebank));
branches/kale/src/mame/video/wwfsstar.c
r244614r244615
207207
208208   m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(wwfsstar_state::get_bg0_tile_info),this),tilemap_mapper_delegate(FUNC(wwfsstar_state::bg0_scan),this), 16, 16,32,32);
209209   m_fg0_tilemap->set_transparent_pen(0);
210   
210
211211   save_item(NAME(m_vblank));
212212   save_item(NAME(m_scrollx));
213213   save_item(NAME(m_scrolly));
branches/kale/src/mame/video/xxmissio.c
r244614r244615
6969   m_bg_tilemap->set_scrolldx(2, 12);
7070
7171   m_fg_tilemap->set_transparent_pen(0);
72   
72
7373   save_item(NAME(m_xscroll));
7474   save_item(NAME(m_yscroll));
7575   save_item(NAME(m_flipscreen));
branches/kale/src/mess/audio/gamate.c
r244614r244615
3535void gamate_sound_device::device_start()
3636{
3737   // bind callbacks
38//   m_irq_cb.bind_relative_to(*owner());
38//  m_irq_cb.bind_relative_to(*owner());
3939
4040   memset(m_channels, 0, sizeof(m_channels));
4141   memset(reg, 0, sizeof(reg));
r244614r244615
9393   m_mixer_channel->update();
9494   reg[offset] = data;
9595   int chan=-1;
96   
96
9797   switch (offset)
9898   {
9999      case 0:
r244614r244615
102102      case 3:
103103      case 4:
104104      case 5:
105        chan=offset/2;
105         chan=offset/2;
106106         size = reg[chan*2] | ((reg[chan*2+1] & 0xf) << 8);
107107         if (size)
108108         {
r244614r244615
117117      case 6:
118118      case 7:
119119      case 8:
120        chan=offset-6;
121//         m_channels[chan]->on = data & 0x40;
122//         channel->waveform = (data & 0x30) >> 4;
120         chan=offset-6;
121//          m_channels[chan]->on = data & 0x40;
122//          channel->waveform = (data & 0x30) >> 4;
123123         m_channels[chan].volume = data & 0xf;
124124         break;
125125   }
126  if (chan!=-1) m_channels[chan].on=m_channels[chan].volume!=0 && m_channels[chan].size>3/* avoid speed loss for unhearable >=23khz*/; 
126   if (chan!=-1) m_channels[chan].on=m_channels[chan].volume!=0 && m_channels[chan].size>3/* avoid speed loss for unhearable >=23khz*/;
127127}
branches/kale/src/mess/drivers/alnchase.c
r244614r244615
66  * boards are labeled TN-16
77  * NEC uCOM-43 MCU, labeled D553C 258
88  * red/green VFD display with color overlay, 2-sided*
9 
9
1010  *Player one views the VFD from the front (grid+filament side) while the
1111  opposite player views it from the back side (through the conductive traces),
1212  basically a mirror-image.
13 
13
1414  This is a space-themed tabletop VFD electronic game. To start, simply
1515  press [UP]. Hold a joystick direction to move around.
1616
r244614r244615
4242   required_device<cpu_device> m_maincpu;
4343   required_ioport_array<2> m_button_matrix;
4444   required_device<speaker_sound_device> m_speaker;
45   
45
4646   UINT8 m_input_mux;
4747   UINT32 m_plate;
4848   UINT16 m_grid;
r244614r244615
7373         // on difference, send to output
7474         for (int j = 0; j < 17; j++)
7575            output_set_lamp_value(i*100 + j, m_plate >> j & 1);
76         
76
7777         m_vfd_state[i] = m_plate;
7878      }
7979}
r244614r244615
101101WRITE8_MEMBER(alnchase_state::display_w)
102102{
103103   int shift;
104   
104
105105   if (offset <= NEC_UCOM4_PORTE)
106106   {
107107      // C/D/E0: vfd matrix grid
108108      shift = (offset - NEC_UCOM4_PORTC) * 4;
109109      m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
110     
110
111111      // C0(grid 0): input enable PL1
112112      // D0(grid 4): input enable PL2
113113      m_input_mux = (m_grid & 1) | (m_grid >> 3 & 2);
114114   }
115   
115
116116   if (offset >= NEC_UCOM4_PORTE)
117117   {
118118      // E23/F/G/H/I: vfd matrix plate
119119      shift = (offset - NEC_UCOM4_PORTE) * 4;
120120      m_plate = ((m_plate << 2 & ~(0xf << shift)) | (data << shift)) >> 2;
121121   }
122   
122
123123   update_vfd();
124124}
125125
r244614r244615
143143
144144    POWER SOUND LEVEL PLAYER
145145     ON    ON    PRO   TWO        START
146      o     o     |     |   
146      o     o     |     |
147147      |     |     |     |       [joystick]
148148      |     |     o     o
149149     OFF   OFF   AMA   ONE     GAME 0,1,2,3
150   
150
151151    1 PLAYER SIDE
152   
152
153153    other player side only has a joystick
154154*/
155155
branches/kale/src/mess/drivers/c65.c
r244614r244615
1212
1313Note:
1414- VIC-4567 will be eventually be added via compile switch, once that I
15  get the hang of the system (and checking where the old code fails
15  get the hang of the system (and checking where the old code fails
1616  eventually)
1717
1818***************************************************************************/
r244614r244615
6060   UINT8 *m_iplrom;
6161   UINT8 m_keyb_input[10];
6262   UINT8 m_keyb_mux;
63   
63
6464   DECLARE_READ8_MEMBER(vic4567_dummy_r);
6565   DECLARE_WRITE8_MEMBER(vic4567_dummy_w);
6666   DECLARE_WRITE8_MEMBER(PalRed_w);
r244614r244615
7474   DECLARE_READ8_MEMBER(cia0_portb_r);
7575   DECLARE_WRITE8_MEMBER(cia0_portb_w);
7676   DECLARE_WRITE_LINE_MEMBER(cia0_irq);
77   
77
7878   DECLARE_READ8_MEMBER(dummy_r);
7979
8080   // screen updates
r244614r244615
8282   DECLARE_PALETTE_INIT(c65);
8383   DECLARE_DRIVER_INIT(c65);
8484   DECLARE_DRIVER_INIT(c65pal);
85   
85
8686   INTERRUPT_GEN_MEMBER(vic3_vblank_irq);
8787protected:
8888   // driver_device overrides
r244614r244615
124124{
125125   int y,x;
126126   int border_color = m_VIC2_EXTColor & 0xf;
127   
127
128128   // TODO: border area
129129   for(y=0;y<m_screen->height();y++)
130130   {
r244614r244615
139139         UINT8 attr = m_cram[xi+yi*80];
140140         if(attr & 0xf0)
141141            attr = machine().rand() & 0xf;
142         
142
143143         int enable_dot = ((m_iplrom[(tile<<3)+ym+0xd000] >> xm) & 1);
144                 
144
145145         //if(cliprect.contains(x, y))
146146         bitmap.pix16(y, x) = m_palette->pen((enable_dot) ? attr & 0xf : border_color);
147147
148         
148
149149         //gfx->opaque(bitmap,cliprect,tile,0,0,0,x*8,y*8);
150150      }
151151   }
r244614r244615
170170         return 0xff; // silence log for now
171171      case 0x19:
172172         return m_VIC2_IRQPend;
173     
173
174174      case 0x1a:
175175         return m_VIC2_IRQMask;
176         
176
177177      case 0x20:
178178         return m_VIC2_EXTColor;
179179
r244614r244615
182182      case 0x31:
183183         return m_VIC3_ControlB;
184184   }
185   
185
186186   if(!space.debugger_access())
187187      printf("%02x\n",offset); // TODO: PC
188188   return res;
r244614r244615
203203      case 0x20:
204204         m_VIC2_EXTColor = data & 0xf;
205205         break;
206      /* KEY register, handles vic-iii and vic-ii modes via two consecutive writes
206      /* KEY register, handles vic-iii and vic-ii modes via two consecutive writes
207207        0xa5 -> 0x96 vic-iii mode
208          any other write vic-ii mode
208        any other write vic-ii mode
209209        */
210210      //case 0x2f: break;
211      case 0x30:
211      case 0x30:
212212         if((data & 0xfe) != 0x64)
213            printf("CONTROL A %02x\n",data);
213            printf("CONTROL A %02x\n",data);
214214         m_VIC3_ControlA = data;
215215         break;
216216      case 0x31:
217         printf("CONTROL B %02x\n",data);
217         printf("CONTROL B %02x\n",data);
218218         m_VIC3_ControlB = data;
219219         break;
220220      default:
221221         if(!space.debugger_access())
222            printf("%02x %02x\n",offset,data);
222            printf("%02x %02x\n",offset,data);
223223         break;
224224   }
225225
r244614r244615
365365            break;
366366      }
367367   }
368   
368
369369}
370370
371371READ8_MEMBER(c65_state::cia0_porta_r)
372372{
373
374373   return 0xff;
375374}
376375
r244614r244615
378377{
379378   static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
380379   UINT8 res;
381   
380
382381   res = 0xff;
383382   for(int i=0;i<8;i++)
384383   {
385     
386384      m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read();
387385
388386      if(m_keyb_mux & 1 << (i))
r244614r244615
400398
401399WRITE8_MEMBER(c65_state::cia0_portb_w)
402400{
403
404401}
405402
406403READ8_MEMBER(c65_state::dummy_r)
r244614r244615
429426   // 0x0de00, 0x0de** Ext I/O Select 1
430427   // 0x0df00, 0x0df** Ext I/O Select 2 (RAM window?)
431428   AM_RANGE(0x0e000, 0x0ffff) AM_ROM AM_REGION("maincpu",0x0e000)
432   AM_RANGE(0x10000, 0x1f7ff) AM_RAM
429   AM_RANGE(0x10000, 0x1f7ff) AM_RAM
433430   AM_RANGE(0x1f800, 0x1ffff) AM_RAM // VRAM attributes
434431   AM_RANGE(0x20000, 0x3ffff) AM_ROM AM_REGION("maincpu",0)
435432ADDRESS_MAP_END
r244614r244615
534531
535532PALETTE_INIT_MEMBER(c65_state, c65)
536533{
537   // TODO: initial state?
534   // TODO: initial state?
538535}
539536
540537static const gfx_layout charlayout =
r244614r244615
556553{
557554   m_VIC2_IRQPend |= (irq_cause != 0) ? 0x80 : 0x00;
558555   m_VIC2_IRQPend |= irq_cause;
559   
556
560557   m_maincpu->set_input_line(M4510_IRQ_LINE,m_VIC2_IRQMask & m_VIC2_IRQPend ? ASSERT_LINE : CLEAR_LINE);
561558}
562559
r244614r244615
564561{
565562   IRQCheck(1);
566563   //if(m_VIC2_IRQMask & 1)
567   //   m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE);
564   //  m_maincpu->set_input_line(M4510_IRQ_LINE,HOLD_LINE);
568565}
569566
570567WRITE_LINE_MEMBER(c65_state::cia0_irq)
r244614r244615
577574      static const char *const c64ports[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7" };
578575      for(int i=0;i<8;i++)
579576         m_keyb_input[i] = machine().root_device().ioport(c64ports[i])->read();
580   }   
577   }
581578#endif
582//   m_cia0_irq = state;
583//   c65_irq(state || m_vicirq);
579//  m_cia0_irq = state;
580//  c65_irq(state || m_vicirq);
584581}
585582
586583static MACHINE_CONFIG_START( c65, c65_state )
r244614r244615
600597
601598   MCFG_DEVICE_ADD("cia_1", MOS6526, MAIN_CLOCK)
602599   MCFG_MOS6526_TOD(60)
603//   MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt))
604//   MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r))
605//   MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w))
600//  MCFG_MOS6526_IRQ_CALLBACK(WRITELINE(c65_state, c65_cia1_interrupt))
601//  MCFG_MOS6526_PA_INPUT_CALLBACK(READ8(c65_state, c65_cia1_port_a_r))
602//  MCFG_MOS6526_PA_OUTPUT_CALLBACK(WRITE8(c65_state, c65_cia1_port_a_w))
606603
607   
604
608605   /* video hardware */
609606   MCFG_SCREEN_ADD("screen", RASTER)
610607//  MCFG_SCREEN_REFRESH_RATE(60)
r244614r244615
654651
655652DRIVER_INIT_MEMBER(c65_state,c65)
656653{
657//   m_dma.version = 2;
658//   c65_common_driver_init();
654//  m_dma.version = 2;
655//  c65_common_driver_init();
659656}
660657
661658DRIVER_INIT_MEMBER(c65_state,c65pal)
662659{
663//   m_dma.version = 1;
664//   c65_common_driver_init();
665//   m_pal = 1;
660//  m_dma.version = 1;
661//  c65_common_driver_init();
662//  m_pal = 1;
666663}
667664
668665COMP( 1991, c65,    0,      0,      c65,    c65, c65_state, c65,    "Commodore Business Machines",  "Commodore 65 Development System (Prototype, NTSC)", GAME_NOT_WORKING )
branches/kale/src/mess/drivers/c65_old.c
r244614r244615
644644
645645COMP( 1991, c65,    0,      0,      c65,    c65, c65_state,    c65,    "Commodore Business Machines",  "Commodore 65 Development System (Prototype, NTSC)", GAME_NOT_WORKING )
646646COMP( 1991, c64dx,  c65,    0,      c65pal, c65ger, c65_state, c65pal, "Commodore Business Machines",  "Commodore 64DX Development System (Prototype, PAL, German)", GAME_NOT_WORKING )
647
648
branches/kale/src/mess/drivers/edracula.c
r244614r244615
55  Epoch Dracula (manufactured in Japan)
66  * NEC uCOM-43 MCU, labeled D553C 206
77  * cyan/red/green VFD display NEC FIP8BM20T
8 
8
99  known releases:
1010  - Japan: Dracula House, yellow case
1111  - USA: Dracula, red case
r244614r244615
4747
4848   UINT32 m_vfd_state[0x10];
4949   void update_vfd();
50   
50
5151   virtual void machine_start();
5252};
5353
r244614r244615
6767         // on difference, send to output
6868         for (int j = 0; j < 18; j++)
6969            output_set_lamp_value(i*100 + j, m_plate >> j & 1);
70         
70
7171         m_vfd_state[i] = m_plate;
7272      }
7373}
r244614r244615
8585   // port C/D: vfd matrix grid
8686   int shift = (offset - NEC_UCOM4_PORTC) * 4;
8787   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
88   
88
8989   update_vfd();
9090}
9191
r244614r244615
9494   // port E/F/G/H/I01: vfd matrix plate
9595   int shift = (offset - NEC_UCOM4_PORTE) * 4;
9696   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
97   
97
9898   update_vfd();
9999}
100100
branches/kale/src/mess/drivers/gamate.c
r244614r244615
5151
5252   struct
5353   {
54     UINT8 reg[8];
55     struct {
56       bool write;
57       bool page2; // else page1
54   UINT8 reg[8];
55   struct {
56      bool write;
57      bool page2; // else page1
5858   UINT8 ypos, xpos/*tennis*/;
59       UINT8 data[2][0x100][0x20];
60     } bitmap;
61     UINT8 x, y;
59      UINT8 data[2][0x100][0x20];
60      } bitmap;
61   UINT8 x, y;
6262      bool y_increment;
6363   } video;
6464
6565   struct {
66     bool set;
66      bool set;
6767      int bit_shifter;
6868      UINT8 cartridge_byte;
6969      UINT16 address; // in reality something more like short local cartridge address offset
7070      bool unprotected;
7171      bool failed;
72     
72
7373   } card_protection;
7474
7575   required_device<cpu_device> m_maincpu;
r244614r244615
8080   required_shared_ptr<UINT8> m_bios;
8181   emu_timer *timer1;
8282   emu_timer *timer2;
83   UINT8 bank_multi; 
83   UINT8 bank_multi;
8484};
8585
8686WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
8787{
88        logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
89 
88      logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
89
9090   switch (offset) {
9191   case 0:
9292      card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0);
r244614r244615
112112   }
113113   ret=(card_protection.cartridge_byte&0x80)?2:0;
114114   if (card_protection.bit_shifter==7 && !card_protection.failed) { // now protection chip on cartridge activates cartridge chip select on cpu accesses
115//        m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working
115//        m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working
116116   }
117117   card_protection.cartridge_byte<<=1;
118118   }
r244614r244615
143143{
144144   video.reg[offset]=data;
145145   switch (offset) {
146   case 1:
146   case 1:
147147      if (data&0xf) printf("lcd mode %x\n", data);
148148      video.bitmap.write=data&0xc0; // more addressing mode
149149      video.y_increment=data&0x40;
150150      break;
151151   case 2: video.bitmap.xpos=data;break;
152   case 3:
152   case 3:
153153      if (data>=200) printf("lcd ypos: %x\n", data);
154154      video.bitmap.ypos=data;
155155      break;
r244614r244615
181181
182182READ8_MEMBER( gamate_state::gamate_video_r )
183183{
184  if (offset!=6) return 0;
185  UINT8 data=0;
186  if (video.bitmap.write) {
187    data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
188  } else {
189    data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
190  }
184   if (offset!=6) return 0;
185   UINT8 data=0;
186   if (video.bitmap.write) {
187   data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
188   } else {
189   data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
190   }
191191//  if (m_maincpu->pc()<0xf000)
192192//    machine().ui().popup_time(2, "lcd read x:%x y:%x mode:%x data:%x\n", video.x, video.y, video.reg[1], data);
193  return data;
193   return data;
194194}
195195
196196WRITE8_MEMBER( gamate_state::gamate_audio_w )
197197{
198198//  printf("audio write %x:%x\n", offset, data);//logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
199  m_sound->device_w(space, offset, data);
199   m_sound->device_w(space, offset, data);
200200}
201201
202202READ8_MEMBER( gamate_state::gamate_audio_r )
203203{
204204// legend of dragon knight
205205//  machine().ui().popup_time(2, "%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
206  return 0;
206   return 0;
207207}
208208
209209
210210READ8_MEMBER( gamate_state::gamate_pad_r )
211211{
212  UINT8 data=m_io_joy->read();
213  return data;
212   UINT8 data=m_io_joy->read();
213   return data;
214214}
215215
216216static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state )
217    AM_RANGE(0x0000, 0x03ff) AM_RAM
218  AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
219  AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
220  AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
221  AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set)
222  AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset)
223  AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
217   AM_RANGE(0x0000, 0x03ff) AM_RAM
218   AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
219   AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
220   AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
221   AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set)
222   AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset)
223   AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
224224
225  AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti")
226  AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
225   AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti")
226   AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
227227
228228   AM_RANGE(0x6000, 0x6000) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w)
229229   AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w)
230230   AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w)
231231
232  AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
232   AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
233233ADDRESS_MAP_END
234234
235235
r244614r244615
254254/* palette in red, green, blue tribles */
255255static const unsigned char gamate_colors[4][3] =
256256{
257  { 255,255,255 },
258  { 0xa0, 0xa0, 0xa0 },
259  { 0x60, 0x60, 0x60 },
260  { 0, 0, 0 }
257   { 255,255,255 },
258   { 0xa0, 0xa0, 0xa0 },
259   { 0x60, 0x60, 0x60 },
260   { 0, 0, 0 }
261261};
262262
263263PALETTE_INIT_MEMBER(gamate_state, gamate)
r244614r244615
280280
281281UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
282282{
283  int x, y, j;
284  for (y=0;y<152;y++) {
285    for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {     
286      UINT8 d1, d2;
287      if (video.bitmap.ypos<200) {
283   int x, y, j;
284   for (y=0;y<152;y++) {
285   for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {
286      UINT8 d1, d2;
287      if (video.bitmap.ypos<200) {
288288   d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f];
289289   d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f];
290      } else if ((video.bitmap.ypos&0xf)<8) { // lcdtest, of course still some registers not known, my gamate doesn't display bottom lines
290      } else if ((video.bitmap.ypos&0xf)<8) { // lcdtest, of course still some registers not known, my gamate doesn't display bottom lines
291291   int yi=(y+(video.bitmap.ypos&0xf)-8);
292292   if (yi<0) yi=video.bitmap.ypos+y; // in this case only 2nd plane used!?, source of first plane?
293293   d1=video.bitmap.data[0][yi][(j+video.bitmap.xpos/8)&0x1f]; // value of lines bevor 0 chaos
294294   d2=video.bitmap.data[1][yi][(j+video.bitmap.xpos/8)&0x1f];
295      } else {
295      } else {
296296   d1=video.bitmap.data[0][y][(j+video.bitmap.xpos/8)&0x1f];
297   d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f];   
298      }
299      BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
300      BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
301    }
302  }
303  return 0;
297   d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f];
298      }
299      BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
300      BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
301   }
302   }
303   return 0;
304304}
305305
306306DRIVER_INIT_MEMBER(gamate_state,gamate)
r244614r244615
314314void gamate_state::machine_start()
315315{
316316   if (m_cart->exists()) {
317//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
317//      m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
318318      membank("bankmulti")->set_base(m_cart->get_rom_base()+1);
319319      membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset
320320   }
321//   m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback
321//  m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback
322322   card_protection.set=false;
323323   bank_multi=0;
324324   card_protection.unprotected=false;
r244614r244615
378378   MCFG_SOUND_ADD("custom", GAMATE_SND, 0)
379379   MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
380380   MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
381   
381
382382   MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gamate_cart")
383383   MCFG_GENERIC_MANDATORY
384384
r244614r244615
397397
398398/*    YEAR  NAME      PARENT  COMPAT    MACHINE   INPUT    CLASS          INIT      COMPANY    FULLNAME */
399399CONS( 19??, gamate,  0,      0,        gamate,  gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_IMPERFECT_SOUND)
400
401
branches/kale/src/mess/drivers/ngen.c
r244614r244615
405405   case 0x1a0:  // I/O control register?
406406      ret = m_control;  // end of DMA transfer? (maybe a per-channel EOP?) Bit 6 is set during a transfer?
407407      break;
408//   default:
409//      logerror("Unknown 80186 peripheral read offset %04x mask %04x returning %04x\n",offset,mem_mask,ret);
408//  default:
409//      logerror("Unknown 80186 peripheral read offset %04x mask %04x returning %04x\n",offset,mem_mask,ret);
410410   }
411411   return ret;
412412}
r244614r244615
420420{
421421   UINT16 addr = (data & 0x00ff) << 8;
422422   cpu_device* cpu;
423   
423
424424   if(m_maincpu)
425425      cpu = m_maincpu;
426426   else
r244614r244615
544544            ret = m_fdc->read(space,offset);
545545            m_fdc_timer->write_clk0(1);
546546            m_fdc_timer->write_clk0(0);  // Data register access clocks the FDC's PIT channel 0
547         }   
547         }
548548         break;
549549      case 0x08:
550550      case 0x09:
r244614r244615
706706   else
707707      cpu = m_i386cpu;
708708   address_space& prog_space = cpu->space(AS_PROGRAM); // get the right address space
709   
709
710710   if(m_dma_channel == -1)
711711      return 0xff;
712712   offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000;
r244614r244615
727727   else
728728      cpu = m_i386cpu;
729729   address_space& prog_space = cpu->space(AS_PROGRAM); // get the right address space
730     
730
731731   if(m_dma_channel == -1)
732732      return;
733733   offs_t page_offset = (((offs_t) m_dma_offset[m_dma_channel]) << 16) & 0xFE0000;
r244614r244615
905905
906906   // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board)
907907   MCFG_DEVICE_ADD("videouart", I8251, 0)  // main clock unknown, Rx/Tx clocks are 19.53kHz
908//   MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
908//  MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
909909   MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd))
910910   MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen")
911911   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd))
r244614r244615
919919   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w))
920920   MCFG_WD_FDC_FORCE_READY
921921   MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
922   MCFG_PIT8253_CLK0(0) 
922   MCFG_PIT8253_CLK0(0)
923923   MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // clocked on FDC data register access
924924   MCFG_PIT8253_CLK1(XTAL_20MHz / 20)
925//   MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // 1MHz
925//  MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // 1MHz
926926   MCFG_PIT8253_CLK2(XTAL_20MHz / 20)
927//   MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) 
927//  MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))
928928
929929   // TODO: WD1010 HDC (not implemented), use WD2010 for now
930930   MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4)
r244614r244615
10151015
10161016   // keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board)
10171017   MCFG_DEVICE_ADD("videouart", I8251, 0)  // main clock unknown, Rx/Tx clocks are 19.53kHz
1018//   MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
1018//  MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
10191019   MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd))
10201020   MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen")
10211021   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd))
r244614r244615
10261026   // floppy disk / hard disk module (WD2797 FDC, WD1010 HDC, plus an 8253 timer for each)
10271027   MCFG_WD2797x_ADD("fdc", XTAL_20MHz / 20)
10281028   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(ngen_state,fdc_irq_w))
1029//   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("i386cpu",i80186_cpu_device,drq1_w))
1029//  MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("i386cpu",i80186_cpu_device,drq1_w))
10301030   MCFG_WD_FDC_FORCE_READY
10311031   MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
1032   MCFG_PIT8253_CLK0(0) 
1032   MCFG_PIT8253_CLK0(0)
10331033   MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // clocked on FDC data register access
10341034   MCFG_PIT8253_CLK1(XTAL_20MHz / 20)
1035//   MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // 1MHz
1035//  MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))  // 1MHz
10361036   MCFG_PIT8253_CLK2(XTAL_20MHz / 20)
1037//   MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w)) 
1037//  MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir5_w))
10381038
10391039   // TODO: WD1010 HDC (not implemented), use WD2010 for now
10401040   MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4)
branches/kale/src/mess/drivers/pc9801.c
r244614r244615
886886      for(kanji_lr=0;kanji_lr<x_step;kanji_lr++)
887887      {
888888         /* Rori Rori Rolling definitely uses different colors for brake stop PCG elements,
889              assume that all attributes are recalculated on different strips */
889            assume that all attributes are recalculated on different strips */
890890         attr = (m_video_ram_1[((tile_addr+kanji_lr) & 0xfff) | 0x1000] & 0xff);
891891
892892         secret = (attr & 1) ^ 1;
r244614r244615
896896         v_line = (m_video_ff[ATTRSEL_REG]) ? 0 : attr & 0x10;
897897         gfx_mode = (m_video_ff[ATTRSEL_REG]) ? attr & 0x10 : 0;
898898         color = (attr & 0xe0) >> 5;
899     
899
900900         for(yi=0;yi<lr;yi++)
901901         {
902902            for(xi=0;xi<8;xi++)
branches/kale/src/mess/drivers/pcd.c
r244614r244615
306306   AM_RANGE(0xf9c0, 0xf9c3) AM_DEVREADWRITE8("usart1",mc2661_device,read,write,0xffff)  // UARTs
307307   AM_RANGE(0xf9d0, 0xf9d3) AM_DEVREADWRITE8("usart2",mc2661_device,read,write,0xffff)
308308   AM_RANGE(0xf9e0, 0xf9e3) AM_DEVREADWRITE8("usart3",mc2661_device,read,write,0xffff)
309//   AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
309//  AM_RANGE(0xfa00, 0xfa7f) // pcs4-n (peripheral chip select)
310310   AM_RANGE(0xfb00, 0xfb01) AM_READWRITE8(detect_r, detect_w, 0xff00) // expansion card detection?
311311   AM_RANGE(0xfb00, 0xffff) AM_READWRITE8(nmi_io_r, nmi_io_w, 0xffff)
312312ADDRESS_MAP_END
branches/kale/src/mess/drivers/snes.c
r244614r244615
10981098      UINT16 joy1 = 0, joy2 = 0, joy3 = 0, joy4 = 0;
10991099      m_ctrl1->port_poll();
11001100      m_ctrl2->port_poll();
1101     
1101
11021102      for (int i = 0; i < 16; i++)
11031103      {
11041104         joy1 |= ((m_ctrl1->read_pin4() & 1) << (15 - i));
r244614r244615
11151115      SNES_CPU_REG(JOY3H) = (joy3 & 0xff00) >> 8;
11161116      SNES_CPU_REG(JOY4L) = (joy4 & 0x00ff) >> 0;
11171117      SNES_CPU_REG(JOY4H) = (joy4 & 0xff00) >> 8;
1118   }     
1118   }
11191119}
11201120
11211121UINT8 snes_console_state::oldjoy1_read(int latched)
r244614r244615
11601160      x = 0;
11611161   if (x > (SNES_SCR_WIDTH - 1))
11621162      x = SNES_SCR_WIDTH - 1;
1163   
1163
11641164   if (y < 0)
11651165      y = 0;
11661166   if (y > (m_ppu->m_beam.last_visible_line - 1))
11671167      y = m_ppu->m_beam.last_visible_line - 1;
11681168
1169//   m_ppu->set_latch_hv(x, y);   // it would be more accurate to write twice to WRIO register, first with bit7 = 0 and then with bit7 = 1
1169//  m_ppu->set_latch_hv(x, y);  // it would be more accurate to write twice to WRIO register, first with bit7 = 0 and then with bit7 = 1
11701170   m_ppu->set_latch_hv(m_ppu->current_x(), m_ppu->current_y());
11711171}
11721172
branches/kale/src/mess/drivers/splitsec.c
r244614r244615
203203
204204   // R9,R10: input mux
205205   m_input_mux = data >> 9 & 3;
206   
206
207207   // R0-R7: led rows
208208   m_r = data & 0xff;
209209   display_update();
r244614r244615
216216
217217   // R2,R3: input mux
218218   m_input_mux = data >> 2 & 3;
219   
219
220220   // R2-R10: led rows
221221   m_r = data & ~3;
222222   display_update();
r244614r244615
252252     SCORE]
253253
254254    ------  led display  ------
255   
255
256256    [ANGLE]  [AIM]     [CUE UP
257257                        SHOOT]
258258*/
branches/kale/src/mess/drivers/tb303.c
r244614r244615
66  * NEC uCOM-43 MCU, labeled D650C 133
77  * 3*uPD444C 1024x4 Static CMOS SRAM
88  * board is packed with discrete components
9 
9
1010  x
1111
1212***************************************************************************/
branches/kale/src/mess/drivers/tc4.c
r244614r244615
44
55  Coleco Total Control 4
66  * TMS1400NLL MP7334-N2 (die labeled MP7334)
7 
7
88  This is a head to head electronic tabletop LED-display sports console.
99  One cartridge(Football) was included with the console, the other three were
1010  sold separately. Gameplay has emphasis on strategy, read the official manual
1111  on how to play. Remember that you can rotate the view in MESS: rotate left
1212  for Home(P1) orientation, rotate right for Visitor(P2) orientation.
13 
13
1414  Cartridge socket:
1515  1 N/C
1616  2 9V+
r244614r244615
2020  6 K2
2121  7 K1
2222  8 R9
23 
23
2424  The cartridge connects pin 8 with one of the K-pins.
2525
2626  Available cartridges:
r244614r244615
166166   for (int i = 0; i < 6; i++)
167167      if (m_r >> i & 1)
168168         k |= m_button_matrix[i]->read();
169   
169
170170   // read from cartridge
171171   if (m_r & 0x200)
172172      k |= m_button_matrix[6]->read();
173   
173
174174   return k;
175175}
176176
branches/kale/src/mess/drivers/tispeak.c
r244614r244615
33/***************************************************************************
44
55  Texas Instruments 1st-gen. handheld speech devices,
6 
6
77  These devices, mostly edu-toys, are based around an MCU(TMS0270/TMS1100),
88  TMS51xx speech, and VSM ROM(s). Newer devices, such as Speak & Music,
99  are based around the TMP50C40 and belong in another driver, probably.
r244614r244615
246246    - CD2802: 16KB CD2357
247247    - notes: MCU is the same as in Touch & Tell, but instead of a toddler's toy,
248248      you get a serious medical aid device for the voice-impaired.
249   
249
250250    Spelling B (US), 1978
251251    - MCU: TMC0272*
252252    - ?: TMC1984* (what is this?)
253253    - notes: this line of toys (Spelling B, Mr. Challenger, Math Marvel) is calculator-sized,
254254      might have been aimed for older kids. Note that Math Marvel is a TMC1986, no speech.
255   
255
256256    Spelling B (US), newer
257257    - MCU: TMC0274*
258258    - TMS51xx: ?KB TMC0355 CD2602*
259   
259
260260    Spelling B (Germany) "Spelling ABC", 198?
261261    - MCU: TMC0274* (assume same as US version)
262262    - TMS51xx: ?KB TMC0355 CD2607*
263   
263
264264    Mr. Challenger (US), 1980
265265    - MCU: TMC0273*
266266    - TMS51xx: ?KB TMC0355 CD2601*
branches/kale/src/mess/drivers/tmtennis.c
r244614r244615
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 
9
1010  The initial release of this game was in 1979, known as Pro-Tennis,
1111  it is unknown if the hardware and/or ROM contents differ.
1212
1313  This is an early VFD simple electronic tennis game. Player 1 is on the right
1414  side, player 2 or CPU on the left. Each player has six possible positions
1515  where to hit the ball. A backdrop behind the VFD shows a tennis court.
16 
16
1717  NOTE!: MESS external artwork is required to be able to play
1818
1919
r244614r244615
4242   required_device<cpu_device> m_maincpu;
4343   required_ioport_array<2> m_button_matrix;
4444   required_device<speaker_sound_device> m_speaker;
45   
45
4646   UINT8 m_input_mux;
4747   UINT16 m_plate;
4848   UINT16 m_grid;
r244614r244615
8888         // on difference, send to output
8989         for (int j = 0; j < 12; j++)
9090            output_set_lamp_value(i*100 + j, m_plate >> j & 1);
91         
91
9292         m_vfd_state[i] = m_plate;
9393      }
9494}
r244614r244615
129129   if (offset == NEC_UCOM4_PORTF) offset--;
130130   int shift = (offset - NEC_UCOM4_PORTC) * 4;
131131   m_plate = (m_plate & ~(0xf << shift)) | (data << shift);
132   
132
133133   update_vfd();
134134}
135135
r244614r244615
138138   // port G/H/I: vfd matrix grid
139139   int shift = (offset - NEC_UCOM4_PORTG) * 4;
140140   m_grid = (m_grid & ~(0xf << shift)) | (data << shift);
141   
141
142142   update_vfd();
143143}
144144
branches/kale/src/mess/drivers/wildfire.c
r244614r244615
6262   TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick);
6363   bool index_is_7segled(int index);
6464   void display_update();
65   
65
6666   TIMER_DEVICE_CALLBACK_MEMBER(reset_q2);
6767   void write_a12(int state);
6868   void sound_update();
r244614r244615
9494// where xx is led column and y is led row, eg. lamp103 is output A10 D3
9595// (note: 2 mistakes in the patent: the L19 between L12 and L14 should be L13, and L84 should of course be L48)
9696/*
97    L0  = -         L10 = lamp60    L20 = lamp41    L30 = lamp53    L40 = lamp57    L50 = lamp110 
98    L1  = lamp107   L11 = lamp50    L21 = lamp42    L31 = lamp43    L41 = lamp66    L51 = lamp111 
99    L2  = lamp106   L12 = lamp61    L22 = lamp52    L32 = lamp54    L42 = lamp76    L52 = lamp112 
100    L3  = lamp105   L13 = lamp71    L23 = lamp63    L33 = lamp55    L43 = lamp86    L53 = lamp113 
101    L4  = lamp104   L14 = lamp81    L24 = lamp73    L34 = lamp117   L44 = lamp96    L60 = lamp30   
97    L0  = -         L10 = lamp60    L20 = lamp41    L30 = lamp53    L40 = lamp57    L50 = lamp110
98    L1  = lamp107   L11 = lamp50    L21 = lamp42    L31 = lamp43    L41 = lamp66    L51 = lamp111
99    L2  = lamp106   L12 = lamp61    L22 = lamp52    L32 = lamp54    L42 = lamp76    L52 = lamp112
100    L3  = lamp105   L13 = lamp71    L23 = lamp63    L33 = lamp55    L43 = lamp86    L53 = lamp113
101    L4  = lamp104   L14 = lamp81    L24 = lamp73    L34 = lamp117   L44 = lamp96    L60 = lamp30
102102    L5  = lamp103   L15 = lamp92    L25 = lamp115   L35 = lamp75    L45 = lamp67    L61 = lamp30(!)
103    L6  = lamp102   L16 = lamp82    L26 = lamp93    L36 = lamp95    L46 = lamp77    L62 = lamp31   
103    L6  = lamp102   L16 = lamp82    L26 = lamp93    L36 = lamp95    L46 = lamp77    L62 = lamp31
104104    L7  = lamp101   L17 = lamp72    L27 = lamp94    L37 = lamp56    L47 = lamp87    L63 = lamp31(!)
105    L8  = lamp80    L18 = lamp114   L28 = lamp84    L38 = lamp65    L48 = lamp97    L70 = lamp33   
106    L9  = lamp70    L19 = lamp51    L29 = lamp116   L39 = lamp85    L49 = -     
105    L8  = lamp80    L18 = lamp114   L28 = lamp84    L38 = lamp65    L48 = lamp97    L70 = lamp33
106    L9  = lamp70    L19 = lamp51    L29 = lamp116   L39 = lamp85    L49 = -
107107*/
108108
109109void wildfire_state::display_update()
r244614r244615
221221WRITE16_MEMBER(wildfire_state::write_a)
222222{
223223   data ^= 0x1fff; // active-low
224   
224
225225   // A12: enable speaker
226226   write_a12(data >> 12 & 1);
227227
branches/kale/src/mess/includes/gamate.h
r244614r244615
1414struct GAMATE_CHANNEL
1515{
1616   GAMATE_CHANNEL() :
17//      on(0),
18//      waveform(0),
17//      on(0),
18//      waveform(0),
1919      volume(0),
2020      pos(0),
2121      size(0)
22//      count(0)
22//      count(0)
2323   {
2424   }
2525
r244614r244615
2727   int /*waveform,*/ volume;
2828   int pos;
2929   int size;
30//   int count;
30//  int count;
3131};
3232
3333
r244614r244615
5151   DECLARE_WRITE8_MEMBER( device_w );
5252
5353private:
54 
54
5555   sound_stream *m_mixer_channel;
5656   GAMATE_CHANNEL m_channels[3];
5757   UINT8 reg[14];
branches/kale/src/mess/machine/amstrad.c
r244614r244615
29182918
29192919void amstrad_state::amstrad_common_init()
29202920{
2921//   address_space &space = m_maincpu->space(AS_PROGRAM);
2921//  address_space &space = m_maincpu->space(AS_PROGRAM);
29222922
29232923   m_aleste_mode = 0;
29242924
r244614r244615
29282928   m_GateArray_RamConfiguration = 0;
29292929   m_gate_array.hsync_counter = 2;
29302930
2931/*   space.install_read_bank(0x0000, 0x1fff, "bank1");
2932   space.install_read_bank(0x2000, 0x3fff, "bank2");
2931/*  space.install_read_bank(0x0000, 0x1fff, "bank1");
2932    space.install_read_bank(0x2000, 0x3fff, "bank2");
29332933
2934   space.install_read_bank(0x4000, 0x5fff, "bank3");
2935   space.install_read_bank(0x6000, 0x7fff, "bank4");
2934    space.install_read_bank(0x4000, 0x5fff, "bank3");
2935    space.install_read_bank(0x6000, 0x7fff, "bank4");
29362936
2937   space.install_read_bank(0x8000, 0x9fff, "bank5");
2938   space.install_read_bank(0xa000, 0xbfff, "bank6");
2937    space.install_read_bank(0x8000, 0x9fff, "bank5");
2938    space.install_read_bank(0xa000, 0xbfff, "bank6");
29392939
2940   space.install_read_bank(0xc000, 0xdfff, "bank7");
2941   space.install_read_bank(0xe000, 0xffff, "bank8");
2940    space.install_read_bank(0xc000, 0xdfff, "bank7");
2941    space.install_read_bank(0xe000, 0xffff, "bank8");
29422942
2943   space.install_write_bank(0x0000, 0x1fff, "bank9");
2944   space.install_write_bank(0x2000, 0x3fff, "bank10");
2943    space.install_write_bank(0x0000, 0x1fff, "bank9");
2944    space.install_write_bank(0x2000, 0x3fff, "bank10");
29452945
2946   space.install_write_bank(0x4000, 0x5fff, "bank11");
2947   space.install_write_bank(0x6000, 0x7fff, "bank12");
2946    space.install_write_bank(0x4000, 0x5fff, "bank11");
2947    space.install_write_bank(0x6000, 0x7fff, "bank12");
29482948
2949   space.install_write_bank(0x8000, 0x9fff, "bank13");
2950   space.install_write_bank(0xa000, 0xbfff, "bank14");
2949    space.install_write_bank(0x8000, 0x9fff, "bank13");
2950    space.install_write_bank(0xa000, 0xbfff, "bank14");
29512951
2952   space.install_write_bank(0xc000, 0xdfff, "bank15");
2953   space.install_write_bank(0xe000, 0xffff, "bank16");
2952    space.install_write_bank(0xc000, 0xdfff, "bank15");
2953    space.install_write_bank(0xe000, 0xffff, "bank16");
29542954*/
29552955   enumerate_roms();
29562956
branches/kale/src/mess/machine/apple3.c
r244614r244615
248248         apple3_write_charmem();
249249         break;
250250
251      case 0xE0: case 0xE1:
251      case 0xE0: case 0xE1:
252252         result = m_fdc->read(space, offset&0xf);
253253         m_va = offset & 1;
254254         break;
r244614r244615
258258         m_vb = offset & 1;
259259         break;
260260
261      case 0xE4: case 0xE5:
261      case 0xE4: case 0xE5:
262262         result = m_fdc->read(space, offset&0xf);
263263         m_vc = offset & 1;
264264         break;
265265
266      case 0xE6: case 0xE7: case 0xE8: case 0xE9:
267      case 0xEA: case 0xEB: case 0xEC: case 0xED:
266      case 0xE6: case 0xE7: case 0xE8: case 0xE9:
267      case 0xEA: case 0xEB: case 0xEC: case 0xED:
268268      case 0xEE: case 0xEF:
269269         result = m_fdc->read(space, offset&0xf);
270270         break;
r244614r244615
12971297      m_maincpu->set_input_line(INPUT_LINE_NMI, state);
12981298   }
12991299}
1300
branches/kale/src/mess/machine/beta.c
r244614r244615
106106READ8_MEMBER(beta_disk_device::state_r)
107107{
108108   if (m_betadisk_active==1) {
109      UINT8 result = 0x3F;      // actually open bus
109      UINT8 result = 0x3F;        // actually open bus
110110      result |= m_wd179x->drq_r() ? 0x40 : 0;
111111      result |= m_wd179x->intrq_r() ? 0x80 : 0;
112112      return result;
r244614r244615
181181SLOT_INTERFACE_END
182182
183183static MACHINE_CONFIG_FRAGMENT( beta_disk )
184   MCFG_WD2793x_ADD("wd179x", XTAL_8MHz / 8)   // KR1818VG93 clone of WD1793
184   MCFG_WD2793x_ADD("wd179x", XTAL_8MHz / 8)   // KR1818VG93 clone of WD1793
185185   MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats)
186186   MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats)
187187   MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats)
branches/kale/src/mess/machine/c65_old.c
r244614r244615
13351335   value &= ~ioport("FUNCT")->read();
13361336   m_keyline = value;
13371337}
1338
branches/kale/src/mess/osd/windows/windows.mak
r244614r244615
2828$(MESS_WINOBJ)/%.res: $(MESS_WINSRC)/%.rc
2929   @echo Compiling resources $<...
3030   $(RC) $(RCDEFS) $(RCFLAGS) --include-dir $(MESS_WINOBJ) -o $@ -i $<
31   
3231
32
3333#-------------------------------------------------
3434# rules for resource file
3535#-------------------------------------------------
branches/kale/src/mess/video/apple3.c
r244614r244615
482482
483483UINT32 apple3_state::screen_update_apple3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
484484{
485//   printf("gfx mode %x\n", m_flags & (VAR_VM3|VAR_VM1|VAR_VM0));
485//  printf("gfx mode %x\n", m_flags & (VAR_VM3|VAR_VM1|VAR_VM0));
486486
487487   switch(m_flags & (VAR_VM3|VAR_VM1|VAR_VM0))
488488   {
branches/kale/src/osd/modules/debugger/debugwin.c
r244614r244615
7373private:
7474   template <typename T> T *create_window();
7575
76   running_machine            *m_machine;
77   auto_pointer<ui_metrics>   m_metrics;
78   bool                  m_waiting_for_debugger;
79   simple_list<debugwin_info>   m_window_list;
80   consolewin_info            *m_main_console;
76   running_machine             *m_machine;
77   auto_pointer<ui_metrics>    m_metrics;
78   bool                        m_waiting_for_debugger;
79   simple_list<debugwin_info>  m_window_list;
80   consolewin_info             *m_main_console;
8181};
8282
8383
r244614r244615
207207         int const vkey = wininput_vkey_for_mame_code(code);
208208         bool const pressed = (vkey != 0) && ((GetAsyncKeyState(vkey) & 0x8000) != 0);
209209
210         if (first)         // if this is the first in the sequence, result is set equal
210         if (first)          // if this is the first in the sequence, result is set equal
211211            result = pressed ^ invert;
212         else if (result)   // further values are ANDed
212         else if (result)    // further values are ANDed
213213            result = result && (pressed ^ invert);
214214
215215         // no longer first, and clear the invert flag
branches/kale/src/osd/modules/debugger/osx/debugcommandhistory.h
r244614r244615
1616
1717@interface MAMEDebugCommandHistory : NSObject
1818{
19   NSInteger      length, position;
20   NSString      *current;
21   NSMutableArray   *history;
19   NSInteger       length, position;
20   NSString        *current;
21   NSMutableArray  *history;
2222}
2323
2424+ (NSInteger)defaultLength;
branches/kale/src/osd/modules/debugger/osx/debugconsole.h
r244614r244615
2222
2323@interface MAMEDebugConsole : MAMEDebugWindowHandler <NSTextFieldDelegate, NSSplitViewDelegate>
2424{
25   MAMEDebugCommandHistory   *history;
26   NSMutableArray         *auxiliaryWindows;
25   MAMEDebugCommandHistory *history;
26   NSMutableArray          *auxiliaryWindows;
2727
28   MAMERegistersView      *regView;
29   MAMEDisassemblyView      *dasmView;
30   MAMEDebugView         *consoleView;
31   NSTextField            *commandField;
28   MAMERegistersView       *regView;
29   MAMEDisassemblyView     *dasmView;
30   MAMEDebugView           *consoleView;
31   NSTextField             *commandField;
3232}
3333
3434- (id)initWithMachine:(running_machine &)m;
branches/kale/src/osd/modules/debugger/osx/debugview.h
r244614r244615
1919
2020@interface MAMEDebugView : NSView
2121{
22   int            type;
23   running_machine   *machine;
24   debug_view      *view;
25   BOOL         wholeLineScroll;
22   int             type;
23   running_machine *machine;
24   debug_view      *view;
25   BOOL            wholeLineScroll;
2626
27   INT32         totalWidth, totalHeight, originTop;
27   INT32           totalWidth, totalHeight, originTop;
2828
29   NSFont         *font;
30   CGFloat         fontWidth, fontHeight, fontAscent;
29   NSFont          *font;
30   CGFloat         fontWidth, fontHeight, fontAscent;
3131
32   NSTextStorage   *text;
33   NSTextContainer   *textContainer;
34   NSLayoutManager   *layoutManager;
32   NSTextStorage   *text;
33   NSTextContainer *textContainer;
34   NSLayoutManager *layoutManager;
3535}
3636
3737+ (NSFont *)defaultFont;
branches/kale/src/osd/modules/debugger/osx/debugwindowhandler.h
r244614r244615
2828
2929@interface MAMEDebugWindowHandler : NSObject <NSWindowDelegate>
3030{
31   NSWindow      *window;
32   running_machine   *machine;
31   NSWindow        *window;
32   running_machine *machine;
3333}
3434
3535+ (void)addCommonActionItems:(NSMenu *)menu;
r244614r244615
6464
6565@interface MAMEAuxiliaryDebugWindowHandler : MAMEDebugWindowHandler
6666{
67   MAMEDebugConsole   *console;
67   MAMEDebugConsole    *console;
6868}
6969
7070+ (void)cascadeWindow:(NSWindow *)window;
r244614r244615
8686
8787@interface MAMEExpressionAuxiliaryDebugWindowHandler : MAMEAuxiliaryDebugWindowHandler <NSTextFieldDelegate>
8888{
89   MAMEDebugCommandHistory   *history;
90   NSTextField            *expressionField;
89   MAMEDebugCommandHistory *history;
90   NSTextField             *expressionField;
9191}
9292
9393- (id)initWithMachine:(running_machine &)m title:(NSString *)t console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/deviceinfoviewer.h
r244614r244615
2222
2323@interface MAMEDeviceInfoViewer : MAMEAuxiliaryDebugWindowHandler
2424{
25   device_t   *device;
25   device_t    *device;
2626}
2727
2828- (id)initWithDevice:(device_t &)d machine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/devicesviewer.h
r244614r244615
2222
2323@interface MAMEDevicesViewer : MAMEAuxiliaryDebugWindowHandler <NSOutlineViewDataSource>
2424{
25   MAMEDeviceWrapper   *root;
26   NSOutlineView      *devicesView;
25   MAMEDeviceWrapper   *root;
26   NSOutlineView       *devicesView;
2727}
2828
2929- (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/disassemblyviewer.h
r244614r244615
2222
2323@interface MAMEDisassemblyViewer : MAMEExpressionAuxiliaryDebugWindowHandler
2424{
25   MAMEDisassemblyView   *dasmView;
26   NSPopUpButton      *subviewButton;
25   MAMEDisassemblyView *dasmView;
26   NSPopUpButton       *subviewButton;
2727}
2828
2929- (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/errorlogviewer.h
r244614r244615
2222
2323@interface MAMEErrorLogViewer : MAMEAuxiliaryDebugWindowHandler
2424{
25   MAMEErrorLogView   *logView;
25   MAMEErrorLogView    *logView;
2626}
2727
2828- (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/memoryviewer.h
r244614r244615
2222
2323@interface MAMEMemoryViewer : MAMEExpressionAuxiliaryDebugWindowHandler
2424{
25   MAMEMemoryView   *memoryView;
26   NSPopUpButton   *subviewButton;
25   MAMEMemoryView  *memoryView;
26   NSPopUpButton   *subviewButton;
2727}
2828
2929- (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/osx/pointsviewer.h
r244614r244615
2222
2323@interface MAMEPointsViewer : MAMEAuxiliaryDebugWindowHandler
2424{
25   NSTabView   *tabs;
25   NSTabView   *tabs;
2626}
2727
2828- (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c;
branches/kale/src/osd/modules/debugger/win/consolewininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   consolewininfo.c - Win32 debug window handling
5//  consolewininfo.c - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
304304
305305void consolewin_info::process_string(char const *string)
306306{
307   if (string[0] == 0)   // an empty string is a single step
307   if (string[0] == 0) // an empty string is a single step
308308      debug_cpu_get_visible_cpu(machine())->debug()->single_step();
309   else            // otherwise, just process the command
309   else                // otherwise, just process the command
310310      debug_console_execute_command(machine(), string, 1);
311311
312312   // clear the edit text box
branches/kale/src/osd/modules/debugger/win/consolewininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   consolewininfo.h - Win32 debug window handling
5//  consolewininfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
4747   static void add_filter_entry(astring &dest, char const *description, char const *extensions);
4848   static void copy_extension_list(astring &dest, char const *extensions);
4949
50   HMENU   m_devices_menu;
50   HMENU   m_devices_menu;
5151};
5252
5353#endif
branches/kale/src/osd/modules/debugger/win/debugbaseinfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugbaseinfo.c - Win32 debug window handling
5//  debugbaseinfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/debugbaseinfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugbaseinfo.h - Win32 debug window handling
5//  debugbaseinfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
3030   static void smart_show_window(HWND wnd, bool show);
3131
3232private:
33   debugger_windows_interface   &m_debugger;
34   running_machine            &m_machine;
35   ui_metrics const         &m_metrics;
36   bool const               &m_waiting_for_debugger;
33   debugger_windows_interface  &m_debugger;
34   running_machine             &m_machine;
35   ui_metrics const            &m_metrics;
36   bool const                  &m_waiting_for_debugger;
3737};
3838
3939
branches/kale/src/osd/modules/debugger/win/debugviewinfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugview.c - Win32 debug window handling
5//  debugview.c - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
1717
1818
1919// debugger view styles
20#define   DEBUG_VIEW_STYLE   WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
21#define   DEBUG_VIEW_STYLE_EX   0
20#define DEBUG_VIEW_STYLE    WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
21#define DEBUG_VIEW_STYLE_EX 0
2222
2323// combo box styles
24#define   COMBO_BOX_STYLE      WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL
25#define   COMBO_BOX_STYLE_EX   0
24#define COMBO_BOX_STYLE     WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL
25#define COMBO_BOX_STYLE_EX  0
2626
2727// horizontal scroll bar styles
28#define   HSCROLL_STYLE      WS_CHILD | WS_VISIBLE | SBS_HORZ
29#define   HSCROLL_STYLE_EX   0
28#define HSCROLL_STYLE       WS_CHILD | WS_VISIBLE | SBS_HORZ
29#define HSCROLL_STYLE_EX    0
3030
3131// vertical scroll bar styles
32#define   VSCROLL_STYLE      WS_CHILD | WS_VISIBLE | SBS_VERT
33#define   VSCROLL_STYLE_EX   0
32#define VSCROLL_STYLE       WS_CHILD | WS_VISIBLE | SBS_VERT
33#define VSCROLL_STYLE_EX    0
3434
3535
3636bool debugview_info::s_window_class_registered = false;
r244614r244615
310310   // iterate over rows and columns
311311   for (UINT32 row = 0; row < visarea.y; row++)
312312   {
313
314313      // loop twice; once to fill the background and once to draw the text
315314      for (int iter = 0; iter < 2; iter++)
316315      {
r244614r244615
789788      WNDCLASS wc = { 0 };
790789
791790      // initialize the description of the window class
792      wc.lpszClassName   = TEXT("MAMEDebugView");
793      wc.hInstance      = GetModuleHandle(NULL);
794      wc.lpfnWndProc      = &debugview_info::static_view_proc;
795      wc.hCursor         = LoadCursor(NULL, IDC_ARROW);
796      wc.hIcon         = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
797      wc.lpszMenuName      = NULL;
798      wc.hbrBackground   = NULL;
799      wc.style         = 0;
800      wc.cbClsExtra      = 0;
801      wc.cbWndExtra      = 0;
791      wc.lpszClassName    = TEXT("MAMEDebugView");
792      wc.hInstance        = GetModuleHandle(NULL);
793      wc.lpfnWndProc      = &debugview_info::static_view_proc;
794      wc.hCursor          = LoadCursor(NULL, IDC_ARROW);
795      wc.hIcon            = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
796      wc.lpszMenuName     = NULL;
797      wc.hbrBackground    = NULL;
798      wc.style            = 0;
799      wc.cbClsExtra       = 0;
800      wc.cbWndExtra       = 0;
802801
803802      // register the class; fail if we can't
804803      if (!RegisterClass(&wc))
branches/kale/src/osd/modules/debugger/win/debugviewinfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugviewinfo.h - Win32 debug window handling
5//  debugviewinfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
6565
6666   static void register_window_class();
6767
68   debugwin_info   &m_owner;
69   debug_view      *m_view;
70   HWND         m_wnd;
71   HWND         m_hscroll;
72   HWND         m_vscroll;
68   debugwin_info   &m_owner;
69   debug_view      *m_view;
70   HWND            m_wnd;
71   HWND            m_hscroll;
72   HWND            m_vscroll;
7373
74   static bool      s_window_class_registered;
74   static bool     s_window_class_registered;
7575};
7676
7777#endif
branches/kale/src/osd/modules/debugger/win/debugwin.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugwin.h - Win32 debug window handling
5//  debugwin.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/debugwininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugwininfo.c - Win32 debug window handling
5//  debugwininfo.c - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
579579      WNDCLASS wc = { 0 };
580580
581581      // initialize the description of the window class
582      wc.lpszClassName   = TEXT("MAMEDebugWindow");
583      wc.hInstance      = GetModuleHandle(NULL);
584      wc.lpfnWndProc      = &debugwin_info::static_window_proc;
585      wc.hCursor         = LoadCursor(NULL, IDC_ARROW);
586      wc.hIcon         = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
587      wc.lpszMenuName      = NULL;
588      wc.hbrBackground   = NULL;
589      wc.style         = 0;
590      wc.cbClsExtra      = 0;
591      wc.cbWndExtra      = 0;
582      wc.lpszClassName    = TEXT("MAMEDebugWindow");
583      wc.hInstance        = GetModuleHandle(NULL);
584      wc.lpfnWndProc      = &debugwin_info::static_window_proc;
585      wc.hCursor          = LoadCursor(NULL, IDC_ARROW);
586      wc.hIcon            = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
587      wc.lpszMenuName     = NULL;
588      wc.hbrBackground    = NULL;
589      wc.style            = 0;
590      wc.cbClsExtra       = 0;
591      wc.cbWndExtra       = 0;
592592
593593      // register the class; fail if we can't
594594      if (!RegisterClass(&wc))
branches/kale/src/osd/modules/debugger/win/debugwininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   debugwininfo.h - Win32 debug window handling
5//  debugwininfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
5454   virtual bool handle_key(WPARAM wparam, LPARAM lparam);
5555
5656protected:
57   static DWORD const   DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX);
58   static DWORD const   DEBUG_WINDOW_STYLE_EX = 0;
57   static DWORD const  DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX);
58   static DWORD const  DEBUG_WINDOW_STYLE_EX = 0;
5959
60   static int const   MAX_VIEWS = 4;
61   static int const   EDGE_WIDTH = 3;
60   static int const    MAX_VIEWS = 4;
61   static int const    EDGE_WIDTH = 3;
6262
6363   enum
6464   {
r244614r244615
9898      ID_SHOW_BREAKPOINTS,
9999      ID_SHOW_WATCHPOINTS,
100100
101      ID_DEVICE_OPTIONS   // always keep this at the end
101      ID_DEVICE_OPTIONS   // always keep this at the end
102102   };
103103
104104   bool is_main_console() const { return m_is_main_console; }
r244614r244615
115115   void draw_border(HDC dc, RECT &bounds);
116116   void draw_border(HDC dc, HWND child);
117117
118   auto_pointer<debugview_info>   m_views[MAX_VIEWS];
118   auto_pointer<debugview_info>    m_views[MAX_VIEWS];
119119
120120private:
121121   LRESULT window_proc(UINT message, WPARAM wparam, LPARAM lparam);
r244614r244615
126126
127127   static void register_window_class();
128128
129   bool const      m_is_main_console;
129   bool const      m_is_main_console;
130130
131   debugwin_info   *m_next;
132   HWND         m_wnd;
133   WNDPROC const   m_handler;
131   debugwin_info   *m_next;
132   HWND            m_wnd;
133   WNDPROC const   m_handler;
134134
135   UINT32         m_minwidth, m_maxwidth;
136   UINT32         m_minheight, m_maxheight;
135   UINT32          m_minwidth, m_maxwidth;
136   UINT32          m_minheight, m_maxheight;
137137
138   UINT16         m_ignore_char_lparam;
138   UINT16          m_ignore_char_lparam;
139139
140   static bool      s_window_class_registered;
140   static bool     s_window_class_registered;
141141};
142142
143143#endif
branches/kale/src/osd/modules/debugger/win/disasmbasewininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmbasewininfo.c - Win32 debug window handling
5//  disasmbasewininfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/disasmbasewininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmbasewininfo.h - Win32 debug window handling
5//  disasmbasewininfo.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/disasmviewinfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmviewinfo.c - Win32 debug window handling
5//  disasmviewinfo.c - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
4141void disasmview_info::set_right_column(disasm_right_column contents)
4242{
4343   view<debug_view_disasm>()->set_right_column(contents);
44}
No newline at end of file
44}
branches/kale/src/osd/modules/debugger/win/disasmviewinfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmviewinfo.h - Win32 debug window handling
5//  disasmviewinfo.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/disasmwininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmwininfo.c - Win32 debug window handling
5//  disasmwininfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/disasmwininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   disasmwininfo.h - Win32 debug window handling
5//  disasmwininfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
3030
3131   void update_caption();
3232
33   HWND   m_combownd;
33   HWND    m_combownd;
3434};
3535
3636#endif
branches/kale/src/osd/modules/debugger/win/editwininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   editwininfo.c - Win32 debug window handling
5//  editwininfo.c - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
1515
1616
1717// edit box styles
18#define   EDIT_BOX_STYLE      WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL
19#define   EDIT_BOX_STYLE_EX   0
18#define EDIT_BOX_STYLE      WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL
19#define EDIT_BOX_STYLE_EX   0
2020
2121
2222editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) :
branches/kale/src/osd/modules/debugger/win/editwininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   editwininfo.h - Win32 debug window handling
5//  editwininfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
2525   virtual bool set_default_focus();
2626
2727protected:
28   static DWORD const   COMBO_BOX_STYLE      = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
29   static DWORD const   COMBO_BOX_STYLE_EX   = 0;
28   static DWORD const  COMBO_BOX_STYLE     = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL;
29   static DWORD const  COMBO_BOX_STYLE_EX  = 0;
3030
3131   void set_editwnd_bounds(RECT const &bounds);
3232   void set_editwnd_text(char const *text);
r244614r244615
4242
4343   static LRESULT CALLBACK static_edit_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam);
4444
45   static int const   MAX_EDIT_STRING = 256;
46   static int const   HISTORY_LENGTH = 20;
45   static int const    MAX_EDIT_STRING = 256;
46   static int const    HISTORY_LENGTH = 20;
4747
48   HWND            m_editwnd;
49   astring            m_edit_defstr;
50   WNDPROC            m_original_editproc;
51   TCHAR            m_history[HISTORY_LENGTH][MAX_EDIT_STRING];
52   int               m_history_count;
53   int               m_last_history;
48   HWND                m_editwnd;
49   astring             m_edit_defstr;
50   WNDPROC             m_original_editproc;
51   TCHAR               m_history[HISTORY_LENGTH][MAX_EDIT_STRING];
52   int                 m_history_count;
53   int                 m_last_history;
5454};
5555
5656#endif
branches/kale/src/osd/modules/debugger/win/logwininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   logwininfo.c - Win32 debug window handling
5//  logwininfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/logwininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   logwininfo.h - Win32 debug window handling
5//  logwininfo.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/memoryviewinfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   memoryviewinfo.c - Win32 debug window handling
5//  memoryviewinfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/memoryviewinfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   memoryviewinfo.h - Win32 debug window handling
5//  memoryviewinfo.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/memorywininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   memorywininfo.c - Win32 debug window handling
5//  memorywininfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/memorywininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   memorywininfo.h - Win32 debug window handling
5//  memorywininfo.h - Win32 debug window handling
66//
77//============================================================
88
r244614r244615
3333
3434   void update_caption();
3535
36   HWND   m_combownd;
36   HWND    m_combownd;
3737};
3838
3939#endif
branches/kale/src/osd/modules/debugger/win/pointswininfo.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   pointswininfo.c - Win32 debug window handling
5//  pointswininfo.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/pointswininfo.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   pointswininfo.h - Win32 debug window handling
5//  pointswininfo.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/uimetrics.c
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   uimetrics.c - Win32 debug window handling
5//  uimetrics.c - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/debugger/win/uimetrics.h
r244614r244615
22// copyright-holders:Aaron Giles, Vas Crabb
33//============================================================
44//
5//   uimetrics.h - Win32 debug window handling
5//  uimetrics.h - Win32 debug window handling
66//
77//============================================================
88
branches/kale/src/osd/modules/netdev/pcap.c
r244614r244615
1515
1616#if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS)
1717
18#define LIB_NAME      L"wpcap.dll"
19#define LIB_ERROR_STR    "Unable to load winpcap: %lx\n"
18#define LIB_NAME        L"wpcap.dll"
19#define LIB_ERROR_STR   "Unable to load winpcap: %lx\n"
2020typedef DWORD except_type;
2121
2222#else
r244614r244615
2828#endif
2929
3030#ifdef SDLMAME_MACOSX
31#define LIB_NAME   "libpcap.dylib"
31#define LIB_NAME    "libpcap.dylib"
3232#else
33#define LIB_NAME   "libpcap.so"
33#define LIB_NAME    "libpcap.so"
3434#endif
35#define LIB_ERROR_STR    "Unable to load pcap: %s\n"
35#define LIB_ERROR_STR   "Unable to load pcap: %s\n"
3636
3737typedef void *HMODULE;
3838typedef const char *except_type;
r244614r244615
178178   sprintf(filter, "not ether src %.2X:%.2X:%.2X:%.2X:%.2X:%.2X and (ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast or ether dst 09:00:07:ff:ff:ff)", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5], (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]);
179179#else
180180   sprintf(filter, "ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]);
181#endif   
181#endif
182182   if(pcap_compile_dl(m_p, &fp, filter, 1, 0) == -1) {
183183      logerror("Error with pcap_compile\n");
184184   }
r244614r244615
300300
301301
302302MODULE_DEFINITION(NETDEV_PCAP, pcap_module)
303
branches/kale/src/osd/sdl/blit13.h
r244614r244615
3535
3636inline UINT32 pixel_ycc_to_rgb(const UINT16 *pixel)
3737{
38
3938   const UINT32 p = *(UINT32 *)((FPTR) pixel & ~3);
4039   return ycc_to_rgb((*pixel >> 8) & 0xff, (p) & 0xff, (p>>16) & 0xff);
4140}
r244614r244615
5352
5453#define FUNC_DEF(source) op(const source &src, const rgb_t *palbase) const
5554#define FUNCTOR(name, x...) \
56    template<typename _source, typename _dest> \
57    struct name { _dest FUNC_DEF(_source) { x } };
55   template<typename _source, typename _dest> \
56   struct name { _dest FUNC_DEF(_source) { x } };
5857
5958FUNCTOR(op_argb32_argb32, return src; )
6059FUNCTOR(op_rgb32_argb32,  return src | 0xff000000; )
6160FUNCTOR(op_pal16_argb32,  return 0xff000000 |palbase[src]; )
6261FUNCTOR(op_pal16_rgb32,   return palbase[src]; )
6362FUNCTOR(op_rgb32pal_argb32,
64    return palbase[0x200 + (((src) >> 16) & 0xff) ] |
65        palbase[0x100 + (((src) >> 8) & 0xff) ] |
66        palbase[((src) & 0xff) ] | 0xff000000; )
63   return palbase[0x200 + (((src) >> 16) & 0xff) ] |
64      palbase[0x100 + (((src) >> 8) & 0xff) ] |
65      palbase[((src) & 0xff) ] | 0xff000000; )
6766
6867FUNCTOR(op_pal16a_argb32, return palbase[src]; )
6968
r244614r244615
7473
7574FUNCTOR(op_rgb15pal_argb32,
7675      return 0xff000000 | palbase[0x40 + ((src >> 10) & 0x1f)] |
77        palbase[0x20 + ((src >> 5) & 0x1f)] | palbase[0x00 + ((src >> 0) & 0x1f)]; )
76      palbase[0x20 + ((src >> 5) & 0x1f)] | palbase[0x00 + ((src >> 0) & 0x1f)]; )
7877
7978FUNCTOR(op_argb32_rgb32, return premult32(src); )
8079FUNCTOR(op_pal16a_rgb32, return premult32(palbase[src]); )
8180FUNCTOR(op_pal16_argb1555,
8281      return (palbase[src]&0xf80000) >> 9 |
83            (palbase[src]&0x00f800) >> 6 |
84            (palbase[src]&0x0000f8) >> 3 | 0x8000; )
82         (palbase[src]&0x00f800) >> 6 |
83         (palbase[src]&0x0000f8) >> 3 | 0x8000; )
8584
8685FUNCTOR(op_rgb15_argb1555, return src | 0x8000; )
8786
8887FUNCTOR(op_rgb15pal_argb1555,
8988      return (palbase[src >> 10] & 0xf8) << 7 |
90            (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 |
91            (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; )
89         (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 |
90         (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; )
9291
9392FUNCTOR(op_yuv16_uyvy, return src; )
9493FUNCTOR(op_yuv16pal_uyvy, return (palbase[(src >> 8) & 0xff] << 8) | (src & 0x00ff); )
r244614r244615
106105
107106FUNCTOR(op_yuv16_argb32,
108107      return (UINT64) ycc_to_rgb((src >>  8) & 0xff, src & 0xff , (src>>16) & 0xff)
109    | ((UINT64)ycc_to_rgb((src >> 24) & 0xff, src & 0xff , (src>>16) & 0xff) << 32); )
108   | ((UINT64)ycc_to_rgb((src >> 24) & 0xff, src & 0xff , (src>>16) & 0xff) << 32); )
110109
111110FUNCTOR(op_yuv16pal_argb32,
112111      return (UINT64)ycc_to_rgb(palbase[(src >>  8) & 0xff], src & 0xff , (src>>16) & 0xff)
113    | ((UINT64)ycc_to_rgb(palbase[(src >> 24) & 0xff], src & 0xff , (src>>16) & 0xff) << 32);)
112   | ((UINT64)ycc_to_rgb(palbase[(src >> 24) & 0xff], src & 0xff , (src>>16) & 0xff) << 32);)
114113
115114FUNCTOR(op_yuv16_argb32rot, return pixel_ycc_to_rgb(&src) ; )
116115
r244614r244615
121120//============================================================
122121
123122struct blit_base {
124
125123   blit_base(int dest_bpp, bool is_rot, bool is_passthrough)
126124   : m_dest_bpp(dest_bpp), m_is_rot(is_rot), m_is_passthrough(is_passthrough)
127125   { }
r244614r244615
137135struct blit_texcopy : public blit_base
138136{
139137   blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { }
140    void texop(const texture_info *texture, const render_texinfo *texsource) const
141    {
142       ATTR_UNUSED const rgb_t *palbase = texsource->palette;
143       int x, y;
144       /* loop over Y */
145       for (y = 0; y < texsource->height; y++) {
146          _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div);
147          _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch);
148          x = texsource->width / (_len_div);
149          while (x > 0) {
150             *dst++ = m_op.op(*src, palbase);
151             src++;
152             x--;
153          }
154       }
155    }
138   void texop(const texture_info *texture, const render_texinfo *texsource) const
139   {
140      ATTR_UNUSED const rgb_t *palbase = texsource->palette;
141      int x, y;
142      /* loop over Y */
143      for (y = 0; y < texsource->height; y++) {
144         _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div);
145         _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch);
146         x = texsource->width / (_len_div);
147         while (x > 0) {
148            *dst++ = m_op.op(*src, palbase);
149            src++;
150            x--;
151         }
152      }
153   }
156154private:
157    _op m_op;
155   _op m_op;
158156};
159157
160158#define TEXCOPYA(a, b, c, d) \
r244614r244615
187185      }
188186   }
189187private:
190    _op m_op;
188   _op m_op;
191189};
192190
193191#define TEXROTA(a, b, c) \
branches/kale/src/osd/sdl/draw13.c
r244614r244615
4949
5050static inline bool is_opaque(const float &a)
5151{
52    return (a >= 1.0f);
52   return (a >= 1.0f);
5353}
5454
5555static inline bool is_transparent(const float &a)
5656{
57    return (a <  0.0001f);
57   return (a <  0.0001f);
5858}
5959
6060//============================================================
r244614r244615
6464
6565struct quad_setup_data
6666{
67    quad_setup_data()
68    : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0),
69      rotwidth(0), rotheight(0)
70    {}
71    void compute(const render_primitive &prim, const int prescale);
67   quad_setup_data()
68   : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0),
69      rotwidth(0), rotheight(0)
70   {}
71   void compute(const render_primitive &prim, const int prescale);
7272
7373   INT32           dudx, dvdx, dudy, dvdy;
7474   INT32           startu, startv;
r244614r244615
8585/* texture_info holds information about a texture */
8686class texture_info
8787{
88    friend class simple_list<texture_info>;
88   friend class simple_list<texture_info>;
8989public:
90    texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags);
91    ~texture_info();
90   texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags);
91   ~texture_info();
9292
93    void set_data(const render_texinfo &texsource, const UINT32 flags);
94    void render_quad(const render_primitive *prim, const int x, const int y);
95    bool matches(const render_primitive &prim, const quad_setup_data &setup);
93   void set_data(const render_texinfo &texsource, const UINT32 flags);
94   void render_quad(const render_primitive *prim, const int x, const int y);
95   bool matches(const render_primitive &prim, const quad_setup_data &setup);
9696
97    copy_info_t *compute_size_type();
97   copy_info_t *compute_size_type();
9898
9999   void                *m_pixels;            // pixels for the texture
100100   int                 m_pitch;
r244614r244615
105105   osd_ticks_t         m_last_access;
106106
107107   int raw_width() const { return m_texinfo.width; }
108    int raw_height() const { return m_texinfo.height; }
108   int raw_height() const { return m_texinfo.height; }
109109
110    texture_info *next() { return m_next; }
111    const render_texinfo &texinfo() const { return m_texinfo; }
112    render_texinfo &texinfo() { return m_texinfo; }
110   texture_info *next() { return m_next; }
111   const render_texinfo &texinfo() const { return m_texinfo; }
112   render_texinfo &texinfo() { return m_texinfo; }
113113
114    const HashT hash() const { return m_hash; }
115    const UINT32 flags() const { return m_flags; }
116    // FIXME:
117    const bool is_pixels_owned() const;
114   const HashT hash() const { return m_hash; }
115   const UINT32 flags() const { return m_flags; }
116   // FIXME:
117   const bool is_pixels_owned() const;
118118
119119private:
120    Uint32              m_sdl_access;
121    SDL_Renderer *      m_sdl_renderer;
122    render_texinfo      m_texinfo;            // copy of the texture info
123    HashT               m_hash;               // hash value for the texture (must be >= pointer size)
124    UINT32              m_flags;              // rendering flags
120   Uint32              m_sdl_access;
121   SDL_Renderer *      m_sdl_renderer;
122   render_texinfo      m_texinfo;            // copy of the texture info
123   HashT               m_hash;               // hash value for the texture (must be >= pointer size)
124   UINT32              m_flags;              // rendering flags
125125
126    SDL_Texture *       m_texture_id;
127    bool                m_is_rotated;
126   SDL_Texture *       m_texture_id;
127   bool                m_is_rotated;
128128
129    int                 m_format;             // texture format
130    SDL_BlendMode       m_sdl_blendmode;
129   int                 m_format;             // texture format
130   SDL_BlendMode       m_sdl_blendmode;
131131
132    texture_info *      m_next;               // next texture in the list
132   texture_info *      m_next;               // next texture in the list
133133};
134134
135135//============================================================
r244614r244615
142142class sdl_info13 : public osd_renderer
143143{
144144public:
145    sdl_info13(osd_window *w)
146    : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL),
147      m_last_hofs(0), m_last_vofs(0),
148      m_width(0), m_height(0),
149      m_blitwidth(0), m_blitheight(0),
150      m_last_blit_time(0), m_last_blit_pixels(0)
151    {}
145   sdl_info13(osd_window *w)
146   : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL),
147      m_last_hofs(0), m_last_vofs(0),
148      m_width(0), m_height(0),
149      m_blitwidth(0), m_blitheight(0),
150      m_last_blit_time(0), m_last_blit_pixels(0)
151   {}
152152
153153   /* virtual */ int create();
154154   /* virtual */ int draw(const int update);
r244614r244615
168168   }
169169
170170private:
171    void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
171   void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
172172
173    texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
174    texture_info *texture_update(const render_primitive &prim);
173   texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
174   texture_info *texture_update(const render_primitive &prim);
175175
176    void destroy_all_textures();
176   void destroy_all_textures();
177177
178178   INT32           m_blittimer;
179179
r244614r244615
190190   float           m_last_hofs;
191191   float           m_last_vofs;
192192
193   int            m_width;
194   int            m_height;
193   int             m_width;
194   int             m_height;
195195
196   int            m_blitwidth;
197   int            m_blitheight;
196   int             m_blitwidth;
197   int             m_blitheight;
198198
199199   // Stats
200200   INT64           m_last_blit_time;
r244614r244615
204204struct copy_info_t {
205205   int                 src_fmt;
206206   Uint32              dst_fmt;
207   const blit_base       *blitter;
207   const blit_base     *blitter;
208208   Uint32              bm_mask;
209209   const char          *srcname;
210210   const char          *dstname;
r244614r244615
241241static copy_info_t blit_info_default[] =
242242{
243243   /* no rotation */
244   ENTRY(ARGB32,            ARGB8888,   argb32_argb32),
244   ENTRY(ARGB32,           ARGB8888,   argb32_argb32),
245245   ENTRY_LR(ARGB32,        RGB888,     argb32_rgb32),
246246   /* Entry primarily for directfb */
247247   ENTRY_BM(ARGB32,        RGB888,     argb32_rgb32, SDL_BLENDMODE_ADD),
r244614r244615
249249   ENTRY_BM(ARGB32,        RGB888,     argb32_rgb32, SDL_BLENDMODE_NONE),
250250
251251   ENTRY(RGB32,            ARGB8888,   rgb32_argb32),
252   ENTRY(RGB32,             RGB888,     rgb32_rgb32),
252   ENTRY(RGB32,            RGB888,     rgb32_rgb32),
253253
254254   ENTRY(RGB32_PALETTED,   ARGB8888,   rgb32pal_argb32),
255255   ENTRY(RGB32_PALETTED,   RGB888,     rgb32pal_argb32),
256256
257   ENTRY(YUY16,             UYVY,       yuv16_uyvy),
257   ENTRY(YUY16,            UYVY,       yuv16_uyvy),
258258   ENTRY(YUY16,            YUY2,       yuv16_yuy2),
259259   ENTRY(YUY16,            YVYU,       yuv16_yvyu),
260260   ENTRY(YUY16,            ARGB8888,   yuv16_argb32),
r244614r244615
269269   ENTRY(PALETTE16,        ARGB8888,   pal16_argb32),
270270   ENTRY(PALETTE16,        RGB888,     pal16_argb32),
271271
272   ENTRY(RGB15,             RGB555,     rgb15_rgb555),
272   ENTRY(RGB15,            RGB555,     rgb15_rgb555),
273273   ENTRY(RGB15,            ARGB1555,   rgb15_argb1555),
274274   ENTRY(RGB15,            ARGB8888,   rgb15_argb32),
275275   ENTRY(RGB15,            RGB888,     rgb15_argb32),
r244614r244615
647647
648648int sdl_info13::xy_to_render_target(int x, int y, int *xt, int *yt)
649649{
650
651650   *xt = x - m_last_hofs;
652651   *yt = y - m_last_vofs;
653652   if (*xt<0 || *xt >= m_blitwidth)
r244614r244615
830829// FIXME:
831830const bool texture_info::is_pixels_owned() const
832831{ // do we own / allocated it ?
833    return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC)
834            && (m_copyinfo->blitter->m_is_passthrough));
832   return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC)
833         && (m_copyinfo->blitter->m_is_passthrough));
835834}
836835
837836//============================================================
r244614r244615
10981097   }
10991098   return texture;
11001099}
1101
branches/kale/src/osd/sdl/drawbgfx.c
r244614r244615
3333#include "osdsdl.h"
3434#include "window.h"
3535
36#include <bgfxplatform.h>
36#include <bgfxplatform.h>
3737#include <bgfx.h>
3838
3939//============================================================
r244614r244615
7373class sdl_info_bgfx : public osd_renderer
7474{
7575public:
76    sdl_info_bgfx(osd_window *w)
77    : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL),
78      m_blitwidth(0), m_blitheight(0),
79      m_last_hofs(0), m_last_vofs(0),
80      m_last_blit_time(0), m_last_blit_pixels(0)
81    {}
76   sdl_info_bgfx(osd_window *w)
77   : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL),
78      m_blitwidth(0), m_blitheight(0),
79      m_last_hofs(0), m_last_vofs(0),
80      m_last_blit_time(0), m_last_blit_pixels(0)
81   {}
8282
8383   /* virtual */ int create();
8484   /* virtual */ int draw(const int update);
r244614r244615
9797      return &window().target()->get_primitives();
9898   }
9999
100   // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
100   // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
101101
102    //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
103    //texture_info *texture_update(const render_primitive &prim);
102   //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
103   //texture_info *texture_update(const render_primitive &prim);
104104
105105   INT32           m_blittimer;
106106
107107   SDL_Renderer *  m_renderer;
108108   //simple_list<texture_info>  m_texlist;                // list of active textures
109109
110   int            m_blitwidth;
111   int            m_blitheight;
110   int             m_blitwidth;
111   int             m_blitheight;
112112   float           m_last_hofs;
113113   float           m_last_vofs;
114114
r244614r244615
139139   // fill in the callbacks
140140   callbacks->exit = drawbgfx_exit;
141141   callbacks->create = drawbgfx_create;
142     
142
143143   return 0;
144144}
145145
r244614r244615
159159   bgfx::sdlSetWindow(window().sdl_window());
160160   bgfx::init();
161161   bgfx::reset(width, height, BGFX_RESET_VSYNC);
162   
162
163163   // Enable debug text.
164164   bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT);
165165   osd_printf_verbose("Leave drawsdl2_window_create\n");
r244614r244615
187187
188188int sdl_info_bgfx::draw(int update)
189189{
190
191190   //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height))
192191      // do something
193192   //clear_flags(FI_CHANGED);
r244614r244615
207206
208207   window().m_primlist->acquire_lock();
209208   window().m_primlist->release_lock();
210   // Advance to next frame. Rendering thread will be kicked to
209   // Advance to next frame. Rendering thread will be kicked to
211210   // process submitted rendering primitives.
212211   bgfx::frame();
213   
212
214213   return 0;
215214}
216215
branches/kale/src/osd/sdl/drawogl.c
r244614r244615
202202{
203203public:
204204   texture_info()
205   :    hash(0), flags(0), rawwidth(0), rawheight(0),
205   :   hash(0), flags(0), rawwidth(0), rawheight(0),
206206      rawwidth_create(0), rawheight_create(0),
207207      type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0),
208208      texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL),
r244614r244615
337337   void texture_all_disable();
338338
339339   INT32           m_blittimer;
340   int            m_width;
341   int            m_height;
342   int            m_blitwidth;
343   int            m_blitheight;
340   int             m_width;
341   int             m_height;
342   int             m_blitwidth;
343   int             m_blitheight;
344344
345345#if (SDLMAME_SDL2)
346346   SDL_GLContext   m_gl_context_id;
347347#ifdef OSD_WINDOWS
348   HDC            m_hdc;
348   HDC             m_hdc;
349349#endif
350350#else
351351#endif
r244614r244615
792792void
793793setupPixelFormat(HDC hDC)
794794{
795    PIXELFORMATDESCRIPTOR pfd = {
796        sizeof(PIXELFORMATDESCRIPTOR),  /* size */
797        1,                              /* version */
798        PFD_SUPPORT_OPENGL |
799        PFD_DRAW_TO_WINDOW |
800        PFD_DOUBLEBUFFER,               /* support double-buffering */
801        PFD_TYPE_RGBA,                  /* color type */
802        32,                             /* prefered color depth */
803        0, 0, 0, 0, 0, 0,               /* color bits (ignored) */
804        0,                              /* no alpha buffer */
805        0,                              /* alpha bits (ignored) */
806        0,                              /* no accumulation buffer */
807        0, 0, 0, 0,                     /* accum bits (ignored) */
808        16,                             /* depth buffer */
809        0,                              /* no stencil buffer */
810        0,                              /* no auxiliary buffers */
811        PFD_MAIN_PLANE,                 /* main layer */
812        0,                              /* reserved */
813        0, 0, 0,                        /* no layer, visible, damage masks */
814    };
815    int pixelFormat;
795   PIXELFORMATDESCRIPTOR pfd = {
796      sizeof(PIXELFORMATDESCRIPTOR),  /* size */
797      1,                              /* version */
798      PFD_SUPPORT_OPENGL |
799      PFD_DRAW_TO_WINDOW |
800      PFD_DOUBLEBUFFER,               /* support double-buffering */
801      PFD_TYPE_RGBA,                  /* color type */
802      32,                             /* prefered color depth */
803      0, 0, 0, 0, 0, 0,               /* color bits (ignored) */
804      0,                              /* no alpha buffer */
805      0,                              /* alpha bits (ignored) */
806      0,                              /* no accumulation buffer */
807      0, 0, 0, 0,                     /* accum bits (ignored) */
808      16,                             /* depth buffer */
809      0,                              /* no stencil buffer */
810      0,                              /* no auxiliary buffers */
811      PFD_MAIN_PLANE,                 /* main layer */
812      0,                              /* reserved */
813      0, 0, 0,                        /* no layer, visible, damage masks */
814   };
815   int pixelFormat;
816816
817    pixelFormat = ChoosePixelFormat(hDC, &pfd);
818    if (pixelFormat == 0) {
819        osd_printf_error("ChoosePixelFormat failed.\n");
820        exit(1);
821    }
817   pixelFormat = ChoosePixelFormat(hDC, &pfd);
818   if (pixelFormat == 0) {
819      osd_printf_error("ChoosePixelFormat failed.\n");
820      exit(1);
821   }
822822
823    if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) {
824        osd_printf_error("SetPixelFormat failed.\n");
825        exit(1);
826    }
823   if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) {
824      osd_printf_error("SetPixelFormat failed.\n");
825      exit(1);
826   }
827827}
828828#endif
829829int sdl_info_ogl::create()
830830{
831
832831#if (SDLMAME_SDL2)
833832   // create renderer
834833#ifdef OSD_WINDOWS
r244614r244615
889888
890889void sdl_info_ogl::destroy()
891890{
892
893891   // free the memory in the window
894892
895893   destroy_all_textures();
r244614r244615
912910
913911int sdl_info_ogl::xy_to_render_target(int x, int y, int *xt, int *yt)
914912{
915
916913   *xt = x - m_last_hofs;
917914   *yt = y - m_last_vofs;
918915   if (*xt<0 || *xt >= m_blitwidth)
r244614r244615
31363133      pfn_glBindBuffer( GL_PIXEL_UNPACK_BUFFER_ARB, 0);
31373134   }
31383135}
3139
3140
3141
branches/kale/src/osd/sdl/drawsdl.c
r244614r244615
434434
435435int sdl_info::create()
436436{
437
438437#if (SDLMAME_SDL2)
439438   const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode];
440439
441   // create renderer
440   // create renderer
442441
443442   /* set hints ... */
444443   SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode);
r244614r244615
500499
501500void sdl_info::destroy()
502501{
503
504502   // free the memory in the window
505503
506504   destroy_all_textures();
r244614r244615
726724   float fh = (float) mameheight / (float) blitheight;
727725
728726   // FIXME: this could be a lot easier if we get the primlist here!
729   //         Bounds would be set fit for purpose and done!
727   //          Bounds would be set fit for purpose and done!
730728
731729   for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next())
732730   {
branches/kale/src/osd/sdl/sdl.mak
r244614r244615
365365INCPATH += -I$(3RDPARTY)/winpcap/Include
366366
367367# enable UNICODE
368DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE
369LDFLAGS += -municode
368DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE
369LDFLAGS += -municode
370370
371371# Qt
372372ifndef NO_USE_QTDEBUG
r244614r244615
734734LIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static
735735BASELIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static
736736else
737LIBS += -lSDL -lws2_32 -static
737LIBS += -lSDL -lws2_32 -static
738738BASELIBS += -lSDL -lws2_32 -static
739739endif
740740LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
r244614r244615
809809
810810ifdef USE_BGFX
811811DEFS += -DUSE_BGFX
812OSDOBJS += $(SDLOBJ)/drawbgfx.o
812OSDOBJS += $(SDLOBJ)/drawbgfx.o
813813INCPATH += -I$(3RDPARTY)/bgfx/include -I$(3RDPARTY)/bx/include
814814USE_DISPATCH_GL = 0
815815BGFX_LIB = $(OBJ)/libbgfx.a
branches/kale/src/osd/sdl/video.h
r244614r244615
6666
6767   sdl_monitor_info()
6868   : m_next(NULL), m_handle(0), m_aspect(0.0f)
69     {}
69      {}
7070   sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect)
7171   : m_next(NULL), m_handle(handle), m_aspect(aspect)
7272   {
r244614r244615
8484   void set_aspect(const float aspect) { m_aspect = aspect; }
8585
8686   // STATIC
87   static void   init();
87   static void init();
8888   static void exit();
8989   static sdl_monitor_info *pick_monitor(sdl_options &options, int index);
9090#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
9191   static void add_primary_monitor(void *data);
9292#endif
9393
94   sdl_monitor_info     * next() { return m_next; }   // pointer to next monitor in list
94   sdl_monitor_info    * next() { return m_next; }   // pointer to next monitor in list
9595
9696   // STATIC
9797   static sdl_monitor_info *primary_monitor;
9898   static sdl_monitor_info *list;
9999
100   sdl_monitor_info     * m_next;                   // pointer to next monitor in list
100   sdl_monitor_info    * m_next;                   // pointer to next monitor in list
101101private:
102102   void refresh();
103103
104104   UINT64              m_handle;                 // handle to the monitor
105   SDL_Rect         m_dimensions;
105   SDL_Rect            m_dimensions;
106106   char                m_name[64];
107107   float               m_aspect;                 // computed/configured aspect ratio of the physical device
108108};
branches/kale/src/osd/sdl/window.c
r244614r244615
10131013   // if we're visible and running and not in the middle of a resize, draw
10141014   if (m_target != NULL)
10151015   {
1016
1017
1018
10191016      int tempwidth, tempheight;
10201017
10211018      // see if the games video mode has changed
r244614r244615
10441041
10451042      if (osd_event_wait(m_rendered_event, event_wait_ticks))
10461043      {
1047
10481044         // ensure the target bounds are up-to-date, and then get the primitives
10491045
10501046         render_primitive_list &primlist = *m_renderer->get_primitives();
r244614r244615
11501146      SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
11511147
11521148      /* FIXME: A reminder that gamma is wrong throughout MAME. Currently, SDL2.0 doesn't seem to
1153         * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension.
1154         *
1155         * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 );
1156         *
1157         */
1149          * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension.
1150          *
1151          * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 );
1152          *
1153          */
11581154      window->m_extra_flags = SDL_WINDOW_OPENGL;
11591155   }
11601156   else
r244614r244615
11731169         window->monitor()->position_size().x, window->monitor()->position_size().y,
11741170         tempwidth, tempheight, window->m_extra_flags);
11751171   //window().sdl_window() = SDL_CreateWindow(window().m_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
1176   //      width, height, m_extra_flags);
1172   //      width, height, m_extra_flags);
11771173
11781174   if  ( window->m_sdl_window == NULL )
11791175   {
r244614r244615
12351231      #if (SDL_VERSION_ATLEAST(1,2,10)) && (!defined(SDLMAME_EMSCRIPTEN))
12361232      SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, video_config.waitvsync ? 1 : 0);
12371233      #endif
1238      //   load_gl_lib(window->machine());
1234      //  load_gl_lib(window->machine());
12391235   }
12401236
12411237   // create the SDL surface (which creates the window in windowed mode)
branches/kale/src/osd/sdl/window.h
r244614r244615
5353#endif
5454      m_prescale(1),
5555      m_primlist(NULL)
56       {}
56      {}
5757   virtual ~osd_window() { }
5858
5959   virtual render_target *target() = 0;
r244614r244615
8181   virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0;
8282
8383   // window handle and info
84   HWND               m_hwnd;
85   HDC                  m_dc;      // only used by GDI renderer!
84   HWND                    m_hwnd;
85   HDC                     m_dc;       // only used by GDI renderer!
8686   // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window.
8787   // During modularization, this should be passed in differently
88   HWND                   m_focus_hwnd;
88   HWND                    m_focus_hwnd;
8989
90   int                    m_resize_state;
90   int                     m_resize_state;
9191#endif
9292
93   osd_window_config      m_win_config;
94   int                  m_prescale;
95   render_primitive_list    *m_primlist;
93   osd_window_config       m_win_config;
94   int                     m_prescale;
95   render_primitive_list   *m_primlist;
9696};
9797
9898class osd_renderer
r244614r244615
100100public:
101101
102102   /* Generic flags */
103   static const int FLAG_NONE                = 0x0000;
104   static const int FLAG_NEEDS_OPENGL          = 0x0001;
105   static const int FLAG_HAS_VECTOR_SCREEN      = 0x0002;
103   static const int FLAG_NONE                  = 0x0000;
104   static const int FLAG_NEEDS_OPENGL          = 0x0001;
105   static const int FLAG_HAS_VECTOR_SCREEN     = 0x0002;
106106
107107   /* SDL 1.2 flags */
108   static const int FLAG_NEEDS_DOUBLEBUF       = 0x0100;
109   static const int FLAG_NEEDS_ASYNCBLIT       = 0x0200;
108   static const int FLAG_NEEDS_DOUBLEBUF       = 0x0100;
109   static const int FLAG_NEEDS_ASYNCBLIT       = 0x0200;
110110
111111   osd_renderer(osd_window *window, const int flags)
112112   : m_window(window), m_flags(flags) { }
r244614r244615
139139
140140protected:
141141   /* Internal flags */
142   static const int FI_CHANGED                = 0x010000;
142   static const int FI_CHANGED                 = 0x010000;
143143
144144private:
145145
146   osd_window      *m_window;
146   osd_window      *m_window;
147147   int m_flags;
148148};
149149
r244614r244615
161161      m_resize_height(0),
162162      m_last_resize(0),
163163#endif
164      m_minwidth(0), m_minheight(0),
164         m_minwidth(0), m_minheight(0),
165165      m_rendered_event(0), m_target(0),
166166#if (SDLMAME_SDL2)
167167      m_sdl_window(NULL),
r244614r244615
256256   SDL_Surface         *m_sdlsurf;
257257#endif
258258
259   int             m_extra_flags;
259   int                 m_extra_flags;
260260
261261   void set_renderer(osd_renderer *renderer)
262262   {
r244614r244615
281281   sdl_monitor_info *  m_monitor;
282282   int                 m_fullscreen;
283283   int                 m_index;
284   osd_renderer *      m_renderer;
284   osd_renderer *      m_renderer;
285285
286286   // static callbacks ...
287287
branches/kale/src/osd/windows/d3dhlsl.h
r244614r244615
335335
336336   base *                  d3dintf;                    // D3D interface
337337
338   running_machine *       machine;
339   d3d::renderer *         d3d;                  // D3D renderer
338   running_machine *       machine;
339   d3d::renderer *         d3d;                        // D3D renderer
340340
341341   bool                    master_enable;              // overall enable flag
342342   bool                    vector_enable;              // vector post-processing enable flag
branches/kale/src/osd/windows/drawbgfx.c
r244614r244615
1919// MAMEOS headers
2020#include "window.h"
2121
22#include <bgfxplatform.h>
22#include <bgfxplatform.h>
2323#include <bgfx.h>
2424
2525class renderer_bgfx : public osd_renderer
r244614r244615
9595   bgfx::winSetHwnd(window().m_hwnd);
9696   bgfx::init();
9797   bgfx::reset(rect_width(&client), rect_height(&client), BGFX_RESET_VSYNC);
98   
98
9999   // Enable debug text.
100100   bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT);
101101
r244614r244615
165165          */
166166         case render_primitive::LINE:
167167            // check if it's really a point
168/*           
169            if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0))
170            {
171               curPrimitive=GL_POINTS;
172            } else {
173               curPrimitive=GL_LINES;
174            }
168/*
169                if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0))
170                {
171                    curPrimitive=GL_POINTS;
172                } else {
173                    curPrimitive=GL_LINES;
174                }
175175
176            if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive)
177            {
178               glEnd();
179               pendingPrimitive=GL_NO_PRIMITIVE;
180            }
176                if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive)
177                {
178                    glEnd();
179                    pendingPrimitive=GL_NO_PRIMITIVE;
180                }
181181
182            if ( pendingPrimitive==GL_NO_PRIMITIVE )
183            {
184                     set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
185            }
182                if ( pendingPrimitive==GL_NO_PRIMITIVE )
183                {
184                            set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
185                }
186186
187            glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
187                glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
188188
189            if(pendingPrimitive!=curPrimitive)
190            {
191               glBegin(curPrimitive);
192               pendingPrimitive=curPrimitive;
193            }
189                if(pendingPrimitive!=curPrimitive)
190                {
191                    glBegin(curPrimitive);
192                    pendingPrimitive=curPrimitive;
193                }
194194
195            // check if it's really a point
196            if (curPrimitive==GL_POINTS)
197            {
198               glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
199            }
200            else
201            {
202               glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
203               glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs);
204            }*/
195                // check if it's really a point
196                if (curPrimitive==GL_POINTS)
197                {
198                    glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
199                }
200                else
201                {
202                    glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs);
203                    glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs);
204                }*/
205205            break;
206206
207207         case render_primitive::QUAD:
208208/*
209            if(pendingPrimitive!=GL_NO_PRIMITIVE)
210            {
211               glEnd();
212               pendingPrimitive=GL_NO_PRIMITIVE;
213            }
209                if(pendingPrimitive!=GL_NO_PRIMITIVE)
210                {
211                    glEnd();
212                    pendingPrimitive=GL_NO_PRIMITIVE;
213                }
214214
215            glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
215                glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a);
216216
217            set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
217                set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags));
218218
219            texture = texture_update(window, prim, 0);
219                texture = texture_update(window, prim, 0);
220220
221           
222            sdl->texVerticex[0]=prim->bounds.x0 + hofs;
223            sdl->texVerticex[1]=prim->bounds.y0 + vofs;
224            sdl->texVerticex[2]=prim->bounds.x1 + hofs;
225            sdl->texVerticex[3]=prim->bounds.y0 + vofs;
226            sdl->texVerticex[4]=prim->bounds.x1 + hofs;
227            sdl->texVerticex[5]=prim->bounds.y1 + vofs;
228            sdl->texVerticex[6]=prim->bounds.x0 + hofs;
229            sdl->texVerticex[7]=prim->bounds.y1 + vofs;
230221
231            glDrawArrays(GL_QUADS, 0, 4);
222                sdl->texVerticex[0]=prim->bounds.x0 + hofs;
223                sdl->texVerticex[1]=prim->bounds.y0 + vofs;
224                sdl->texVerticex[2]=prim->bounds.x1 + hofs;
225                sdl->texVerticex[3]=prim->bounds.y0 + vofs;
226                sdl->texVerticex[4]=prim->bounds.x1 + hofs;
227                sdl->texVerticex[5]=prim->bounds.y1 + vofs;
228                sdl->texVerticex[6]=prim->bounds.x0 + hofs;
229                sdl->texVerticex[7]=prim->bounds.y1 + vofs;
230
231                glDrawArrays(GL_QUADS, 0, 4);
232232*/
233233            break;
234234
r244614r244615
238238   }
239239
240240   window().m_primlist->release_lock();
241   // Advance to next frame. Rendering thread will be kicked to
241   // Advance to next frame. Rendering thread will be kicked to
242242   // process submitted rendering primitives.
243243   bgfx::frame();
244244
branches/kale/src/osd/windows/drawdd.c
r244614r244615
140140/* mode_enum_info holds information during a display mode enumeration */
141141struct mode_enum_info
142142{
143   renderer_dd *         renderer;
144   osd_window  *         window;
143   renderer_dd *           renderer;
144   osd_window  *           window;
145145   INT32                   minimum_width, minimum_height;
146146   INT32                   target_width, target_height;
147147   double                  target_refresh;
branches/kale/src/osd/windows/drawgdi.c
r244614r244615
9494
9595int renderer_gdi::create()
9696{
97
9897   // fill in the bitmap info header
9998   bminfo.bmiHeader.biSize            = sizeof(bminfo.bmiHeader);
10099   bminfo.bmiHeader.biPlanes          = 1;
r244614r244615
117116
118117void renderer_gdi::destroy()
119118{
120
121119   // free the bitmap memory
122120   if (bmdata != NULL)
123121      global_free_array(bmdata);
branches/kale/src/osd/windows/video.h
r244614r244615
6464   MONITORINFOEX       m_info;                   // most recently retrieved info
6565
6666   float               m_aspect;               // computed/configured aspect ratio of the physical device
67   char *             m_name;
67   char *              m_name;
6868};
6969
7070
branches/kale/src/osd/windows/window.h
r244614r244615
5353#endif
5454      m_prescale(1),
5555      m_primlist(NULL)
56       {}
56      {}
5757   virtual ~osd_window() { }
5858
5959   virtual render_target *target() = 0;
r244614r244615
8181   virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0;
8282
8383   // window handle and info
84   HWND               m_hwnd;
85   HDC                  m_dc;      // only used by GDI renderer!
84   HWND                    m_hwnd;
85   HDC                     m_dc;       // only used by GDI renderer!
8686   // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window.
8787   // During modularization, this should be passed in differently
88   HWND                   m_focus_hwnd;
88   HWND                    m_focus_hwnd;
8989
90   int                    m_resize_state;
90   int                     m_resize_state;
9191#endif
9292
93   osd_window_config      m_win_config;
94   int                  m_prescale;
95   render_primitive_list *   m_primlist;
93   osd_window_config       m_win_config;
94   int                     m_prescale;
95   render_primitive_list * m_primlist;
9696};
9797
9898class osd_renderer
r244614r244615
100100public:
101101
102102   /* Generic flags */
103   static const int FLAG_NONE                = 0x0000;
104   static const int FLAG_NEEDS_OPENGL          = 0x0001;
105   static const int FLAG_HAS_VECTOR_SCREEN      = 0x0002;
103   static const int FLAG_NONE                  = 0x0000;
104   static const int FLAG_NEEDS_OPENGL          = 0x0001;
105   static const int FLAG_HAS_VECTOR_SCREEN     = 0x0002;
106106
107107   /* SDL 1.2 flags */
108   static const int FLAG_NEEDS_DOUBLEBUF       = 0x0100;
109   static const int FLAG_NEEDS_ASYNCBLIT       = 0x0200;
108   static const int FLAG_NEEDS_DOUBLEBUF       = 0x0100;
109   static const int FLAG_NEEDS_ASYNCBLIT       = 0x0200;
110110
111111   osd_renderer(osd_window *window, const int flags)
112112   : m_window(window), m_flags(flags) { }
r244614r244615
139139
140140protected:
141141   /* Internal flags */
142   static const int FI_CHANGED                = 0x010000;
142   static const int FI_CHANGED                 = 0x010000;
143143
144144private:
145145
146   osd_window      *m_window;
146   osd_window      *m_window;
147147   int m_flags;
148148};
149149
branches/kale/src/osd/windows/windows.mak
r244614r244615
399399   $(OSDOBJ)/modules/netdev/none.o \
400400
401401ifdef USE_OPENGL
402OSDOBJS +=    $(WINOBJ)/../sdl/drawogl.o $(WINOBJ)/../sdl/gl_shader_tool.o $(WINOBJ)/../sdl/gl_shader_mgr.o
402OSDOBJS += $(WINOBJ)/../sdl/drawogl.o $(WINOBJ)/../sdl/gl_shader_tool.o $(WINOBJ)/../sdl/gl_shader_mgr.o
403403OBJDIRS += $(WINOBJ)/../sdl
404404
405405DEFS += -DUSE_OPENGL=1
r244614r244615
414414endif
415415
416416ifndef DONT_USE_NETWORK
417DEFS +=   -DSDLMAME_NET_PCAP
417DEFS += -DSDLMAME_NET_PCAP
418418endif
419419
420420CCOMFLAGS += -DDIRECT3D_VERSION=0x0900
branches/kale/src/version.c
r244614r244615
88
99***************************************************************************/
1010
11#define BARE_BUILD_VERSION "0.158"
11#define BARE_BUILD_VERSION "0.159"
1212
1313extern const char bare_build_version[];
1414extern const char build_version[];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team