firmware/bus.c
/**
 *  Return control of the bus to the w6502
 */
Return control of the bus to the w6502
Return control of the bus to the w6502
void bus_release(void)
{
    uint8_t i = 255;
    RW_INPUT;
    ADDR_INPUT;
    DATA_INPUT;
    SET_DATA(0); 
    SET_ADDRLO(0);
    BE_HI;  
    RAME_LO;  
    RDY_INPUT;
    while (!GET_RDY)  {
      PHI2_TOGGLE;
      if (i-- == 0) {
	printf_P(PSTR("bus release timed out\n"));
	return;
      }
    }
}
void bus_release ( void ) { uint8_t i = 255 ; RW_INPUT ; ADDR_INPUT ; DATA_INPUT ; SET_DATA ( 0 ) ; SET_ADDRLO ( 0 ) ; BE_HI ; RAME_LO ; RDY_INPUT ; while ( ! GET_RDY ) { PHI2_TOGGLE ; if ( i -- == 0 ) { printf_P ( PSTR ( " \n " ) ) ; return ; } } }
Return control of the bus to the w6502
Return control of the bus to the w6502
// Disable pullups on data and address lines // cpu bus active // enable ram // Clock the w6502 until it takes back control of the bus