require '_h2ph_pre.ph';

unless(defined(&_MC6821_H_)) {
    eval 'sub _MC6821_H_ () {1;}' unless defined(&_MC6821_H_);
    unless(defined(&PIA_REG_PADWIDTH)) {
	eval 'sub PIA_REG_PADWIDTH () {255;}' unless defined(&PIA_REG_PADWIDTH);
    }
    eval 'sub ppra () { ($ua->{pra});}' unless defined(&ppra);
    eval 'sub pddra () { ($ua->{ddra});}' unless defined(&pddra);
    eval 'sub pprb () { ($ub->{prb});}' unless defined(&pprb);
    eval 'sub pddrb () { ($ub->{ddrb});}' unless defined(&pddrb);
    eval 'sub PIA_C1_ENABLE_IRQ () {(1<<0);}' unless defined(&PIA_C1_ENABLE_IRQ);
    eval 'sub PIA_C1_LOW_TO_HIGH () {(1<<1);}' unless defined(&PIA_C1_LOW_TO_HIGH);
    eval 'sub PIA_DDR () {(1<<2);}' unless defined(&PIA_DDR);
    eval 'sub PIA_IRQ2 () {(1<<6);}' unless defined(&PIA_IRQ2);
    eval 'sub PIA_IRQ1 () {(1<<7);}' unless defined(&PIA_IRQ1);
}
1;
