
== BREAKING NEWS ==

Our beloved friend Xaztur was found dead at his home in August 1st, 2007
after being lost for two weeks. As for today (August 2nd), the cause of his
death is not known.

We would have put an "in memoriam" message in the demo itself, but it didn't
seem to suit anywhere. So we state it here.

  IN MEMORIAM

  XAZTUR OF PWP

  1979 - 2007

== ABOUT THE DEMO ==

This is Impossiblator 3, a demo for the unexpanded VIC-20.

DO NOT WATCH IT WITH AN EMULATOR! A LOT OF STUFF WILL BE HIDDEN FROM YOU.
USE A REAL MACHINE OR WATCH A VIDEO.

You don't need to write the whole d64 image. The two small files (also
included separately as impo3.prg and impo3a) are enough.

== CONTACTING ==

viznut at iki.fi
http://www.pelulamu.net/pwp/
http://www.pelulamu.net/viznut/blog/
http://www.youtube.com/viznut

== FOR EMULATOR AUTHORS ==

I'm working on a complete explanation of the VIC-20 hardware from the
software point of view. There are still some issues that need further
research, but here's the part the demo depends on and which is not properly
emulated by VICE:

=== Color memory fetches ===

Whenever either the CPU or the VIC reads a byte from a V-bus address
$(0000-$1FFF, 8000-$9FFF), it also reads the corresponding color memory
nybble to the bus lines VD8-VD11.

This is important to know because the value sometimes leaks out (at least on
the motherboard revisions of the individual VIC-20 I use for development).

=== CPU memory access ===

Whenever the CPU reads from an unconnected V-bus address (on the unexpanded
machine: $0400-$0FFF, $9800-$9FFF), it reads the byte that was read by the
VIC chip on the previous cycle. Color RAM leaking does not occur.

Whenever the CPU reads the color memory, the high nybble of the byte will
contain the high nybble of the previous byte read by the VIC.

Whenever the CPU reads from an unconnected "C-bus" address (on the
unexpanded machine: $2000-$7FFF and $A000-$BFFF), it reads back its own last
byte: LDA $2345, for example, puts $23 in accumulator. JSR $6000 executes
RTS (opcode $60).

JSR $6000 is also an elegant way of killing current versions of VICE.

=== VIC memory access ===

Whenever the VIC reads a byte from an unconnected V-bus address, it reads
the byte that was left on VD0-VD7 on the previous bus cycle, ANDed by the
color memory nybble that was in VD8-VD11 prior to the memory read.

If the CPU accessed the "V-bus" area on the previous clock cycle, the VIC
will read the same byte. However, if the CPU accessed the "C-bus" area
instead, the VIC will read back whatever byte it accessed on the earlier
clock cycle.
