Re: VIC-II initialization.

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Sat, 29 May 2021 21:22:39 +0200
Message-ID: <20210529192239.GB2603_at_hermes.local.trikaliotis.net>
Hello,

* On Sat, May 29, 2021 at 12:45:32PM -0500 tokafondo wrote:
> I've been studying the VIC-II datasheet and how the C64 initializes it when
> booting.
> 
> The only thing I've seen while booting is
> 
> LDX $#FF
> [...]
> STX $D016

Well, that's not completely correct. The JSR $FD02 in-between modifies
the X-register. In most cases, without a cartridge, it will end with
X=5.

> that I think is a kind of "enable 40 columns text mode".

This STX $D016 is the reason why the left/right border of the C64 goes
smaller when doing a RESET.

But: Have a look at the routine at $E5A0-$E5B3 (especially the loop
starting at $E5A8, and its data area at $ECB9). It writes the data array
at $ECB9 into $D000, thus initializing all 47 registers of the VIC at
boot time. This routine is called as part of the RESET ($FCFB -> $FF5B
-> $E518 -> $E5A0).

Additionally, $FDCB-$FDD4 set the VIC-II bank to $0000-$1FFF. Although
it initialized the CIA, it is still part of the initialization for the
VIC-II.

But other than that, you are right, the C64 does not do much with the
VIC-II.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
https://spiro.trikaliotis.net/
Received on 2021-05-29 22:00:23

Archive generated by hypermail 2.3.0.