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.

Team Status Report (11/21)

This week, our team continued physical integration and expanded software compatibility. Ben connected and tested the display and other peripherals with the CPU, memory and bus system, debugging interface issues as integration progressed. Joshua made limited code progress due to midterm preparation but ordered a retro PC display to give the system a more authentic IBM PC/XT appearance.

Govind added support for launching DOS .EXE programs from the command prompt. A small test verified data relocation and command-line arguments and returned exit code 42 in both the emulator and custom CPU simulation. He also added wildcard directory listings, file-information and free-space queries, and corrected cursor positioning. All 36 software regression runs passed in the emulator. In board simulation, unchanged HELLO.COM and EXIT42.COM programs produced the expected output and exit status and returned to the prompt after startup and reset.

Next week, we will focus on stabilizing the integrated hardware and running both COM programs on the physical FPGA, including reset testing. We will also continue the larger .EXE simulation test. Standalone microSD boot remains open, and simulation results still need confirmation on the board.

Josh’s Status Report (11/21)

This week, I made limited progress on code because I was studying for the 18-740 and 18-755 midterms. However, I placed an order for a retro PC display to give our recreation an appearance closer to the original IBM PC/XT. Next week, I plan to support system integration and end-to-end testing, addressing any CPU issues that appear as the team combines the hardware and software.

Throughout the project, I needed to learn more about 8088 instruction and interrupt behavior, SystemVerilog verification, Quartus compilation and timing analysis, and USB-Blaster/JTAG programming. I learned through Intel and IBM reference manuals, tool documentation, board setup guides, and small experiments. Breaking failures into focused test programs and comparing results against recorded 8088 behavior helped me distinguish CPU bugs from integration problems. This approach let me apply new knowledge immediately and verify my understanding through observable results.

Josh’s Status Report (11/14)

This week I extended the custom 8088 CPU with the known missing instructions needed for DOS executable bring-up. Prince of Persia’s original unpacker now produces the exact independently checked memory image. I also published a staged bring-up plan using an interactive CGA executable as an intermediary. The CPU changes are committed locally; gameplay remains unverified.

Verification and validation

Verification passed 292,392 programs, including 260,000 hardware-reference cases, plus 606 reset cuts and 108 IRQ programs. Existing CPU/software/system regressions also passed. Results are checked against expected registers, defined flags, memory and bus transfers. The offline FPGA diagnostic fits at 22% of ALMs and passes timing; this revision has not been tested physically.

System validation will check executable loading, graphics, keyboard/timer operation, exit and relaunch. We will compare behavior and timing against a reference machine using the team’s proposed input-latency, game-speed and sustained-operation requirements.

Next week I plan to trace the game beyond its unpacker, fix any confirmed CPU gaps and support Govind and Ben’s software/peripheral integration. Most currently identified implementation work is now in their subsystems.

Josh’s Status Report (11/7)

This week, I completed the CPU features needed for our BIOS and DOS demo and pushed the CPU bring-up and verification code. I implemented byte and word arithmetic, logical operations, memory read-modify-write, conditional branches, LOOP, FLAGS controls, shifts, rotates, multiplication and division. I also added LEA, word PUSH/POP memory forms, and LES/LDS for instructions encountered in the compiled software.

I implemented immediate and DX-addressed port I/O, including byte and word IN/OUT operations. Word operations use two byte transfers, and the CPU preserves the port, operand data and flags throughout bus waits. I added MOVS, STOS, LODS, CMPS and SCAS with REP handling, direction control and segment overrides. Repeated string operations retain completed progress so they can resume correctly after an interrupt.

I added software interrupt entry and IRET, including interrupt-vector reads, stack-frame construction and parent-process restoration. Maskable interrupts now support interrupt acknowledgment, STI and segment-load inhibition, HLT wakeup and interruption between REP elements. In simulation, I verified the keyboard IRQ path through the PIC and PPI, ran two interactive HELLO.COM sessions, and checked that both programs exited successfully and returned to the shell. I also verified the actual BIOS, disk loader, compiled C code and DOS process-launch path with an inputless executable.

Verification passed 57,680 arithmetic/FLAGS programs, 86,888 I/O programs, 27,653 string programs, 80,732 software-interrupt programs and 10,226 maskable-interrupt programs. Compiled-C verification passed 258 runs across two compiler configurations and three memory profiles. Tests covered memory stalls, address wrapping, register preservation, divide errors, interrupt return and reset cancellation. After changing division for FPGA timing, I added 33 reset-interruption checks, bringing the arithmetic regression to 51 reset cuts.

I prepared a separate FPGA ROM diagnostic and confirmed its expected LEDs and KEY0 reset behavior on the DE10-Standard. I then integrated my CPU with Ben’s memory/peripheral system and Govind’s software and SDRAM updates for the inputless demo. The system retains the full 640 KiB conventional RAM map in onboard SDRAM, with the BIOS and read-only disk image embedded in the FPGA configuration. I fixed memory-inference problems, incorrect pin-assignment syntax, SDRAM startup initialization and clock constraints. I changed division to run across multiple clock cycles so the CPU could meet the 25 MHz system clock.

