Page 1 of 3

Re: Build your dream computer

Posted: Thu Sep 17, 2020 12:43 am
by Joefish
Maybe better use of the Attribute byte could be 5 bits for INK (2 red, 2 green, 1 blue) and 3 bits for PAPER. So 32 colours (the left and right columns of that 64-colour palette) on 8 backgrounds.

Or 2 blue bits, 2 green and one red. Though I can't think what that palette would be...

Re: Build your dream computer

Posted: Thu Sep 17, 2020 1:01 am
by 1024MAK
When talking about better graphics, one thing that often does not get mentioned, is how a Z80 could manage to shift all the data required for a multicoloured high resolution display around. So I’ve wandered if having two Z80s would help. One would run the game play and feed data to a SID like sound chip.

Meanwhile the second Z80, under the direction of the primary Z80, would exclusively handle the graphics. Be it moving sprites around, or scrolling the screen, left/right/up/down...

This idea could even be extended if the video ULA allowed transparency, then the primary Z80 could do sprites while the second Z80 did the scrolling and other video effects.

And much more flexible interrupt timing would allow the programmer to select which TV line start he or she would like an interrupt to fire on ;)

At the very least, 8 bits for the ink colour, 7 bits for the paper colour (1 bit does the transparency). Same resolution and screen layout (but twice the attribute memory area) as the ‘classic’ ZX Spectrum.

A two colour bit mapped high resolution mode: 640 wide mode. Only allowed two colours per video/pixel line, but a two byte palette entry at the start of each line enables each video line to have different colours to those above or below it. This mode allows for 80 column text.

Mark

Re: Build your dream computer

Posted: Thu Sep 17, 2020 1:31 am
by RMartins
For me I would like something like:

- CPU eZ80
it's an 8 bit CPU fully compatible with Z80, but supports 24 bits addresses (16MB) as a linear memory addressing mode, or the regular 64K mode.
It has an extra 8 bit register, for all the known 16 bit register pairs we know from Z80.
This would avoid any messy bank switching requirements, like we have on 128K or ZXNext

- up to 16 MB RAM

- Sound should have at least 8 channels, with some control for trebble, attack, sustain, the usual stuff for generating good audio.
Interrupt/DMA driven, to feed the music at any rate required.

- Graphics could have the same resolution or go for 320x240 (keep 4/3 ratio)

- Keep 2 color per 8x8 square.

- 32/16 Color palette (4 bits Ink/ 4 bits paper), but allow this palette to be defined, with 6x6x6 or 8x8x8 RGB palette table.
Eventually the same 4 bit color code, could be a different color, if it was used as paper or ink, giving in fact a MAX of 32 simultaneous color system.

- Dual Port memory, to separate video rendering accesses from regular CPU accesses.
Gets rid of contention timings.

- Support programmable interrupts correctly, per device and programmable timer.
Allows to trigger code execution at specific scan lines for example.

- Support a DMA chip.
For faster screen dump/transfers.

- Provide some form of flash drive support
MicroSD memory cards or similar.


Nice things to have:

- An extra processor, independent of the eZ80, for example a Z80 or 6502 for managing sound, blitting, other system tasks, read keys, etc...

- Keyboard controller with interrupts
So that we don't need to scan the keyboard, it notifies us of changes. Could be done, with the extra CPU.

- Simple blitter chip, that could do the usual basic Porter Duff modes (AND/OR/XOR, AKA Masking), while doing transfers (DMA operations), would be nice.

- Have a RTC (Real Time Clock)

- Support WIFI

Re: Build your dream computer

Posted: Thu Sep 17, 2020 8:48 am
by Stefan123
My Spectrum dream computer is already here: the Spectrum Next :) The only thing I would have changed is to let it have a larger keyboard.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 9:58 am
by 1024MAK
Some nice ideas there, but the first post did say that we should be using 1980s technology...

The eZ80 was introduced in 2001. EEPROM / flash memory etc. also is relatively new technology. Same with the FPGA with the Next...

Mark

Re: Build your dream computer

Posted: Thu Sep 17, 2020 9:59 am
by PeterJ
It's so true that men never read instructions :D
Being an exceptionally gifted individual you can take aspects of any 8bit home computer of the time and build your own. What aspects of what computers would you take?
PS. Thanks [mention]1024MAK[/mention]!

