Close

Aleste-LX FPGA Project Progress Report

A project log for XiAleste

XiAleste Next is an 8-bit home computer, which is compatible with software for the Amstrad CPC6128 released on 13 June 1985

h2wh2w 12/13/2025 at 22:040 Comments

What Has Been Implemented

We have successfully implemented the first working version of the system, which integrates:

Debug System Overview

The debug interface is connected via a UART bridge and provides:
1. Program loading into memory
2. CPU control (reset, interrupts)
3. Step-by-step debugging
4. Breakpoint setting
5. CPU state monitoring

Challenges and Solutions

Video Controller
Worked immediately but initially displayed only a black screen - still significant progress!

UART Bridge
Most time was spent debugging the UART bridge. Issues:
- Did not appear in simulation
- Behaved unpredictably in hardware
- Signals were ignored or lost

**Solution:** Had to update the serial interface library with new code.

### Python Debugging Tool
Development took 1-2 days. Today we ran the first successful program!

Current System Status

✅ Video Controller  
✅ Z80 CPU  
✅ Memory Manager (requires more hardware testing)  
✅ Remote Debugger  
✅ Program loading and tracing  

Test Code Example

Here's a simple Z80 test program used for debugging:

```asm
; Test program for Z80 debugger
; Loads at address 0xC00000

    org 0x0000      ; Logical Z80 address (MMU translates to physical)
    
start:
    jp 0x0005       ; Jump to main code
    
    org 0x0005      ; Main program starts here
    
main:
    ld a, 0x55      ; Load value 0x55 into register A
    ld (0x0003), a  ; Store A to memory address 0x0003
    halt            ; Stop CPU execution
    
; Program ends here (total 10 bytes)
; Bytes: C3 05 00 55 32 03 00 76
```

Debug Session Example

Here's what a program tracing session looks like:

```bash
$ ./dbg.py trace -a 0xC00000 -n 10 test.bin
============================================================
DEBUG SESSION START
============================================================
1. Enabling CPU reset...
2. Loading program...
LOAD: 10 bytes at 0xC00000
3. Configuring trace...
4. Starting trace...
   Steps: 10
   Stop on: inst 
============================================================
step:   1 addr:0xC00000 pc:0x0000 bus:0xC3 type:FETCH    dis:JP 0x0005
step:   2 addr:0xC00001 pc:0x0001 bus:0x05 type:FETCH    dis:db 0x05
step:   3 addr:0xC00002 pc:0x0002 bus:0x00 type:FETCH    dis:db 0x00
step:   4 addr:0xC00005 pc:0x0005 bus:0x55 type:FETCH    dis:LD A,0x55
step:   5 addr:0xC00006 pc:0x0006 bus:0x32 type:FETCH    dis:LD (0x0003),A
step:   6 addr:0xC00007 pc:0x0007 bus:0x03 type:FETCH    dis:db 0x03
step:   7 addr:0xC00008 pc:0x0008 bus:0x00 type:FETCH    dis:db 0x00
step:   8 addr:0xC0000A pc:0x000A bus:0x76 type:FETCH    dis:HALT
STOP: CPU halted at 0x000A
============================================================
TRACE COMPLETE
============================================================
```

Next Steps

Now we can:
1. Run more complex programs to test the platform
2. Add native devices (timers, interrupt controllers)
3. Test legacy devices (classic Z80 peripheral chips)
4. Develop a simple operating system or monitor

The system is ready for further development!

---

*The Aleste-LX FPGA project continues to evolve. Stay tuned for updates!*

Discussions