src/mess/machine/fm_scsi.h
| r10600 | r10601 | |
| 16 | 16 | #define FMSCSI_LINE_MSG 0x20 |
| 17 | 17 | #define FMSCSI_LINE_CD 0x10 |
| 18 | 18 | #define FMSCSI_LINE_BSY 0x08 |
| 19 | #define FMSCSI_LINE_EX 0x04 |
| 19 | 20 | #define FMSCSI_LINE_INT 0x02 |
| 20 | 21 | #define FMSCSI_LINE_PERR 0x01 |
| 21 | 22 | |
| 22 | 23 | // SCSI output lines (to target) |
| 23 | 24 | #define FMSCSI_LINE_WEN 0x80 |
| 24 | 25 | #define FMSCSI_LINE_IMSK 0x40 |
| 26 | #define FMSCSI_LINE_RMSK 0x20 |
| 25 | 27 | #define FMSCSI_LINE_ATN 0x10 |
| 28 | #define FMSCSI_LINE_WRD 0x08 |
| 26 | 29 | #define FMSCSI_LINE_SEL 0x04 |
| 27 | 30 | #define FMSCSI_LINE_DMAE 0x02 |
| 28 | 31 | #define FMSCSI_LINE_RST 0x01 |
src/mess/drivers/fmtowns.c
| r10600 | r10601 | |
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | static TIMER_CALLBACK(towns_wait_end) |
| 309 | { |
| 310 | towns_state* state = machine->driver_data<towns_state>(); |
| 311 | cpu_set_input_line(state->maincpu,INPUT_LINE_HALT,CLEAR_LINE); |
| 312 | } |
| 313 | |
| 308 | 314 | static READ8_HANDLER(towns_sys6c_r) |
| 309 | 315 | { |
| 310 | 316 | logerror("SYS: (0x6c) Timer? read\n"); |
| r10600 | r10601 | |
| 316 | 322 | towns_state* state = space->machine->driver_data<towns_state>(); |
| 317 | 323 | // logerror("SYS: (0x6c) write to timer (0x%02x)\n",data); |
| 318 | 324 | state->ftimer -= 0x54; |
| 325 | // halts the CPU for a period of time (exact length unknown) |
| 326 | cpu_set_input_line(state->maincpu,INPUT_LINE_HALT,ASSERT_LINE); |
| 327 | state->towns_wait_timer->adjust(attotime::from_usec(1),0,attotime::zero); |
| 319 | 328 | } |
| 320 | 329 | |
| 321 | 330 | static READ8_HANDLER(towns_dma1_r) |
| r10600 | r10601 | |
| 2062 | 2071 | // Keyboard (8042 MCU) |
| 2063 | 2072 | AM_RANGE(0x0600,0x0607) AM_READWRITE8(towns_keyboard_r, towns_keyboard_w,0x00ff00ff) |
| 2064 | 2073 | // SCSI controller |
| 2065 | | AM_RANGE(0x0c30,0x0c33) AM_DEVREADWRITE8_MODERN("scsi",fmscsi_device,fmscsi_r,fmscsi_w,0x00ff00ff) |
| 2074 | AM_RANGE(0x0c30,0x0c37) AM_DEVREADWRITE8_MODERN("scsi",fmscsi_device,fmscsi_r,fmscsi_w,0x00ff00ff) |
| 2066 | 2075 | // CMOS |
| 2067 | 2076 | AM_RANGE(0x3000,0x3fff) AM_READWRITE8(towns_cmos8_r, towns_cmos8_w,0x00ff00ff) |
| 2068 | 2077 | // Something (MS-DOS wants this 0x41ff to be 1) |
| r10600 | r10601 | |
| 2300 | 2309 | state->towns_rtc_timer = machine->scheduler().timer_alloc(FUNC(rtc_second)); |
| 2301 | 2310 | state->towns_kb_timer = machine->scheduler().timer_alloc(FUNC(poll_keyboard)); |
| 2302 | 2311 | state->towns_mouse_timer = machine->scheduler().timer_alloc(FUNC(towns_mouse_timeout)); |
| 2312 | state->towns_wait_timer = machine->scheduler().timer_alloc(FUNC(towns_wait_end)); |
| 2303 | 2313 | |
| 2304 | 2314 | // CD-ROM init |
| 2305 | 2315 | state->towns_cd.read_timer = machine->scheduler().timer_alloc(FUNC(towns_cdrom_read_byte), (void*)machine->device("dma_1")); |