Re: Build your dream computer

Posted: Thu Sep 17, 2020 10:29 am
by Lethargeek
PeterJ wrote: Wed Sep 16, 2020 10:27 am Imagine if you would that you are back in the 1980s and have access to all the home computers of the time. Being an exceptionally gifted individual you can take aspects of any 8bit home computer of the time and build your own. What aspects of what computers would you take?

To get you started...

It would obviously have to be a Sinclair machine, and have the competitive price point.
then here's my understanding of what was really possible in 1982 at about the same cost but much better (for a home computer)...
PeterJ wrote: Wed Sep 16, 2020 10:27 amThe excellent BASIC of the Spectrum
To me, all of them BASICs of 80s were unusable and horrible, worse than assembler, so definitely not. Something like Sinclair Logo in appearance (but not in efficiency)) instead. I mean - structured, no line numbers, named procedures, local variables, better machine code integration so it would be of some use in games as well. And yes, it was possible to cram such interpreter into 16k ROM.
PeterJ wrote: Wed Sep 16, 2020 10:27 amalong with the colour palette and attribute clash
Attributes w/o almost useless flash with 4 bits per ink and paper instead. No 16k model (it was a big mistake) so it's possible to have more memory for the screen. Different screen memory layout with 256 byte chunks representing columns (both pixels and attributes in 2 areas of the each). Several submodes depending of how much lines per attribute you need - from 28 rows (224 pixels high) of 8x8 attribute tiles to 128 pixels high multicolor 8x1 "tiles". Also any width (in attribute columns) you want (you may hide unused columns with ink=paper just like it is done on the real Spectrum). Same ULA memory page mode read trick is possible with the same timings (at the same raster width). Not to mention it's so much easier to program, and the code would be faster too. 8-)
PeterJ wrote: Wed Sep 16, 2020 10:27 amThe keyboard entry choices of the Spectrum 128K

The built in Floppy Disk of the +3
probably too costly in 1982
PeterJ wrote: Wed Sep 16, 2020 10:27 amThe Sprites and Sound of the C64, but with additional Spectrum BASIC commands
Sprites? We need no stinkin' sprites! :evil: Hardware sprites were too limiting for the designer, too costly on many levels and inappropriate for an universal computer. To get rid of the colour clash it's much cheaper to implement a low resolution "blocky" 4-color local mode. That is, per attribute tile - if the attribute has ink=paper then it means the tile is in low-res and the ink (or paper) selects one of 16 4-colours local palettes (probably predefined in the 1st models, customizable in the later ones; if ink=paper=border then it just hides this tile gfx).

Likely won't even need the hardware scrolling, as the gfx routines would be even faster than those of the real Spectrum. And to make it even faster it's useful to have programmable interrupt time (a better alternative to using floating bus trick).

Sound yes, i'm not a big fan of AY myself, so SAA1099 at least (if it was impossible to get SID).
PeterJ wrote: Wed Sep 16, 2020 10:27 amThe build quality and keyboard of the Memotech MTX

The built in SCART Connector of the Sony MSX
again, not sure if it wasn't too costly, but something besides RF is definitely needed (RGB seems a simplest choice)
PeterJ wrote: Wed Sep 16, 2020 10:27 amThe 320 X 200 resolution of the C64 with 16 colours on screen (with 1 background and 1 foreground colour per 8x8 cell)
see above

as for a better (more natural) fixed 16c palette - something like this one:
Image
(just a rough example that needs more tweaking to allow better mixed gradients)

P.S. and maybe the 6809 (6309 even better, but not sure when it was available) instead of the Z80 if it isn't too radical :mrgreen:

Re: Build your dream computer

Posted: Thu Sep 17, 2020 10:41 am
by PeterJ
Don't forget [mention]Lethargeek[/mention], we are choosing from stuff available in 8bit home computers of the 80s.

