Build your dream computer

Anything relating to non Sinclair computers from the 1980's, 90's or even before.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: Build your dream computer

Post by RMartins »

1024MAK wrote: Thu Sep 17, 2020 9:58 am 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
Quite true, but did that mean, use chips that existed, or technology that existed ?

eZ80, doesn't bring anything really new, that couldn't be done in the 1980's.
I could have changed to a Motorola 68000, but I opted to keep the Z80 for retro compatibility.

There were several 16 bit computers in the late 80's, eventually with 24 bit address space (would have to look for a specific one though).

The SD card or Flash are obviously a later tech (late 90's), but almost everything else, except for the extras like WIFI, that I placed in a different section, most of what I mentioned already existed in the 1980's.

So nothing really violating the concept rules, except the Flash drive.
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Build your dream computer

Post by AndyC »

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.
It sounds great, but I suspect makes avoiding colour clash even harder. Without an even split between ink/paper, I suspect it's harder to be able to tweak things that get close to each other, because certain colours will only be available for INK pixels.

To be honest, the first thing I'd drop is the bitmap + attributes in favour of a character/tile based display like the C64 or NES - it's a lot better suited to low memory usage and provides hardware support for things most Speccy games end up mimicking in software.

In fact the machine I'd probably end up with is something along the lines of a "fixed" NES design. Tweak a few bits here and there to improve multidirectional scrolling and get rid of the loading seam. If possible adding something like the SNES layers and Offset Per Tile tricks would be nice, though whether feasible in 80s hardware is another issue. And probably a Z80, simply because I prefer it to 6502.
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Build your dream computer

Post by Lethargeek »

AndyC wrote: Fri Sep 18, 2020 7:09 pm
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.
It sounds great, but I suspect makes avoiding colour clash even harder. Without an even split between ink/paper, I suspect it's harder to be able to tweak things that get close to each other, because certain colours will only be available for INK pixels.

To be honest, the first thing I'd drop is the bitmap + attributes in favour of a character/tile based display like the C64 or NES - it's a lot better suited to low memory usage and provides hardware support for things most Speccy games end up mimicking in software.

In fact the machine I'd probably end up with is something along the lines of a "fixed" NES design. Tweak a few bits here and there to improve multidirectional scrolling and get rid of the loading seam. If possible adding something like the SNES layers and Offset Per Tile tricks would be nice, though whether feasible in 80s hardware is another issue. And probably a Z80, simply because I prefer it to 6502.
you forgot about dropping the keyboard :roll:
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Build your dream computer

Post by AndyC »

Lethargeek wrote: Fri Sep 18, 2020 8:03 pm
AndyC wrote: Fri Sep 18, 2020 7:09 pm It sounds great, but I suspect makes avoiding colour clash even harder. Without an even split between ink/paper, I suspect it's harder to be able to tweak things that get close to each other, because certain colours will only be available for INK pixels.

To be honest, the first thing I'd drop is the bitmap + attributes in favour of a character/tile based display like the C64 or NES - it's a lot better suited to low memory usage and provides hardware support for things most Speccy games end up mimicking in software.

In fact the machine I'd probably end up with is something along the lines of a "fixed" NES design. Tweak a few bits here and there to improve multidirectional scrolling and get rid of the loading seam. If possible adding something like the SNES layers and Offset Per Tile tricks would be nice, though whether feasible in 80s hardware is another issue. And probably a Z80, simply because I prefer it to 6502.
you forgot about dropping the keyboard :roll:
I figure a decent keyboard (like the +2 or CPC) and a disk drive were basically a given. It could have just about any version of BASIC, as I'd go straight to m/code anyway.
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Build your dream computer

Post by Lethargeek »

AndyC wrote: Fri Sep 18, 2020 10:39 pm I figure a decent keyboard (like the +2 or CPC) and a disk drive were basically a given.
not for a dream gaming console you want to see :P
even the c64 while being born out of the console project still got a bitmap mode
unlike a console aimed just at games (and even just a subset of game genres) a computer has to be more flexible
so if we have to drop something to lower the cost then the special case solutions (like tiles/sprites) get dropped first
AndyC wrote: Fri Sep 18, 2020 10:39 pm It could have just about any version of BASIC, as I'd go straight to m/code anyway.
forth would be useful but alas it isn't suitable for a wide audience (RPN is not a big problem but the system is way too vulnerable to user mistakes)
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Build your dream computer

Post by 1024MAK »

In terms of the best BASICs, there is BBC BASIC (a Z80 version exists for various machines, there is even a version for the ZX Spectrum). Also the QL SuperBASIC. I also like GFA BASIC.

One of my favourites, but not BASIC, but BASIC like (complied rather than interpreted), is OPL.

One of the best features of the ZX Spectrum BASIC, is the error checking at the editor level. I also like the string slicing system. Much better than MID$, LEFT$ and RIGHT$. The channels system is also a nice feature. Such a shame that the original ROM was not finished.

The Memotech MTX BASIC has some nice bits, including the only 1980s BASIC apart from BBC BASIC that I know of, that allows assembly language code to be included in a BASIC program.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Build your dream computer

Post by AndyC »

Lethargeek wrote: Fri Sep 18, 2020 11:38 pm
AndyC wrote: Fri Sep 18, 2020 10:39 pm I figure a decent keyboard (like the +2 or CPC) and a disk drive were basically a given.
not for a dream gaming console you want to see :P
even the c64 while being born out of the console project still got a bitmap mode
unlike a console aimed just at games (and even just a subset of game genres) a computer has to be more flexible
so if we have to drop something to lower the cost then the special case solutions (like tiles/sprites) get dropped first
The NES (well Famicom) actually did have a keyboard, disk drive and even BASIC available in Japan. Yes, it's a very good piece of games hardware but that doesn't make it entirely impractical as a general purpose computer either. As the C64 showed to some extent.
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Build your dream computer

Post by AndyC »

1024MAK wrote: Sat Sep 19, 2020 12:24 am In terms of the best BASICs, there is BBC BASIC (a Z80 version exists for various machines, there is even a version for the ZX Spectrum). Also the QL SuperBASIC. I also like GFA BASIC.

One of my favourites, but not BASIC, but BASIC like (complied rather than interpreted), is OPL.

One of the best features of the ZX Spectrum BASIC, is the error checking at the editor level. I also like the string slicing system. Much better than MID$, LEFT$ and RIGHT$. The channels system is also a nice feature. Such a shame that the original ROM was not finished.

The Memotech MTX BASIC has some nice bits, including the only 1980s BASIC apart from BBC BASIC that I know of, that allows assembly language code to be included in a BASIC program.

Mark
BBC Basic was probably the gold standard, but I'd rank Locomotive BASIC from the CPC as a close contender too. It has some nice advanced features like interrupts, text windows and a nice resolution independent graphics system. Sinclair BASIC had a few nice things, but was generally lacking compared to other machines except perhaps the terrible POKEfest that was C64 BASIC.
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Build your dream computer

Post by Lethargeek »

AndyC wrote: Sat Sep 19, 2020 10:55 am The NES (well Famicom) actually did have a keyboard, disk drive and even BASIC available in Japan.
i know, but it was of little use (except the drive)
yet another toy accessory just like the robot
User avatar
PeterJ
Site Admin
Posts: 6878
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Build your dream computer

Post by PeterJ »

There is a good discussion about Sinclair verses CPC locomotive and BBC BASIC here.

https://retrocomputing.stackexchange.co ... lair-basic

As I have openly said before, I'm not a fan of the CPC range, because of the poor screen resolution when you go above 4 colours (without tricks like overscan), but the BASIC is certainly interesting.

IMHO It was the SCREEN and ATTR commands which gave Spectrum BASIC programmers the ability to write games easily.
catmeows
Manic Miner
Posts: 718
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

Re: Build your dream computer

Post by catmeows »

One of the issues with BASIC is the mess around IF statement.
Original BASIC had form IF condition THEN commands <EndOfLine>. False means "skip to next line" while true means continue execution (on same line). Indeed, it is very simple concept that can be implement easily.
Introducing ELSE increases complexity a lot, especially when ENDIF is ommited.

Different BASICs came with different solutions:
- introducing IF-ELSE-ENDIF with mandatory ENDIF
- single line IF-THEN with optional ELSE and only one IF is allowed on line
- single line IF-THEN with optional ELSE. Multiple IFs Are allowed and single ELSE branch is taken as alternative for any failed IF
- single line IF-THEN with optional ELSE. Multiple IFs are allowed and single ELSE is alternative for the last IF.
- single line IF-THEN with optional ELSE. Multiple IFs are allowed and multiple ELSEs are allowed. Interpret tries to figure out what ELSE is counterpart to what IF. This task can be solved with assumption that every IF has ELSE or there Is no ELSE on line at all.

Some BASICs allowed both single line IF-THEN and multiline IF-THEN-ELSE-ENDIF, considering line with IF-THEN without any following command as start of multiline IF-THEN-ELSE-ENDIF.
That somehow works but it is mess.

IMHO the original single line IF-THEN has its beauty in context of line oriented BASIC. When BASIC wants use both single and multiline IFs, it should probably solve it with different syntax. For example IF-THEN for single line and IF-BEGIN-ENDIF for multiline statement. It is not accident Pascal uses BEGIN-END for coumpound statements, it makes life easier.

Another mess are procedures. There is concept of local variables, but results are returned in parameter passed as reference. Even if procedure could return result in proper way, without structures or records or objects, you sometimes need to return a tuple eg.

Code: Select all

LET x,y=PROC(a,b,c)
Last minor issue is with non counted loops. There is lot of variations on WHILE, REPEAT,UNTIL but they quite often lack way to exit loop or retrigger condition from any point inside loop i.e. BREAK/EXIT, CONTINUE.
Besides, DO statements WHILE (condition) statements REPEAT loop can mimic any of them and is cleaner, IMHO.
Proud owner of Didaktik M
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Build your dream computer

Post by 1024MAK »

Maybe, but the real problem here is that there appears to have been a vacuum with regards to the BASIC language being extended in a formal way. So each and every manufacturer added there own ‘extras’ in their own way...

Note that I am not saying that the extras should not have been included. Merely that if a formal enhanced standard had been developed, it would have been an incentive for manufacturers to use this standard for the core BASIC in their machines.

So the problem with the IF THEN ELSE ENDIF etc. and the REPEAT / DO / WHILE loops could have been sorted out.

In terms of returning values from procedures, that’s a little bit trickier. As it stands, the DEF FN is the structure that normally returns a value. If multiple values need to be returned, maybe a pointer to a variable structure is needed instead.

Myself, I normally use global variables for this job. Hence variables that I only required inside a procedure are LOCAL. Variables used for passing values from (or to) procedures are GLOBAL. I’ve written many programs using this method without any significant problems.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Build your dream computer

Post by Lethargeek »

the main problem of most (all?) home computer ROM BASIC versions is very poor code reusability
for bigger projects it's almost impossible to reuse even your own older code w/o lots of manual edits
(unless you're actually making many variants of the same project)
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Build your dream computer

Post by 1024MAK »

Not being able to reuse code without manual editing was not just a problem with BASIC though. It's the same with the ROM based FORTH that one home computer had. And the the simple filing system (in most home computers, just a simple cassette tape filing system) does not help. Couple that with the simple line editor...

And some BASICs at least did have MERGE available.

Having said that, given these limitations, people did write very complex programs.

What would have been most helpful would have been allowing you to specify a line number range in the SAVE command (does anyone know if any BASIC offered this?). Combined with a renumber command, this along with MERGE would have made routine reuse a lot easier.

These days, modern BASIC does not need line numbers and the code can be written and edited in text editors where you can copy, paste, cut and merge as much as you like.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
AndyC
Dynamite Dan
Posts: 1407
Joined: Mon Nov 13, 2017 5:12 am

Re: Build your dream computer

Post by AndyC »

I don't think BASIC on the CPC would let you save a specific block of lines, but it had bulk line deletion and renumbering commands. Also the MERGE and CHAIN MERGE commands had the ability to delete ranges of lines when loading in new code which could prevent remnants of old code getting mixed in if you weren't careful about line numbers (which was a problem with Sinclair's MERGE command).

But BASIC was never a standardised language and, I suspect, couldn't have been without detracting from making access to machine specific features more cumbersome. Microsoft tried to push for it with the whole MSX thing, but really that just created a slew of clone machines that struggled because they didn't have differentiating qualities.
catmeows
Manic Miner
Posts: 718
Joined: Tue May 28, 2019 12:02 pm
Location: Prague

Re: Build your dream computer

Post by catmeows »

Is it really a problem, considering your program had 1.5 kloc at most ?
Proud owner of Didaktik M
User avatar
Lethargeek
Manic Miner
Posts: 743
Joined: Wed Dec 11, 2019 6:47 am

Re: Build your dream computer

Post by Lethargeek »

1024MAK wrote: Sun Sep 20, 2020 6:28 am Not being able to reuse code without manual editing was not just a problem with BASIC though. It's the same with the ROM based FORTH that one home computer had. And the the simple filing system (in most home computers, just a simple cassette tape filing system) does not help. Couple that with the simple line editor...

And some BASICs at least did have MERGE available.
With FORTH when you load a block, a screen, or whatever it's called, you at least get some warnings on redefined words, and well written libraries were able to avoid such conflicts using vocabularies (not sure about the JA version, but even the most primitive ones i know were like this). And sometimes it was even ok to ignore it. With BASIC MERGE even if everything seems smooth you can only pray there weren't some hidden conflicts. To use MERGE properly first you need to read both sources thoroughly and usually edit one of them, sometimes both. Or carefully write one source from the start keeping in mind the probability of merging it with the other one(s).
1024MAK wrote: Sun Sep 20, 2020 6:28 am Having said that, given these limitations, people did write very complex programs.
and it was a royal pain
1024MAK wrote: Sun Sep 20, 2020 6:28 am What would have been most helpful would have been allowing you to specify a line number range in the SAVE command (does anyone know if any BASIC offered this?). Combined with a renumber command, this along with MERGE would have made routine reuse a lot easier.
this doesn't change much, you still need to read/edit sources thoroughly to be safe
User avatar
Joefish
Rick Dangerous
Posts: 2058
Joined: Tue Nov 14, 2017 10:26 am

Re: Build your dream computer

Post by Joefish »

I think my approach to IF THEN ELSE would be to count the number of IFs in the line up to the point one fails, then count that many ELSE statements back from the end of the line (or quit if there aren't enough). That way the first IF pairs with the last ELSE and so-on. Problem is it's twice the work to syntactically parse the whole line in reverse!
Post Reply