In either case, rap is about as modern as the hilarious robot sidekick. You just can't imagine anything like it going on in days of yore.
But Really ...
Drunken medieval Scotsmen invented the rap battle.
"Bugger the constables."
They called it flyting, and the basic idea was to mock and deride your opponent in the crudest possible fashion ... while rhyming. So, yeah: rap. Only the insults these guys churned out were vile enough to make Eminem shit his entire mansion.
Speaking of shit, the first example of that word being used as a personal insult comes from "The Flyting of Dunbar and Kennedy." The record of a purported verbal duel in 1503, academics describe it as "just over 500 lines of filth." Dunbar and Kennedy (D-Money and K-Hole) exchanged insults like this: