Previous 15994 Revisions Next

r3767 Monday 8th December, 2008 at 00:47:49 UTC by Barry Rodewald
[SINCLAIR] Updated.
[src/mess]mess.mak messdriv.c
[src/mess/drivers]spectrum.c
[src/mess/machine]zx.c zx8302.c
[src/mess/video]zx8301.c

src/mess/video/zx8301.c
r3766r3767
253253   assert(zx8301->screen != NULL);
254254
255255   /* create the timers */
256   zx8301->vsync_timer = timer_alloc(machine, zx8301_vsync_tick, (void *)device);
256   zx8301->vsync_timer = timer_alloc(device->machine, zx8301_vsync_tick, (void *)device);
257257   timer_adjust_periodic(zx8301->vsync_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50)); // HACK
258258
259   zx8301->flash_timer = timer_alloc(machine, zx8301_flash_tick, (void *)device);
259   zx8301->flash_timer = timer_alloc(device->machine, zx8301_flash_tick, (void *)device);
260260   timer_adjust_periodic(zx8301->flash_timer, ATTOTIME_IN_HZ(2), 0, ATTOTIME_IN_HZ(2));
261261
262262   /* register for state saving */
263   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->dispoff);
264   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->mode8);
265   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->base);
266   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->flash);
267   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->vsync);
268   state_save_register_item(machine, "zx8301", device->tag, 0, zx8301->vda);
263   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->dispoff);
264   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->mode8);
265   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->base);
266   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->flash);
267   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->vsync);
268   state_save_register_item(device->machine, "zx8301", device->tag, 0, zx8301->vda);
269269
270270   return DEVICE_START_OK;
271271}
src/mess/messdriv.c
r3766r3767
452452//0128u5   DRIVER( osborne1 )   /* 1981 Osborne-1                           */
453453
454454   /* SINCLAIR RESEARCH */
455//0128u5   DRIVER( zx80 )      /* 1980 Sinclair ZX-80                        */
456//0128u5   DRIVER( zx81 )      /* 1981 Sinclair ZX-81                        */
457//0128u5   DRIVER( ts1000 )   /* 1982 Timex Sinclair 1000                     */
458//0128u5   DRIVER( pc8300 )   /* Your Computer - PC8300                     */
459//0128u5   DRIVER( pow3000 )   /* Creon Enterprises - Power 3000               */
460//0128u5   DRIVER( lambda )   /* Lambda 8300                              */
455   DRIVER( zx80 )      /* 1980 Sinclair ZX-80                        */
456   DRIVER( zx81 )      /* 1981 Sinclair ZX-81                        */
457   DRIVER( ts1000 )   /* 1982 Timex Sinclair 1000                     */
458   DRIVER( pc8300 )   /* Your Computer - PC8300                     */
459   DRIVER( pow3000 )   /* Creon Enterprises - Power 3000               */
460   DRIVER( lambda )   /* Lambda 8300                              */
461461
462//0128u5   DRIVER( spectrum )/* 1982 ZX Spectrum                           */
463//0128u5   DRIVER( spec80k ) /* 1987 ZX Spectrum 80k                     */
464//0128u5   DRIVER( specide ) /* 1995 ZX Spectrum IDE                     */
465//0128u5   DRIVER( inves )      /* 1986 Inves Spectrum 48K+                     */
466//0128u5   DRIVER( tk90x )      /* 1985 TK90x Color Computer                  */
467//0128u5   DRIVER( tk95 )      /* 1986 TK95 Color Computer                     */
468//0128u5   DRIVER( tc2048 )   /* 198? TC2048                              */
469//0128u5   DRIVER( ts2068 )   /* 1983 TS2068                              */
470//0128u5   DRIVER( uk2086 )   /* 1986 UK2086                              */ 
462   DRIVER( spectrum )/* 1982 ZX Spectrum                           */
463   DRIVER( spec80k ) /* 1987 ZX Spectrum 80k                     */
464   DRIVER( specide ) /* 1995 ZX Spectrum IDE                     */
465   DRIVER( inves )      /* 1986 Inves Spectrum 48K+                     */
466   DRIVER( tk90x )      /* 1985 TK90x Color Computer                  */
467   DRIVER( tk95 )      /* 1986 TK95 Color Computer                     */
468   DRIVER( tc2048 )   /* 198? TC2048                              */
469   DRIVER( ts2068 )   /* 1983 TS2068                              */
470   DRIVER( uk2086 )   /* 1986 UK2086                              */ 
471471   
472//0128u5   DRIVER( spec128 )     /* 1986 ZX Spectrum 128                        */
473//0128u5   DRIVER( specpls2 )   /* 1986 ZX Spectrum +2                        */
474//0128u5   DRIVER( specpl2a )   /* 1987 ZX Spectrum +2a                        */   
475//0128u5   DRIVER( specpls3 )   /* 1987 ZX Spectrum +3                        */
476//0128u5   DRIVER( specpl3e )   /* 2000 ZX Spectrum +3e                        */
477//0128u5   DRIVER( sp3e8bit )   /* 2002 ZX Spectrum +3e   8bit IDE         */
478//0128u5   DRIVER( sp3ezcf )     /* 2002 ZX Spectrum +3e   ZXCF               */
479//0128u5   DRIVER( sp3eata )     /* 2002 ZX Spectrum +3e   ZXATASP           */   
480//0128u5   DRIVER( scorpion )
481//0128u5   DRIVER( pentagon )
472   DRIVER( spec128 )     /* 1986 ZX Spectrum 128                        */
473   DRIVER( specpls2 )   /* 1986 ZX Spectrum +2                        */
474   DRIVER( specpl2a )   /* 1987 ZX Spectrum +2a                        */   
475   DRIVER( specpls3 )   /* 1987 ZX Spectrum +3                        */
476   DRIVER( specpl3e )   /* 2000 ZX Spectrum +3e                        */
477   DRIVER( sp3e8bit )   /* 2002 ZX Spectrum +3e   8bit IDE         */
478   DRIVER( sp3ezcf )     /* 2002 ZX Spectrum +3e   ZXCF               */
479   DRIVER( sp3eata )     /* 2002 ZX Spectrum +3e   ZXATASP           */   
480   DRIVER( scorpion )
481   DRIVER( pentagon )
482482
483//0128u5   DRIVER( ql )      /* 1984 Sinclair QL   (UK)                     */
484//0128u5   DRIVER( ql_us )      /* 1984 Sinclair QL   (USA)                     */
485//0128u5   DRIVER( ql_es )      /* 1984 Sinclair QL   (Spain)                     */
486//0128u5   DRIVER( ql_fr )      /* 1984 Sinclair QL   (France)                  */
487//0128u5   DRIVER( ql_de )      /* 1984 Sinclair QL   (Germany)                  */
488//0128u5   DRIVER( ql_it )      /* 1984 Sinclair QL   (Italy)                     */
489//0128u5   DRIVER( ql_se )      /* 1984 Sinclair QL   (Sweden)                  */
490//0128u5   DRIVER( ql_dk )      /* 1984 Sinclair QL   (Denmark)                  */
491//0128u5   DRIVER( ql_gr )      /* 1984 Sinclair QL   (Greece)                  */
483   DRIVER( ql )      /* 1984 Sinclair QL   (UK)                     */
484   DRIVER( ql_us )      /* 1984 Sinclair QL   (USA)                     */
485   DRIVER( ql_es )      /* 1984 Sinclair QL   (Spain)                     */
486   DRIVER( ql_fr )      /* 1984 Sinclair QL   (France)                  */
487   DRIVER( ql_de )      /* 1984 Sinclair QL   (Germany)                  */
488   DRIVER( ql_it )      /* 1984 Sinclair QL   (Italy)                     */
489   DRIVER( ql_se )      /* 1984 Sinclair QL   (Sweden)                  */
490   DRIVER( ql_dk )      /* 1984 Sinclair QL   (Denmark)                  */
491   DRIVER( ql_gr )      /* 1984 Sinclair QL   (Greece)                  */
492492//   DRIVER( tonto )
493493//   DRIVER( megaopd )
494494
src/mess/machine/zx.c
r3766r3767
114114   }
115115   else if ((offset & 1) == 0)
116116   {
117      timer_adjust_periodic(ula_nmi, attotime_zero, 0, cpu_clocks_to_attotime(machine->cpu[0], 207));
117      timer_adjust_periodic(ula_nmi, attotime_zero, 0, cpu_clocks_to_attotime(space->machine->cpu[0], 207));
118118
119119      LOG_ZX81_IOW("ULA NMIs on");
120120
r3766r3767
182182         if ((cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" )) < -0.75) && zx_tape_bit)
183183         {
184184            zx_tape_bit = 0x00;
185            timer_set(machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse);
185            timer_set(space->machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse);
186186         }
187187
188188         data &= ~zx_tape_bit;
r3766r3767
247247         if ((cassette_input(device_list_find_by_tag( space->machine->config->devicelist, CASSETTE, "cassette" )) < -0.75) && zx_tape_bit)
248248         {
249249            zx_tape_bit = 0x00;
250            timer_set(machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse);
250            timer_set(space->machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse);
251251         }
252252
253253         data &= ~zx_tape_bit;
src/mess/machine/zx8302.c
r3766r3767
270270
271271   if (data != 0x01)
272272   {
273      timer_set(ATTOTIME_IN_NSEC(480), (void *) device, data, zx8302_delayed_ipc_command);
273      timer_set(device->machine,ATTOTIME_IN_NSEC(480), (void *) device, data, zx8302_delayed_ipc_command);
274274   }
275275}
276276
r3766r3767
596596   }
597597
598598   /* create the timers */
599   zx8302->txd_timer = timer_alloc(machine, zx8302_txd_tick, (void *)device);
600   zx8302->ipc_timer = timer_alloc(machine, zx8302_ipc_tick, (void *)device);
601   zx8302->rtc_timer = timer_alloc(machine, zx8302_rtc_tick, (void *)device);
602   zx8302->gap_timer = timer_alloc(machine, zx8302_gap_tick, (void *)device);
599   zx8302->txd_timer = timer_alloc(device->machine, zx8302_txd_tick, (void *)device);
600   zx8302->ipc_timer = timer_alloc(device->machine, zx8302_ipc_tick, (void *)device);
601   zx8302->rtc_timer = timer_alloc(device->machine, zx8302_rtc_tick, (void *)device);
602   zx8302->gap_timer = timer_alloc(device->machine, zx8302_gap_tick, (void *)device);
603603
604604   timer_adjust_periodic(zx8302->rtc_timer, attotime_zero, 0, ATTOTIME_IN_HZ(zx8302->intf->rtc_clock/32768));
605605   timer_adjust_periodic(zx8302->gap_timer, attotime_zero, 0, ATTOTIME_IN_MSEC(31));
606606
607607   /* register for state saving */
608608
609   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->idr);
610   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->tcr);
611   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->tdr);
612   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->irq);
613   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ctr);
614   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->status);
609   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->idr);
610   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->tcr);
611   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->tdr);
612   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->irq);
613   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ctr);
614   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->status);
615615
616   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->comdata);
617   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->comctl);
618   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ipc_state);
619   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ipc_rx);
620   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ipc_busy);
621   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->baudx4);
616   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->comdata);
617   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->comctl);
618   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ipc_state);
619   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ipc_rx);
620   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ipc_busy);
621   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->baudx4);
622622   
623   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->tx_bits);
624   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ser1_rxd);
625   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ser1_cts);
626   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ser2_txd);
627   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->ser2_dtr);
628   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->netout);
629   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->netin);
623   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->tx_bits);
624   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ser1_rxd);
625   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ser1_cts);
626   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ser2_txd);
627   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->ser2_dtr);
628   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->netout);
629   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->netin);
630630
631   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->mdrdw);
632   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->mdselck);
633   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->mdseld);
634   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->erase);
631   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->mdrdw);
632   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->mdselck);
633   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->mdseld);
634   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->erase);
635635   
636   state_save_register_item(machine, "zx8302", device->tag, 0, zx8302->mdv_motor);
637   state_save_register_item_array(machine, "zx8302", device->tag, 0, zx8302->mdv_offset);
636   state_save_register_item(device->machine, "zx8302", device->tag, 0, zx8302->mdv_motor);
637   state_save_register_item_array(device->machine, "zx8302", device->tag, 0, zx8302->mdv_offset);
638638   return DEVICE_START_OK;
639639}
640640
src/mess/mess.mak
r3766r3767
441441   $(MESSOBJ)/samcoupe.a \
442442   $(MESSOBJ)/sega.a \
443443   $(MESSOBJ)/sharp.a \
444   $(MESSOBJ)/sinclair.a \
444445   $(MESSOBJ)/special.a \
445446   $(MESSOBJ)/sony.a \
446447   $(MESSOBJ)/sord.a \
r3766r3767
483484#   $(MESSOBJ)/pdp1.a \
484485#   $(MESSOBJ)/rca.a \
485486#   $(MESSOBJ)/rockwell.a \
486#   $(MESSOBJ)/sinclair.a \
487487#   $(MESSOBJ)/thomson.a \
488488#   $(MESSOBJ)/ti99.a \
489489
src/mess/drivers/spectrum.c
r3766r3767
177177   if ((Changed & 0x07)!=0)
178178   {
179179      /* yes - send event */
180      EventList_AddItemOffset(space->machine, 0x0fe, data & 0x07, cpu_attotime_to_clocks(machine->cpu[0],attotime_mul(video_screen_get_scan_period(space->machine->primary_screen), video_screen_get_vpos(space->machine->primary_screen))));
180      EventList_AddItemOffset(space->machine, 0x0fe, data & 0x07, cpu_attotime_to_clocks(space->machine->cpu[0],attotime_mul(video_screen_get_scan_period(space->machine->primary_screen), video_screen_get_vpos(space->machine->primary_screen))));
181181   }
182182
183183   if ((Changed & (1<<4))!=0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team