src/mess/drivers/sg1000.c
| r2899 | r2900 | |
| 15 | 15 | |
| 16 | 16 | TODO: |
| 17 | 17 | |
| 18 | | - SG-1000 pause button |
| 19 | | - SC-3000 reset key |
| 20 | | - SC-3000 cassette |
| 18 | - SP-400 serial printer |
| 19 | - SH-400 racing controller |
| 21 | 20 | - SF-7000 serial comms |
| 22 | | - SP-400 serial printer |
| 23 | 21 | |
| 24 | 22 | */ |
| 25 | 23 | |
| 24 | static const device_config *cassette_device_image(void) |
| 25 | { |
| 26 | return image_from_devtype_and_index(IO_CASSETTE, 0); |
| 27 | } |
| 28 | |
| 26 | 29 | /* Terebi Oekaki (TV Draw) */ |
| 27 | 30 | |
| 28 | 31 | /* |
| r2899 | r2900 | |
| 87 | 90 | AM_RANGE(0x7f, 0x7f) AM_WRITE(SN76496_0_w) |
| 88 | 91 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 89 | 92 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| 90 | | AM_RANGE(0xdc, 0xdc) AM_READ(input_port_0_r) |
| 91 | | AM_RANGE(0xdd, 0xdd) AM_READ(input_port_1_r) |
| 93 | AM_RANGE(0xdc, 0xdc) AM_READ_PORT("PA7") |
| 94 | AM_RANGE(0xdd, 0xdd) AM_READ_PORT("PB7") |
| 92 | 95 | AM_RANGE(0xde, 0xde) AM_READ(sg1000_joysel_r) AM_WRITENOP |
| 93 | 96 | AM_RANGE(0xdf, 0xdf) AM_NOP |
| 94 | 97 | ADDRESS_MAP_END |
| r2899 | r2900 | |
| 106 | 109 | AM_RANGE(0x7f, 0x7f) AM_WRITE(SN76496_0_w) |
| 107 | 110 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 108 | 111 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| 109 | | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE( PPI8255, "ppi8255", ppi8255_r, ppi8255_w) |
| 112 | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w) |
| 110 | 113 | ADDRESS_MAP_END |
| 111 | 114 | |
| 112 | 115 | // SF-7000 |
| r2899 | r2900 | |
| 121 | 124 | AM_RANGE(0x7f, 0x7f) AM_WRITE(SN76496_0_w) |
| 122 | 125 | AM_RANGE(0xbe, 0xbe) AM_READWRITE(TMS9928A_vram_r, TMS9928A_vram_w) |
| 123 | 126 | AM_RANGE(0xbf, 0xbf) AM_READWRITE(TMS9928A_register_r, TMS9928A_register_w) |
| 124 | | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE( PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 127 | AM_RANGE(0xdc, 0xdf) AM_DEVREADWRITE(PPI8255, "ppi8255_0", ppi8255_r, ppi8255_w) |
| 125 | 128 | AM_RANGE(0xe0, 0xe0) AM_READ(nec765_status_r) |
| 126 | 129 | AM_RANGE(0xe1, 0xe1) AM_READWRITE(nec765_data_r, nec765_data_w) |
| 127 | | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE( PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 130 | AM_RANGE(0xe4, 0xe7) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) |
| 128 | 131 | AM_RANGE(0xe8, 0xe8) AM_READWRITE(msm8251_data_r, msm8251_data_w) |
| 129 | 132 | AM_RANGE(0xe9, 0xe9) AM_READWRITE(msm8251_status_r, msm8251_control_w) |
| 130 | 133 | ADDRESS_MAP_END |
| 131 | 134 | |
| 132 | 135 | /* Input Ports */ |
| 133 | 136 | |
| 137 | static INPUT_CHANGED( trigger_nmi ) |
| 138 | { |
| 139 | cpunum_set_input_line(field->port->machine, 0, INPUT_LINE_NMI, (input_port_read(field->port->machine, "NMI") ? CLEAR_LINE : ASSERT_LINE)); |
| 140 | } |
| 141 | |
| 134 | 142 | static INPUT_PORTS_START( tvdraw ) |
| 135 | 143 | PORT_START_TAG("TVDRAW_X") |
| 136 | 144 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| r2899 | r2900 | |
| 160 | 168 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 161 | 169 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 162 | 170 | |
| 163 | | PORT_START_TAG("PAUSE") |
| 164 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("PAUSE") |
| 171 | PORT_START_TAG("NMI") |
| 172 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("PAUSE") PORT_CODE(KEYCODE_P) PORT_CHANGED(trigger_nmi, 0) |
| 165 | 173 | |
| 166 | 174 | PORT_INCLUDE( tvdraw ) |
| 167 | 175 | INPUT_PORTS_END |
| r2899 | r2900 | |
| 203 | 211 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') |
| 204 | 212 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') |
| 205 | 213 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("INS DEL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 206 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PI") PORT_CODE(KEYCODE_EQUALS) |
| 214 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xcf\x80") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(0x03c0) |
| 207 | 215 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 208 | 216 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') |
| 209 | 217 | |
| r2899 | r2900 | |
| 213 | 221 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') |
| 214 | 222 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') |
| 215 | 223 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 216 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 224 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 217 | 225 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') |
| 218 | 226 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 219 | 227 | |
| r2899 | r2900 | |
| 223 | 231 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') |
| 224 | 232 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') |
| 225 | 233 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 226 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 234 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 227 | 235 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CR") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 228 | 236 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 229 | 237 | |
| r2899 | r2900 | |
| 233 | 241 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') |
| 234 | 242 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') |
| 235 | 243 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 236 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 237 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 244 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 245 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 238 | 246 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 239 | 247 | |
| 240 | 248 | PORT_START_TAG("PA7") |
| r2899 | r2900 | |
| 268 | 276 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 269 | 277 | |
| 270 | 278 | PORT_START_TAG("PB5") |
| 271 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("YEN") PORT_CODE(KEYCODE_TILDE) |
| 279 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xc2\xa5") PORT_CODE(KEYCODE_TILDE) PORT_CHAR(0x00a5) |
| 272 | 280 | PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 273 | 281 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("FUNC") PORT_CODE(KEYCODE_TAB) |
| 274 | 282 | |
| r2899 | r2900 | |
| 284 | 292 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 285 | 293 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 286 | 294 | |
| 287 | | PORT_START_TAG("RESET") |
| 288 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RESET") PORT_CODE(KEYCODE_F10) |
| 295 | PORT_START_TAG("NMI") |
| 296 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RESET") PORT_CODE(KEYCODE_F10) PORT_CHANGED(trigger_nmi, 0) |
| 289 | 297 | INPUT_PORTS_END |
| 290 | 298 | |
| 291 | 299 | static INPUT_PORTS_START( sc3000 ) |
| r2899 | r2900 | |
| 375 | 383 | PB7 Cassette tape input |
| 376 | 384 | */ |
| 377 | 385 | |
| 386 | UINT8 data = 0; |
| 387 | |
| 388 | /* keyboard */ |
| 389 | |
| 378 | 390 | sprintf(port, "PB%d", keylatch); |
| 379 | | return ( input_port_read(machine, port) | 0x70 ); |
| 391 | data = input_port_read(machine, port); |
| 392 | |
| 393 | /* cartridge contact */ |
| 394 | |
| 395 | data |= 0x10; |
| 396 | |
| 397 | /* printer */ |
| 398 | |
| 399 | data |= 0x60; |
| 400 | |
| 401 | /* cassette */ |
| 402 | |
| 403 | if (cassette_input(cassette_device_image()) > +0.0) data |= 0x80; |
| 404 | |
| 405 | return data; |
| 380 | 406 | } |
| 381 | 407 | |
| 382 | 408 | static WRITE8_HANDLER( sc3000_ppi8255_c_w ) |
| r2899 | r2900 | |
| 394 | 420 | PC7 /FEED to printer |
| 395 | 421 | */ |
| 396 | 422 | |
| 423 | /* keyboard */ |
| 424 | |
| 397 | 425 | keylatch = data & 0x07; |
| 426 | |
| 427 | /* cassette */ |
| 428 | |
| 429 | cassette_output(cassette_device_image(), BIT(data, 4) ? +1.0 : -1.0); |
| 430 | |
| 431 | /* printer */ |
| 398 | 432 | } |
| 399 | 433 | |
| 400 | 434 | static const ppi8255_interface sc3000_ppi8255_intf = |
| r2899 | r2900 | |
| 575 | 609 | // video hardware |
| 576 | 610 | MDRV_IMPORT_FROM(tms9928a) |
| 577 | 611 | MDRV_SCREEN_MODIFY("main") |
| 578 | | MDRV_SCREEN_REFRESH_RATE(10738635.0/2/342/262) |
| 612 | MDRV_SCREEN_REFRESH_RATE((float)XTAL_10_738635MHz/2/342/262) |
| 579 | 613 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 580 | 614 | |
| 581 | 615 | // sound hardware |
| r2899 | r2900 | |
| 599 | 633 | // video hardware |
| 600 | 634 | MDRV_IMPORT_FROM(tms9928a) |
| 601 | 635 | MDRV_SCREEN_MODIFY("main") |
| 602 | | MDRV_SCREEN_REFRESH_RATE(10738635.0/2/342/262) |
| 636 | MDRV_SCREEN_REFRESH_RATE((float)XTAL_10_738635MHz/2/342/262) |
| 603 | 637 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 604 | 638 | |
| 605 | 639 | // sound hardware |
| r2899 | r2900 | |
| 630 | 664 | // video hardware |
| 631 | 665 | MDRV_IMPORT_FROM(tms9928a) |
| 632 | 666 | MDRV_SCREEN_MODIFY("main") |
| 633 | | MDRV_SCREEN_REFRESH_RATE(10738635.0/2/342/262) |
| 667 | MDRV_SCREEN_REFRESH_RATE((float)XTAL_10_738635MHz/2/342/262) |
| 634 | 668 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 635 | 669 | |
| 636 | 670 | // sound hardware |
| r2899 | r2900 | |
| 657 | 691 | ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASE00 ) |
| 658 | 692 | ROM_END |
| 659 | 693 | |
| 694 | #define rom_sc3000h rom_sc3000 |
| 695 | |
| 660 | 696 | ROM_START( sf7000 ) |
| 661 | 697 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 662 | 698 | ROM_LOAD( "ipl.rom", 0x0000, 0x2000, CRC(d76810b8) SHA1(77339a6db2593aadc638bed77b8e9bed5d9d87e3) ) |
| r2899 | r2900 | |
| 668 | 704 | { |
| 669 | 705 | if (size == 40 * 1024) |
| 670 | 706 | { |
| 671 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1); |
| 672 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_UNMAP); |
| 707 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1, SMH_UNMAP); |
| 673 | 708 | memory_configure_bank(1, 0, 1, memory_region(REGION_CPU1) + 0x8000, 0); |
| 674 | 709 | memory_set_bank(1, 0); |
| 675 | 710 | } |
| 676 | 711 | else if (size == 48 * 1024) |
| 677 | 712 | { |
| 678 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_BANK1); |
| 679 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_UNMAP); |
| 713 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_BANK1, SMH_UNMAP); |
| 680 | 714 | memory_configure_bank(1, 0, 1, memory_region(REGION_CPU1) + 0x8000, 0); |
| 681 | 715 | memory_set_bank(1, 0); |
| 682 | 716 | } |
| r2899 | r2900 | |
| 693 | 727 | { |
| 694 | 728 | // The Castle |
| 695 | 729 | |
| 696 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1); |
| 697 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1); |
| 730 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1, SMH_BANK1); |
| 698 | 731 | } |
| 699 | 732 | } |
| 700 | 733 | |
| r2899 | r2900 | |
| 710 | 743 | |
| 711 | 744 | sg1000_map_cartridge_memory(image->machine, ptr, size); |
| 712 | 745 | |
| 713 | | memory_install_read8_handler(image->machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc3ff, 0, 0x3c00, SMH_BANK2); |
| 714 | | memory_install_write8_handler(image->machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc3ff, 0, 0x3c00, SMH_BANK2); |
| 746 | memory_install_readwrite8_handler(image->machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc3ff, 0, 0x3c00, SMH_BANK2, SMH_BANK2); |
| 715 | 747 | |
| 716 | 748 | return INIT_PASS; |
| 717 | 749 | } |
| r2899 | r2900 | |
| 720 | 752 | { |
| 721 | 753 | switch( state ) |
| 722 | 754 | { |
| 723 | | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 724 | | case MESS_DEVINFO_INT_MUST_BE_LOADED: info->i = 1; break; |
| 725 | | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(sg1000_cart); break; |
| 726 | | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sg,bin"); break; |
| 755 | case MESS_DEVINFO_INT_COUNT: info->i = 1; break; |
| 756 | case MESS_DEVINFO_INT_MUST_BE_LOADED: info->i = 1; break; |
| 757 | case MESS_DEVINFO_PTR_LOAD: info->load = DEVICE_IMAGE_LOAD_NAME(sg1000_cart); break; |
| 758 | case MESS_DEVINFO_STR_FILE_EXTENSIONS: strcpy(info->s = device_temp_str(), "sg,bin"); break; |
| 727 | 759 | |
| 728 | 760 | default: cartslot_device_getinfo( devclass, state, info ); break; |
| 729 | 761 | } |
| r2899 | r2900 | |
| 735 | 767 | { |
| 736 | 768 | // SC-3000 BASIC Level III |
| 737 | 769 | |
| 738 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_BANK1); |
| 739 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_BANK1); |
| 740 | | |
| 741 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xffff, 0, 0, SMH_BANK2); |
| 742 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xffff, 0, 0, SMH_BANK2); |
| 770 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0xbfff, 0, 0, SMH_BANK1, SMH_BANK1); |
| 771 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xffff, 0, 0, SMH_BANK2, SMH_BANK2); |
| 743 | 772 | } |
| 744 | 773 | else if (!strncmp("PIANO", (const char *)&ptr[0x0841], 5)) |
| 745 | 774 | { |
| 746 | 775 | // Sega SC-3000 Music Editor |
| 747 | 776 | |
| 748 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1); |
| 749 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1); |
| 750 | | |
| 751 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2); |
| 752 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2); |
| 777 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x8000, 0x9fff, 0, 0, SMH_BANK1, SMH_BANK1); |
| 778 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2, SMH_BANK2); |
| 753 | 779 | } |
| 754 | 780 | else |
| 755 | 781 | { |
| 756 | 782 | // regular cartridges |
| 757 | 783 | |
| 758 | | memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2); |
| 759 | | memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2); |
| 784 | memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc7ff, 0, 0x3800, SMH_BANK2, SMH_BANK2); |
| 760 | 785 | } |
| 761 | 786 | } |
| 762 | 787 | |
| r2899 | r2900 | |
| 833 | 858 | static DEVICE_IMAGE_LOAD( sf7000_serial ) |
| 834 | 859 | { |
| 835 | 860 | /* filename specified */ |
| 836 | | if (device_load_serial_device(image)==INIT_PASS) |
| 861 | if (device_load_serial_device(image) == INIT_PASS) |
| 837 | 862 | { |
| 838 | 863 | /* setup transmit parameters */ |
| 839 | 864 | serial_device_setup(image, 9600 >> input_port_read(image->machine, "BAUD"), 8, 1, SERIAL_PARITY_NONE); |
| r2899 | r2900 | |
| 891 | 916 | |
| 892 | 917 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 893 | 918 | CONS( 1983, sg1000, 0, 0, sg1000, sg1000, 0, sg1000, "Sega", "SG-1000", 0 ) |
| 919 | CONS( 1984, sg1000m2, sg1000, 0, sc3000, sc3000, 0, sg1000, "Sega", "SG-1000 II", 0 ) |
| 920 | //CONS( 1983, omv, sg1000, 0, omv, omv, 0, omv, "Tsukuda Original", "Othello Multivision", GAME_NOT_WORKING ) |
| 894 | 921 | COMP( 1983, sc3000, 0, 0, sc3000, sc3000, 0, sc3000, "Sega", "SC-3000", 0 ) |
| 922 | COMP( 1983, sc3000h, sc3000, 0, sc3000, sc3000, 0, sc3000, "Sega", "SC-3000H", 0 ) |
| 895 | 923 | COMP( 1983, sf7000, sc3000, 0, sf7000, sf7000, 0, sf7000, "Sega", "SC-3000/Super Control Station SF-7000", 0 ) |
| 896 | | CONS( 1984, sg1000m2, sg1000, 0, sc3000, sc3000, 0, sg1000, "Sega", "SG-1000 Mark II", 0 ) |
| 897 | | //COMP( 1983, omv, sg1000, 0, omv, omv, 0, omv, "Tsukuda Original", "Othello Multivision", GAME_NOT_WORKING ) |