It is currently Sat Apr 21, 2018 6:12 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Aug 18, 2014 6:00 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3097
Location: Brazil
AFAIK, this game works only on Nestopia, but since Nestopia has no debugging features, it's hard to spot what's wrong in my emulator.
Any help? If you want the full LOG, let me know.

Code:
 line  opcode  PC
(050351) 8D, FFB1 STA $2005         A=00,X=00,Y=01,S=FA,P=37
(050352) 8E, FFB4 STX $2005         A=00,X=00,Y=01,S=FA,P=37
(050353) AD, FFB7 LDA $045B         A=00,X=00,Y=01,S=FA,P=37
(050354) 29, FFBA AND #$0F            A=00,X=00,Y=01,S=FA,P=37
(050355) C9, FFBC CMP #$07            A=00,X=00,Y=01,S=FA,P=37
(050356) F0, FFBE BEQ #$04            A=00,X=00,Y=01,S=FA,P=B4
(050357) A5, FFC0 LDA $01         A=00,X=00,Y=01,S=FA,P=B4
(050358) D0, FFC2 BNE #$04            A=1E,X=00,Y=01,S=FA,P=34
(050359) 8D, FFC8 STA $2001         A=1E,X=00,Y=01,S=FA,P=34
(050360) 60, FFCB RTS             A=1E,X=00,Y=01,S=FA,P=34
(050361) 4C, FD73 JMP $FE77         A=1E,X=00,Y=01,S=FC,P=34
(050362) EE, FE77 INC $0632         A=1E,X=00,Y=01,S=FC,P=34
(050363) A5, FE7A LDA $0D         A=1E,X=00,Y=01,S=FC,P=34
(050364) A6, FE7C LDX $0F         A=FF,X=00,Y=01,S=FC,P=B4
(050365) A4, FE7E LDY $0E         A=FF,X=00,Y=01,S=FC,P=36
(050366) 40, FE80 RTI             A=FF,X=00,Y=00,S=FC,P=36
(050367) 0C, 8039 .db $0000, Y (0000)   A=FF,X=00,Y=00,S=FF,P=30
(050368) 20, 803C JSR #$21            A=FF,X=00,Y=00,S=FF,P=30
(050369) 1E, 2221 ASL $1E1E, X (1E1E)   A=FF,X=00,Y=00,S=FD,P=30
(050370) F1, 2224 SBC ($F1), Y [$FFFF]      A=FF,X=00,Y=00,S=FD,P=32
(050371) F1, 2226 SBC ($FF), Y [$01FF]      A=05,X=00,Y=00,S=FD,P=31
(050372) FF, 2228 .db #$FF [unofficial opcode]


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 7:33 am 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 399
http://cah4e3.shedevr.org.ru/fceultra.php


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 7:41 am 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
It's pretty clear the wrong bank is mapped at $8000, but that portion of the log only shows the symptom of the issue, not the cause.

Rather than sifting through a huge log, try logging only writes to MMC5 registers. That way, you can figure out which banks should be mapped when the game reaches that point.

Also, you should look into improving your logging function. Right now it gets at least one opcode wrong: there's no such thing as JSR #$21.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 9:32 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3097
Location: Brazil
No writes to MMC5 regs. :shock: :shock:


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 9:36 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6205
Location: Canada
Well, it looks quite wrong directly after the RTI:
Code:
(050367) 0C, 8039 .db $0000, Y (0000)   A=FF,X=00,Y=00,S=FF,P=30


Is there something wrong with RTI in your emulator? What opcode is it executing here and what does it do? It seems a bit unlikely that MSG5 would be executing this as code. (I think someone already suggested that it looks like you have the wrong bank mapped here.)

Also, what do you mean it only works with Nestopia? Seems to run fine in FCEUX for me, and it has a great debugger.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 12:12 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3097
Location: Brazil
Opcode $0C is a NOP.

Sort of... wrong mapper number in the header. It was set as "1". :oops: :oops: :oops:

After fixing it to 5, IRQs seem broken. Is this a bad dump???
Code:
Filename.....: Metal Slader Glory (J).nes
Format.......: NES
Mapper.......: 001
Data size....: 512K PRG ROM (32 x 16K banks)
               (CRC $B4735FAC)
               1024K CHR ROM (64 x 8K banks)
PPU vertical mirroring.
Battery data.: yes
Trained......: no
Four screen..: no
VS System....: no
PlayChoice10.: no

File size: 1048592 bytes.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 12:27 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7006
Location: Seattle
Aside from anything else, 1024K - 512K != 1024K
Quote:
512K PRG ROM (32 x 16K banks)
1024K CHR ROM (64 x 8K banks)
File size: 1048592 bytes.


Anyway, the image in GoodNES 3.1.4 has the CRC32 you've given, although it's not verified.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 1:16 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1413
lidnariq wrote:
Aside from anything else, 1024K - 512K != 1024K
Quote:
1024K CHR ROM (64 x 8K banks)

More specifically, 64 × 8 = 512, not 1024.

Also, my copy has a PRG checksum of CD9ACF43 (and a PRG+CHR checksum of B4735FAC), and last I checked it worked fine in my own emulator - I can only assume you've got bugs in your MMC5 IRQ implementation.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 5:55 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3097
Location: Brazil
Yup, I fixed the wrong calculation, should be chr*8, not chr*16. Fixed the IRQ too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Rahsennor and 6 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