How to generate new nvram for Code One Dispatch
Tools:
solder iron
hotair station
arduino (mega)
breadboard
4.7k resistor
cables
python
eprom burner like TL866 II plus
timekeeper m48t58y
socket 24pin
Mame 0.232 (newer crashed)
hex editor like HxD https://mh-nexus.de/de/hxd/
you do all at your own risk ⚠️
Steps:
Desolder the old empty m48t58y
Desolder the 1-wire-eprom
Read the serial number of the 1-wire-eprom with the arduino (pinout pin1:GND, pin2: Data - have to pulled high to 5v with a 4.7k resistor and goes to the arduino, Pin3:NC)
edit the py-script with your s/n number - find dallas_id=bytearray and overwrite it with the s/n from your pcb (get the file below)
Run code1db in mame, go to the dip switch settings and turn Dip4 to on and close the program.
Check the folder mame\nvram\ code1db
when the folder not exist then make new folder, put the m48t58 from code1db.zip in this folder.. rename it to nvram.bin
copy the edited py-script in this folder and run the script
Rename the output.bin to m48t58, delete nvram.bin
start Commander in Windows
run mame -w code1db -debug
Starts the debugger from Mame
Add breakpoint: bpset 0xa4448 (enter on bottom line)
Run with F5
When Breakpoint hits open the memory viewer window and enter r4
The top line shows a 6 byte term
Note the 6 bytes
go back to the nvram folder of code1db
rename m48t58 to nvram.bin again
open nvram.bin in a hex editor
Replace the address 0x24-0x2a and 0x1024-0x102a with your 6 bytes and save
run the py-script again for correct checksum
Burn the output.bin file to a new m48t58
Make sure you soldered back the 1-wire-eprom and socket the timekeeper place
Put the m48t58 in the socket
Start the game
Good luck 🍀
Get the python-script here: https://forums.arcade-museum.com/threads/tutorial-new-nvram-for-code-one-dispatch.517543/
Arduino 1-wire-eprom-plugin: https://github.com/pceric/DallasEPROM Edit the PIN number
Special thanks to "Windyfairy" (Mame contributor ) for the python script. https://gist.github.com/987123879113/1a5223430e46b691fcbad934ea7f921e