Amstrad CPC vs C64

category: general [glöplog]
Let's get an 8 bit war thread going! :D

Here's my take on the CPC vs C64 discussion started in the comments for Batman Forever. As a C64 scener I only know a little bit about CPC from some googling, so it would be nice if some CPC sceners could step in and fill the blanks/correct mistakes.

I assume we're talking about the CPC 6128, which is what Batman Forever seems to run on. This machine is almost 3 years newer than the C64, so according to Moore's law it should overall be 4 times as good, but let's see if that holds up.

CPC: Z80, 4 MHz. Some cycles - maybe about 25% - are lost since the frequency is constrained to 4 cycle intervals by the video chip.
C64: 6502 derivative, just under 1MHz, with the gfx chip stealing about 5% - 35% of the cycles, depending on how many sprites you have on the screen. The 6502 instructions usually use less cycles than the Z80's equivalent ones (maybe about half) so the CPC probably ends up being about twice as fast.

CPC: 128K for the 6128 model.
C64: 64K

Video Chip
CPC: 27 colors, nice native modes with up to 16 colors and twice the resolution of C64. No sprites or smooth scrolling. Not sure about hardware tricks.
C64: 16 colors, only supports 4-color modes natively for decent resolutions without color clashes. So to get more colorful effects you have to use CPU cycles to create new modes that are tricky to use because of weird memory layout and the color clashes that also occur in these modes, such as FLI. 8 multiplexable sprites and a bunch of hardware tricks can be used for "copper style" effects that don't require setting all the individual pixels.

CPC: Crappy AY bleeps :)
C64: Beautiful synth sound generated by the legendary SID.

CPC: Seems to have difficulties loading while playing music properly, which is quite a drawback for trackmo style demos.
C64: Can easily sync sound and lightweight effects with loading. The drive also has a separate 6502 CPU, although it has a very limited application due to slow data transfer.
Both disk formats have about the same amount of data on each side, although there are double sided drives for CPC. Not sure about loading speed, but I guess C64 is slower since it's older and the disks are bigger.

The CPC scene clearly has computers which can beat our computers in most regards. This hardly comes as a surprise since it's a newer machine. But the C64 also has its advantages with better sound, trackmo style loading, sprites and hardware tricks.
added on the 2011-03-25 17:55:05 by cruzer cruzer
added on the 2011-03-25 17:56:42 by magic magic
Video Hardware tricks :
* possibility to change colors in the palette any time (even in the middle of a line) without artifacts (I know this happens on some computers). Allows for all the 27 colors to be used.
* Default screen format is mixed text/graphic mode, so lines are grouped by 8 in the video ram organisation. This makes it harder than it should to do simple software effects as X,Y>vram address mapping is more complex than needed
* Screen size can be tweaked freely from 1x8 pixels to 720x256 (talking in mode2 pixels, that's the 640x200 default mode). This needs no timing tricks like on Atari ST or C64 to kill the border.
* With a screen height of 1 pixel, you can have multiple "screens" between two VBLs. This needs careful timing, but you can select almost freely the starting address for each line. It's the key of most effects you can do on the CPC. That's why demos often consist of plasmas and wobblers, these are super easy to do. Batman Forever does a much better use of it, and mixes it with software rendering effects to get impressive results. Almost everything in the demo uses this.

* Hardware scrolling is limited to a character resolution (8 mode2 pixels horizontal, 8 lines vertical). However, using the same trick as above, you can generate chars that are less than 8 pixels, and you can do vertical smooth scroll. Horizontal one needs at least double buffering, with each buffer shifted 1/2 char. Knowing that when you remove the borders, one screen buffer is about 24kbytes, and given the memory structure, actually fills 32kbytes of memory. It can get tricky if you have two of them like this to manage...

Disk :
Actually smooth loading is perfectly possible on CPC, was done in the Orion Prime demo. There is no DMA on the floppy, and the transfert rate is quite fast, but with proper timings it works really good.
A floppy rotates at 300rpm and has 10 sectors/track (in most demos). that makes 3000 sectors per minute or 50 sectors/second. Just in sync with the screen frequency, so you can read one sector each time you finished rendering the screen. But don't be late or the floppy controller chip will be angry and you'll need to wait for a full floppy rotation...

Loading speed is then 50*512 bytes per second, that's about 25kB. It's actually just below because of the time needed to change tracks.

Double sided drives aren't the standard, you have to flip disks. However, Pc drives are pretty common amongst sceners, because the 3.5" disks are much cheaper and easier to find. But demos should still work on the base format. The "turn disk" parts are a specificity of the CPC :)

Also, the only difference between 6128 and 464 are the floppy drive and the extra memory. these are available as expansions for the 464, and the 1541 drive is an expansion for the C64, too. So, does that count ? :)
C64 4ever!
added on the 2011-03-25 18:37:41 by Calexico Calexico
Z80 4ever!
added on the 2011-03-25 18:44:33 by MuffinHop MuffinHop
How is organised video ram on both systems?
@cruzer: Here's a gift for you! ;)
added on the 2011-03-25 18:47:07 by baah baah
@baah: Here's a gift for you too :)
Video ram on CPC is, as I said, a mixed text/graphics mode.

