Code: Select all
#if STBOOK
hdselect: tst.w d0 /* if != 0 then select HD */
bne.s hdselec2
clr.b d0 /* SD mode */
bra.s hdselec3
hdselec2: move.b #$80,d0 /* HD mode is bit 7 in PORT A on the sound chip */
hdselec3: move sr,d2 /* save status register */
move.b #14,ABSW(psgsel) /* select port on GI chip */
move.b ABSW(psgrd),d1 /* get current bits */
bclr #7,d1 /* clear HD bit */
or.b d0,d1 /* or-in our new bit */
move.b #14,ABSW(psgsel) /* select port on GI chip */
move.b d1,ABSW(psgwr) /* and write 'em back out there */
move d2,sr /* restore status register */
rts
#endif