The integrated design compiled successfully in Quartus using 5,738 ALMs, or 14% of the device. All four timing corners passed, with minimum setup and hold slack of 2.173 ns and 0.170 ns, no unconstrained paths, and all 82 pin assignments checked. Two complete SDRAM boot/reset simulations passed, each reading 45 sectors, running DEMO.COM, checking zero exit status and reaching the parent success marker. I programmed the integrated demo onto the physical board and observed its VGA output. The remaining display issue is cropping at the left edge, which still needs alignment or scanout investigation.

I updated the architecture, compatibility, interface, toolchain, diagram and test documentation, and prepared repeatable build and programming instructions with pinned image and bitstream hashes. The CPU bring-up work is pushed on my HELLO.COM branch; the latest SDRAM/VGA integration fixes remain local. Remaining work includes resolving the display cropping, repeating the integrated demo’s physical reset and power-cycle checks, and later qualifying keyboard input and the physical microSD storage path.

Josh’s Status Report (10/31)

This week, I connected the CPU to the team’s actual BIOS in simulation using Ben’s memory controller and approved memory map. The CPU starts at FFFF:0000 and executes the BIOS reset jump to F000:E000. I added instruction and bus traces, unsupported-instruction diagnostics, timeout detection and VRAM-write logging so failures identify where execution stopped and what the CPU was doing.

I expanded segment support with ES, segment-register transfers, segment PUSH/POP and segment overrides. I also implemented near and far jumps, making sure far jumps update CS and IP together and discard stale prefetched instructions. The decoder now keeps prefixes, displacements, immediates and far-pointer fields separate, preserving them through stalls and clearing them correctly after redirects and reset.

I added byte MOV instructions, byte and word immediate-to-register/memory forms, and accumulator direct-memory transfers. Byte operations preserve the unaffected register byte and use one bus transaction; words use two. The CPU retains operand width, address and data throughout memory waits, and MOV leaves the arithmetic flags unchanged.

Verification passed 2,826 segment/prefix programs and 10,092 MOV programs, alongside 9,214 MOV decoder checks and 21 reset-interruption cases. An assembled diagnostic checked segment initialization and RAM/VRAM accesses across three configurations. Tests covered register aliases, segment overrides, odd addresses, address wrapping and memory stalls. All previous CPU test targets and Ben’s system regressions also passed.

I updated the design, compatibility, toolchain and test documentation, checked the implementation against Ben’s and Govind’s contracts, and recorded unresolved assumptions. The real BIOS currently stops at the unsupported CLI instruction. Remaining work includes ALU and FLAGS support, port I/O, strings and interrupts before the CPU can complete BIOS initialization and boot HELLO.COM.

Josh’s Status Report 10/24

This week, I expanded the CPU from BX-only memory addressing to all eight 16-bit ModR/M address combinations, plus direct disp16 addresses. Programs can now use forms such as [BX+SI], [BP+DI+disp], and [SI] for word MOV loads and stores.

I added separate base and index selectors and enables to the decoded instruction record. The decoder now handles each form’s displacement, instruction length, and default segment: BP-based addresses use SS, while the other forms use DS. I extended operand collection so the CPU can retain the base, index, and store data using its existing two register-file read ports. Indexed stores use an additional read step before address generation.

I also integrated Ben’s approved memory and bus interfaces. Both sides now compile against one shared bus-command package, and the integration tests use the current CPU source directly. The tests respect his memory map, including separate RAM, VRAM, ROM, and unmapped regions, along with completion timing and reset cancellation.

The new repeatable make addressing test passed 3,120 memory programs and five subroutine demonstrations, checking 6,400 data-byte transactions. It covers every addressing form and data register, positive and negative displacements, odd addresses, both address wraps, memory waits, and decoder stalls. The same matrix also passed against Ben’s actual memory-controller RTL.

The new subroutine demonstration reads stack parameters through BP, accesses an array through indexed DS addressing, and returns using RET 4. It updates the selected array element and restores BP, BX, SI, and the original stack pointer. All twelve existing CPU regression targets and Ben’s Icarus system suite also passed.

I updated the coverage documentation, diagram guide, and test evidence. Next are byte operands, the remaining decoder and ALU operations, and the I/O and interrupt support needed by the BIOS.

Josh’s Status Report 10/10

This week, I took the CPU from register-only programs to reading and writing memory, using a stack, and calling subroutines.

I gave the bus interface unit a second client, so data accesses share the bus with instruction fetch, with data going first when both request. I then added MOV loads and stores with BX-based addressing, a DS register and an address-generation unit. Each 16-bit access is two byte transfers on the 8088’s 8-bit bus, including words that cross a segment boundary or the top of memory.

Next I added the stack: an SS register, PUSH and POP, and near CALL and RET, which redirect instruction fetch like a taken jump. I checked PUSH SP and POP SP, where the 8088 differs from later x86 processors, against 10,000 recorded real-8088 cases each. A second write port for the stack pointer lets each instruction update everything on one clock edge.

Two repeatable demonstrations check registers, memory and every bus transaction under varied memory delays. The second runs two levels of subroutine calls and restores every register, including the stack pointer. Resetting the CPU in the middle of transfers exposed a bug where an interrupted load still wrote its register, which I fixed. The tests also caught all 16 deliberately broken versions of the design.

I also corrected our design report and added a CPU block diagram. Next are the full decoder, the remaining ALU operations, and interrupts, which the BIOS needs.