[Coco] Pop Star Pilot - Chapter 11 is up

John Kowalski sockmaster at gmail.com
Sun Dec 15 15:36:24 EST 2013


Nick Marentes wrote:
>For those following my blog, I have chapter 11 - "Houston, we have scrolling!"
>available for reading.
>
>Nick
>
>http://www.members.optusnet.com.au/nickma/PopstarPilot/

Hi Nick!

Lookin' good!  I think in a lot of cases, it might be possible to
avoid the '86 vs '87 GIME issue.  The difference only comes into play
with the way the timer works here, right?  You want to generate an
interrupt every 3 scan lines and have to use the timer to do it,
correct?
Instead of using the 'slow' 63.695 usec timer clock source (clocks
every scan line) you could use the 'fast'  279.365 nsec timer clock
source (clocks 228 times per scan line).

This way, the difference between GIMEs is minimised.
To trigger interrupts every 3 lines using:
'slow' timer clock - need to set timer count to "1" on '86 and "2" on
'87.  (if I recall)

And if you ran it on the wrong GIME, 1 generates an interrupt every 2
lines instead of 3 on an '87, and 2 generates an interrupt every 4
lines instead of 3 on an '86.


Using:
'fast' timer clock - need to set timer count to "682" on '86 and "683"
on '87. (if I recall)
But if you just set it to 683 for either GIME, it's still going to
trigger an interrupt every 3 scan lines... except on an '86 it's going
to trigger an interrupt every 3.00438 scan lines instead of *exactly*
3.
The interrupt on each 3rd scan line will occur half a CPU cycle later
than the last and by the bottom of the screen it'll be off by about 43
cycles, or roughly late by 1/3rd of a scan line.

For the purpose of syncronising the CPU to the video, this might not
be too bad and and the code might still work for the split screen
effect to work.  If there is a 'miss' in the display (like the bottom
portion of the screen begins one line too late) you could just try
adjusting the counter to 682 and see if that works instead.

Worth a shot and might save the trouble of having to have a 'which
GIME do you have?' question in the loader.

-- 
John Kowalski / Sock Master
http://users.aei.ca/twilight/sock



More information about the Coco mailing list