src/mess/machine/mbee.c
| r9401 | r9402 | |
| 513 | 513 | memory_set_bank(machine, "boot", 0); |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | | MACHINE_RESET( mbee ) |
| 516 | static void machine_reset_common(running_machine *machine) |
| 517 | 517 | { |
| 518 | | timer_set(machine, ATTOTIME_IN_USEC(4), NULL, 0, mbee_reset); |
| 519 | | memory_set_bank(machine, "boot", 1); |
| 520 | 518 | mbee_z80pio = machine->device("z80pio"); |
| 521 | 519 | mbee_speaker = machine->device("speaker"); |
| 522 | 520 | mbee_cassette = machine->device("cassette"); |
| 523 | 521 | mbee_printer = machine->device("centronics"); |
| 524 | | mbee_fdc = machine->device("wd179x"); |
| 525 | | //wd17xx_set_pause_time(mbee_fdc, 45); /* default is 40 usec if not set */ |
| 526 | | //wd17xx_set_complete_command_delay(mbee_fdc, 50); /* default is 12 usec if not set */ |
| 527 | 522 | } |
| 528 | 523 | |
| 524 | static void machine_reset_common_disk(running_machine *machine) |
| 525 | { |
| 526 | machine_reset_common(machine); |
| 527 | mbee_fdc = machine->device("fdc"); |
| 528 | /* These values need to be fine tuned or the fdc repaired */ |
| 529 | wd17xx_set_pause_time(mbee_fdc, 45); /* default is 40 usec if not set */ |
| 530 | wd17xx_set_complete_command_delay(mbee_fdc, 50); /* default is 12 usec if not set */ |
| 531 | } |
| 532 | |
| 533 | MACHINE_RESET( mbee ) |
| 534 | { |
| 535 | machine_reset_common(machine); |
| 536 | memory_set_bank(machine, "boot", 1); |
| 537 | timer_set(machine, ATTOTIME_IN_USEC(4), NULL, 0, mbee_reset); |
| 538 | } |
| 539 | |
| 540 | MACHINE_RESET( mbee56 ) |
| 541 | { |
| 542 | machine_reset_common_disk(machine); |
| 543 | memory_set_bank(machine, "boot", 1); |
| 544 | timer_set(machine, ATTOTIME_IN_USEC(4), NULL, 0, mbee_reset); |
| 545 | } |
| 546 | |
| 529 | 547 | MACHINE_RESET( mbee64 ) |
| 530 | 548 | { |
| 549 | machine_reset_common_disk(machine); |
| 531 | 550 | memory_set_bank(machine, "boot", 1); |
| 532 | 551 | memory_set_bank(machine, "bankl", 1); |
| 533 | 552 | memory_set_bank(machine, "bankh", 1); |
| 534 | | mbee_z80pio = machine->device("z80pio"); |
| 535 | | mbee_speaker = machine->device("speaker"); |
| 536 | | mbee_cassette = machine->device("cassette"); |
| 537 | | mbee_printer = machine->device("centronics"); |
| 538 | | mbee_fdc = machine->device("wd179x"); |
| 539 | 553 | } |
| 540 | 554 | |
| 541 | 555 | MACHINE_RESET( mbee128 ) |
| 542 | 556 | { |
| 543 | 557 | address_space *mem = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 544 | | mbee_z80pio = machine->device("z80pio"); |
| 545 | | mbee_speaker = machine->device("speaker"); |
| 546 | | mbee_cassette = machine->device("cassette"); |
| 547 | | mbee_printer = machine->device("centronics"); |
| 548 | | mbee_fdc = machine->device("wd179x"); |
| 558 | machine_reset_common_disk(machine); |
| 549 | 559 | mbee128_50_w(mem,0,0); // set banks to default |
| 550 | 560 | memory_set_bank(machine, "boot", 4); // boot time |
| 551 | 561 | } |
| r9401 | r9402 | |
| 554 | 564 | { |
| 555 | 565 | UINT8 i; |
| 556 | 566 | address_space *mem = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 557 | | mbee_z80pio = machine->device("z80pio"); |
| 558 | | mbee_speaker = machine->device("speaker"); |
| 559 | | mbee_cassette = machine->device("cassette"); |
| 560 | | mbee_printer = machine->device("centronics"); |
| 561 | | mbee_fdc = machine->device("wd179x"); |
| 567 | machine_reset_common_disk(machine); |
| 562 | 568 | mbee_rtc = machine->device<mc146818_device>("rtc"); |
| 563 | 569 | for (i = 0; i < 15; i++) mbee256_was_pressed[i] = 0; |
| 564 | 570 | mbee256_q_pos = 0; |
src/mess/drivers/mbee.c
| r9401 | r9402 | |
| 85 | 85 | - The Monitor program on 256TC crashes the system. This appears |
| 86 | 86 | to be a MAME core bug involving the z80pio. |
| 87 | 87 | |
| 88 | - Disk system doesn't work because of fdc problems. |
| 88 | 89 | |
| 90 | |
| 89 | 91 | ***************************************************************************/ |
| 90 | 92 | |
| 91 | 93 | #include "emu.h" |
| r9401 | r9402 | |
| 245 | 247 | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_READWRITE(mbee_0b_r, mbee_0b_w) |
| 246 | 248 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w) |
| 247 | 249 | AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w) |
| 248 | | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("wd179x", wd17xx_r, wd17xx_w) |
| 250 | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd17xx_r, wd17xx_w) |
| 249 | 251 | AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w) |
| 250 | 252 | ADDRESS_MAP_END |
| 251 | 253 | |
| r9401 | r9402 | |
| 257 | 259 | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_READWRITE(mbee_0b_r, mbee_0b_w) |
| 258 | 260 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w) |
| 259 | 261 | AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w) |
| 260 | | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("wd179x", wd17xx_r, wd17xx_w) |
| 262 | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd17xx_r, wd17xx_w) |
| 261 | 263 | AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w) |
| 262 | 264 | AM_RANGE(0x50, 0x57) AM_WRITE(mbee64_50_w) |
| 263 | 265 | ADDRESS_MAP_END |
| r9401 | r9402 | |
| 271 | 273 | AM_RANGE(0x0c, 0x0c) AM_READWRITE(m6545_status_r, m6545_index_w) |
| 272 | 274 | AM_RANGE(0x0d, 0x0d) AM_READWRITE(m6545_data_r, m6545_data_w) |
| 273 | 275 | AM_RANGE(0x1c, 0x1f) AM_READWRITE(mbeeppc_1c_r,mbee256_1c_w) |
| 274 | | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("wd179x", wd17xx_r, wd17xx_w) |
| 276 | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("fdc", wd17xx_r, wd17xx_w) |
| 275 | 277 | AM_RANGE(0x48, 0x4f) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w) |
| 276 | 278 | AM_RANGE(0x50, 0x57) AM_WRITE(mbee128_50_w) |
| 277 | 279 | ADDRESS_MAP_END |
| r9401 | r9402 | |
| 291 | 293 | // AM_RANGE(0x0010, 0x0013) AM_MIRROR(0xff00) Optional SN76489AN audio chip |
| 292 | 294 | AM_RANGE(0x0018, 0x001b) AM_MIRROR(0xff00) AM_READ(mbee256_18_r) |
| 293 | 295 | AM_RANGE(0x001c, 0x001f) AM_MIRROR(0xff00) AM_READWRITE(mbeeppc_1c_r,mbee256_1c_w) |
| 294 | | AM_RANGE(0x0044, 0x0047) AM_MIRROR(0xff00) AM_DEVREADWRITE("wd179x", wd17xx_r, wd17xx_w) |
| 296 | AM_RANGE(0x0044, 0x0047) AM_MIRROR(0xff00) AM_DEVREADWRITE("fdc", wd17xx_r, wd17xx_w) |
| 295 | 297 | AM_RANGE(0x0048, 0x004f) AM_MIRROR(0xff00) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w) |
| 296 | 298 | AM_RANGE(0x0050, 0x0057) AM_MIRROR(0xff00) AM_WRITE(mbee256_50_w) |
| 297 | 299 | // AM_RANGE(0x0058, 0x005f) AM_MIRROR(0xff00) External options: floppy drive, hard drive and keyboard |
| r9401 | r9402 | |
| 756 | 758 | MDRV_CPU_MODIFY( "maincpu" ) |
| 757 | 759 | MDRV_CPU_PROGRAM_MAP(mbee56_mem) |
| 758 | 760 | MDRV_CPU_IO_MAP(mbee56_io) |
| 759 | | MDRV_WD179X_ADD("wd179x", mbee_wd17xx_interface ) |
| 761 | MDRV_MACHINE_RESET( mbee56 ) |
| 762 | MDRV_WD2793_ADD("fdc", mbee_wd17xx_interface ) |
| 760 | 763 | MDRV_FLOPPY_2_DRIVES_ADD(mbee_floppy_config) |
| 761 | 764 | MACHINE_CONFIG_END |
| 762 | 765 | |
| r9401 | r9402 | |
| 772 | 775 | MDRV_CPU_PROGRAM_MAP(mbee128_mem) |
| 773 | 776 | MDRV_CPU_IO_MAP(mbee128_io) |
| 774 | 777 | MDRV_MACHINE_RESET( mbee128 ) |
| 775 | | MDRV_WD179X_ADD("wd179x", mbee_wd17xx_interface ) |
| 778 | MDRV_WD2793_ADD("fdc", mbee_wd17xx_interface ) |
| 776 | 779 | MDRV_FLOPPY_2_DRIVES_ADD(mbee_floppy_config) |
| 777 | 780 | MACHINE_CONFIG_END |
| 778 | 781 | |