Previous 199869 Revisions Next

r20136 Wednesday 9th January, 2013 at 01:10:44 UTC by R. Belmont
(MESS) Apollo fixes: [Hans Ostermeyer]
* fixed MLOG: machine -> machine()
* use the correct address space for dma (supplied space parameter is wrong; why?)
* minor fix for 64 Bit Ubuntu
* block_set_filemark() failed to set the filemark buffer; memcpy will now use 64 bit words (i.e. 8 byte chunks) for copying
[src/mess/includes]apollo.h
[src/mess/machine]apollo.c apollo_eth.c sc499.c

trunk/src/mess/machine/sc499.c
r20135r20136
10981098void sc499_device::block_set_filemark()
10991099{
11001100   static const UINT8 fm_pattern[] = {0xDE, 0xAF, 0xFA, 0xED};
1101   int i;
11011102
1102   memcpy(m_ctape_block_buffer, fm_pattern, 4);
1103   memcpy(m_ctape_block_buffer+4, m_ctape_block_buffer, SC499_CTAPE_BLOCK_SIZE-4);
1103   for (i = 0; i < SC499_CTAPE_BLOCK_SIZE; i += 4)
1104   {
1105      memcpy(m_ctape_block_buffer + i, fm_pattern, 4);
1106   }
11041107}
11051108
11061109//**************************************************************************
trunk/src/mess/machine/apollo.c
r20135r20136
435435      offset &= 0x3ff;
436436   }
437437
438   data = space.read_byte(page_offset + offset);
438   data = machine().firstcpu->space(AS_PROGRAM).read_byte(page_offset + offset);
439439
440440   if (VERBOSE > 1 || offset < 4 || (offset & 0xff) == 0 || (offset & 0xff) == 0xff)
441441   {
r20135r20136
455455      offset &= 0x3ff;
456456   }
457457    // FIXME: MSB not available, writing only LSB
458   space.write_byte(page_offset + offset, data);
458   machine().firstcpu->space(AS_PROGRAM).write_byte(page_offset + offset, data);
459459
460460   if (VERBOSE > 1 || offset < 4 || (offset & 0xff) == 0 || (offset & 0xff) == 0xff)
461461   {
r20135r20136
477477      offset = (offset << 1) & 0x3ff;
478478   }
479479
480   data = space.read_byte(page_offset + offset);
480   data = machine().firstcpu->space(AS_PROGRAM).read_byte(page_offset + offset);
481481
482482   SLOG1(("dma read word at offset %x+%03x = %04x", page_offset, offset , data));
483483    // FIXME: MSB will get lost
r20135r20136
501501      offset = (offset << 1) & 0x3ff;
502502   }
503503
504   space.write_byte(page_offset + offset, data);
504   machine().firstcpu->space(AS_PROGRAM).write_byte(page_offset + offset, data);
505505   SLOG1(("dma write word at offset %x+%03x = %02x", page_offset, offset, data));
506506}
507507
r20135r20136
11041104
11051105#if defined(APOLLO_FOR_LINUX)
11061106   device_t *device = (device_t *) ptr;
1107   address_space &space = device->machine().device(MAINCPU)->memory().space(AS_PROGRAM);
11071108   UINT8 data;
11081109
11091110#define SRA 0x01
r20135r20136
12751276// machine/apollo_fdc.c - APOLLO DS3500 Floppy disk controller
12761277//##########################################################################
12771278
1278#undef VERBOSE
1279#define VERBOSE 0
1280
12811279FLOPPY_FORMATS_MEMBER( apollo_state::floppy_formats )
12821280   FLOPPY_APOLLO_FORMAT
12831281FLOPPY_FORMATS_END
trunk/src/mess/machine/apollo_eth.c
r20135r20136
115115   }
116116   else if (packet_len > sizeof(rx_buffer))
117117   {
118      DLOG(("apollo_eth_receive_packet: data size (%d) exceeds rx buffer size (%d)!!!", packet_len, sizeof(rx_buffer)));
118      DLOG(("apollo_eth_receive_packet: data size (%d) exceeds rx buffer size (%d)!!!", packet_len, (int)sizeof(rx_buffer)));
119119      return -1;
120120   }
121121
trunk/src/mess/includes/apollo.h
r20135r20136
3535#define DLOG(x) { logerror ("%s - %s: ", apollo_cpu_context(device->machine().device(MAINCPU)), device->tag()); LOG(x) }
3636#define DLOG1(x) { if (VERBOSE > 0) DLOG(x) }
3737#define DLOG2(x) { if (VERBOSE > 1) DLOG(x) }
38#define MLOG(x)  { logerror ("%s: ", apollo_cpu_context(machine.device(MAINCPU))); LOG(x) }
38#define MLOG(x)  { logerror ("%s: ", apollo_cpu_context(machine().device(MAINCPU))); LOG(x) }
3939#define MLOG1(x) { if (VERBOSE > 0) MLOG(x) }
4040#define MLOG2(x) { if (VERBOSE > 1) MLOG(x) }
4141#define SLOG(x)  { logerror ("%s: ", apollo_cpu_context(&space.device())); LOG(x) }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team