#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include "device.h"
#include "diskimage.h"
#include "machine.h"
#include "memory.h"
#include "misc.h"
#include "thirdparty/wdcreg.h"
Go to the source code of this file.
Classes | |
struct | wdc_data |
Macros | |
#define | DEV_WDC_LENGTH 8 |
#define | WDC_TICK_SHIFT 14 |
#define | WDC_MAX_SECTORS 512 |
#define | WDC_INBUF_SIZE (512*(WDC_MAX_SECTORS+1)) |
#define | COMMAND_RESET 0x100 |
#define | MAX_SECTORS_PER_CHUNK 64 |
Functions | |
DEVICE_TICK (wdc) | |
int | wdc_set_io_enabled (struct wdc_data *d, int io_enabled) |
void | wdc__read (struct cpu *cpu, struct wdc_data *d) |
void | wdc__write (struct cpu *cpu, struct wdc_data *d) |
DEVICE_ACCESS (wdc_altstatus) | |
void | wdc_command (struct cpu *cpu, struct wdc_data *d, int idata) |
DEVICE_ACCESS (wdc) | |
DEVINIT (wdc) | |
Variables | |
int | quiet_mode |
#define COMMAND_RESET 0x100 |
Definition at line 98 of file dev_wdc.cc.
#define DEV_WDC_LENGTH 8 |
Definition at line 45 of file dev_wdc.cc.
#define MAX_SECTORS_PER_CHUNK 64 |
#define WDC_INBUF_SIZE (512*(WDC_MAX_SECTORS+1)) |
Definition at line 48 of file dev_wdc.cc.
#define WDC_MAX_SECTORS 512 |
Definition at line 47 of file dev_wdc.cc.
#define WDC_TICK_SHIFT 14 |
Definition at line 46 of file dev_wdc.cc.
DEVICE_ACCESS | ( | wdc | ) |
Definition at line 539 of file dev_wdc.cc.
References wdc_data::addr_mult, data, fatal(), wdc_data::io_enabled, MEM_READ, MEM_WRITE, memory_readmax64(), and wd_data.
DEVICE_ACCESS | ( | wdc_altstatus | ) |
Definition at line 364 of file dev_wdc.cc.
References data.
DEVICE_TICK | ( | wdc | ) |
Definition at line 101 of file dev_wdc.cc.
References wdc_data::int_assert, INTERRUPT_ASSERT, and wdc_data::irq.
DEVINIT | ( | wdc | ) |
Definition at line 906 of file dev_wdc.cc.
References devinit::addr, devinit::addr_mult, wdc_data::addr_mult, wdc_data::base_drive, CHECK_ALLOCATION, wdc_data::cyls, wdc_data::data_debug, DEV_WDC_LENGTH, diskimage_exist(), diskimage_getchs(), DISKIMAGE_IDE, DM_DEFAULT, wdc_data::error, wdc_data::heads, wdc_data::inbuf, INTERRUPT_CONNECT, devinit::interrupt_path, wdc_data::io_enabled, wdc_data::irq, devinit::machine, machine_add_tickfunction(), MACHINE_HPCMIPS, MACHINE_IQ80321, MACHINE_MACPPC, machine::machine_type, machine::memory, memory_device_register(), devinit::name, devinit::return_ptr, wdc_data::sectors_per_track, WDC_INBUF_SIZE, WDC_TICK_SHIFT, and zeroed_alloc().
Definition at line 266 of file dev_wdc.cc.
References wdc_data::base_drive, wdc_data::cyl_hi, wdc_data::cyl_lo, diskimage_access(), DISKIMAGE_IDE, wdc_data::drive, wdc_data::head, wdc_data::heads, wdc_data::inbuf, wdc_data::inbuf_head, wdc_data::lba, cpu::machine, MAX_SECTORS_PER_CHUNK, wdc_data::seccnt, wdc_data::sector, wdc_data::sectors_per_track, and WDC_INBUF_SIZE.
Referenced by wdc_command().
Definition at line 316 of file dev_wdc.cc.
References wdc_data::cur_command, wdc_data::cyl_hi, wdc_data::cyl_lo, wdc_data::drive, wdc_data::head, wdc_data::heads, wdc_data::lba, wdc_data::seccnt, wdc_data::sector, wdc_data::sectors_per_track, wdc_data::write_count, wdc_data::write_in_progress, and wdc_data::write_offset.
Referenced by wdc_command().
Definition at line 394 of file dev_wdc.cc.
References wdc_data::atapi_cmd_in_progress, ATAPI_IDENTIFY_DEVICE, wdc_data::base_drive, wdc_data::cur_command, wdc_data::cyl_hi, wdc_data::cyl_lo, debug, diskimage_exist(), DISKIMAGE_IDE, diskimage_is_a_cdrom(), wdc_data::drive, wdc_data::error, wdc_data::head, wdc_data::int_assert, cpu::machine, wdc_data::precomp, quiet_mode, wdc_data::seccnt, wdc_data::sector, SET_FEATURES, wdc__read(), wdc__write(), WDCC_IDENTIFY, WDCC_IDP, WDCC_READ, WDCC_READMULTI, WDCC_RECAL, WDCC_WRITE, WDCC_WRITEMULTI, WDCE_ABRT, and WDSF_SET_MODE.
int wdc_set_io_enabled | ( | struct wdc_data * | d, |
int | io_enabled | ||
) |
Definition at line 119 of file dev_wdc.cc.
References wdc_data::io_enabled.
Referenced by piix_ide_cfg_reg_write().
int quiet_mode |
Definition at line 78 of file main.cc.
Referenced by wdc_command().