Code: Select all
/* detect CPU type */
moveq.l #0,d1 /* assume 68000 */
movea.w #_illinst,a2
movea.l (a2),a3 /* save illegal instruction vector */
movea.l a7,a1 /* save SP */
move.l #cpuexit,(a2)
CCR_D0 /* move.w ccr,d0 legal on 68010+ */
moveq.l #10,d1 /* assume 68000 */
dc.w $49c0 /* extb.l d0 */
moveq.l #20,d1 /* assume 68020 */
CACR_D0
bset #9,d0 /* set an unused bit */
D0_CACR
CACR_D0
bclr #9,d0
beq.s cpuexit
moveq.l #30,d1 /* assume 68030 */
D0_CACR
cpuexit:
movea.l a1,a7 /* restore SP */
move.l a3,(a2) /* save illegal instruction vector */
move.l d1,(a0)+ /* set _CPU cookie */
sne (_longframe+1).wI tried to patch it to just output some text when a 68000 or 68010 is found, but well, I am clueless on asm :( I can output text on the screen but as soon as I try and do any processing in the above code, it just goes totally nuts trying to compile several hundred lines further down the code :shrug: #clueless
I just thought it would be useful for ST536 TOS to check for a non-030 CPU and output a warning on the screen saying ST536 TOS is not compatible with a 68000 ot 68010 (currently looks like a 020 boots so assume its safe).
So if anyone can help out... :D

