-
Notifications
You must be signed in to change notification settings - Fork 1
Development #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development #117
Conversation
Caution Review failedThe pull request is closed. WalkthroughAdds C linkage guards to Console public declarations, registers a new Shell command "6502", integrates C++ compilation into the kernel build, and introduces a C++ 6502 emulator with an extern "C" Entry6502 entry point and its header. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Shell as Shell (kernel/etc/Shell.c)
participant Entry as Entry6502 (ports/6502/6502.cpp)
participant CPU as 6502 CPU/MEM
participant Console as Console API
User->>Shell: types "6502"
Shell->>Entry: Entry6502(args)
rect rgb(235,245,255)
note right of Entry: initialize MEM & CPU, set reset vector, load test program
Entry->>CPU: Init()/Reset()
Entry->>CPU: Load program @0xF000
end
loop run cycles / until BRK
Entry->>CPU: Fetch/Decode/Execute (step)
alt page-cross or branch taken
CPU-->>CPU: adjust cycles/PC
else normal
CPU-->>CPU: update regs/flags/memory
end
end
Entry->>Console: print registers/flags/memory (via Console API)
Console-->>User: output
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
🧹 Nitpick comments (1)
kernel/etc/Shell.c (1)
1173-1174
: Add help entry for the new “6502” commandSo users discover it via ‘help’. Consider adding a short description under Development commands.
static const HelpEntry dev_cmds[] = { {"elfload <path>", "Load ELF executable"}, {"alloc <size>", "Allocate memory"}, {"panic <msg>", "Trigger panic"}, {"vmemfreelist", "Show VMem free list"}, {"heapvallvl <0/1/2>", "Set heap validation level"}, {"fstest", "Run filesystem tests"}, {"arptest", "Perform ARP test"}, {"setup", "Copy system files"}, - {"isocp <iso> <vfs>", "Copy from ISO to VFS"} + {"isocp <iso> <vfs>", "Copy from ISO to VFS"}, + {"6502", "Run the 6502 emulator demo"} };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
kernel/etc/Console.h
(2 hunks)kernel/etc/Shell.c
(2 hunks)meson.build
(4 hunks)ports/6502/6502.cpp
(1 hunks)ports/6502/6502.h
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
ports/6502/6502.h (1)
ports/6502/6502.cpp (2)
Entry6502
(363-406)Entry6502
(363-363)
ports/6502/6502.cpp (1)
kernel/etc/Console.c (2)
PrintKernelF
(260-267)PrintKernel
(181-199)
kernel/etc/Shell.c (1)
ports/6502/6502.cpp (2)
Entry6502
(363-406)Entry6502
(363-363)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
kernel/etc/Shell.c (1)
2-3
: Includes look good6502 header inclusion is correct given the new inc_dirs; no issues spotted.
ports/6502/6502.cpp (1)
208-219
: Overflow flag computation is fine; keep it booleanAssignment to a 1-bit field from 0x80 coerces to 0/1; this is intentional and correct. Just a note that the semantics are clear.
Summary by CodeRabbit