| Previous | 199869 Revisions | Next |
| r18445 Thursday 11th October, 2012 at 13:32:34 UTC by Miodrag Milanović |
|---|
| changed space_func to delegate (no whatsnew) |
| [src/emu/cpu/g65816] | g65816.c g65816.h g65816cm.h g65816op.h |
| [src/mess/includes] | apple2gs.h |
| [src/mess/machine] | apple2gs.c |
| r18444 | r18445 | |
|---|---|---|
| 412 | 412 | |
| 413 | 413 | |
| 414 | 414 | |
| 415 | void g65816_set_read_vector_callback(device_t *device, read8_ | |
| 415 | void g65816_set_read_vector_callback(device_t *device, read8_delegate read_vector) | |
| 416 | 416 | { |
| 417 | 417 | g65816i_cpu_struct *cpustate = get_safe_token(device); |
| 418 | 418 | READ_VECTOR = read_vector; |
| r18444 | r18445 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | INLINE uint g65816i_read_8_vector(g65816i_cpu_struct *cpustate, uint address) |
| 86 | 86 | { |
| 87 | if (READ_VECTOR) | |
| 87 | if (!READ_VECTOR.isnull()) | |
| 88 | 88 | return READ_VECTOR(*cpustate->program, address, 0xff); |
| 89 | 89 | else |
| 90 | 90 | return g65816i_read_8_normal(cpustate, address); |
| r18444 | r18445 | |
|---|---|---|
| 96 | 96 | device_irq_acknowledge_callback int_ack; /* Interrupt Acknowledge */ |
| 97 | 97 | legacy_cpu_device *device; |
| 98 | 98 | address_space *program; |
| 99 | read8_ | |
| 99 | read8_delegate read_vector; /* Read vector override */ | |
| 100 | 100 | uint stopped; /* Sets how the CPU is stopped */ |
| 101 | 101 | void (*const *opcodes)(g65816i_cpu_struct *cpustate); |
| 102 | 102 | uint (*get_reg)(g65816i_cpu_struct *cpustate, int regnum); |
| r18444 | r18445 | |
|---|---|---|
| 65 | 65 | #define CPU_TYPE_5A22 1 |
| 66 | 66 | |
| 67 | 67 | |
| 68 | void g65816_set_read_vector_callback(device_t *device, read8_ | |
| 68 | void g65816_set_read_vector_callback(device_t *device, read8_delegate read_vector); | |
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | /* ======================================================================== */ |
| r18444 | r18445 | |
|---|---|---|
| 1874 | 1874 | * Driver Init |
| 1875 | 1875 | * ----------------------------------------------------------------------- */ |
| 1876 | 1876 | |
| 1877 | ||
| 1877 | READ8_MEMBER(apple2gs_state::apple2gs_read_vector) | |
| 1878 | 1878 | { |
| 1879 | 1879 | return space.read_byte(offset | 0xFF0000); |
| 1880 | 1880 | } |
| r18444 | r18445 | |
| 1934 | 1934 | apple2_init_common(machine()); |
| 1935 | 1935 | |
| 1936 | 1936 | /* set up Apple IIgs vectoring */ |
| 1937 | g65816_set_read_vector_callback(machine().device("maincpu"), apple2gs_read_vector); | |
| 1937 | g65816_set_read_vector_callback(machine().device("maincpu"), read8_delegate(FUNC(apple2gs_state::apple2gs_read_vector),this)); | |
| 1938 | 1938 | |
| 1939 | 1939 | /* setup globals */ |
| 1940 | 1940 | m_is_rom3 = true; |
| r18444 | r18445 | |
|---|---|---|
| 148 | 148 | DECLARE_WRITE8_MEMBER(a2bus_irq_w); |
| 149 | 149 | DECLARE_WRITE8_MEMBER(a2bus_nmi_w); |
| 150 | 150 | DECLARE_WRITE8_MEMBER(a2bus_inh_w); |
| 151 | DECLARE_READ8_MEMBER(apple2gs_read_vector); | |
| 151 | 152 | }; |
| 152 | 153 | |
| 153 | 154 |
| Previous | 199869 Revisions | Next |