View Single Post
Old 14 April 2020, 10:09   #11
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 52
Posts: 244
Quote:
Originally Posted by Toni Wilen View Post
ROM gets overlayed on top of chip RAM when reset is executed. You need to set CIA overlay bit immediately after the RESET. Because 68020+ pipeline is 3 words + 1 long word input buffer, it should be much easier to handle than with 68000 (which has only 2 word pipeline = RESET + CIA modification instruction must fit in 2 words)

It probably is best to prepare data and address registers for OVL setting, execute RESET, set CIA OVL bit (I think it is enough to set OVL data direction), then execute bra.s (or jmp (an)) to force pipeline refill because at least input buffer will now have long word loaded from ROM which you don't want to execute.
This is what I did more or less.. Also setting data direction seemed to be enough to "clear" OVL and swap RAM in. My code is basically:
Code:
    reset
    move.b  d0,(a5)    ; D0=3, A5=$bfe201
    jmp     (a4)       ; A4 points to a code 4k further in Chip RAM
mr.spiv is offline  
 
Page generated in 0.04398 seconds with 11 queries