Hi Everyone, i haven't been very active for some time due to RL stuff.
but i have still been slowly working on things.
last time i made a 65C02 from scratch in a Logic Simulator called Logisim, to better understand the hardware and potentially improve it.
but people pointed out that a lot of the improvements i wanted to add where already a thing in the 65816 and 65CE02... so that kinda killed that whole thing.
now i'm trying to do the same thing, but use the 65CE02 as the Base to improve upon.
I won't go into detail about what i want to add here, since i want to finish the whole CPU first before making a detailed thread about it.
my problem right now is that there are some things about the CPU that i have problems finding detailed information about...
for example, the ASW and ROW instructions.
in the
Datasheet and on
Wikipedia, ASW stands for "Arithmetic Shift left Word" while ROW stands for "ROtate left Word".
but there are other sites like
commodore.ca and
zimmers.net that say that ROW is "ROtate right Word".
so which one is correct? i would personally trust the offical Datasheet and Wikipedia more. but you can never be sure, and it doesn't hurt to ask.
(commodore.ca also seems to get the Addressing Mode (or AM) of INW and DEW wrong, it shows them as using the Absolute AM, but in the Datasheet they use the Base Page AM)
another thing that confuses me is the (D, SP), Y or "Stack Vector Indirect Indexed" AM.
more specifically does it behave differently depending on the mode that the SP is in?
for example, "LDA (0, SP), Y" (with Y = 0x00, SPH = 0x01, and SPL = 0xFF), loads the 2 bytes from 0x01FF and 0x01FF + 1.
with the 8 bit SP i would imagine that this would confine the data being loaded to the Page specified by SPH. so the 2 bytes are loaded from 0x01FF and 0x0100.
but with the 16 bit SP there is no reason to confine the AM to the current Page, as the Stack itself isn't either. so it would load the 2 bytes from 0x01FF and 0x0200.
Also i'm assuming that D is sign extended for the 16 bit SP, so that it reach both forwards and backwards from the SP. it doesn't matter for the 8 bit SP as it wraps around the Page anyways.
other than that i should be able to get the rest of the features working without issues. though if i still got any issues or questions i'll just ask them here in this thread.