What if the type of spell that the PC can cast depends on what they are wielding?
Free hands and staves (and maybe whips and daggers) can cast any sort of spell. Other weapons allow magic that targets others, but not self-targeting magic. Shields allow self-targeting magic only. Therefore, if you equip two shields, you will only be able to cast self-targeting magic - spells which allow targeting in any direction including self (like teleportation) becomes limited to casting at self (you can teleport yourself, but you can't teleport others).
Ball spells are considered to target others, not self. A few spells may be castable in all situations - this might include Burning Hands, perhaps (although I'm undecided - it might be the one offensive spell that can be cast from behind shields, since it can only hit one adjacent foe, or it might be blocked by shields like the rest), as well as (Greater) Identify, Create Item, Darkness/Light, and maybe Revelation.
This gives a benefit to using a staff, as it boosts DV more than most weapons as you gain skill in it, allows regular melee attacking, and also permits both self-targeting and regular offensive magic. It makes it difficult to be effective as a spellcaster while wielding two shields.
As far as implementation goes, I'd just have the various spells do a quick check of wielded items before actually doing what they do - so if you cast Teleport, it brings up the prompt. If you try to cast it at a foe while wielding two shields, the PP cost is used up and the message says something like "Your shields absorb the magic as you cast it". If you try to cast it at self while wielding two weapons (other than the special cases noted above), it might say "The magic travels along your weapons and fizzles away", again costing the PP without the resulting effect.
There could also be a suffix for weapons that enables self-targeting and a suffix for shields that enables targeting of others - if a wizard is lucky enough to find one of those shields, they'd be able to use two shields including that one and still cast as normal.