diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.pdf b/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.pdf index 1e24bc1..b80d4fa 100644 Binary files a/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.pdf and b/P8000_WDC_Emulator/P8000_WDC_Emulator/Hardware/P8000_WDC_Emulator.pdf differ 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 73a42ef..fb3a8e7 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.11 $ / $Date: 2012/06/10 08:51:17 $ +$Revision: 1.12 $ / $Date: 2012/06/10 21:03:24 $ T 71000 33100 9 8 1 0 0 0 1 Oliver Lehmann N 50600 59400 51200 59400 4 @@ -1055,8 +1055,8 @@ N 35300 40600 32600 40600 4 N 35300 40300 32600 40300 4 N 33800 38900 33800 41200 4 N 33500 38900 33500 40900 4 -N 33200 38900 33200 40900 4 -N 32900 38900 32900 40900 4 +N 33200 38900 33200 40600 4 +N 32900 38900 32900 40300 4 N 41600 42500 40800 42500 4 N 40800 38800 40800 42500 4 N 40800 38800 37300 38800 4 diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_config.h b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_config.h index 9727018..813b1c2 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_config.h +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_config.h @@ -26,7 +26,7 @@ */ /* - * $Id: wdc_config.h,v 1.12 2012/06/09 19:47:31 olivleh1 Exp $ + * $Id: wdc_config.h,v 1.13 2012/06/10 21:03:23 olivleh1 Exp $ */ @@ -81,6 +81,6 @@ #define MEASURE_SDCARD_TIME 1 #undef MEASURE_SDCARD_TIME -#define DEBUG 0 +#define DEBUG 3 #endif /* CONFIG_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 9009e33..6dfaa09 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.6 2012/06/09 19:47:31 olivleh1 Exp $ + * $Id: wdc_if_p8000.c,v 1.7 2012/06/10 21:03:23 olivleh1 Exp $ */ #include "config.h" @@ -48,6 +48,7 @@ void wdc_init_ports() configure_pin_wdardy(); configure_pin_tr(); configure_pin_reset(); + PORTD |= ( ( 1 << PIND5 ) ); configure_port_data_read(); } @@ -77,9 +78,11 @@ uint8_t wdc_read_data_from_p8k ( uint8_t *buffer, uint16_t count, uint8_t wdc_st while ( !isset_info_wdardy() ); do { while ( isset_info_wdardy() ); - port_info_set ( INFO_ASTB | wdc_status ); + PORTD |= ( ( 1 << PIND5 ) ); + nop(); + nop(); buffer[datacnt] = ( uint8_t ) port_data_get(); - port_info_set ( wdc_status ); + PORTD &= ~ ( ( 1 << PIND5 ) ); while ( !isset_info_wdardy() ); datacnt++; } while ( datacnt < count ); @@ -100,17 +103,19 @@ void wdc_write_data_to_p8k ( uint8_t *buffer, uint16_t count, uint8_t wdc_status while ( !isset_info_wdardy() ); do { while ( isset_info_wdardy() ); - port_info_set ( INFO_TR | INFO_ASTB | wdc_status ); + PORTD |= ( ( 1 << PIND5 ) ); + nop(); + nop(); port_data_set ( buffer[datacnt] ); - port_info_set ( INFO_TR | wdc_status ); - while ( !isset_info_wdardy() ); + PORTD &= ~ ( ( 1 << PIND5 ) ); + while ( !isset_info_wdardy() ); datacnt++; } while ( datacnt < count ); while ( isset_info_wdardy() ); - port_info_set ( INFO_TR | INFO_ASTB | wdc_status ); + PORTD |= ( ( 1 << PIND5 ) ); nop(); - port_info_set ( INFO_TR | wdc_status ); + PORTD &= ~ ( ( 1 << PIND5 ) ); configure_port_data_read(); while ( !isset_info_wdardy() ); port_info_set ( INFO_CLEAR ); diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.h b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.h index 2b54aa5..b121b76 100644 --- a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.h +++ b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_if_p8000.h @@ -26,13 +26,13 @@ */ /* - * $Id: wdc_if_p8000.h,v 1.8 2012/06/09 19:47:31 olivleh1 Exp $ + * $Id: wdc_if_p8000.h,v 1.9 2012/06/10 21:03:23 olivleh1 Exp $ */ #ifndef WDC_IF_PIO_H_ #define WDC_IF_PIO_H_ -#define DELAY_PIO_US 450 +#define DELAY_PIO_US 550 #define configure_port_data_read() DDR_DATA = 0x00 /* programs the DATA-Port as Input-only for reading from the P8000*/ #define configure_port_data_write() DDR_DATA = 0xff /* programs the DATA-Port as Out-only for writing to the P8000*/ diff --git a/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c b/P8000_WDC_Emulator/P8000_WDC_Emulator/wdc_main.c index 7a993f3..3d5d883 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.24 2012/06/09 19:47:31 olivleh1 Exp $ + * $Id: wdc_main.c,v 1.25 2012/06/10 21:03:23 olivleh1 Exp $ * * TODO: - right now, BTT entries are not taken into account */ @@ -81,10 +81,18 @@ main ( void ) uint8_t errorcode; uint8_t i8; #endif +DDRD = 0xff; +PORTD = 0x00; atmega_setup(); uart_puts_p ( PSTR ( "P8000 WDC Emulator 0.90\n" ) ); +/* +configure_port_data_read(); +PORTD |= ((1<