Monday, March 14, 2016

MCS-8031 mask Tiny Basic with Acey-ducey.

Rarer than GOLD !

  Something has been bugging me for years. I need to get it out in the public sphere before i loose the info and before the chips involved all end up in land fill.

 If anyone has every played with the old Intel ( and others) 8031 and 8051 controllers they should know they are the same chip except the 8031 had no internal ROM.  To force the 8031 to use external ROM the EA pin needs to be held low. We are told the 8031 had no internal ROM but most DO. Some have unstable ROM that change state with temperature . Some look like they are full of 0xFF. Some have code with errors but some have perfectly good and very interesting code. These good chips are 8051 runs where the customer cancelled the order or 'someone' made too many. Intel just move them to the 8031 chip labeling line.
Well i got addicted to pulling 8031 chips out of old circuit boards and popping them into an EPROM reader. 100's of them over 8 or so years.  Now and then i would see "copyright" text or ASCII lookup tables from serial buffers or keyboards. I got excited when i spotted the text in the dump shown in the image on the right.


Looking further down the dump were words that further picked my interest further. Words that i wouldn't have associated with brands like Intel or IBM.

I knew of several versions of 'Tiny Basic' source code and I even have a 40 pin Micromint 80c52 Tiny Basic chip, but I have never read of any Basic hidden in a ROMless 8031. These chips were recovered from an "IBM PC, Cluster card" ( The server end of the 1985 IBM PC JX coax networking system ).

I have three chips with Tiny Basic v2.2 in them. Two have a batch/mask number of L4370281 and one has L4411287. Note that these end the 280's. The one ending in 287 gives verify errors each time its read and gets hot when running.

I have spent a few hours with the DASMx threaded dissembler and can confirm its as close to the same code as Paul has on his PJRC Tiny Basic for 8051 page BUT his does not have the Acey-Ducey card game in ROM.


MCS-51 TINY BASIC V2.2
OK
>LIST
OK
>RAM
OK
>10 PRINT "Jeff"
>LIST
10 PRINT "Jeff"
OK
>RUN
Jeff
OK
>PROM
OK
>LIST
OK
>ROM
OK
>LIST





>RUN

HERE'S HOW YOU PLAY ACEY-DEUCEY:
I'LL DEAL TWO CARDS FACE UP.
YOU BET ON WHETHER THE NEXT CARD WILL HAVE
A VALUE BETWEEN THE FIRST TWO.

YOU NOW HAVE 100 DOLLARS.

HERE ARE YOUR NEXT TWO CARDS...

6
KING

PLACE YOUR BET: 50

AND YOUR LAST CARD IS A ... QUEEN
YOU WIN!!!

YOU NOW HAVE 150 DOLLARS.

HERE ARE YOUR NEXT TWO CARDS...

9
4

PLACE YOUR BET: 2

AND YOUR LAST CARD IS A ... 6
YOU WIN!!!

YOU NOW HAVE 152 DOLLARS.

HERE ARE YOUR NEXT TWO CARDS...

ACE
2

ACEY-DEUCEY - GOOD ODDS!!

PLACE YOUR BET: 152

AND YOUR LAST CARD IS A ... 2
SORRY, YOU LOSE.
FRIEND, YOU BLEW YOUR WAD.

TYPE 1 TO PLAY AGAIN    : 1


YOU NOW HAVE 100 DOLLARS.

HERE ARE YOUR NEXT TWO CARDS...

9
4

PLACE YOUR BET: 0

CHICKEN SHIT!!

AND YOUR LAST CARD IS A ... 6
YOU WIN!!!

YOU NOW HAVE 100 DOLLARS.

HERE ARE YOUR NEXT TWO CARDS...

5
4
MISDEAL

HERE ARE YOUR NEXT TWO CARDS...

QUEEN
6

PLACE YOUR BET: 100

AND YOUR LAST CARD IS A ... KING
SORRY, YOU LOSE.
FRIEND, YOU BLEW YOUR WAD.

TYPE 1 TO PLAY AGAIN    : 0

OK

>RAM
OK
>LIST
10 PRINT "Jeff"
OK
>RUN
Jeff
OK
>

The game code doe not need RAM. My "10 print Jeff" does. I added this to show you that visible basic code changes depending on the memory mode you are in.

Below is a sample Intel batch /FPO number key for an OLD intel forum post.
It looks to match some of the older chips i have but not 20% of.
Even with a L as the first letter I have an 8031 with Japan stamped into the underside.

I have also now found another L4411287 that does NOT have Tiny Basic in it and has SINGAPORE 8440 ZM printed on its belly in large silver characters.

 Example: L149A463-0726
1st letter or digit = plant code (Malay)
0 = San Jose, Costa Rica
1 = Cavite, Philippines
3 = .............., Costa Rica
6 = Chandler, Arizona
7 = .........., Philippines
8 = Leixlip, Ireland
9 = Penang, Malaysia
L = ............, Malaysia   ( hmmm... Not on My Chips )
Q = ..........., Malaysia
R = Manila, Philippines
Y = Leixlip, Ireland
2nd digit = Year of production (2001)
3rd & 4th digits = week (49th week )
5th - 8th digits= lot number
10th - 13th digits = serialization code


So please let me know if you find other Tiny Basic or interesting code in chips with different batch/mask numbers.

ta,



A few days after i started putting this Blog up i went back through some of the old 8031 chips as well as sucked a few more from old PCBs.  Look what I just found, another interesting 8031 with MCS-51 MONITOR X2.1 in it.