Previous 199869 Revisions Next

r26176 Friday 15th November, 2013 at 17:33:36 UTC by Jürgen Buchmüller
Missed initialinzing the strobon timer. Fix RAM allocation. Fix inverted sector #
[/branches/alto2/src/emu/cpu/alto2]a2disk.c a2mem.c alto2.h
[/branches/alto2/src/emu/machine]diablo_hd.c

branches/alto2/src/emu/machine/diablo_hd.c
r26175r26176
11541154   int bit = 0;
11551155
11561156   if (m_rdgate_0) {
1157      LOG_DRIVE((0,"[DHD]   %s: unit #%d rdgate not asserted\n", __FUNCTION__, m_unit));
1157      LOG_DRIVE((8,"[DHD]   %s: unit #%d rdgate not asserted\n", __FUNCTION__, m_unit));
11581158      return 1;   // read gate is not asserted (active 0)
11591159   }
11601160
branches/alto2/src/emu/cpu/alto2/a2mem.c
r26175r26176
838838   }
839839
840840   // allocate 128KB of main memory
841   m_mem.ram = global_alloc_array(UINT32, ALTO2_RAM_SIZE);
842   m_mem.hpb = global_alloc_array(UINT8,  ALTO2_RAM_SIZE);
841   m_mem.ram = global_alloc_array(UINT32, sizeof(UINT16)*ALTO2_RAM_SIZE);
842   m_mem.hpb = global_alloc_array(UINT8,  sizeof(UINT16)*ALTO2_RAM_SIZE);
843843
844844   /**
845845    * <PRE>
r26175r26176
892892
893893#if   ALTO2_HAMMING_CHECK
894894   // Initialize the hamming codes and parity bit
895   for (UINT32 addr = 0; addr < ALTO2_IO_PAGE_BASE; addr++)
896      hamming_code(1, addr, m_mem.ram[addr]);
895   for (UINT32 addr = 0; addr < ALTO2_IO_PAGE_BASE; addr++) {
896      hamming_code(1, addr, 0);
897      hamming_code(1, 0200000 + addr, 0);
898   }
897899#endif
898900}
branches/alto2/src/emu/cpu/alto2/a2disk.c
r26175r26176
22992299#endif
23002300
23012301   /* KSTAT[0-3] update the current sector in the kstat field */
2302   PUT_KSTAT_SECTOR(m_dsk.kstat, dhd->get_sector());
2302   PUT_KSTAT_SECTOR(m_dsk.kstat, dhd->get_sector() ^ 017);
23032303
23042304   /* clear input and output shift registers (?) */
23052305   m_dsk.shiftin = 0;
r26175r26176
23692369   m_dsk.bitclk_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_bitclk),this));
23702370#endif
23712371
2372   m_dsk.strobon_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_strobon),this));
2373   m_dsk.strobon_timer->adjust(attotime::from_nsec(TW_STROBON));
2374
23722375   m_dsk.seclate_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(alto2_cpu_device::disk_seclate),this));
23732376   m_dsk.seclate_timer->adjust(attotime::from_nsec(TW_SECLATE), 1);
23742377
branches/alto2/src/emu/cpu/alto2/alto2.h
r26175r26176
14041404#else
14051405      int bitclk_time;            //!< time in clocks per bit
14061406#endif
1407      UINT8 sect4;               //!< current sector_mark_0 (aka SECT[4]) from the drive
14081407      UINT8 datin;               //!< current datin from the drive
14091408      UINT8 bitcount;               //!< bit counter
14101409      UINT8 carry;               //!< carry output of the bitcounter

Previous 199869 Revisions Next


© 1997-2024 The MAME Team