require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__DEV_TC_TCVAR_H__)) {
    eval 'sub __DEV_TC_TCVAR_H__ () {1;}' unless defined(&__DEV_TC_TCVAR_H__);
    require 'machine/bus.ph';
    require 'dev/tc/tcreg.ph';
    require 'machine/tc_machdep.ph';
    eval 'sub tccf_slot () { $cf_loc[0];}' unless defined(&tccf_slot);
    eval 'sub tccf_offset () { $cf_loc[1];}' unless defined(&tccf_offset);
    eval 'sub TCCF_SLOT_UNKNOWN () {-1;}' unless defined(&TCCF_SLOT_UNKNOWN);
    eval 'sub TCCF_OFFSET_UNKNOWN () {-1;}' unless defined(&TCCF_OFFSET_UNKNOWN);
    eval 'sub TC_SPEED_12_5_MHZ () {25;}' unless defined(&TC_SPEED_12_5_MHZ);
    eval 'sub TC_SPEED_22_5_MHZ () {45;}' unless defined(&TC_SPEED_22_5_MHZ);
    eval 'sub TC_SPEED_25_MHZ () {50;}' unless defined(&TC_SPEED_25_MHZ);
    eval 'sub TC_SPEED_TO_KHZ {
        my($s) = @_;
	    eval q((($s) * (1000/ 2)));
    }' unless defined(&TC_SPEED_TO_KHZ);
}
1;
