Govind’s Status Report (12/5)

This week I spent a significant part of my time integrating our DOS software with the FPGA system to get Prince of Persia running on the physical board. Once we had the game working on the board and monitor, we played through it for hours without any stability issues.

I also investigated why the controls felt slow. I traced the right-arrow input in MartyPC and found that the game received the key quickly. Most of the delay came from waiting for the game to check for input and draw the next frame. At the original 4.77 MHz speed, it took 147–258 ms to see the character move across five tests. I added a TURBO command for testing in MartyPC. At 14.32 MHz, with the game timer running at the same rate, the delay dropped to 69–144 ms. The controls also felt more responsive when I played.

I prepared a 50 MHz version of our FPGA design that keeps the display and game timer running at their usual rates. In simulation, both the 25 MHz and 50 MHz builds reached Level 1 and returned to the DOS prompt when I quit. A test that updated and copied graphics data took about 46 ms at 25 MHz and 27.5 ms at 50 MHz. I recorded the comparison in 2026-12-04-system-prince-fast-clock.md.

My work is on schedule for the final demo. Before the demo, I plan to check the 50 MHz design in Quartus, compare the time from keypress to visible movement at both speeds on the same monitor, and record the results for the final report.

Team Status Report (12/5)

This week, we finished integrating our custom 8088 CPU, BIOS and DOS software, and FPGA peripherals on the DE10-Standard. The system booted to our DOS shell, launched Prince of Persia, and displayed the game on the IBM monitor. We played for more than two hours using the PS/2 keyboard. That session verified that the CPU, memory, disk interface, timer, keyboard, and video output worked together during extended gameplay.

For experimentation, we ran unit tests for CPU instruction execution, arithmetic and flags, bus transfers, interrupts, and reset behavior. We also tested RAM, ROM, SDRAM, video memory, disk-sector reads, PS/2 input, the PIT timer, the interrupt controller, and CGA and VGA scanout. Our system tests covered cold boot and reset, disk-error recovery, file reads, interactive HELLO.COM, loading a large DOS executable, and replaying Prince through loading, Level 1, movement, countdown, exit to DOS, and relaunch. We compared captured frames and keyboard responses with MartyPC and checked the compiled FPGA design for routed timing. These tests exposed missing far-control-transfer and XCHG instructions, a timer mode the game expected, and a keyboard interrupt that could overwrite saved stack state. We added the missing instructions and PIT mode 2, protected the keyboard handler from nested interrupts while it restored the stack, and replaced single-cycle division with an iterative divider to meet FPGA timing. VGA testing also showed that the game needed mode 13h and more DOS program memory, so we implemented the mode and expanded the game’s memory allowance.

Ben’s Status Report (12/5)

This week, I integrated the timed disk I/O, CGA graphics, PIT timer, and PS/2 keyboard into the Prince of Persia demo and pushed the changes to codex/sdram-demo. I added PIT channel 0 and connected its timer interrupt through the PIC alongside the keyboard interrupt. I also updated CGA graphics and retrace behavior and extended keyboard scan-code handling for game input.

I fixed the far control transfers that Prince’s unpacker needed, including immediate far CALL. That instruction writes the caller’s code segment and return address to the stack before transferring control. I verified the stack write order, a far call and return, FLAGS preservation, and reset during the stack writes. The changes passed all ten Icarus integration benches and all 10,000 recorded 8088 test cases for immediate far CALL.

I made the MartyPC replay reproducible and captured reference frames for the loading screen, title, and Level 1. I also recorded idle and held-Right runs so the team can compare how the FPGA draws the scene and responds to a keypress under the same input sequence.

Josh’s Status Report (12/5)

This week, I integrated the CPU, BIOS, DOS, and peripherals into the Prince of Persia FPGA build. I fixed Quartus synthesis and timing issues and added VGA mode 13h so the game can launch with PRINCE VGA. In full-system simulation, I verified that Prince reached Level 1, responded to keyboard input, returned to the DOS shell, and relaunched successfully. I pushed the VGA changes and opened a pull request for review.

I also built and tested a shared FAT12 image containing Prince of Persia, Digger Remastered, and Microsoft Flight Simulator. Using the same image in separate simulation runs, I reached Prince’s first level, Digger’s first mine, and Flight Simulator’s keyboard-controlled runway view. The next step for the shared image is to verify it through the physical storage path.

I implemented a laptop debugger that displays 8088 instructions, register changes, and memory and I/O activity over USB-Blaster. It supports pause, single-step, resume, breakpoints, and watchpoints. In the Prince simulation, VGA continued refreshing while the CPU was paused, and each of eight step commands retired exactly one instruction. The game resumed and completed the replay. The debugger bitstream passed routed timing at all four corners, and the physical USB-Blaster test is still pending.