also intercept PWriteB
Some checks are pending
Build / cmake-builds (push) Waiting to run
Build / makefile (macos-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (macos-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (macos-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (macos-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (macos-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (macos-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Build / makefile (ubuntu-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (ubuntu-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (ubuntu-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (ubuntu-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Some checks are pending
Build / cmake-builds (push) Waiting to run
Build / makefile (macos-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (macos-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (macos-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (macos-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (macos-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (macos-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Build / makefile (ubuntu-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (ubuntu-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (ubuntu-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (ubuntu-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
This commit is contained in:
parent
6089dedd9d
commit
15b397aed7
1 changed files with 23 additions and 18 deletions
|
@ -281,7 +281,7 @@ typedef struct {
|
|||
|
||||
struct __mem_writes {
|
||||
int32_t addr;
|
||||
uint16_t data;
|
||||
uint8_t data;
|
||||
} *mem_writes;
|
||||
int n_mem_writes = 0;
|
||||
|
||||
|
@ -290,6 +290,24 @@ void init_mem_writes()
|
|||
mem_writes = (struct __mem_writes *)malloc(sizeof(struct __mem_writes) * 256);
|
||||
}
|
||||
|
||||
void put_mem_write(uint8_t data, uint32_t pa)
|
||||
{
|
||||
int i = 0;
|
||||
int found = 0;
|
||||
for(i=0; i<n_mem_writes; i++) {
|
||||
if (mem_writes[i].addr == pa) {
|
||||
mem_writes[i].data = data;
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == 0) {
|
||||
mem_writes[n_mem_writes].addr = pa;
|
||||
mem_writes[n_mem_writes].data = data;
|
||||
n_mem_writes++;
|
||||
}
|
||||
}
|
||||
|
||||
uint16 *M = NULL; /* memory */
|
||||
int32 REGFILE[6][2] = { {0} }; /* R0-R5, two sets */
|
||||
int32 STACKFILE[4] = { 0 }; /* SP, four modes */
|
||||
|
@ -2838,23 +2856,8 @@ void reset_mem_writes()
|
|||
void PWriteW (int32 data, int32 pa)
|
||||
{
|
||||
if (ADDR_IS_MEM (pa)) { /* memory address? */
|
||||
|
||||
int i = 0, found = 0;
|
||||
if (data > 0xffff)
|
||||
printf("FAIL %x\n", data);
|
||||
|
||||
for(i=0; i<n_mem_writes; i++) {
|
||||
if (mem_writes[i].addr == pa) {
|
||||
mem_writes[i].data = data;
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found == 0) {
|
||||
mem_writes[n_mem_writes].addr = pa;
|
||||
mem_writes[n_mem_writes].data = data;
|
||||
n_mem_writes++;
|
||||
}
|
||||
put_mem_write(data, pa);
|
||||
put_mem_write(data >> 8, pa + 1);
|
||||
|
||||
WrMemW (pa, data);
|
||||
return;
|
||||
|
@ -2873,6 +2876,8 @@ return;
|
|||
void PWriteB (int32 data, int32 pa)
|
||||
{
|
||||
if (ADDR_IS_MEM (pa)) { /* memory address? */
|
||||
put_mem_write(data, pa);
|
||||
|
||||
WrMemB (pa, data);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue