HELLO ITS Day two of my proj
i realized im a bit over-affected by Z80
If i continue this thing the whole thing resulted will be a weird thing remapped from Z80 IS Table BRUHHHH
so imma work on a more simple mechanic.
the whole thing will be mainly 2 instruction types:
Load:
Including
LD 8REG,8REG LD 8REG,n LD 8REG,[HL] LD [HL],8REG
LD 16REG,16REG LD 16REG,nn
PUSH 16REG
POP 16REG
CALL
RETURN
JUMP
Calculate:
Including ADD SUB ADC SBC AND XOR OR Compare Bitwise Edit INC DEC
But why? why i decided to treat CALL RETURN JUMP as Load?
its because those Instructions are actually PUSH PC LD PC,nn POP PC and LD PC,nn :|
and for ADD and SUB I only need to set Carry Input as 1 and Port B Input Inverted.
and for ADC and SBC its actually a ADD with Carry Input and a ADD with Inverted Carry Input.
so its actually something like this:
=====|ADD|SUB|ADC|SBC|
PortA|A__|A__|A__|A__|
PortB|B__|~B_|||
In_C_|0__|1__|C__|~C_| <- and its actually XOR(x,AND(y,C))
the Final ALU will actually be two parts 1:ADD 2:Logic
erm so about the Compare thing its just SUB with Flag Register Input Disabled
then the Bitwise Edit i think i will not handle it right now cuz they can be easily programed with logic in assembly programming.
for the INC and DEC i just simply need to add a switching gate to select Port B as INC and DEC
Also i wanna try to open Register F as a Editable Register
it will be updated by ALU but also allowed to be edited by human
so i think its kinda enough right now..?
so we will hv
Reg8 list of B C D E H L A F
Reg16 list of BC DE HL AF SP PC Immediate
Special 8 bit of [HL],Immediate
the normal Load for 8 bit:
00[reg1][reg2]
the normal for 16 bit:
01[reg16 1][reg16 2]
the special 8 bit will be mapped later
then 10[x][y][reg1] will be for |ADD|SUB|ADC|SBC|
hummm looks nice may be this is enough for today