Steroids? Ah-ha-haa! Stop it.

I would like to start a series of articles regarding the subject already well known to Russian ZX sceners, that made a kind of hype in due time. Some call it modern replica, some — non ZX. The topic is TS-Config for ZX-Evolution board. This article is a plain overview to give you a taste of the matter.

ZX is notable for extensively using its CPU for every hard work done in demo — graphics, music and finally math. Emerging of AY chip saved the performance used in sound generation and limited CPU responsibility to the player routine processing, which is much more convenient in comparison to the beeper bit-banging. So, why not to save graphics jobs for CPU.

I decided to add a set of features that will ease some routine tasks typically performed in demo. I selected Pentagon-128 as a baseline since the great bulk of Russian demoscene is tailored for it. Resulting machine is fully compatible with its prototype in spite of having a number of things inconceivable on ZX.

What's added? Graphic modes primarily. Three additional modes are available: 16 or 256 palettized colors per pixel and a text mode with a loadable font. It's not a big deal nowadays to develop a color-per-pixel mode, but it needs a smidgen of sagacity to develop it to be practically useful. Let's think of addressing in the first place and make it as simple as possible for the CPU. How about INC L for next pixel and INC H for new line? Yep, that's it, and we keep this idea intact throughout the whole architecture. Every addressing is folded within its assigned space and addresses are a multiples of power of two, no knotty computing anymore! Now add a hardware pixel accurate scrollers to them which allow to move the pixel field without any memory transfers at all.

The most time consuming task on ZX has always been sprites drawing. Also, one can calculate how huge amount of memory space a color-per-pixel graphics will occupy. We bump into the CPU performance if we want to process pixels by software. And there exists a solution: a dedicated graphic engine. We even have two possible choices for this purpose: a blitter and a tile-sprite unit (TSU). Blitter, which is actually a mode of DMA (yeah, we have DMA), allows us to build a game room (given that we talk of a game) in 256 colors using tiled images stored in RAM. TSU provides purely hardware display of two types of objects: tiled 'text mode' planes and rectangular graphic objects known as 'sprites'. It is much faster to change a couple of bytes to move 64x64 pixel area or change its palette rather than transfer 2 kilobytes of graphics array.

OK, what about CPU performance? No radical improvements in this area, although CPU clock can be set up to 14MHz which is four times as fast as original Pentagon. And to make life easier the interrupt controller was upgraded to support some new modes like line or blitter interrupts with dedicated vectors.

The purely philosophical question: 'can the art of coding be ever shown up on this ZX on steroids?' has a simple answer: you are allowed to use the architecture up to the acceleration level you choose. And no one bans you to write a tricky routines to feature your craft, if you are able to. So hold your breath and let's go deeper into the TS-Config from next time on.
  • avatar
  • [просмотров: 28407]
  • +4

9 комментариев

avatar
thanks for overview!
  • VBI
  • 0
avatar
о! после разбиения на абзацы читать стало легче =) tnx =)
avatar
Ммм… сколько буков)
avatar
Спасибо за статью. Удивительно откуда вообще берется интерес и люди, а главное — демо, к столь молодой платформе. Подход к программированию, похоже, совсем другой, чем на ZX Spectrum 48/128.
avatar
Я уже не раз говорил, что все демы для простоспека написаны) А что-то новое изучать все программеры очень любят. А тут на тебе и возможности новые, и вроде как и старый добрый z80. Буду рад если конфа когда-нибудь станет официальной демо-машиной, не смотря на искусственность происхождения. Ну тут дело в нашей с вами поддержке — чем больше пишем, тем больше популярность. плюс версии самой конфы под все доступное ей железо. (это я в сторону буржуев смотрю) ибо у наших пожалуй у всех кто хотел есть пентева
avatar
Кстати, верно подмечено про новизну в старом, важный момент.
avatar
Надеюсь, все получится! Всем спасибо за поддержку!
avatar
Не совсем согласен, что для 128 все написано.
Но писать под компьютер, который стоит у тебя на столе и использовать все его возможности — это естественно.
avatar
тс-конфа немного похожа на GBC — те же тайлы и ДМА. И цветов побольше:)
Только зарегистрированные и авторизованные пользователи могут оставлять комментарии.