src/mess/drivers/pc6001.c
| r5983 | r5984 | |
| 8 | 8 | TODO: |
| 9 | 9 | - Hook up tape loading, images that are floating around the net are already |
| 10 | 10 | ADC'ed, so they should be easy to implement (but not exactly faithful) |
| 11 | - cassette handling requires a decap of the MCU. It could be possible to |
| 12 | do some tight synch between the master CPU and a code simulation,but I think |
| 13 | it's not worth the effort... |
| 11 | 14 | - Currently rewriting the video part without the MC6847 for two reasons: |
| 12 | 15 | A) the later models have a custom video chip in the place of the MC6847, |
| 13 | 16 | so this implementation will be used in the end. |
| 14 | 17 | B) It's easier to me to see what the attribute vram does since I don't |
| 15 | 18 | have any docs atm. |
| 16 | | - cassette handling requires a decap of the MCU. It could be possible to |
| 17 | | do some tight synch between the master CPU and a code simulation... |
| 18 | 19 | |
| 19 | 20 | ================================================================================== |
| 20 | 21 | |
| r5983 | r5984 | |
| 941 | 942 | ROM_LOAD( "cgrom60.60", 0x0000, 0x1000, CRC(b0142d32) SHA1(9570495b10af5b1785802681be94b0ea216a1e26) ) |
| 942 | 943 | ROM_RELOAD( 0x1000, 0x1000 ) |
| 943 | 944 | |
| 945 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 946 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 947 | |
| 944 | 948 | ROM_REGION( 0x10000, "cas", ROMREGION_ERASEFF ) |
| 945 | 949 | /* Load here your tape for now (and change the cas length macro according to what MESS returns) */ |
| 946 | 950 | // ROM_LOAD( "car.cas", 0x0000, CAS_LENGTH, CRC(1) SHA1(1) ) |
| r5983 | r5984 | |
| 956 | 960 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 957 | 961 | ROM_LOAD( "cgrom60.60a", 0x0000, 0x1000, CRC(49c21d08) SHA1(9454d6e2066abcbd051bad9a29a5ca27b12ec897) ) |
| 958 | 962 | |
| 963 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 964 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 965 | |
| 959 | 966 | ROM_REGION( 0x10000, "cas", ROMREGION_ERASEFF ) |
| 960 | 967 | |
| 961 | 968 | ROM_REGION( 0x4000, "cart_img", ROMREGION_ERASE00 ) |
| r5983 | r5984 | |
| 970 | 977 | ROM_LOAD( "cgrom60m.62", 0x1e000, 0x2000, CRC(3ce48c33) SHA1(f3b6c63e83a17d80dde63c6e4d86adbc26f84f79) ) |
| 971 | 978 | ROM_LOAD( "kanjirom.62", 0x20000, 0x8000, CRC(20c8f3eb) SHA1(4c9f30f0a2ebbe70aa8e697f94eac74d8241cadd) ) |
| 972 | 979 | |
| 980 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 981 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 982 | |
| 973 | 983 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 974 | 984 | ROM_COPY( "maincpu", 0x1c000, 0x00000, 0x1000 ) |
| 975 | 985 | |
| r5983 | r5984 | |
| 985 | 995 | ROM_LOAD( "systemrom1.64", 0x0000, 0x10000, CRC(b6fc2db2) SHA1(dd48b1eee60aa34780f153359f5da7f590f8dff4) ) |
| 986 | 996 | ROM_LOAD( "systemrom2.64", 0x10000, 0x10000, CRC(55a62a1d) SHA1(3a19855d290fd4ac04e6066fe4a80ecd81dc8dd7) ) |
| 987 | 997 | |
| 998 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 999 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 1000 | |
| 988 | 1001 | ROM_REGION( 0x4000, "gfx1", 0 ) |
| 989 | 1002 | ROM_LOAD( "cgrom68.64", 0x0000, 0x4000, CRC(73bc3256) SHA1(5f80d62a95331dc39b2fb448a380fd10083947eb) ) |
| 990 | 1003 | |
| r5983 | r5984 | |
| 1004 | 1017 | ROM_LOAD( "cgrom66.66", 0x2000, 0x2000, CRC(3ce48c33) SHA1(f3b6c63e83a17d80dde63c6e4d86adbc26f84f79) ) |
| 1005 | 1018 | ROM_LOAD( "kanjirom.66", 0x4000, 0x8000, CRC(20c8f3eb) SHA1(4c9f30f0a2ebbe70aa8e697f94eac74d8241cadd) ) |
| 1006 | 1019 | |
| 1020 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 1021 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 1022 | |
| 1007 | 1023 | ROM_REGION( 0x10000, "cas", ROMREGION_ERASEFF ) |
| 1008 | 1024 | |
| 1009 | 1025 | ROM_REGION( 0x4000, "cart_img", ROMREGION_ERASE00 ) |
| r5983 | r5984 | |
| 1023 | 1039 | ROM_REGION( 0x4000, "gfx1", 0 ) |
| 1024 | 1040 | ROM_LOAD( "cgrom68.68", 0x0000, 0x4000, CRC(73bc3256) SHA1(5f80d62a95331dc39b2fb448a380fd10083947eb) ) |
| 1025 | 1041 | |
| 1042 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 1043 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| 1044 | |
| 1026 | 1045 | ROM_REGION( 0x10000, "cas", ROMREGION_ERASEFF ) |
| 1027 | 1046 | |
| 1028 | 1047 | ROM_REGION( 0x4000, "cart_img", ROMREGION_ERASE00 ) |
src/mess/drivers/x1.c
| r5983 | r5984 | |
| 6 | 6 | |
| 7 | 7 | TODO: |
| 8 | 8 | - Understand how keyboard works and decap/dump the keyboard MCU if possible; |
| 9 | | - Hook-up .tap image formats (.rom too?); |
| 9 | - Hook-up remaining .tap image formats; |
| 10 | - Implement .rom format support (needs an image for it); |
| 11 | - Implement write support for the .d88 based images, later x1turbo games uses it as a copy |
| 12 | protection mechanism; |
| 10 | 13 | - Implement tape commands; |
| 11 | 14 | - Sort out / redump the BIOS gfx roms; |
| 12 | | - Implement the interrupts (uses IM 2), basically used by the keyboard. |
| 13 | | - Implement DMA,CTC and SIO, they are X1Turbo only features. |
| 14 | | - Improve the z80DMA core, it's so incomplete that nothing that uses it works; |
| 15 | - Implement SIO, they are X1Turbo only features. |
| 15 | 16 | - clean-ups! |
| 16 | | - x1turbo: understand how irq generation works for the ym-2151; |
| 17 | 17 | - There are various unclear video things, these are: |
| 18 | 18 | - Understand why some games still doesn't upload the proper PCG index; |
| 19 | 19 | - Implement PCG reading, used by Maison Ikkoku, Mule and Gyajiko for kanji reading. |
| 20 | 20 | Is there a way to select which ROM to use? |
| 21 | | - Implement the scrn regs; |
| 21 | - Implement the remaining scrn regs; |
| 22 | 22 | - Interlace mode? |
| 23 | 23 | - Implement the new features of the x1turbo, namely the 4096 color feature amongst other |
| 24 | 24 | things |
| r5983 | r5984 | |
| 1265 | 1265 | else if(offset >= 0x1900 && offset <= 0x19ff) { return sub_io_r(space, 0); } |
| 1266 | 1266 | else if(offset >= 0x1a00 && offset <= 0x1aff) { return ppi8255_r(devtag_get_device(space->machine, "ppi8255_0"), (offset-0x1a00) & 3); } |
| 1267 | 1267 | else if(offset >= 0x1b00 && offset <= 0x1bff) { return ay8910_r(devtag_get_device(space->machine, "ay"), 0); } |
| 1268 | | else if(offset >= 0x1f80 && offset <= 0x1f8f) { return z80dma_r(devtag_get_device(space->machine, "dma"), 0); } |
| 1269 | | else if(offset >= 0x1f90 && offset <= 0x1f91) { return z80sio_c_r(devtag_get_device(space->machine, "sio"), (offset-0x1f90) & 1); } |
| 1270 | | else if(offset >= 0x1f92 && offset <= 0x1f93) { return z80sio_d_r(devtag_get_device(space->machine, "sio"), (offset-0x1f92) & 1); } |
| 1268 | // else if(offset >= 0x1f80 && offset <= 0x1f8f) { return z80dma_r(devtag_get_device(space->machine, "dma"), 0); } |
| 1269 | // else if(offset >= 0x1f90 && offset <= 0x1f91) { return z80sio_c_r(devtag_get_device(space->machine, "sio"), (offset-0x1f90) & 1); } |
| 1270 | // else if(offset >= 0x1f92 && offset <= 0x1f93) { return z80sio_d_r(devtag_get_device(space->machine, "sio"), (offset-0x1f92) & 1); } |
| 1271 | 1271 | else if(offset >= 0x1fa0 && offset <= 0x1fa3) { return z80ctc_r(devtag_get_device(space->machine, "ctc"), offset-0x1fa0); } |
| 1272 | 1272 | else if(offset >= 0x1fa8 && offset <= 0x1fab) { return z80ctc_r(devtag_get_device(space->machine, "ctc"), offset-0x1fa8); } |
| 1273 | 1273 | // else if(offset >= 0x1fd0 && offset <= 0x1fdf) { return x1_scrn_r(space,offset-0x1fd0); } |
| 1274 | | else if(offset == 0x1fe0) { return x1_blackclip_r(space,0); } |
| 1274 | // else if(offset == 0x1fe0) { return x1_blackclip_r(space,0); } |
| 1275 | 1275 | else if(offset >= 0x2000 && offset <= 0x2fff) { return colorram[offset-0x2000]; } |
| 1276 | 1276 | else if(offset >= 0x3000 && offset <= 0x3fff) { return videoram[offset-0x3000]; } |
| 1277 | 1277 | else if(offset >= 0x4000 && offset <= 0xffff) { return gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)]; } |
| r5983 | r5984 | |
| 1302 | 1302 | else if(offset >= 0x1c00 && offset <= 0x1cff) { ay8910_address_w(devtag_get_device(space->machine, "ay"), 0,data); } |
| 1303 | 1303 | else if(offset >= 0x1d00 && offset <= 0x1dff) { rom_bank_1_w(space,0,data); } |
| 1304 | 1304 | else if(offset >= 0x1e00 && offset <= 0x1eff) { rom_bank_0_w(space,0,data); } |
| 1305 | | else if(offset >= 0x1f80 && offset <= 0x1f8f) { z80dma_w(devtag_get_device(space->machine, "dma"), 0,data); } |
| 1306 | | else if(offset >= 0x1f90 && offset <= 0x1f91) { z80sio_c_w(devtag_get_device(space->machine, "sio"), (offset-0x1f90) & 1,data); } |
| 1307 | | else if(offset >= 0x1f92 && offset <= 0x1f93) { z80sio_d_w(devtag_get_device(space->machine, "sio"), (offset-0x1f92) & 1,data); } |
| 1305 | // else if(offset >= 0x1f80 && offset <= 0x1f8f) { z80dma_w(devtag_get_device(space->machine, "dma"), 0,data); } |
| 1306 | // else if(offset >= 0x1f90 && offset <= 0x1f91) { z80sio_c_w(devtag_get_device(space->machine, "sio"), (offset-0x1f90) & 1,data); } |
| 1307 | // else if(offset >= 0x1f92 && offset <= 0x1f93) { z80sio_d_w(devtag_get_device(space->machine, "sio"), (offset-0x1f92) & 1,data); } |
| 1308 | 1308 | else if(offset >= 0x1fa0 && offset <= 0x1fa3) { z80ctc_w(devtag_get_device(space->machine, "ctc"), offset-0x1fa0,data); } |
| 1309 | 1309 | else if(offset >= 0x1fa8 && offset <= 0x1fab) { z80ctc_w(devtag_get_device(space->machine, "ctc"), offset-0x1fa8,data); } |
| 1310 | 1310 | // else if(offset == 0x1fb0) { x1turbo_pal_w(space,0,data); } |
| r5983 | r5984 | |
| 1312 | 1312 | // else if(offset == 0x1fc0) { x1turbo_txdisp_w(space,0,data); } |
| 1313 | 1313 | // else if(offset == 0x1fc5) { x1turbo_gfxpal_w(space,0,data); } |
| 1314 | 1314 | else if(offset >= 0x1fd0 && offset <= 0x1fdf) { x1_scrn_w(space,0,data); } |
| 1315 | | else if(offset == 0x1fe0) { x1_blackclip_w(space,0,data); } |
| 1315 | // else if(offset == 0x1fe0) { x1_blackclip_w(space,0,data); } |
| 1316 | 1316 | else if(offset >= 0x2000 && offset <= 0x2fff) { colorram[offset-0x2000] = data; } |
| 1317 | 1317 | else if(offset >= 0x3000 && offset <= 0x3fff) { videoram[offset-0x3000] = pcg_write_addr = data; } |
| 1318 | 1318 | else if(offset >= 0x4000 && offset <= 0xffff) { gfx_bitmap_ram[offset-0x4000+(scrn_reg.gfx_bank*0xc000)] = data; } |
| r5983 | r5984 | |
| 1916 | 1916 | { |
| 1917 | 1917 | { "x1kb" }, |
| 1918 | 1918 | { "ctc" }, |
| 1919 | { NULL } |
| 1920 | }; |
| 1921 | |
| 1922 | static const z80_daisy_chain x1turbo_daisy[] = |
| 1923 | { |
| 1924 | { "x1kb" }, |
| 1925 | { "ctc" }, |
| 1919 | 1926 | // { "dma" }, |
| 1920 | 1927 | // { "sio" }, |
| 1921 | 1928 | { NULL } |
| r5983 | r5984 | |
| 2103 | 2110 | MDRV_CPU_CONFIG(x1_daisy) |
| 2104 | 2111 | |
| 2105 | 2112 | MDRV_Z80CTC_ADD( "ctc", XTAL_4MHz , ctc_intf ) |
| 2106 | | MDRV_Z80SIO_ADD( "sio", XTAL_4MHz , sio_intf ) |
| 2107 | | MDRV_Z80DMA_ADD( "dma", XTAL_4MHz , x1_dma ) |
| 2108 | 2113 | |
| 2109 | 2114 | MDRV_DEVICE_ADD("x1kb", DEVICE_GET_INFO_NAME(x1_keyboard_getinfo), 0) |
| 2110 | 2115 | |
| r5983 | r5984 | |
| 2150 | 2155 | |
| 2151 | 2156 | MDRV_CPU_MODIFY("maincpu") |
| 2152 | 2157 | MDRV_CPU_IO_MAP(x1turbo_io) |
| 2158 | MDRV_CPU_CONFIG(x1turbo_daisy) |
| 2153 | 2159 | |
| 2160 | MDRV_Z80SIO_ADD( "sio", XTAL_4MHz , sio_intf ) |
| 2161 | MDRV_Z80DMA_ADD( "dma", XTAL_4MHz , x1_dma ) |
| 2162 | |
| 2154 | 2163 | MDRV_SOUND_ADD("ym", YM2151, XTAL_4MHz) //unknown clock / divider |
| 2155 | 2164 | // MDRV_SOUND_CONFIG(ay8910_config) |
| 2156 | 2165 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| r5983 | r5984 | |
| 2261 | 2270 | |
| 2262 | 2271 | |
| 2263 | 2272 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 2264 | | COMP( 1982, x1, 0, 0, x1, x1, 0, 0, "Sharp", "X1 (CZ-800C)", GAME_NOT_WORKING) |
| 2265 | | COMP( 1984, x1ck, x1, 0, x1, x1, 0, 0, "Sharp", "X1Ck (CZ-804C)", GAME_NOT_WORKING) |
| 2273 | COMP( 1982, x1, 0, 0, x1, x1, 0, 0, "Sharp", "X1 (CZ-800C)", 0) |
| 2274 | COMP( 1984, x1ck, x1, 0, x1, x1, 0, 0, "Sharp", "X1Ck (CZ-804C)", 0) |
| 2266 | 2275 | COMP( 1984, x1turbo, x1, 0, x1turbo, x1, 0, 0, "Sharp", "X1 Turbo (CZ-850C)", GAME_NOT_WORKING) |
| 2267 | 2276 | COMP( 1986, x1turboz, x1, 0, x1turbo, x1, 0, 0, "Sharp", "X1 Turbo Z (CZ-880C)", GAME_NOT_WORKING) |