So I'm currently gathering parts to hopefully start offering kits on Tindie, and while most of the bits can be ordered directly from Farnell, some are more tricky to get hold of - especially the MC68010 and MC68901, since they're no longer in production. So I resorted to eBay, and received the first shipment of six MC68010s today. On opening the package, I was.... suspicious.
These are the six ICs I received. On the right is a genuine MC68010P10. On the left are five that are either fake, or just rebadged, 68000s. The things that immediately made me suspicious:
- The Motorola logo is incomplete
- The font isn't right
- The date code suggests these were made in week 1, 2019 (or possibly 1919!)
You can't see it in this picture, but the surface of the ICs is also rough, suggesting the original markings have been removed.
Sure enough, I threw them into a board and ran a quick software test which verified that these are, in fact, 68000s. They seem to work fine as 68000s, but trying to do anything 68010-specific (setting the VBR in my tests) results in an immediate illegal instruction exception.
Fake ICs are sadly a fact of life, and luckily I'm working with my own design which explicitly specifies the 68010. I know that people buy these as an "upgrade" for Amigas and such, and I worry that people who do that will likely never know they're running a fake, as the software for those computers won't usually use any 68010-specific features.
This bit of code will check whether you have a 68010 or not:
movea.l into VBRmovec.l A0,VBR ; ... and load
If run on a 68000, this will cause an illegal instruction exception.
Because I felt like verifying that setting VBR actually worked too (unlikely it wouldn't I guess but y'know, completeness), I decided to expand this a bit to check these chips on the rosco_m68k:
MFPBASE equ $F80000 ifd REVISION_0 MFP_GPDR equ MFPBASE+$01 MFP_IERA equ MFPBASE+$31 MFP_IERB equ MFPBASE+$09 MFP_ISRB equ MFPBASE+$05 else MFP_GPDR equ MFPBASE+$01 MFP_IERA equ MFPBASE+$07 MFP_IERB equ MFPBASE+$09 MFP_ISRB equ MFPBASE+$11 endif section .text ; Entry point here! kmain:: move.w #$2700,SR ; Disable interrupts movea.l #$20000,A0 ; Use $20000 as vector base... movec.l A0,VBR ; ... and load into VBR move.l #TICK_HANDLER,$20114 ; Set up tick handler move.w #$2000,SR ; Re-enable interrupts .LOOP bra.s .LOOP GENERIC_HANDLER: rte TICK_HANDLER: move.l D0,-(A7) ; Save D0 move.w $408,D0 ; Read SDB byte 8 tst.w D0 ; Is it zero? bne.s .TICK_HANDLER_DONE ; Done if not ; counted to zero, so toggle indicator 0 and reset counter bchg.b #0,MFP_GPDR move.w #25,D0 .TICK_HANDLER_DONE: sub.w #$1,D0 ; Decrement counter... move.w D0,$408 ; ... and write back to SDB move.l (A7)+,D0 ; Restore D0 move.b #~$20,MFP_ISRB ; Clear interrupt-in-service rte ; We're done
(full code here)
Right... Back to trying to get hold of some CPUs for these kits I've been talking about.....