I hear what you say about BASIC at the time, but probably Sinclair and BBC BASIC were the best during the 8Bit computer boom.of the 80s IMHO.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 10:53 am
by Lethargeek
PeterJ wrote: Thu Sep 17, 2020 10:41 am Don't forget @Lethargeek, we are choosing from stuff available in 8bit home computers of the 80s.
well, i didn't - all the tech was there at the time and the machine using it should have been cheaper than the c64 or the atari 800 (at the very least) while looking almost as good (sometimes better) running games

Re: Build your dream computer

Posted: Thu Sep 17, 2020 11:15 am
by catmeows
Lethargeek wrote: Thu Sep 17, 2020 10:53 am
PeterJ wrote: Thu Sep 17, 2020 10:41 am Don't forget @Lethargeek, we are choosing from stuff available in 8bit home computers of the 80s.
well, i didn't - all the tech was there at the time and the machine using it should have been cheaper than the c64 or the atari 800 (at the very least) while looking almost as good (sometimes better) running games
Yes, that Is where I was aiming my design ;)
I'm not sure how far you can go with the BASIC interpreter. I know typical 80ish BASIC was quite horrible but also very accessible. Recently I have studied almost any BASIC from 80s, from TINY BASIC to MALLARD and QL BASIC and it is really interesting how structured BASICs blurs the concept of 'programming for everybody'. Well, I don't want to hijack this thread but if you are interested in designing a 'perfect 16K BASIC', I would like to play with you.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 11:19 am
by Alone Coder
Laptop format
Full keyboard (without numpad)
Kempston mouse (including wheel function)
Gluk CMOS RTC
Z80 @ 3.5/28 MHz
Russian software compatibility (most notably 400+ titles for ATM-Turbo capabilities, including 50+ games, and 100+ titles for General Sound, including 70+ games)
DDp's palette standard (4+4+4)
internal/external sound switch
VGA out
SD card (Z-controller/ZX Evo/Pentagon 2.666 standard)
WIznet W5300 ethernet card such as ZXNetUSB

Re: Build your dream computer

Posted: Thu Sep 17, 2020 11:35 am
by clebin
What other speeds of Z80 were available at the time?

I'd start with a faster CPC. I always thought the CPC would have been a brilliant computer if a lot of the games didn't run slower than the Spectrum versions. I don't know how much was just lazy ports, but it would have been terrific with some extra horsepower. At their best CPC graphics look fantastic. I still hate the way C64 games look.

I like the built-in tape recorder, but I'd stick it in a +2 case, which is a little bit sleeker. Grey or Black? I loved my grey, but black is more Spectrum.
I also never liked the AY chip much, so I'd put in a SID which sounds amazing to this day.

BBC Basic rocks, so I'd definitely include that.

Nothing too crazy there. To be honest, specs don't mean much to me as a died-in-the-wool Spectrum fan. I was very happy with my years on the humble Speccy and moving on to a super-duper Amiga 500 afterwards.
Lethargeek wrote: Thu Sep 17, 2020 10:29 am Sprites? We need no stinkin' sprites! :evil: Hardware sprites were too limiting for the designer, too costly on many levels and inappropriate for an universal computer.
I was reading something about this recently and it was kind of epiphany for me. The article was saying that platforms with sprites & hardware scrolling encouraged developers down well-trodden routes like platform games and shoot-em-ups, whereas the Spectrum was a completely blank canvas that fostered creativity and experimentation. If there's any danger that we'd lose the Microsphere games, Denton Designs' stuff, Turbo Esprit, Kosmic Kanga, Knight Lore, etc, then I don't want no stinkin' sprites either.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 12:24 pm
by catmeows
clebin wrote: Thu Sep 17, 2020 11:35 am What other speeds of Z80 were available at the time?

I'd start with a faster CPC. I always thought the CPC would have been a brilliant computer if a lot of the games didn't run slower than the Spectrum versions. I don't know how much was just lazy ports, but it would have been terrific with some extra horsepower. At their best CPC graphics look fantastic. I still hate the way C64 games look.
The CPC problem is that you need to move about two times more video data with only slightly faster CPU. Sam Coupe had similar issue.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 12:28 pm
by Joefish
More palettes. This time I'm splitting the attribute byte instead of 4/4 bits (16/16 colours), I'm splitting it 5/3 bits, which gives you 32 INK colours and 8 PAPER colours, which I think is a far better use of the byte, at least for games. You can still blend INK and PAPER in adjacent characters if you use the basic 8 colours, but you have access to so many more colours too.

