Use aluminum foil duct tape (from Lowes or HD (the plastic kind of tape won't work)) and cut a piece to the proper size for the entire DX code area. Then using either Wikipedia or the DX simulator above, cut pieces of electrical tape or masking tape to place on the parts that would be black. Tolerance isn't very critical. Check the number of contacts in your camera. Most only have three or four and you don't have to mess with the spots that aren't used. Film speed is critical. The rest is pretty much optional. If you want to change speed, peel off the tape and make a new one.
You can also use this same trick to modify film speed on preloaded cassettes. I regularly modify ISO 400 films to ISO 320 this way as I generally like to derate them 1/3 stop. I've also been making cassettes for ISO 250 motion picture film this way and it works great.
It would be a shame if the metal casettes went away. I have found them to light leak as well.