src/mess/drivers/ql.c
| r10794 | r10795 | |
| 88 | 88 | #include "video/zx8301.h" |
| 89 | 89 | #include "includes/ql.h" |
| 90 | 90 | #include "machine/wd17xx.h" |
| 91 | #include "debugger.h" |
| 91 | 92 | |
| 93 | #define LOG_DISK_WRITE 0 |
| 94 | #define LOG_DISK_READ 0 |
| 95 | |
| 92 | 96 | //************************************************************************** |
| 93 | 97 | // INTELLIGENT PERIPHERAL CONTROLLER |
| 94 | 98 | //************************************************************************** |
| r10794 | r10795 | |
| 259 | 263 | READ8_MEMBER( ql_state::disk_io_r ) |
| 260 | 264 | { |
| 261 | 265 | UINT8 result = 0; |
| 262 | | |
| 263 | | //logerror("%s DiskIO:Read of %08X\n",machine->describe_context(),disk_io_base+offset); |
| 266 | |
| 267 | if(LOG_DISK_READ) |
| 268 | logerror("%s DiskIO:Read of %08X\n",machine->describe_context(),disk_io_base+offset); |
| 264 | 269 | |
| 265 | 270 | switch (offset) |
| 266 | 271 | { |
| r10794 | r10795 | |
| 276 | 281 | |
| 277 | 282 | WRITE8_MEMBER( ql_state::disk_io_w ) |
| 278 | 283 | { |
| 279 | | //logerror("%s DiskIO:Write %02X to %08X\n",machine->describe_context(),data,disk_io_base+offset); |
| 284 | if(LOG_DISK_WRITE) |
| 285 | logerror("%s DiskIO:Write %02X to %08X\n",machine->describe_context(),data,disk_io_base+offset); |
| 280 | 286 | |
| 281 | 287 | switch (offset) |
| 282 | 288 | { |
| r10794 | r10795 | |
| 335 | 341 | { |
| 336 | 342 | //logerror("sandy_set_control:%02X\n",data); |
| 337 | 343 | |
| 344 | disk_io_byte=data; |
| 345 | |
| 338 | 346 | if(data & SANDY_DRIVE0_MASK) |
| 339 | 347 | wd17xx_set_drive(m_fdc,0); |
| 340 | 348 | |
| r10794 | r10795 | |
| 342 | 350 | wd17xx_set_drive(m_fdc,1); |
| 343 | 351 | |
| 344 | 352 | wd17xx_set_side(m_fdc,(data & SANDY_SIDE_MASK) >> SANDY_SIDE_SHIFT); |
| 353 | if (data & SANDY_SIDE_MASK) |
| 354 | { |
| 355 | logerror("Accessing side 1\n"); |
| 356 | } |
| 345 | 357 | |
| 346 | 358 | if (printer_is_ready(m_printer)) |
| 347 | 359 | { |
| r10794 | r10795 | |
| 353 | 365 | } |
| 354 | 366 | } |
| 355 | 367 | |
| 356 | | static READ_LINE_DEVICE_HANDLER( trump_card_dden_r ) |
| 368 | static READ_LINE_DEVICE_HANDLER( disk_io_dden_r ) |
| 357 | 369 | { |
| 358 | | //logerror("DiskIO:dden_read\n"); |
| 370 | ql_state *state = device->machine->driver_data<ql_state>(); |
| 359 | 371 | |
| 360 | | return 1; |
| 372 | if(state->disk_type==DISK_TYPE_SANDY) |
| 373 | return ((state->disk_io_byte & SANDY_DDEN_MASK) >> SANDY_DDEN_SHIFT); |
| 374 | else |
| 375 | return 0; |
| 361 | 376 | } |
| 362 | 377 | |
| 363 | | static WRITE_LINE_DEVICE_HANDLER( trump_card_intrq_w ) |
| 378 | static WRITE_LINE_DEVICE_HANDLER( disk_io_intrq_w ) |
| 364 | 379 | { |
| 365 | 380 | //logerror("DiskIO:intrq = %d\n",state); |
| 366 | 381 | } |
| 367 | 382 | |
| 368 | | static WRITE_LINE_DEVICE_HANDLER( trump_card_drq_w ) |
| 383 | static WRITE_LINE_DEVICE_HANDLER( disk_io_drq_w ) |
| 369 | 384 | { |
| 370 | 385 | //logerror("DiskIO:drq = %d\n",state); |
| 371 | 386 | } |
| r10794 | r10795 | |
| 381 | 396 | |
| 382 | 397 | static ADDRESS_MAP_START( ql_mem, ADDRESS_SPACE_PROGRAM, 8, ql_state ) |
| 383 | 398 | AM_RANGE(0x000000, 0x00bfff) AM_ROM // 48K System ROM |
| 384 | | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_WRITENOP //AM_READ( cart_rom_r ) // 16K Cartridge ROM |
| 385 | | AM_RANGE(0x010000, 0x017fff) AM_ROM AM_WRITENOP //AM_READ( trump_card_rom_r ) // Trump card ROM |
| 399 | AM_RANGE(0x00c000, 0x00ffff) AM_ROM AM_WRITENOP // 16K Cartridge ROM |
| 400 | AM_RANGE(0x010000, 0x017fff) AM_UNMAP // Trump card ROM is mapped in here |
| 386 | 401 | AM_RANGE(0x018000, 0x018003) AM_DEVREAD(ZX8302_TAG, zx8302_device, rtc_r) |
| 387 | 402 | AM_RANGE(0x018000, 0x018001) AM_DEVWRITE(ZX8302_TAG, zx8302_device, rtc_w) |
| 388 | 403 | AM_RANGE(0x018002, 0x018002) AM_DEVWRITE(ZX8302_TAG, zx8302_device, control_w) |
| r10794 | r10795 | |
| 392 | 407 | AM_RANGE(0x018022, 0x018022) AM_DEVREADWRITE(ZX8302_TAG, zx8302_device, mdv_track_r, data_w) |
| 393 | 408 | AM_RANGE(0x018023, 0x018023) AM_DEVREAD(ZX8302_TAG, zx8302_device, mdv_track_r) AM_WRITENOP |
| 394 | 409 | AM_RANGE(0x018063, 0x018063) AM_DEVWRITE(ZX8301_TAG, zx8301_device, control_w) |
| 395 | | AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP //AM_READ(disk_io_r) AM_WRITE(disk_io_w) // 16K Expansion I/O |
| 410 | AM_RANGE(0x01c000, 0x01ffff) AM_UNMAP // 16K Expansion I/O |
| 396 | 411 | AM_RANGE(0x020000, 0x03ffff) AM_DEVREADWRITE(ZX8301_TAG, zx8301_device, data_r, data_w) |
| 397 | 412 | AM_RANGE(0x040000, 0x0fffff) AM_RAM |
| 398 | 413 | ADDRESS_MAP_END |
| r10794 | r10795 | |
| 865 | 880 | |
| 866 | 881 | wd17xx_interface ql_wd17xx_interface = |
| 867 | 882 | { |
| 868 | | DEVCB_LINE(trump_card_dden_r), |
| 869 | | DEVCB_LINE(trump_card_intrq_w), |
| 870 | | DEVCB_LINE(trump_card_drq_w), |
| 883 | DEVCB_LINE(disk_io_dden_r), |
| 884 | DEVCB_LINE(disk_io_intrq_w), |
| 885 | DEVCB_LINE(disk_io_drq_w), |
| 871 | 886 | {FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3} |
| 872 | 887 | }; |
| 873 | 888 | |
| r10794 | r10795 | |
| 917 | 932 | state_save_register_global(machine, m_comdata); |
| 918 | 933 | state_save_register_global(machine, m_baudx4); |
| 919 | 934 | state_save_register_global(machine, printer_char); |
| 935 | state_save_register_global(machine, disk_io_byte); |
| 920 | 936 | } |
| 921 | 937 | |
| 922 | 938 | void ql_state::machine_reset() |
| r10794 | r10795 | |
| 927 | 943 | logerror("disktype=%d\n",disk_type); |
| 928 | 944 | |
| 929 | 945 | printer_char=0; |
| 946 | disk_io_byte=0; |
| 930 | 947 | |
| 931 | 948 | logerror("Configuring RAM\n"); |
| 932 | 949 | // configure RAM |
src/mess/drivers/einstein.c
| r10794 | r10795 | |
| 44 | 44 | Kevin Thacker [MESS driver] |
| 45 | 45 | |
| 46 | 46 | |
| 47 | 2011-Mar-14, Phill Harvey-Smith. |
| 48 | Having traced out the circuit of the TK02 80 coumn card, I have changed the |
| 49 | emulation to match what the hardware does, the emulation was mostly correct, |
| 50 | just some minor issues with the addressing of the VRAM, and bit 0 of the |
| 51 | status register is the latched output of the 6845 DE, and not vblank. |
| 52 | |
| 53 | Also added defines to stop the log being flooded with keyboard messages :) |
| 47 | 54 | |
| 48 | 55 | ******************************************************************************/ |
| 49 | 56 | |
| r10794 | r10795 | |
| 64 | 71 | #include "machine/ram.h" |
| 65 | 72 | #include "includes/einstein.h" |
| 66 | 73 | |
| 74 | #define VERBOSE_KEYBOARD 0 |
| 75 | #define VERBOSE_DISK 0 |
| 76 | |
| 67 | 77 | /*************************************************************************** |
| 68 | 78 | 80 COLUMN DEVICE |
| 69 | 79 | ***************************************************************************/ |
| r10794 | r10795 | |
| 85 | 95 | } |
| 86 | 96 | |
| 87 | 97 | /* TODO: Verify implementation */ |
| 98 | /* From traces of the TK02 board character ROM is addressed by the 6845 as follows |
| 99 | bit 0..2 ra0..ra2 |
| 100 | bit 3..10 data 0..7 from VRAM |
| 101 | bit 11 ra3 |
| 102 | bit 12 jumper M004, this could be used to select two different character |
| 103 | sets. |
| 104 | */ |
| 88 | 105 | static MC6845_UPDATE_ROW( einstein_6845_update_row ) |
| 89 | 106 | { |
| 90 | 107 | einstein_state *einstein = device->machine->driver_data<einstein_state>(); |
| r10794 | r10795 | |
| 95 | 112 | for (i = 0, x = 0; i < x_count; i++, x += 8) |
| 96 | 113 | { |
| 97 | 114 | char_code = einstein->crtc_ram[(ma + i) & 0x07ff]; |
| 98 | | data_byte = data[(char_code << 3) + ra]; |
| 115 | data_byte = data[(char_code << 3) + (ra & 0x07) + ((ra & 0x08) << 8)]; |
| 99 | 116 | |
| 100 | 117 | *BITMAP_ADDR16(bitmap, y, x + 0) = TMS9928A_PALETTE_SIZE + BIT(data_byte, 7); |
| 101 | 118 | *BITMAP_ADDR16(bitmap, y, x + 1) = TMS9928A_PALETTE_SIZE + BIT(data_byte, 6); |
| r10794 | r10795 | |
| 108 | 125 | } |
| 109 | 126 | } |
| 110 | 127 | |
| 111 | | /* bit 0 - vsync state? |
| 112 | | * bit 1 - 0 = 40 column mode (color monitor), 1 = 80 column mode (b/w monitor) |
| 113 | | * bit 2 - 0 = 50Hz, 1 = 60Hz |
| 128 | static WRITE_LINE_DEVICE_HANDLER( einstein_6845_de_changed ) |
| 129 | { |
| 130 | einstein_state *einstein = device->machine->driver_data<einstein_state>(); |
| 131 | einstein->de=state; |
| 132 | } |
| 133 | |
| 134 | /* bit 0 - latched display enabled (DE) from 6845 |
| 135 | * bit 1 - Jumper M003 0 = 40 column mode (color monitor), 1 = 80 column mode (b/w monitor) |
| 136 | * bit 2 - Jumper M002 0 = 50Hz, 1 = 60Hz |
| 137 | * bit 3 - Jumper M001 0 = ???, 1=??? perminently wired high on both the boards I have seen - PHS. |
| 114 | 138 | */ |
| 115 | 139 | static READ8_HANDLER( einstein_80col_state_r ) |
| 116 | 140 | { |
| 117 | 141 | einstein_state *einstein = space->machine->driver_data<einstein_state>(); |
| 118 | 142 | UINT8 result = 0; |
| 119 | 143 | |
| 120 | | result |= einstein->crtc_screen->vblank() ? 1 : 0; |
| 144 | result |= einstein->de; |
| 121 | 145 | result |= input_port_read(space->machine, "80column_dips") & 0x06; |
| 122 | 146 | |
| 123 | | logerror("%s: einstein_80col_state_r %02x\n", space->machine->describe_context(), result); |
| 124 | | |
| 125 | 147 | return result; |
| 126 | 148 | } |
| 127 | 149 | |
| r10794 | r10795 | |
| 185 | 207 | { |
| 186 | 208 | einstein_state *einstein = space->machine->driver_data<einstein_state>(); |
| 187 | 209 | |
| 188 | | logerror("einstein_keyboard_line_write: %02x\n", data); |
| 210 | if (VERBOSE_KEYBOARD) |
| 211 | logerror("einstein_keyboard_line_write: %02x\n", data); |
| 189 | 212 | |
| 190 | 213 | einstein->keyboard_line = data; |
| 191 | 214 | |
| r10794 | r10795 | |
| 200 | 223 | /* re-scan the keyboard */ |
| 201 | 224 | einstein_scan_keyboard(space->machine); |
| 202 | 225 | |
| 203 | | logerror("einstein_keyboard_data_read: %02x\n", einstein->keyboard_data); |
| 226 | if (VERBOSE_KEYBOARD) |
| 227 | logerror("einstein_keyboard_data_read: %02x\n", einstein->keyboard_data); |
| 204 | 228 | |
| 205 | 229 | return einstein->keyboard_data; |
| 206 | 230 | } |
| r10794 | r10795 | |
| 212 | 236 | |
| 213 | 237 | static WRITE8_DEVICE_HANDLER( einstein_drsel_w ) |
| 214 | 238 | { |
| 215 | | logerror("%s: einstein_drsel_w %02x\n", device->machine->describe_context(), data); |
| 239 | if(VERBOSE_DISK) |
| 240 | logerror("%s: einstein_drsel_w %02x\n", device->machine->describe_context(), data); |
| 216 | 241 | |
| 217 | 242 | /* bit 0 to 3 select the drive */ |
| 218 | 243 | if (BIT(data, 0)) wd17xx_set_drive(device, 0); |
| r10794 | r10795 | |
| 306 | 331 | /* bit 5 to 7: graph, control and shift key */ |
| 307 | 332 | data |= input_port_read(space->machine, "EXTRA"); |
| 308 | 333 | |
| 309 | | logerror("%s: einstein_kybintmsk_r %02x\n", space->machine->describe_context(), data); |
| 334 | if(VERBOSE_KEYBOARD) |
| 335 | logerror("%s: einstein_kybintmsk_r %02x\n", space->machine->describe_context(), data); |
| 310 | 336 | |
| 311 | 337 | return data; |
| 312 | 338 | } |
| r10794 | r10795 | |
| 707 | 733 | NULL, |
| 708 | 734 | einstein_6845_update_row, |
| 709 | 735 | NULL, |
| 736 | DEVCB_LINE(einstein_6845_de_changed), |
| 710 | 737 | DEVCB_NULL, |
| 711 | 738 | DEVCB_NULL, |
| 712 | 739 | DEVCB_NULL, |
| 713 | | DEVCB_NULL, |
| 714 | 740 | NULL |
| 715 | 741 | }; |
| 716 | 742 | |
docs/messnew.txt
| r10794 | r10795 | |
| 4 | 4 | ----------------------------- |
| 5 | 5 | - Victor Wondermega M2 (not working) [Justin Kerk] |
| 6 | 6 | - Ferguson Big Board [Miodrag Milanovic] |
| 7 | | - Sanyo MBC-550, MBC-555 (boots but no keyboard) [Phill Harvey-Smith] |
| 7 | - Sanyo MBC-550, MBC-555 (boots but partial keyboard) [Phill Harvey-Smith] |
| 8 | 8 | - Fujitsu FM-Towns II UX (not working) [bernhardh, Anna Wu, Barry Rodewald] |
| 9 | 9 | - Fujitsu FM-Towns II HR (not working) [bernhardh, Anna Wu, Barry Rodewald] |
| 10 | 10 | - Mikrosha-86RK [Miodrag Milanovic] |
| r10794 | r10795 | |
| 55 | 55 | |
| 56 | 56 | - [BBC] Made the SAA505x implementation a device. [Atari Ace] |
| 57 | 57 | |
| 58 | - [Einstein] Fixed addressing of character ROM for 80 column mode, added |
| 59 | dump of 80 column rom, fixed bit 0 of status register to reflect 6845 |
| 60 | DE line. 80 Column interface is now usable. [Phill Harvey-Smith] |
| 61 | |
| 58 | 62 | - [GBA] Fixed EEPROM detection for "Banjo-Kazooie" and "Custom Robo GX". |
| 59 | 63 | [Tim Schuerewegen] |
| 60 | 64 | |
| r10794 | r10795 | |
| 95 | 99 | - [PV1000] 4 new cartridge dumps for the software list. [anondumper] |
| 96 | 100 | |
| 97 | 101 | - [QL] Added support for Miracle Systems Trump Card disk and memory |
| 98 | | interface [Phill Harvey-Smith] |
| 102 | interface |
| 103 | Added support for Sandy SuperDisk disk interface |
| 104 | Fixed up WD177x so disks can be formatted (single sided only) |
| 105 | [Phill Harvey-Smith] |
| 99 | 106 | |
| 100 | 107 | - [SNES] uPD96050 DSP (aka Seta ST-010) is now emulated instead of |
| 101 | 108 | simulated. [R. Belmont, byuu, Dr. Decapitator] |