But how to split up those five bits, so the palette can be generated by simple logic circuitry? Well, you have 2 bits of 2 of the RGB components, and 1 bit of the third. These palettes look at the three possible combinations where either R, G, or B is controlled by a single bit, and the other two are 2-bit values. And then the 8 colours of the 3 bits left for PAPER.

Image

Personally I think the top-left palette, where Red and Green are 2-bit values and Blue is a 1-bit value, is the best. Maybe to be expected, since Blue is such a dark colour and quite a small influence. Bottom-left looks pretty, but lacks the range of hues in the top-left. And top right is just a barney of purple vs. green.

So I think that would be my choice for a one-byte attribute, whether that's in character squares, 8x1 multicolour, or defining 2 colours of a character cell behind a 4-colour screen; 2-bits Red + 2-bits Green + 1-bit Blue for INK, with 1-bit RGB PAPER.

But at no point would I want the resolution to drop below 256x192 - no brixels here!
Maybe a Speccy resolution screen where you can tune the attributes to 8x8, 8x4, 8x2, 8x1?

If it was four colours on my machine it would have to be 2-bits per pixel with choice of colours from a palette, but like multicolour, that would have to be an option so you could drop to the original for speed of update.

As I say, I also like the MSX arrangement, where the screen is character-mapped, but there are enough characters (3 banks of 256) to treat the whole screen as pixel-addressable hi-res. Although that takes three memory accesses for the video processor to render each 8x1 pixel 'byte' (character ID, character pixel data, character colour data), so memory contention in a flat-RAM Spectrum memory model would be a total wipe-out! But at least you'd have the speed advantage of just being able to move whole characters around.

As for sprites, I don't want to write games that rely on N-sprites. But I'd like to be able to render one or two player characters as sprites or overlay pointers, markers, gunsights, etc. The baddies can be software sprites, but a few hardware sprites would be a big boost. I don't think it was the sprites themselves that railroaded C64 games into total reliance on the hardware; it was the lack of processing power that made software sprites untenable.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 1:00 pm
by 1024MAK
clebin wrote: Thu Sep 17, 2020 11:35 am What other speeds of Z80 were available at the time?
The NMOS Z80 was available in 2.5MHz, 4MHz (as used in most of the Z80 based computers of the time), 6MHz (Zilog says these can run at 6.17MHz) and 8MHz. But keep in mind that the higher speed versions were more expensive.

The later CMOS versions are available also as 10MHz and 20MHz, but I don’t know when these were introduced. But Amstrad were still using 4MHz NMOS types right up to the end of the production of the last +2B machines...

Mark

Re: Build your dream computer

Posted: Thu Sep 17, 2020 4:27 pm
by catmeows
Joefish wrote: Thu Sep 17, 2020 12:28 pm More palettes. This time I'm splitting the attribute byte instead of 4/4 bits (16/16 colours), I'm splitting it 5/3 bits, which gives you 32 INK colours and 8 PAPER colours, which I think is a far better use of the byte, at least for games. You can still blend INK and PAPER in adjacent characters if you use the basic 8 colours, but you have access to so many more colours too.

But how to split up those five bits, so the palette can be generated by simple logic circuitry? Well, you have 2 bits of 2 of the RGB components, and 1 bit of the third. These palettes look at the three possible combinations where either R, G, or B is controlled by a single bit, and the other two are 2-bit values. And then the 8 colours of the 3 bits left for PAPER.

Image