Line 1 starts at address 0
Line 2 starts at address 0x800
Line 3 starts at address 0x1000

Line 8 starts right after line 1
Line 9 starts right after line 2

This has the following consequences :
* In textmode, you can think of the screen as a very long single-line display
* in graphics mode, you're screwed :)
* The allocated memory page is 16KBytes by default, and the resolution is 320x200 = 64000 bytes. There are 1536 unused bytes at the end of it. when scrolling, this means the screen doesn't wrap around properly.
* when switching to 32Kbyte video pages (overscan for example), the page change create a discontinuity in the screen. You may have t take care of it.

There are some tricks to overcome the limitations, for example setting the screen to be 32 characters wide make the computations a lot simpler. But that's a small screen. Look at any demo from optimus for an example.
A 64 char wide screen isn't possible, the max is 63. You risk crashing the video chip, or wrong video timings.

Another trick used in the Ecole Buissonière demo manage to get about the same advantage as these in a small part of the screen. This is something like 43 chars wide mode, it allows you to do the line address computation on 8 bits instead of 16 as the oveflow always happen near the border of the screen. You have to leave this area for a logo or something, then.

Other than that, the memory is chunky, with 2,4,or 8 pixels per byte. Pixels are intermixed in a strange way, not as simple as "pix1<<4 | p2", except in the high resolution mode.

One small detail : the screen border color is independant from the colors inside the screen, and one hardware trick allows to have border anywhere (more or less), with the same constraints as for changing the video palette.

One little extra difficulty with the hardware vide tricks is there are 5 different versions of te video chip (CRTC 0 1 2 3 4). CRTC2 is the original one and the less interesting, it can't do most of the effects. CRTC0 is the reference platform, and CRTC1 is slightly more powerful. CRTC3 is the one in the Plus machine, it works like a CRTC0 more or less but has some extra features. CRTC4 is the same as 3 but in late non-Plus machines.
Thank you PulkoMandy,

I think many people saw Batman Forever with the emulator bad configured and the loading parts seems to not be going well. Also because a defective video recorded from a bad emulator config was distributed on youtube.
Anyway, Arnoldemu's musical loader used in Batman Forever works perfect, and he will release his source code in order to anyone to make trackmos on CPC.

On the other hand, I must say that Batman Forever runs fine on a 464 with a floppy drive + 64kb of extra ram, and it is a 1984 computer, but we can consider 6128 as the standard cpc because it was very well distributed, and does not need any additional peripheral (like c64 floppy drive).

Another important point, CPC true overscan resolutions are: 192x272 (mode 0), 384x272 (mode 1), 768x272 (mode 2).

And most importantly, CRTC capacities is far to be well exploited yet.
added on the 2011-03-25 19:04:42 by Rhino/BG Rhino/BG
You can already see musical loaders on CPC in theses demos:
The Demo / Logon System (1991)
5KB Demo 3 / 5KB (1992 I suppose)
Midline Process / Arkos (2004)
So Batman Forever is not the first one with muscial loader, but it's the first in the "trackmo style"...
added on the 2011-03-25 19:18:21 by Hicks Hicks
I forgot Demoizart / Arkos (2005)...
added on the 2011-03-25 19:21:07 by Hicks Hicks
I really hope this thread won't be hijacked again into an it > xm thread again.
btw, never had a c64 but has a CPC464 when I was a kid.
Rhino : actually there were some music bugs at the Forever Party too. Not sure where it came from, as we looked at the deo (from the same disks) on another CPC later and it all went fine. Maybe the compomachine had a tired floppy drive...

