comparison v09.c @ 52:51b437557f42

boot without disk image dir -e on other directory
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 22 Jul 2018 15:52:39 +0900
parents 7c5379eb406e
children 8d151f303bee
comparison
equal deleted inserted replaced
51:498b6fcaf270 52:51b437557f42
81 if((image=fopen("..\\v09.rom","rb"))==NULL) { 81 if((image=fopen("..\\v09.rom","rb"))==NULL) {
82 perror("v09, image file"); 82 perror("v09, image file");
83 exit(2); 83 exit(2);
84 } 84 }
85 long len = filesize(image); 85 long len = filesize(image);
86 /*
87 *
88 * 0x0000-0xdfff normal mem
89 * 0xxxxx-0xdfff rom
90 * 0xe000-0xe100 i/o
91 * 0xe000-0xffff rom
92 *
93 * discless boot
94 * rom image will be copyied from 0xed00-0x1xxxx
95 * boot copies 0x10000-0x1xxxx to os9's boot memory
96 */
86 #ifdef USE_MMU 97 #ifdef USE_MMU
98 /*
99 * In case of Coco, there is no ROM (switched out after boot )
100 * 0x00000-0x0fdff normal mem
101 * 0x0fe00-0x0ffff ram fixed address ram including io
102 * 0x10000-0x7ffff ram (512Kb memory current implementation)
103 * it should have 2MB memory
104 * 0x10000-0xfffff ram
105 * >0x100000 lapround
106 *
107 * discless boot
108 * rom image will be copyied from 0xed00-0x1xxxx
109 * boot copies 0x10000-0x1xxxx to os9's boot memory
110 */
87 phymem = malloc(memsize + len - 0x2000); 111 phymem = malloc(memsize + len - 0x2000);
88 rommemsize = memsize + len - 0x2000; 112 rommemsize = memsize + len - 0x2000;
89 mem = phymem + memsize - 0x10000 ; 113 mem = phymem + memsize - 0x10000 ;
90 mmu = &mem[0xffa0]; 114 mmu = &mem[0xffa0];
91 prog = (char*)mem; 115 prog = (char*)mem;