Personally I think the top-left palette, where Red and Green are 2-bit values and Blue is a 1-bit value, is the best. Maybe to be expected, since Blue is such a dark colour and quite a small influence. Bottom-left looks pretty, but lacks the range of hues in the top-left. And top right is just a barney of purple vs. green.
I think designing palette around RGB model is wrong. You should try HSV. RGB is hardware oriented model but if you want to design limited (16/32) palette you should design it in HSV and then adapt it to specs of your DAC. With 1/1/1 DAC you don't have choice at all, but 2/2/2 DAC can produce 64 colours and 3/3/3 DAC gives you 512 options.
So design your color palette in HSV, arange it to show hue/saturation ramp, then convert to your DAC and then manually tune it.
In your examples, I see lot of colors that are very close each other. I can distinguish them when they are shown as big rectangular area, sitting just by side of similar color. But put them next to more contrasting colour and they are interchangeable.
Look at the two 16c palettes Lethargeek and I presented above. We both cheat.
My light gray is tinted to cyan to allow better ramp from more saturated green and blue and I have muddy dark green that acts as dark gray if needed.
What I'm trying to say, that you can cheat on very dark and very light ends of V axis and you can also cheat on low saturation end of S axis. That would free slots for more of well articulated colors. And for this sort of thinking HSV model is far better than RGB.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 4:47 pm
by Einar Saukas
Joefish wrote: Thu Sep 17, 2020 12:28 pm More palettes. This time I'm splitting the attribute byte instead of 4/4 bits (16/16 colours), I'm splitting it 5/3 bits, which gives you 32 INK colours and 8 PAPER colours
This is actually a good idea.

If we apply the same "scientific approach" I posted here to this new idea, we would get this:

Image

Pick either top or bottom half of this picture, with 32 colors for INK and 8 colors for PAPER.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 4:50 pm
by Einar Saukas
Another approach would be simply 3 values (#00, #80, #FF) for each RGB, with a few colors left for gray and perhaps 1 for transparency:

Image

Then you would have 32 colors for INK, 8 colors (the ones marked within squares) for PAPER.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 4:56 pm
by Einar Saukas
catmeows wrote: Thu Sep 17, 2020 4:27 pmI think designing palette around RGB model is wrong. You should try HSV.
My original 16 colors palette and my first 32 colors palette were both calculated from HSV.

Only my second 32 colors palette was calculated from RGB.

Re: Build your dream computer

Posted: Thu Sep 17, 2020 5:13 pm
by Lethargeek
calculated from this, calculated from that... why not just pick the most prevalent real-world colours?

Re: Build your dream computer

Posted: Thu Sep 17, 2020 5:23 pm
by 1024MAK
Depending on how complex you want the hardware to be (and hence how costly in terms of price), will determine what colours are actually available.

As we are talking about 1980s technology, with analogue video, we are either talking analogue RGB video (SCART) or PAL composite video.

The DAC is likely to be a resistor type. So although some ‘tweaking” of resistor values is possible, or some extra logic can be added, it does mean that an arbitrary set of colours is unrealistic for the price point of a low cost computer.

Indeed, this is the likely reason that Sinclair ended up with the BRIGHT system used in the ZX Spectrum in the first place.

Mark

Re: Build your dream computer

Posted: Thu Sep 17, 2020 5:45 pm
by Lethargeek
1024MAK wrote: Thu Sep 17, 2020 5:23 pm The DAC is likely to be a resistor type. So although some ‘tweaking” of resistor values is possible, or some extra logic can be added, it does mean that an arbitrary set of colours is unrealistic for the price point of a low cost computer.
low-end (and low-cost in 1982) atari 2600 got 128/104 colours
even just picking some 16 out of these seems pretty "arbitrary" to me

Re: Build your dream computer

Posted: Thu Sep 17, 2020 6:01 pm
by Einar Saukas
Lethargeek wrote: Thu Sep 17, 2020 5:13 pm calculated from this, calculated from that... why not just pick the most prevalent real-world colours?
Are you sure there are colors more prevalent than others in real-world?

Re: Build your dream computer

Posted: Thu Sep 17, 2020 6:08 pm
by Lethargeek
Einar Saukas wrote: Thu Sep 17, 2020 6:01 pm
Lethargeek wrote: Thu Sep 17, 2020 5:13 pm calculated from this, calculated from that... why not just pick the most prevalent real-world colours?
Are you sure there are colors more prevalent than others in real-world?
very sure - for example, every day i'm seeing very little (if any) magenta but lots of beige(s)

Re: Build your dream computer

Posted: Thu Sep 17, 2020 7:00 pm
by clebin
Lethargeek wrote: Thu Sep 17, 2020 6:08 pm very sure - for example, every day i'm seeing very little (if any) magenta but lots of beige(s)
Jack Tramiel says “I’ve got just the machine for you!”