If not for the attribute flag, the proccesor
would automatically makes padding between the
elements of the struct since they jump over
the byte boundary for efficiency purposes,
making all elements easier to acces for the
cpu. This however destroys our entire union, since
its made with no paddin in mind, the attribute flag
removes the padding
+Makefile cleaning
+*Reg.bits renamed to more appropriate .field
Did a bunch of small fixes to the code architecture,
most notably wrote the NMI function for the CPU and
actually docked the ppu files to the rest of the project.
The PPU currently does nothing but process some registers
in a basic sense.
I (hopefully along with rendev) will start work on the
background rendering soon, I also need to fix the registers
from their current makeshift solutions to the correct loopy
ones, lots of work to be done *sigh*, but the future does
seem bright.
Nothing much, removed the useless and overly complicated
mapperResolve funcs in preparation for starting work on
the PPU, this kinda simplifies things a bit.
As some may know (I didn't), when doing JMP(6C) on an address
like 0xXXFF (X may be any, let Y = X+1), JMP composes the
final address by reading the lsb from 0xXXFF and the msb from
0xXX00 instead of 0xXY00, as would be logical. JMP doesn't use
carry and as such can't pass over to the next page, and when
incrementing the argumental address (0xXXFF) the msb stays put.
I did now know about any of this, and this is a pretty monumental
exception, I feel more documentation should be written about this,
I only randomly stumbled upon this on 6502.org
bus_read16 used to read the lsb as the msb and the msb as the lsb,
fixed this by changing the read offsets for the addresses.
This was only primarly used in the IND addressing mode only used by
opcode 6C (JMP IND), which messed up on call, this fixes the issue,
but we still have later JMP problems that look not related to the
code, expect a further commit fixing JMP or any opcode causing the
branch from the expected output.
On branch main