From 5e48d8259fb2857ad4441de77cbacddd50a21ec0 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 27 Aug 2014 14:24:42 +0200 Subject: added bitmap fonts and put string for vesa modes --- kernel/floppy.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'kernel/floppy.c') diff --git a/kernel/floppy.c b/kernel/floppy.c index 8be440f..a373ec7 100644 --- a/kernel/floppy.c +++ b/kernel/floppy.c @@ -343,7 +343,7 @@ void flpydsk_write_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { flpydsk_send_command ( head); // first head should match with above! flpydsk_send_command ( sector); flpydsk_send_command ( FLPYDSK_SECTOR_DTL_512 ); - flpydsk_send_command ( 3 ); // number of tracks we want + flpydsk_send_command ( 1 ); // number of tracks we want /* flpydsk_send_command ( @@ -367,7 +367,7 @@ void flpydsk_write_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { } void flpydsk_read_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { - sector=1; + //sector=1; //! set the DMA for read transfer flpydsk_dma_read (); @@ -376,7 +376,6 @@ void flpydsk_read_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { uint32_t st0, cyl; - //! read in a sector flpydsk_send_command ( FDC_CMD_READ_SECT | FDC_CMD_EXT_MULTITRACK | @@ -386,12 +385,14 @@ void flpydsk_read_sector_imp (uint8_t head, uint8_t track, uint8_t sector) { flpydsk_send_command ( head); flpydsk_send_command ( sector); flpydsk_send_command ( FLPYDSK_SECTOR_DTL_512 ); - flpydsk_send_command ( 3 ); // number of tracks we want + flpydsk_send_command ( 1 ); // number of tracks we want + /* flpydsk_send_command ( ( ( sector + 1 ) >= FLPY_SECTORS_PER_TRACK ) ? FLPY_SECTORS_PER_TRACK : sector + 1 ); */ + flpydsk_send_command ( FLPYDSK_GAP3_LENGTH_3_5 ); flpydsk_send_command ( 0xff ); @@ -543,7 +544,7 @@ void floppy_init() // scr_put_string_nl("floppy: test read (sector 0)."); - flpydsk_read_sector(0); + flpydsk_read_sector(64); //0x8000 here the data starts! scr_put_string_nl("floppy: data: "); uint16_t *dma=0xb000; int i; @@ -552,9 +553,10 @@ void floppy_init() scr_put_string_nl(""); - // + /* scr_put_string_nl("floppy: test write (sector 100)."); flpydsk_write_sector(100); + */ } -- cgit v1.2.3