Previous 15994 Revisions Next

r5238 Wednesday 15th July, 2009 at 02:30:56 UTC by Barry Rodewald
[FM77AV] Corrected MMR window address register. This fixes no error messages being displayed by F-BASIC 3.3.
[src/mess/drivers]fm7.c

src/mess/drivers/fm7.c
r5237r5238
11151115   int x;
11161116   UINT16 window_addr;
11171117   UINT8* RAM = memory_region(space->machine,"maincpu");
1118   UINT16 size = 0x3ff;
11191118   
11201119   if(fm7_mmr.enabled)
11211120   {
r5237r5238
11311130
11321131   if(fm7_mmr.mode & 0x40)
11331132   {
1134      // Handle window offset (is this even close to right?)
1133      // Handle window offset - 0x7c00-0x7fff will show the area of extended
1134      // memory (0x00000-0x0ffff) defined by the window address register
1135      // 0x00 = 0x07c00, 0x04 = 0x08000 ... 0xff = 0x07400.
11351136      window_addr = ((fm7_mmr.window_offset << 8) + 0x7c00) & 0xffff;
11361137      if(window_addr < 0xfc00)
11371138      {
1138         if(window_addr > 0xf800)
1139            size = 0xfc00 - window_addr - 1;
1140         memory_install_readwrite8_handler(space,window_addr,window_addr+size,0,0,SMH_BANK(24),SMH_BANK(24));
1141         memory_set_bankptr(space->machine,24,RAM+window_addr+0x30000);
1139         memory_install_readwrite8_handler(space,0x7c00,0x7fff,0,0,SMH_BANK(24),SMH_BANK(24));
1140         memory_set_bankptr(space->machine,24,RAM+window_addr);
11421141      }
11431142   }
11441143}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team