1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00
Commit Graph

1243 Commits

Author SHA1 Message Date
Thomas Harte
c266639a0c Improve commentary; use specialised types for TAS. 2023-12-22 10:46:10 -05:00
Thomas Harte
5b43ea82f3 Lock down interrupt cycle types. 2023-12-21 23:12:14 -05:00
Thomas Harte
7c28a77b2b Fill in assignment operator. 2023-12-21 23:09:42 -05:00
Thomas Harte
85f814c632 Attempt to build fixed operations into type.
This simplifies callees and should make all helper functions automatically able to optimise themselves for fixed operations.
2023-12-21 23:08:18 -05:00
Thomas Harte
213dfe037d Shift operation stuff into its own namespace, making data_select_active a free function. 2023-12-21 16:03:53 -05:00
Thomas Harte
faaa89bb67 Eliminate all reference to EmuTOS. 2023-12-21 15:28:45 -05:00
Thomas Harte
1f2fbccf1f Update documentation. 2023-12-20 22:05:45 -05:00
Thomas Harte
356d8f469a Correct various throaway -> throwaway. 2023-12-20 22:02:51 -05:00
Thomas Harte
60bd81c4cc Use X. 2023-12-20 22:02:51 -05:00
Thomas Harte
38c3d302a3 Restore JMP (abs, x) length. 2023-12-20 22:02:51 -05:00
Thomas Harte
24c80060c8 Revise guess on JMP (abs, x). 2023-12-20 22:02:51 -05:00
Thomas Harte
d33deb676f Adjust (abs, y) addressing. 2023-12-20 22:02:19 -05:00
Thomas Harte
bf5ed98f35 Generalise 65c02 behaviour.
Partly to convince myself:
1. this change alters behaviour of `CycleAddXToAddressLowRead`
2. which affects only `AbsoluteXw` and the 65c02-specific `JMP (abs, x)`;
3. `AbsoluteXw` is then used only by `AbsoluteXWrite` and `AbsoluteXReadModifyWrite`;
4. `AbsoluteXWrite` is used for abs, x addressing by `SHY`, `STA` and `STZ`;
5. `AbsoluteXReadModifyWrite` is used for `ASL`, `ASO`, `ROL`, `RLA`, `LSR`, `LSE`, `ROR`, `RRA`, `DEC`, `DCP`, `INC` and `INS`.

... though many of the latter are replaced by instance of `FastAbsoluteXReadModifyWrite` for the 65c02 which don't include a dummy
access at all if the page boundary is crossed so the issue is moot.
2023-12-20 22:02:14 -05:00
Thomas Harte
f25aaf2bb3 Adjust 65c02 STA abs,x behaviour. 2023-11-29 15:32:02 -05:00
Thomas Harte
7171e24ccf Enable further compile-time optimisations. 2023-11-28 13:50:53 -05:00
Thomas Harte
36a4629ce0 Explain new semantics. 2023-11-27 21:49:57 -05:00
Thomas Harte
5c7f94d2ef Introduce the possibility of operation type as a template parameter.
It's already proven possible to provide this for instruction fetch, so I think it'll immediately be a win. But more importantly it opens a path forwards for further improvement.
2023-11-27 11:48:34 -05:00
Thomas Harte
e46e42d896 This is the same test either way around. 2023-10-09 16:47:02 -04:00
Thomas Harte
1cb26cb141 Pull add/sub distinction into templates. 2023-10-09 16:40:50 -04:00
Thomas Harte
873b1122ab Correct SHA, SHX, SHY, SHS when page boundary crossed. 2023-09-21 15:31:04 -04:00
Thomas Harte
74b5ad93c4 Don't necessarily apply D for ARR. 2023-09-20 10:17:00 -04:00
Thomas Harte
43dfb729d3 Explain even better. 2023-09-02 14:45:53 -04:00
Thomas Harte
543be49cf8 Merge branch 'master' into 65C02BCDTest 2023-09-01 16:39:18 -04:00
Thomas Harte
1fb278c9f1 Fix abs,x NOP length. 2023-09-01 14:31:21 -04:00
Thomas Harte
19ec63b4fb Add exposition, slightly simplify, unbreak INS. 2023-09-01 09:29:35 -04:00
Thomas Harte
4d6ffa7a2e With some degree of hit and hope, correct 65C02 results. 2023-08-31 15:28:59 -04:00
Thomas Harte
39ee75d94a Clean up decimal SBC implementation. 2023-08-31 15:02:17 -04:00
Thomas Harte
13be247495 Comment. 2023-08-30 23:08:42 -04:00
Thomas Harte
cdcac7c11c Simplify top nibble handling. 2023-08-30 23:07:54 -04:00
Thomas Harte
67cd5dd63b Simplify top nibble decision. 2023-08-30 23:06:00 -04:00
Thomas Harte
139a1a2acc Clean up decimal ADC. 2023-08-30 23:04:38 -04:00
Thomas Harte
5dae726857 Differentiate non-fetching and fetching NOPs. 2023-08-29 16:50:39 -04:00
Thomas Harte
7815d18676 Merge branch 'master' into 65816StackAgain 2023-08-19 15:55:45 -04:00
Thomas Harte
ca75822dbe Fix restart_operation_fetch. 2023-08-17 15:42:34 -04:00
Thomas Harte
d9df568dab Add faulty restart_operation_fetch. 2023-08-17 15:38:28 -04:00
Thomas Harte
26343148ae Use simplified control lines when appropriate. 2023-08-17 15:32:02 -04:00
Thomas Harte
fd0fe66851 Omit unsupported registers and flags. 2023-08-17 15:24:08 -04:00
Thomas Harte
833613b68a Fix S top byte overwrite. 2023-08-17 14:50:55 -04:00
Thomas Harte
42024c1573 Don't allow setting of an invalid S. 2023-08-07 09:19:20 -04:00
Thomas Harte
54103f1f34 Fix SH=1 reset; appropriate TCS. 2023-08-05 15:06:18 -04:00
Thomas Harte
c0eb401d04 Add a between-instructions enforcement of SH = 1. 2023-08-05 14:57:43 -04:00
Thomas Harte
2262725010 Reveal 16-bit stack pointer when asked, regardless of mode. 2023-07-31 17:08:02 -04:00
Thomas Harte
e61a4eb5a9 Regularise PHD and PLD. 2023-07-30 16:36:29 -04:00
Thomas Harte
acd7f9f4cd Fix stack usage of JSL. 2023-07-30 16:34:42 -04:00
Thomas Harte
9f1a657cc4 Fix stack usage of PEA. 2023-07-30 16:33:44 -04:00
Thomas Harte
e52d1866ab Fix PEI stack usage. 2023-07-30 16:32:56 -04:00
Thomas Harte
a02b8222fa Fix stack usage of PER. 2023-07-30 16:29:56 -04:00
Thomas Harte
3762ee1a63 Fix stack usage of PHD. 2023-07-30 16:29:15 -04:00
Thomas Harte
3ec61e8770 Fix stack usage of RTL. 2023-07-30 16:27:13 -04:00
Thomas Harte
2f7dd0b01a Correct stack behaviour of PLD. 2023-07-30 16:26:29 -04:00