1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-02 16:04:59 +00:00
Commit Graph

766 Commits

Author SHA1 Message Date
Thomas Harte
defec2c9b0 Fixed: operation reads now fulfil the promise of seeding the value to be read with 0xff. 2017-03-26 20:56:27 -04:00
Thomas Harte
e01f3f06c8 Completed curly bracket movement. 2017-03-26 14:34:47 -04:00
Thomas Harte
55ce851bb2 Fixed types of the 8k cartridges, ensured the 6502 starts without an IRQ request history. 2017-03-18 17:04:01 -04:00
Thomas Harte
36b58d03b7 Formalised read bus value guarantee from the 6502, fixed missing clock signal wiring on the Atari cartridge class, reintroduced CommaVid support. 2017-03-18 14:46:46 -04:00
Thomas Harte
14a76af0d3 Started trying to float out bus control to cartridges. 2017-03-17 20:28:07 -04:00
Thomas Harte
5be22e2f8d Switched to suffix underscores and underscores in general for instance variables. 2016-12-03 11:38:53 -05:00
Thomas Harte
7ad44f5152 Flipped order of conditional so as negligibly to improve prediction. 2016-10-31 22:17:18 -04:00
Thomas Harte
2452a3104f Corrected test: hitting zero is sufficient. No need to cross it. 2016-10-30 20:24:30 -04:00
Thomas Harte
9309be229c Moved cycle count test down to the only places where it may actually yield a different result. 2016-10-30 20:13:44 -04:00
Thomas Harte
a106018680 Fixed initial state: interrupt flag is initially low. 2016-10-28 21:22:03 -04:00
Thomas Harte
613b5b3f98 Switched to inverse storage of the interrupt flag so as to reduce logical burden when storing IRQ line history. 2016-10-28 20:52:43 -04:00
Thomas Harte
4408c60ef7 This too should continue, not break, since it doesn't schedule a memory access. 2016-10-27 18:32:21 -04:00
Thomas Harte
534b3d085d Improved test reporting, attempted to resolve timing errors just introduced (i.e. to differentiate break/continue where a cycle may or may not be spent). 2016-10-27 08:41:44 -04:00
Thomas Harte
f84b66a5f4 Made an attempt to fix wake-from-WAIT. 2016-10-25 19:06:46 -04:00
Thomas Harte
4b18c76b84 Introduced a bifurcation between break and continue to signify whether a bus access takes place, necessitating a shift in the location of the bus access but allowing the conditional to be dropped. Need to test. 2016-10-25 18:45:53 -04:00
Thomas Harte
c253a4258f Made minor restructuring changes, slightly to reduce number of conditionals per operation and to drop a big hint to the optimiser. 2016-10-25 18:34:24 -04:00
Thomas Harte
fa7c64bb5d Eventually reached an implementation of ADC that continues to satisfy all the formalised unit tests while also satisfying the manual BCDTest, that I need to find a way to formalise. I fixed the unit tests for Swift 3 while here, and attempted to do some unrelated NIB stuff with no real success. 2016-10-03 22:03:39 -04:00
Thomas Harte
5d40d70c92 Fixed 6560 addressing error, added an autotyper for Vic disks (more work potentially needed), fixed semantics for testing whether a 6502 is about to reset. 2016-08-01 10:32:32 -04:00
Thomas Harte
740ea0b7e2 Added overflow-flag setting logic and ensured disk ROM gets through regardless of ROM/disk installation order. 2016-07-31 19:33:18 -04:00
Thomas Harte
1baf21827c Since the ROM is well disassembled, let's actually try to be a 1541 first. 2016-07-06 22:17:32 -04:00
Thomas Harte
41809d4597 Made an attempt at NMI usurption of IRQ/BRK. 2016-06-29 20:59:45 -04:00
Thomas Harte
c02226bc41 Ensured stack pointer goes the right way upon reset. 2016-06-29 20:42:26 -04:00
Thomas Harte
db7c6430b5 Fixed Klaus Dormann termination condition. 2016-06-29 19:16:34 -04:00
Thomas Harte
0182b0483a Added a 'power on' flag that is set automatically at construction but can be declined. Saves all that stuff of every machine having to set and then unset the RST line, and fixes an Electron bug related to that. 2016-06-29 19:13:24 -04:00
Thomas Harte
6419d9c485 Added a single IRQ test case, discovering that I'm two cycles short. Whoops! 2016-06-28 21:29:43 -04:00
Thomas Harte
6e698e908e Made an attempt to reduce cost of the most-likely path. 2016-06-28 18:46:00 -04:00
Thomas Harte
574aa32b72 Made an attempt to implement NMI. Some work to do on the B flag though, I think. 2016-06-27 22:01:48 -04:00
Thomas Harte
88e2b382e5 Made an attempt at a full and thorough 6532 implementation (and got a bit more explicit about flag size in the 6502). 2016-06-20 18:57:35 -04:00
Thomas Harte
ef3ed1f436 Implemented full paste ability for any machine that is a typer. 2016-06-19 16:35:04 -04:00
Thomas Harte
06fb2ff1c7 Started endeavouring to sketch out the boilerplate for writing a 6522 test harness. Added a default implementation of synchronise to the 6522 too, since not everybody is going to want one. 2016-06-18 09:28:46 -04:00
Thomas Harte
5c4f35e13f Finally started on generalising the C++ stuff so as to be able to be able to get a working audio binding on the OS-specific side without further repetition by factoring an appropriate protocol out from the Electron and sketching out the correct speaker class for the Atari. Added a method to ask it what a good output frequency would be. 2016-05-31 21:23:44 -04:00
Thomas Harte
0242924fb4 Various bits of caveman debugging appearing and disappearing, switched to latching ball behaviour. 2016-05-22 14:26:02 -04:00
Thomas Harte
e636ae37b4 Ensured that calling return_from_subroutine really does unjam the processor if required, causing all tests once again to pass. 2016-05-10 21:44:11 -04:00
Thomas Harte
5a4262d74e Confirmed: it is inaccurate for a 6502 to self reset at power up. So that responsibility now rests in the machines. 2016-05-10 21:05:52 -04:00
Thomas Harte
9b64f64db7 Attempted to normalise some style decisions.` 2016-04-24 22:32:24 -04:00
Thomas Harte
a6ef78862c This'll probably do for now. 2016-03-24 22:20:00 -04:00
Thomas Harte
f1caf62ff2 Continuing the switch around. 2016-03-24 19:31:41 -04:00
Thomas Harte
738186e323 Edging back towards shifting things to the stack. 2016-03-24 19:17:44 -04:00
Thomas Harte
3038704977 Attempted to introduce a lowpass filter to the graphics output, reverted 6502 optimisations as seemingly not working. 2016-03-21 22:01:25 -04:00
Thomas Harte
5db0f9e2d5 Shunted a few more things onto the stack. 2016-03-20 22:59:21 -04:00
Thomas Harte
9a82f028aa operation is now also stack local. 2016-03-20 22:52:49 -04:00
Thomas Harte
2f174b3a3e Moved operand to stack-local storage. 2016-03-20 22:50:16 -04:00
Thomas Harte
5966ac845f Switched symbols and updated all-RAM 6502 in order to fix unit test target. 2016-03-20 22:48:56 -04:00
Thomas Harte
a4ec0b023c Made some type conversions explicit. 2016-03-15 21:25:02 -04:00
Thomas Harte
20ac630e4d Some minor optimisations and timing tweaks. Nothing of substance. 2016-03-10 19:58:50 -05:00
Thomas Harte
1eea28b692 Disabled some debugging parts, added some others, marked some things as inline. Ticking over. 2016-02-22 23:35:42 -05:00
Thomas Harte
baef1ccd57 Made the constructor protected, to emphasise that this class isn't for instantiation. Also added extra comments aplenty. 2016-01-21 08:39:34 -05:00
Thomas Harte
9fa35dd559 Killed some whitespace lines. 2016-01-20 21:58:34 -05:00
Thomas Harte
de7218cdf0 Added a lot of commenting to the CPU6502 definition, simplifying its construction. Added missing nullability modifier to CSElectron. Fixed bad-habit Objective-C style naming on the Electron's Interrupt enum. 2016-01-20 21:55:38 -05:00
Thomas Harte
93f7df04a0 Ensured correctly timed sampling of the interrupt line. 2016-01-10 22:55:56 -05:00
Thomas Harte
ccf20299a3 Made an attempt at getting some interrupts all up inside this thing. 2016-01-10 19:06:46 -05:00
Thomas Harte
7341f5c341 This is intended to be enough to start producing something of an output. But something's obviously still broken. 2016-01-09 20:26:40 -05:00
Thomas Harte
bfd9957c81 You now get an Electron only if you ask for a new file. That'll do for now while it's the only thing that one might want to start without supplying a file. The 6502 now starts from a defined point — being reset. The Electron is starting to grow the absolute most simple buds of its memory map. 2016-01-06 21:09:49 -05:00
Thomas Harte
675070c5dd Very, _very_ minor: switched to normal C++ constructor syntax for simple variable initialisation. 2015-12-06 16:53:37 -05:00
Thomas Harte
a693c081f8 Switched on the appropriate compiler warnings re: signed comparisons and implicit conversions. Fixed all less-than-explicit calls. 2015-08-16 16:08:29 -04:00
Thomas Harte
9ca57b80a7 Minor steps to help with diagnostics; all commented out or merely to benefit with breakpoint placement. 2015-08-13 08:43:10 +01:00
Thomas Harte
cc98534f94 Added test for NOP, discovering the undocumented ones to be the incorrect length. 2015-08-13 07:32:50 +01:00
Thomas Harte
dd0f17130a Found and fixed some timing errors in absolute indexed and in (indirect), y addressing modes: neither is able in write or read-modify-write modes to shave a cycle as then can when reading. 2015-08-13 02:58:39 +01:00
Thomas Harte
975836c30f Added a quick snippet test, discovering that I've cut a cycle from read/modify/writes. 2015-08-13 02:18:41 +01:00
Thomas Harte
503d684af0 Added a couple of timing tests, both of which seem to pass for now. 2015-08-13 01:55:23 +01:00
Thomas Harte
d19f8ed507 Removed the implicit reset upon 6502 startup, adding a reset line. Hence all tests now pass again. Added an empty shell for timing tests, the all-RAM 6502 now counting bus cycles. 2015-08-13 00:51:06 +01:00
Thomas Harte
c1d1fb65cb Made an attempt properly to emulate the RDY line and the Atari's use of it. 2015-07-31 16:54:20 -04:00
Thomas Harte
53dd5c8f16 Trying to fix my RDY line emulation. Switched to PAL timings, at least temporarily, since it's starting to make a difference. 2015-07-31 16:44:53 -04:00
Thomas Harte
cd0a62d21e With a slight tweak to the informal protocol used for 6502 memory access cycles, ensured the wait strobe actually halts the CPU, to give a more accurate linking of machine time to real time. 2015-07-26 15:55:19 -04:00
Thomas Harte
6252f6030f Switched to idiomatic source name, ensured latest project name is in all appropriate header places, threw texture coordinates slightly into the shader mix. 2015-07-26 15:25:11 -04:00
Thomas Harte
6558ae1425 Imported what little I have so far in the way of a memory-access cycle complete 6502 and just enough of a pretend Atari 2600 on top to be able to see some playfields in ASCII art. 2015-07-16 19:56:02 -04:00