1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_lpt.c,v 1.8 2006/02/09 20:02:59 debug Exp $ |
* $Id: dev_lpt.c,v 1.11 2007/04/20 11:17:24 debug Exp $ |
29 |
* |
* |
30 |
* LPT (parallel printer) controller. |
* LPT (parallel printer) controller. |
31 |
*/ |
*/ |
59 |
}; |
}; |
60 |
|
|
61 |
|
|
62 |
/* |
DEVICE_TICK(lpt) |
|
* dev_lpt_tick(): |
|
|
*/ |
|
|
void dev_lpt_tick(struct cpu *cpu, void *extra) |
|
63 |
{ |
{ |
64 |
/* struct lpt_data *d = extra; */ |
/* struct lpt_data *d = extra; */ |
65 |
|
|
67 |
} |
} |
68 |
|
|
69 |
|
|
|
/* |
|
|
* dev_lpt_access(): |
|
|
*/ |
|
70 |
DEVICE_ACCESS(lpt) |
DEVICE_ACCESS(lpt) |
71 |
{ |
{ |
72 |
uint64_t idata = 0, odata=0; |
uint64_t idata = 0, odata=0; |
140 |
|
|
141 |
memory_device_register(devinit->machine->memory, name, devinit->addr, |
memory_device_register(devinit->machine->memory, name, devinit->addr, |
142 |
DEV_LPT_LENGTH, dev_lpt_access, d, DM_DEFAULT, NULL); |
DEV_LPT_LENGTH, dev_lpt_access, d, DM_DEFAULT, NULL); |
143 |
machine_add_tickfunction(devinit->machine, dev_lpt_tick, d, TICK_SHIFT); |
machine_add_tickfunction(devinit->machine, dev_lpt_tick, d, |
144 |
|
TICK_SHIFT, 0.0); |
145 |
|
|
146 |
/* |
/* |
147 |
* NOTE: Ugly cast into a pointer, because this is a convenient way |
* NOTE: Ugly cast into a pointer, because this is a convenient way |