Thanks rich
This may work, but you are not seeing the big picture.
That awesome feeling of success! Can't thank you enough for your help guys! I just need to modify the control pins for the EPROM's, and then I'm good too go I think. After I have typed the whole of the ROM file into the ROM_Array[] that is.
You typing or translating that rom image in Intel Hex format is going to allow more errors. Is a big waist of time also and would have to be done again for a new rom image.
If you treat the Arduino as a dumb device, just three simple commands are needed for a program on the PC to read the Intel Hex rom image and talk to the Arduino and program the chip. Not great way to do this but can be faster then you adding errors with translation.
Pc just needs to be able to,
1. Tell the Arduino the address.
2. Tell the Arduino what byte value to write.
3. Ask the Arduino what is the byte value.
You are making it harder on you self getting the job done.
You have made progress in programming but not seeing big picture again.
There are many reasons to use the Intel Hex format directly on the Arduino. You can get the above and then add this step with out much loss of time. Do it right and things grow real easy.
Questions
In how many other programs on Arduino could you have a use for a few Arduino pins giving you more output by using a 595? And just by adding an additional 595 on hardware side get 8 more bits of output?
Using good functions here, passing data to and from the functions will let this become an easy copy and paste. It also helps this program!
Your program gets simple and easy to read. It also allows easy additions.
So think big
Most programming tools for the Z80 create Intel Hex format files. Easy way to use of these files makes your life easer.
If You hold the Z80 with the /RESET line low, think you will find that the Z80 Address, Data & Control lines are in the tri-state mode.
The 595's have a tri-state output.
What you are using on Arduino for data & control buss can be set as inputs. To Z80 this is same as tri-state.
The Arduino using a pin connected the Z80 /RESET pin could make the /RESET pin go low. The Z80 then tri-states as above.
The Arduino could then enable it's outputs and program Z80 memory.
When done the Arduino makes all outputs tri-state or inputs and releases the Z80 /reset pin.
You have just started the Z80 with a new program that can easily be changed. A great way to learn the Z80 with out having to program and erase proms.
The kicker is that this can also read Z80 memory.
A small addition and Arduino can read & write Z80 memory while the Z80 is running a program!!
Many people giving you hints.
Think of the iceburg, most is under water while the hints point to what you can see.
I'm full of mistakes! The system is still working as far as I can tell, but I forgot that I had moved some of the jumper leads from the data BUS to the data pins on the memory. When I was looking at the data that was coming back from the system before I remedied my mistake, I was seeing rare occurrences where the data would be wrong, but it would be write for the same value one cycle later. Having moved the jumper leads back to the correct place the system is working very reliably.
My question is, how was the data coming through when I had the jumper leads one row off on every data line. What I've learnt in physics tells me it's either something to do with the magnetic fields induced in around the tracks, although they would be very small. Or some kind of capacitance?
bad programming or the ram chip not caring.
A scrambled address buss in to ram works fine.
A scrambled data buss in to ram works fine.