The code above will set the IIgs to 1 MHz.
TEXT2COPY info:
*
* Due to limited space, differentiation between Gyro
* and gs can't insert here, thus move TEXT2COPY to
* TEXT2COPYFF. Entry point must be maintained.
*
* This routine installs a heartbeat task
* that copies text page 2 to bank E0 for
* the Mega // to display on every VBL.
*
* This is a toggle (enable/disable) routine.
* If auto text copy is on, on entry, it is disabled on exit.
* If auto text copy is off, on entry, it is enabled on exit.
*
and
*
* This routine installs a heartbeat task
* that copies text page 2 to bank E0 for
* the Mega // to display on every VBL.
*
* This is a toggle (enable/disable) routine.
* If auto text copy is on, on entry, it is disabled on exit.
* If auto text copy is off, on entry, it is enabled on exit.
*
* For Gyro, no heart beat task is required.
* Toggle hardware bit5 of shadow register, $c035
* is equivalent to software copying.
*
* This routine can be invoked from Classic Desk Accessory
* or mainside entry point $f962. In the case of CDA, an
* interrupt occurred and the enviroments are stored and restored
* during in and out of the CDA, this includes store and restore of
* SHADOW reg, therefore it is necessay to update IRQ_SHADOW to
* reflect the most current states of shadowing. When exits, then
* restoring of SHADOW reg from IRQ_SHADOW would show the users'
* preference states.
and
* A routine to set text page2 shadowing register ($c035, bit5)
* probably for original //gs and new machine
* For gs, when exit 'c'=0 else 'c'=1
; SEG $FF
SETTEXT2REG EQU *
; SEG $00
PHB ; Save data bank
JSR DBTOE1 ;Set to $e1 bank
LDA |KEYUCVER ;Get keyucver #
CMP #$06 ;If > $06, then using new CYA chip
BCC @2 ;Bra if not, old FPI chip
LDA |TP2MODE ;Chk for already on/off
BNE @2 ;Bra if already off
LDA #$20 ;Else it is on, need to turn off
TSB SHADOW ;Set off
BRA @3 ;Bra to end
@2 EQU *
LDA #$20 ;Previous on is off, set on now
TRB SHADOW ;Set on, no effect for gs board
@3 PLB ;Restore data bank
RTS ;Return to caller
To answer your question: I do not know but it is possible that the "original" speed be restored. If so, code can be written as:
CLOCKDATA = $c034
CYAREG = $c036
TEXT2COPY = $f962
IDROUTINE = $fe1f
SEC
JSR IDROUTINE
BCS notIIgs
JSR TEXT2COPY
LDA #$0f
TRB CLOCKDATA
LDA #$80
TRB CYAREG
notIIgs ...