src/mess/drivers/x1.c
| r0 | r4797 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | Sharp X1 |
| 4 | |
| 5 | 05/2009 Skeleton driver. |
| 6 | |
| 7 | ============= X1 series ============= |
| 8 | |
| 9 | X1 (CZ-800C) - November, 1982 |
| 10 | * CPU: z80A @ 4MHz, 80C49 x 2 (one for key scan, the other for TV & Cas Ctrl) |
| 11 | * ROM: IPL (4KB) + chargen (2KB) |
| 12 | * RAM: Main memory (64KB) + VRAM (4KB) + RAM for PCG (6KB) + GRAM (48KB, Option) |
| 13 | * Text Mode: 80x25 or 40x25 |
| 14 | * Graphic Mode: 640x200 or 320x200, 8 colors |
| 15 | * Sound: PSG 8 octave |
| 16 | * I/O Ports: Centronic ports, 2 Joystick ports, Cassette port (2700 baud) |
| 17 | |
| 18 | X1C (CZ-801C) - October, 1983 |
| 19 | * same but only 48KB GRAM |
| 20 | |
| 21 | X1D (CZ-802C) - October, 1983 |
| 22 | * same as X1C but with a 3" floppy drive (notice: 3" not 3" 1/2!!) |
| 23 | |
| 24 | X1Cs (CZ-803C) - June, 1984 |
| 25 | * two expansion I/O ports |
| 26 | |
| 27 | X1Ck (CZ-804C) - June, 1984 |
| 28 | * same as X1Cs |
| 29 | * ROM: IPL (4KB) + chargen (2KB) + Kanji 1st level |
| 30 | |
| 31 | X1F Model 10 (CZ-811C) - July, 1985 |
| 32 | * Re-designed |
| 33 | * ROM: IPL (4KB) + chargen (2KB) |
| 34 | |
| 35 | X1F Model 20 (CZ-812C) - July, 1985 |
| 36 | * Re-designed (same as Model 10) |
| 37 | * ROM: IPL (4KB) + chargen (2KB) + Kanji |
| 38 | * Built Tape drive plus a 5" floppy drive was available |
| 39 | |
| 40 | X1G Model 10 (CZ-820C) - July, 1986 |
| 41 | * Re-designed again |
| 42 | * ROM: IPL (4KB) + chargen (2KB) |
| 43 | |
| 44 | X1G Model 30 (CZ-822C) - July, 1986 |
| 45 | * Re-designed again (same as Model 10) |
| 46 | * ROM: IPL (4KB) + chargen (2KB) + Kanji |
| 47 | * Built Tape drive plus a 5" floppy drive was available |
| 48 | |
| 49 | X1twin (CZ-830C) - December, 1986 |
| 50 | * Re-designed again (same as Model 10) |
| 51 | * ROM: IPL (4KB) + chargen (2KB) + Kanji |
| 52 | * Built Tape drive plus a 5" floppy drive was available |
| 53 | * It contains a PC-Engine |
| 54 | |
| 55 | ============= X1 Turbo series ============= |
| 56 | |
| 57 | X1turbo Model 30 (CZ-852C) - October, 1984 |
| 58 | * CPU: z80A @ 4MHz, 80C49 x 2 (one for key scan, the other for TV & Cas Ctrl) |
| 59 | * ROM: IPL (32KB) + chargen (8KB) + Kanji (128KB) |
| 60 | * RAM: Main memory (64KB) + VRAM (6KB) + RAM for PCG (6KB) + GRAM (96KB) |
| 61 | * Text Mode: 80xCh or 40xCh with Ch = 10, 12, 20, 25 (same for Japanese display) |
| 62 | * Graphic Mode: 640x200 or 320x200, 8 colors |
| 63 | * Sound: PSG 8 octave |
| 64 | * I/O Ports: Centronic ports, 2 Joystick ports, built-in Cassette interface, |
| 65 | 2 Floppy drive for 5" disks, two expansion I/O ports |
| 66 | |
| 67 | X1turbo Model 20 (CZ-851C) - October, 1984 |
| 68 | * same as Model 30, but only 1 Floppy drive is included |
| 69 | |
| 70 | X1turbo Model 10 (CZ-850C) - October, 1984 |
| 71 | * same as Model 30, but Floppy drive is optional and GRAM is 48KB (it can |
| 72 | be expanded to 96KB however) |
| 73 | |
| 74 | X1turbo Model 40 (CZ-862C) - July, 1985 |
| 75 | * same as Model 30, but uses tv screen (you could watch television with this) |
| 76 | |
| 77 | X1turboII (CZ-856C) - November, 1985 |
| 78 | * same as Model 30, but restyled, cheaper and sold with utility software |
| 79 | |
| 80 | X1turboIII (CZ-870C) - November, 1986 |
| 81 | * with two High Density Floppy driver |
| 82 | |
| 83 | X1turboZ (CZ-880C) - December, 1986 |
| 84 | * CPU: z80A @ 4MHz, 80C49 x 2 (one for key scan, the other for TV & Cas Ctrl) |
| 85 | * ROM: IPL (32KB) + chargen (8KB) + Kanji 1st & 2nd level |
| 86 | * RAM: Main memory (64KB) + VRAM (6KB) + RAM for PCG (6KB) + GRAM (96KB) |
| 87 | * Text Mode: 80xCh or 40xCh with Ch = 10, 12, 20, 25 (same for Japanese display) |
| 88 | * Graphic Mode: 640x200 or 320x200, 8 colors [in compatibility mode], |
| 89 | 640x400, 8 colors (out of 4096); 320x400, 64 colors (out of 4096); |
| 90 | 320x200, 4096 colors [in multimode], |
| 91 | * Sound: PSG 8 octave + FM 8 octave |
| 92 | * I/O Ports: Centronic ports, 2 Joystick ports, built-in Cassette interface, |
| 93 | 2 Floppy drive for HD 5" disks, two expansion I/O ports |
| 94 | |
| 95 | X1turboZII (CZ-881C) - December, 1987 |
| 96 | * same as turboZ, but added 64KB expansion RAM |
| 97 | |
| 98 | X1turboZIII (CZ-888C) - December, 1988 |
| 99 | * same as turboZII, but no more built-in cassette drive |
| 100 | |
| 101 | Please refer to http://www2s.biglobe.ne.jp/~ITTO/x1/x1menu.html for |
| 102 | more info |
| 103 | |
| 104 | BASIC has to be loaded from external media (tape or disk), the |
| 105 | computer only has an Initial Program Loader (IPL) |
| 106 | |
| 107 | TODO: everything, in particular to sort out the BIOS dumps |
| 108 | (especially CGROM dumps). Also, notice this is a color computer, |
| 109 | despite the skeleton code says it's black ad white |
| 110 | |
| 111 | ****************************************************************************/ |
| 112 | |
| 113 | #include "driver.h" |
| 114 | #include "cpu/z80/z80.h" |
| 115 | |
| 116 | static ADDRESS_MAP_START( x1_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 117 | ADDRESS_MAP_UNMAP_HIGH |
| 118 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 119 | ADDRESS_MAP_END |
| 120 | |
| 121 | static ADDRESS_MAP_START( x1_io , ADDRESS_SPACE_IO, 8 ) |
| 122 | ADDRESS_MAP_UNMAP_HIGH |
| 123 | ADDRESS_MAP_END |
| 124 | |
| 125 | /* Input ports */ |
| 126 | INPUT_PORTS_START( x1 ) |
| 127 | INPUT_PORTS_END |
| 128 | |
| 129 | |
| 130 | static MACHINE_RESET( x1 ) |
| 131 | { |
| 132 | } |
| 133 | |
| 134 | static VIDEO_START( x1 ) |
| 135 | { |
| 136 | } |
| 137 | |
| 138 | static VIDEO_UPDATE( x1 ) |
| 139 | { |
| 140 | return 0; |
| 141 | } |
| 142 | |
| 143 | static MACHINE_DRIVER_START( x1 ) |
| 144 | /* basic machine hardware */ |
| 145 | MDRV_CPU_ADD("maincpu", Z80, XTAL_4MHz) |
| 146 | MDRV_CPU_PROGRAM_MAP(x1_mem) |
| 147 | MDRV_CPU_IO_MAP(x1_io) |
| 148 | |
| 149 | MDRV_MACHINE_RESET(x1) |
| 150 | |
| 151 | /* video hardware */ |
| 152 | MDRV_SCREEN_ADD("screen", RASTER) |
| 153 | MDRV_SCREEN_REFRESH_RATE(50) |
| 154 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 155 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 156 | MDRV_SCREEN_SIZE(640, 480) |
| 157 | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 158 | MDRV_PALETTE_LENGTH(2) |
| 159 | MDRV_PALETTE_INIT(black_and_white) |
| 160 | |
| 161 | MDRV_VIDEO_START(x1) |
| 162 | MDRV_VIDEO_UPDATE(x1) |
| 163 | MACHINE_DRIVER_END |
| 164 | |
| 165 | static SYSTEM_CONFIG_START(x1) |
| 166 | SYSTEM_CONFIG_END |
| 167 | |
| 168 | /* ROM definition */ |
| 169 | ROM_START( x1 ) |
| 170 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 171 | ROM_SYSTEM_BIOS( 0, "default", "X1 IPL" ) |
| 172 | ROMX_LOAD( "ipl.x1", 0x0000, 0x1000, CRC(7b28d9de) SHA1(c4db9a6e99873808c8022afd1c50fef556a8b44d), ROM_BIOS(1) ) |
| 173 | ROM_SYSTEM_BIOS( 1, "alt", "X1 IPL (alt)" ) |
| 174 | ROMX_LOAD( "ipl_alt.x1", 0x0000, 0x1000, CRC(e70011d3) SHA1(d3395e9aeb5b8bbba7654dd471bcd8af228ee69a), ROM_BIOS(2) ) |
| 175 | |
| 176 | ROM_REGION(0x0800, "cgrom", 0) |
| 177 | ROM_LOAD("fnt0808.x1", 0x0000, 0x0800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) ) |
| 178 | ROM_END |
| 179 | |
| 180 | ROM_START( x1ck ) |
| 181 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 182 | ROM_SYSTEM_BIOS( 0, "default", "X1 IPL" ) |
| 183 | ROMX_LOAD( "ipl.x1", 0x0000, 0x1000, CRC(7b28d9de) SHA1(c4db9a6e99873808c8022afd1c50fef556a8b44d), ROM_BIOS(1) ) |
| 184 | ROM_SYSTEM_BIOS( 1, "alt", "X1 IPL (alt)" ) |
| 185 | ROMX_LOAD( "ipl_alt.x1", 0x0000, 0x1000, CRC(e70011d3) SHA1(d3395e9aeb5b8bbba7654dd471bcd8af228ee69a), ROM_BIOS(2) ) |
| 186 | |
| 187 | ROM_REGION(0x0800, "cgrom", 0) |
| 188 | ROM_LOAD("fnt0808.x1", 0x0000, 0x0800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) ) |
| 189 | |
| 190 | ROM_REGION(0x4ac00, "kanji", 0) |
| 191 | /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */ |
| 192 | ROM_LOAD("kanji2.rom", 0x0000, 0x4ac00, BAD_DUMP CRC(33800ef2) SHA1(fc07a31ee30db312c7995e887519a9173cb38c0d) ) |
| 193 | ROM_END |
| 194 | |
| 195 | ROM_START( x1turbo ) |
| 196 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 197 | ROM_LOAD( "ipl.x1t", 0x0000, 0x8000, CRC(2e8b767c) SHA1(44620f57a25f0bcac2b57ca2b0f1ebad3bf305d3) ) |
| 198 | |
| 199 | ROM_REGION(0x0800, "cgrom", 0) |
| 200 | /* This should be larger... hence, we are missing something (maybe part of the other fnt roms?) */ |
| 201 | ROM_LOAD("fnt0808.x1", 0x0000, 0x0800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) ) |
| 202 | |
| 203 | ROM_REGION(0x4ac00, "kanji", 0) |
| 204 | /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */ |
| 205 | ROM_LOAD("kanji2.rom", 0x0000, 0x4ac00, BAD_DUMP CRC(33800ef2) SHA1(fc07a31ee30db312c7995e887519a9173cb38c0d) ) |
| 206 | ROM_END |
| 207 | |
| 208 | /* X1 Turbo Z: IPL is supposed to be the same as X1 Turbo, but which dumps should be in "cgrom"? |
| 209 | Many emulators come with fnt0816.x1 & fnt1616.x1 but I am not sure about what was present on the real |
| 210 | X1 Turbo / Turbo Z */ |
| 211 | ROM_START( x1turboz ) |
| 212 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 213 | ROM_LOAD( "ipl.x1t", 0x0000, 0x8000, CRC(2e8b767c) SHA1(44620f57a25f0bcac2b57ca2b0f1ebad3bf305d3) ) |
| 214 | |
| 215 | ROM_REGION(0x4c600, "cgrom", 0) |
| 216 | ROM_LOAD("fnt0808.x1", 0x0000, 0x0800, CRC(84a47530) SHA1(06c0995adc7a6609d4272417fe3570ca43bd0454) ) |
| 217 | ROM_SYSTEM_BIOS( 0, "font1", "Font set 1" ) |
| 218 | ROMX_LOAD("fnt0816.x1", 0x0800, 0x1000, BAD_DUMP CRC(34818d54) SHA1(2c5fdd73249421af5509e48a94c52c4e423402bf), ROM_BIOS(1) ) |
| 219 | /* I strongly suspect this is not genuine */ |
| 220 | ROMX_LOAD("fnt1616.x1", 0x01800, 0x4ac00, BAD_DUMP CRC(46826745) SHA1(b9e6c320611f0842df6f45673c47c3e23bc14272), ROM_BIOS(1) ) |
| 221 | ROM_SYSTEM_BIOS( 1, "font2", "Font set 2" ) |
| 222 | ROMX_LOAD("fnt0816_a.x1", 0x0800, 0x1000, BAD_DUMP CRC(98db5a6b) SHA1(5128ad179a702f8e0bd9910a58bad8fbe4c20167), ROM_BIOS(2) ) |
| 223 | /* I strongly suspect this is not genuine */ |
| 224 | ROMX_LOAD("fnt1616_a.x1", 0x01800, 0x4ac00, BAD_DUMP CRC(bc5689ae) SHA1(5128ad179a702f8e0bd9910a58bad8fbe4c20167), ROM_BIOS(2) ) |
| 225 | |
| 226 | ROM_REGION(0x4ac00, "kanji", 0) |
| 227 | /* This is clearly a bad dump: size does not make sense and from 0x28000 on there are only 0xff */ |
| 228 | ROM_LOAD("kanji2.rom", 0x0000, 0x4ac00, BAD_DUMP CRC(33800ef2) SHA1(fc07a31ee30db312c7995e887519a9173cb38c0d) ) |
| 229 | ROM_END |
| 230 | |
| 231 | |
| 232 | /* Driver */ |
| 233 | |
| 234 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 235 | COMP( 1982, x1, 0, 0, x1, x1, 0, x1, "Sharp", "X1 (CZ-800C)", GAME_NOT_WORKING) |
| 236 | COMP( 1984, x1ck, x1, 0, x1, x1, 0, x1, "Sharp", "X1Ck (CZ-804C)", GAME_NOT_WORKING) |
| 237 | COMP( 1984, x1turbo, x1, 0, x1, x1, 0, x1, "Sharp", "X1 Turbo (CZ-850C)", GAME_NOT_WORKING) |
| 238 | COMP( 1986, x1turboz, x1, 0, x1, x1, 0, x1, "Sharp", "X1 Turbo Z (CZ-880C)", GAME_NOT_WORKING) |