I have the same problem at home (with midline process and demoizart, the music is all butchered). Next year we'll set it up with an HxC floppy emulator to avoid any problems maybe :)

But if you want everything to be done right... rather come with us at Forever next time ! :)
c64 scene has Crossbow/Crest . end of discussion.
added on the 2011-03-25 21:36:56 by 4mat 4mat
I really hope this thread won't be hijacked again into an it > xm thread again.

Don't you mean xm >it...oh wait, it's happening again!
added on the 2011-03-25 21:55:23 by noby noby
Something strange I have noticed in pouet reviews on the recent good CPC demos (Batman Forever, From Scratch, Pheelone and others) when people start learning there is a CPC scene producing something good. Everybody says wow, a good demo on CPC, good graphics, nice effects, BUT the music is annoying, it's bad, it's not the musician's fault, the YM is the problem, it's awfull. Now look at the reviews on the latest best demos on Spectrum or AtariST which also have a YM. Great demo, great effects, graphics, presentation and the music rules. I have hardly noticed so negative comments about the music there but the sound hardware is the same. Maybe think Atari has better musicians that make more memorable music but I remember the music from the recent Spectrum demos and they could easilly annoy people used to better hardware. But no arguing there? :)
added on the 2011-03-25 22:13:40 by Optimus Optimus
personal opinion, but tbh the modern spectrum/amstrad AY musicians just don't write memorable tracks.
added on the 2011-03-25 22:19:54 by 4mat 4mat
Musicians on Atari ST have more flexibility in composing due to 68000 providing sound enhancing techniques such as SID Sound, Digi Drums etc. On 8-bit platforms forcing YM to do SID Sound costs too much time to do anything more useful.
video ram on CPC is, as I said, a mixed text/graphics mode.
* In textmode, you can think of the screen as a very long single-line display
* in graphics mode, you're screwed :)

I'd like to add something here because something Pulkomandy wrote would sound confusing to anyone not knowing the CPC. People would think the CPC has a separate char mode and a graphics mode, like the C64 has multicolor and char, which is not true for the CPC. Pulkomandy only wanted to say that the way the CPC videoram is structured in memory is so that it's more suitable to the programmer for rendering characters rather than calculating the next addres on Y for example.

And after clearing this up (I hope :) I will continue with some differences I like about each machine. The good thing with the C64 is it's char mode where you can do lot's of lot's of tricks fast. For example, some of the zoomers in Batman Forever have quite a few bitmap lines (the little wobbling joker for example). I have seen zoomers in C64 demo which quite bigger bitmaps. Both machines can Y-stretch with the hardware but you must have a fast X-stretcher. I got the inspiration to do the software x-stretcher in X-kore when I learned some information about how it's done in the C64. When each line of the bitmap at one frame has the same stretch value, someone told me they have prestored diferrent versions of the bitmap in chars which they select apropriately to display. On the CPC there is no such a thing as a char mode. The best I could do is to have four different versions of same bitmap line and copy directly from these bytes. But the C64 can write the whole char at the same time. I think the C64 has it easier here.
added on the 2011-03-25 22:42:49 by Optimus Optimus
BB Image
added on the 2011-03-25 22:44:51 by Defiance Defiance
it's more suitable to the programmer for rendering characters rather than calculating the next addres on Y for example.

Ok, maybe I was confusing too here. "calculating next addres on Y" duh.. :)
I mean it's more of a pain to plot individual pixels and try to find the real address for X and Y and such stuff. But isn't it the same with every obscure 8bit video configuration out there?
added on the 2011-03-25 22:45:23 by Optimus Optimus
Nitro: yes but that's no excuse for lazy composition, which is what the problem comes down to rather than timbre or fx tricks.
added on the 2011-03-25 23:20:25 by 4mat 4mat
I adore my C64.
added on the 2011-03-25 23:51:27 by mermaid mermaid
there's no point to the discussion, the amstrad sucks compared to the c64
added on the 2011-03-26 00:08:55 by farfar farfar
I just want to see some kickass new demos on CPC.

added on the 2011-03-26 00:21:54 by ferris ferris