Hardware
Runs on Cyclone II EP2C5 Mini Dev Board using Land Boards EP2C5-DB card which adds:
- 128KB SRAM (not all usable without some paging scheme)
- Composite video connector
- PS/2 keyboard
- Serial port (can connect FTDI USB to serial)
Design is based on Multicomp UK101 FPGA project with Multicomp elements (both) by Grant Searle.
Adds High Speed SD card interface from mc1024 project.
Memory Map
Address Range | Function |
0x0000-0x9FFF | 40KB SRAM (Contiguous space viewable from BASIC) |
0xA000-0xBFFF | 8KB BASIC in ROM |
0xC000-0xCFFF | External SRAM (not viewable by BASIC) |
0xD000-0xD3FF | 1KB Display RAM |
0xD000-0xD7FF | 2KB Display RAM (Not used) |
0xDC00-0xDFFF | Scanned Keyboard (PS/2 replaces) |
0xE000-0xE000 | Banked SRAM 16 banks of 4 KB |
0xF000-0xF001 | ACIA Serial port |
0xF002-0xF003 | J6 I/O |
0xF004-0xF005 | J8 I/O |
0xF006 | LED |
0xF010-0xF017 | SD Card Control/Status/Data Registers |
0xF100-0xF7FF | OSISDOS ROM |
0xF800-0xFFFF | 2KB CEGMON ROM |
SD Card Interface
SD Card addresses are:
Address | Register |
0xF010 | SDDATA - Read/write data |
0xF011 | SDSTATUS - Read SDCONTROL - Write |
0xF012 | SDLBA0 - Write-only |
0xF013 | SDLBA1 - Write-only |
0xF014 | SDLBA2 - Write-only |
From the SD Controller VHDL file comments:
For both SDSC and SDHC (high capacity) cards, the block size is 512 bytes (9-bit value) and the SDLBA registers select the block number. SDLBA2 is most significant, SDLBA0 is least significant. For SDSC, the read/write address parameter is a 512-byte aligned byte address. ie, it has 9 low address bits explicitly set to 0. 23 of the 24 programmable address bits select the 512-byte block. This gives an address capacity of 2^23 * 512 = 4GB .. BUT maximum SDSC capacity is 2GByte.
To avoid the addressing differences between SD and SDHC cards, I am going to use SDHC cards. These are greater than 2 GB (typically 4 GB cards) but can be as large as 64 GB. Hard to imagine there's that many GB of OSI / UK101 code out there.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.