With the test routines operating correctly, the next step was to actually load the full N8VEM UNA BIOS onto the credit card terminal and launch a more useful operating system.
This was slightly complicated by the fact that while the terminal has 128K of Flash memory, only 64K is available to be loaded by the start-up firmware. Additionally, while the terminal has 512K of battery backed SRAM, the start-up routine writes to the first page before launching the operating system firmware.
For the first issue, I had to pack the UNA BIOS, CP/M, and a small CP/M disk image containing a file transfer program into the 64K flash image. One of the early steps of the firmware is to extract these various pieces into the correct place in RAM.
For the second issue, I took advantage of the ability of the UNA BIOS to map memory using the MMU built into the Z180. I simply shifted the first page such that it became the high page for CP/M. This page is overwritten when CP/M is loaded, which means that the start-up firmware is free to scribble on it without affecting the RAM disk.
As CP/M only requires 64K, and the UNA BIOS uses another 32K of RAM, I was left with enough room to create a small RAM disk. The extraction routine examines the beginning of the RAM disk and if it appears to be invalid, formats it and then installs the file transfer utility.
Using this, I am now able to transfer files to the system, and have a fully operational CP/M system.
However, X-modem transfers are a bit slow, and while I had enough room to run Zork, I could use a bit more disk space. The Z180 has a feature that would allow me to add something extra to the credit card reader.