25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_disk.c,v 1.7 2005/08/04 10:53:25 debug Exp $ |
* $Id: dev_disk.c,v 1.9 2005/11/13 00:14:08 debug Exp $ |
29 |
* |
* |
30 |
* Basic "Disk" device. This is a simple test device which can be used to |
* Basic "Disk" device. This is a simple test device which can be used to |
31 |
* read and write data from disk devices. |
* read and write data from disk devices. |
83 |
struct disk_data *d = (struct disk_data *) extra; |
struct disk_data *d = (struct disk_data *) extra; |
84 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
85 |
|
|
86 |
idata = memory_readmax64(cpu, data, len); |
if (writeflag == MEM_WRITE) |
87 |
|
idata = memory_readmax64(cpu, data, len); |
88 |
|
|
89 |
switch (relative_addr) { |
switch (relative_addr) { |
90 |
case 0x00: |
case 0x00: |
173 |
|
|
174 |
memory_device_register(devinit->machine->memory, n1, |
memory_device_register(devinit->machine->memory, n1, |
175 |
devinit->addr, 0x4000, dev_disk_access, (void *)d, |
devinit->addr, 0x4000, dev_disk_access, (void *)d, |
176 |
MEM_DEFAULT, NULL); |
DM_DEFAULT, NULL); |
177 |
|
|
178 |
memory_device_register(devinit->machine->memory, n2, |
memory_device_register(devinit->machine->memory, n2, |
179 |
devinit->addr + 0x4000, devinit->machine->arch_pagesize, |
devinit->addr + 0x4000, devinit->machine->arch_pagesize, |
180 |
dev_disk_buf_access, (void *)d, MEM_DYNTRANS_OK | |
dev_disk_buf_access, (void *)d, DM_DYNTRANS_OK | |
181 |
MEM_DYNTRANS_WRITE_OK | MEM_READING_HAS_NO_SIDE_EFFECTS, d->buf); |
DM_DYNTRANS_WRITE_OK | DM_READS_HAVE_NO_SIDE_EFFECTS, d->buf); |
182 |
|
|
183 |
return 1; |
return 1; |
184 |
} |
} |