Z80 Project

Nathan's Z80 Project Mark 2: Memory Installed!

Last updated: Oct. 18, 2009, 9:08 p.m.

More progress on the Z80 project; I have fitted the first RAM chips tonight. After sorting the code so far into 3 source files, I implemented the memory read and memory write functions. These appeared to work on single memory locations, so I implemented the block read and write functions. Using a Python script (see the Z80 Project page for the file) I wrote the XOR combination of the high and low address bytes to each memory location, then read the memory back and tested it against this value.

So far I've fitted one 32K RAM chip in the lower half of the address space and an 8K chip in the upper half. This shows up correctly on the memory check. The script writes address from the top down, so when the 8K chip gets written with the data for the top 8K of memory this is subsequently over written with the chip in its lowest possible space. Hence the memory scan determines that there is memory up to address 0x9FFF (40K).

Due to the maximum packet size of 256 bytes, the maximum data that can be written is only 251 bytes because the additional five bytes are used with command, length, start address (2 bytes) and checksum. For convenience I wrote the memory checker to use 128 byte packets instead of this odd number as it makes the calculations of offsets easier, and only has a moderate additional overhead.

Section:
Z80 Project
Tags:
Python,
Z80 Mark 2,
Z80 homebrew

Comments

Posting comments is not currently possible. If you want to discuss this article you can reach me on twitter or via email.


Contact

Email: nathan@nathandumont.com

Twitter: @hairymnstr

Links