trunk/src/emu/cpu/h83002/h8speriph.c
| r21070 | r21071 | |
| 406 | 406 | void h8s_periph_reset(h83xx_state *h8) |
| 407 | 407 | { |
| 408 | 408 | int tpu_max = h8->tpu_max; |
| 409 | | h8->tpu_max = tpu_max; |
| 410 | 409 | if ((h8->device->type() == H8S2241) || (h8->device->type() == H8S2246)) |
| 411 | 410 | { |
| 412 | 411 | memcpy( h8->per_regs, H8S_RESET_H8S_IO_224x, sizeof( h8->per_regs)); |
| r21070 | r21071 | |
| 661 | 660 | |
| 662 | 661 | void h8s_tpu_init(h83xx_state *h8) |
| 663 | 662 | { |
| 664 | | const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655)) ? 6 : 3; |
| 665 | | for (int i = 0; i < tpu_max; i++) |
| 663 | h8->tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655)) ? 6 : 3; |
| 664 | for (int i = 0; i < h8->tpu_max; i++) |
| 666 | 665 | { |
| 667 | 666 | h8->tpu[i].timer = h8->device->machine().scheduler().timer_alloc(FUNC(h8s_tpu_callback), h8); |
| 668 | 667 | h8->tpu[i].timer->adjust(attotime::never, i); |