550 |
|
|
551 |
|
void memory_init(void) |
552 |
|
{ |
553 |
< |
int i; |
553 |
> |
char buffer[4096]; |
554 |
> |
char *nam; |
555 |
> |
int i, fd; |
556 |
> |
|
557 |
|
for(i=0; i<65536; i++) |
558 |
|
put_mem_bank(i<<16, &dummy_bank); |
559 |
|
|
557 |
– |
RAMBaseDiff = (uae_u32)RAMBaseHost - (uae_u32)RAMBaseMac; |
558 |
– |
ROMBaseDiff = (uae_u32)ROMBaseHost - (uae_u32)ROMBaseMac; |
559 |
– |
FrameBaseDiff = (uae_u32)MacFrameBaseHost - (uae_u32)MacFrameBaseMac; |
560 |
– |
|
560 |
|
// Limit RAM size to not overlap ROM |
561 |
|
#if REAL_ADDRESSING |
562 |
|
uint32 ram_size = RAMSize; |
564 |
|
uint32 ram_size = RAMSize > ROMBaseMac ? ROMBaseMac : RAMSize; |
565 |
|
#endif |
566 |
|
|
567 |
< |
// RAM and ROM |
567 |
> |
RAMBaseDiff = (uae_u32)RAMBaseHost - (uae_u32)RAMBaseMac; |
568 |
> |
ROMBaseDiff = (uae_u32)ROMBaseHost - (uae_u32)ROMBaseMac; |
569 |
> |
FrameBaseDiff = (uae_u32)MacFrameBaseHost - (uae_u32)MacFrameBaseMac; |
570 |
> |
|
571 |
> |
// Map RAM and ROM |
572 |
|
if (TwentyFourBitAddressing) { |
573 |
|
map_banks(&ram24_bank, RAMBaseMac >> 16, ram_size >> 16); |
574 |
|
map_banks(&rom24_bank, ROMBaseMac >> 16, ROMSize >> 16); |
577 |
|
map_banks(&rom_bank, ROMBaseMac >> 16, ROMSize >> 16); |
578 |
|
} |
579 |
|
|
580 |
< |
// Frame buffer |
580 |
> |
// Map frame buffer |
581 |
|
switch (MacFrameLayout) { |
582 |
|
case FLAYOUT_DIRECT: |
583 |
|
map_banks(&frame_direct_bank, MacFrameBaseMac >> 16, (MacFrameSize >> 16) + 1); |