Okay, this would be long, long, long.
Please read whole before replying. And be sure if you will delete all my
good comments, and reply only to a few bad mistakes, I will write it again.
I think this all must be understand as a whole, not partially!
It is too easy to take a very small part of a long e-mail and put it down.
From: "Simon Cooke" <[EMAIL PROTECTED]>
> From: "Aley Keprt" <[EMAIL PROTECTED]>
> > Although I don't understand how does it work, I'm sure that we are
facing
> a
> > very terrible
> > computer design, which has underdimensed system bus, resulting in a
large
> > speed loss (upto
> > 32%). This is similar to modern PC computers with Pentium 3 running at
> > 1000MHz, and bus
> > running at 100MHz. I think the best solution on Sam would be circuitry
> with
> > a separated
> > 64KB videoram and 512KB other ram, where CPU would run at its 6MHz.
Then,
> > when emulating
> > ZXS on Sam, we would put all this stuff into videoram, so the CPU would
be
> > regularly
> > slowered to make ZXS emulation better (although still not perfect).
>
> Tell ya what. If you build it - in silicon - I'll consider buying one.
>
> Look Aley,
> It's a 13/14 year old design. It was great for its time. But there were
> trade offs. There always are. The fact that *to you* it looks like a crazy
> design today doesn't take into account those trade offs.
Look Simon,
you have a problem. You can't stand anybody saying truth, when you don't
like that truth. I have seen several good circuits from early 80's, and I'm
sure that Sam Coupe is the best one among 8bit home computers only because
birthday of C64, Atari XL and ZX family is 10 years ago Sam's one. If
Commodore did C64 in 1986-1990, you would see the difference!
Or you can look to other platforms as well. For example my lovely game Bomb
Jack (1984) is built on a custom hardware. It uses 3xAY chip (2xAY would be
enough for Sam) and 2xZ80. Of course it has something which is today called
"graphics accelerator", similar hardware you can found on prehistoric C64 or
Atari XL as well. And they aren't machines of 1990!
To make things much simpler, I said that it would be nice to have just one
thing: divided memory into fast ram and videoram. btw. This is used on Amiga
as well, doesn't matter that it is 16bit, because memory is the same
regardless of number of bits.
And I must add yet something: VL1772 disk controller is very good. I think
Sam's disk drive is similar to +D
or Disciple by MGT and all of them are 100 times better then most other
known disk controllers for ZX Spectrum. The problem is that this controller
should be accesed with DMA. On Atari ST is the very same
WD177x (maybe similar number, but surely having the same behaviour), and
since it uses DMA, music playing or other processing during disk access is
possible. I think even if they do this "DMA" very simple on Sam Coupe, it
would be still uncountably better then their stupid 1bit network, weird
nonstandard mouse or built-in MIDI.
This DMA controller would be also used to play digital (voice) data via
SAA1099 soundchip. Not hard to imagine.
Please understand me well. I'm not saying that MIDI is nonsense. I am only
sure, that this piece of hardware is so useless for majority of people,
compared with other options, like built-in interrupt-driven RS232C (possibly
two ports to enable both mouse and intercomputer connection when needed),
and surely a standard Centronics PRINTER PORT. And if people got music when
loading from disk, it can't be compared with MIDI.
It seems that MGT tried a very interesting business:
1. Offered 6MHz, MIDI, mouse if, 2 joy if, SCART, net, NMI button, enhanced
keyboard, stereo sound, and superb Basic, big RAM
2. People really got 4MHz speed, nonstandard (i.e. almost unusable) mouse,
unusable 2 joy if (unless somebody is so smart to built a special device
with diodes to suppress matrix effect), SCART which can damage TV when using
standard cable, critically stupid networking, tragically realised NMI
button, keyboard incompatible with ZX Spectrum +/128, sound totally
incompatible with anything known, and DOS eating 16KB RAM, while ROM is
filled with obsolete Basic editor without full-screen editing, "undo/redo",
or at least "repeat last command", and finally with RAM which is paged on
32kb boundary making it impossible to easily use ZXS-128 software!!!
3. Of course to make the price as low as possible all REALLY important
hardware is NOT built-in, since people simply will buy it. (If they produced
MIDI in external form, they would bankrupt even sooner, since not so many
people would buy it.) This includes: printer centronics port, RS232C serial
port, Sam Mouse, and of course additional 256KB RAM.
Also "provided" was NO documentation of low-level programming. I see VL1772
controlling specs first time when I saw SimCoupe, I had better luck when
exploring sound, because description of SAA1099 was in some disk mags.
Although I read original manual very carefully, I haven't knew about DOS
commands like COPY(!) or RENAME(!!) or file streams until I got MasterDOS
with complete documentation.
Of course today it not too hard to find disk controller specs on internet,
but that time NOBODY in whole Czechoslovakia (our republic) knew anything
about it. Anything!
The only well-documented part is graphics. Of course. (Not counting keyboard
or joystick, which is identical to SInclair IF2).
Oh, yet one more I can remember: I often worked with diskettes. Several
utilities was slow just because SamDOS didn't offer an interface to read
sectors on whole-track basis. I solved this by
a) using MasterDos,
or
b) hacking into SamDos - I found an address when BC register is filled with
number of sectors to read by
READ AT (or something similar, can't remember now)
If somebody had known about VL1772 commands, that somebody (simply anybody)
could make a short few-bytes long code to read whole track into memory.
Nobody did it. Nobody knew how to, obviously. (Of course SamDice do this,
but I know 150 programmers who would like to have READ AT ...,10 in SamDos
and pay virtually anything to be able to use it in their free-of-charge
programs).
And I must say I wasn't so bad, many other users was yet worse on the level
of knowledge. Technical Manual 2.0 (i.e. version much higher than 1.0) have
no information on machine code ROM calls, DOS calls, etc.
I work with computers since 1987 and I will never understand why MGT liked
to bankrupt instead of giving more free-of-charge support to their hardware.
A simple TXT file enclosed on diskette would be much better. Also ROM
disassembled and commented would in final make lots of money if they give it
for free to everybody. You know, all these would extremely enlarge the basis
where new good software could be made.
Also, it took quite a long time before somebody did a good ZX Spectrum
emulator. I saw the first classic emulator with ZX-ROM and snapshot feature
in the summer of 1990. But how many British people really have a decent ZXS
emulator? I'm affraid not many. I spent exactly 6 months with that rubbish
"emulator" on SamDos diskette, before I pointed it is better to load ROM
somewhere, and put hooks to 0x556 or 0x56c (ROM-LOAD routine). Although I
wasn't strong enough to make snapshot-feature (you know I was too young to
do big asm programs), with some more utilities it became to be possible to
convert ZX games to diskettes.
I owned real ZX Spectrum that time and I own it still. If they offered me
"put-your-rom-here" emulator instead of that big rubbish, I could use it. I
ask why must one be Eisnstein to understand and use Sam Coupe?
etc. etc.
Sam is strange in all aspects.
> If you want to know the real reason for the weirdness of the timing of the
> ASIC on the SAM, look into CAS/RAS burst reads (the SAM loads as much of a
> line at a time into memory as it can, to reduce contention, IIRC). There's
> only so much it can do at times, and the amount of time needed to wait for
> the CAS/RAS cycle to complete is what determines the speed of the system.
If
> it's in the middle of a read, the SAM will be halted until the read
> completes - and will then be given the chance to do something. But not
much,
> because the ASIC has to take control of the cycle again soon.
"look into CAS/RAS"... ???
I can't look there.....
I know what it is, but know absolutely no details about how things are
realised on Sam. The paragraph you wrote above is exactly what I wanted to
get. I didn't write all this to put Sam Coupe down. But you must also
understand that when I go into details to make emulation better, I often get
into weird places, and simply must start thinking that it could be done
better.
I also didn't mention details of Sam's system software. I think if MGT was
smart, they would know in 1986 and yet better in 1990 that their 32KB
Basic-ROM + 16k Dos-RAM is terrible.
Computer with disk drive don't need Basic in ROM. Praxis on ZX Spectrum
showed that 0% of good quality software used Basic. Praxis on Sam showed
that nobody used tape. Obviously. Maybe I wrote this already, but I think
this is good time to repeat:
I preffer ROM with simple DOS (again SIMPLE), and basic tape routines
(hopefully this is a few bytes).
That DOS would offer file reading, copying, and a very simple batch support
(this would be instead of basic, and should offer at least replacement for
LOAD, POKE, USR), and of course a memory manager should be in ROM to offer
dynamically allocated memory. Since most of software utilities (not games)
are much shorter than 256 or 512KB (RAM size), users would like to use more
than one in a time. I don't mean multitasking, but something like MS-DOS.
Please don't say Sam is 14 years old! MS-DOS is 20 years old and offers at
least EXE, and interrupt hooks to let mouse driver etc. can be installed.
This way much stronger it would be compared to old 8bit computers!!! Amiga,
which is much older than Sam has several features I pointed here. And
there's nothing special for 16bit computers.
This all could fit into 4KB rom to save money. Or if you don't want save
money, just add printer driver, serial mouse driver, MIDI driver or
something to make ROM bigger. Maybe support of relocatable EXE files would
be yet more important. This can be achieved on Z80 very easily, and would
give us great benefit.
And I have yet one thread: Instead of mode 2 used only in Sphera there
should be black/white version of mode 3 to allow text editors to run faster.
It is not very comfortable to work in Basic in mode 3, but if it was b/w, it
would be 2 times faster. I mean b/w without palette, with just line
interrupts allowing color changes. This would give use 1 byte per character
line, which is obviously 12288 bytes for whole screen.
> As for Mode 1 timing, the SAM is deliberately slowed down in Mode 1.
But the question is how this is done, when it is automatically turned off
when saving to tape. I mean when you load ZX-ROM and type LOAD"" you are
able to load something --> CPU is really slowed down. But when you type
SAVE".." the result is unusable, because CPU isn't slow!!!
> Simon
> (running a 1.4Ghz AMD T-bird with 0.5Gb of RAM these days... and not
> noticing any memory contention at all)
Don't remember: Not noticing something doesn't mean it doesn't exist!
Aley
------------------------------------------------------------------
Bc.Aley [eili] Keprt - games & multimedia programmer
ICQ: 82357182 (evenings) *** phone: +420-68-5387035 (weekends)
private e-mail: [EMAIL PROTECTED] *** http://get.to/aley
office: Illusion Softworks, Brno, CZ - [EMAIL PROTECTED]
------------------------------------------------------------------
----- Original Message ----- To: <[email protected]>
Sent: 1. srpna 2001 19:45
Subject: Re: Sam CPU timing