add ram bricks

This commit is contained in:
Redo
2022-11-15 13:52:24 -06:00
parent 5ae87d926c
commit 10462e5a6e
5 changed files with 16246 additions and 15637 deletions

View File

@@ -167,6 +167,8 @@ enum GateFuncs {
GateFunc_Rom12x32,
GateFunc_Rom12x48,
GateFunc_Rom12x64,
GateFunc_Ram8x8,
GateFunc_Ram8x12,
};
GATEFUNC(Diode) { setport(2, getport(1)); }
@@ -334,6 +336,8 @@ GATEFUNC(Rom12x16) { if(getport(29)) { int a = getword(12, 1); for(int i=0; i<16
GATEFUNC(Rom12x32) { if(getport(45)) { int a = getword(12, 1); for(int i=0; i<32; i++) { setport(13+i, getdata(a + i*4096)); } } else { clearword(32, 13); } }
GATEFUNC(Rom12x48) { if(getport(61)) { int a = getword(12, 1); for(int i=0; i<48; i++) { setport(13+i, getdata(a + i*4096)); } } else { clearword(48, 13); } }
GATEFUNC(Rom12x64) { if(getport(77)) { int a = getword(12, 1); for(int i=0; i<64; i++) { setport(13+i, getdata(a + i*4096)); } } else { clearword(64, 13); } }
GATEFUNC(Ram8x8) { if(getport(25)) { setword(8, 9, getdata(getword(8, 17))); } else { clearword(8, 9); } if(getport(26)) { setdata(getword(8, 17), getword(8, 1)); } }
GATEFUNC(Ram8x12) { if(getport(29)) { setword(8, 9, getdata(getword(12, 17))); } else { clearword(8, 9); } if(getport(30)) { setdata(getword(12, 17), getword(8, 1)); } }
GateFunc sim_logic_functions[] = {
0,
@@ -502,5 +506,7 @@ GateFunc sim_logic_functions[] = {
GATEFUNCID(Rom12x32),
GATEFUNCID(Rom12x48),
GATEFUNCID(Rom12x64),
GATEFUNCID(Ram8x8),
GATEFUNCID(Ram8x12),
};