#if (WITH_HW)
#include "sim-hw.h"
-#define device_io_read_buffer(client, ...) device_io_read_buffer ((device *)(client), __VA_ARGS__)
-#define device_io_write_buffer(client, ...) device_io_write_buffer ((device *)(client), __VA_ARGS__)
#endif
/* "core" module install handler.
address_word addr,
address_word nr_bytes,
unsigned modulo,
-#if WITH_HW
struct hw *device,
-#else
- device *device,
-#endif
void *buffer,
void *free_buffer)
{
address_word addr,
address_word nr_bytes,
unsigned modulo,
-#if WITH_HW
struct hw *client, /*callback/default*/
-#else
- device *client, /*callback/default*/
-#endif
void *buffer, /*raw_memory*/
void *free_buffer) /*raw_memory*/
{
address_word addr,
address_word nr_bytes,
unsigned modulo,
-#if WITH_HW
struct hw *client,
-#else
- device *client,
-#endif
void *optional_buffer)
{
sim_core *memory = STATE_CORE (sd);
0 /*dont-abort*/, NULL, NULL_CIA);
if (mapping == NULL)
break;
-#if (WITH_DEVICES)
- if (mapping->device != NULL)
- {
- int nr_bytes = len - count;
- sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA;
- if (raddr + nr_bytes - 1> mapping->bound)
- nr_bytes = mapping->bound - raddr + 1;
- if (device_io_read_buffer (mapping->device,
- (unsigned_1*)buffer + count,
- mapping->space,
- raddr,
- nr_bytes,
- sd,
- cpu,
- cia) != nr_bytes)
- break;
- count += nr_bytes;
- continue;
- }
-#endif
#if (WITH_HW)
if (mapping->device != NULL)
{
0 /*dont-abort*/, NULL, NULL_CIA);
if (mapping == NULL)
break;
-#if (WITH_DEVICES)
- if (mapping->device != NULL)
- {
- int nr_bytes = len - count;
- sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA;
- if (raddr + nr_bytes - 1 > mapping->bound)
- nr_bytes = mapping->bound - raddr + 1;
- if (device_io_write_buffer (mapping->device,
- (unsigned_1*)buffer + count,
- mapping->space,
- raddr,
- nr_bytes,
- sd,
- cpu,
- cia) != nr_bytes)
- break;
- count += nr_bytes;
- continue;
- }
-#endif
#if (WITH_HW)
if (mapping->device != NULL)
{