It’s currently assembled for PAL with 8KB expansion or more. Maybe you tried to start it on an unexpanded configuration?vicassembly wrote: ↑Thu Jun 18, 2020 7:49 pmI just loved this into vice and it didn't do anything. I'm not sure what happened. I tried PAL and NTSC
Background change at Raster Location
Moderator: Moderators
Re: Background change at Raster Location
Re: Background change at Raster Location
Timer 2 is a 16 bit counter, but because the only one register at a time can be set the VIA requires you to first write the LSB then the MSB. The write to VIA2TCH starts the timer running.vicassembly wrote: ↑Thu Jun 18, 2020 7:44 pm 2. At that point timer 2 will fire. I don't understand the numbers stored in VIA2T2CH. My little understanding tells me that this fires timer 2 after counting down the number in VIA2T2CL.
These are entrypoints back into the KERNAL IRQ routine4. I intuit that EABF is just doing the normal IRQ. What does EB18 do? Rate Collin West used EB15. What is the difference?
Code: Select all
10560 LAB_EB12
10561 JSR FSCNKEY ; scan keyboard
10562 BIT VIA2T1CL ; test VIA 2 T1C_l, clear the timer interrupt flag
10563 PLA ; pull .Y
10564 TAY ; restore .Y
10565 PLA ; pull .X
10566 TAX ; restore .X
10567 PLA ; restore .A
10568 RTI
Re: Background change at Raster Location
I just realized these data sheets never surfaced in this thread, so hear goes:srowe wrote: ↑Mon Jun 08, 2020 12:05 am Best home work is to read the 6522 datasheet. There are details in there such as the order of writing to the 16 bit timer registers and interrupt enabling that just aren't obvious from looking at code.
In short you load the timer register with a value and when it crosses from 0>FFFF it flags an event. If that event is defined to cause a CPU interrupt then one is raised. Depending on which VIA it is this is either an IRQ or an NMI.
The tricky bit with raster interrupts is that the cycles to set up the timer and those needed to reach the interrupt handler code are significant.
A "recent" one from Rockwell, should be mostly correct: rockwell_r6522_via.pdf
Synerteks version from 1978 seems quite elaborate: synertek_sy6522_via_1978_jan.pdf
Some details might be buried in the preliminary data sheet from MOS: mos_6522_preliminary_nov_1977.pdf
Re: Background change at Raster Location
deleted
Last edited by beamrider on Fri Jun 19, 2020 10:11 am, edited 1 time in total.
Re: Background change at Raster Location
76 is intentional. PAL only. Admittedly only tested using the latest vice trunk build.beamrider wrote: ↑Fri Jun 19, 2020 8:24 am @tlr
I just realised there's a typo in your listing.
should beCode: Select all
time_list: SPLIT 76*LINETIME,$1b
Code: Select all
SPLIT 7*6*LINETIME,$1b
Re: Background change at Raster Location
My bad...
I had 12*8 further down...
I had 12*8 further down...