In order to write the default firmware on the TinyUSBboard we need a programmer.
You can use an existing TinyUSBboard (both rev.3 and the SMT rev.4 version) as programmer.
The method to create a TinyUSBboard as a programmer can be found here.
Setup your breadboard according to this image:
(Note that the ATmega8 pinout is basically the same as ATmega328 and others)
Check if new versions are available on the Matrixstorm website.
Pick the version for the target chip.
Download the bootloader firmware for the ATmega328-PU (without "P") and save it as
Cd with the terminal to the place where the file is saved and paste the following:
avrdude -c usbasp -p atmega328 -U flash:w:default328_enus_lfxf7_hfxd0_efx04_v0x97x1.hex:i -U lfuse:w:0xf7:m -U hfuse:w:0xd0:m -U efuse:w:0x04:m -B9
Now the new ATmega328-PU is flashed with the default firmware and can be used in the rev.3 board (or a new one).
Now the new ATmega chip is flashed the original ATmega8 could be changed back to the default state.
Download the latest firmware for the ATmega8.
Save it as
default_enus_lfx3f_hfxc0_v0x97x1.hex and upload with Avrdude like this:
avrdude -c usbasp -p atmega8 -U flash:w:default_enus_lfx3f_hfxc0_v0x97x1.hex