0x6502
- 12 Devlogs
- 30 Total hours
A retro computer lab for computers based on the Synertek/MOS 6502, all on the terminal with ratatui
A retro computer lab for computers based on the Synertek/MOS 6502, all on the terminal with ratatui
Big progress. GOT THE APPLE I RUNNING
Hooray wozmon is up and running, marking the most successful milestone yet, a running system, i had to fix some opcode behaviors but it runs great!!
Still very early, 1st, not all input keys are mapped, cycle stepping, the ui etc etc, but for now its progress.
So I had to tackle some special cases to adapt everything to the new cycle accurate architecture
These are mainly the operations that work with the stack
In my architecture addressing handles fetching, while the run_operation() just does the math (and final data write if needed), so it only consumes one cycle, these special cases handles various cycles in their operation (independently of addressing mode) so I had to add that, and some other minor fixes to branch operations and other stuff
Finished refactoring all the addressing code for it to be cycle accurate.
Next I’ll check and fix operations and then the TUI situation and try to get the Apple I running, good progress
Ok so I’m back
Sorta refactoring the code base to be a cycle accurate state machine to make the emulation as truthful as I can, this involves coding each cycle independently (sorta) to maintain accuracy, I have started this refactoring with a lot to go, but at the end it will be much better than before
see the code here as an example
Made some more progress on Implementing the Apple I machine and some TUI handling code + misc fixes
I worked on adding all the Apple I roms to the program, loading them at each required memory location and started working on some more of the UI
Started working on the Apple I implementation. Setting memory ranges and more.
Also added a console write and read to the bus so machines can display what the want, since each machine does whatever this is a way to normalize it
Finally finished all instructions.
Now I will move to making the first machine (maybe apple I or II) and connecting all cpu mechanics and get the emu working.
Added a bunch more operations, had to learn a bit of low level byte and bit operations. Also started working on operations that work with the stack which is always fun
Started working on the first cpu operations, also added cycle emulation.
Some operations where a struggle, It took a while till I got BCD operations, also the break flag is special in it of itself, but good progress.
Next up, more operations
Added helper functions for flag handling.
Setting and reading the status register flags.
I started working on 0x6502, a retro computer lab where you can emulate 6502 based retro computers, like the Apple II or C64 directly in terminal, while being able to live view the stack, memory and registers, all in a tui built woth ratatui.
For now I have just worked on the 6502 cpu logic and blocked out the main UI, I have done Instruction and addressing handling, next its operations.