firmware/bus.c
/**
 *  Request control of the bus from the w6502
 */
Request control of the bus from the w6502
Request control of the bus from the w6502
uint8_t bus_request(void)
{
  uint8_t i = 255;
  if (GET_RDY) {  
    RDY_OUTPUT;
    RDY_LO;
    while (GET_RDY) {
      if (i-- == 0) {
	printf_P(PSTR("HALT request timed out\n"));
	RDY_INPUT;
	return 0;
      }
    }
  }
  BE_LO;  
  RAME_OUTPUT;
  RAME_HI; 
  RW_OUTPUT;
  ADDR_OUTPUT;
  DATA_INPUT;
  return 1;
}
uint8_t bus_request ( void ) { uint8_t i = 255 ; if ( GET_RDY ) { RDY_OUTPUT ; RDY_LO ; while ( GET_RDY ) { if ( i -- == 0 ) { printf_P ( PSTR ( " \n " ) ) ; RDY_INPUT ; return 0 ; } } } BE_LO ; RAME_OUTPUT ; RAME_HI ; RW_OUTPUT ; ADDR_OUTPUT ; DATA_INPUT ; return 1 ; }
Request control of the bus from the w6502
Request control of the bus from the w6502
// not halted //PHI2_TOGGLE; // cpu bus HI-Z // disable ram