Commit Graph
17 Commits
Author SHA1 Message Date
Seth Morabito 2284535b7f Fix #17: Correct disassembly 2025-03-15 15:46:50 -07:00
Seth Morabito c317544e7b Address IntelliJ warnings
This commit addresses a large number of IntelliJ warnings
that have been left hanging around for far too long.
2025-02-13 16:05:42 -08:00
Matt Harlum 441f7349a0 Fix PHY/PLY Addressing mode 2017-06-19 11:49:46 +10:00
Matt Harlum 11f61f50a9 Add cycle counts for illegal NMOS opcodes 2017-06-07 12:20:21 +10:00
Matt Harlum a9c6d5964f * Add Support for All 65C02 Opcodes and all Rockwell/WDC opcodes except WAI/STP
* Add 65C02 Opcode tests
* All tests pass, Klaus' 6502_functional_tests pass & Klaus' 65C02_extended_opcodes_test also all pass
2017-06-06 19:59:01 +10:00
Seth Morabito 6e8fd40014 Refactor for Java 1.8
- Clean up and refactor code

- Add 1.8 features

- Clean up IntelliJ inspector warnings
2015-12-29 17:55:41 -08:00
Seth Morabito a4a110dcef Bugfixes, change logger, update copyright
- IR field in status panel now correctly displays the next instruction
  to be executed, instead of the instruction that was just executed.

- Switched from built-in Java util logger to Logback

- Updated all copyright strings to 2016
2015-12-29 14:40:42 -08:00
Seth Morabito e0d6017d95 Unifying and cleaning up copyrights 2014-08-16 13:50:47 -07:00
Seth Morabito e2a1144c7c Update copyright, prep for 1.1.0 2014-08-11 14:16:41 -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 933b09827a Cleanup and Javadoc 2012-12-30 11:27:10 -08:00
Seth Morabito 2ebdd254b3 Work In Progress: CPU behavior, UI changes
This is something of a "Work in Progress" checkpoint of several features
that are all half baked:

1. Allow loading of 16KB ROM files at address $C000 at run-time, not
   just at startup. See the "Load ROM..." File menu item.

2. Introduces the notion of "CPU Behaviors", so the core 6502 CPU
   implementation can match the behavior of either an early NMOS 6502, late
   NMOS 6502, or CMOS 65C02. Very little of this is actually implemented so
   far.

3. Adds a completely bogus implementation of the 6522 VIA (it
   does absolutely nothing right now).

4. Changes the address of the ACIA in the simulated system to match a
   real hardware implementation I put together.
2012-11-25 22:49:21 -08:00
Seth Morabito 795ccfde5d CPU bug fixes and Simulator enhancements.
Bug Fixes:

- Fixed several bugs in the CPU that caused processor status flags to
  be set incorrectly.  Instructions affected were: STA, STX, STY, CMP,
  CPX, CPY, BIT.

- Made some internal-use-only methods on the CPU class private.

- Fixed incorrect disassembly of (Indirect,X) and (Indirect),Y
  instructions. Although this didn't affect behavior, it certainly
  caused me some confusion in debugging.

- Added missing "BCS" instruction to instruction table.

Enhancements:

- Now includes a full version of Lee Davison's Enhanced 6502 BASIC
  bundled as source code and a ROM image. Get that REAL COMPUTER
  EXPERIENCE!(tm)

- If a file named "rom.bin" exists in the same directory where the
  simulator is executed, it will be loaded at addresses $d000-$ffff.

- Gave the CPU an idle loop to make simulated timing a little more
  realistic (but this is still an area needing major improvement)

- Changed the CPU's toString() method to give better debugging output.

- Added a small typeahead buffer to the Console.

- Better exception messaging.

Misc:

- Bumped version to 0.5, updated README.
2012-10-21 20:05:05 -07:00
Seth Morabito ed943687bf Implemented Relative mode (branch) instructions and unit tests. Fixed
a bug in the instruction size table.
2009-01-07 18:26:11 -08:00
Seth J. Morabito c93a03d4f4 Improved README. Fixed typo in InstructionTable.java 2008-12-27 21:46:13 -08:00
Seth J. Morabito 8bcd8a4a75 Whitespace and indentation canonicalization. That's what I get for using two editors. 2008-12-27 21:09:47 -08:00
Seth Morabito 3f74489757 Renamed project to "Symon". 2008-12-13 14:59:22 -08:00