Previous 15994 Revisions Next

r1972 Wednesday 12th March, 2008 at 20:25:05 UTC by Wilbert Pol
Removed some deprecat.h dependencies and some Machine -> machine updates.
[src/mess/audio]mea8000.c wswan.c
[src/mess/drivers]a310.c amstrad.c atarist.c ex800.c gmaster.c pcw.c ql.c saturn.c sord.c super80.c tutor.c x68k.c
[src/mess/machine]99_dsk.c apple2.c atom.c bebox.c cgenie.c dai.c dgn_beta.c europc.c lviv.c mz700.c pmd85.c tandy1t.c trs80.c
[src/mess/video]smsvdp.c

src/mess/audio/wswan.c
r1971r1972
104104      snd.sweep_step = (INT8)data;
105105      break;
106106   case 0x8D:            /* Sweep time */
107      snd.sweep_time = Machine->sample_rate / ( 3072000 / ( 8192 * (data + 1) ) );
107      snd.sweep_time = machine->sample_rate / ( 3072000 / ( 8192 * (data + 1) ) );
108108      break;
109109   case 0x8E:            /* Noise control */
110110      snd.noise_type = data & 0x07;
src/mess/audio/mea8000.c
r1971r1972
3737#include "driver.h"
3838#include "mea8000.h"
3939#include "sound/dac.h"
40#include "deprecat.h"
4140
4241
4342#define VERBOSE 0
r1971r1972
233232
234233
235234/* precompute tables */
236static void mea8000_init_tables( void )
235static void mea8000_init_tables( running_machine *machine )
237236{
238237   int i;
239238   for (i=0; i<TABLE_LEN; i++)
r1971r1972
244243      exp2_table[i] = exp(-2*M_PI*f) * QUANT;
245244   }
246245   for (i=0; i<NOISE_LEN; i++)
247      noise_table[i] = (mame_rand(Machine) % (2*QUANT)) - QUANT;
246      noise_table[i] = (mame_rand(machine) % (2*QUANT)) - QUANT;
248247}
249248
250249
r1971r1972
655654void mea8000_config ( running_machine *machine, int channel, write8_machine_func req_out_func )
656655{
657656   int i;
658   mea8000_init_tables();
657   mea8000_init_tables(machine);
659658   mea8000.channel = channel;
660659   mea8000.req_out_func = req_out_func;
661660   mea8000.timer = timer_alloc( mea8000_timer_expire , NULL);
src/mess/video/smsvdp.c
r1971r1972
186186      In theory the driver could have a REGION_GFX1 and/or REGION_GFX2 memory region
187187      of it's own. So this code could potentially cause a clash.
188188   */
189   smsvdp.VRAM = new_memory_region( Machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED );
190   smsvdp.CRAM = new_memory_region( Machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED );
189   smsvdp.VRAM = new_memory_region( machine, REGION_GFX1, VRAM_SIZE, ROM_REQUIRED );
190   smsvdp.CRAM = new_memory_region( machine, REGION_GFX2, MAX_CRAM_SIZE, ROM_REQUIRED );
191191   smsvdp.line_buffer = auto_malloc( 256 * 5 * sizeof(int) );
192192   memset( smsvdp.line_buffer, 0, 256 * 5 * sizeof(int) );
193193
r1971r1972
203203   smsvdp.collision_buffer = auto_malloc(SMS_X_PIXELS);
204204
205205   /* Make temp bitmap for rendering */
206   tmpbitmap = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED32);
206   tmpbitmap = auto_bitmap_alloc(Machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED32);
207207
208   smsvdp.prev_bitmap = auto_bitmap_alloc(Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED32);
208   smsvdp.prev_bitmap = auto_bitmap_alloc(Machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED32);
209209
210210   set_display_settings( machine );
211211
src/mess/machine/dgn_beta.c
r1971r1972
686686         HALT_DMA=CLEAR_LINE;
687687
688688      LOG_HALT(("DMA_CPU HALT=%d\n",HALT_DMA));
689      cpunum_set_input_line(Machine, 1, INPUT_LINE_HALT, HALT_DMA);
689      cpunum_set_input_line(machine, 1, INPUT_LINE_HALT, HALT_DMA);
690690
691691      /* CPU un-halted let it run ! */
692692      if (HALT_DMA==CLEAR_LINE)
r1971r1972
729729      else
730730         HALT_CPU=ASSERT_LINE;
731731      LOG_HALT(("MAIN_CPU HALT=%d\n",HALT_CPU));
732      cpunum_set_input_line(Machine, 0, INPUT_LINE_HALT, HALT_CPU);
732      cpunum_set_input_line(machine, 0, INPUT_LINE_HALT, HALT_CPU);
733733
734734      d_pia1_pb_last=data & 0x02;
735735
r1971r1972
780780      LOG_INTS(("cpu1 NMI : %d\n",NMI));
781781      if(!NMI)
782782      {
783         cpunum_set_input_line(Machine, 1,INPUT_LINE_NMI,ASSERT_LINE);
783         cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,ASSERT_LINE);
784784         logerror("cpu_yield()\n");
785785         cpu_yield();   /* Let DMA CPU run */
786786      }
787787      else
788788      {
789         cpunum_set_input_line(Machine, 1,INPUT_LINE_NMI,CLEAR_LINE);
789         cpunum_set_input_line(machine, 1,INPUT_LINE_NMI,CLEAR_LINE);
790790      }
791791
792792      DMA_NMI_LAST=NMI;   /* Save it for next time */
src/mess/machine/dai.c
r1971r1972
173173   case 0x00:
174174      data = readinputport(8);
175175      data |= 0x08;         // serial ready
176      if (mame_rand(Machine)&0x01)
176      if (mame_rand(machine)&0x01)
177177         data |= 0x40;      // random number generator
178178      if (cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0)) > 0.01)
179179         data |= 0x80;      // tape input
src/mess/machine/99_dsk.c
r1971r1972
388388      break;
389389   }
390390
391   fdc_handle_hold(Machine);
391   fdc_handle_hold(machine);
392392}
393393
394394/*
src/mess/machine/mz700.c
r1971r1972
239239   case 8:
240240      data = ne556_out[1] ? 0x01 : 0x00;
241241      data |= readinputport(12);   /* get joystick ports */
242      if (video_screen_get_hpos(0) >= Machine->screen[0].visarea.max_x - 32)
242      if (video_screen_get_hpos(0) >= machine->screen[0].visarea.max_x - 32)
243243         data |= 0x80;
244244      LOG(1,"mz700_e008_r",("%02X\n", data));
245245        break;
src/mess/machine/cgenie.c
r1971r1972
799799            b = 15;
800800         }
801801      }
802      palette_set_color_rgb(Machine, 0, r, g, b);
802      palette_set_color_rgb(machine, 0, r, g, b);
803803   }
804804
805805   /* character mode changed ? */
r1971r1972
11121112   cgenie_fontram[offset] = data;
11131113
11141114   /* convert eight pixels */
1115   dp = &Machine->gfx[0]->gfxdata[(256 * 8 + offset) * Machine->gfx[0]->width];
1115   dp = &machine->gfx[0]->gfxdata[(256 * 8 + offset) * Machine->gfx[0]->width];
11161116   dp[0] = (data & 0x80) ? 1 : 0;
11171117   dp[1] = (data & 0x40) ? 1 : 0;
11181118   dp[2] = (data & 0x20) ? 1 : 0;
src/mess/machine/pmd85.c
r1971r1972
99
1010***************************************************************************/
1111
12#include <stdarg.h>
1312#include "driver.h"
14#include "deprecat.h"
1513#include "devices/cassette.h"
1614#include "cpu/i8085/i8085.h"
1715#include "includes/pmd85.h"
r1971r1972
763761static OPBASE_HANDLER(pmd85_opbaseoverride)
764762{
765763   if (readinputport(0x10)&0x01)
766      mame_schedule_soft_reset(Machine);
764      mame_schedule_soft_reset(machine);
767765   return address;
768766}
769767
770768static OPBASE_HANDLER(mato_opbaseoverride)
771769{
772770   if (readinputport(0x09)&0x01)
773      mame_schedule_soft_reset(Machine);
771      mame_schedule_soft_reset(machine);
774772   return address;
775773}
776774
src/mess/machine/lviv.c
r1971r1972
99
1010***************************************************************************/
1111
12#include <stdarg.h>
1312#include "driver.h"
14#include "deprecat.h"
1513#include "devices/cassette.h"
1614#include "devices/snapquik.h"
1715#include "cpu/i8085/i8085.h"
r1971r1972
4644static OPBASE_HANDLER(lviv_opbaseoverride)
4745{
4846   if (readinputport(12)&0x01)
49      mame_schedule_soft_reset(Machine);
47      mame_schedule_soft_reset(machine);
5048   return address;
5149}
5250
src/mess/machine/europc.c
r1971r1972
117117      break;
118118   case 4:
119119      switch(data&0xc0) {
120      case 0x00: cpunum_set_clockscale(Machine, 0, 1.0/2);break;
121      case 0x40: cpunum_set_clockscale(Machine, 0, 3.0/4);break;
122      default: cpunum_set_clockscale(Machine, 0, 1);break;
120      case 0x00: cpunum_set_clockscale(machine, 0, 1.0/2);break;
121      case 0x40: cpunum_set_clockscale(machine, 0, 3.0/4);break;
122      default: cpunum_set_clockscale(machine, 0, 1);break;
123123      }
124124      break;
125125   case 0xa:
src/mess/machine/atom.c
r1971r1972
231231   generator. I don't know if this is hardware, or random data because the
232232   ram chips are not cleared at start-up. So at this time, these numbers
233233   are poked into the memory to simulate it. When I have more details I will fix it */
234   memory_region(REGION_CPU1)[0x08] = mame_rand(Machine) & 0x0ff;
235   memory_region(REGION_CPU1)[0x09] = mame_rand(Machine) & 0x0ff;
236   memory_region(REGION_CPU1)[0x0a] = mame_rand(Machine) & 0x0ff;
237   memory_region(REGION_CPU1)[0x0b] = mame_rand(Machine) & 0x0ff;
234   memory_region(REGION_CPU1)[0x08] = mame_rand(machine) & 0x0ff;
235   memory_region(REGION_CPU1)[0x09] = mame_rand(machine) & 0x0ff;
236   memory_region(REGION_CPU1)[0x0a] = mame_rand(machine) & 0x0ff;
237   memory_region(REGION_CPU1)[0x0b] = mame_rand(machine) & 0x0ff;
238238
239239   return activecpu_get_pc() & 0x0ffff;
240240}
src/mess/machine/bebox.c
r1971r1972
230230               (crossproc_map[i].inputline == PPC_INPUT_LINE_SMI) ? "SMI" : "TLBISYNC");
231231         }
232232
233         cpunum_set_input_line(Machine, crossproc_map[i].cpunum, crossproc_map[i].inputline, line);
233         cpunum_set_input_line(machine, crossproc_map[i].cpunum, crossproc_map[i].inputline, line);
234234      }
235235   }
236236}
r1971r1972
241241
242242   if (b & 0x20)
243243   {
244      cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (b & 0x80) ? CLEAR_LINE : ASSERT_LINE);
244      cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (b & 0x80) ? CLEAR_LINE : ASSERT_LINE);
245245   }
246246}
247247
src/mess/machine/trs80.c
r1971r1972
99
1010/* Core includes */
1111#include "driver.h"
12#include "deprecat.h"
1312#include "includes/trs80.h"
1413
1514/* Components */
r1971r1972
503502         if (diff > 4000)
504503         {
505504            /* reset tape output */
506            tape_put_close(Machine);
505            tape_put_close(machine);
507506            put_bit_count = tape_bits = in_sync = 0;
508507         }
509508         else
src/mess/machine/apple2.c
r1971r1972
14411441   intf.read_data = apple2_fdc_read_data;
14421442   intf.write_data = apple2_fdc_write_data;
14431443
1444   for (dev = Machine->devices; dev->type < IO_COUNT; dev++)
1444   for (dev = machine->devices; dev->type < IO_COUNT; dev++)
14451445   {
14461446      if (!strcmp(dev->tag, "sonydriv"))
14471447         apple2_fdc_has_35 = 1;
src/mess/machine/tandy1t.c
r1971r1972
11#include "driver.h"
2#include "deprecat.h"
32
43#include "machine/pckeybrd.h"
54
r1971r1972
189188      break;
190189   case 2:
191190      tandy_ppi.portc = data;
192      if (data&8) cpunum_set_clockscale(Machine, 0, 1);
193      else cpunum_set_clockscale(Machine, 0, 4.77/8);
191      if (data&8) cpunum_set_clockscale(machine, 0, 1);
192      else cpunum_set_clockscale(machine, 0, 4.77/8);
194193      break;
195194   }
196195}
src/mess/drivers/sord.c
r1971r1972
263263
264264   if (data==0x0f0)
265265   {
266      cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
267      cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
266      cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, ASSERT_LINE);
267      cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, CLEAR_LINE);
268268   }
269269   LOG(("m5 write to pi5 port b: %02x %04x\n",data,activecpu_get_pc()));
270270}
src/mess/drivers/x68k.c
r1971r1972
12011201   {
12021202      COMBINE_DATA(sys.video.gfx_pal+offset);
12031203      val = sys.video.gfx_pal[offset];
1204      palette_set_color_rgb(Machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2);
1204      palette_set_color_rgb(machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2);
12051205      return;
12061206   }
12071207
r1971r1972
12091209   {
12101210      COMBINE_DATA(sys.video.text_pal+(offset-0x100));
12111211      val = sys.video.text_pal[offset-0x100];
1212      palette_set_color_rgb(Machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2);
1212      palette_set_color_rgb(machine,offset,(val & 0x07c0) >> 3,(val & 0xf800) >> 8,(val & 0x003e) << 2);
12131213      return;
12141214   }
12151215
r1971r1972
13321332       then access causes a bus error */
13331333   current_vector[2] = 0x02;  // bus error
13341334   current_irq_line = 2;
1335   cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]);
1335   cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]);
13361336   return 0xff;
13371337}
13381338
r1971r1972
13421342       then access causes a bus error */
13431343   current_vector[2] = 0x02;  // bus error
13441344   current_irq_line = 2;
1345   cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]);
1345   cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]);
13461346}
13471347
13481348static READ16_HANDLER( x68k_exp_r )
r1971r1972
13561356      if(ACCESSING_LSB)
13571357         offset++;
13581358      timer_set(ATTOTIME_IN_CYCLES(16,0), NULL, 0xeafa00+offset,x68k_fake_bus_error);
1359//      cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]);
1359//      cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]);
13601360   }
13611361   return 0xffff;
13621362}
r1971r1972
13721372      if(ACCESSING_LSB)
13731373         offset++;
13741374      timer_set(ATTOTIME_IN_CYCLES(16,0), NULL, 0xeafa00+offset,x68k_fake_bus_error);
1375//      cpunum_set_input_line_and_vector(Machine, 0,2,ASSERT_LINE,current_vector[2]);
1375//      cpunum_set_input_line_and_vector(machine, 0,2,ASSERT_LINE,current_vector[2]);
13761376   }
13771377}
13781378
src/mess/drivers/super80.c
r1971r1972
151151         pcgram[0x800+offset] = data;
152152
153153         /* decode character graphics again */
154         decodechar(Machine->gfx[0], chr, pcgram);
154         decodechar(machine->gfx[0], chr, pcgram);
155155      }
156156   }
157157}
r1971r1972
363363         (i == cursor))                  // displaying at cursor position?
364364            chr = 256;               // 256 = cursor character
365365
366      drawgfx( bitmap,Machine->gfx[0],chr,col,0,0,sx,sy,
367         &Machine->screen[0].visarea,TRANSPARENCY_NONE,0);   // put character on the screen
366      drawgfx( bitmap,machine->gfx[0],chr,col,0,0,sx,sy,
367         &machine->screen[0].visarea,TRANSPARENCY_NONE,0);   // put character on the screen
368368
369369   }
370370
src/mess/drivers/atarist.c
r1971r1972
5151
5252static READ16_HANDLER( atarist_mfp_r )
5353{
54   atarist_state *state = Machine->driver_data;
54   atarist_state *state = machine->driver_data;
5555
5656   return mc68901_register_r(state->mfp, offset);
5757}
5858
5959static WRITE16_HANDLER( atarist_mfp_w )
6060{
61   atarist_state *state = Machine->driver_data;
61   atarist_state *state = machine->driver_data;
6262
6363   if (ACCESSING_LSB) mc68901_register_w(state->mfp, offset, data & 0xff);
6464}
r1971r1972
783783static WRITE16_HANDLER( megaste_cache_w )
784784{
785785   megaste_cache = data;
786   cpunum_set_clock(Machine, 0, (data & 0x01) ? Y2/2 : Y2/4);
786   cpunum_set_clock(machine, 0, (data & 0x01) ? Y2/2 : Y2/4);
787787}
788788
789789/* ST Book */
r1971r1972
13981398
13991399    */
14001400
1401   atarist_state *state = Machine->driver_data;
1401   atarist_state *state = machine->driver_data;
14021402
14031403   UINT8 data = (centronics_read_handshake(0) & CENTRONICS_NOT_BUSY) >> 7;
14041404
src/mess/drivers/pcw.c
r1971r1972
481481            /* yes */
482482
483483            /* clear nmi interrupt */
484            cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
484            cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
485485         }
486486
487487         /* re-issue interrupt */
r1971r1972
503503            /* yes */
504504
505505            /* Clear NMI */
506            cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
506            cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
507507
508508         }
509509
src/mess/drivers/ex800.c
r1971r1972
127127******************************************************************************/
128128
129129#include "driver.h"
130#include "deprecat.h"
131130#include "cpu/upd7810/upd7810.h"
132131#include "sound/beep.h"
133132
r1971r1972
171170
172171   if (newval)
173172   {
174      cpunum_set_input_line(Machine, 0, UPD7810_INTF1, state);
173      cpunum_set_input_line(machine, 0, UPD7810_INTF1, state);
175174      state = (state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE;
176175   }
177176}
r1971r1972
201200static READ8_HANDLER(ex800_porta_r)
202201{
203202   logerror("PA R @%x\n", activecpu_get_pc());
204   return mame_rand(Machine);
203   return mame_rand(machine);
205204}
206205
207206static READ8_HANDLER(ex800_portb_r)
208207{
209208   logerror("PB R @%x\n", activecpu_get_pc());
210   return mame_rand(Machine);
209   return mame_rand(machine);
211210}
212211
213212static READ8_HANDLER(ex800_portc_r)
214213{
215214   logerror("PC R @%x\n", activecpu_get_pc());
216   return mame_rand(Machine);
215   return mame_rand(machine);
217216}
218217
219218static WRITE8_HANDLER(ex800_porta_w)
r1971r1972
264263static READ8_HANDLER(ex800_devsel_r)
265264{
266265   logerror("DEVSEL R @%x with offset %x\n", activecpu_get_pc(), offset);
267   return mame_rand(Machine);
266   return mame_rand(machine);
268267}
269268
270269static WRITE8_HANDLER(ex800_devsel_w)
r1971r1972
275274static READ8_HANDLER(ex800_gate5a_r)
276275{
277276   logerror("GATE5A R @%x with offset %x\n", activecpu_get_pc(), offset);
278   return mame_rand(Machine);
277   return mame_rand(machine);
279278}
280279
281280static WRITE8_HANDLER(ex800_gate5a_w)
r1971r1972
286285static READ8_HANDLER(ex800_iosel_r)
287286{
288287   logerror("IOSEL R @%x with offset %x\n", activecpu_get_pc(), offset);
289   return mame_rand(Machine);
288   return mame_rand(machine);
290289}
291290
292291static WRITE8_HANDLER(ex800_iosel_w)
r1971r1972
297296static READ8_HANDLER(ex800_gate7a_r)
298297{
299298   logerror("GATE7A R @%x with offset %x\n", activecpu_get_pc(), offset);
300   return mame_rand(Machine);
299   return mame_rand(machine);
301300}
302301
303302static WRITE8_HANDLER(ex800_gate7a_w)
src/mess/drivers/saturn.c
r1971r1972
820820      if(!(stv_scu[40] & 2))/*VBLANK-OUT*/
821821      {
822822         if(LOG_IRQ) logerror ("Interrupt: VBlank-OUT at scanline %04x, Vector 0x41 Level 0x0e\n",scanline);
823         cpunum_set_input_line_and_vector(Machine, 0, 0xe, HOLD_LINE , 0x41);
823         cpunum_set_input_line_and_vector(machine, 0, 0xe, HOLD_LINE , 0x41);
824824      }
825825      stv_vblank = 0;
826826   }
r1971r1972
836836         if((!(stv_scu[40] & 0x10)) && (!(stv_scu[38] & 0x80)))
837837         {
838838            if(LOG_IRQ) logerror ("Interrupt: Timer 1 at scanline %04x, Vector 0x44 Level 0x0b\n",scanline);
839            cpunum_set_input_line_and_vector(Machine, 0, 0xb, HOLD_LINE, 0x44 );
839            cpunum_set_input_line_and_vector(machine, 0, 0xb, HOLD_LINE, 0x44 );
840840         }
841841         else if((!(stv_scu[40] & 0x10)) && (stv_scu[38] & 0x80))
842842         {
843843            if(timer_1 == (stv_scu[36] & 0x1ff))
844844            {
845845               if(LOG_IRQ) logerror ("Interrupt: Timer 1 at scanline %04x, Vector 0x44 Level 0x0b\n",scanline);
846               cpunum_set_input_line_and_vector(Machine, 0, 0xb, HOLD_LINE, 0x44 );
846               cpunum_set_input_line_and_vector(machine, 0, 0xb, HOLD_LINE, 0x44 );
847847            }
848848         }
849849      }
r1971r1972
852852         if(!(stv_scu[40] & 8))/*Timer 0*/
853853         {
854854            if(LOG_IRQ) logerror ("Interrupt: Timer 0 at scanline %04x, Vector 0x43 Level 0x0c\n",scanline);
855            cpunum_set_input_line_and_vector(Machine, 0, 0xc, HOLD_LINE, 0x43 );
855            cpunum_set_input_line_and_vector(machine, 0, 0xc, HOLD_LINE, 0x43 );
856856         }
857857      }
858858
r1971r1972
860860      if(!(stv_scu[40] & 4))/*HBLANK-IN*/
861861      {
862862         if(LOG_IRQ) logerror ("Interrupt: HBlank-In at scanline %04x, Vector 0x42 Level 0x0d\n",scanline);
863         cpunum_set_input_line_and_vector(Machine, 0, 0xd, HOLD_LINE , 0x42);
863         cpunum_set_input_line_and_vector(machine, 0, 0xd, HOLD_LINE , 0x42);
864864      }
865865   }
866866   else if(scanline == 224)
r1971r1972
871871      if(!(stv_scu[40] & 1))/*VBLANK-IN*/
872872      {
873873         if(LOG_IRQ) logerror ("Interrupt: VBlank IN at scanline %04x, Vector 0x40 Level 0x0f\n",scanline);
874         cpunum_set_input_line_and_vector(Machine, 0, 0xf, HOLD_LINE , 0x40);
874         cpunum_set_input_line_and_vector(machine, 0, 0xf, HOLD_LINE , 0x40);
875875      }
876876      stv_vblank = 1;
877877
r1971r1972
880880         if(!(stv_scu[40] & 8))/*Timer 0*/
881881         {
882882            if(LOG_IRQ) logerror ("Interrupt: Timer 0 at scanline %04x, Vector 0x43 Level 0x0c\n",scanline);
883            cpunum_set_input_line_and_vector(Machine, 0, 0xc, HOLD_LINE, 0x43 );
883            cpunum_set_input_line_and_vector(machine, 0, 0xc, HOLD_LINE, 0x43 );
884884         }
885885      }
886886      if(!(stv_scu[40] & 0x2000)) /*Sprite draw end irq*/
887         cpunum_set_input_line_and_vector(Machine, 0, 2, HOLD_LINE , 0x4d);
887         cpunum_set_input_line_and_vector(machine, 0, 2, HOLD_LINE , 0x4d);
888888   }
889889}
890890
r1971r1972
11071107         /*Sound IRQ*/
11081108         if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
11091109         {
1110            //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
1110            //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
11111111            logerror("SCSP: Main CPU interrupt\n");
11121112            #if 0
11131113            if((scu_dst_0 & 0x7ffffff) != 0x05a00000)
11141114            {
11151115               if(!(stv_scu[40] & 0x1000))
11161116               {
1117                  cpunum_set_input_line_and_vector(Machine, 0, 3, HOLD_LINE, 0x4c);
1117                  cpunum_set_input_line_and_vector(machine, 0, 3, HOLD_LINE, 0x4c);
11181118                  logerror("SCU: Illegal DMA interrupt\n");
11191119               }
11201120            }
r1971r1972
11681168         /*Sound IRQ*/
11691169         if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
11701170         {
1171            //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
1171            //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
11721172            logerror("SCSP: Main CPU interrupt\n");
11731173         }
11741174      }
r1971r1972
12181218         /*Sound IRQ*/
12191219         if(/*(!(stv_scu[40] & 0x40)) &&*/ scsp_to_main_irq == 1)
12201220         {
1221            //cpunum_set_input_line_and_vector(Machine, 0, 9, HOLD_LINE , 0x46);
1221            //cpunum_set_input_line_and_vector(machine, 0, 9, HOLD_LINE , 0x46);
12221222            logerror("SCSP: Main CPU interrupt\n");
12231223         }
12241224      }
r1971r1972
18641864{
18651865   logerror("cpu #%d (PC=%08X) MINIT write = %08x\n",cpu_getactivecpu(), activecpu_get_pc(),data);
18661866   cpu_boost_interleave(double_to_attotime(minit_boost_timeslice), ATTOTIME_IN_USEC(minit_boost));
1867   cpu_trigger(Machine, 1000);
1867   cpu_trigger(machine, 1000);
18681868   cpunum_set_info_int(1, CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE);
18691869}
18701870
r1971r1972
21662166   memset(stv_workram_l, 0, 0x100000);
21672167   memset(stv_workram_h, 0, 0x100000);
21682168
2169   cpunum_set_clock(Machine, 0, MASTER_CLOCK_320/2);
2170   cpunum_set_clock(Machine, 1, MASTER_CLOCK_320/2);
2171   cpunum_set_clock(Machine, 2, MASTER_CLOCK_320/5);
2169   cpunum_set_clock(machine, 0, MASTER_CLOCK_320/2);
2170   cpunum_set_clock(machine, 1, MASTER_CLOCK_320/2);
2171   cpunum_set_clock(machine, 2, MASTER_CLOCK_320/5);
21722172
21732173   stvcd_reset();
21742174}
src/mess/drivers/ql.c
r1971r1972
368368
369369   if (!zx8302.irq)
370370   {
371      cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE);
371      cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE);
372372   }
373373}
374374
r1971r1972
485485      switch (ipl)
486486      {
487487      case 0:
488         cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE);
489         cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE);
490         cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, HOLD_LINE);
488         cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE);
489         cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE);
490         cpunum_set_input_line(machine, 0, MC68000_IRQ_7, HOLD_LINE);
491491         break;
492492      case 1: // CTRL-ALT-7
493         cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE);
494         cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, HOLD_LINE);
495         cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE);
493         cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE);
494         cpunum_set_input_line(machine, 0, MC68000_IRQ_5, HOLD_LINE);
495         cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE);
496496         break;
497497      case 2:
498         cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, HOLD_LINE);
499         cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE);
500         cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE);
498         cpunum_set_input_line(machine, 0, MC68000_IRQ_2, HOLD_LINE);
499         cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE);
500         cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE);
501501         break;
502502      case 3:
503         cpunum_set_input_line(Machine, 0, MC68000_IRQ_2, CLEAR_LINE);
504         cpunum_set_input_line(Machine, 0, MC68000_IRQ_5, CLEAR_LINE);
505         cpunum_set_input_line(Machine, 0, MC68000_IRQ_7, CLEAR_LINE);
503         cpunum_set_input_line(machine, 0, MC68000_IRQ_2, CLEAR_LINE);
504         cpunum_set_input_line(machine, 0, MC68000_IRQ_5, CLEAR_LINE);
505         cpunum_set_input_line(machine, 0, MC68000_IRQ_7, CLEAR_LINE);
506506         break;
507507      }
508508
r1971r1972
536536
537537   int irq = (ipc.ser2_rxd | ipc.ser1_txd);
538538
539   cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ0, irq);
539   cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ0, irq);
540540
541541   return (zx8302.comdata << 7) | irq;
542542}
src/mess/drivers/gmaster.c
r1971r1972
173173static VIDEO_UPDATE( gmaster )
174174{
175175    int x,y;
176//    plot_box(bitmap, 0, 0, 64/*bitmap->width*/, bitmap->height, Machine->pens[0]); //xmess rounds up to 64 pixel
176//    plot_box(bitmap, 0, 0, 64/*bitmap->width*/, bitmap->height, machine->pens[0]); //xmess rounds up to 64 pixel
177177    for (y=0;y<ARRAY_LENGTH(gmaster_video.pixels); y++) {
178178   for (x=0;x<ARRAY_LENGTH(gmaster_video.pixels[0]);x++) {
179179     UINT8 d=gmaster_video.pixels[y][x];
src/mess/drivers/amstrad.c
r1971r1972
237237/* PSG function selected */
238238static unsigned char amstrad_Psg_FunctionSelected;
239239
240static void update_psg(void)
240static void update_psg(running_machine *machine)
241241{
242   running_machine *machine = Machine;
243
244242   if(aleste_mode & 0x20)  // RTC selected
245243   {
246244      switch(aleste_rtc_function)
r1971r1972
286284/* Read/Write 8255 PPI port A (connected to AY-3-8912 databus) */
287285static READ8_HANDLER ( amstrad_ppi_porta_r )
288286{
289   update_psg();
287   update_psg(machine);
290288   return ppi_port_inputs[amstrad_ppi_PortA];
291289}
292290
293291static WRITE8_HANDLER ( amstrad_ppi_porta_w )
294292{
295293   ppi_port_outputs[amstrad_ppi_PortA] = data;
296   update_psg();
294   update_psg(machine);
297295}
298296
299297/* - Read PPI Port B -
r1971r1972
387385   aleste_rtc_function = data & 0x07;
388386
389387/* Perform PSG function */
390   update_psg();
388   update_psg(machine);
391389
392390/* b5 Cassette Write data */
393391   if(amstrad_system_type != SYSTEM_GX4000)
r1971r1972
774772         if(data & 0x40)
775773         {
776774            logerror("ASIC: DMA 0 IRQ acknowledge\n");
777            cpunum_set_input_line(Machine, 0,0,CLEAR_LINE);
775            cpunum_set_input_line(machine, 0,0,CLEAR_LINE);
778776            amstrad_plus_irq_cause = 0x06;
779777            amstrad_plus_asic_ram[0x2c0f] &= ~0x40;
780778         }
781779         if(data & 0x20)
782780         {
783781            logerror("ASIC: DMA 1 IRQ acknowledge\n");
784            cpunum_set_input_line(Machine, 0,0,CLEAR_LINE);
782            cpunum_set_input_line(machine, 0,0,CLEAR_LINE);
785783            amstrad_plus_irq_cause = 0x06;
786784            amstrad_plus_asic_ram[0x2c0f] &= ~0x20;
787785         }
788786         if(data & 0x10)
789787         {
790788            logerror("ASIC: DMA 2 IRQ acknowledge\n");
791            cpunum_set_input_line(Machine, 0,0,CLEAR_LINE);
789            cpunum_set_input_line(machine, 0,0,CLEAR_LINE);
792790            amstrad_plus_irq_cause = 0x06;
793791            amstrad_plus_asic_ram[0x2c0f] &= ~0x10;
794792         }
src/mess/drivers/a310.c
r1971r1972
437437            // if that did it, clear the IRQ
438438            if (a310_iocregs[4] == 0)
439439            {
440               cpunum_set_input_line(Machine, 0, ARM_IRQ_LINE, CLEAR_LINE);
440               cpunum_set_input_line(machine, 0, ARM_IRQ_LINE, CLEAR_LINE);
441441            }
442442            break;
443443
r1971r1972
587587            a310_vidregs[0x80], a310_vidregs[0xa0],
588588            visarea.max_x, visarea.max_y);
589589
590         video_screen_configure(0, a310_vidregs[0x80], a310_vidregs[0xa0], &visarea, Machine->screen[0].refresh);
590         video_screen_configure(0, a310_vidregs[0x80], a310_vidregs[0xa0], &visarea, machine->screen[0].refresh);
591591
592592         // slightly hacky: fire off a VBL right now.  the BIOS doesn't wait long enough otherwise.
593593         timer_adjust_oneshot(vbl_timer, attotime_zero, 0);
src/mess/drivers/tutor.c
r1971r1972
7373*/
7474
7575#include "driver.h"
76#include "deprecat.h"
7776#include "cpu/tms9900/tms9900.h"
7877#include "video/tms9928a.h"
7978#include "devices/cartslot.h"
r1971r1972
294293            else
295294            {
296295               timer_adjust_oneshot(tape_interrupt_timer, attotime_never, 0);
297               cpunum_set_input_line(Machine, 0, 1, CLEAR_LINE);
296               cpunum_set_input_line(machine, 0, 1, CLEAR_LINE);
298297            }
299298         }
300299         break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team