It is currently Sun Sep 23, 2018 2:33 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Tue Jul 03, 2018 10:42 am 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 655
FDSLoader currently does not dump certain Game Doctor copier disks except in raw mode. The reason is that some of them fill the file header fields with nonsense, presumably as a protection measure against unaware copy utilities. Attached document written by me covers various aspects of Famicom copier hardware; Section 1.2.3 is the one relevant for dumping and image parsing purposes.


Attachments:
Copier.txt [30.51 KiB]
Downloaded 59 times
Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 3:04 am 
Offline

Joined: Sat May 06, 2006 9:19 am
Posts: 46
Thank you very much for this valuable document. I own Game Converter 1M from beginning. At last, I own Game Master and Doctor 6+. I helped Venus dump game for their copier. But they don't give any document to me. So, your document is the best I ever seen. Although, now have better flash cart than old copier. But FC copier give me a happy child time. Thanks.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 3:13 am 
Offline

Joined: Sat May 06, 2006 9:19 am
Posts: 46
Doctor 6+ use CPU Cycle Counter. Do you have good routine to convert Line Counter to CPU Cycle Counter ? I saw Venus have one, but seems it is not very well. Thanks.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 10:56 am 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 655
The one used in Rockman 3 seems to be good --- the IRQs are reproduced very similar to the original MMC3 cartridge. First, initialize a table:
Code:
   LDY   #0
   STY   $7200
   STY   $7300
   STY   $00
   STY   $01
   INY
.L1:   CLC
   LDA   $00
   ADC   #$72
   STA   $00
   LDA   $01
   ADC   #$00
   STA   $01
   LDA   $00
   STA   $7200,Y
   LDA   $01
   STA   $7300,Y
   INY
   BNE   .L1
Then, reset and start the counter at the start of the NMI handler:
Code:
   LSR   $440C   ; clear counting flag and reset the counter
   LDA   #$FF     ; set counting flag again to restart the counter, make it count longer than a frame so it will be reset by next NMI before it occurs
   STA   $440C
   STA   $440D
Whenever you would write a scanline value to the MMC3's IRQ latch, use the following:
Code:
   ; A: Absolute scanline number where IRQ shall occur
   TAX
   LDA   $7200,X
   STA   IRQCount_LSB
   LDA   $7300,X
   STA   IRQCount_MSB
   LDA   IRQCount_LSB
   STA   $440D
   LDA   IRQCount_MSB
   CLC
   ADC   #$08   ; Add 2048 cycles for VBlank duration
   ORA   #$80   ; Set counter enable flag
   STA   $440C
Code copied from K127 (Rockman 3). The calculation will be a bit off because it uses 114 cycles per scanline; correct would 113+2/3. To accomodate that, you would only have to improve the table generation by slightly unrolling the loop:
Code:
   LDY   #0
   STY   $7200
   STY   $7300
   STY   $00
   STY   $01
   INY
.L1:   CLC
   LDA   $00
   ADC   #$71 ; 113
   STA   $00
   LDA   $01
   ADC   #$00
   STA   $01
   LDA   $00
   STA   $7200,Y
   LDA   $01
   STA   $7300,Y
   INY
   BEQ   .done
.L2:   CLC
   LDA   $00
   ADC   #$72 ; 114
   STA   $00
   LDA   $01
   ADC   #$00
   STA   $01
   LDA   $00
   STA   $7200,Y
   LDA   $01
   STA   $7300,Y
   INY
   BEQ   .done
.L13   CLC
   LDA   $00
   ADC   #$72 ; 114
   STA   $00
   LDA   $01
   ADC   #$00
   STA   $01
   LDA   $00
   STA   $7200,Y
   LDA   $01
   STA   $7300,Y
   INY
   BNE   .L1
.done:
Depending on where the counter reset occurs in your NMI handler, you might have to fine-tune the $0800 bias that is added to IRQCount_LSB/MSB.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 7:12 pm 
Offline

Joined: Sat May 06, 2006 9:19 am
Posts: 46
Thanks for your help. I have two more question. Hope you know the answer.

1) 6000-7FFF is save area for RPG games. But most games (need mapper) will use 7000-71FF to store some routines. Then, when the game need save data, it will damage the routines. Is there any other location can use to store these routines ? (doctor 6+)

2) Can Doctor 6+ emulate MMC2 (like Mike Tyson) ?

Thank you.


Top
 Profile  
 
PostPosted: Wed Aug 08, 2018 10:26 pm 
Offline

Joined: Thu May 19, 2005 11:30 am
Posts: 655
1. The routines at $7000-$71FF will relocate themselves to an unused area with the $6000-$7FFF for games that would overwrite parts of that area. Ganbare Goemon Gaiden 1 is such an example. Apparently, some Super MagiCard games put their trainers in the $5xxx area, but I've never seen a (Super/Turbo) Game Doctor game do that.
2. Not that I know of. Emulating the MMC2 is quite involved: It requires snooping the PPU bus for specific address patterns and automatically bankswitching based on that. I don't think that information was available in 1987-1990, and even if it was, it would only be good for one or two games (Mike Tyson and Famicom Wars, as the Fire Emblem games were published later).


Top
 Profile  
 
PostPosted: Thu Aug 09, 2018 1:21 am 
Offline

Joined: Sat May 06, 2006 9:19 am
Posts: 46
I see. Thank you for your information about Doctor 6+.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 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