Previous 15994 Revisions Next

r3755 Sunday 7th December, 2008 at 22:26:25 UTC by Miodrag Milanović
enabled some in make file and fixed few files
[src/mess]mess.mak
[src/mess/audio]svision.c
[src/mess/drivers]svision.c
[src/mess/machine]mc6843.c mc6846.c mc6846.h mc6854.c microtan.c svi318.c thomson.c

src/mess/audio/svision.c
r3754r3755
2020
2121WRITE8_HANDLER( svision_sounddma_w )
2222{
23   logerror("%.6f svision snddma write %04x %02x\n", attotime_to_double(timer_get_time(machine)),offset+0x18,data);
23   logerror("%.6f svision snddma write %04x %02x\n", attotime_to_double(timer_get_time(space->machine)),offset+0x18,data);
2424   svision_dma.reg[offset] = data;
2525   switch (offset)
2626   {
src/mess/machine/mc6854.c
r3754r3755
269269
270270
271271/* CPU push -> tfifo[0] -> ... -> tfifo[FIFO_SIZE-1] -> pop */
272static void mc6854_tfifo_push( UINT8 data )
272static void mc6854_tfifo_push( running_machine *machine, UINT8 data )
273273{
274274   int i;
275275
r3754r3755
436436
437437
438438/* MC6854 pushes a field in the FIFO */
439static void mc6854_rfifo_push( UINT8 d )
439static void mc6854_rfifo_push( running_machine *machine, UINT8 d )
440440{
441441   int i, blen = 8;
442442   unsigned data = d;
src/mess/machine/thomson.c
r3754r3755
15001500   /* subsystems */
15011501   thom_irq_init();
15021502   pia_config( THOM_PIA_SYS, &to7_sys );
1503   mc6846_config( &to7_timer );
1503   mc6846_config( machine, &to7_timer );
15041504   to7_game_init();
15051505   to7_floppy_init( machine, mem + 0x20000 );
15061506   to7_io_init();
r3754r3755
17501750   /* subsystems */
17511751   thom_irq_init();
17521752   pia_config( THOM_PIA_SYS, &to770_sys );
1753   mc6846_config( &to770_timer );
1753   mc6846_config( machine, &to770_timer );
17541754   to7_game_init();
17551755   to7_floppy_init( machine, mem + 0x20000 );
17561756   to7_io_init();
r3754r3755
30773077   thom_irq_init();
30783078   pia_config( THOM_PIA_SYS, &to9_sys );
30793079   centronics_config( 0, &to9_centronics );
3080   mc6846_config( &to9_timer );
3080   mc6846_config( machine, &to9_timer );
30813081   to7_game_init();
30823082   to9_floppy_init( machine, mem + 0xe000, mem + 0x40000 );
30833083   to9_kbd_init();
r3754r3755
40474047   thom_irq_init();
40484048   pia_config( THOM_PIA_SYS, &to8_sys );
40494049   centronics_config( 0, &to9_centronics );
4050   mc6846_config( &to8_timer );
4050   mc6846_config( machine, &to8_timer );
40514051   to7_game_init();
40524052   to8_floppy_init( machine );
40534053   to8_kbd_init();
r3754r3755
42134213   thom_irq_init();
42144214   pia_config( THOM_PIA_SYS, &to9p_sys );
42154215   centronics_config( 0, &to9_centronics );
4216   mc6846_config( &to9p_timer );
4216   mc6846_config( machine, &to9p_timer );
42174217   to7_game_init();
42184218   to8_floppy_init( machine );
42194219   to9_kbd_init();
src/mess/machine/mc6846.c
r3754r3755
8686
8787
8888
89INLINE UINT16 mc6846_counter ( void )
89INLINE UINT16 mc6846_counter ( running_machine *machine )
9090{
9191   if ( mc6846.timer_started )
9292   {
9393      attotime delay = timer_timeleft( mc6846.interval );
94      return ATTOTIME_TO_CYCLES( mc6846.iface->cpunum, delay ) / FACTOR;
94      return cpu_attotime_to_clocks( machine->cpu[mc6846.iface->cpunum], delay ) / FACTOR;
9595   }
9696   else
9797      return mc6846.preset;
r3754r3755
148148
149149INLINE void mc6846_timer_launch ( running_machine *machine )
150150{
151   int delay = FACTOR * (mc6846.preset+1);
151//   int delay = FACTOR * (mc6846.preset+1);
152152   LOG (( "%f: mc6846 timer launch called, mode=%i, preset=%i (x%i)\n", attotime_to_double(timer_get_time(machine)), MODE, mc6846.preset, FACTOR ));
153153
154154   if ( ! (mc6846.tcr & 2) )
r3754r3755
193193
194194static TIMER_CALLBACK(mc6846_timer_expire)
195195{
196   int delay = FACTOR * (mc6846.latch+1);
196//   int delay = FACTOR * (mc6846.latch+1);
197197
198198   LOG (( "%f: mc6846 timer expire called, mode=%i, latch=%i (x%i)\n", attotime_to_double(timer_get_time(machine)), MODE, mc6846.latch, FACTOR ));
199199
r3754r3755
256256   case 0:
257257   case 4:
258258      LOG (( "$%04x %f: mc6846 CSR read $%02X intr=%i (timer=%i, cp1=%i, cp2=%i)\n",
259             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)),
259             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)),
260260             mc6846.csr, (mc6846.csr >> 7) & 1,
261261             mc6846.csr & 1, (mc6846.csr >> 1) & 1, (mc6846.csr >> 2) & 1 ));
262262      mc6846.csr0_to_be_cleared = mc6846.csr & 1;
r3754r3755
265265      return mc6846.csr;
266266
267267   case 1:
268      LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846.pcr ));
268      LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846.pcr ));
269269      return mc6846.pcr;
270270
271271   case 2:
272      LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846.ddr ));
272      LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846.ddr ));
273273      return mc6846.ddr;
274274
275275   case 3:
276      LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), PORT_SPACE ));
276      LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), PORT_SPACE ));
277277      if ( ! (mc6846.pcr & 0x80) )
278278      {
279279         if ( mc6846.csr1_to_be_cleared )
r3754r3755
287287      return PORT_SPACE;
288288
289289   case 5:
290      LOG (( "$%04x %f: mc6846 TCR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846.tcr ));
290      LOG (( "$%04x %f: mc6846 TCR read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846.tcr ));
291291      return mc6846.tcr;
292292
293293   case 6:
294      LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846_counter() >> 8 ));
294      LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846_counter(space->machine) >> 8 ));
295295      if ( mc6846.csr0_to_be_cleared )
296296      {
297297         mc6846.csr &= ~1;
298298         mc6846_update_irq(space->machine);
299299      }
300300      mc6846.csr0_to_be_cleared = 0;
301      return mc6846_counter() >> 8;
301      return mc6846_counter(space->machine) >> 8;
302302
303303   case 7:
304      LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846_counter() & 0xff ));
304      LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846_counter(space->machine) & 0xff ));
305305      if ( mc6846.csr0_to_be_cleared )
306306      {
307307         mc6846.csr &= ~1;
308308         mc6846_update_irq(space->machine);
309309      }
310310      mc6846.csr0_to_be_cleared = 0;
311      return mc6846_counter() & 0xff;
311      return mc6846_counter(space->machine) & 0xff;
312312
313313   default:
314314      logerror( "$%04x mc6846 invalid read offset %i\n", cpu_get_previouspc(space->cpu), offset );
r3754r3755
340340         "latcged,pos-edge", "latcged,pos-edge,intr"
341341      };
342342      LOG (( "$%04x %f: mc6846 PCR write $%02X reset=%i cp2=%s cp1=%s\n",
343             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), data,
343             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), data,
344344             (data >> 7) & 1, cp2[ (data >> 3) & 7 ], cp1[ data & 7 ] ));
345345
346346   }
r3754r3755
368368   break;
369369
370370   case 2:
371      LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), data ));
371      LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), data ));
372372      if ( ! (mc6846.pcr & 0x80) )
373373      {
374374         mc6846.ddr = data;
r3754r3755
378378      break;
379379
380380   case 3:
381      LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), data,mc6846.ddr ));
381      LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), data,mc6846.ddr ));
382382      if ( ! (mc6846.pcr & 0x80) )
383383      {
384384         mc6846.pdr = data;
r3754r3755
387387         if ( mc6846.csr1_to_be_cleared && (mc6846.csr & 2) )
388388         {
389389            mc6846.csr &= ~2;
390            LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)) ));
390            LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)) ));
391391         }
392392         if ( mc6846.csr2_to_be_cleared && (mc6846.csr & 4) )
393393         {
394394            mc6846.csr &= ~4;
395            LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)) ));
395            LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)) ));
396396         }
397397         mc6846.csr1_to_be_cleared = 0;
398398         mc6846.csr2_to_be_cleared = 0;
r3754r3755
408408            "freq-cmp", "freq-cmp", "pulse-cmp", "pulse-cmp"
409409         };
410410      LOG (( "$%04x %f: mc6846 TCR write $%02X reset=%i clock=%s scale=%i mode=%s out=%s\n",
411             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), data,
411             cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), data,
412412             (data >> 7) & 1, (data & 0x40) ? "extern" : "sys",
413413             (data & 0x40) ? 1 : 8, mode[ (data >> 1) & 7 ],
414414             (data & 1) ? "enabled" : "0" ));
r3754r3755
442442
443443   case 7:
444444      mc6846.latch = ( ((UINT16) mc6846.time_MSB) << 8 ) + data;
445      LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(machine)), mc6846.latch  ));
445      LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc(space->cpu), attotime_to_double(timer_get_time(space->machine)), mc6846.latch  ));
446446      if (!(mc6846.tcr & 0x38))
447447      {
448448         /* timer initialization */
r3754r3755
564564
565565/************************** configuration ****************************/
566566
567void mc6846_config ( const mc6846_interface* iface )
567void mc6846_config ( running_machine *machine, const mc6846_interface* iface )
568568{
569569   mc6846.iface = iface;
570570   mc6846.interval = timer_alloc(machine,  mc6846_timer_expire , NULL);
src/mess/machine/mc6846.h
r3754r3755
3636
3737/* ---------- functions ------------ */
3838
39extern void mc6846_config ( const mc6846_interface *func );
39extern void mc6846_config ( running_machine *machine, const mc6846_interface *func );
4040
4141/* reset by external signal */
4242extern void mc6846_reset ( void );
src/mess/machine/microtan.c
r3754r3755
401401        break;
402402    case 1: /* BFF1: write delayed NMI */
403403        LOG(("microtan_bff1_w: %d <- %02x (delayed NMI)\n", offset, data));
404        timer_set(machine, cpu_clocks_to_attotime(machine->cpu[0], 8), NULL, 0, microtan_pulse_nmi);
404        timer_set(space->machine, cpu_clocks_to_attotime(space->machine->cpu[0], 8), NULL, 0, microtan_pulse_nmi);
405405        break;
406406    case 2: /* BFF2: write keypad column write (what is this meant for?) */
407407        LOG(("microtan_bff2_w: %d <- %02x (keypad column)\n", offset, data));
src/mess/machine/svi318.c
r3754r3755
515515   memset( svi.svi806_ram + 0x800, 0xFF, 0x800 );
516516   svi.svi806_gfx = memory_region(machine, "gfx1");
517517
518   timer_set( attotime_zero, NULL, 0, svi318_80col_init_registers );
518   timer_set( machine, attotime_zero, NULL, 0, svi318_80col_init_registers );
519519}
520520
521521static WRITE8_HANDLER( svi806_ram_enable_w )
src/mess/machine/mc6843.c
r3754r3755
188188
189189
190190/* Seek Track Zero bottom half */
191static void mc6843_finish_STZ( void )
191static void mc6843_finish_STZ( running_machine *machine )
192192{
193193   const device_config* img = mc6843_floppy_image();
194194   int i;
r3754r3755
217217
218218
219219/* Seek bottom half */
220static void mc6843_finish_SEK( void )
220static void mc6843_finish_SEK( running_machine *machine )
221221{
222222   const device_config* img = mc6843_floppy_image();
223223
r3754r3755
235235
236236
237237/* preamble to all sector read / write commands, returns 1 if found */
238static int mc6843_address_search( chrn_id* id )
238static int mc6843_address_search( running_machine *machine, chrn_id* id )
239239{
240240   const device_config* img = mc6843_floppy_image();
241241   int r = 0;
r3754r3755
293293
294294
295295/* preamble specific to read commands (adds extra checks) */
296static int mc6843_address_search_read( chrn_id* id )
296static int mc6843_address_search_read( running_machine *machine, chrn_id* id )
297297{
298   if ( ! mc6843_address_search( id ) )
298   if ( ! mc6843_address_search( machine, id ) )
299299      return 0;
300300
301301   if ( id->flags & ID_FLAG_CRC_ERROR_IN_DATA_FIELD )
r3754r3755
319319
320320
321321/* Read CRC bottom half */
322static void mc6843_finish_RCR( void )
322static void mc6843_finish_RCR( running_machine *machine )
323323{
324324   chrn_id id;
325   if ( ! mc6843_address_search_read( &id ) )
325   if ( ! mc6843_address_search_read( machine, &id ) )
326326      return;
327327   mc6843_cmd_end();
328328}
r3754r3755
330330
331331
332332/* Single / Multiple Sector Read bottom half */
333static void mc6843_cont_SR( void )
333static void mc6843_cont_SR( running_machine *machine )
334334{
335335   chrn_id id;
336336   const device_config* img = mc6843_floppy_image();
337337
338338   /* sector seek */
339   if ( ! mc6843_address_search_read( &id ) )
339   if ( ! mc6843_address_search_read( machine, &id ) )
340340      return;
341341
342342   /* sector read */
r3754r3755
350350
351351
352352/* Single / Multiple Sector Write bottom half */
353static void mc6843_cont_SW( void )
353static void mc6843_cont_SW( running_machine *machine )
354354{
355355   chrn_id id;
356356
357357   /* sector seek */
358   if ( ! mc6843_address_search( &id ) )
358   if ( ! mc6843_address_search( machine, &id ) )
359359      return;
360360
361361   /* setup sector write buffer */
r3754r3755
379379
380380   switch ( cmd )
381381   {
382   case CMD_STZ: mc6843_finish_STZ(); break;
383   case CMD_SEK: mc6843_finish_SEK(); break;
384   case CMD_SSR: mc6843_cont_SR();    break;
385   case CMD_SSW: mc6843_cont_SW();    break;
386   case CMD_RCR: mc6843_finish_RCR(); break;
387   case CMD_SWD: mc6843_cont_SW();    break;
388   case CMD_MSW: mc6843_cont_SW();    break;
389   case CMD_MSR: mc6843_cont_SR();    break;
382   case CMD_STZ: mc6843_finish_STZ(machine); break;
383   case CMD_SEK: mc6843_finish_SEK(machine); break;
384   case CMD_SSR: mc6843_cont_SR(machine);    break;
385   case CMD_SSW: mc6843_cont_SW(machine);    break;
386   case CMD_RCR: mc6843_finish_RCR(machine); break;
387   case CMD_SWD: mc6843_cont_SW(machine);    break;
388   case CMD_MSW: mc6843_cont_SW(machine);    break;
389   case CMD_MSR: mc6843_cont_SR(machine);    break;
390390   }
391391}
392392
r3754r3755
407407      int cmd = mc6843->CMR & 0x0f;
408408
409409      LOG(( "%f $%04x mc6843_r: data input cmd=%s(%i), pos=%i/%i, GCR=%i, ",
410            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu),
410            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu),
411411            mc6843_cmd[cmd], cmd, mc6843->data_idx,
412412            mc6843->data_size, mc6843->GCR ));
413413
r3754r3755
471471   case 1: /* Current-Track Address Register (CTAR) */
472472      data = mc6843->CTAR;
473473      LOG(( "%f $%04x mc6843_r: read CTAR %i (actual=%i)\n",
474            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
474            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
475475            floppy_drive_get_current_track( mc6843_floppy_image() ) ));
476476      break;
477477
478478   case 2: /* Interrupt Status Register (ISR) */
479479      data = mc6843->ISR;
480480      LOG(( "%f $%04x mc6843_r: read ISR %02X: cmd=%scomplete settle=%scomplete sense-rq=%i STRB=%i\n",
481            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
481            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
482482            (data & 1) ? "" : "not-" , (data & 2) ? "" : "not-",
483483            (data >> 2) & 1, (data >> 3) & 1 ));
484484
r3754r3755
504504
505505      data = mc6843->STRA;
506506      LOG(( "%f $%04x mc6843_r: read STRA %02X: data-rq=%i del-dta=%i ready=%i t0=%i wp=%i trk-dif=%i idx=%i busy=%i\n",
507            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
507            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
508508            data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1,
509509            (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 ));
510510      break;
r3754r3755
513513   case 4: /* Status Register B (STRB) */
514514      data = mc6843->STRB;
515515      LOG(( "%f $%04x mc6843_r: read STRB %02X: data-err=%i CRC-err=%i dta--mrk-err=%i sect-mrk-err=%i seek-err=%i fi=%i wr-err=%i hard-err=%i\n",
516            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
516            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
517517            data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1,
518518            (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 ));
519519
r3754r3755
525525   case 7: /* Logical-Track Address Register (LTAR) */
526526      data = mc6843->LTAR;
527527      LOG(( "%f $%04x mc6843_r: read LTAR %i (actual=%i)\n",
528            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
528            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
529529            floppy_drive_get_current_track( mc6843_floppy_image() ) ));
530530      break;
531531
r3754r3755
546546      int FWF = (mc6843->CMR >> 4) & 1;
547547
548548      LOG(( "%f $%04x mc6843_w: data output cmd=%s(%i), pos=%i/%i, GCR=%i, data=%02X\n",
549            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu),
549            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu),
550550            mc6843_cmd[cmd], cmd, mc6843->data_idx,
551551            mc6843->data_size, mc6843->GCR, data ));
552552
r3754r3755
563563            /* end of sector write */
564564            const device_config* img = mc6843_floppy_image();
565565
566            LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), mc6843->data_id ));
566            LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), mc6843->data_id ));
567567
568568            floppy_drive_write_sector_data(
569569               img, mc6843->side, mc6843->data_id,
r3754r3755
627627               UINT8 track  = mc6843->data[1];
628628               UINT8 sector = mc6843->data[3];
629629               UINT8 filler = 0xe5; /* standard Thomson filler */
630               LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), track, sector));
630               LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), track, sector));
631631               floppy_drive_format_sector( img, mc6843->side, sector, track, 0, sector, 0, filler );
632632            }
633633            else
r3754r3755
657657   case 1: /* Current-Track Address Register (CTAR) */
658658      mc6843->CTAR = data & 0x7f;
659659      LOG(( "%f $%04x mc6843_w: set CTAR to %i %02X (actual=%i) \n",
660            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), mc6843->CTAR, data,
660            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), mc6843->CTAR, data,
661661            floppy_drive_get_current_track( mc6843_floppy_image() ) ));
662662      break;
663663
r3754r3755
666666      int cmd = data & 15;
667667
668668      LOG(( "%f $%04x mc6843_w: set CMR to $%02X: cmd=%s(%i) FWF=%i DMA=%i ISR3-intr=%i fun-intr=%i\n",
669            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu),
669            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu),
670670            data, mc6843_cmd[cmd], cmd, (data >> 4) & 1, (data >> 5) & 1,
671671            (data >> 6) & 1, (data >> 7) & 1 ));
672672
r3754r3755
713713
714714      /* assume CLK freq = 1MHz (IBM 3740 compatibility) */
715715      LOG(( "%f $%04x mc6843_w: set SUR to $%02X: head settling time=%fms, track-to-track seek time=%f\n",
716            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu),
716            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu),
717717            data, 4.096 * (data & 15), 1.024 * ((data >> 4) & 15) ));
718718      break;
719719
720720   case 4: /* Sector Address Register (SAR) */
721721      mc6843->SAR = data & 0x1f;
722      LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), mc6843->SAR, data ));
722      LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), mc6843->SAR, data ));
723723      break;
724724
725725   case 5: /* General Count Register (GCR) */
726726      mc6843->GCR = data & 0x7f;
727      LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), mc6843->GCR, data ));
727      LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), mc6843->GCR, data ));
728728      break;
729729
730730   case 6: /* CRC Control Register (CCR) */
731731      mc6843->CCR = data & 3;
732732      LOG(( "%f $%04x mc6843_w: set CCR to %02X: CRC=%s shift=%i\n",
733            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), data,
733            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), data,
734734            (data & 1) ? "enabled" : "disabled", (data >> 1) & 1 ));
735735      break;
736736
737737   case 7: /* Logical-Track Address Register (LTAR) */
738738      mc6843->LTAR = data & 0x7f;
739739      LOG(( "%f $%04x mc6843_w: set LTAR to %i %02X (actual=%i)\n",
740            attotime_to_double(timer_get_time(machine)), cpu_get_previouspc(space->cpu), mc6843->LTAR, data,
740            attotime_to_double(timer_get_time(space->machine)), cpu_get_previouspc(space->cpu), mc6843->LTAR, data,
741741            floppy_drive_get_current_track( mc6843_floppy_image() ) ));
742742      break;
743743
r3754r3755
807807   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->LTAR );
808808   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->drive );
809809   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->side );
810   state_save_register_item_array( "mc6843", NULL, 0, mc6843->data );
810   state_save_register_item_array( machine, "mc6843", NULL, 0, mc6843->data );
811811   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->data_size );
812812   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->data_idx );
813813   state_save_register_item(machine, "mc6843", NULL, 0, mc6843->data_id );
src/mess/mess.mak
r3754r3755
431431   $(MESSOBJ)/sapi1.a \
432432   $(MESSOBJ)/sharp.a \
433433   $(MESSOBJ)/special.a \
434   $(MESSOBJ)/ut88.a \
435   $(MESSOBJ)/vector06.a \
434   $(MESSOBJ)/sony.a \
435   $(MESSOBJ)/sord.a \
436   $(MESSOBJ)/ssystem3.a \
437   $(MESSOBJ)/super80.a \
438   $(MESSOBJ)/svi.a \
439   $(MESSOBJ)/svision.a \
440   $(MESSOBJ)/synertec.a \
441   $(MESSOBJ)/tangerin.a \
442   $(MESSOBJ)/tatung.a \
443   $(MESSOBJ)/teamconc.a \
444   $(MESSOBJ)/telmac.a \
445   $(MESSOBJ)/ti85.a \
436446   $(MESSOBJ)/tiger.a \
437447   $(MESSOBJ)/trs80.a \
438448   $(MESSOBJ)/tutor.a \
439449   $(MESSOBJ)/tx0.a \
450   $(MESSOBJ)/ut88.a \
440451   $(MESSOBJ)/vc4000.a \
441452   $(MESSOBJ)/veb.a \
453   $(MESSOBJ)/vector06.a \
442454   $(MESSOBJ)/votrax.a \
443455   $(MESSOBJ)/vtech.a \
444456   $(MESSOBJ)/shared.a \
r3754r3755
472484#   $(MESSOBJ)/sega.a \
473485#   $(MESSOBJ)/sgi.a \
474486#   $(MESSOBJ)/sinclair.a \
475#   $(MESSOBJ)/sony.a \
476#   $(MESSOBJ)/sord.a \
477#   $(MESSOBJ)/ssystem3.a \
478#   $(MESSOBJ)/super80.a \
479#   $(MESSOBJ)/svi.a \
480#   $(MESSOBJ)/svision.a \
481#   $(MESSOBJ)/synertec.a \
482#   $(MESSOBJ)/tangerin.a \
483#   $(MESSOBJ)/tatung.a \
484#   $(MESSOBJ)/teamconc.a \
485#   $(MESSOBJ)/telmac.a \
486487#   $(MESSOBJ)/thomson.a \
487#   $(MESSOBJ)/ti85.a \
488488#   $(MESSOBJ)/ti99.a \
489489
490490
src/mess/drivers/svision.c
r3754r3755
122122         svision_irq( space->machine );
123123         break;
124124      default:
125         logerror("%.6f svision read %04x %02x\n", attotime_to_double(timer_get_time(machine)),offset,data);
125         logerror("%.6f svision read %04x %02x\n", attotime_to_double(timer_get_time(space->machine)),offset,data);
126126         break;
127127   }
128128
r3754r3755
142142      case 3:
143143         break;
144144      case 0x26: /* bits 5,6 memory management for a000? */
145         logerror("%.6f svision write %04x %02x\n", attotime_to_double(timer_get_time(machine)),offset,data);
145         logerror("%.6f svision write %04x %02x\n", attotime_to_double(timer_get_time(space->machine)),offset,data);
146146         memory_set_bankptr(space->machine, 1, memory_region(space->machine, "user1") + ((svision_reg[0x26] & 0xe0) << 9));
147147         svision_irq( space->machine );
148148         break;
r3754r3755
155155         else
156156            delay = 256;
157157         timer_enable(svision.timer1, TRUE);
158         timer_reset(svision.timer1, cpu_clocks_to_attotime(machine->cpu[0], value * delay));
158         timer_reset(svision.timer1, cpu_clocks_to_attotime(space->machine->cpu[0], value * delay));
159159         break;
160160      case 0x10: case 0x11: case 0x12: case 0x13:
161161         svision_soundport_w(space->machine, svision_channel + 0, offset & 3, data);
r3754r3755
170170         svision_noise_w(space, offset - 0x28, data);
171171         break;
172172      default:
173         logerror("%.6f svision write %04x %02x\n", attotime_to_double(timer_get_time(machine)), offset, data);
173         logerror("%.6f svision write %04x %02x\n", attotime_to_double(timer_get_time(space->machine)), offset, data);
174174         break;
175175   }
176176}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team