src/mess/drivers/x1.c
| r11071 | r11072 | |
| 28 | 28 | - specific x1turboz features? |
| 29 | 29 | |
| 30 | 30 | per-game/program specific TODO: |
| 31 | | - Dragon Buster: it crashed to me once with a obj flag hang; |
| 31 | - CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently; |
| 32 | 32 | - Chack'n Pop: game is too fast, presumably missing wait states; |
| 33 | - Dragon Buster: it crashed to me once with a obj flag hang; |
| 33 | 34 | - The Goonies (x1 only): goes offsync with the PCG beam positions; |
| 34 | 35 | - Graphtol: sets up x1turboz paletteram, graphic garbage due of it; |
| 35 | 36 | - Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug? |
| r11071 | r11072 | |
| 41 | 42 | - Shilver Ghost: changes the vertical visible area during scrolling, and that doesn't work too well with current mc6845 core. |
| 42 | 43 | - Suikoden: shows a JP message error (DFJustin: "Problem with the disk device !! Please set a floppy disk properly and press the return key. Retrying.") |
| 43 | 44 | - Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly; |
| 44 | | - Take the A-Train: returns to basic prompt if you try to start a play, missing disk perhaps? |
| 45 | 45 | - Trivia-Q: dunno what to do on the selection screen, missing inputs? |
| 46 | 46 | - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs; |
| 47 | 47 | - Will 2: doesn't load, fdc issue presumably (note: it's a x1turbo game ONLY); |
| r11071 | r11072 | |
| 206 | 206 | ************************************************************************************************/ |
| 207 | 207 | |
| 208 | 208 | #include "emu.h" |
| 209 | #include "includes/x1.h" |
| 209 | 210 | #include "cpu/z80/z80.h" |
| 210 | 211 | #include "cpu/z80/z80daisy.h" |
| 211 | 212 | #include "machine/z80ctc.h" |
| r11071 | r11072 | |
| 225 | 226 | #include "formats/basicdsk.h" |
| 226 | 227 | #include "formats/x1_tap.h" |
| 227 | 228 | #include "imagedev/cartslot.h" |
| 228 | | #include "includes/x1.h" |
| 229 | 229 | |
| 230 | 230 | #define MAIN_CLOCK XTAL_16MHz |
| 231 | 231 | #define VDP_CLOCK XTAL_42_9545MHz |
| r11071 | r11072 | |
| 246 | 246 | |
| 247 | 247 | static VIDEO_START( x1 ) |
| 248 | 248 | { |
| 249 | | x1_state *state = machine.driver_data<x1_state>(); |
| 250 | | state->m_avram = auto_alloc_array(machine, UINT8, 0x800); |
| 251 | | state->m_tvram = auto_alloc_array(machine, UINT8, 0x800); |
| 252 | | state->m_kvram = auto_alloc_array(machine, UINT8, 0x800); |
| 253 | | state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2); |
| 254 | | state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3); |
| 249 | // x1_state *state = machine.driver_data<x1_state>(); |
| 250 | // state->m_avram = auto_alloc_array(machine, UINT8, 0x800); |
| 251 | // state->m_tvram = auto_alloc_array(machine, UINT8, 0x800); |
| 252 | // state->m_kvram = auto_alloc_array(machine, UINT8, 0x800); |
| 253 | // state->m_gfx_bitmap_ram = auto_alloc_array(machine, UINT8, 0xc000*2); |
| 254 | // state->m_pal_4096 = auto_alloc_array(machine, UINT8, 0x1000*3); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | static void x1_draw_pixel(running_machine &machine, bitmap_t *bitmap,int y,int x,UINT16 pen,UINT8 width,UINT8 height) |
| r11071 | r11072 | |
| 1756 | 1756 | else if(offset == 0x0803) { printf("Color image board 2 read\n"); return 0xff; } // * |
| 1757 | 1757 | else if(offset >= 0x0a00 && offset <= 0x0a07) { printf("Stereoscopic board read %04x\n",offset); return 0xff; } // * |
| 1758 | 1758 | else if(offset == 0x0b00) { return x1turbo_bank_r(space,0); } |
| 1759 | | else if(offset >= 0x0c00 && offset <= 0x0cff) { printf("RS-232C read %04x\n",offset); return 0xff; } // * |
| 1759 | else if(offset >= 0x0c00 && offset <= 0x0cff) { printf("RS-232C read %04x\n",offset); return 0; } // * |
| 1760 | 1760 | else if(offset >= 0x0d00 && offset <= 0x0dff) { return x1_emm_r(space,offset & 0xff); } // * |
| 1761 | 1761 | else if(offset == 0x0e03) { return x1_rom_r(space, 0); } |
| 1762 | 1762 | else if(offset >= 0x0e80 && offset <= 0x0e81) { return x1_kanji_r(space, offset-0xe80); } |
| r11071 | r11072 | |
| 1901 | 1901 | state->m_vsync = (device->machine().primary_screen->vpos() < vsync_line) ? 0x00 : 0x04; |
| 1902 | 1902 | |
| 1903 | 1903 | // popmessage("%d",vsync_line); |
| 1904 | // popmessage("%d",vblank_line); |
| 1904 | 1905 | |
| 1905 | 1906 | res = state->m_ram_bank | state->m_sub_obf | state->m_vsync | state->m_vdisp; |
| 1906 | 1907 | |
| 1907 | | //popmessage("%d",vblank_line); |
| 1908 | | |
| 1909 | 1908 | if(cassette_input(device->machine().device("cass")) > 0.03) |
| 1910 | 1909 | res |= 0x02; |
| 1911 | 1910 | |
| r11071 | r11072 | |
| 2728 | 2727 | ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF ) |
| 2729 | 2728 | ROM_LOAD( "ipl.x1", 0x0000, 0x1000, CRC(7b28d9de) SHA1(c4db9a6e99873808c8022afd1c50fef556a8b44d) ) |
| 2730 | 2729 | |
| 2731 | | ROM_REGION( 0x10000, "wram", ROMREGION_ERASEFF ) |
| 2730 | ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 ) |
| 2732 | 2731 | |
| 2733 | 2732 | ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu" |
| 2734 | 2733 | ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP ) |
| r11071 | r11072 | |
| 2758 | 2757 | ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF ) |
| 2759 | 2758 | ROM_LOAD( "ipl.rom", 0x0000, 0x1000, CRC(e70011d3) SHA1(d3395e9aeb5b8bbba7654dd471bcd8af228ee69a) ) |
| 2760 | 2759 | |
| 2761 | | ROM_REGION( 0x10000, "wram", ROMREGION_ERASEFF ) |
| 2760 | ROM_REGION( 0x10000, "wram", ROMREGION_ERASE00 ) |
| 2762 | 2761 | |
| 2763 | 2762 | ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu" |
| 2764 | 2763 | ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP ) |
| r11071 | r11072 | |
| 2792 | 2791 | ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF ) |
| 2793 | 2792 | ROM_LOAD( "ipl.x1t", 0x0000, 0x8000, CRC(2e8b767c) SHA1(44620f57a25f0bcac2b57ca2b0f1ebad3bf305d3) ) |
| 2794 | 2793 | |
| 2795 | | ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASEFF ) |
| 2794 | ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 ) |
| 2796 | 2795 | |
| 2797 | 2796 | ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu" |
| 2798 | 2797 | ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP ) |
| r11071 | r11072 | |
| 2828 | 2827 | ROM_REGION( 0x8000, "ipl", ROMREGION_ERASEFF ) |
| 2829 | 2828 | ROM_LOAD( "ipl.bin", 0x0000, 0x8000, CRC(112f80a2) SHA1(646cc3fb5d2d24ff4caa5167b0892a4196e9f843) ) |
| 2830 | 2829 | |
| 2831 | | ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASEFF ) |
| 2830 | ROM_REGION( 0x10000*0x10, "wram", ROMREGION_ERASE00 ) |
| 2832 | 2831 | |
| 2833 | 2832 | ROM_REGION(0x1000, "mcu", ROMREGION_ERASEFF) //MCU for the Keyboard, "sub cpu" |
| 2834 | 2833 | ROM_LOAD( "80c48", 0x0000, 0x1000, NO_DUMP ) |