Skip to content

Commit

Permalink
update readme, add image of GUI, remove old file
Browse files Browse the repository at this point in the history
  • Loading branch information
ahl27 committed Jan 27, 2023
1 parent 7fc63e5 commit df95389
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,33 @@ This is a C program to emulate a 65c02 processor.

Not really intended for external use, I'm just writing it because it seemed like a fun exercise.

When I get it working, I'll add in instructions to compile and run it.

Priorities for this project are:
1. Working emulation of 6502 instruction set
2. (close to) Faithful recreation of clock speeds per instruction
3. Working emulation of 65c02 instruction set
2. Working emulation of 65c02 instruction set
3. Recreating clock cycles per instruction
4. Faithful recreation of 65c02 bugs (ex. indirect jump to page boundary)

I am currently at (1)--all instructions are implemented.
Next steps are implementing a way to load hex files as ram, then testing all the operations.
**Note that this is a personal project, if you need really accurate emulation of a 6502 please check out [Symon](https://github.com/sethm/symon)**

## Running the Project

To install, clone the repository and run `make` from within the base directory of the project.

To run 6502 assembly code, run `build/6502emu.out path/to/file.o65`. As an example, you can run
tests in the test suite such as:

```
> ./build/6502emu.out tests/loadstore.o65
```

This will open the GUI and display the memory and registers. Use the left/right arrow keys to move one page, or use the up/down keys (or scroll) to move 16 pages at a time. You can also type in a specific page to go to (ex. `01` to jump to page `0x10`). Typing `home` will return you to the page the program counter is currently on. `step` runs a single instruction, and `step n` will run `n` instructions. `run` will run the program until a `BRK` command is encountered, at which point control is returned to the user. Running `run` again will then run until the second `BRK` command is encountered, and so on. You can use `help` to display this information in the GUI, and `quit` to quit.

![](examplegui.png)

## Known Issues / Future Updates

1. Flag display will be adjusted at a later date to support people with difficulty differentiating red/green
2. GUI will look like garbage if the window is too small--make sure your window is large enough for all the text to display
3. 65c02 instructions are not currently supported but will (probably) be implemented later
4. Not all instructions have been tested; all loads/stores/transfers plus `ADC, SBC` are known to be working. More bugchecking is on the way.
5. Clock cycles are not quite the same as the original 6502, I'll try to get to it later.
Binary file added examplegui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed loadstore.o65
Empty file.

0 comments on commit df95389

Please sign in to comment.