1
0
mirror of https://github.com/sethm/symon.git synced 2024-06-07 19:29:27 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Seth Morabito
e2a1144c7c Update copyright, prep for 1.1.0 2014-08-11 14:16:41 -07:00
Seth Morabito
6a50476bfe Step Count and Memory Window enhancements
Introduces several changes requested by Mario Keller. The simulator now has a variable step count that can be selected by a drop-down box on the main window. This change also displays ASCII characters in the Memory window.
2013-03-30 21:28:52 -07:00
Seth Morabito
da8250778e Bug Fixes and Copyright Date Change
The simulator now passes Klaus Dormann's 6502 Functional Test suite for
the first time.

Bug Fixes:

- PHP was not correctly setting the Break bit on the stack copy of the
  processor status, so subsequent PLA's would not set the Break status
  flag.

- The CPU had swapped NMI and IRQ reset vectors, so RTI was failing.

- BRK was pushing PC + 2 onto the stack, instead of PC + 1

- (Zero Page,X) addressing mode did not correctly wrap on zero page
  boundaries.

- The instruction table used for disassembly had addressing modes
  of LDA $B9 and $BD reversed. This did not affect behavior, only
  disassembly of these instructions.

Other:

- Updated copyright date for 2013.

- Started migrating old JUnit 3 style tests to JUnit 4 annotations.
2013-01-01 17:03:16 -08:00
Seth Morabito
0215e2e3d8 Cleaner simulator startup and run-loop exiting
- If a default ROM image ("rom.bin") isn't available at startup, the
  simulator will now create and load a 16KB R/W memory at the ROM
  location, so resets will work even without a ROM loaded.

- Cleaned up the way simulator UI state is updated when the run loop
  exits.
2012-12-10 21:53:01 -08:00
Seth Morabito
807a43ce6f Faster byte and word to hex string
I was alarmed to discover just how slow `String.format()` is for doing
integer to hex conversions. Now that a trace window has been added to
Symon, it became especially clear that I needed a more efficient way to
handle it.

I looked into using `Integer.toHexString()`, but I would have had to
wrap it to do zero-padding, so I decided to just bite the bullet and do
my own with a lookup table. The implementation in `HexUtil` is just as
fast as `Integer.toHexString()`, but also zero-pads appropriately.
Combined with Java's `+` String concatenation, it seems perfectly
adequate.

For yet better performance with the trace window, it would make a lot of
sense to special-case stepping so that it just pops the top line off the
log, and appends to the bottom, rather than re-stringifying the entire
trace log each time. This will be a future enhancement.
2012-12-09 21:02:11 -08:00