[Coco] 8 color coco 2 graphic display
Fedor Steeman
petrander at gmail.com
Mon Apr 22 05:46:40 EDT 2013
Sounds like some pretty awesome trickery, Torsten. I wish more game
programmer's did these at the time. Unfortunate that the CoCo3 doesn't
support it. What could be the reason? Also, I wonder if the CoCo FPGA /
CoCo-X supports it?
BTW if anyone happens to have some source code to demonstrate this trick
that would be really nice!
> Try the latest version of XROAR, should do the trick for both NTSC and PAL
> emulation.
Are you saying that XROAR shows Dragonfire displayed as intended?? That
sounds really cool. I'd better download that and dust up my .rom files.
Anyone happen to have the Dragonfire game as bin or virtual disk?
Cheers,
Fedor
On 21 April 2013 14:47, Torsten Dittel <OS-9 at trs-80.cc> wrote:
> Ben <ben_jimenez at ...> writes:
>
> > Is there some sample code around on how to do this?
>
> Hi Ben, here's what I remember after 30 years:
>
> The trick is switching graphics modes (e.g. Dragonfire: BASICally spoken
> switching between SCREEN1,0 and SCREEN1,1 of PMODE3,1) during the screen
> image is generated line by line by the VDG.
>
> This has to be at least be synchronized with the vertical blank (VSYNC,
> every 16.67ms on NTSC, every 20ms on PAL machines), either by polling the
> corresponding PIA bits or by implementing a corresponding interrupt service
> (on IRQ).
>
> You could then manually count CPU cycles of the code you're executing in
> the mean time, to know where you are on the screen (switching can be done
> as well in the middle of a line, even several times as Dragonfire proves)
> to make sure the switching always takes place at the same point of time
> (and thus point on the screen) after the vertical blank occured, but this
> requires to create symmetrical code if you have conditional branches.
>
> Or you could waste all the CPU cycles by staying in a loop until the
> switching point is reached.
>
> Or you could additionally setup a Fast HSYNC (FIRQ) interrupt service
> routine which counts the scan lines (should be reste by the VSYNC then) and
> triggers the switching at a certain scan line. For the "fine tuning" of the
> horizontal position of the mode change, you would then use opcodes
> like "NOP" (2~) or "BRN" (3~), if there's nothing senseful else to do for
> the interrupt service routine.
>
> It depends on what else you want to do during the "mixed mode" is
> displayed. Each approach has it's advantages and disadvantages. So I assume
> to provide code examples one would need to understand what you're planning
> to do.
>
> > Of course the trick didn't work in the vcc emulator, but I'd like to try
> > and do this on my real coco 2.
>
> Try the latest version of XROAR, should do the trick for both NTSC and PAL
> emulation.
>
> Regards, Torsten
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list