src/mess/video/vic4567.c
| r3911 | r3912 | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | void vic4567_init(running_machine *machine, int pal, int (*dma_read)(running_machine *, int), |
| 50 | | int (*dma_read_color)(running_machine *, int), void (*irq) (int), |
| 51 | | void (*param_port_changed)(int)) |
| 50 | int (*dma_read_color)(running_machine *, int), void (*irq) (running_machine *, int), |
| 51 | void (*param_port_changed)(running_machine *, int)) |
| 52 | 52 | { |
| 53 | 53 | memset(&vic2, 0, sizeof(vic2)); |
| 54 | 54 | |
| r3911 | r3912 | |
| 90 | 90 | if (vic2.port_changed!=NULL) { |
| 91 | 91 | DBG_LOG (2, "vic write", ("%.2x:%.2x\n", offset, data)); |
| 92 | 92 | vic2.reg[offset] = data; |
| 93 | | vic2.port_changed(data); |
| 93 | vic2.port_changed(machine, data); |
| 94 | 94 | } |
| 95 | 95 | break; |
| 96 | 96 | case 0x31: |
src/mess/video/vic4567.h
| r3911 | r3912 | |
| 13 | 13 | extern const unsigned char vic3_palette[0x100 * 3]; |
| 14 | 14 | |
| 15 | 15 | extern void vic4567_init (running_machine *machine, int pal, int (*dma_read)(running_machine *, int), |
| 16 | | int (*dma_read_color)(running_machine *, int), void (*irq)(int), |
| 17 | | void (*param_port_changed)(int)); |
| 16 | int (*dma_read_color)(running_machine *, int), void (*irq)(running_machine *, int), |
| 17 | void (*param_port_changed)(running_machine *, int)); |
| 18 | 18 | |
| 19 | 19 | extern INTERRUPT_GEN( vic3_raster_irq ); |
| 20 | 20 | |
src/mess/video/vic6567.c
| r3911 | r3912 | |
| 197 | 197 | |
| 198 | 198 | int (*dma_read)(running_machine *, int); |
| 199 | 199 | int (*dma_read_color)(running_machine *, int); |
| 200 | | void (*interrupt) (int); |
| 201 | | void (*port_changed)(int); |
| 200 | void (*interrupt) (running_machine *, int); |
| 201 | void (*port_changed)(running_machine *, int); |
| 202 | 202 | |
| 203 | 203 | int lines; |
| 204 | 204 | |
| r3911 | r3912 | |
| 265 | 265 | |
| 266 | 266 | void vic6567_init (int chip_vic2e, int pal, |
| 267 | 267 | int (*dma_read) (running_machine *, int), int (*dma_read_color) (running_machine *, int), |
| 268 | | void (*irq) (int)) |
| 268 | void (*irq) (running_machine *, int)) |
| 269 | 269 | { |
| 270 | 270 | memset(&vic2, 0, sizeof(vic2)); |
| 271 | 271 | |
| r3911 | r3912 | |
| 316 | 316 | { |
| 317 | 317 | DBG_LOG (2, "vic2", ("irq start %.2x\n", mask)); |
| 318 | 318 | vic2.reg[0x19] |= 0x80; |
| 319 | | vic2.interrupt (1); |
| 319 | vic2.interrupt (machine, 1); |
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | vic2.reg[0x19] |= mask; |
| r3911 | r3912 | |
| 329 | 329 | { |
| 330 | 330 | DBG_LOG (2, "vic2", ("irq end %.2x\n", mask)); |
| 331 | 331 | vic2.reg[0x19] &= ~0x80; |
| 332 | | vic2.interrupt (0); |
| 332 | vic2.interrupt (machine, 0); |
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | 335 | |
src/mess/video/vic6567.h
| r3911 | r3912 | |
| 85 | 85 | |
| 86 | 86 | /* call to init videodriver */ |
| 87 | 87 | /* dma_read: videochip fetched 1 byte data from system bus */ |
| 88 | | extern void vic6567_init(int vic2e, int pal, int (*dma_read)(running_machine *, int), int (*dma_read_color)(running_machine *, int), void (*irq)(int)); |
| 88 | extern void vic6567_init(int vic2e, int pal, int (*dma_read)(running_machine *, int), int (*dma_read_color)(running_machine *, int), void (*irq)(running_machine *,int)); |
| 89 | 89 | |
| 90 | 90 | extern void vic2_set_rastering(int onoff); |
| 91 | 91 | |
src/mess/machine/c65.c
| r3911 | r3912 | |
| 6 | 6 | ***************************************************************************/ |
| 7 | 7 | |
| 8 | 8 | #include "driver.h" |
| 9 | | #include "deprecat.h" |
| 10 | 9 | |
| 11 | 10 | #include "cpu/m6502/m6502.h" |
| 12 | 11 | #include "sound/sid6581.h" |
| r3911 | r3912 | |
| 594 | 593 | /* bit 1 external sync enable (genlock) |
| 595 | 594 | bit 2 palette enable |
| 596 | 595 | bit 6 vic3 c65 character set */ |
| 597 | | static void c65_bankswitch_interface(int value) |
| 596 | static void c65_bankswitch_interface(running_machine *machine, int value) |
| 598 | 597 | { |
| 599 | 598 | static int old=0; |
| 600 | | running_machine *machine = Machine; |
| 601 | 599 | read8_space_func rh; |
| 602 | 600 | write8_space_func wh; |
| 603 | 601 | |
| r3911 | r3912 | |
| 844 | 842 | |
| 845 | 843 | c64mode = 0; |
| 846 | 844 | |
| 847 | | c65_bankswitch_interface(0xff); |
| 845 | c65_bankswitch_interface(machine, 0xff); |
| 848 | 846 | c65_bankswitch (machine); |
| 849 | 847 | } |
src/mess/machine/c64.c
| r3911 | r3912 | |
| 352 | 352 | c64_irq (device->machine, level || vicirq); |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | | void c64_vic_interrupt (int level) |
| 355 | void c64_vic_interrupt (running_machine *machine, int level) |
| 356 | 356 | { |
| 357 | | const device_config *cia_0 = device_list_find_by_tag(Machine->config->devicelist, CIA6526R1, "cia_0"); |
| 357 | const device_config *cia_0 = device_list_find_by_tag(machine->config->devicelist, CIA6526R1, "cia_0"); |
| 358 | 358 | #if 1 |
| 359 | 359 | if (level != vicirq) |
| 360 | 360 | { |
| 361 | | c64_irq (Machine, level || cia_get_irq(cia_0)); |
| 361 | c64_irq (machine, level || cia_get_irq(cia_0)); |
| 362 | 362 | vicirq = level; |
| 363 | 363 | } |
| 364 | 364 | #endif |