Re: writing to cart port (not IO space) on 64

From: Jim Brain <brain_at_jbrain.com>
Date: Fri, 24 Feb 2017 21:36:21 -0600
Message-ID: <706bb9c5-19c8-c7d7-f2bc-b80621682837@jbrain.com>
On 2/24/2017 1:04 AM, Daniel Kahlin wrote:
> On Thu, 23 Feb 2017, Jim Brain wrote:
>
>> I know ROML and ROMH are only active on reads, except in Ultimax mode.
>>
>> My question is:
>>
>> Can anyone help with a small function that would take an address, a data
>> value, a flag for the ROM area to write, and handle the heavy lifting 
> of:
>>
>> * switching to Ultimax mode
>> * doing the write
>> * switching out of Ultimax mode
>
> You cannot switch to Ultimax mode purely by software.  The cartridge 
> needs
> to provide some way to fiddle with EXROM & GAME.
Understood.  I forgot to mention that in my original post.
>
> Trivial example for Action Replay/Retro Replay:
>
> MODE_BITS       equ     %00100011       ; RAM + Ultimax
> BANK0_BITS      equ     %00000000
> BANK1_BITS      equ     %00001000
> BANK2_BITS      equ     %00010000
> BANK3_BITS      equ     %00011000
> BANK4_BITS      equ     %10000000
> BANK5_BITS      equ     %10001000
> BANK6_BITS      equ     %10010000
> BANK7_BITS      equ     %10011000
>
> ; Acc = data, Y = bank (0-7)
> write byte:
>         sei
>
> ; optional to avoid visible glitches, wait until border area
>         ldx     #$30
> lp:
>         cpx     $d012
>         bcc     lp
OK, I partially understand this.  Is it because color ROM is no longer 
wired to anything?  Because, I assume you could relo the screen RAM to 
somewhere in the first 4kB

Jim

       Message was sent through the cbm-hackers mailing list
Received on 2017-02-25 04:00:02

Archive generated by hypermail 2.2.0.