It is currently Fri Nov 17, 2017 12:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 559 posts ]  Go to page Previous  1 ... 34, 35, 36, 37, 38
Author Message
PostPosted: Sun Nov 12, 2017 3:00 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6437
Location: UK (temporarily)
lidnariq wrote:
You could PM me the bad dump and maybe I'll be able to figure out what's going wrong.
Huh, weird.

The literal contents of that dump are
bank 0, bank 0, bank 0, bank 0
bank 1, bank 1, bank 1, bank 1
bank 2, bank 2, bank 2, bank 2
bank 3, bank 3, bank 3, bank 15

... derp. That's actually exactly what our documentation for mapper 82 says it does. Sorry!

Use these lines:
Code:
   for(i = 0; i < pagesize - 2; i += 2){
      cpu_write(d, 0x7efa, i << 2);
      cpu_write(d, 0x7efc, (i | 1) << 2);
      cpu_read(d, 0x8000, banksize * 2);
   }
   cpu_write(d, 0x7efe, i << 2);


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 4:21 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6437
Location: UK (temporarily)
Not clear what's going wrong, but you could try this?
cpu_write(d, 0x7efc, (i*4) + 4);


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 5:50 pm 
Offline

Joined: Sat Oct 28, 2017 10:18 am
Posts: 11
lidnariq wrote:
Not clear what's going wrong, but you could try this?
cpu_write(d, 0x7efc, (i*4) + 4);


That did the trick it didn't work at first but I went back and looked at one the early scripts switched out the PRG Banking Registers again and it worked perfect even the PRG Checksum is correct. Dumped it and the game works like it should. Thank you.. Awesome..

here is the working code..

Code:
 /*
Taito X1-005
TFC-FM-5900 不動明王伝のみ Program ROM size は 2M
save RAM が存在するがアクセス方法は不明
*/
board <- {
   mappernum = 82, ppu_ramfind = false, vram_mirrorfind = false,
   cpu_rom = {
      size_base = 1 * mega, size_max = 2 * mega,
      banksize = 0x2000
   },
   ppu_rom = {
      size_base = 2 * mega, size_max = 4 * mega,
      banksize = 0x2000 / 8 //0x0800*2 + 0x0400 * 4
   }
};

function cpu_dump(d, pagesize, banksize)
{
   local i;
  for(i = 0; i < pagesize - 2; i += 2){
      cpu_write(d, 0x7efa, i << 2);
      cpu_write(d, 0x7efb, (i*4) + 4);
      cpu_read(d, 0x8000, banksize * 2);
   }
   cpu_write(d, 0x7efc, i << 2);
   cpu_read(d, 0xc000, banksize * 2);
}

function ppu_dump(d, pagesize, banksize)
{
   for(local i = 0; i < pagesize; i += 8){
      local ar = [i, i|2, i|4, i|5, i|6, i|7];
      cpu_write(d, 0x7ef0, ar);
      ppu_read(d, 0x0000, banksize * 8);
   }
}

_________________
Don't buy FamicomNes games WillyNilly Check the Mapper first
https://wiki.nesdev.com/w/index.php/Category:Discrete_logic_mappers
https://wiki.nesdev.com/w/index.php/Category:INES_Mappers
https://wiki.nesdev.com/w/index.php/Category:Bad_iNES_Mappers


Top
 Profile  
 
PostPosted: Sun Nov 12, 2017 11:32 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6437
Location: UK (temporarily)
Zoldark wrote:
cpu_write(d, 0x7efb, (i*4) + 4);
0x7EFB ??

Oh derp. Of course.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 559 posts ]  Go to page Previous  1 ... 34, 35, 36, 37, 38

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group