News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

Emulation of speccy colour system

Started by Joseman, 13:12, 02 August 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joseman

Hi

these days i'm playing with the disassembled code of a speccy game.

I want to "emulate" the 768bytes that puts the colours on speccy.

I was thinking on put together "similar colours" to match  the 4 colour limit.

Black & Blue    --> Black
Red & Magenta -->Red
Green & Cyan  --> Green (or cyan)
White & Yellow --> White

I read that R-type was using an emulation of the speccy color system.

I don't know how a relative good speed can be achieved puting colors on the fly reading that colour table (and i don't know what is doing the R-type code to achieve that)

There is some source code example or some tips to do this job on the cpc?

Thanks!!

Sykobee (Briggsy)

The issue is that you have the normal spectrum game running, writing to what it thinks is screen memory. Then you have an end-of-game-rendering-cycle mega-copy+adapt to the CPC screen, and this craters performance.

After accepting that, you may also be able to use stippling to simulate more colours or the spectrum brightness attribute (it won't be the same, it'll be acceptable). Obviously you can pick the best base colours for the game being ported, but Spectrum games loved Cyan so I guess that'll have to be in there most of the time. I think there was a CPC Spectrum emulator that may have done this? If the game manipulated attributes separate to the rendering this would be quite difficult to emulate (a few dozen bytes update on the Spectrum could cascade to hundreds or thousands of bytes to update on the CPC screen).

Most ports dropped the attribute aspect and went full mono as we all sadly know.

If we were lucky the port rewrote the rendering code to write directly to the CPC screen, and this allowed some colour if we were lucky. Sadly ports were cheap and quick.



andycadley

I think that R-Type (and also Dizzy) are essentially using the game data from the Spectrum version, but rendering it differently. So they aren't just rendering the Speccy display, necessarily, but rather see that a character is supposed to be in say blue and cyan and mapping it onto Pens 0 and 2 which would appear black and green (if we take your colour selection in order above).

It works as a very quick and dirty conversion mechanism but has some down sides. A cyan+green block would become a solid Pen 2 on the Amstrad for example. And a blue on black object would be entirely Pen 0, probably making it disappear entirely - this is why there are no Blue background objects in the Spectrum version of Dizzy - that sounds problematic but in practice the way the Speccy colours are laid out means there isn't much contrast between adjacent colours anyway and so it's usually avoided by default.

Joseman

Hi

I put my idea of converting a spc screen to CPC coding a little conversion tool

I replaced the colours like i said in the first post. correcting the coincident colours that will hide the blocks choosing another of the 2 colours.

the conversion is made by the CPC itself.

Bit table conversion on &100
Code on &200
spc screen on &1000
spc attributes on &2800
CPC screen in &4000 (spc format)

What do you think? is the conversion ok or ugly as hell?


Ninja-Gaiden-CPC" border="0

Nich

Quote from: Joseman on 17:22, 10 August 23I put my idea of converting a spc screen to CPC coding a little conversion tool

What do you think? is the conversion ok or ugly as hell?
I think it looks pretty good for a Spectrum conversion.

Powered by SMFPacks Menu Editor Mod