Mercurial > hg > Members > kono > os9 > sbc09
diff v09.c @ 11:ce7323f9b937
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 06 Jul 2018 18:31:38 +0900 |
parents | cb7aa75418b8 |
children | 111e5defb8ab |
line wrap: on
line diff
--- a/v09.c Thu Jul 05 18:37:11 2018 +0900 +++ b/v09.c Fri Jul 06 18:31:38 2018 +0900 @@ -83,7 +83,10 @@ long len = filesize(image); if (romstart==0x8000) { #ifdef USE_MMU - romstart = memsize - len; + phymem = malloc(memsize + len - 0x2000); + mem = phymem + memsize - 0x10000 ; + mmu = mem + 0xffa0; + romstart = memsize - 0x2000; #else romstart = 0x10000 - len; #endif @@ -151,18 +154,12 @@ if (memsize < 512*1024) memsize = 512*1024; } else usage(); } - #ifdef USE_MMU - phymem = malloc(memsize); - mem = phymem + memsize - 0x10000 ; - mmu = mem + 0xffa0; - #else #ifdef MSDOS if((mem=farmalloc(65535))==0) { fprintf(stderr,"Not enough memory\n"); exit(2); } #endif - #endif read_image(); if (setterm) set_term(escchar); pcreg=(mem[0xfffe]<<8)+mem[0xffff];