Login
Search for:


Previous | Next

From: Marko_Mäkelä
Date: 2001-07-31
Subject: Re: Castle Master once again
On Tue, 31 Jul 2001, Almos Rajnai wrote:

> Sorry, but I can not confirm your exapmle code works same on a real
> Plus/4. (Maybe somebody else can do the tests, as I wrote a few days
> ago, I do not have a Plus/4 now.)

It doesn't as such; you'll have to change the banking commands (sta $ff3e or $ff3f if I remember correctly) and the address of the border color register.

> What I wrote is not about this topic, but how can interact different
> on a line-based emulation than an original Plus/4, if the interrupt
> request checked only at the end of each row.

Line-based emulation always introduces some problems. In the plus/4 even more problems than in other Commodore 8-bitters, because a program could interact with the horizontal raster counter register.

You don't have to switch between the CPU and video chip on every clock cycle in order to do perfect emulation. I believe that VICE uses event-based emulation: the video chip is emulated for longer periods than one clock cycle at a time. Checkpoints occur only when the processor reads or writes video chip registers or a video interrupt occurs. The interrupt times can be predicted based on the values of the video chip registers. The same holds for other I/O chips.

I don't know if VICE operates exactly along this principle, but I think it should, since it at least used to be much faster than FrodoSC, whose emulation alternates between CPU and I/O on every bus clock cycle.

Marko

PS: Version 1.7 of VICE was released last weekend.
PPS: I don't have anything to do with VICE development, but I'd like to see decent plus/4 emulation being integrated in VICE. Although the user interface code of VICE might not be satisfactory (I don't like it), the disk drive and printer emulation is good. And VICE supports several operating systems and hardware platforms. Why reinvent the wheel?

Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon