<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 26 Sep 2000 10:46:06 -0700 (PDT)
From   : Thomas Harte <t.harte@...>
Subject: Re: Font Implosion / Explosions?

On Tue, 26 Sep 2000 12:45:20 +0100, Tom Seddon wrote:
>  How does this bit multiplexing work?

When a 6502 operation comes up, its operation is not only done on the 8bit
data it expects in the 8bit registers that are defined, but a higher order
bit version of the same instruction is done on some higher order data. I'm
using 32bit data because its what intel chips work in, so for example, if
'ASL &fe03' comes up, the 8bit value at &fe03 is shifted and the status bits
are set, but also a 32bit quantity also though to exist at that location is
shifted four bits down. In my emulator a wide carry is kept so that the
shift operations work, but no wide versions of the other status bits exist.

Clearly if you alter the memory map so that the right 32bit values are in
the right places, then when you come to draw the screen you suddenly find
32bit where 8bit values were for drawing the display, so mode 2 graphics
could be redrawn in 16bit high colour, for example. Provided the game
doesn't do anything too clever with its graphics, anyway.

In practice in my emulator, 256 colours is the maximum, so mode 2 just
becomes mode 1 for drawing purposes. This sounds a little strange, but on
the Electron nearly nothing uses mode 2 because in the 80 byte pitch modes,
any memory writes or reads during the pixel part of a display causes the CPU
to be halted (the ULA stops its clock) until the left/right border area, so
its really too slow to be useful. Most games use mode 5, which does very
neatly map to 256 colours.

I've got a version of Repton which I've very poorly upgraded to about 35
colours (I'm no artist), which you can see a screenshot of at
http://electrem.emuunlim.com/shots2.htm, but I wouldn't bother reading the
text on the page - it rambles and isn't even proof read.

>  It sounds like this is what you mean, rather than the placing of UDGs in 
>  locations other than page &C (which is what the Beeb means by font
implosion 
>  and explosion)... ???

Yeah, I guess I must have misunderstood the expression. Sorry.

> I don't think a game like Chuckie Egg will be using OS routines to 
> do this  kind of thing though - I think it's probably a more simple 
> case of it stores its sprites in a 1bpp format too (perhaps because 
> the Spectrum version did) and uses similar algorithms to those 
> above to convert it into a monochrome Mode 2 sprite. 

It is probably because the Electron version is mode 5, not mode 2 (the big
difference being that the ostriches are purple). I assumed they'd have saved
development time by storing the graphics as 1bpp and getting the ROM to
expand them. Interestingly, it seems to expand them when you being play, but
not when you are at the title screen, so I may have to accept that this game
is unmodifiable.

As for storing the extra bit information in the first place, the file format
I made up has been able to handle it since day one, so that isn't a problem
. . .

-Thomas





_______________________________________________________
Say Bye to Slow Internet!
http://www.home.com/xinbox/signup.html
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>