Previous 199869 Revisions Next

r26136 Wednesday 13th November, 2013 at 14:29:14 UTC by Jürgen Buchmüller
Add legacy style callback for the sector timing to the diablo_hd_device. Initialize the callbacks to the two diablo drives in a2disk
[/branches/alto2/src/emu/cpu/alto2]a2disk.c alto2.c alto2.h
[/branches/alto2/src/emu/machine]diablo_hd.c diablo_hd.h

branches/alto2/src/emu/cpu/alto2/a2disk.c
r26135r26136
9292};
9393
9494#if   ALTO2_DEBUG
95/** @brief human readable names for the KADR<- modes */
95/** @brief human readable names for the KADR modes */
9696static const char *rwc_name[4] = {"read", "check", "write", "write2"};
9797#endif
9898
r26135r26136
973973 * 15, so it counts to 16 on the next rising edge and makes WDDONE' go to 0.
974974 *
975975 * If HIORDBIT is 0 at the falling edge of BITCLK, counting continues as it was
976 * preset with BUS[4] at the last KCOM<- load:
976 * preset with BUS[4] at the last KCOM load:
977977 *
978978 * If BUS[4] was 1, both J and K' of the FF (74109) will be 1 at the rising edge
979 * of LDCOM' (at the end of KCOM<-) and Q will be 1 => LOAD' is deasserted.
979 * of LDCOM' (at the end of KCOM) and Q will be 1 => LOAD' is deasserted.
980980 *
981981 * If BUS[4] was 0, both J and K' will be 0, and Q will be 0 => LOAD' asserted.
982982 *
r26135r26136
10631063      }
10641064      /*
10651065       * Falling edge of BITCLK, counting continues as it was preset
1066       * with BUS[4] (WFFO) at the last KCOM<- load, or as set by a
1066       * with BUS[4] (WFFO) at the last KCOM load, or as set by a
10671067       * 1 bit being read in HIORDBIT.
10681068       */
10691069      if (WFFO) {
10701070         /*
10711071          * If BUS[4] (WFFO) was 1, both J and K' of the FF (74109) will
1072          * be 1 at the rising edge of LDCOM' (at the end of KCOM<-)
1072          * be 1 at the rising edge of LDCOM' (at the end of KCOM)
10731073          * and Q will be 1. LOAD' is deassterted: count on clock.
10741074          */
10751075         m_dsk.bitcount = (m_dsk.bitcount + 1) % 16;
r26135r26136
16041604 *     BUS[9]     SRWRDY' from the Winchester drive
16051605 *     BUS[10]    RDYLAT' (latched READY' at last CLRSTAT, FF 45a output Q)
16061606 *     BUS[11]    SEQERR (latched SEQERR at last CLRSTAT, FF 45b output Q')
1607 * The signals BUS[12,14-15] are just as they were loaded at KSTAT<- time.
1607 * The signals BUS[12,14-15] are just as they were loaded at KSTAT time.
16081608 *     BUS[13]    CHSEMERROR (FF 44b output Q' inverted)
16091609 * </PRE>
16101610 */
r26135r26136
16291629   /* KSTAT[11] latch the latched (FF 45b at CLRSTAT) seqerr status (Q') */
16301630   PUT_KSTAT_DATALATE(m_dsk.kstat, m_dsk.ff_45b & JKFF_Q ? 0 : 1);
16311631
1632   /* KSTAT[13] latch the latched (FF 44b at CLRSTAT/KSTAT<-) checksum status */
1632   /* KSTAT[13] latch the latched (FF 44b at CLRSTAT/KSTAT) checksum status */
16331633   PUT_KSTAT_CKSUM(m_dsk.kstat, m_dsk.ff_44b & JKFF_Q ? 1 : 0);
16341634
16351635   r = m_dsk.kstat;
16361636
1637   LOG((LOG_DISK,1,"   <-KSTAT; BUS &= %#o\n", r));
1637   LOG((LOG_DISK,1,"   KSTAT; BUS &= %#o\n", r));
16381638   LOG((LOG_DISK,2,"      sector:    %d\n", GET_KSTAT_SECTOR(m_dsk.kstat)));
16391639   LOG((LOG_DISK,2,"      done:      %d\n", GET_KSTAT_DONE(m_dsk.kstat)));
16401640   LOG((LOG_DISK,2,"      seekfail:  %d\n", GET_KSTAT_SEEKFAIL(m_dsk.kstat)));
r26135r26136
16611661   UINT16 r;
16621662   /* get the current word from the drive */
16631663   r = m_dsk.datain;
1664   LOG((LOG_DISK,1,"   <-KDATA (%#o)\n", r));
1664   LOG((LOG_DISK,1,"   KDATA (%#o)\n", r));
16651665   m_bus &= r;
16661666}
16671667
r26135r26136
16991699void alto2_cpu_device::f1_load_kstat_1()
17001700{
17011701   int i;
1702   LOG((LOG_DISK,1,"   KSTAT<-; BUS[12-15] %#o\n", m_bus));
1702   LOG((LOG_DISK,1,"   KSTAT; BUS[12-15] %#o\n", m_bus));
17031703   LOG((LOG_DISK,2,"      idle:      %d\n", GET_KSTAT_IDLE(m_bus)));
17041704   LOG((LOG_DISK,2,"      cksum:     %d\n", GET_KSTAT_CKSUM(m_bus)));
17051705   LOG((LOG_DISK,2,"      completion:%d\n", GET_KSTAT_COMPLETION(m_bus)));
r26135r26136
17111711   PUT_KSTAT_COMPLETION(m_dsk.kstat, GET_KSTAT_COMPLETION(m_bus));
17121712
17131713   /* May set the the CKSUM flip-flop 44b
1714    * JK flip-flop 44b (KSTAT<- clocked)
1714    * JK flip-flop 44b (KSTAT clocked)
17151715    * CLK   SYSCLKA'
17161716    * J   !BUS[13]
17171717    * K'   1
17181718    * S'   1
17191719    * C'   CLRSTAT' (not now)
1720    * Q   Q' inverted to BUS[13] on <-KSTAT
1720    * Q   Q' inverted to BUS[13] on KSTAT
17211721    */
17221722   for (i = 0; i < 2; i++) {
17231723      UINT8 s0, s1;
r26135r26136
17501750      PUT_KADDR_DRIVE(m_dsk.kaddr, GET_KADDR_DRIVE(m_bus));
17511751      m_dsk.drive = GET_KADDR_DRIVE(m_dsk.kaddr);
17521752
1753      LOG((LOG_DISK,1,"   KDATA<-; BUS (%#o) (drive:%d restore:%d %d/%d/%02d)\n",
1753      LOG((LOG_DISK,1,"   KDATA; BUS (%#o) (drive:%d restore:%d %d/%d/%02d)\n",
17541754         m_bus,
17551755         GET_KADDR_DRIVE(m_dsk.kaddr),
17561756         GET_KADDR_RESTORE(m_dsk.kaddr),
r26135r26136
17751775      }
17761776#endif
17771777   } else {
1778      LOG((LOG_DISK,1,"   KDATA<-; BUS %#o (%#x)\n", m_bus, m_bus));
1778      LOG((LOG_DISK,1,"   KDATA; BUS %#o (%#x)\n", m_bus, m_bus));
17791779   }
17801780}
17811781
r26135r26136
17921792 * Vcc, BUS[08], BUS[10], BUS[12] go to #36 A,B,C,D
17931793 * Vcc, BUS[09], BUS[11], BUS[13] go to #37 A,B,C,D
17941794 * A is connected to ground on both chips;
1795 * both shifters are loaded with KADR<-
1795 * both shifters are loaded with KADR
17961796 *
17971797 * The QA outputs are #36 -> RECNO(0) and #37 -> RECNO(1)
17981798 *
r26135r26136
18731873      0);
18741874
18751875   /* clears the CKSUM flip-flop 44b
1876    * JK flip-flop 44b (KSTAT<- clocked)
1876    * JK flip-flop 44b (KSTAT clocked)
18771877    * CLK   SYSCLKA' (not used here, just clearing)
1878    * J   1 (BUS[13] during KSTAT<-)
1878    * J   1 (BUS[13] during KSTAT)
18791879    * K'   1
18801880    * S'   1
18811881    * C'   CLRSTAT'
r26135r26136
19531953{
19541954   if (m_dsk.kcom != m_bus) {
19551955      m_dsk.kcom = m_bus;
1956      LOG((LOG_DISK,2,"   KCOM<-; BUS %06o\n", m_dsk.kcom));
1956      LOG((LOG_DISK,2,"   KCOM; BUS %06o\n", m_dsk.kcom));
19571957      LOG((LOG_DISK,2,"      xferoff: %d\n", GET_KCOM_XFEROFF(m_dsk.kcom)));
19581958      LOG((LOG_DISK,2,"      wdinhib: %d\n", GET_KCOM_WDINHIB(m_dsk.kcom)));
19591959      LOG((LOG_DISK,2,"      bclksrc: %d\n", GET_KCOM_BCLKSRC(m_dsk.kcom)));
r26135r26136
19951995   if (dhd)
19961996      dhd->select(unit, head);
19971997
1998   /* On KDAR<- bit 0 of parts #36 and #37 is reset to 0, i.e. recno = 0 */
1998   /* On KDAR bit 0 of parts #36 and #37 is reset to 0, i.e. recno = 0 */
19991999   m_dsk.krecno = 0;
20002000   /* current read/write/check is that for the header */
20012001   m_dsk.krwc = GET_KADR_HEADER(m_dsk.kadr);
20022002
2003   LOG((LOG_DISK,1,"   KADR<-; BUS[8-14] #%o\n", m_dsk.kadr));
2003   LOG((LOG_DISK,1,"   KADR; BUS[8-14] #%o\n", m_dsk.kadr));
20042004   LOG((LOG_DISK,2,"      seal:   %#o\n", GET_KADR_SEAL(m_dsk.kadr)));
20052005   LOG((LOG_DISK,2,"      header: %s\n",  rwc_name[GET_KADR_HEADER(m_dsk.kadr)]));
20062006   LOG((LOG_DISK,2,"      label:  %s\n",  rwc_name[GET_KADR_LABEL(m_dsk.kadr)]));
r26135r26136
20142014/**
20152015 * @brief f2_init late: branch on disk word task active and init
20162016 *
2017 * NEXT <- NEXT OR (WDTASKACT && WDINIT ? 037 : 0)
2017 * NEXT NEXT OR (WDTASKACT && WDINIT ? 037 : 0)
20182018 */
20192019void alto2_cpu_device::f2_init_1()
20202020{
r26135r26136
20272027/**
20282028 * @brief f2_rwc late: branch on read/write/check state of the current record
20292029 * <PRE>
2030 * NEXT <- NEXT OR (current record to be written ? 3 :
2030 * NEXT NEXT OR (current record to be written ? 3 :
20312031 *   current record to be checked ? 2 : 0);
20322032 *
20332033 * NB: note how krecno counts 0,2,3,1 ... etc.
r26135r26136
20822082/**
20832083 * @brief f2_recno late: branch on the current record number by a lookup table
20842084 * <PRE>
2085 * NEXT <- NEXT OR MAP (current record number) where
2085 * NEXT NEXT OR MAP (current record number) where
20862086 *   MAP(0) = 0      (header)
20872087 *   MAP(1) = 2      (label)
20882088 *   MAP(2) = 3      (pageno)
r26135r26136
21022102/**
21032103 * @brief f2_xfrdat late: branch on the data transfer state
21042104 *
2105 * NEXT <- NEXT OR (if current command wants data transfer ? 1 : 0)
2105 * NEXT NEXT OR (if current command wants data transfer ? 1 : 0)
21062106 */
21072107void alto2_cpu_device::f2_xfrdat_1()
21082108{
r26135r26136
21162116/**
21172117 * @brief f2_swrnrdy late: branch on the disk ready signal
21182118 *
2119 * NEXT <- NEXT OR (if disk not ready to accept command ? 1 : 0)
2119 * NEXT NEXT OR (if disk not ready to accept command ? 1 : 0)
21202120 */
21212121void alto2_cpu_device::f2_swrnrdy_1()
21222122{
r26135r26136
21322132/**
21332133 * @brief f2_nfer late: branch on the disk fatal error condition
21342134 *
2135 * NEXT <- NEXT OR (if fatal error in latches ? 0 : 1)
2135 * NEXT NEXT OR (if fatal error in latches ? 0 : 1)
21362136 */
21372137void alto2_cpu_device::f2_nfer_1()
21382138{
r26135r26136
21472147/**
21482148 * @brief f2_strobon late: branch on the seek busy status
21492149 *
2150 * NEXT <- NEXT OR (if seek strobe still on ? 1 : 0)
2150 * NEXT NEXT OR (if seek strobe still on ? 1 : 0)
21512151 * <PRE>
21522152 * The STROBE signal is elongated with the help of two monoflops.
21532153 * The first one has a rather short pulse duration:
r26135r26136
22452245 *
22462246 * @param unit the unit number
22472247 */
2248void alto2_cpu_device::disk_sector_start(int unit)
2248void alto2_cpu_device::next_sector(int unit)
22492249{
22502250   diablo_hd_device* dhd = m_drive[unit];
22512251   if (m_dsk.bitclk_timer) {
r26135r26136
22692269}
22702270
22712271/**
2272 * @brief callback is called by the drive timer whenever a new sector starts
2273 *
2274 * @param unit the unit number
2275 */
2276static void disk_sector_start(void* cookie, int unit)
2277{
2278   alto2_cpu_device* cpu = reinterpret_cast<alto2_cpu_device *>(cookie);
2279   cpu->next_sector(unit);
2280}
2281
2282/**
22722283 * @brief initialize the disk context and insert a disk wort timer
22732284 *
22742285 * @result returns 0 on success, fatal() on error
22752286 */
22762287void alto2_cpu_device::init_disk()
22772288{
2278//   diablo_hd_device* dhd;
2279//   for (int unit = 0; unit < 2; unit++) {
2280//      dhd = m_drive[unit];
2281//      if (!dhd)
2282//         continue;
2283//      dhd->sector_callback(&alto2_cpu_device::disk_sector_start);
2284//   }
2289   diablo_hd_device* dhd;
2290   for (int unit = 0; unit < 2; unit++) {
2291      dhd = m_drive[unit];
2292      if (!dhd)
2293         continue;
2294      dhd->set_sector_callback(this, &disk_sector_start);
2295   }
22852296
22862297   memset(&m_dsk, 0, sizeof(m_dsk));
22872298
branches/alto2/src/emu/cpu/alto2/alto2.c
r26135r26136
139139   m_drive[unit] = ptr;
140140}
141141
142
143142//-------------------------------------------------
144143//  device_rom_region - device-specific (P)ROMs
145144//-------------------------------------------------
branches/alto2/src/emu/cpu/alto2/alto2.h
r26135r26136
218218   //! driver interface to set diablo_hd_device
219219   void set_diablo(int unit, diablo_hd_device* ptr);
220220
221   void next_sector(int unit);
222
221223protected:
222224   //! device-level override for start
223225   virtual void device_start();
r26135r26136
14091411   void f2_nfer_1();                        //!< f2_nfer late: branch on the disk fatal error condition
14101412   void f2_strobon_1();                     //!< f2_strobon late: branch on the seek busy status
14111413   TIMER_CALLBACK_MEMBER( disk_bitclk );         //!< callback to update the disk controller with a new bitclk
1412   void disk_sector_start(int unit);            //!< callback is called by the drive timer whenever a new sector starts
14131414   void init_disk();                        //!< initialize the disk context and insert a disk wort timer
14141415
14151416   // ************************************************
branches/alto2/src/emu/machine/diablo_hd.c
r26135r26136
9494   m_rdlast(-1),
9595   m_wrfirst(-1),
9696   m_wrlast(-1),
97   m_sector_callback_cookie(0),
9798   m_sector_callback(0),
9899   m_sector_timer(0),
99100   m_image(0),
r26135r26136
120121   }
121122}
122123
124void diablo_hd_device::set_sector_callback(void *cookie, void (*callback)(void *, int))
125{
126   m_sector_callback_cookie = cookie;
127   m_sector_callback = callback;
128}
129
123130#if   DIABLO_DEBUG
124131void diablo_hd_device::logprintf(int level, const char* format, ...)
125132{
r26135r26136
382389}
383390
384391/**
385 * @brief Expand a record's checksum word to 32 bits
392 * @brief expand a record's checksum word to 32 bits
386393 *
387394 * @param bits pointer to the sector bits
388395 * @param dst destination offset into bits (bit number)
r26135r26136
402409}
403410
404411/**
405 * @brief Expand a sector into an array of clock and data bits
412 * @brief expand a sector into an array of clock and data bits
406413 *
407414 * @param page page number (0 to DRIVE_PAGES-1)
408415 */
r26135r26136
484491
485492
486493/**
487 * @brief Dump a record's contents
494 * @brief dump a record's contents
488495 *
489496 * @param src pointer to a record (header, label, data)
490497 * @param size size of the record in bytes
r26135r26136
643650}
644651
645652/**
646 * @brief Squeeze a array of clock and data bits into a sector's data
653 * @brief squeeze a array of clock and data bits into a sector's data
654 *
655 * Find and squeeze header, label and data and verify for
656 * zero checksums (starting with 0521)
657 * Write the page back to the media and free the bitmap
647658 */
648659void diablo_hd_device::squeeze_sector()
649660{
r26135r26136
12181229      m_sector_timer->adjust(m_sector_time - m_sector_mark_0_time, 0);
12191230      /* call the sector_callback, if any */
12201231      if (m_sector_callback)
1221         (*m_sector_callback)();
1232         (void)(*m_sector_callback)(m_sector_callback_cookie, m_unit);
12221233   }
12231234}
12241235
12251236/**
1226 * @brief timer callback that deasserts the sector mark
1237 * @brief deassert the sector mark
12271238 *
1228 * @param unit drive unit number
12291239 */
12301240void diablo_hd_device::sector_mark_1()
12311241{
r26135r26136
12351245}
12361246
12371247/**
1238 * @brief timer callback that asserts the sector mark
1248 * @brief assert the sector mark and read the next sector
12391249 *
1240 * @param unit drive unit number
1250 * Assert the sector mark and reset the read and write
1251 * first and last bit indices.
1252 * Increment the sector number, wrap and read the
1253 * next sector from the media.
12411254 */
12421255void diablo_hd_device::sector_mark_0()
12431256{
branches/alto2/src/emu/machine/diablo_hd.h
r26135r26136
2929   diablo_hd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3030   ~diablo_hd_device();
3131
32   void set_sector_callback(void* cookie, void(*callback)(void*, int));
33
3234   int bits_per_sector() const;
3335   const char* description() const;
3436   int unit() const;
r26135r26136
6668   void logprintf(int level, const char* format, ...);
6769#   define   LOG_DRIVE(x) logprintf x
6870
69   void dump_ascii(UINT8 *src, size_t size);
70   size_t dump_record(UINT8 *src, size_t addr, size_t size, const char *name, int cr);
7171#else
7272#   define   LOG_DRIVE(x)
7373#endif
r26135r26136
8383   //! convert a cylinder/head/sector to a logical block address (page)
8484   static inline int DRIVE_PAGE(int c,int h,int s)   { return (c * DIABLO_HEADS + h) * DIABLO_SPT + s; }
8585
86   bool m_diablo31;            //!< true, if this is a DIABLO31 drive
87   int m_unit;                  //!< drive unit number (0 or 1)
88   char m_description[32];         //!< description of the drive(s)
89   int m_packs;               //!< number of packs in drive (1 or 2)
90   attotime m_rotation_time;      //!< rotation time in atto seconds
91   attotime m_sector_time;         //!< sector time in atto seconds
92   attotime m_sector_mark_0_time;   //!< sector mark going 0 before sector pulse time
93   attotime m_sector_mark_1_time;   //!< sector mark going 1 after sector pulse time
94   attotime m_bit_time;         //!< bit time in atto seconds
95   int m_s_r_w_0;               //!< drive seek/read/write signal (active 0)
96   int m_ready_0;               //!< drive ready signal (active 0)
97   int m_sector_mark_0;         //!< sector mark (0 if new sector)
98   int m_addx_acknowledge_0;      //!< address acknowledge, i.e. seek successful (active 0)
99   int m_log_addx_interlock_0;      //!< log address interlock, i.e. seek in progress (active 0)
100   int m_seek_incomplete_0;      //!< seek incomplete, i.e. seek in progress (active 0)
101   int m_egate_0;               //!< erase gate
102   int m_wrgate_0;               //!< write gate
103   int m_rdgate_0;               //!< read gate
104   int m_cylinder;               //!< current cylinder number
105   int m_head;                  //!< current head (track) number on cylinder
106   int m_sector;               //!< current sector number in track
107   int m_page;                  //!< current page
108   int m_pages;               //!< total number of pages
109   UINT8** m_cache;            //!< pages raw bytes
110   UINT32** m_bits;            //!< pages expanded to bits
111   int m_rdfirst;               //!< set to first bit of a sector that is read from
112   int m_rdlast;               //!< set to last bit of a sector that was read from
113   int m_wrfirst;               //!< set to non-zero if a sector is written to
114   int m_wrlast;               //!< set to last bit of a sector that was written to
115   void (*m_sector_callback)();   //!< callback to call at the start of each sector
116   emu_timer* m_sector_timer;      //!< sector timer
117   diablo_image_device* m_image;   //!< diablo_image_device interfacing the CHD
118   chd_file* m_handle;            //!< underlying CHD handle
119   hard_disk_file* m_disk;         //!< underlying hard disk file
86   bool m_diablo31;                  //!< true, if this is a DIABLO31 drive
87   int m_unit;                        //!< drive unit number (0 or 1)
88   char m_description[32];               //!< description of the drive(s)
89   int m_packs;                     //!< number of packs in drive (1 or 2)
90   attotime m_rotation_time;            //!< rotation time in atto seconds
91   attotime m_sector_time;               //!< sector time in atto seconds
92   attotime m_sector_mark_0_time;         //!< sector mark going 0 before sector pulse time
93   attotime m_sector_mark_1_time;         //!< sector mark going 1 after sector pulse time
94   attotime m_bit_time;               //!< bit time in atto seconds
95   int m_s_r_w_0;                     //!< drive seek/read/write signal (active 0)
96   int m_ready_0;                     //!< drive ready signal (active 0)
97   int m_sector_mark_0;               //!< sector mark (0 if new sector)
98   int m_addx_acknowledge_0;            //!< address acknowledge, i.e. seek successful (active 0)
99   int m_log_addx_interlock_0;            //!< log address interlock, i.e. seek in progress (active 0)
100   int m_seek_incomplete_0;            //!< seek incomplete, i.e. seek in progress (active 0)
101   int m_egate_0;                     //!< erase gate
102   int m_wrgate_0;                     //!< write gate
103   int m_rdgate_0;                     //!< read gate
104   int m_cylinder;                     //!< current cylinder number
105   int m_head;                        //!< current head (track) number on cylinder
106   int m_sector;                     //!< current sector number in track
107   int m_page;                        //!< current page
108   int m_pages;                     //!< total number of pages
109   UINT8** m_cache;                  //!< pages raw bytes
110   UINT32** m_bits;                  //!< pages expanded to bits
111   int m_rdfirst;                     //!< set to first bit of a sector that is read from
112   int m_rdlast;                     //!< set to last bit of a sector that was read from
113   int m_wrfirst;                     //!< set to non-zero if a sector is written to
114   int m_wrlast;                     //!< set to last bit of a sector that was written to
115   void *m_sector_callback_cookie;         //!< cookie to pass to callback
116   void (*m_sector_callback)(void*,int);   //!< callback to call at the start of each sector
117   emu_timer* m_sector_timer;            //!< sector timer
118   diablo_image_device* m_image;         //!< diablo_image_device interfacing the CHD
119   chd_file* m_handle;                  //!< underlying CHD handle
120   hard_disk_file* m_disk;               //!< underlying hard disk file
120121
121   void read_sector();            //!< translate C/H/S to a page and read the sector
122   //! translate C/H/S to a page and read the sector
123   void read_sector();
124
125   //! compute the checksum of a record
122126   int cksum(UINT8 *src, size_t size, int start);
127
128   //! expand a series of clock bits and 0 data bits
123129   size_t expand_zeroes(UINT32 *bits, size_t dst, size_t size);
130
131   //! expand a series of 0 words and write a final sync bit
124132   size_t expand_sync(UINT32 *bits, size_t dst, size_t size);
133
134   //! expand a record of words into a array of bits at dst
125135   size_t expand_record(UINT32 *bits, size_t dst, UINT8 *field, size_t size);
136
137   //! expand a record's checksum word to 32 bits
126138   size_t expand_cksum(UINT32 *bits, size_t dst, UINT8 *field, size_t size);
139
140   //! expand a sector into an array of clock and data bits
127141   UINT32* expand_sector();
128142
143#if   DIABLO_DEBUG
144   //! dump a number of words as ASCII characters
145   void dump_ascii(UINT8 *src, size_t size);
146
147   //! dump a record's contents
148   size_t dump_record(UINT8 *src, size_t addr, size_t size, const char *name, int cr);
149#endif
150
151   //! find a sync bit in an array of clock and data bits
129152   size_t squeeze_sync(UINT32 *bits, size_t src, size_t size);
153
154   //! find a 16 x 0 bits sequence in an array of clock and data bits
130155   size_t squeeze_unsync(UINT32 *bits, size_t src, size_t size);
156
157   //! squeeze an array of clock and data bits into a sector's record
131158   size_t squeeze_record(UINT32 *bits, size_t src, UINT8 *field, size_t size);
159
160   //! squeeze an array of 32 clock and data bits into a checksum word
132161   size_t squeeze_cksum(UINT32 *bits, size_t src, int *cksum);
162
163   //! squeeze a array of clock and data bits into a sector's data
133164   void squeeze_sector();
134165
135   void next_sector(void* ptr, int arg);
166   //! timer callback that is called thrice per sector in the rotation
167   TIMER_CALLBACK_MEMBER( next_sector );
168
169   //! deassert the sector mark
136170   void sector_mark_1();
171
172   //! assert the sector mark and read the next sector
137173   void sector_mark_0();
138174};
139175

Previous 199869 Revisions Next


© 1997-2024 The MAME Team