Previous 199869 Revisions Next

r45050 Saturday 20th February, 2016 at 20:40:15 UTC by Roberto Fresca
Merge branch 'master' of https://github.com/mamedev/mame
[src/devices/bus/isa]3c505.cpp 3c505.h omti8621.cpp omti8621.h sc499.cpp sc499.h
[src/mame/video]apollo.cpp

trunk/src/devices/bus/isa/3c505.cpp
r253561r253562
2626#define LOG1(d,x) { if (verbose > 0) LOG(d,x)}
2727#define LOG2(d,x) { if (verbose > 1) LOG(d,x)}
2828
29#define  MAINCPU "maincpu"
30
3129#ifdef LSB_FIRST
3230static UINT16 uint16_to_le(UINT16 value)
3331{
r253561r253562
424422{
425423   static char statebuf[64]; /* string buffer containing state description */
426424
427   device_t *cpu = machine().device(MAINCPU);
425   device_t *cpu = machine().firstcpu;
428426   osd_ticks_t t = osd_ticks();
429427   int s = t / osd_ticks_per_second();
430428   int ms = (t % osd_ticks_per_second()) / 1000;
r253561r253562
442440   return statebuf;
443441}
444442
443/*-------------------------------------------------
444 logerror - log an error message (w/o device tags)
445 -------------------------------------------------*/
446
447void threecom3c505_device::logerror(const char *format, ...) const
448{
449   va_list arg;
450   va_start(arg, format);
451   machine().vlogerror(format, arg);
452   va_end(arg);
453}
454
445455//**************************************************************************
446456//  data_buffer
447457//**************************************************************************
r253561r253562
855865
856866void threecom3c505_device::set_command_pending(int state)
857867{
858   LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s",
859               m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending, state ? "" :"\n"));
868   LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d",
869               m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending));
860870
861871//- verbose = onoff ? 1 : 2;
862872
r253561r253562
16571667
16581668int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length)
16591669{
1660   LOG1(device,("threecom3c505_device::tx_data length=%d", length));
1670   LOG1(this,("threecom3c505_device::tx_data length=%d", length));
16611671   return 1;
16621672}
16631673
trunk/src/devices/bus/isa/3c505.h
r253561r253562
143143   virtual int setfilter(device_t *, int);
144144
145145   const char *cpu_context();
146   void logerror(const char *format, ...) const;
146147
147148   // device-level overrides
148149   virtual void device_start() override;
trunk/src/devices/bus/isa/omti8621.cpp
r253561r253562
7373   virtual void device_reset() override;
7474
7575   void omti_disk_config(UINT16 disk_type);
76
77private:
78   void logerror(const char *format, ...) const;
79
7680public:
7781   UINT16 m_type;
7882   UINT16 m_cylinders;
r253561r253562
685689   memset(disk->m_esdi_defect_list+6, 0xff, 5); // end of defect list
686690}
687691
692/*-------------------------------------------------
693 logerror - log an error message (w/o device tags)
694 -------------------------------------------------*/
695
696void omti8621_device::logerror(const char *format, ...) const
697{
698   va_list arg;
699   va_start(arg, format);
700   machine().vlogerror(format, arg);
701   va_end(arg);
702}
703
688704/***************************************************************************
689705 log_command - log command from a command descriptor block
690706 ***************************************************************************/
r253561r253562
693709{
694710   if (verbose > 0) {
695711      int i;
696      char sb[100];
697      std::string text(cpu_context(this));
698      text += ": OMTI command ";
712      logerror("%s: OMTI command ", cpu_context(this));
699713      switch (cdb[0]) {
700714      case OMTI_CMD_TEST_DRIVE_READY: // 0x00
701         text += "Test Drive Ready";
715         logerror("Test Drive Ready");
702716         break;
703717      case OMTI_CMD_RECALIBRATE: // 0x01
704         text += "Recalibrate";
718         logerror("Recalibrate");
705719         break;
706720      case OMTI_CMD_REQUEST_SENSE: // 0x03
707         text += "Request Sense";
721         logerror("Request Sense");
708722         break;
709723      case OMTI_CMD_READ_VERIFY: // 0x05
710         text += "Read Verify";
724         logerror("Read Verify");
711725         break;
712726      case OMTI_CMD_FORMAT_TRACK: // 0x06
713         text += "Format Track";
727         logerror("Format Track");
714728         break;
715729      case OMTI_CMD_FORMAT_BAD_TRACK: // 0x07
716         text += "Format Bad Track";
730         logerror("Format Bad Track");
717731         break;
718732      case OMTI_CMD_READ: // 0x08
719         text += "Read";
733         logerror("Read");
720734         break;
721735      case OMTI_CMD_WRITE: // 0x0A
722         text += "Write";
736         logerror("Write");
723737         break;
724738      case OMTI_CMD_SEEK: // 0x0B
725         text += "Seek";
739         logerror("Seek");
726740         break;
727741      case OMTI_CMD_READ_SECTOR_BUFFER: // 0x0E
728         text += "Read Sector Buffer";
742         logerror("Read Sector Buffer");
729743         break;
730744      case OMTI_CMD_WRITE_SECTOR_BUFFER: // 0x0F
731         text += "Write Sector Buffer";
745         logerror("Write Sector Buffer");
732746         break;
733747      case OMTI_CMD_ASSIGN_ALTERNATE_TRACK: // 0x11
734         text += "Assign Alternate Track";
748         logerror("Assign Alternate Track");
735749         break;
736750      case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E
737         text += "Read Data to Buffer";
751         logerror("Read Data to Buffer");
738752         break;
739753      case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F
740         text += "Write Data from Buffer";
754         logerror("Write Data from Buffer");
741755         break;
742756      case OMTI_CMD_COPY: // 0x20
743         text += "Copy";
757         logerror("Copy");
744758         break;
745759      case OMTI_CMD_READ_ESDI_DEFECT_LIST: // 0x37
746         text += "Read ESDI Defect List";
760         logerror("Read ESDI Defect List");
747761         break;
748762      case OMTI_CMD_RAM_DIAGNOSTICS: // 0xE0
749         text += "RAM. Diagnostic";
763         logerror("RAM. Diagnostic");
750764         break;
751765      case OMTI_CMD_CONTROLLER_INT_DIAGNOSTIC: // 0xE4
752         text += "Controller Int. Diagnostic";
766         logerror("Controller Int. Diagnostic");
753767         break;
754768      case OMTI_CMD_READ_LONG: // 0xE5
755         text += "Read Long";
769         logerror("Read Long");
756770         break;
757771      case OMTI_CMD_WRITE_LONG: // 0xE6
758         text += "Write Long";
772         logerror("Write Long");
759773         break;
760774      case OMTI_CMD_READ_CONFIGURATION: // 0xEC
761         text += "Read Configuration";
775         logerror("Read Configuration");
762776         break;
763777      case OMTI_CMD_INVALID_COMMAND: // 0xFF
764         text += "Invalid Command";
778         logerror("Invalid Command");
765779         break;
766780      default:
767         text += "!!! Unexpected Command !!!";
781         logerror("!!! Unexpected Command !!!");
768782      }
769783//      logerror(" (%02x, length=%02x)", cdb[0], cdb_length);
770784      for (i = 0; i < cdb_length; i++) {
771         sprintf(sb, " %02x", cdb[i]);
772         text += sb;
785         logerror(" %02x", cdb[i]);
773786      }
774787
775788      switch (cdb[0]) {
r253561r253562
780793      case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E
781794      case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F
782795      case OMTI_CMD_COPY: // 0x20
783         sprintf(sb, " (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]);
784         text += sb;
796         logerror(" (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]);
785797         break;
786798      }
787      text += "\n";
788      logerror(text.c_str());
799      logerror("\n");
789800   }
790801}
791802
r253561r253562
795806
796807void omti8621_device::log_data()
797808{
798   if (verbose > 0)
799   {
809   if (verbose > 0) {
800810      int i;
801      char sb[100];
802      sprintf(sb, "%s: OMTI data (length=%02x)", cpu_context(this),
811      logerror("%s: OMTI data (length=%02x)", cpu_context(this),
803812            data_length);
804      std::string text(sb);
805      for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++)
806      {
807         sprintf(sb, " %02x", data_buffer[i]);
808         text += sb;
813      for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) {
814         logerror(" %02x", data_buffer[i]);
809815      }
810816
811      if (i < data_length)
812      {
813         text += " ...";
817      if (i < data_length) {
818         logerror(" ...");
814819      }
815      text += "\n";
816      logerror(text.c_str());
820      logerror("\n");
817821   }
818822}
819823
r253561r253562
13511355}
13521356
13531357/*-------------------------------------------------
1358 logerror - log an error message (w/o device tags)
1359 -------------------------------------------------*/
1360
1361void omti_disk_image_device::logerror(const char *format, ...) const
1362{
1363   va_list arg;
1364   va_start(arg, format);
1365   machine().vlogerror(format, arg);
1366   va_end(arg);
1367}
1368
1369/*-------------------------------------------------
13541370    device start callback
13551371-------------------------------------------------*/
13561372
trunk/src/devices/bus/isa/omti8621.h
r253561r253562
114114   void copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count, UINT8 lun);
115115   void format_track(const UINT8 * cdb);
116116   void set_esdi_defect_list(UINT8 lun, UINT8 head);
117
118   void logerror(const char *format, ...) const;
119
117120   void log_command(const UINT8 cdb[], const UINT16 cdb_length);
118121   void log_data();
119122   void do_command(const UINT8 cdb[], const UINT16 cdb_length);
trunk/src/devices/bus/isa/sc499.cpp
r253561r253562
409409{
410410   static char statebuf[64]; /* string buffer containing state description */
411411
412   device_t *cpu = machine().firstcpu;
412413   osd_ticks_t t = osd_ticks();
413414   int s = t / osd_ticks_per_second();
414415   int ms = (t % osd_ticks_per_second()) / 1000;
415416
416   sprintf(statebuf, "%d.%03d%s:", s, ms, tag());
417
417   /* if we have an executing CPU, output data */
418   if (cpu != nullptr)
419   {
420      sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
421            cpu->safe_pcbase(), tag());
422   }
423   else
424   {
425      sprintf(statebuf, "%d.%03d", s, ms);
426   }
418427   return statebuf;
419428}
420429
421430/*-------------------------------------------------
431 logerror - log an error message (w/o device tags)
432 -------------------------------------------------*/
433
434void sc499_device::logerror(const char *format, ...) const
435{
436   va_list arg;
437   va_start(arg, format);
438   machine().vlogerror(format, arg);
439   va_end(arg);
440}
441
442/*-------------------------------------------------
422443 tape_status_clear - clear bits in tape status
423444 -------------------------------------------------*/
424445
trunk/src/devices/bus/isa/sc499.h
r253561r253562
8080   virtual void eop_w(int state) override;
8181
8282   const char *cpu_context();
83   void logerror(const char *format, ...) const;
8384
8485   void tape_status_clear(UINT16 value);
8586   void tape_status_set(UINT16 value);
trunk/src/mame/video/apollo.cpp
r253561r253562
17111711   MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
17121712   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
17131713   MCFG_SCREEN_REFRESH_RATE(76)
1714   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(657))
1714   MCFG_SCREEN_RAW_PARAMS(68000000, 1343, 0, 1024, 841, 0, 800)
17151715   MCFG_SCREEN_SIZE(1024, 800)
17161716   MCFG_SCREEN_VISIBLE_AREA(0, 1023, 0, 799)
17171717   MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_15i, screen_update)
r253561r253562
18951895   MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
18961896   MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
18971897   MCFG_SCREEN_REFRESH_RATE(64)
1898   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(616))
1898   MCFG_SCREEN_RAW_PARAMS(120000000, 1728, 0, 1280, 1066, 0, 1024)
18991899   MCFG_SCREEN_SIZE(1280, 1024)
19001900   MCFG_SCREEN_VISIBLE_AREA(0, 1279, 0, 1023)
19011901   MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_19i, screen_update)


Previous 199869 Revisions Next


© 1997-2024 The MAME Team