diff --git a/gui.c b/gui.c index d6eca83..db0a006 100644 --- a/gui.c +++ b/gui.c @@ -147,9 +147,11 @@ int update_general_memdump(struct simdata_t *simdata){ if(width<16){ mvwprintw(general_memdump,1,1,"too small window"); }else{ - int n=(width-12)/4; - uint32_t ADDRESS=0; - for(int h=0;hPC-n*usable_height/2)&0x00FFFFFF; + for(int h=0;hRAM[temp_address++]); for (int i=0;iRAM[ADDRESS]>=0x20&&simdata->RAM[ADDRESS]<0x7F)?simdata->RAM[ADDRESS]:'.'); - ADDRESS++; + ADDRESS=(ADDRESS+1)&0xFFFFFF; } } } diff --git a/simdata.c b/simdata.c index 01f6f44..92e7b0f 100644 --- a/simdata.c +++ b/simdata.c @@ -36,6 +36,8 @@ struct simdata_t *init_simdata(){ return 0; } + ret->PC=0; + return ret; } diff --git a/simdata.h b/simdata.h index d4d7439..8761597 100644 --- a/simdata.h +++ b/simdata.h @@ -4,6 +4,7 @@ struct simdata_t{ long unsigned int current_clock; uint8_t *RAM; + uint32_t PC; }; struct simdata_t *init_simdata();