It is currently Thu Jan 22, 2026 12:14 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Register Confusion
PostPosted: Fri Mar 10, 2006 2:51 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
I was checking the MMC64 documentation for clock port enabling and clock port location. Apparently bit 3 of $df11 tells me on what address the clock port registers are located, but does it also control the location (i.e. bit 3 is writeable) ? Not owning a MMC64 myself I can not verify this but I recall reading somewhere that the clockport location is controlled by a jumper? Also, AAY64 mentions a Shadow on bit 3 of $df11 that's not mentioned in Schoenfeldts documentation. What is this?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 11, 2006 6:05 pm 
Offline

Joined: Thu Jan 12, 2006 9:10 am
Posts: 177
Bit 3 is writeable, and according to docs and my own code disable bit is #7, not #3.

(About disable bit: I guess that Ninja got confused by the BIOS code changing clockport location when there is cartridge attached to MMC64.)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 12, 2006 4:43 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
Ok, thanks for clearing this out. On to my next question then: :wink:

How do I prorepy detect if there's a MMC64 plugged in? From the sparse manual I'd draw the conclusion that reading $df13 to see if it's a positive value (1,2 or 64) then there's probably a MMC64 hooked up? Would it be safe to assume that the address will read 0 otherwise?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 12, 2006 5:20 pm 
Offline

Joined: Thu Jan 12, 2006 9:10 am
Posts: 177
Quite safe way: enable MMC64 (poke $df13,$0a;poke $df13,$1c) and clear bit 1 of $df11, then $df13 should read $64. Next set bit 1 of $df11 and check that $df13 reads 1 or 2.

Just reading I/O area isn't safe, as it is open address space with unpredictable contents if there is no cartridge, and whatever cartridge might put there if there is one.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 12, 2006 6:07 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 11:22 am
Posts: 874
Ah! excellent! Thanks a lot :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue May 09, 2006 9:09 am 
Offline

Joined: Thu Jan 12, 2006 5:30 pm
Posts: 20
So, the AAY-docs are wrong? Hmm, I added them at BP2005 from Docs which Oliver Achten gave me. And he proofread the MMC-pages before I added them. /me is confused...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue May 09, 2006 10:38 am 
Offline

Joined: Thu Jan 12, 2006 9:10 am
Posts: 177
In the MMC64 register map bit #3 is shown as clock port location selector and bit #7 as disable bit. They also work like that (on my MMC64 at least).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu May 11, 2006 10:37 am 
Offline

Joined: Thu Jan 12, 2006 5:30 pm
Posts: 20
Hmm, it's long ago, but I remember that Oliver explained to me that the spec-file is not correct there and the AAY-version is correct and he wanted to update the specs. Well, if you say that the spec-behaviour works for you, it might be time to contact Oliver again :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu May 11, 2006 11:31 am 
Offline

Joined: Thu Jan 12, 2006 9:10 am
Posts: 177
Here is exit code from BIOS V1.01:
Code:
82dc   AD 01 DC   LDA $DC01     ; check for left shift
82df   29 80      AND #$80
82e1   D0 0A      BNE $82ED     ; not pressed, skip

82e3   A9 55      LDA #$55      ; unlock disable bit
82e5   8D 13 DF   STA $DF13
82e8   A9 AA      LDA #$AA
82ea   8D 13 DF   STA $DF13

82ed   B9 37 9C   LDA $9C37,Y   ; copy rest of reset code to $0200
82f0   99 FF 01   STA $01FF,Y
82f3   88         DEY
82f4   D0 F7      BNE $82ED

82f6   20 22 9C   JSR $9C22     ; wait for bottom border
82f9   AD 01 DC   LDA $DC01     ; wait until keys released
82fc   C9 FF      CMP #$FF
82fe   D0 F6      BNE $82F6
8300   20 22 9C   JSR $9C22     ; wait for lower border

8303   A2 81      LDX #$81      ; external ROM active, disable MMC64

8305   AD 12 DF   LDA $DF12     ; check for cartridge in pass-thru connector
8308   29 06      AND #$06
830a   C9 06      CMP #$06
830c   F0 02      BEQ $8310

830e   A2 89      LDX #$89      ; if found, move clockport

8310   4C 00 02   JMP $0200     ; "stx $df11; jmp ($fffc)"

My MMC64 doesn't automatically disable itself when there is another cartridge attached, but it moves its clockport. That behaviour is exactly what you would expect from the docs and the code above. Although disable bit (#7) is always 1, it only affects MMC64 if it has been unlocked.


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

All times are UTC [ DST ]


Who is online

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