src/mess/machine/ondra.c
| r3722 | r3723 | |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "cpu/z80/z80.h" |
| 12 | #include "devices/cassette.h" |
| 12 | 13 | #include "includes/ondra.h" |
| 13 | 14 | |
| 14 | 15 | |
| r3722 | r3723 | |
| 18 | 19 | memset(mess_ram,0,64*1024); |
| 19 | 20 | } |
| 20 | 21 | |
| 21 | | static UINT8 ondra_video_enable; |
| 22 | static const device_config *cassette_device_image(running_machine *machine) |
| 23 | { |
| 24 | return devtag_get_device(machine, CASSETTE, "cassette"); |
| 25 | } |
| 26 | |
| 22 | 27 | static UINT8 ondra_bank1_status; |
| 23 | 28 | static UINT8 ondra_bank2_status; |
| 24 | 29 | |
| 30 | READ8_HANDLER( ondra_keyboard_r ) |
| 31 | { |
| 32 | UINT8 retVal = 0x00; |
| 33 | UINT8 ondra_keyboard_line = offset & 0x000f; |
| 34 | static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", "LINE5", "LINE6", "LINE7", "LINE8", "LINE9" }; |
| 35 | double valcas = cassette_input(cassette_device_image(space->machine)); |
| 36 | if ( valcas < 0.00) { |
| 37 | retVal = 0x80; |
| 38 | } |
| 39 | if (ondra_keyboard_line > 9) { |
| 40 | retVal |= 0x1f; |
| 41 | } else { |
| 42 | retVal |= input_port_read(space->machine, keynames[ondra_keyboard_line]); |
| 43 | } |
| 44 | return retVal; |
| 45 | } |
| 46 | |
| 25 | 47 | static void ondra_update_banks(running_machine *machine) |
| 26 | 48 | { |
| 27 | 49 | UINT8 *mem = memory_region(machine, "main"); |
| 28 | 50 | if (ondra_bank1_status==0) { |
| 29 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x07ff, 0, 0, SMH_UNMAP); |
| 30 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0800, 0x0fff, 0, 0, SMH_UNMAP); |
| 31 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1000, 0x17ff, 0, 0, SMH_UNMAP); |
| 32 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1800, 0x1fff, 0, 0, SMH_UNMAP); |
| 33 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2000, 0x27ff, 0, 0, SMH_UNMAP); |
| 34 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2800, 0x2fff, 0, 0, SMH_UNMAP); |
| 35 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3000, 0x37ff, 0, 0, SMH_UNMAP); |
| 36 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3800, 0x3fff, 0, 0, SMH_UNMAP); |
| 37 | | |
| 51 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, SMH_UNMAP); |
| 38 | 52 | memory_set_bankptr(machine, 1, mem + 0x010000); |
| 39 | | memory_set_bankptr(machine, 2, mem + 0x010000); |
| 40 | | memory_set_bankptr(machine, 3, mem + 0x010000); |
| 41 | | memory_set_bankptr(machine, 4, mem + 0x010000); |
| 42 | | memory_set_bankptr(machine, 5, mem + 0x010800); |
| 43 | | memory_set_bankptr(machine, 6, mem + 0x010800); |
| 44 | | memory_set_bankptr(machine, 7, mem + 0x010800); |
| 45 | | memory_set_bankptr(machine, 8, mem + 0x010800); |
| 46 | 53 | } else { |
| 47 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x07ff, 0, 0, SMH_BANK1); |
| 48 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0800, 0x0fff, 0, 0, SMH_BANK2); |
| 49 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1000, 0x17ff, 0, 0, SMH_BANK3); |
| 50 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x1800, 0x1fff, 0, 0, SMH_BANK4); |
| 51 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2000, 0x27ff, 0, 0, SMH_BANK5); |
| 52 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x2800, 0x2fff, 0, 0, SMH_BANK6); |
| 53 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3000, 0x37ff, 0, 0, SMH_BANK7); |
| 54 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x3800, 0x3fff, 0, 0, SMH_BANK8); |
| 55 | | |
| 54 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, SMH_BANK1); |
| 56 | 55 | memory_set_bankptr(machine, 1, mess_ram + 0x0000); |
| 57 | | memory_set_bankptr(machine, 2, mess_ram + 0x0800); |
| 58 | | memory_set_bankptr(machine, 3, mess_ram + 0x1000); |
| 59 | | memory_set_bankptr(machine, 4, mess_ram + 0x1800); |
| 60 | | memory_set_bankptr(machine, 5, mess_ram + 0x2000); |
| 61 | | memory_set_bankptr(machine, 6, mess_ram + 0x2800); |
| 62 | | memory_set_bankptr(machine, 7, mess_ram + 0x3000); |
| 63 | | memory_set_bankptr(machine, 8, mess_ram + 0x3800); |
| 64 | 56 | } |
| 65 | | memory_set_bankptr(machine, 9, mess_ram + 0x4000); |
| 57 | memory_set_bankptr(machine, 2, mess_ram + 0x4000); |
| 66 | 58 | if (ondra_bank2_status==0) { |
| 67 | | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_BANK10); |
| 68 | | memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_BANK10); |
| 69 | | memory_set_bankptr(machine, 10, mess_ram + 0xe000); |
| 59 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_BANK3); |
| 60 | memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_BANK3); |
| 61 | memory_set_bankptr(machine, 3, mess_ram + 0xe000); |
| 70 | 62 | } else { |
| 71 | 63 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_UNMAP); |
| 72 | | memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, SMH_UNMAP); |
| 64 | memory_install_read8_handler (cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000, 0xffff, 0, 0, ondra_keyboard_r); |
| 73 | 65 | } |
| 74 | 66 | } |
| 75 | 67 | |
| r3722 | r3723 | |
| 79 | 71 | ondra_bank1_status = (data >> 1) & 1; |
| 80 | 72 | ondra_bank2_status = (data >> 2) & 1; |
| 81 | 73 | ondra_update_banks(space->machine); |
| 74 | cassette_output(cassette_device_image(space->machine), ((data >> 3) & 1) ? -1.0 : +1.0); |
| 82 | 75 | } |
| 83 | 76 | |
| 84 | 77 | WRITE8_HANDLER( ondra_port_09_w ) |
| 85 | 78 | { |
| 86 | | |
| 87 | 79 | } |
| 88 | 80 | |
| 89 | 81 | WRITE8_HANDLER( ondra_port_0a_w ) |
| 90 | 82 | { |
| 91 | 83 | } |
| 92 | 84 | |
| 85 | static TIMER_CALLBACK(nmi_check_callback) |
| 86 | { |
| 87 | if ((input_port_read(machine, "NMI") & 1)==1) { |
| 88 | cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE); |
| 89 | } |
| 90 | } |
| 93 | 91 | |
| 94 | 92 | MACHINE_RESET( ondra ) |
| 95 | 93 | { |
| 96 | 94 | ondra_bank1_status = 0; |
| 97 | 95 | ondra_bank2_status = 0; |
| 98 | 96 | ondra_update_banks(machine); |
| 97 | |
| 98 | timer_pulse(ATTOTIME_IN_HZ(10), NULL, 0, nmi_check_callback); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | MACHINE_START(ondra) |
src/mess/drivers/ondra.c
| r3722 | r3723 | |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | 11 | #include "cpu/z80/z80.h" |
| 12 | #include "devices/cassette.h" |
| 12 | 13 | #include "includes/ondra.h" |
| 13 | 14 | |
| 14 | | |
| 15 | 15 | /* Address maps */ |
| 16 | 16 | static ADDRESS_MAP_START(ondra_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 17 | | AM_RANGE(0x0000, 0x07ff) AM_RAMBANK(1) |
| 18 | | AM_RANGE(0x0800, 0x0fff) AM_RAMBANK(2) |
| 19 | | AM_RANGE(0x1000, 0x17ff) AM_RAMBANK(3) |
| 20 | | AM_RANGE(0x1800, 0x1fff) AM_RAMBANK(4) |
| 21 | | AM_RANGE(0x2000, 0x27ff) AM_RAMBANK(5) |
| 22 | | AM_RANGE(0x2800, 0x2fff) AM_RAMBANK(6) |
| 23 | | AM_RANGE(0x3000, 0x37ff) AM_RAMBANK(7) |
| 24 | | AM_RANGE(0x3800, 0x3fff) AM_RAMBANK(8) |
| 25 | | AM_RANGE(0x4000, 0xdfff) AM_RAMBANK(9) |
| 26 | | AM_RANGE(0xe000, 0xffff) AM_RAMBANK(10) |
| 17 | AM_RANGE(0x0000, 0x3fff) AM_RAMBANK(1) |
| 18 | AM_RANGE(0x4000, 0xdfff) AM_RAMBANK(2) |
| 19 | AM_RANGE(0xe000, 0xffff) AM_RAMBANK(3) |
| 27 | 20 | ADDRESS_MAP_END |
| 28 | 21 | |
| 29 | 22 | static ADDRESS_MAP_START( ondra_io, ADDRESS_SPACE_IO, 8 ) |
| 30 | 23 | ADDRESS_MAP_GLOBAL_MASK(0x0b) |
| 31 | 24 | ADDRESS_MAP_UNMAP_HIGH |
| 32 | 25 | AM_RANGE(0x03, 0x03) AM_WRITE(ondra_port_03_w) |
| 33 | | AM_RANGE(0x09, 0x09) AM_WRITE(ondra_port_09_w) |
| 34 | | AM_RANGE(0x0a, 0x0a) AM_WRITE(ondra_port_0a_w) |
| 26 | //AM_RANGE(0x09, 0x09) AM_WRITE(ondra_port_09_w) |
| 27 | //AM_RANGE(0x0a, 0x0a) AM_WRITE(ondra_port_0a_w) |
| 35 | 28 | ADDRESS_MAP_END |
| 36 | 29 | |
| 37 | 30 | /* Input ports */ |
| 38 | 31 | static INPUT_PORTS_START( ondra ) |
| 32 | PORT_START("LINE0") |
| 33 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 34 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 35 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 36 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 37 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 38 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 39 | PORT_START("LINE1") |
| 40 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 41 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 42 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 43 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 44 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 45 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 46 | PORT_START("LINE2") |
| 47 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 48 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 49 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 50 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 51 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) |
| 52 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 53 | PORT_START("LINE3") |
| 54 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 55 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 56 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 57 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 58 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) |
| 59 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 60 | PORT_START("LINE4") |
| 61 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 62 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0-9") PORT_CODE(KEYCODE_RALT) |
| 63 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CS") PORT_CODE(KEYCODE_LALT) |
| 64 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 65 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("UpCase") PORT_CODE(KEYCODE_LSHIFT) |
| 66 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 67 | PORT_START("LINE5") |
| 68 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 69 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 70 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 71 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 72 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) |
| 73 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 74 | PORT_START("LINE6") |
| 75 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 76 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 77 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 78 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) |
| 79 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 80 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 81 | PORT_START("LINE7") |
| 82 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 83 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 84 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 85 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 86 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 87 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 88 | PORT_START("LINE8") |
| 89 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 90 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 91 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 92 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 93 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 94 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 95 | PORT_START("LINE9") |
| 96 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1) |
| 97 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(JOYCODE_X_LEFT_SWITCH) PORT_PLAYER(1) |
| 98 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(JOYCODE_Y_UP_SWITCH) PORT_PLAYER(1) |
| 99 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(1) |
| 100 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT)PORT_CODE(KEYCODE_6_PAD) PORT_CODE(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1) |
| 101 | PORT_BIT(0xE0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 102 | PORT_START("NMI") |
| 103 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_ESC) |
| 39 | 104 | INPUT_PORTS_END |
| 40 | 105 | |
| 106 | INTERRUPT_GEN( ondra_interrupt ) |
| 107 | { |
| 108 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 109 | } |
| 110 | |
| 111 | static const cassette_config ondra_cassette_config = |
| 112 | { |
| 113 | cassette_default_formats, |
| 114 | NULL, |
| 115 | CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED |
| 116 | }; |
| 117 | |
| 41 | 118 | /* Machine driver */ |
| 42 | 119 | static MACHINE_DRIVER_START( ondra ) |
| 43 | | /* basic machine hardware */ |
| 44 | | MDRV_CPU_ADD("main", Z80, 2000000) |
| 45 | | MDRV_CPU_PROGRAM_MAP(ondra_mem, 0) |
| 46 | | MDRV_CPU_IO_MAP(ondra_io, 0) |
| 120 | /* basic machine hardware */ |
| 121 | MDRV_CPU_ADD("main", Z80, 2000000) |
| 122 | MDRV_CPU_PROGRAM_MAP(ondra_mem, 0) |
| 123 | MDRV_CPU_IO_MAP(ondra_io, 0) |
| 124 | MDRV_CPU_VBLANK_INT("main", ondra_interrupt) |
| 125 | |
| 126 | MDRV_MACHINE_START( ondra ) |
| 127 | MDRV_MACHINE_RESET( ondra ) |
| 47 | 128 | |
| 48 | | MDRV_MACHINE_START( ondra ) |
| 49 | | MDRV_MACHINE_RESET( ondra ) |
| 50 | | |
| 51 | 129 | /* video hardware */ |
| 52 | | MDRV_SCREEN_ADD("main", RASTER) |
| 53 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 54 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 55 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 56 | | MDRV_SCREEN_SIZE(320, 256) |
| 57 | | MDRV_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1) |
| 58 | | MDRV_PALETTE_LENGTH(2) |
| 59 | | MDRV_PALETTE_INIT(black_and_white) |
| 130 | MDRV_SCREEN_ADD("main", RASTER) |
| 131 | MDRV_SCREEN_REFRESH_RATE(50) |
| 132 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 133 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 134 | MDRV_SCREEN_SIZE(320, 256) |
| 135 | MDRV_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1) |
| 136 | MDRV_PALETTE_LENGTH(2) |
| 137 | MDRV_PALETTE_INIT(black_and_white) |
| 60 | 138 | |
| 61 | | |
| 62 | | MDRV_VIDEO_START(ondra) |
| 139 | MDRV_VIDEO_START(ondra) |
| 63 | 140 | MDRV_VIDEO_UPDATE(ondra) |
| 141 | |
| 142 | // sound hardware |
| 143 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 144 | MDRV_SOUND_ADD("cassette", WAVE, 0) |
| 145 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 146 | |
| 147 | MDRV_CASSETTE_ADD( "cassette", ondra_cassette_config ) |
| 64 | 148 | MACHINE_DRIVER_END |
| 65 | 149 | |
| 66 | 150 | static SYSTEM_CONFIG_START(ondra) |
| r3722 | r3723 | |
| 70 | 154 | /* ROM definition */ |
| 71 | 155 | |
| 72 | 156 | ROM_START( ondrat ) |
| 73 | | ROM_REGION( 0x11000, "main", ROMREGION_ERASEFF ) |
| 157 | ROM_REGION( 0x14000, "main", ROMREGION_ERASEFF ) |
| 74 | 158 | ROM_LOAD( "tesla_a.rom", 0x10000, 0x0800, CRC(6d56b815) SHA1(7feb4071d5142e4c2f891747b75fa4d48ccad262) ) |
| 75 | | ROM_LOAD( "tesla_b.rom", 0x10800, 0x0800, CRC(5f145eaa) SHA1(c1eac68b13fedc4d0d6f98b15e2a5397f0139dc3) ) |
| 159 | ROM_COPY( "main", 0x10000, 0x10800, 0x0800 ) |
| 160 | ROM_COPY( "main", 0x10000, 0x11000, 0x0800 ) |
| 161 | ROM_COPY( "main", 0x10000, 0x11800, 0x0800 ) |
| 162 | ROM_LOAD( "tesla_b.rom", 0x12000, 0x0800, CRC(5f145eaa) SHA1(c1eac68b13fedc4d0d6f98b15e2a5397f0139dc3) ) |
| 163 | ROM_COPY( "main", 0x10000, 0x12800, 0x0800 ) |
| 164 | ROM_COPY( "main", 0x10000, 0x13000, 0x0800 ) |
| 165 | ROM_COPY( "main", 0x10000, 0x13800, 0x0800 ) |
| 76 | 166 | ROM_END |
| 77 | 167 | |
| 78 | 168 | ROM_START( ondrav ) |
| 79 | | ROM_REGION( 0x11000, "main", ROMREGION_ERASEFF ) |
| 169 | ROM_REGION( 0x14000, "main", ROMREGION_ERASEFF ) |
| 80 | 170 | ROM_LOAD( "vili_a.rom", 0x10000, 0x0800, CRC(76932657) SHA1(1f3700f670f158e4bed256aed751e2c1331a28e8) ) |
| 81 | | ROM_LOAD( "vili_b.rom", 0x10800, 0x0800, CRC(03a6073f) SHA1(66f198e63f473e09350bcdbb10fe0cf440111bec) ) |
| 171 | ROM_COPY( "main", 0x10000, 0x10800, 0x0800 ) |
| 172 | ROM_COPY( "main", 0x10000, 0x11000, 0x0800 ) |
| 173 | ROM_COPY( "main", 0x10000, 0x11800, 0x0800 ) |
| 174 | ROM_LOAD( "vili_b.rom", 0x12000, 0x0800, CRC(03a6073f) SHA1(66f198e63f473e09350bcdbb10fe0cf440111bec) ) |
| 175 | ROM_COPY( "main", 0x10000, 0x12800, 0x0800 ) |
| 176 | ROM_COPY( "main", 0x10000, 0x13000, 0x0800 ) |
| 177 | ROM_COPY( "main", 0x10000, 0x13800, 0x0800 ) |
| 82 | 178 | ROM_END |
| 83 | 179 | |
| 84 | 180 | /* Driver */ |
| 85 | 181 | |
| 86 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 87 | | COMP( 1989, ondrat, 0, 0, ondra, ondra, ondra, ondra, "Tesla", "Ondra", GAME_NOT_WORKING) |
| 88 | | COMP( 1989, ondrav, ondrat, 0, ondra, ondra, ondra, ondra, "ViLi", "Ondra ViLi", GAME_NOT_WORKING) |
| 182 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 183 | COMP( 1989, ondrat, 0, 0, ondra, ondra, ondra, ondra, "Tesla", "Ondra", 0) |
| 184 | COMP( 1989, ondrav, ondrat, 0, ondra, ondra, ondra, ondra, "ViLi", "Ondra ViLi", 0) |
| 89 | 185 | |