Re: Problems with moving VIC-20 sources

From: Ed Spittles <ed.spittles_at_gmail.com>
Date: Sat, 29 Jun 2013 16:31:30 +0100
Message-ID: <CAMPG4Y_bckG3d1OtgccCxGf0ocYEZgxGv_S_A2jG8DP86ZEEmQ@mail.gmail.com>
It seems unwise to me to be enabling an interrupt before setting up the
counters - but I can't see how that could cause your symptoms.

Ed

On 29 June 2013 16:28, <Ruud@baltissen.org> wrote:

> Hallo Patryk,
>
>
> > ...  or is it already ashtrays.. ?
>
> To start with you last remark: AFAIK, dead. I have no experience
> with the VICE monitor but it loops from $E5E8 until $E5EF, a normal
> behaviour IMHO.
>
>
> > Did you triple-check if something could still possibly be
> > referencing an absolute location?
>
> ; set 60Hz and enable timer
>
> SetViaTimer:                            ;
> [FE39]
>         lda     #$C0                    ; enable T1 interrupt
>         sta     VIA2_IER                ; set VIA 2 IER
>  nop
>  nop
>  nop
>  nop
>
>         lda     #$26                    ; set timer constant low byte [PAL]
> ;       LDA     #$89                    ; set timer constant low byte
> [NTSC]
>         sta     VIA2_T1Cl               ; set VIA 2 T1C_l
>
> The above works, the 1-3 combination I showed you in the previous
> email as well. The 2-2 combination goes wrong, as well as the 3-1
> and 4-0 combination. That rules out any referencing to "lda #$26"
> and beyond because then it already should have go wrong above.
> If there is a weird direct JMP or JSR to 'sta VIA2_IER', I cannot
> see what wrong adding some extra NOPs would do. And indeed, one
> doesn't. But two do ???
>
> But.... to make it weirder, while writing the above I got the idea
> starting to move the whole just one byte. Result: black screen.
> Uhhh ????
> I experimented a bit and the following code still ends up in a
> black screen.
>
> ; set 60Hz and enable timer
>
> SetViaTimer:                            ;
> [FE39]
>         lda     #$C0                    ; enable T1 interrupt
>         sta     VIA2_IER                ; set VIA 2 IER
>
>         lda     #$26                    ; set timer constant low byte [PAL]
> ;       LDA     #$89                    ; set timer constant low byte
> [NTSC]
>         sta     VIA2_T1Cl               ; set VIA 2 T1C_l
>
>  nop
>         lda     #$48                    ; set timer constant high byte
> [PAL]
> ;       LDA     #$42                    ; set timer constant high byte
> [NTSC]
>         sta     VIA2_T1Ch               ; set VIA 2 T1C_h
>
>         rts
>
> But moving the NOP instruction behind 'lda #$48' ends up wit a
> normal functioning VIC-20. But four NOPs on that spot run fine. So
> what about one before and three behind 'lda #$48'? Black screen
> again. 2-2 and 3-1 on their turn run fine again.
>
> But I let it rest for the moment because the problem lays behind
> the BASIC/VIC-20 barrier.
>
>
> --
>
> Kind regards / Met vriendelijke groet, Ruud Baltissen
> www.Baltissen.org
>
>
>
>
>
>
>
>        Message was sent through the cbm-hackers mailing list
>


       Message was sent through the cbm-hackers mailing list
Received on 2013-06-29 16:00:46

Archive generated by hypermail 2.2.0.