trunk/src/mame/drivers/su2000.c
| r18040 | r18041 | |
| 81 | 81 | DECLARE_READ8_MEMBER(get_slave_ack); |
| 82 | 82 | virtual void machine_start(); |
| 83 | 83 | virtual void machine_reset(); |
| 84 | DECLARE_READ8_MEMBER(vga_setting); |
| 84 | 85 | }; |
| 85 | 86 | |
| 86 | 87 | |
| r18040 | r18041 | |
| 169 | 170 | * |
| 170 | 171 | *************************************************************/ |
| 171 | 172 | |
| 172 | | static READ8_HANDLER( vga_setting ) |
| 173 | READ8_MEMBER(su2000_state::vga_setting ) |
| 173 | 174 | { |
| 174 | 175 | /* TODO */ |
| 175 | 176 | return 0xff; |
| r18040 | r18041 | |
| 286 | 287 | |
| 287 | 288 | kbdc8042_init(machine(), &at8042); |
| 288 | 289 | |
| 289 | | pc_vga_init(machine(), vga_setting, NULL); |
| 290 | pc_vga_init(machine(), read8_delegate(FUNC(su2000_state::vga_setting),this), NULL); |
| 290 | 291 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 291 | 292 | } |
| 292 | 293 | |
trunk/src/mame/drivers/voyager.c
| r18040 | r18041 | |
| 69 | 69 | DECLARE_DRIVER_INIT(voyager); |
| 70 | 70 | virtual void machine_start(); |
| 71 | 71 | virtual void machine_reset(); |
| 72 | DECLARE_READ8_MEMBER(vga_setting); |
| 72 | 73 | }; |
| 73 | 74 | |
| 74 | 75 | |
| r18040 | r18041 | |
| 650 | 651 | return pic8259_acknowledge( state->m_pic8259_1); |
| 651 | 652 | } |
| 652 | 653 | |
| 653 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 654 | READ8_MEMBER(voyager_state::vga_setting ) { return 0xff; } // hard-code to color |
| 654 | 655 | |
| 655 | 656 | void voyager_state::machine_start() |
| 656 | 657 | { |
| r18040 | r18041 | |
| 800 | 801 | { |
| 801 | 802 | m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4); |
| 802 | 803 | |
| 803 | | pc_vga_init(machine(), vga_setting, NULL); |
| 804 | pc_vga_init(machine(), read8_delegate(FUNC(voyager_state::vga_setting),this), NULL); |
| 804 | 805 | pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 805 | 806 | init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, voyager_set_keyb_int); |
| 806 | 807 | |
trunk/src/mame/drivers/queen.c
| r18040 | r18041 | |
| 636 | 636 | pic8259_ir6_w(drvstate->m_pic8259_2, state); |
| 637 | 637 | } |
| 638 | 638 | |
| 639 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 639 | READ8_MEMBER(queen_state::vga_setting ) { return 0xff; } // hard-code to color |
| 640 | 640 | |
| 641 | 641 | void queen_state::machine_start() |
| 642 | 642 | { |
| r18040 | r18041 | |
| 655 | 655 | intel82439tx_init(machine()); |
| 656 | 656 | |
| 657 | 657 | kbdc8042_init(machine(), &at8042); |
| 658 | | pc_vga_init(machine(), ::vga_setting, NULL); |
| 658 | pc_vga_init(machine(), read8_delegate(FUNC(queen_state::vga_setting),this), NULL); |
| 659 | 659 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 660 | 660 | } |
| 661 | 661 | |
trunk/src/mame/drivers/savquest.c
| r18040 | r18041 | |
| 94 | 94 | DECLARE_WRITE_LINE_MEMBER(savquest_pic8259_1_set_int_line); |
| 95 | 95 | virtual void machine_start(); |
| 96 | 96 | virtual void machine_reset(); |
| 97 | DECLARE_READ8_MEMBER(vga_setting); |
| 97 | 98 | }; |
| 98 | 99 | |
| 99 | 100 | // Intel 82439TX System Controller (MXTC) |
| r18040 | r18041 | |
| 516 | 517 | pic8259_ir6_w(drvstate->m_pic8259_2, state); |
| 517 | 518 | } |
| 518 | 519 | |
| 519 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 520 | READ8_MEMBER(savquest_state::vga_setting ) { return 0xff; } // hard-code to color |
| 520 | 521 | |
| 521 | 522 | void savquest_state::machine_start() |
| 522 | 523 | { |
| r18040 | r18041 | |
| 528 | 529 | intel82439tx_init(machine()); |
| 529 | 530 | |
| 530 | 531 | kbdc8042_init(machine(), &at8042); |
| 531 | | pc_vga_init(machine(), vga_setting, NULL); |
| 532 | pc_vga_init(machine(), read8_delegate(FUNC(savquest_state::vga_setting),this), NULL); |
| 532 | 533 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 533 | 534 | } |
| 534 | 535 | |
trunk/src/mame/drivers/gamtor.c
| r18040 | r18041 | |
| 35 | 35 | : driver_device(mconfig, type, tag){ } |
| 36 | 36 | DECLARE_WRITE32_MEMBER(gamtor_unk_w); |
| 37 | 37 | DECLARE_DRIVER_INIT(gaminator); |
| 38 | DECLARE_READ8_MEMBER(vga_setting); |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | 41 | WRITE32_MEMBER(gaminator_state::gamtor_unk_w) |
| r18040 | r18041 | |
| 1248 | 1249 | ROM_LOAD( "llc_92_5.6-0", 0x0000, 0x2000000, CRC(c8c2a5d3) SHA1(ec23eff63871cc515ec58a894446d4d639d864e4) ) |
| 1249 | 1250 | ROM_END |
| 1250 | 1251 | |
| 1251 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 1252 | READ8_MEMBER(gaminator_state::vga_setting ) { return 0xff; } // hard-code to color |
| 1252 | 1253 | |
| 1253 | 1254 | |
| 1254 | 1255 | DRIVER_INIT_MEMBER(gaminator_state,gaminator) |
| 1255 | 1256 | { |
| 1256 | | pc_vga_init(machine(), vga_setting, NULL); |
| 1257 | pc_vga_init(machine(), read8_delegate(FUNC(gaminator_state::vga_setting),this), NULL); |
| 1257 | 1258 | pc_vga_gamtor_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x44000000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x40000000); |
| 1258 | 1259 | } |
| 1259 | 1260 | |
trunk/src/mame/drivers/photoply.c
| r18040 | r18041 | |
| 53 | 53 | DECLARE_WRITE_LINE_MEMBER(at_pit8254_out2_changed); |
| 54 | 54 | DECLARE_DRIVER_INIT(photoply); |
| 55 | 55 | virtual void machine_start(); |
| 56 | DECLARE_READ8_MEMBER(vga_setting); |
| 56 | 57 | }; |
| 57 | 58 | |
| 58 | 59 | |
| r18040 | r18041 | |
| 335 | 336 | //there's also a 8x16 entry (just after the 8x8) |
| 336 | 337 | GFXDECODE_END |
| 337 | 338 | |
| 338 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 339 | READ8_MEMBER(photoply_state::vga_setting ) { return 0xff; } // hard-code to color |
| 339 | 340 | |
| 340 | 341 | static MACHINE_CONFIG_START( photoply, photoply_state ) |
| 341 | 342 | /* basic machine hardware */ |
| r18040 | r18041 | |
| 377 | 378 | |
| 378 | 379 | DRIVER_INIT_MEMBER(photoply_state,photoply) |
| 379 | 380 | { |
| 380 | | pc_vga_init(machine(), vga_setting, NULL); |
| 381 | pc_vga_init(machine(), read8_delegate(FUNC(photoply_state::vga_setting),this), NULL); |
| 381 | 382 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 382 | 383 | } |
| 383 | 384 | |
trunk/src/mame/drivers/midqslvr.c
| r18040 | r18041 | |
| 98 | 98 | DECLARE_WRITE_LINE_MEMBER(midqslvr_pic8259_1_set_int_line); |
| 99 | 99 | virtual void machine_start(); |
| 100 | 100 | virtual void machine_reset(); |
| 101 | DECLARE_READ8_MEMBER(vga_setting); |
| 101 | 102 | }; |
| 102 | 103 | |
| 103 | 104 | |
| r18040 | r18041 | |
| 652 | 653 | pic8259_ir6_w(drvstate->m_pic8259_2, state); |
| 653 | 654 | } |
| 654 | 655 | |
| 655 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 656 | READ8_MEMBER( midqslvr_state::vga_setting ) { return 0xff; } // hard-code to color |
| 656 | 657 | |
| 657 | 658 | void midqslvr_state::machine_start() |
| 658 | 659 | { |
| r18040 | r18041 | |
| 671 | 672 | intel82439tx_init(machine()); |
| 672 | 673 | |
| 673 | 674 | kbdc8042_init(machine(), &at8042); |
| 674 | | pc_vga_init(machine(), vga_setting, NULL); |
| 675 | pc_vga_init(machine(), read8_delegate(FUNC(midqslvr_state::vga_setting),this), NULL); |
| 675 | 676 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 676 | 677 | } |
| 677 | 678 | |
trunk/src/mame/drivers/calchase.c
| r18040 | r18041 | |
| 175 | 175 | DECLARE_DRIVER_INIT(calchase); |
| 176 | 176 | virtual void machine_start(); |
| 177 | 177 | virtual void machine_reset(); |
| 178 | DECLARE_READ8_MEMBER(vga_setting); |
| 178 | 179 | }; |
| 179 | 180 | |
| 180 | 181 | |
| r18040 | r18041 | |
| 804 | 805 | return pic8259_acknowledge( state->m_pic8259_1); |
| 805 | 806 | } |
| 806 | 807 | |
| 807 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 808 | READ8_MEMBER( calchase_state::vga_setting ) { return 0xff; } // hard-code to color |
| 808 | 809 | |
| 809 | 810 | void calchase_state::machine_start() |
| 810 | 811 | { |
| r18040 | r18041 | |
| 976 | 977 | { |
| 977 | 978 | m_bios_ram = auto_alloc_array(machine(), UINT32, 0x20000/4); |
| 978 | 979 | |
| 979 | | pc_vga_init(machine(), vga_setting, NULL); |
| 980 | pc_vga_init(machine(), read8_delegate(FUNC(calchase_state::vga_setting),this), NULL); |
| 980 | 981 | pc_svga_trident_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 981 | 982 | init_pc_common(machine(), PCCOMMON_KEYBOARD_AT, calchase_set_keyb_int); |
| 982 | 983 | |
trunk/src/mame/drivers/xtom3d.c
| r18040 | r18041 | |
| 115 | 115 | DECLARE_WRITE_LINE_MEMBER(xtom3d_pic8259_1_set_int_line); |
| 116 | 116 | virtual void machine_start(); |
| 117 | 117 | virtual void machine_reset(); |
| 118 | DECLARE_READ8_MEMBER(vga_setting); |
| 118 | 119 | }; |
| 119 | 120 | |
| 120 | 121 | // Intel 82439TX System Controller (MXTC) |
| r18040 | r18041 | |
| 644 | 645 | pic8259_ir6_w(drvstate->m_pic8259_2, state); |
| 645 | 646 | } |
| 646 | 647 | |
| 647 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 648 | READ8_MEMBER(xtom3d_state::vga_setting ) { return 0xff; } // hard-code to color |
| 648 | 649 | |
| 649 | 650 | void xtom3d_state::machine_start() |
| 650 | 651 | { |
| r18040 | r18041 | |
| 663 | 664 | intel82439tx_init(machine()); |
| 664 | 665 | |
| 665 | 666 | kbdc8042_init(machine(), &at8042); |
| 666 | | pc_vga_init(machine(), vga_setting, NULL); |
| 667 | pc_vga_init(machine(), read8_delegate(FUNC(xtom3d_state::vga_setting),this), NULL); |
| 667 | 668 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 668 | 669 | } |
| 669 | 670 | |
trunk/src/mame/drivers/pcat_dyn.c
| r18040 | r18041 | |
| 45 | 45 | |
| 46 | 46 | DECLARE_DRIVER_INIT(pcat_dyn); |
| 47 | 47 | virtual void machine_start(); |
| 48 | DECLARE_READ8_MEMBER(vga_setting); |
| 48 | 49 | }; |
| 49 | 50 | |
| 50 | 51 | |
| r18040 | r18041 | |
| 109 | 110 | pic8259_ir1_w(machine.device("pic8259_1"), state); |
| 110 | 111 | } |
| 111 | 112 | |
| 112 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 113 | READ8_MEMBER(pcat_dyn_state::vga_setting ) { return 0xff; } // hard-code to color |
| 113 | 114 | |
| 114 | 115 | static void set_gate_a20(running_machine &machine, int a20) |
| 115 | 116 | { |
| r18040 | r18041 | |
| 196 | 197 | |
| 197 | 198 | DRIVER_INIT_MEMBER(pcat_dyn_state,pcat_dyn) |
| 198 | 199 | { |
| 199 | | pc_vga_init(machine(), vga_setting, NULL); |
| 200 | pc_vga_init(machine(), read8_delegate(FUNC(pcat_dyn_state::vga_setting),this), NULL); |
| 200 | 201 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 201 | 202 | } |
| 202 | 203 | |
trunk/src/mame/drivers/pcat_nit.c
| r18040 | r18041 | |
| 112 | 112 | DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1); |
| 113 | 113 | DECLARE_DRIVER_INIT(pcat_nit); |
| 114 | 114 | virtual void machine_start(); |
| 115 | DECLARE_READ8_MEMBER(vga_setting); |
| 115 | 116 | }; |
| 116 | 117 | |
| 117 | 118 | WRITE_LINE_MEMBER(pcat_nit_state::microtouch_out) |
| r18040 | r18041 | |
| 227 | 228 | pic8259_ir1_w(machine.device("pic8259_1"), state); |
| 228 | 229 | } |
| 229 | 230 | |
| 230 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 231 | READ8_MEMBER(pcat_nit_state::vga_setting ) { return 0xff; } // hard-code to color |
| 231 | 232 | |
| 232 | 233 | void pcat_nit_state::machine_start() |
| 233 | 234 | { |
| r18040 | r18041 | |
| 426 | 427 | m_banked_nvram = auto_alloc_array(machine(), UINT8, 0x2000); |
| 427 | 428 | machine().device<nvram_device>("nvram")->set_base(m_banked_nvram, 0x2000); |
| 428 | 429 | |
| 429 | | pc_vga_init(machine(), vga_setting, NULL); |
| 430 | pc_vga_init(machine(), read8_delegate(FUNC(pcat_nit_state::vga_setting),this), NULL); |
| 430 | 431 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 431 | 432 | } |
| 432 | 433 | |
trunk/src/mame/drivers/magtouch.c
| r18040 | r18041 | |
| 100 | 100 | DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1); |
| 101 | 101 | DECLARE_DRIVER_INIT(magtouch); |
| 102 | 102 | virtual void machine_start(); |
| 103 | DECLARE_READ8_MEMBER(vga_setting); |
| 103 | 104 | }; |
| 104 | 105 | |
| 105 | 106 | |
| r18040 | r18041 | |
| 196 | 197 | pic8259_ir1_w(machine.device("pic8259_1"), state); |
| 197 | 198 | } |
| 198 | 199 | |
| 199 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 200 | READ8_MEMBER( magtouch_state::vga_setting ) { return 0xff; } // hard-code to color |
| 200 | 201 | |
| 201 | 202 | void magtouch_state::machine_start() |
| 202 | 203 | { |
| r18040 | r18041 | |
| 248 | 249 | |
| 249 | 250 | DRIVER_INIT_MEMBER(magtouch_state,magtouch) |
| 250 | 251 | { |
| 251 | | pc_vga_init(machine(), vga_setting, NULL); |
| 252 | pc_vga_init(machine(), read8_delegate(FUNC(magtouch_state::vga_setting),this), NULL); |
| 252 | 253 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 253 | 254 | } |
| 254 | 255 | |
trunk/src/mame/drivers/pangofun.c
| r18040 | r18041 | |
| 107 | 107 | |
| 108 | 108 | DECLARE_DRIVER_INIT(pangofun); |
| 109 | 109 | virtual void machine_start(); |
| 110 | DECLARE_READ8_MEMBER(vga_setting); |
| 110 | 111 | }; |
| 111 | 112 | |
| 112 | 113 | |
| r18040 | r18041 | |
| 164 | 165 | pic8259_ir1_w(machine.device("pic8259_1"), state); |
| 165 | 166 | } |
| 166 | 167 | |
| 167 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 168 | READ8_MEMBER(pangofun_state::vga_setting ) { return 0xff; } // hard-code to color |
| 168 | 169 | |
| 169 | 170 | static void set_gate_a20(running_machine &machine, int a20) |
| 170 | 171 | { |
| r18040 | r18041 | |
| 243 | 244 | |
| 244 | 245 | DRIVER_INIT_MEMBER(pangofun_state,pangofun) |
| 245 | 246 | { |
| 246 | | pc_vga_init(machine(), vga_setting, NULL); |
| 247 | pc_vga_init(machine(), read8_delegate(FUNC(pangofun_state::vga_setting),this), NULL); |
| 247 | 248 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 248 | 249 | } |
| 249 | 250 | |
trunk/src/mame/drivers/taitowlf.c
| r18040 | r18041 | |
| 83 | 83 | virtual void machine_reset(); |
| 84 | 84 | virtual void palette_init(); |
| 85 | 85 | UINT32 screen_update_taitowlf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 86 | DECLARE_READ8_MEMBER(vga_setting); |
| 86 | 87 | }; |
| 87 | 88 | |
| 88 | 89 | #if !ENABLE_VGA |
| r18040 | r18041 | |
| 696 | 697 | } |
| 697 | 698 | |
| 698 | 699 | #if ENABLE_VGA |
| 699 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 700 | READ8_MEMBER(taitowlf_state::vga_setting ) { return 0xff; } // hard-code to color |
| 700 | 701 | #endif |
| 701 | 702 | |
| 702 | 703 | DRIVER_INIT_MEMBER(taitowlf_state,taitowlf) |
| r18040 | r18041 | |
| 709 | 710 | |
| 710 | 711 | kbdc8042_init(machine(), &at8042); |
| 711 | 712 | #if ENABLE_VGA |
| 712 | | pc_vga_init(machine(), vga_setting, NULL); |
| 713 | pc_vga_init(machine(), read8_delegate(FUNC(taitowlf_state::vga_setting),this), NULL); |
| 713 | 714 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 714 | 715 | #endif |
| 715 | 716 | } |
trunk/src/mame/drivers/pntnpuzl.c
| r18040 | r18041 | |
| 153 | 153 | DECLARE_READ16_MEMBER(pntnpuzl_eeprom_r); |
| 154 | 154 | DECLARE_WRITE16_MEMBER(pntnpuzl_eeprom_w); |
| 155 | 155 | DECLARE_DRIVER_INIT(pip); |
| 156 | DECLARE_READ8_MEMBER(vga_setting); |
| 156 | 157 | }; |
| 157 | 158 | |
| 158 | 159 | |
| r18040 | r18041 | |
| 356 | 357 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) |
| 357 | 358 | INPUT_PORTS_END |
| 358 | 359 | |
| 359 | | static READ8_HANDLER( vga_setting ) { return 0xff; } // hard-code to color |
| 360 | READ8_MEMBER(pntnpuzl_state::vga_setting ) { return 0xff; } // hard-code to color |
| 360 | 361 | |
| 361 | 362 | static MACHINE_CONFIG_START( pntnpuzl, pntnpuzl_state ) |
| 362 | 363 | MCFG_CPU_ADD("maincpu", M68000, 12000000)//?? |
| r18040 | r18041 | |
| 384 | 385 | // UINT16 *rom = (UINT16 *)machine().root_device().memregion("maincpu")->base(); |
| 385 | 386 | // rom[0x2696/2] = 0x4e71; |
| 386 | 387 | // rom[0x26a0/2] = 0x4e71; |
| 387 | | pc_vga_init(machine(), vga_setting, NULL); |
| 388 | pc_vga_init(machine(), read8_delegate(FUNC(pntnpuzl_state::vga_setting),this), NULL); |
| 388 | 389 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x3c0000); |
| 389 | 390 | |
| 390 | 391 | } |
trunk/src/emu/video/pc_vga.c
| r18040 | r18041 | |
| 54 | 54 | |
| 55 | 55 | static struct |
| 56 | 56 | { |
| 57 | | read8_space_func read_dipswitch; |
| 57 | read8_delegate read_dipswitch; |
| 58 | 58 | struct pc_svga_interface svga_intf; |
| 59 | 59 | |
| 60 | 60 | UINT8 *memory; |
| r18040 | r18041 | |
| 1614 | 1614 | switch ((vga.miscellaneous_output>>2)&3) |
| 1615 | 1615 | { |
| 1616 | 1616 | case 3: |
| 1617 | | if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x01) |
| 1617 | if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x01) |
| 1618 | 1618 | data |= 0x10; |
| 1619 | 1619 | break; |
| 1620 | 1620 | case 2: |
| 1621 | | if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x02) |
| 1621 | if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x02) |
| 1622 | 1622 | data |= 0x10; |
| 1623 | 1623 | break; |
| 1624 | 1624 | case 1: |
| 1625 | | if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x04) |
| 1625 | if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x04) |
| 1626 | 1626 | data |= 0x10; |
| 1627 | 1627 | break; |
| 1628 | 1628 | case 0: |
| 1629 | | if (vga.read_dipswitch && vga.read_dipswitch(space, 0, mem_mask) & 0x08) |
| 1629 | if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x08) |
| 1630 | 1630 | data |= 0x10; |
| 1631 | 1631 | break; |
| 1632 | 1632 | } |
| r18040 | r18041 | |
| 2017 | 2017 | } |
| 2018 | 2018 | } |
| 2019 | 2019 | |
| 2020 | | void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf) |
| 2020 | void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf) |
| 2021 | 2021 | { |
| 2022 | 2022 | memset(&vga, 0, sizeof(vga)); |
| 2023 | 2023 | |
trunk/src/emu/video/pc_vga.h
| r18040 | r18041 | |
| 25 | 25 | void (*choosevideomode)(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, const UINT8 *sequencer, const UINT8 *crtc, int *width, int *height); |
| 26 | 26 | }; |
| 27 | 27 | |
| 28 | | void pc_vga_init(running_machine &machine, read8_space_func read_dipswitch, const struct pc_svga_interface *svga_intf); |
| 28 | void pc_vga_init(running_machine &machine, read8_delegate read_dipswitch, const struct pc_svga_interface *svga_intf); |
| 29 | 29 | void pc_vga_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset); |
| 30 | 30 | void pc_vga_gamtor_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset); |
| 31 | 31 | void pc_svga_trident_io_init(running_machine &machine, address_space &mem_space, offs_t mem_offset, address_space &io_space, offs_t port_offset); |
trunk/src/mess/machine/pc.c
| r18040 | r18041 | |
| 1405 | 1405 | mess_init_pc_common(machine(), 0, NULL, pc_set_irq_line); |
| 1406 | 1406 | } |
| 1407 | 1407 | |
| 1408 | | static READ8_HANDLER( input_port_0_r ) { return space.machine().root_device().ioport("IN0")->read(); } |
| 1408 | READ8_MEMBER(pc_state::input_port_0_r ) { return machine().root_device().ioport("IN0")->read(); } |
| 1409 | 1409 | |
| 1410 | 1410 | DRIVER_INIT_MEMBER(pc_state,pc1640) |
| 1411 | 1411 | { |
| r18040 | r18041 | |
| 1421 | 1421 | { |
| 1422 | 1422 | mess_init_pc_common(machine(), PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line); |
| 1423 | 1423 | |
| 1424 | | pc_vga_init(machine(), ::input_port_0_r, NULL); |
| 1424 | pc_vga_init(machine(), read8_delegate(FUNC(pc_state::input_port_0_r),this), NULL); |
| 1425 | 1425 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine().device("maincpu")->memory().space(AS_IO), 0x0000); |
| 1426 | 1426 | } |
| 1427 | 1427 | |
trunk/src/mess/video/isa_vga_ati.c
| r18040 | r18041 | |
| 61 | 61 | //------------------------------------------------- |
| 62 | 62 | // device_start - device-specific startup |
| 63 | 63 | //------------------------------------------------- |
| 64 | | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 64 | READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 65 | 65 | |
| 66 | 66 | void isa16_vga_gfxultra_device::device_start() |
| 67 | 67 | { |
| r18040 | r18041 | |
| 69 | 69 | |
| 70 | 70 | video_start_vga( machine() ); |
| 71 | 71 | |
| 72 | | pc_vga_init(machine(), input_port_0_r, NULL); |
| 72 | pc_vga_init(machine(), read8_delegate(FUNC(isa16_vga_gfxultra_device::input_port_0_r),this), NULL); |
| 73 | 73 | |
| 74 | 74 | int i; |
| 75 | 75 | for (i = 0; i < 0x100; i++) |
trunk/src/mess/video/isa_svga_cirrus.c
| r18040 | r18041 | |
| 58 | 58 | //------------------------------------------------- |
| 59 | 59 | // device_start - device-specific startup |
| 60 | 60 | //------------------------------------------------- |
| 61 | | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 61 | READ8_MEMBER(isa8_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 62 | 62 | |
| 63 | 63 | void isa8_svga_cirrus_device::device_start() |
| 64 | 64 | { |
| r18040 | r18041 | |
| 66 | 66 | |
| 67 | 67 | video_start_vga( machine() ); |
| 68 | 68 | |
| 69 | | pc_vga_init(machine(), input_port_0_r, NULL); |
| 69 | pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_cirrus_device::input_port_0_r),this), NULL); |
| 70 | 70 | |
| 71 | 71 | int i; |
| 72 | 72 | for (i = 0; i < 0x100; i++) |
trunk/src/mess/video/isa_svga_tseng.c
| r18040 | r18041 | |
| 57 | 57 | //------------------------------------------------- |
| 58 | 58 | // device_start - device-specific startup |
| 59 | 59 | //------------------------------------------------- |
| 60 | | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 60 | READ8_MEMBER(isa8_svga_et4k_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 61 | 61 | |
| 62 | 62 | void isa8_svga_et4k_device::device_start() |
| 63 | 63 | { |
| r18040 | r18041 | |
| 65 | 65 | |
| 66 | 66 | video_start_vga( machine() ); |
| 67 | 67 | |
| 68 | | pc_vga_init(machine(), input_port_0_r, NULL); |
| 68 | pc_vga_init(machine(), read8_delegate(FUNC(isa8_svga_et4k_device::input_port_0_r),this), NULL); |
| 69 | 69 | |
| 70 | 70 | int i; |
| 71 | 71 | for (i = 0; i < 0x100; i++) |
trunk/src/mess/video/isa_vga.c
| r18040 | r18041 | |
| 57 | 57 | //------------------------------------------------- |
| 58 | 58 | // device_start - device-specific startup |
| 59 | 59 | //------------------------------------------------- |
| 60 | | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 60 | READ8_MEMBER( isa8_vga_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 61 | 61 | |
| 62 | 62 | void isa8_vga_device::device_start() |
| 63 | 63 | { |
| r18040 | r18041 | |
| 65 | 65 | |
| 66 | 66 | video_start_vga( machine() ); |
| 67 | 67 | |
| 68 | | pc_vga_init(machine(), input_port_0_r, NULL); |
| 68 | pc_vga_init(machine(), read8_delegate(FUNC(isa8_vga_device::input_port_0_r),this), NULL); |
| 69 | 69 | |
| 70 | 70 | int i; |
| 71 | 71 | for (i = 0; i < 0x100; i++) |
trunk/src/mess/video/isa_svga_s3.c
| r18040 | r18041 | |
| 58 | 58 | //------------------------------------------------- |
| 59 | 59 | // device_start - device-specific startup |
| 60 | 60 | //------------------------------------------------- |
| 61 | | static READ8_HANDLER( input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 61 | READ8_MEMBER(isa16_svga_s3_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 62 | 62 | |
| 63 | 63 | void isa16_svga_s3_device::device_start() |
| 64 | 64 | { |
| r18040 | r18041 | |
| 66 | 66 | |
| 67 | 67 | video_start_vga( machine() ); |
| 68 | 68 | |
| 69 | | pc_vga_init(machine(), input_port_0_r, NULL); |
| 69 | pc_vga_init(machine(), read8_delegate(FUNC(isa16_svga_s3_device::input_port_0_r),this), NULL); |
| 70 | 70 | |
| 71 | 71 | int i; |
| 72 | 72 | for (i = 0; i < 0x100; i++) |
trunk/src/mess/drivers/indiana.c
| r18040 | r18041 | |
| 22 | 22 | : driver_device(mconfig, type, tag) { } |
| 23 | 23 | DECLARE_DRIVER_INIT(indiana); |
| 24 | 24 | virtual void machine_reset(); |
| 25 | DECLARE_READ8_MEMBER(indiana_vga_setting); |
| 25 | 26 | }; |
| 26 | 27 | |
| 27 | 28 | |
| r18040 | r18041 | |
| 76 | 77 | MCFG_FRAGMENT_ADD( pcvideo_vga ) |
| 77 | 78 | MACHINE_CONFIG_END |
| 78 | 79 | |
| 79 | | READ8_HANDLER( indiana_vga_setting ) |
| 80 | READ8_MEMBER(indiana_state::indiana_vga_setting) |
| 80 | 81 | { |
| 81 | 82 | return 0xff; // TODO |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | DRIVER_INIT_MEMBER(indiana_state,indiana) |
| 85 | 86 | { |
| 86 | | pc_vga_init(machine(), indiana_vga_setting, NULL); |
| 87 | pc_vga_init(machine(), read8_delegate(FUNC(indiana_state::indiana_vga_setting),this), NULL); |
| 87 | 88 | pc_vga_io_init(machine(), machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f7a0000, machine().device("maincpu")->memory().space(AS_PROGRAM), 0x7f600000); |
| 88 | 89 | } |
| 89 | 90 | |