src/mess/machine/dai.c
| r6745 | r6746 | |
| 144 | 144 | dai_tms5501 = devtag_get_device(machine, "tms5501"); |
| 145 | 145 | |
| 146 | 146 | memory_configure_bank(machine, "bank2", 0, 4, memory_region(machine, "maincpu") + 0x010000, 0x1000); |
| 147 | timer_set(machine, attotime_zero, NULL, 0, dai_bootstrap_callback); |
| 148 | timer_pulse(machine, ATTOTIME_IN_HZ(100),NULL,0,dai_timer); /* timer for tms5501 */ |
| 147 | 149 | } |
| 148 | 150 | |
| 149 | 151 | MACHINE_RESET( dai ) |
| 150 | 152 | { |
| 151 | 153 | memory_set_bankptr(machine, "bank1", messram_get_ptr(devtag_get_device(machine, "messram"))); |
| 152 | | timer_set(machine, attotime_zero, NULL, 0, dai_bootstrap_callback); |
| 153 | | timer_pulse(machine, ATTOTIME_IN_HZ(100),NULL,0,dai_timer); /* timer for tms5501 */ |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /*************************************************************************** |
src/mess/machine/gb.c
| r6745 | r6746 | |
| 292 | 292 | |
| 293 | 293 | gb_sound_w(devtag_get_device(space->machine, "custom"), 0x16, 0x00 ); /* Initialize sound hardware */ |
| 294 | 294 | |
| 295 | | /* Allocate the serial timer, and disable it */ |
| 296 | | gb_driver_data.gb_serial_timer = timer_alloc(machine, gb_serial_timer_proc , NULL); |
| 297 | | timer_enable( gb_driver_data.gb_serial_timer, 0 ); |
| 298 | | |
| 299 | 295 | gb_driver_data.divcount = 0; |
| 300 | 296 | gb_driver_data.triggering_irq = 0; |
| 301 | 297 | gb_driver_data.gb_io[0x07] = 0xF8; /* Upper bits of TIMEFRQ register are set to 1 */ |
| r6745 | r6746 | |
| 304 | 300 | MACHINE_START( gb ) |
| 305 | 301 | { |
| 306 | 302 | add_exit_callback(machine, gb_machine_stop); |
| 303 | |
| 304 | /* Allocate the serial timer, and disable it */ |
| 305 | gb_driver_data.gb_serial_timer = timer_alloc(machine, gb_serial_timer_proc , NULL); |
| 306 | timer_enable( gb_driver_data.gb_serial_timer, 0 ); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | MACHINE_RESET( gb ) |
src/mess/machine/sgi.c
| r6745 | r6746 | |
| 489 | 489 | sgi_mc_update(); |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | void sgi_mc_timer_init(running_machine *machine) |
| 493 | { |
| 494 | tMC_UpdateTimer = timer_alloc(machine, mc_update_callback , NULL); |
| 495 | timer_adjust_periodic(tMC_UpdateTimer, ATTOTIME_IN_HZ(10000), 0, ATTOTIME_IN_HZ(10000)); |
| 496 | } |
| 497 | |
| 492 | 498 | void sgi_mc_init(running_machine *machine) |
| 493 | 499 | { |
| 494 | 500 | nMC_CPUControl0 = 0; |
| r6745 | r6746 | |
| 532 | 538 | nMC_DMAGIO64Addr = 0; |
| 533 | 539 | nMC_DMAMode = 0; |
| 534 | 540 | nMC_DMAZoomByteCnt = 0; |
| 535 | | tMC_UpdateTimer = timer_alloc(machine, mc_update_callback , NULL); |
| 536 | | timer_adjust_periodic(tMC_UpdateTimer, ATTOTIME_IN_HZ(10000), 0, ATTOTIME_IN_HZ(10000)); |
| 537 | 541 | |
| 538 | 542 | // if Indigo2, ID appropriately |
| 539 | 543 | if (!strcmp(machine->gamedrv->name, "ip244415")) |
src/mess/machine/kc.c
| r6745 | r6746 | |
| 896 | 896 | /* head and tail of list is at beginning */ |
| 897 | 897 | keyboard_data.head = (keyboard_data.tail = 0); |
| 898 | 898 | |
| 899 | | /* 50 Hz is just a arbitrary value - used to put scan-codes into the queue for transmitting */ |
| 900 | | timer_pulse(machine, ATTOTIME_IN_HZ(50), NULL, 0, kc_keyboard_update); |
| 901 | | |
| 902 | | /* timer to transmit pulses to kc base unit */ |
| 903 | | timer_pulse(machine, ATTOTIME_IN_USEC(1024), NULL, 0, kc_keyboard_transmit_timer_callback); |
| 904 | | |
| 905 | 899 | /* kc keyboard is not transmitting */ |
| 906 | 900 | keyboard_data.transmit_state = KC_KEYBOARD_TRANSMIT_IDLE; |
| 907 | 901 | |
| r6745 | r6746 | |
| 1797 | 1791 | DEVCB_LINE(kc85_zc2_callback) |
| 1798 | 1792 | }; |
| 1799 | 1793 | |
| 1794 | MACHINE_START(kc85) |
| 1795 | { |
| 1796 | kc_cassette_init(machine); |
| 1797 | |
| 1798 | // from keyboard init |
| 1799 | /* 50 Hz is just a arbitrary value - used to put scan-codes into the queue for transmitting */ |
| 1800 | timer_pulse(machine, ATTOTIME_IN_HZ(50), NULL, 0, kc_keyboard_update); |
| 1801 | |
| 1802 | /* timer to transmit pulses to kc base unit */ |
| 1803 | timer_pulse(machine, ATTOTIME_IN_USEC(1024), NULL, 0, kc_keyboard_transmit_timer_callback); |
| 1804 | |
| 1805 | timer_pulse(machine, ATTOTIME_IN_HZ(15625), (void *)devtag_get_device(machine, "z80ctc"), 0, kc85_15khz_timer_callback); |
| 1806 | timer_set(machine, attotime_zero, NULL, 0, kc85_reset_timer_callback); |
| 1807 | } |
| 1808 | |
| 1800 | 1809 | static void kc85_common_init(running_machine *machine) |
| 1801 | 1810 | { |
| 1802 | | kc_cassette_init(machine); |
| 1803 | 1811 | kc_keyboard_init(machine); |
| 1804 | 1812 | |
| 1805 | 1813 | /* kc85 has a 50 Hz input to the ctc channel 2 and 3 */ |
| r6745 | r6746 | |
| 1809 | 1817 | kc85_50hz_state = 0; |
| 1810 | 1818 | kc85_15khz_state = 0; |
| 1811 | 1819 | kc85_15khz_count = 0; |
| 1812 | | timer_pulse(machine, ATTOTIME_IN_HZ(15625), (void *)devtag_get_device(machine, "z80ctc"), 0, kc85_15khz_timer_callback); |
| 1813 | | timer_set(machine, attotime_zero, NULL, 0, kc85_reset_timer_callback); |
| 1814 | 1820 | kc85_module_system_init(); |
| 1815 | 1821 | } |
| 1816 | 1822 | |
src/mess/drivers/kim1.c
| r6745 | r6746 | |
| 294 | 294 | state_save_register_item(machine, "kim1", NULL, 0, kim1_u2_port_b ); |
| 295 | 295 | state_save_register_item(machine, "kim1", NULL, 0, kim1_311_output ); |
| 296 | 296 | state_save_register_item(machine, "kim1", NULL, 0, kim1_cassette_high_count ); |
| 297 | timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, kim1_update_leds ); |
| 298 | timer_pulse(machine, ATTOTIME_IN_HZ(44100), NULL, 0, kim1_cassette_input ); |
| 297 | 299 | } |
| 298 | 300 | |
| 299 | 301 | |
| r6745 | r6746 | |
| 301 | 303 | { |
| 302 | 304 | int i; |
| 303 | 305 | |
| 304 | | timer_pulse(machine, ATTOTIME_IN_HZ(60), NULL, 0, kim1_update_leds ); |
| 305 | | timer_pulse(machine, ATTOTIME_IN_HZ(44100), NULL, 0, kim1_cassette_input ); |
| 306 | 306 | |
| 307 | 307 | for ( i = 0; i < 6; i++ ) |
| 308 | 308 | { |
src/mess/drivers/bk.c
| r6745 | r6746 | |
| 173 | 173 | MDRV_CPU_ADD("maincpu", T11, 3000000) |
| 174 | 174 | MDRV_CPU_CONFIG(t11_data) |
| 175 | 175 | MDRV_CPU_PROGRAM_MAP(bk0010_mem) |
| 176 | |
| 177 | MDRV_MACHINE_START( bk0010 ) |
| 176 | 178 | MDRV_MACHINE_RESET( bk0010 ) |
| 177 | 179 | |
| 178 | 180 | /* video hardware */ |
| r6745 | r6746 | |
| 200 | 202 | MDRV_CPU_ADD("maincpu", T11, 3000000) |
| 201 | 203 | MDRV_CPU_CONFIG(t11_data) |
| 202 | 204 | MDRV_CPU_PROGRAM_MAP(bk0010fd_mem) |
| 205 | |
| 206 | MDRV_MACHINE_START( bk0010 ) |
| 203 | 207 | MDRV_MACHINE_RESET( bk0010 ) |
| 204 | 208 | |
| 205 | 209 | /* video hardware */ |
| r6745 | r6746 | |
| 258 | 262 | /* Driver */ |
| 259 | 263 | |
| 260 | 264 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 261 | | COMP( 1985, bk0010, 0, 0, bk0010, bk0010, bk0010, 0, "Elektronika", "BK-0010", 0) |
| 262 | | COMP( 1986, bk001001, bk0010, 0, bk0010, bk0010, bk0010, 0, "Elektronika", "BK-0010.01", 0) |
| 263 | | COMP( 1986, bk0010fd, bk0010, 0, bk0010fd, bk0010, bk0010, 0, "Elektronika", "BK-0010 FDD", GAME_NOT_WORKING) |
| 264 | | COMP( 1986, bk0011m, bk0010, 0, bk0010fd, bk0010, bk0010, 0, "Elektronika", "BK-0011M", GAME_NOT_WORKING) |
| 265 | COMP( 1985, bk0010, 0, 0, bk0010, bk0010, 0, 0, "Elektronika", "BK-0010", 0) |
| 266 | COMP( 1986, bk001001, bk0010, 0, bk0010, bk0010, 0, 0, "Elektronika", "BK-0010.01", 0) |
| 267 | COMP( 1986, bk0010fd, bk0010, 0, bk0010fd, bk0010, 0, 0, "Elektronika", "BK-0010 FDD", GAME_NOT_WORKING) |
| 268 | COMP( 1986, bk0011m, bk0010, 0, bk0010fd, bk0010, 0, 0, "Elektronika", "BK-0011M", GAME_NOT_WORKING) |
src/mess/drivers/coleco.c
| r6745 | r6746 | |
| 533 | 533 | static MACHINE_START( coleco ) |
| 534 | 534 | { |
| 535 | 535 | TMS9928A_configure(&tms9928a_interface); |
| 536 | timer_pulse(machine, ATTOTIME_IN_MSEC(20), NULL, 0, paddle_callback); |
| 536 | 537 | } |
| 537 | 538 | |
| 538 | 539 | static MACHINE_RESET( coleco ) |
| r6745 | r6746 | |
| 540 | 541 | last_state = 0; |
| 541 | 542 | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), INPUT_LINE_IRQ0, 0xff); |
| 542 | 543 | memset(&memory_region(machine, "maincpu")[0x6000], 0xff, 0x400); // initialize RAM |
| 543 | | timer_pulse(machine, ATTOTIME_IN_MSEC(20), NULL, 0, paddle_callback); |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | //static int coleco_cart_verify(const UINT8 *cartdata, size_t size) |
src/mess/drivers/busicom.c
| r6745 | r6746 | |
| 190 | 190 | i4004_set_test(cputag_get_cpu(machine, "maincpu"),timer); |
| 191 | 191 | |
| 192 | 192 | } |
| 193 | |
| 194 | static MACHINE_START(busicom) |
| 195 | { |
| 196 | timer_pulse(machine, ATTOTIME_IN_MSEC(28*2), NULL, 0, timer_callback); |
| 197 | } |
| 198 | |
| 193 | 199 | static MACHINE_RESET(busicom) |
| 194 | 200 | { |
| 195 | 201 | int i,j; |
| 196 | 202 | drum_index =0; |
| 197 | 203 | keyboard_shifter = 0; |
| 198 | 204 | printer_shifter = 0; |
| 199 | | timer_pulse(machine, ATTOTIME_IN_MSEC(28*2), NULL, 0, timer_callback); |
| 200 | 205 | |
| 201 | 206 | for(i=0;i<17;i++) { |
| 202 | 207 | for(j=0;j<11;j++) { |
| r6745 | r6746 | |
| 217 | 222 | MDRV_CPU_IO_MAP(busicom_io) |
| 218 | 223 | |
| 219 | 224 | MDRV_MACHINE_RESET(busicom) |
| 225 | MDRV_MACHINE_START(busicom) |
| 220 | 226 | |
| 221 | 227 | /* video hardware */ |
| 222 | 228 | MDRV_SCREEN_ADD("screen", RASTER) |
src/mess/drivers/ip20.c
| r6745 | r6746 | |
| 564 | 564 | timer_set(machine, ATTOTIME_IN_MSEC(1), NULL, 0, ip20_timer); |
| 565 | 565 | } |
| 566 | 566 | |
| 567 | static MACHINE_START( ip204415 ) |
| 568 | { |
| 569 | sgi_mc_timer_init(machine); |
| 570 | } |
| 571 | |
| 567 | 572 | static MACHINE_RESET( ip204415 ) |
| 568 | 573 | { |
| 569 | 574 | wd33c93_init(machine, &scsi_intf); |
| r6745 | r6746 | |
| 598 | 603 | MDRV_CPU_CONFIG( config ) |
| 599 | 604 | MDRV_CPU_PROGRAM_MAP( ip204415_map) |
| 600 | 605 | |
| 606 | MDRV_MACHINE_START( ip204415 ) |
| 601 | 607 | MDRV_MACHINE_RESET( ip204415 ) |
| 602 | 608 | MDRV_NVRAM_HANDLER(93C56) |
| 603 | 609 | |
src/mess/drivers/kc.c
| r6745 | r6746 | |
| 387 | 387 | MDRV_CPU_CONFIG(kc85_daisy_chain) |
| 388 | 388 | MDRV_QUANTUM_TIME(HZ(60)) |
| 389 | 389 | |
| 390 | MDRV_MACHINE_START( kc85 ) |
| 390 | 391 | MDRV_MACHINE_RESET( kc85_3 ) |
| 391 | 392 | |
| 392 | 393 | MDRV_Z80PIO_ADD( "z80pio", kc85_pio_intf ) |
| r6745 | r6746 | |
| 431 | 432 | MDRV_CPU_IO_MAP(kc85_4_io) |
| 432 | 433 | |
| 433 | 434 | MDRV_MACHINE_RESET( kc85_4 ) |
| 435 | |
| 434 | 436 | MDRV_VIDEO_START( kc85_4 ) |
| 435 | 437 | MDRV_VIDEO_UPDATE( kc85_4 ) |
| 436 | 438 | MACHINE_DRIVER_END |
| r6745 | r6746 | |
| 439 | 441 | MDRV_IMPORT_FROM( kc85_4 ) |
| 440 | 442 | MDRV_IMPORT_FROM( cpu_kc_disc ) |
| 441 | 443 | MDRV_QUANTUM_TIME(HZ(120)) |
| 444 | |
| 442 | 445 | MDRV_MACHINE_RESET( kc85_4d ) |
| 443 | 446 | |
| 444 | 447 | MDRV_FLOPPY_4_DRIVES_ADD(kc85_floppy_config) |