diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-03-19 23:05:34 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-03-19 23:05:34 +0000 |
commit | baca51faff03df59386c95d9478ede18b5be5ec8 (patch) | |
tree | 91c42f212c87d947d4bacf595c26907a1de41d4f /hw/pc.c | |
parent | bc51c5c989c12b3936b78c5772a3308629a7484c (diff) |
updated floppy driver: formatting code, disk geometry auto detect (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@671 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -57,6 +57,7 @@ int speaker_data_on; int dummy_refresh_clock; +static fdctrl_t *floppy_controller; static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) { @@ -106,8 +107,8 @@ static void cmos_init(int ram_size, int boot_device) /* floppy type */ - fd0 = fdctrl_get_drive_type(0); - fd1 = fdctrl_get_drive_type(1); + fd0 = fdctrl_get_drive_type(floppy_controller, 0); + fd1 = fdctrl_get_drive_type(floppy_controller, 1); s->cmos_data[0x10] = 0; switch (fd0) { @@ -370,7 +371,7 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device, DMA_init(); SB16_init(); - fdctrl_init(6, 2, 0, 0x3f0, fd_table); + floppy_controller = fdctrl_init(6, 2, 0, 0x3f0, fd_table); cmos_init(ram_size, boot_device); } |