From edcf3936b062de1c24907a67c7a63c3cf206a0a6 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Wed, 13 Jun 2012 20:17:45 +0000 Subject: [PATCH] implement jumper reading assign function pointers for PATA functions, or MMC functions depending on the jumper setting move a '04 gate in the circuit diagram from one slot to another --- .../P8000_WDC_Emulator/Debug/Makefile | 9 ++- .../P8000_WDC_Emulator/Debug/makedep.mk | 2 + .../Hardware/P8000_WDC_Emulator.sch | 6 +- .../P8000_WDC_Emulator.cproj | 53 +++++++++------- .../P8000_WDC_Emulator/wdc_avr.c | 26 +++++++- .../P8000_WDC_Emulator/wdc_avr.h | 16 +++-- .../P8000_WDC_Emulator/wdc_config.h | 13 +++- .../P8000_WDC_Emulator/wdc_drv_mmc.c | 3 +- .../P8000_WDC_Emulator/wdc_drv_pata.c | 62 +++++++++++++++++-- .../P8000_WDC_Emulator/wdc_drv_pata.h | 8 ++- .../P8000_WDC_Emulator/wdc_if_disk.c | 14 +++-- .../P8000_WDC_Emulator/wdc_if_disk.h | 18 +++++- .../P8000_WDC_Emulator/wdc_if_p8000.c | 16 +++-- .../P8000_WDC_Emulator/wdc_main.c | 3 +- 14 files changed, 189 insertions(+), 60 deletions(-) diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile index 5334723..7437ee3 100755 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/Makefile @@ -36,6 +36,7 @@ SUBDIRS := # Add inputs and outputs from these tool invocations to the build variables C_SRCS += \ ../wdc_avr.c \ +../wdc_drv_pata.c \ ../wdc_main.c \ ../wdc_drv_mmc.c \ ../wdc_drv_mmc_perf.c \ @@ -54,6 +55,7 @@ ASM_SRCS += OBJS += \ wdc_avr.o \ +wdc_drv_pata.o \ wdc_main.o \ wdc_drv_mmc.o \ wdc_drv_mmc_perf.o \ @@ -66,6 +68,7 @@ wdc_ram.o OBJS_AS_ARGS += \ wdc_avr.o \ +wdc_drv_pata.o \ wdc_main.o \ wdc_drv_mmc.o \ wdc_drv_mmc_perf.o \ @@ -78,6 +81,7 @@ wdc_ram.o C_DEPS += \ wdc_avr.d \ +wdc_drv_pata.d \ wdc_main.d \ wdc_drv_mmc.d \ wdc_drv_mmc_perf.d \ @@ -90,6 +94,7 @@ wdc_ram.d C_DEPS_AS_ARGS += \ wdc_avr.d \ +wdc_drv_pata.d \ wdc_main.d \ wdc_drv_mmc.d \ wdc_drv_mmc_perf.d \ @@ -127,6 +132,8 @@ OUTPUT_FILE_DEP:= ./makedep.mk + + ./%.o: .././%.c @echo Building file: $< @@ -159,7 +166,7 @@ all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES) $(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) @echo Building target: $@ @echo Invoking: AVR/GNU Linker : (AVR_8_bit_GNU_Toolchain_3.4.0_663) 4.6.2 - $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="P8000_WDC_Emulator.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega1284p + $(QUOTE)C:\Program Files (x86)\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="P8000_WDC_Emulator.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega1284p @echo Finished building target: $@ "C:\Program Files (x86)\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.hex" "C:\Program Files (x86)\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "P8000_WDC_Emulator.elf" "P8000_WDC_Emulator.eep" || exit 0 diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/makedep.mk b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/makedep.mk index 4895925..879e2b8 100755 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/makedep.mk +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/Debug/makedep.mk @@ -4,6 +4,8 @@ wdc_avr.c +wdc_drv_pata.c + wdc_main.c wdc_drv_mmc.c diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.sch b/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.sch index edb9282..da2f5c9 100755 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.sch +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.sch @@ -174,7 +174,7 @@ T 67100 33100 9 8 1 0 0 0 1 T 68500 33100 9 8 1 0 0 0 1 1 T 71000 33400 9 7 1 0 0 0 1 -$Revision: 1.13 $ / $Date: 2012/06/12 17:34:14 $ +$Revision: 1.14 $ / $Date: 2012/06/13 20:17:45 $ T 71000 33100 9 8 1 0 0 0 1 Oliver Lehmann N 50600 59400 51200 59400 4 @@ -1698,7 +1698,7 @@ refdes=D8 T 51300 45500 5 10 0 0 0 0 1 footprint=DIP14 T 50700 42000 5 10 0 0 0 0 1 -slot=2 +slot=4 } N 51800 42500 51900 42500 4 N 51900 36100 51900 42500 4 @@ -1973,6 +1973,6 @@ refdes=D8 T 39700 63800 5 10 0 0 0 6 1 footprint=DIP14 T 40300 60300 5 10 0 0 0 6 1 -slot=4 +slot=2 } N 37600 60800 39200 60800 4 diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj b/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj index ff56132..1bd8594 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/P8000_WDC_Emulator.cproj @@ -45,30 +45,29 @@ - True - True - True - True - True - Optimize (-O1) - True - True - True - True - True - True - True - True - -std=c99 - True - - - m - - - True - True - + True + True + True + True + True + Optimize (-O1) + True + True + True + True + True + True + True + True + -std=c99 + True + + + m + + + True + @@ -81,6 +80,12 @@ compile + + compile + + + compile + compile diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.c index 060b151..18d08ef 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.c @@ -26,13 +26,16 @@ */ /* - * $Id: wdc_avr.c,v 1.1 2012/06/12 17:34:14 olivleh1 Exp $ + * $Id: wdc_avr.c,v 1.2 2012/06/13 20:17:45 olivleh1 Exp $ */ #include #include "wdc_config.h" #include "wdc_avr.h" +#include "wdc_drv_mmc.h" +#include "wdc_drv_pata.h" +#include "wdc_if_disk.h" void wdc_init_avr() { @@ -59,4 +62,25 @@ void wdc_init_avr() configure_pin_sck(); configure_pin_mosi(); configure_pin_mmc_cs(); +} + +void wdc_get_sysconf() +{ + enable_sysconf(); + nop(); + nop(); + if ( jumper_pata_set() ) { + drv_init = pata_init; + drv_read_block = pata_read_block; + drv_write_block = pata_write_block; + drv_read_multiblock = pata_read_multiblock; + drv_write_multiblock = pata_write_multiblock; + } else { + drv_init = mmc_init; + drv_read_block = mmc_read_sector; + drv_write_block = mmc_write_sector; + drv_read_multiblock = mmc_read_multiblock; + drv_write_multiblock = mmc_write_multiblock; + } + disable_sysconf(); } \ No newline at end of file diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.h b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.h index 9d900b9..38dec67 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.h +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_avr.h @@ -26,7 +26,7 @@ */ /* - * $Id: wdc_avr.h,v 1.1 2012/06/12 17:34:14 olivleh1 Exp $ + * $Id: wdc_avr.h,v 1.2 2012/06/13 20:17:45 olivleh1 Exp $ */ @@ -55,11 +55,12 @@ #define configure_pin_addr2() DDR_ADRDEC |= ( 1 << PIN_ADRDEC_ADDR2 ) #define init_addressdecoder() PORT_ADRDEC &= ~( ( 1 << PIN_ADRDEC_ADDR0 ) | ( 1 << PIN_ADRDEC_ADDR1 ) | ( 1 << PIN_ADRDEC_ADDR2 ) ) -#define enable_p8000_transeiver() PORT_ADRDEC |= ( 1 << PIN_ADRDEC_ADDR0 ) -#define disable_p8000_transeiver() PORT_ADRDEC &= ~( 1 << PIN_ADRDEC_ADDR0 ) +#define enable_p8000com() PORT_ADRDEC |= ( 1 << PIN_ADRDEC_ADDR0 ) +#define disable_p8000com() PORT_ADRDEC &= ~( 1 << PIN_ADRDEC_ADDR0 ) +#define enable_sysconf() PORT_ADRDEC |= ( ( 1 << PIN_ADRDEC_ADDR0 ) | ( 1 << PIN_ADRDEC_ADDR1 ) | ( 1 << PIN_ADRDEC_ADDR2 ) ) +#define disable_sysconf() PORT_ADRDEC &= ~( ( 1 << PIN_ADRDEC_ADDR0 ) | ( 1 << PIN_ADRDEC_ADDR1 ) | ( 1 << PIN_ADRDEC_ADDR2 ) ) /* functions dealing with the MMC interface */ - #define configure_pin_miso() DDR_MMC &= ~ ( 1 << PIN_MMC_MISO ) #define configure_pin_sck() DDR_MMC |= ( 1 << PIN_MMC_SCK ) #define configure_pin_mosi() DDR_MMC |= ( 1 << PIN_MMC_MOSI ) @@ -68,6 +69,13 @@ #define mmc_disable() PORT_MMC|= (1< @@ -40,7 +40,6 @@ #define send_dummy_byte() SPDR = 0xFF; wait_till_send_done() #define recv_byte() SPDR #define xmit_byte(x) SPDR = x -#define nop() __asm__ __volatile__ ("nop" ::) #define CMD0 (0x40 + 0) #define CMD1 (0x40 + 1) diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c index 9d9fccd..b593947 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.c @@ -1,6 +1,58 @@ -/* - * wdc_drv_pata.c +/*- + * Copyright (c) 2012 Oliver Lehmann + * All rights reserved. * - * Created: 12.06.2012 21:56:52 - * Author: olivleh1 - */ + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * $Id: wdc_drv_pata.c,v 1.2 2012/06/13 20:17:45 olivleh1 Exp $ + */ + +#include +#include "wdc_config.h" + +uint8_t pata_init () +{ + return 1; +} + +uint8_t pata_read_block ( uint32_t addr, uint8_t *buffer ) +{ + return 1; +} + +uint8_t pata_write_block ( uint32_t addr, uint8_t *buffer ) +{ + return 1; +} + +uint8_t pata_read_multiblock ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ) +{ + return 1; +} + +uint8_t pata_write_multiblock ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ) +{ + return 1; +} diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.h b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.h index 8d1f6d4..18b5b3a 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.h +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_drv_pata.h @@ -3,14 +3,18 @@ * * Created: 12.06.2012 21:57:08 * Author: olivleh1 - */ + */ #ifndef WDC_DRV_PATA_H_ #define WDC_DRV_PATA_H_ +extern uint8_t pata_init (); +extern uint8_t pata_read_block ( uint32_t addr, uint8_t *buffer ); +extern uint8_t pata_write_block ( uint32_t addr, uint8_t *buffer ); - +extern uint8_t pata_read_multiblock ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ); +extern uint8_t pata_write_multiblock ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ); #endif /* WDC_DRV_PATA_H_ */ \ No newline at end of file diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.c index 10107c5..c300339 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.c @@ -26,17 +26,19 @@ */ /* - * $Id: wdc_if_disk.c,v 1.12 2012/06/12 17:34:14 olivleh1 Exp $ + * $Id: wdc_if_disk.c,v 1.13 2012/06/13 20:17:45 olivleh1 Exp $ */ #include +#include "wdc_if_disk.h" #include "wdc_drv_mmc.h" +#include "wdc_drv_pata.h" #include "uart.h" #include "wdc_par.h" uint8_t wdc_init_disk() { - return mmc_init(); + return (*drv_init)(); } uint32_t wdc_sector2diskblock ( uint16_t req_cylinder, uint8_t req_head, uint8_t req_sector ) @@ -56,7 +58,7 @@ uint8_t wdc_write_sector ( uint32_t addr, uint8_t *sector ) { uint8_t errorcode; - errorcode = mmc_write_sector ( addr, sector ); + errorcode = drv_write_block ( addr, sector ); if ( errorcode ) { uart_puts_p ( PSTR ( " write error at address: " ) ); uart_putdw_dec ( addr ); @@ -72,7 +74,7 @@ uint8_t wdc_read_sector ( uint32_t addr, uint8_t *sector ) { uint8_t errorcode; - errorcode = mmc_read_sector ( addr, sector ); + errorcode = drv_read_block ( addr, sector ); if ( errorcode ) { uart_puts_p ( PSTR ( " read error at address: " ) ); uart_putdw_dec ( addr ); @@ -88,7 +90,7 @@ uint8_t wdc_read_multiblock ( uint32_t addr, uint8_t *sector, uint8_t numblocks { uint8_t errorcode; - errorcode = mmc_read_multiblock ( addr, sector, numblocks ); + errorcode = drv_read_multiblock ( addr, sector, numblocks ); if ( errorcode ) { uart_puts_p ( PSTR ( " read error at address: " ) ); uart_putdw_dec ( addr ); @@ -104,7 +106,7 @@ uint8_t wdc_write_multiblock ( uint32_t addr, uint8_t *sector, uint8_t numblocks { uint8_t errorcode; - errorcode = mmc_write_multiblock ( addr, sector, numblocks ); + errorcode = drv_write_multiblock ( addr, sector, numblocks ); if ( errorcode ) { uart_puts_p ( PSTR ( " write error at address: " ) ); uart_putdw_dec ( addr ); diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.h b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.h index 1bf62ab..16a0b38 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.h +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_disk.h @@ -26,12 +26,14 @@ */ /* - * $Id: wdc_if_disk.h,v 1.7 2012/06/12 17:34:14 olivleh1 Exp $ + * $Id: wdc_if_disk.h,v 1.8 2012/06/13 20:17:45 olivleh1 Exp $ */ #ifndef WDC_IF_DISK_H_ #define WDC_IF_DISK_H_ +#include + extern uint8_t wdc_init_disk(); extern uint32_t wdc_sector2diskblock ( uint16_t req_cylinder, uint8_t req_head, uint8_t req_sector ); extern uint32_t wdc_p8kblock2diskblock ( uint32_t blockno ); @@ -40,6 +42,20 @@ extern uint8_t wdc_read_sector ( uint32_t addr, uint8_t *sector ); extern uint8_t wdc_read_multiblock ( uint32_t addr, uint8_t *sector, uint8_t numblocks ); extern uint8_t wdc_write_multiblock ( uint32_t addr, uint8_t *sector, uint8_t numblocks ); +typedef uint8_t (*t_drv_init) (); + +typedef uint8_t (*t_drv_read_block) ( uint32_t addr, uint8_t *buffer ); +typedef uint8_t (*t_drv_write_block) ( uint32_t addr, uint8_t *buffer ); + +typedef uint8_t (*t_drv_read_multiblock) ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ); +typedef uint8_t (*t_drv_write_multiblock) ( uint32_t addr, uint8_t *buffer, uint8_t numblocks ); + +t_drv_init drv_init; +t_drv_read_block drv_read_block; +t_drv_write_block drv_write_block; +t_drv_read_multiblock drv_read_multiblock; +t_drv_write_multiblock drv_write_multiblock; + #define WDC_BLOCKLEN 512 #endif /* WDC_IF_DISK_H_ */ \ No newline at end of file diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.c index b8bd493..2f450df 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.c @@ -26,7 +26,7 @@ */ /* - * $Id: wdc_if_p8000.c,v 1.10 2012/06/12 17:43:38 olivleh1 Exp $ + * $Id: wdc_if_p8000.c,v 1.11 2012/06/13 20:17:45 olivleh1 Exp $ */ #include "wdc_config.h" @@ -36,8 +36,6 @@ #include "wdc_if_p8000.h" #include "wdc_par.h" -#define nop() __asm__ __volatile__ ("nop" ::) - void wdc_wait_for_reset() { while ( !isset_info_reset() ) { @@ -62,10 +60,10 @@ uint8_t wdc_read_data_from_p8k ( uint8_t *buffer, uint16_t count, uint8_t wdc_st return 0; while ( !isset_info_wdardy() ); do { - enable_p8000_transeiver(); /* this also generates /ASTB in the moment /WDARDY gets low with a 7403 */ + enable_p8000com(); /* this also generates /ASTB in the moment /WDARDY gets low with a 7403 */ while ( isset_info_wdardy() ); *buffer++ = port_data_get(); - disable_p8000_transeiver(); /* this additionally brings /ASTB to high */ + disable_p8000com(); /* this additionally brings /ASTB to high */ while ( !isset_info_wdardy() ); datacnt++; } while ( datacnt < count ); @@ -85,18 +83,18 @@ void wdc_write_data_to_p8k ( uint8_t *buffer, uint16_t count, uint8_t wdc_status configure_port_data_write(); while ( !isset_info_wdardy() ); do { - enable_p8000_transeiver(); /* this also generates /ASTB in the moment /WDARDY gets low with a 7403 */ + enable_p8000com(); /* this also generates /ASTB in the moment /WDARDY gets low with a 7403 */ while ( isset_info_wdardy() ); port_data_set ( *buffer++ ); - disable_p8000_transeiver(); /* this additionally brings /ASTB to high */ + disable_p8000com(); /* this additionally brings /ASTB to high */ while ( !isset_info_wdardy() ); datacnt++; } while ( datacnt < count ); while ( isset_info_wdardy() ); - enable_p8000_transeiver(); + enable_p8000com(); nop(); - disable_p8000_transeiver(); + disable_p8000com(); configure_port_data_read(); while ( !isset_info_wdardy() ); port_info_set ( INFO_CLEAR ); diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c index 06e07e2..7ba394a 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c @@ -29,7 +29,7 @@ /* * P8000 WDC Emulator * - * $Id: wdc_main.c,v 1.27 2012/06/12 17:34:14 olivleh1 Exp $ + * $Id: wdc_main.c,v 1.28 2012/06/13 20:17:45 olivleh1 Exp $ * * TODO: - right now, BTT entries are not taken into account */ @@ -417,6 +417,7 @@ void atmega_setup ( void ) set_sleep_mode ( SLEEP_MODE_IDLE ); uart_init(); wdc_init_avr(); + wdc_get_sysconf(); if ( wdc_init_disk() ) { wdc_set_no_disk(); }