From the comments to the OP:
My understanding of the terms "hardcore" and "softcore" come from baseball and softball, and the term "hardcore" at least is roughly synonymous with "playing hardball" which is definitely baseball-related.
More in-depth: Since the early 1900s at least, baseball has been played with the eponymous cork-cored, twine-wrapped, leather-skinned sphere that has near-universal recognition. The only significant change to the "official" baseball used in the major leagues was during WWII when rubber was substituted as the core material to replace cork (which was needed for the war effort). Cork baseballs are small, dense, and not very forgiving; in fact, players have died from head trauma after being "beaned" and been forced to retire after making barehanded catches that shattered every bone in their hand. Such a ball is a "hardball", and playing with it is "hardcore baseball".
The game of softball is not that much newer (1887 vs 1845 for baseball), but it evolved from the game we have come to know as baseball to create a more "casual" game. The name "softball" came from the original construction of softballs; primarily similar to baseballs, but much larger (up to 16" in circumference) and more loosely wound. As the early balls broke in, they really did become soft, and the game was actually originally intended to be played barehanded (thus requiring virtually no individual equipment; just one bat, one ball, and some base markers). Modern softballs are not very soft, and so the modern game is played with gloves (and "fast-pitch" leagues for women use practically all the same gear as men's baseball leagues with the primary exception of "pelvic protectors" replacing athletic cups), but the balls still "give" more than cork baseballs, and more often incorporate softer core materials such as rubber.
The two games have both been around long enough in recognizable forms, along with the eponymous balls used to play them, to be the origins of the terms. My thoughts are that "hardcore" came first, and then "softcore" followed as a complementary antonym. Unfortunately the sexual connotation the terms have gained makes it difficult to do real research into the terms themselves from a work computer. I know the term "hardcore" has been commonly used figuratively since at least the Vietnam War.
It goes back to at least 1542, so I can confidently say there are no racist origins in the expression.
Apparently it first appeared in English in Nicolas Udall's collection of Erasmus's aphorisms - translated in 1542, but ultimately deriving from Plutarch's Moralia in the first century AD.
It's really just an observation that forthright honest people use straightforward words. I doubt the fact that "a spade" happens to be the common example has any special significance, though that obviously wouldn't have worked for Shakespeare in the related rose by any other name.
Best Answer
You're correct, it was originally a pit where cockerels fought.
The Oxford English Dictionary says:
The first example is from 1587 in Thomas Churchyard's The worthines of Wales:
So the author is comparing the towering Welsh mountains to a cockpit. This non-direct use suggests the term must have been in common use for its analogous use to be understood here.
From this barbaric sport, the term was later applied to a place where a contest is fought (1612); to a theatre (1616; appropriately the first-known example is by playwright William Shakespeare); to a part of a warship where the junior officers quarters were, and where wounded were cared for during battle; and finally, more familiarly, to aeronautics (1914) and motor racing (1935).